Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

App 42 Remote Push Notifications

Discussion in 'Android' started by jack47jack, Nov 23, 2016.

  1. jack47jack

    jack47jack

    Joined:
    Nov 2, 2016
    Posts:
    5
    I want to integrate my project with push notifications from App42. In sample project from App42 - all works. But when I try to change my manifest, I have problem. Image attached. Any ideas? :) problem.PNG
     
  2. Defero

    Defero

    Joined:
    Jul 9, 2012
    Posts:
    200
    As it says, it has trouble merging AndroidManifest.xml (of which you have 4 files in your project).

    Probably best to merge this stuff yourself, and delete the other ones.
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Unity merges together all the AndroidManifests that your Android plugins include in your project.
    Whenever it cannot cleanly merge everything automatically, it fails with an error.

    In the error message you have posted, the conflicting element inside the manifest is shown:
    The conflict you have is between 2 libraries (also seen in the error message):
    GoogleMobileAdsPlugin and play-services-basement-9.8.0

    In order to resolve this, you should probably remove this declaration from the manifest under GoogleMobileAdsPlugin (it declares a concrete version of Google play services, instead of relying on a resource to provide the library version that is used).

    NOTE: you can contact me in private regarding any Android build issues with Unity.
     
  4. jack47jack

    jack47jack

    Joined:
    Nov 2, 2016
    Posts:
    5
    Removed - The problem remains.



     

    Attached Files:

  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Go over all of the manifests you have in your project. I think there's one under Plugins/Android (according to the error).

    It should have something like this listed:
    You should remove it. Then try to build.
     
  6. jack47jack

    jack47jack

    Joined:
    Nov 2, 2016
    Posts:
    5
    Yeah, that works that app build is without errors, BUT, the problem is, device is not subscribed to App42, I think those lines :

    <meta-data
    @android:name="com.google.android.gms.version"
    @android:value="6587000">

    are required to subscribe device to App42 push notifications.

    In my sample project subscribe device works but, with those lines.

    What you think?


     
  7. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    I dont think this is related.. Hard to tell exactly what the issue is without diagnosing the code, runtime logs, plugin integration instructions, etc.
     
  8. jack47jack

    jack47jack

    Joined:
    Nov 2, 2016
    Posts:
    5
    But with the same push notifications code and the same manifest but in sample project without Google play services Ads and with line 6587000 push works fine. Maybe I will past here manifest and push script ?


     
  9. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Sorry, i cannot tell for sure what the problem is (without teating mysrlf). It might be the manifest or could be a bunch of other things.
     
  10. jack47jack

    jack47jack

    Joined:
    Nov 2, 2016
    Posts:
    5
    Okay ;( So I must debug it myself further ;(