Adding Firebase Analytics to Instant App
I am converting my existing application to Android Instant App. I have successfully done that. My app is running in Instant App form. The issue that I am facing now is regarding Firebase-Analytics. When I run instant app I get this error
E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
When i try to get FirebaseAnalytics
instance using FirebaseAnalytics.getInstance(this);
the instant app crashes. I am not able to get any sort of logs on Logcat
. My "Installed" app is working perfectly fine. Also if someone can guide me on how to debug Instant Apps, I am not able to debug them or even get logs on Logcat.
Edit
Link to Bug Report
android firebase-analytics android-instant-apps
|
show 6 more comments
I am converting my existing application to Android Instant App. I have successfully done that. My app is running in Instant App form. The issue that I am facing now is regarding Firebase-Analytics. When I run instant app I get this error
E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
When i try to get FirebaseAnalytics
instance using FirebaseAnalytics.getInstance(this);
the instant app crashes. I am not able to get any sort of logs on Logcat
. My "Installed" app is working perfectly fine. Also if someone can guide me on how to debug Instant Apps, I am not able to debug them or even get logs on Logcat.
Edit
Link to Bug Report
android firebase-analytics android-instant-apps
Can you try passing ApplicationContext instead ofthis
? For debugging, make sure your debug build configuration hasdebuggable true
and then you can add a breakpoint and click on Debug button beside Run button on toolbar in Android Studio.
– adnanyousafch
Nov 6 '17 at 8:51
@adnanyousafch no luck, still getting crash and cant debug either
– Atif Farrukh
Nov 6 '17 at 9:51
Can you open the merged manifest of the instant app and see if there is an issue with manifest merging?
– dazza5000
Nov 6 '17 at 14:37
Please check the guide for adding Firebase Analytics to AIA and make sure you have followed it in your existing app: developer.android.com/topic/instant-apps/guides/… Also, I would suggest you to refer to AIA analytics sample application: github.com/googlesamples/android-instant-apps/tree/master/… I hope this will help.
– Pragati Singh
Nov 8 '17 at 4:25
@AtifFarrukh, Incase the problem is still not solved, I would suggest you to file a bug and see if Google can assist you. Also, please share link to your bug back in here so it would be helpful for all. issuetracker.google.com/issues/… TIP: Google might need sample project/Instant Application (with this issue) to provide a quick solution.
– Pragati Singh
Nov 17 '17 at 4:48
|
show 6 more comments
I am converting my existing application to Android Instant App. I have successfully done that. My app is running in Instant App form. The issue that I am facing now is regarding Firebase-Analytics. When I run instant app I get this error
E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
When i try to get FirebaseAnalytics
instance using FirebaseAnalytics.getInstance(this);
the instant app crashes. I am not able to get any sort of logs on Logcat
. My "Installed" app is working perfectly fine. Also if someone can guide me on how to debug Instant Apps, I am not able to debug them or even get logs on Logcat.
Edit
Link to Bug Report
android firebase-analytics android-instant-apps
I am converting my existing application to Android Instant App. I have successfully done that. My app is running in Instant App form. The issue that I am facing now is regarding Firebase-Analytics. When I run instant app I get this error
E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
When i try to get FirebaseAnalytics
instance using FirebaseAnalytics.getInstance(this);
the instant app crashes. I am not able to get any sort of logs on Logcat
. My "Installed" app is working perfectly fine. Also if someone can guide me on how to debug Instant Apps, I am not able to debug them or even get logs on Logcat.
Edit
Link to Bug Report
android firebase-analytics android-instant-apps
android firebase-analytics android-instant-apps
edited Dec 28 '17 at 4:02
asked Nov 6 '17 at 7:41
Atif Farrukh
1,62111741
1,62111741
Can you try passing ApplicationContext instead ofthis
? For debugging, make sure your debug build configuration hasdebuggable true
and then you can add a breakpoint and click on Debug button beside Run button on toolbar in Android Studio.
– adnanyousafch
Nov 6 '17 at 8:51
@adnanyousafch no luck, still getting crash and cant debug either
– Atif Farrukh
Nov 6 '17 at 9:51
Can you open the merged manifest of the instant app and see if there is an issue with manifest merging?
– dazza5000
Nov 6 '17 at 14:37
Please check the guide for adding Firebase Analytics to AIA and make sure you have followed it in your existing app: developer.android.com/topic/instant-apps/guides/… Also, I would suggest you to refer to AIA analytics sample application: github.com/googlesamples/android-instant-apps/tree/master/… I hope this will help.
– Pragati Singh
Nov 8 '17 at 4:25
@AtifFarrukh, Incase the problem is still not solved, I would suggest you to file a bug and see if Google can assist you. Also, please share link to your bug back in here so it would be helpful for all. issuetracker.google.com/issues/… TIP: Google might need sample project/Instant Application (with this issue) to provide a quick solution.
– Pragati Singh
Nov 17 '17 at 4:48
|
show 6 more comments
Can you try passing ApplicationContext instead ofthis
? For debugging, make sure your debug build configuration hasdebuggable true
and then you can add a breakpoint and click on Debug button beside Run button on toolbar in Android Studio.
– adnanyousafch
Nov 6 '17 at 8:51
@adnanyousafch no luck, still getting crash and cant debug either
– Atif Farrukh
Nov 6 '17 at 9:51
Can you open the merged manifest of the instant app and see if there is an issue with manifest merging?
– dazza5000
Nov 6 '17 at 14:37
Please check the guide for adding Firebase Analytics to AIA and make sure you have followed it in your existing app: developer.android.com/topic/instant-apps/guides/… Also, I would suggest you to refer to AIA analytics sample application: github.com/googlesamples/android-instant-apps/tree/master/… I hope this will help.
– Pragati Singh
Nov 8 '17 at 4:25
@AtifFarrukh, Incase the problem is still not solved, I would suggest you to file a bug and see if Google can assist you. Also, please share link to your bug back in here so it would be helpful for all. issuetracker.google.com/issues/… TIP: Google might need sample project/Instant Application (with this issue) to provide a quick solution.
– Pragati Singh
Nov 17 '17 at 4:48
Can you try passing ApplicationContext instead of
this
? For debugging, make sure your debug build configuration has debuggable true
and then you can add a breakpoint and click on Debug button beside Run button on toolbar in Android Studio.– adnanyousafch
Nov 6 '17 at 8:51
Can you try passing ApplicationContext instead of
this
? For debugging, make sure your debug build configuration has debuggable true
and then you can add a breakpoint and click on Debug button beside Run button on toolbar in Android Studio.– adnanyousafch
Nov 6 '17 at 8:51
@adnanyousafch no luck, still getting crash and cant debug either
– Atif Farrukh
Nov 6 '17 at 9:51
@adnanyousafch no luck, still getting crash and cant debug either
– Atif Farrukh
Nov 6 '17 at 9:51
Can you open the merged manifest of the instant app and see if there is an issue with manifest merging?
– dazza5000
Nov 6 '17 at 14:37
Can you open the merged manifest of the instant app and see if there is an issue with manifest merging?
– dazza5000
Nov 6 '17 at 14:37
Please check the guide for adding Firebase Analytics to AIA and make sure you have followed it in your existing app: developer.android.com/topic/instant-apps/guides/… Also, I would suggest you to refer to AIA analytics sample application: github.com/googlesamples/android-instant-apps/tree/master/… I hope this will help.
– Pragati Singh
Nov 8 '17 at 4:25
Please check the guide for adding Firebase Analytics to AIA and make sure you have followed it in your existing app: developer.android.com/topic/instant-apps/guides/… Also, I would suggest you to refer to AIA analytics sample application: github.com/googlesamples/android-instant-apps/tree/master/… I hope this will help.
– Pragati Singh
Nov 8 '17 at 4:25
@AtifFarrukh, Incase the problem is still not solved, I would suggest you to file a bug and see if Google can assist you. Also, please share link to your bug back in here so it would be helpful for all. issuetracker.google.com/issues/… TIP: Google might need sample project/Instant Application (with this issue) to provide a quick solution.
– Pragati Singh
Nov 17 '17 at 4:48
@AtifFarrukh, Incase the problem is still not solved, I would suggest you to file a bug and see if Google can assist you. Also, please share link to your bug back in here so it would be helpful for all. issuetracker.google.com/issues/… TIP: Google might need sample project/Instant Application (with this issue) to provide a quick solution.
– Pragati Singh
Nov 17 '17 at 4:48
|
show 6 more comments
1 Answer
1
active
oldest
votes
Google Play services for Instant Apps 2.7-release-179555567
With Reference to Google issue tracker
Your Google Play services for Instant Apps version is 1.22...
If you update to the latest, it should be fixed with: 2.7+
- Uninstall Google Play services for Instant Apps
- Go back to Settings > Google > Instant Apps
- It will ask you to restore it > RESTORE
- Now try running your instant app again.
If you are experiencing this while trying to build your instant app from Android Studio, you may have to repeat steps 1-4 one more time. On first provisioning, it may install your device with the incorrect version (1.22...), but afterwards, it should be the correct version.
That solved my problem but will users always have the latest Google Play services for Instant Apps (i.e. 2.7+)? As I didn't side load Google Play services for Instant Apps or was it installed by Android Studio?
Ans:-
Yes, users on pre-O should be periodically pushed the latest Google Play services for Instant Apps. Plus, they can always perform steps 1-3 to make sure they get the latest.
On O+, they shouldn't have to do anything either, since Instant Apps support is built directly into the framework from here on out.
Working with the OEMs, Google Play services for Instant Apps have been pushed to all devices which have been deemed compatible for Instant Apps. The other case is where Android Studio installs it when you try to build your instant app to a whitelisted device.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47131986%2fadding-firebase-analytics-to-instant-app%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Google Play services for Instant Apps 2.7-release-179555567
With Reference to Google issue tracker
Your Google Play services for Instant Apps version is 1.22...
If you update to the latest, it should be fixed with: 2.7+
- Uninstall Google Play services for Instant Apps
- Go back to Settings > Google > Instant Apps
- It will ask you to restore it > RESTORE
- Now try running your instant app again.
If you are experiencing this while trying to build your instant app from Android Studio, you may have to repeat steps 1-4 one more time. On first provisioning, it may install your device with the incorrect version (1.22...), but afterwards, it should be the correct version.
That solved my problem but will users always have the latest Google Play services for Instant Apps (i.e. 2.7+)? As I didn't side load Google Play services for Instant Apps or was it installed by Android Studio?
Ans:-
Yes, users on pre-O should be periodically pushed the latest Google Play services for Instant Apps. Plus, they can always perform steps 1-3 to make sure they get the latest.
On O+, they shouldn't have to do anything either, since Instant Apps support is built directly into the framework from here on out.
Working with the OEMs, Google Play services for Instant Apps have been pushed to all devices which have been deemed compatible for Instant Apps. The other case is where Android Studio installs it when you try to build your instant app to a whitelisted device.
add a comment |
Google Play services for Instant Apps 2.7-release-179555567
With Reference to Google issue tracker
Your Google Play services for Instant Apps version is 1.22...
If you update to the latest, it should be fixed with: 2.7+
- Uninstall Google Play services for Instant Apps
- Go back to Settings > Google > Instant Apps
- It will ask you to restore it > RESTORE
- Now try running your instant app again.
If you are experiencing this while trying to build your instant app from Android Studio, you may have to repeat steps 1-4 one more time. On first provisioning, it may install your device with the incorrect version (1.22...), but afterwards, it should be the correct version.
That solved my problem but will users always have the latest Google Play services for Instant Apps (i.e. 2.7+)? As I didn't side load Google Play services for Instant Apps or was it installed by Android Studio?
Ans:-
Yes, users on pre-O should be periodically pushed the latest Google Play services for Instant Apps. Plus, they can always perform steps 1-3 to make sure they get the latest.
On O+, they shouldn't have to do anything either, since Instant Apps support is built directly into the framework from here on out.
Working with the OEMs, Google Play services for Instant Apps have been pushed to all devices which have been deemed compatible for Instant Apps. The other case is where Android Studio installs it when you try to build your instant app to a whitelisted device.
add a comment |
Google Play services for Instant Apps 2.7-release-179555567
With Reference to Google issue tracker
Your Google Play services for Instant Apps version is 1.22...
If you update to the latest, it should be fixed with: 2.7+
- Uninstall Google Play services for Instant Apps
- Go back to Settings > Google > Instant Apps
- It will ask you to restore it > RESTORE
- Now try running your instant app again.
If you are experiencing this while trying to build your instant app from Android Studio, you may have to repeat steps 1-4 one more time. On first provisioning, it may install your device with the incorrect version (1.22...), but afterwards, it should be the correct version.
That solved my problem but will users always have the latest Google Play services for Instant Apps (i.e. 2.7+)? As I didn't side load Google Play services for Instant Apps or was it installed by Android Studio?
Ans:-
Yes, users on pre-O should be periodically pushed the latest Google Play services for Instant Apps. Plus, they can always perform steps 1-3 to make sure they get the latest.
On O+, they shouldn't have to do anything either, since Instant Apps support is built directly into the framework from here on out.
Working with the OEMs, Google Play services for Instant Apps have been pushed to all devices which have been deemed compatible for Instant Apps. The other case is where Android Studio installs it when you try to build your instant app to a whitelisted device.
Google Play services for Instant Apps 2.7-release-179555567
With Reference to Google issue tracker
Your Google Play services for Instant Apps version is 1.22...
If you update to the latest, it should be fixed with: 2.7+
- Uninstall Google Play services for Instant Apps
- Go back to Settings > Google > Instant Apps
- It will ask you to restore it > RESTORE
- Now try running your instant app again.
If you are experiencing this while trying to build your instant app from Android Studio, you may have to repeat steps 1-4 one more time. On first provisioning, it may install your device with the incorrect version (1.22...), but afterwards, it should be the correct version.
That solved my problem but will users always have the latest Google Play services for Instant Apps (i.e. 2.7+)? As I didn't side load Google Play services for Instant Apps or was it installed by Android Studio?
Ans:-
Yes, users on pre-O should be periodically pushed the latest Google Play services for Instant Apps. Plus, they can always perform steps 1-3 to make sure they get the latest.
On O+, they shouldn't have to do anything either, since Instant Apps support is built directly into the framework from here on out.
Working with the OEMs, Google Play services for Instant Apps have been pushed to all devices which have been deemed compatible for Instant Apps. The other case is where Android Studio installs it when you try to build your instant app to a whitelisted device.
edited Nov 12 at 4:11
answered Dec 28 '17 at 6:40
Pragati Singh
2,0151430
2,0151430
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47131986%2fadding-firebase-analytics-to-instant-app%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you try passing ApplicationContext instead of
this
? For debugging, make sure your debug build configuration hasdebuggable true
and then you can add a breakpoint and click on Debug button beside Run button on toolbar in Android Studio.– adnanyousafch
Nov 6 '17 at 8:51
@adnanyousafch no luck, still getting crash and cant debug either
– Atif Farrukh
Nov 6 '17 at 9:51
Can you open the merged manifest of the instant app and see if there is an issue with manifest merging?
– dazza5000
Nov 6 '17 at 14:37
Please check the guide for adding Firebase Analytics to AIA and make sure you have followed it in your existing app: developer.android.com/topic/instant-apps/guides/… Also, I would suggest you to refer to AIA analytics sample application: github.com/googlesamples/android-instant-apps/tree/master/… I hope this will help.
– Pragati Singh
Nov 8 '17 at 4:25
@AtifFarrukh, Incase the problem is still not solved, I would suggest you to file a bug and see if Google can assist you. Also, please share link to your bug back in here so it would be helpful for all. issuetracker.google.com/issues/… TIP: Google might need sample project/Instant Application (with this issue) to provide a quick solution.
– Pragati Singh
Nov 17 '17 at 4:48