1

My app work good on android 4.x But android 2.2 I tried all solution from GCM SERVICE_NOT_AVAILABLE on Android 2.2 but still get "SERVICE_NOT_AVAILABLE" Unable to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (has extras) }

protected Void doInBackground(Void... params) {
        final long timeSleep = 1000;
        int count = 0;
        while (count < 2) {
            try {
                count++;                    
    GoogleCloudMessaging gcm = GoogleCloudMessaging
            .getInstance(Context);
    regid = gcm.register(Constant.SENDER_ID);

    return null;
            } catch (IOException e) {
    e.printStackTrace();
            }
            try {
                Log.w(TAG, "Registration failed.  Retrying in " + timeSleep + " ms.");
                Thread.sleep(timeSleep);
            } catch (InterruptedException e) {
            }
        }

        return null;
    }

Does anyone have idea about this?

Community
  • 1
  • 1
Tho D
  • 11
  • 2
  • You need to update the google services in you device. if it would able to take the play services then it accept and update other wise your application can't run in your device. (all the android 2.2 devices are not able to take update of play service, it depends on OME) – GovindRathod Nov 12 '14 at 05:33
  • I included google-play-services_lib in project. Do you mean to update play store? Even if update can resolve this issue, but it's not convenient to ask customer do that. – Tho D Nov 12 '14 at 06:43
  • yes @Tho D that's i am saying you cause if the play services are not installed in the user(customer) device (mainly a lower version device) they are not able to run the application. – GovindRathod Nov 12 '14 at 09:52
  • So google-play-services_lib is not use? I see if i don't include, it show "can't run with out google play service", and there is no notice if I include that lib. But get above error. – Tho D Nov 12 '14 at 15:37
  • I tested on emulator android 2.2 with google apis, it turn out well. But on my android 2.2 phone, it don't work. My phone have play store. Any help would be grateful appreciated – Tho D Nov 13 '14 at 04:49

0 Answers0