User Profile

Hemant Sharma QnA

Hemant Sharma

BSC(IT)
  • 0Followers
  • 0Experience
  • 59Questions
  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am trying to run my Flutter Application in simulator but terminal gives me error

    No connected devices.

    I have searched for this issue then it says Flutter requires a minimum Xcode version of 9.0.0.

    when i try to update y Xcode Apple Store says Xcode can’t be installed on “Macintosh HD” because macOS version 10.13.6 or later is required.

    how can i update MacOS version?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am using Firebase Real-time Database to React Native, I have imported Firebase like

    import firebase from 'firebase';

    var configure Firebase= {

    apiKey: "FULL_API_KEY_PUT_HERE",

    authDomain: "FULL_AUTHDOMAIN_PUT_HERE",

    databaseURL: "https://FULL_databaseURL_PUT_HERE.com",

    storageBucket: "FULL_storageBucket_PUT_HEREappspot.com",

    };

    const fireabaseConfig=firebase.initializeApp(configure Firebase);

    export default class HomeScreen extends Component {

    //.............Remain Business Logic here...............

    }

     

    after this snippet when I run the code it works fine first time but after some time it gives me the error 

    firebase app named '[default]' already exists (app/duplicate-app)

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I want to store data on Firebase's Real-time database. How to Implement Realtime Database or 

    Firestore which is based on Firebase Database?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I have to create a new project of React Native to start development I am the success to import the start project but when I try to run react native project its give me an error Unable to load script from assets index.android.bundle and I have searched in the whole project I don't have any file with the name index.android.bundle How can I resolve this issue?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I want to remove all the coming notification from the Notification bar. After KitKat version there are too many changes in the Android API, How can I Clear all the Notifications which is placed in the Notification bar.

    Please complete process how to implement Clear Notification form the Notification bar Android Programmatically?

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to Create a simple widget in Android? 4 months ago ago

    I am trying to use this However that gives me error .

    I have a functionality in my app to start or Stop App frequently so I need a button on Home Screen which will very handy to user start the App and Stop accordingly.

    It can be possible with the help of Widget in Android
    How can we develop a Widget in android?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am using VSCode to edit my react-native code

    I have created a new project through CMD and open it in VS code at first when I run it shows me below error 

    I am not able to rectify it why it is happening I have not changed anything in the project.

     

    C:\Program Files\nodejs\node.exe --inspect-brk=31518 index.android.js

    Debugger listening on ws://127.0.0.1:31218/7656dcf9-e5fc-4f01-8b44-c1347348e15d

    Debugger attached.

    c:\...\reactNative\APPNAME\index.android.js:7

    import React, { Component } from 'react';

    ^^^^^^

    SyntaxError: Unexpected token import

    at createScript (vm.js:80:10)

    at Object.runInThisContext (vm.js:139:10)

    at Module._compile (module.js:616:28)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)

    at Function.Module.runMain (module.js:693:10)

    at startup (bootstrap_node.js:191:16)

    at bootstrap_node.js:612:3

    Waiting for the debugger to disconnect...

    SyntaxError: Unexpected token import

    vm.js:80

    at createScript (vm.js:80:10)

    at Object.runInThisContext (vm.js:139:10)

    at Module._compile (module.js:616:28)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)

    at Function.Module.runMain (module.js:693:10)

    at startup (bootstrap_node.js:191:16)

    at bootstrap_node.js:612:3

     

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation could not connect to development server react native 5 months ago ago

    I am trying to use this However that gives me error .

    Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a package server.

    when I reload the app it gives me below error.

    try the following to fix the issue:

    • ensure that the packager server is running
    • ensure airplane mode is disabled
    • ensure that your devices/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see list of connected devices.
    •  

     I am not able to access the package server from the browser on the machine and the mobile.

    When I run "react-native run-android", it gives me the error:"could not connect to development server...".

    • Package server is running and I can access it directly from the browser in the mobile device.
    • My android device connected to the computer has debugging enabled I checked it using ADB devices command.
    • My android is Kitkat so i cannot use the ADB reverse command.
    • I have set the IP address and port in Dev setting.
    • USB debug is on
  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to create custom Seekbar in android? 6 months ago ago

    I am trying to use this However that gives me error .

    How can create customise Seekbar in android with Steps? in android default Seekbar is very simple and not fulfil my requirement. I need steps in seekbar and want to see values in bobbles like below Image.


  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I want to Keep screen off when recieve SMS i have searched on google but not getting any working code. Is it possible to screen keep off anyway. Be screen off eight any notification raise or not. 
    I have searched and found keep Screen On but not found any solution for Turn screen Off.

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to send SMS through android program? 6 months ago ago

    I am trying to use this However that gives me error .

    How can we send Send Text Message ( SMS ) to my doctor on one click In Android app programmatically

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    Fully shadowed APK

    Problem:

    This APK will not be served to any users because it is completely shadowed by one or more APKs with higher version codes.

    Resolution:

    Remove this APK from your release or review the targeting and version codes of the APKs that you are including in this release.

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I have implemented In-App Purchase in Android application after subscribing from App (in-App purchase) monthly transaction will be done and the user got a Credit against the payment. Now I want to validate on In-app Purchase receipt on my Server to provide them credit successfully. 

    I have found documentation if I am not wrong through android Purchases.subscriptions: get Document  

    this is the process there defined is below please provide me right suggestion how to Validate In-app Purchase Subscription receipt 


    Request

    HTTP request

    
     

    GET https://www.googleapis.com/androidpublisher/v2/applications/packageName/purchases/subscriptions/subscriptionId/tokens/token

    Parameters

    Parameter name Value Description
    Path parameters
    packageName string The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
    subscriptionId string The purchased subscription ID (for example, 'monthly001').
    token string The token provided to the user's device when the subscription was purchased.

    Authorization

    This request requires authorization with the following scope (read more about authentication and authorization).

    Scope
    https://www.googleapis.com/auth/androidpublisher

    Request body

    Do not supply a request body with this method.

    -------------------------------------------------------------------------
     

    URL: https://www.googleapis.com/androidpublisher/v2/applications/com.google.fundook/purchases/subscriptions/fundook_monthly_01/tokens/TOKEN_COMMING_FROM_WHEN_SUBSCRIBE
    I have followed steps still gives me the error :

    {
    
        "error": {
            "errors": [
                {
                    "domain": "global",
                    "reason": "required",
                    "message": "Login Required",
                    "locationType": "header",
                    "location": "Authorization"
                }
            ],
            "code": 401,
            "message": "Login Required"
        }
    }
  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    While debugging everything working fine but when I try to build SIgned APK it shows me below Error in Android Studio 3.1.

    ERROR:

    Java compiler: (1 warning)  
    Configuration 'compile' is obsolete and has been replaced with 'implementation'.  

    WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation'.
     

     

     

    This is my Gradle file Please suggest me where I am lacking build

    .gradle (Module: app)

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 27
        defaultConfig {
            applicationId "com.google.fundook"
            minSdkVersion 16
            targetSdkVersion 27
            versionCode 1
            versionName "1.0.1"
            multiDexEnabled true
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          
        }
         buildTypes {
             release {
                 shrinkResources true
                 minifyEnabled true
                 debuggable false
                 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
             }
         }
        packagingOptions {
             exclude 'AndroidManifest.xml'
             exclude 'lib/arm64-v8a/libcardioDecider.so'
             exclude 'lib/arm64-v8a/libcardioRecognizer.so'
             exclude 'lib/arm64-v8a/libcardioRecognizer_tegra2.so'
             exclude 'lib/arm64-v8a/libopencv_core.so'
             exclude 'lib/arm64-v8a/libopencv_imgproc.so'
             exclude 'lib/armeabi/libcardioDecider.so'
             exclude 'lib/armeabi-v7a/libcardioDecider.so'
             exclude 'lib/armeabi-v7a/libcardioRecognizer.so'
             exclude 'lib/armeabi-v7a/libcardioRecognizer_tegra2.so'
             exclude 'lib/armeabi-v7a/libopencv_core.so'
             exclude 'lib/armeabi-v7a/libopencv_imgproc.so'
             exclude 'lib/mips/libcardioDecider.so'
             exclude 'lib/x86/libcardioDecider.so'
             exclude 'lib/x86/libcardioRecognizer.so'
             exclude 'lib/x86/libcardioRecognizer_tegra2.so'
             exclude 'lib/x86/libopencv_core.so'
             exclude 'lib/x86/libopencv_imgproc.so'
             exclude 'lib/x86_64/libcardioDecider.so'
             exclude 'lib/x86_64/libcardioRecognizer.so'
             exclude 'lib/x86_64/libcardioRecognizer_tegra2.so'
             exclude 'lib/x86_64/libopencv_core.so'
             exclude 'lib/x86_64/libopencv_imgproc.so'
         }
    }
    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation 'com.android.support:appcompat-v7:27.1.0'
        implementation 'com.android.support:design:27.1.0'
        implementation 'com.android.support:support-v4:27.1.0'
        implementation 'com.android.support:recyclerview-v7:27.1.0'
        implementation 'com.android.support:cardview-v7:27.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.0.2'
        compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
        compile 'com.google.firebase:firebase-messaging:11.8.0'
        compile 'com.android.support:multidex:1.0.2'
        compile 'com.github.bumptech.glide:glide:3.8.0'
        compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
        compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
        compile 'com.paypal.sdk:paypal-android-sdk:2.16.0'
        compile 'com.squareup.retrofit2:retrofit:2.3.0'
        compile 'com.squareup.retrofit2:converter-gson:2.3.0'
        compile 'com.github.javiersantos:BottomDialogs:1.2.1'
        compile 'com.github.zzz40500:android-shapeLoadingView:1.0.3.2'
        compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
        compile 'com.anjlab.android.iab.v3:library:1.0.44'
        compile 'com.payumoney.sdkui:plug-n-play:1.1.0'
        androidTestImplementation 'com.android.support.test:runner:1.0.1'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
        testImplementation 'junit:junit:4.12'
    }
    // Add to the bottom of the file
    apply plugin: 'com.google.gms.google-services'

     

    build.gradle (Project: FUndook-Android)

     

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
        
        repositories {
            google()
            jcenter()
            mavenCentral()
            maven {
                url 'https://maven.google.com/'
                name 'Google'
            }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.0'
            classpath 'com.google.gms:google-services:3.2.0'
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            google()
            maven {
                url "https://jitpack.io"
            }
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    
  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to reduce APK size in android? 8 months ago ago

    I am trying to use this However that gives me error .

    My Android application apk size has 18MB. How can I reduce the size of APK?
    through Analyze APK
    Build->Analyze APK (Click) it shows me all description were taking too much size
    there were some Images with too much size I have to replace them with there optimize Images but still my app has 16MB.

    I have imported PayPal Gradle file it has too much size how can I reduce that library size. which will help me to reduce Android App size.

     

     

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I have hear about agile Methodology know only Agile Methodology help us to create good project management or by help of Agile Methodology we discuss/cover all functions which is needed in the project. It help us to understand Client requirements.

    Please anyone tell me more what is agile Methodology?

    Why we use Agile Methodology?

    When we use Agile Methodology?

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation Retrieve bitmap from URI Android ? 9 months ago ago

    I am trying to use this However that gives me error .

    I am Cropping Image and save New Cropped Image in my SDCard Mobile Location, Image is going to save there but That image is not Readable what I want when I read that Image is Black.

    Why not saving Cropped Image?
    but if I read cropped Image from Temp file it is fine but not saving in the folder as it is where I am missing anything? Please Suggest me the right way to Crop Image and Save In the Path location in Android Mobile. 

    Below is my code what I am doing :

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
            CropImage.ActivityResult result = CropImage.getActivityResult(data);
            if (resultCode == RESULT_OK) {
                    Uri resultUri = result.getUri();
                 
                String filename = Pref.getString(thiss, "userName_pref").replace(" ", "_") + resultUri.getPath().substring(resultUri.getPath().lastIndexOf("/") + 1).replace("cropped", "");
                System.out.println(resultUri.getPath() + "^^^^^^^^^^^^^^^^^CROPED IMG^^^^^^^^^^^^^^^^^^^^^^" + filename);
                imgEditpath = resultUri.getPath();
                wrtieFileOnStorage(filename, resultUri.getPath());
                isEditIMG = true;
            
            } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {
                Exception error = result.getError();
                System.out.println(error + "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
            }
        }
    }

     

    public void wrtieFileOnStorage(String sFileName, String path) {
        File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + getString(R.string.app_name) + "/");
        if (!file.exists()) {
            file.mkdir();
        }
        System.out.println(file.getPath() + "^^^^^^^^^^^^^^^^Cache LocalFILE^^^^^^^^^^^^^^^^^^^^^^^" + file.getName());
        try {
            ByteArrayOutputStream bytes = new ByteArrayOutputStream();
            File gpxfile = new File(file, sFileName);
            file.createNewFile();
            FileOutputStream writer = new FileOutputStream(gpxfile);
            System.out.println(gpxfile.getPath() + "^^^^^^^^^^^^^^^^Local FILE^^^^^^^^^^^^^^^^^^^^^^^" + gpxfile.getAbsolutePath());
            setImgMethod();
            writer.write(bytes.toByteArray());
            // writer.append(path);
            writer.flush();
            writer.close();
    
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println(e.toString() + "^^^^^^^^^^^^^^^^LocalFILE^^^^^^^^^^^^^^^^^^^^^^^");
    
        }
    }
  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    Upload Instant App APKs

    Your Instant App APKs do not declare a valid 'android:targetSandboxVersion' attribute in their AndroidManifest. Using the 'com.android.feature' Gradle plugin to build your Instant App would add this attribute automatically.

     

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am created a List of Search Keywords on Google in RecyclerView List I want to open details page on single click of the RecyclerView itemclick listener and want to delete Clicked Item onLongClick

     

    How can we implement Click listener and LongclickListner with my RecyclerView item click listener and Long item click listener in android

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I want to add Current dateTime in my database Table while running SQLite Query to Save Data in Table.

    How do I display the current date and time in an Android application?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am using ViewPager in a Fragment and there are three Fragments of the Activity. ViewPager Working fine if I am on that fragment where I have put ViewPager when I click for next Fragment My app going to Crashed. and Giving me below error : 

    Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering

     

    FATAL EXCEPTION: main
    
         Process: com.tech.fun, PID: 19244  java.lang.NullPointerException
     at com.tech.fun.FragmentPack.HomeFragment.changeDotBG(HomeFragment.java:165)
     at com.tech.fun.FragmentPack.HomeFragment.access$000(HomeFragment.java:32)
    at com.tech.fun.FragmentPack.HomeFragment$3.onPageSelected(HomeFragment.java:125)
    at android.support.v4.view.ViewPager.dispatchOnPageSelected(ViewPager.java:1941)
    
    at android.support.v4.view.ViewPager.scrollToItem(ViewPager.java:680)
     at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:664)
    
    at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:625)
    
    at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:617)
    
    at com.tech.fun.FragmentPack.HomeFragment$4.run(HomeFragment.java:146)
    
    at android.os.Handler.handleCallback(Handler.java:808)
    
    at android.os.Handler.dispatchMessage(Handler.java:103)
    
     at android.os.Looper.loop(Looper.java:193)
    
     at android.app.ActivityThread.main(ActivityThread.java:5292)
    
    at java.lang.reflect.Method.invokeNative(Native Method)
    
    at java.lang.reflect.Method.invoke(Method.java:515)
    
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828)
    
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)
    
    at dalvik.system.NativeStart.main(Native Method)
  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I have an array Of

    String[] arr={"Google","Google","Facebook","Gmail","Twitter","Twitter"};

    how to can I remove all Duplicate Elements values? this Array should be converted into 

    String[] arr={"Google","Facebook","Gmail","Twitter"};

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation Why Email going in Spam Folder from Website 11 months ago ago

    I am trying to use this However that gives me error .

    below is my Send Email Code from Codeigniter : 

    $this-> load -> library('email');
    
        $this-> email -> initialize(array('protocol' => 'smtp', 'smtp_host' => 'mail.serverDomain.com', 'smtp_user' => 'demo@serverDomain.com', 'smtp_pass' => **password**, 'smtp_port' => 26, 'crlf' => "\r\n", 'newline' => "\r\n"));
    
        $this-> email -> set_mailtype("html");
    
        $this-> email -> set_newline("\r\n");
    
        $this-> email -> from("demo@serverDomain.com", "Website Name");
    
     

     

        $this-> email -> to("demo@gmail.com");
        // change it to yours
        $this-> email -> subject($subject);
        $this-> email -> message($body);

        $this-> email -> send();

    It is working fine for sending Mail but Email going in SPAM folder of Gmail.

    Please correct me where i am doing wrong?

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to convert 24 hr format time in to 12 hr Format? 1 years ago ago

    I am trying to use this However that gives me error .

    Do I want to convert the given CDT formatted 24 hr string into CDT formatted 12 hr, How to convert a 24 hr format string into 12 hr format string?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am using Google+ Login and firebase Messaging service for the same project. google login gives me google-services.json and Firebase messaging service also gives google-services.json both file name are same and place also same how can use both files in a single project? please helpImage result for more google-services.json

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation Firebase Cloud Messaging for Android using PHP 1 years ago ago

    I am trying to use this However that gives me error .

    How to sent Notification from Server to Mobile?

    I am trying to implement but not having the fine idea how to do it? I have created Json File and Google-services account. Please help me. Suggest me any Easy and accurate way to use Firebase Cloud Messaging.

     

     

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I want to access the database directly from my Application without any web services. I have used many time web Services and by hit URL get Data but How can I access server database directly?

    Please Help me how can i do this?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am having this error while running application :

    Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
    
    > com.android.build.api.transform.TransformException: java.lang.IllegalStateException: Dex archives: setting .DEX extension only for .CLASS files
  • Hemant Sharma QnA

    Hemant Sharma started a new conversation Custom Adapter for ListView in android 1 years ago ago

    I am trying to use this However that gives me error .

    How to create Customize adapter for ListView where Image and 2 Text\View contain in an Item and on its item click show Name of selected Item?

    I have searched for this my bad luck no result found according to me. Please help.
     

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    Application working in all versions but When I run the application in Android KitKat version it gives me an error : 

    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example/com.example.SplashActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.SplashActivity" on path: DexPathList[[zip file "/data/app/com.example-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example-2, /vendor/lib, /system/lib]]
  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    When I click on ExpandableListView's List Item it open and move on next and click on that also open Now I have two open item Open. But I want when I click on another item last opened auto collapse. How can I do this?  

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am trying to Upload Android Project to Github with the help of Android studio after Android studio 2.0 Git added with Android Studio officially, but I don't have any idea how can I up my project in GitHub repository through Android Studio Updated Version?Image result for github android studio 

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to use Substring in java ? 1 years ago ago

    I am trying to use this However that gives me error .

    I have a String "This is my String Cut it."
    i want to cut this String and show only "This is my String"
    how can I do it in java or android?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I want to change ExpandableListView indicator color in android. How can we do this in Android Studio?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I have two RadioButtons inside a RadioGroup. I want to set OnClickListener on those RadioButtons. Depending on which RadioButton is clicked, I want to change the text of TextView's Value. I have tried 

    radioGroupTitle.setOnCheckedChangeListener(somethig);

    But it is not working I am confused how can I do this?
     

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to Handle Orientation Changes on Android? 1 years ago ago

    I am trying to use this However that gives me error .

    In my App when I rotate Mobile Portrait to Landscape my TextView's value get disappear( TextView get Empty). because My Activity starts again while Screen Rotation. I want to handle this issue. Please Suggest me how can I save state of activity when orientation changes?
    Thanks

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation Push notifications in android without using GCM ? 1 years ago ago

    I am trying to use this However that gives me error .

    I've always used GCM for push notifications in android apps, but for security constraint, i'm obliged to avoid GCM and use local push server, how can I send Push notification from my server without GCM?

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to add BottomBar in activity android? 1 years ago ago

    I am trying to use this However that gives me error .

    I want some Menus in the bottom I have searched on Google and Find Bottombar for this Purpose but I do not get the idea how will it work in Activity. Suggest me any detailed Tutorial or Elaborate Bottombar in android?

    Image result for add Bottom Bar in activity

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How can I access each key and value in JSONArray in java 1 years ago ago

    I am trying to use this However that gives me error .

    I have a service where is some data coming according to day. if a day has any transaction then it will reflect or listed in JsonArray else Not show that day in the list.
    So Here I need to fetch key and Values both dynamically. I can get Values but I have tried may thing for this but not succeed please Help How can I resolve this Issue? 

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to use keyboard Search button and handle its click? 1 years ago ago

    I am trying to use this However that gives me error .

    I have an EditText who is for as Seach bar now I want to search or call the function from entering Search button from Keyboard I have the use 

    android:imeOptions="actionSearch"

    for show Search button. Now I am stuck on How can I handle its Click Event from Keyboard?
    Please Help
    Image result for keyboard search Button android

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I want to upload Image on the server from Mobile's Gallery or by clicking from Camera. I am able to click the image from the camera but don't have any idea how can I upload the image from gallery or Camera on server.
     

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How can count rows of a table in SqLite android? 1 years ago ago

    I am trying to use this However that gives me error .

    I am getting the count of rows I have in Location Table. I am using this query
     

    public int getContactsCount() {
        String countQuery = "SELECT  * FROM locationList";
        SQLiteDatabase db = this.getReadableDatabase();
        Cursor cursor = db.rawQuery(countQuery, null);
        cursor.close();
    
        // return count
        return cursor.getCount();
    }
    
    and
    
    getting this error
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.stayapt/com.stayapt.SplashActivity}: java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteQuery: SELECT * FROM locationList at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5292) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteQuery: SELECT * FROM locationList_stay at android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55) at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:58) at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:159) at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:148) at com.stayapt.localdatabase.DatabaseHandler.getContactsCount(DatabaseHandler.java:148) at com.stayapt.SplashActivity.onCreate(SplashActivity.java:58) at android.app.Activity.performCreate(Activity.java:5264) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)  at android.app.ActivityThread.access$800(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:5292)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)  at dalvik.system.NativeStart.main(Native Method)
  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to truncate sqlite table in android? 1 years ago ago

    I am trying to use this However that gives me error .

    I add the contacts in table SQLite while my app starts and use that data. but every time when I run my app contacts add the duplicate. Now I want to delete first if table has database then want to add fresh contact
    How can I do this please help me, I am new for SQLite?
     

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to create Customize Style in android? 1 years ago ago

    I am trying to use this However that gives me error .

    I want to add Style on Button with the ribbel effect but don't want to use any third party dependency. How can I do this please help?

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to create a pdf file programmatically in android? 1 years ago ago

    I am trying to use this However that gives me error .

    Hello All,
    How can we generate PDFs on Android device or Write on PDF file?
    Please share any example.

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    While running my Android app is shows me this error. Why raising this and how to resolve it please help?

     

    Installation failed with message Failed to finalize session: INSTALL_FAILED_INVALID_APK: Split lib_slice_1_apk was defined multiple times.
    It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present and then re-installing.
    Image result for Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: Split lib_slice_1_apk was defined multiple times. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to setup Xamarin Studio for Windows? 1 years ago ago

    I am trying to use this However that gives me error .

    Hello All,
    I want to learn Xamarin. Please, anyone, tell me the Installation of Xamarin Studio and what I want to Install mobile development in Xamarin.
    Image result for Xamarin Studio

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I can set tint through XML but I  am not able to set it programmatically so please tell me how can I set tint Color programmatically.

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How can i remove Divider line from RecyclerView? 1 years ago ago

    I am trying to use this However that gives me error .

    In my View there is a line between every item's end by using  RecyclerView I don't want it. How can I remove divider line from the list?
    Image result for divider recyclerview

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am using Switch button for toggle status but it's not showing same as in Lolipop and above Android KitKat Version. What did I do for all Version Mobiles to have same Toggle button style or Lookfeel? below is my code what I am using.

    <Switch
        android:id="@+id/switch3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Switch"/>
    
    
    

    Thanks In Advance.

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to create Customize DialogBox in Android? 1 years ago ago

    I am trying to use this However that gives me error .

    How can I create a customize dialog box where is an ImageView, TextView, and EditText?
    Is there any Easy way to develop this type of dialogbox ?
    Image result for customize dialogbox android

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I am confused in, we have If else and also have ternary operator.
    Why exactly is the ternary operator works and how it differs by our If else? Whan we use ternary Operator?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    I want to create an event on toolbar's back arrow dynamically. How can I set back arrow in the Android toolbar and also apply click listener?


    QnA VBage for toolbar back button android

    by adding 

    android:parentActivityName="com.stayapt.Home_Activity"

    in manifest file and its working fine. But it will take me always on Home_Activity I want to set it Dynamically.

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to make full screen dialog in android? 1 years ago ago

    I am trying to use this However that gives me error .

    I have tried many variants to create full-screen dialog but I couldn't. How to create customize DialogBox. I need something, like this : 

    Qna full-screen dialogs android open animation

    Please Help me for creating this type of Dialog Box.

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to make multiple Selected Drop Down Spinner? 1 years ago ago

    I am trying to use this However that gives me error .

    Hello Android Developers,
    I want to develop a spinner who has multiple selected capability. We can select more than one value in it. How can I do this is there any predefined Library for this. thanks in advance.

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to Delete a repository in Github? 1 years ago ago

    I am trying to use this However that gives me error .

    I have created a repository Now I want to delete this but Not able to delete it How can I delete it?

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to Connect Android to Github? 1 years ago ago

    I am trying to use this However that gives me error .

    I have uploaded my Android Project on GitHub I don't know how to connect Android Studio to Github and Pull push Project.
    Please tell me the easiest way to do this?
    How to do this?

  • Hemant Sharma QnA

    I am trying to use this However that gives me error .

    What is Animation lifecycle in android? How can I Use animation different states?
    on Animation End I want a toast. AnimationListener not showing me anything for Lifecycle.

  • Hemant Sharma QnA

    Hemant Sharma started a new conversation How to CodeIgniter Remove index.php By .htaccess 1 years ago ago

    I am trying to use this However that gives me error .

    my website is working with and with out index.php but i just want to open url without index.php. i did exactly as asked in the documentation of codeigniter, created new file .htaccess i want to remove index.php from my url or redirect to the url where is no index.php include.