myflashlab / ANE-LAB

ANE-LAB installs AIR Native Extension files in your project automatically.
30 stars 15 forks source link

Admob & Firebase Messaging conflicting (not working together, crushing), Please help #152

Open rubel opened 3 years ago

rubel commented 3 years ago

Ane Lab V: 3.20.0 When create a very basic project with firebase messaging/Onesignal (v10.2.1), it works fine. I tested and receive push from onesignal. When create a basic project with admob only (no firebase/fcm in it), admob works fine.

But

When add admob to the 1st project (fcm/onesignal that used to work), that crush with no reason.

How to produce the bug:

  1. Create an empty air for android project in adobe animate cc
  2. Create folder for anes and setup project in anelab
  3. Add google-services.json file in project
  4. in anelab add admob, firebase core and firebase messaging and configure all 3 by providing admob ids, app bundle id, onesignal id etc
  5. sync project (tick use .air prefix) and all basic settings
  6. now anelabs copied all anes required in your ane directory, add anes in adobe animate complete settings with certificate password etc and compile.
  7. when compile finished, you will see a message like The APK was packaged successfully, but a warning occurred.

Warning: packageName com.google.android.gms.ads used by more than one ANE. Ignoring this entry NOTE: The application has been packaged with a captive runtime.

  1. Install the app in your android, and it will crush

Here I am including the menifest xml file, please see the file attached. firebaseOnly-app.txt

myflashlab commented 3 years ago

This is a known issue and we will be releasing a new version of Admob soon. As a quick workaround, please open your manifest file and change air.com.doitflash.admob in

<provider android:name="com.google.android.gms.ads.MobileAdsInitProvider" android:authorities="air.com.doitflash.admob.mobileadsinitprovider" android:exported="false" android:initOrder="100"/>

to your own package name. i.e air.com.popgamesstudios.wonderdragons

wonderdragons commented 3 years ago

Added this fix,

<provider android:name="com.google.android.gms.ads.MobileAdsInitProvider" android:authorities="air.com.popgamesstudios.wonderdragons.mobileadsinitprovider" android:exported="false" android:initOrder="100"/>

STILL CRUSHING...bought these from distriqt now and they are working...bad service

myflashlab commented 3 years ago

Could you please post the crash logs from logcat?

applauzmedia commented 3 years ago

@wonderdragons Let me know if you solve this. I posted about the Android crash 3 weeks ago. I have Admob and FCM (One Signal) enabled in my app too. I cannot run on Android at all. Instant crash when the app opens.

wonderdragons commented 3 years ago

no, could not fix. They are not helpful. First we bought ane worth around $300 Then this but, they did not help, we bought anelab from them. Still no luck, and the dont help. Waited around 2 weeks, then bought from distriqt, just prepared all new codes and they working together, did not uploaded yet, created a sample app to see both work together.

So we lost $350 from myflashlabs...Bad service

myflashlab commented 3 years ago

@wonderdragons Sorry for the trouble you went through. We're trying to be better. @applauzmedia if you are experiencing a similar problem, could you please send the crash log from logcat?

Gokulv617 commented 3 years ago

yes it happened to us a week ago and i solved it by entirely removing that line. it works like a charm to me.

<provider android:name="com.google.android.gms.ads.MobileAdsInitProvider" android:authorities="air.com.popgamesstudios.wonderdragons.mobileadsinitprovider" android:exported="false" android:initOrder="100"/>

Gokulv617 commented 3 years ago

This is a known issue and we will be releasing a new version of Admob soon. As a quick workaround, please open your manifest file and change air.com.doitflash.admob in

<provider android:name="com.google.android.gms.ads.MobileAdsInitProvider" android:authorities="air.com.doitflash.admob.mobileadsinitprovider" android:exported="false" android:initOrder="100"/>

to your own package name. i.e air.com.popgamesstudios.wonderdragons

I tried this but it does not solve the crash problem. I had to remove that line itself, then app opened.

Gokulv617 commented 3 years ago

The material in website and ANELAB are not synced. WHY ?

The XML from your website is different and the XML created from ANELAB is different.

WEBSITE:

<manifest android:installLocation="auto">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-sdk android:targetSdkVersion="28"/>

    <application>

        <activity>
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <!-- Include the AdActivity configChanges and themes. -->
        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />

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

        <!-- If you are using Admob (must remove the Double-Click meta-data tag) -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-3940256099942544~3347511713"/> <!-- Replace with your own APPLICATION_ID -->

        <!-- If you are using Double-Click (must remove the Admob meta-data tag) -->
        <meta-data
        android:name="com.google.android.gms.ads.AD_MANAGER_APP"
        android:value="true"/>

    </application>
</manifest>

The below code is not present in website, but ANELAB adds it <provider android:name="com.google.android.gms.ads.MobileAdsInitProvider" android:authorities="air.com.popgamesstudios.wonderdragons.mobileadsinitprovider" android:exported="false" android:initOrder="100"/>

wonderdragons commented 3 years ago

Admob works without MobileAdsInitProvider ?