App Invites Link in the Mail crashes Google Play Services - android

I've implemented Google App Invites in my app using this guide : https://developers.google.com/app-invites/android/guides/app
I can send the invite and it is received by the person I invited. The problem is the install button in the email crashes Google Play Services when the app is already installed. It the shows me following error.
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Intent android.content.Intent.addFlags(int)' on a null object reference
at com.google.android.gms.appinvite.notification.a.a(SourceFile:219)
at com.google.android.gms.appinvite.a.onPostExecute(SourceFile:29)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
Does anybody have a clue to what I'm doing wrong?

The app must have a main activity that has a category of either CATEGORY_INFO or CATEGORY_LAUNCHER.

Related

Android setting up credential using Google API

I want to create an Android application and using Google People Api. I followed all the steps on this tutorial: https://developers.google.com/people/v1/getting-started.
So I created a new project in Google Api Console, get the client id and client secret for a web application, set the consent screen oauth. Finally I tried to run the google code that use can see in the above link, but I get an Exception on creating "GoogleTokenResponse".
I post the exception even if I don't find it useful:
Process: simone.biliato.testpeopleapi, PID: 13067
java.lang.RuntimeException: Unable to start activity ComponentInfo{simone.biliato.testpeopleapi/simone.biliato.testpeopleapi.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2658)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5832)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.NullPointerException
at com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770)
at com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
at com.google.api.client.auth.oauth2.AuthorizationCodeTokenRequest.setCode(AuthorizationCodeTokenRequest.java:147)
at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.setCode(GoogleAuthorizationCodeTokenRequest.java:147)
at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.setCode(GoogleAuthorizationCodeTokenRequest.java:79)
at com.google.api.client.auth.oauth2.AuthorizationCodeTokenRequest.<init>(AuthorizationCodeTokenRequest.java:103)
at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.<init>(GoogleAuthorizationCodeTokenRequest.java:111)
at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.<init>(GoogleAuthorizationCodeTokenRequest.java:92)
at simone.biliato.testpeopleapi.MainActivity.setUp(MainActivity.java:63)
at simone.biliato.testpeopleapi.MainActivity.onCreate(MainActivity.java:27)
at android.app.Activity.performCreate(Activity.java:6221)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723) 
at android.app.ActivityThread.access$900(ActivityThread.java:172) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
Has anyone had the same? Is there any working example?
I need to use "Google Button Sign-in"?
I think you can try and use the following example:
https://github.com/sdivakarrajesh/Google-Drive-Java-API
It's for Google Drive Api but you can use the code for permission and then change the scopes.

Not able to update Pre loaded System Application through Google Play Store

I have developed an Application for a device Manufacturer which will be Pre loaded as System Application into the Device. The Device Manufacturer has Pre loaded the system application and it is available in the system image of the device. Now the requirement from the client is to update this system Application through play store in the similar way Google Play Services is updated.
I have uploaded a higher version of Application on the Google play store and once I update the App , initially the App crashes and the update is not reflected on the device until the device is rebooted. But the Preloaded applications like Google Maps, Google Play Services gets updated as soon as it is downloaded from the play store.
I have followed the steps mentioned on Google Support for updating System App :Updating System App through Play Store (Scroll to last of the page)
Please Let me know if some one has any idea about this.
The crash logs that I am getting are as follows :
06-21 18:40:40.748 2577-2577/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.harman.panasonicaicollection, PID: 2577
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.harman.panasonicaicollection/com.harman.panasonicaicollection.activities.MainDashBoardActivity}: java.lang.ClassCastException: android.support.v7.widget.ContentFrameLayout cannot be cast to android.support.v7.widget.ContentFrameLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2419)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2479)
at android.app.ActivityThread.access$900(ActivityThread.java:152)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5429)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassCastException: android.support.v7.widget.ContentFrameLayout cannot be cast to android.support.v7.widget.ContentFrameLayout
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:475)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:312)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:277)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.harman.panasonicaicollection.activities.MainDashBoardActivity.onCreate(MainDashBoardActivity.java:53)
at android.app.Activity.performCreate(Activity.java:6311)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2372)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2479)
at android.app.ActivityThread.access$900(ActivityThread.java:152)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5429)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

How to fix Developer Console testing failure, without reference to the own code?

The Google Play Developer Console shows me the following Pre-Launch-Report, for the Galaxy S6, after uploading the APK. The other nine devices, which Google uses to test the APK, have no error.
The provided stacktrace shows none of my code lines. How can I figure out, whether this is a real problem, and how can I fix it, if it is not based on my code?
Developer Console output:
Problem: java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.accounts.Account.type' on a null object reference
FATAL EXCEPTION: main
Process: com.google.android.videos, PID: 28537
java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.accounts.Account.type' on a null object reference
at android.os.Parcel.readException(Parcel.java:1552)
at android.os.Parcel.readException(Parcel.java:1499)
at com.android.vending.contentfilters.IContentFiltersService$Stub$Proxy.getContentFiltersAndIntent(SourceFile:139)
at com.google.android.videos.contentfiltering.ContentFiltersManager.saveContentFiltersToPreference(SourceFile:438)
at com.google.android.videos.contentfiltering.ContentFiltersManager.access$100(SourceFile:81)
at com.google.android.videos.contentfiltering.ContentFiltersManager$1.onServiceConnected(SourceFile:423)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1314)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1331)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6837)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Is this normal? Why do I get this error only for the Galaxy S6?

OOYALA Chromecast integration issue

I am integrating ChromeCast in my app which has OOYALA. So the problem I am facing is OOYALA has its own cast SDK and its initialization is done at application level where we pass our cast app id (registered on Google Cast console). As soon as I change OOYALA's sample ID and I try to play a video an exception occurs. Here is the exception:
com.ooyala.android.OoyalaException: cast media load failed with code 2100
at com.ooyala.android.castsdk.CastManager$VideoCastListener.onMediaLoadResult(CastManager.java:87)
at com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager$3.onResult(VideoCastManager.java:1037)
at com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager$3.onResult(VideoCastManager.java:1032)
at com.google.android.gms.internal.zzly$zza.zzb(Unknown Source)
at com.google.android.gms.internal.zzly$zza.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

Aeris Android Weather SDK NullPointerException

I have setup AerisDemo android application found on this link in android studio. I am using google play services latest version. When I run the app, it works perfectly until I click on "Interactive Maps" option, the app crashes. Below is the error:
java.lang.NullPointerException: Attempt to invoke virtual method 'com.hamweather.aeris.tiles.AerisTile com.hamweather.aeris.maps.AerisMapOptions.getTile()' on a null object reference
at com.example.fragment.MapFragment.initMap(MapFragment.java:166)
at com.example.fragment.MapFragment.onActivityCreated(MapFragment.java:102)
at android.app.Fragment.performActivityCreated(Fragment.java:2072)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:912)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.app.BackStackRecord.run(BackStackRecord.java:846)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1473)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:447)
at android.os.Handler.handleCallback(Handler.java:810)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5528)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
Can anyone help me solve this issue?
Thanks.

Categories

Resources