Android Question Error when using example firebaseauth

Ong Beny Hinadrayanto

Member
Licensed User
Thank Erel i write a new thread

When I using example from this thread (Firebase Auth) i got error


This my manifest editor code.

Manifest Code:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
'************ Google Play Services Base ************
AddApplicationText(
    <activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
                  android:exported="false"/>
     <meta-data
            android:name="com.google.android.gms.version"
            android:value="[USER=21225]@Integer[/USER]/google_play_services_version" />
)
'************ Google Play Services Base (end) ************

'************ Firebase Base ************
CreateResourceFromFile("google-services", "google-services.json")
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.WAKE_LOCK)
AddPermission(com.google.android.c2dm.permission.RECEIVE)
AddPermission(${applicationId}.permission.C2D_MESSAGE)
AddManifestText( <permission android:name="${applicationId}.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />)
AddApplicationText(
<receiver
          android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
          android:enabled="true">
        <intent-filter>
          <action android:name="com.google.android.gms.measurement.UPLOAD"/>
        </intent-filter>
      </receiver>

      <service
          android:name="com.google.android.gms.measurement.AppMeasurementService"
          android:enabled="true"
          android:exported="false"/>  
    <provider
            android:authorities="${applicationId}.firebaseinitprovider"
            android:name="com.google.firebase.provider.FirebaseInitProvider"
            android:exported="false"
            android:initOrder="100" />
      <receiver
          android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
          android:enabled="true">
        <intent-filter>
          <action android:name="com.google.android.gms.measurement.UPLOAD"/>
        </intent-filter>
      </receiver>

      <service
          android:name="com.google.android.gms.measurement.AppMeasurementService"
          android:enabled="true"
          android:exported="false"/>
    <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="${applicationId}" />
            </intent-filter>
        </receiver>
       <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
            android:exported="false" />

   
        <service
            android:name="com.google.firebase.iid.FirebaseInstanceIdService"
            android:exported="true">
            <intent-filter android:priority="-500">
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>
)
'************ Firebase Base (end) ************
'************ Firebase Auth ************
'CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
AddApplicationText(
   <activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
                  android:excludeFromRecents="true"
                  android:exported="false" />

        <service
            android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
            android:exported="true"
            android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
)

'************ Firebase Auth (end) ************
 

Ong Beny Hinadrayanto

Member
Licensed User
1. Delete the m anifest code and add it as explained here: https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/#content
I was deleted new manifest code like this
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)

2. Make sure to use the latest version of B4A.
I using version 10.6
3. Make sure to use a recent Android SDK: https://www.b4x.com/b4a.html
Yes it was

Still got error like this (different from first error)
 
Upvote 0

Ong Beny Hinadrayanto

Member
Licensed User
Erel thanks .....I SOLVED this Problem

?????

Just add this
Region Project Attributes:
#AdditionalJar: com.google.android.gms:play-services-base
#AdditionalJar: android-support-v4.jar
 
Upvote 0

Ong Beny Hinadrayanto

Member
Licensed User
I was using this C:\Android\platforms\android-30\android.jar (SDK 30) from installation B4A but still error before using this
Region Project Attributes:
#AdditionalJar: com.google.android.gms:play-services-base
#AdditionalJar: android-support-v4.jar
B4X:
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…