Adding Firebase Analytics to Instant App










2














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










share|improve this question























  • 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










  • 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















2














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










share|improve this question























  • 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










  • 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













2












2








2







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










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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










  • 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










  • @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












1 Answer
1






active

oldest

votes


















-1














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+



  1. Uninstall Google Play services for Instant Apps

  2. Go back to Settings > Google > Instant Apps

  3. It will ask you to restore it > RESTORE

  4. 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.






share|improve this answer






















    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
    );



    );













    draft saved

    draft discarded


















    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









    -1














    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+



    1. Uninstall Google Play services for Instant Apps

    2. Go back to Settings > Google > Instant Apps

    3. It will ask you to restore it > RESTORE

    4. 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.






    share|improve this answer



























      -1














      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+



      1. Uninstall Google Play services for Instant Apps

      2. Go back to Settings > Google > Instant Apps

      3. It will ask you to restore it > RESTORE

      4. 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.






      share|improve this answer

























        -1












        -1








        -1






        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+



        1. Uninstall Google Play services for Instant Apps

        2. Go back to Settings > Google > Instant Apps

        3. It will ask you to restore it > RESTORE

        4. 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.






        share|improve this answer














        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+



        1. Uninstall Google Play services for Instant Apps

        2. Go back to Settings > Google > Instant Apps

        3. It will ask you to restore it > RESTORE

        4. 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.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 12 at 4:11

























        answered Dec 28 '17 at 6:40









        Pragati Singh

        2,0151430




        2,0151430



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

            Museum of Modern and Contemporary Art of Trento and Rovereto