Android Question RequestInfoUpdate does not return info in Admob consent

Discussion in 'Android Questions' started by dcoun, Mar 14, 2019.

  1. dcoun

    dcoun Member Licensed User

    A new project in B4A v8.8, Firebase admob 1.52 in debug mode
    in starter service:
    Code:
    Sub Process_Globals
       
    Public consent As ConsentManager, xui As XUI
    End Sub

    Sub Service_Create
       consent.Initialize(
    "consent2")
       consent.addTestDevice(
    "31F6FB8E34815CF697C342C8AB312170")
       consent.SetDebugGeography(
    True)  
       
    Log(consent.ConsentState)
       consent.RequestInfoUpdate(
    Array("pub-11111111111"))
       
    Wait For consent2_InfoUpdate (Success As Boolean)
        
    If Success = False Then Log($"Error getting consent state: ${LastException}"$)
       
    If Success Then
           
    Log($"Consent form result: ${consent.ConsentState}"$)
       
    Else
           
    Log($"Error: ${LastException}"$)
       
    End If
    End Sub
    The only log I get is:
    *** Service (starter) Create ***
    This request is sent from a test device.
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **


    The wait for never gets a response. Any ideas? Thank you in advance
     
  2. Pendrush

    Pendrush Well-Known Member Licensed User

    Change line from this
    Code:
    Wait For consent2_InfoUpdate (Success As Boolean)
    to this
    Code:
    Wait For consent_InfoUpdate (Success As Boolean)
     
  3. dcoun

    dcoun Member Licensed User

    Changed the above to the following and still it doesnot work
    Code:
    Sub Process_Globals
       
    Public consent As ConsentManager, xui As XUI
    End Sub

    Sub Service_Create
       consent.Initialize(
    "consent")
       consent.addTestDevice(
    "31F6FB8E34815CF697C342C8AB312170")
       consent.SetDebugGeography(
    True)
       
    Log(consent.ConsentState)
       consent.RequestInfoUpdate(
    Array("pub-11111111111"))
       
    Wait For consent_InfoUpdate (Success As Boolean)
        
    If Success = False Then Log($"Error getting consent state: ${LastException}"$)
       
    If Success Then
           
    Log($"Consent form result: ${consent.ConsentState}"$)
       
    Else
           
    Log($"Error: ${LastException}"$)
       
    End If
    End Sub
    I did a "clean project" nothing changed
    My manifest file:
    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="26"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    CreateResourceFromFile(Macro, Themes.DarkTheme)
    'End of default text.
    CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
    CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Are there any relevant messages in the unfiltered logs?
     
  5. dcoun

    dcoun Member Licensed User

    A full copy
    Code:
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
    -
    1 received
    writer error
    java.lang.InterruptedException
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:
    1988)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:
    2022)
       at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:
    357)
       at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:
    160)
       at java.lang.Thread.run(
    Thread.java:818)
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC

    VM exiting with result code 
    0, cleanup skipped.
    ClassLoader referenced unknown 
    path: /data/app/medsite.mypatients-2/lib/x86
    common created.
    Starting remote logger. Port: 
    7500
    Use EGL_SWAP_BEHAVIOR_PRESERVED: 
    true
    Hello, this 
    is UFO GRALLOC/Intel Corporation
     ro.camera.rec.pixel_format = 
    0x10f (271)
     ro.ycbcr.pixel_format = 
    0x10f (271)
    After accept
    Initialized EGL, version 
    1.4
    Failed 
    to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
    droid_create_context : config 
    id = 11 conf->NativeVisualID=1
    Requested context : GLES 
    2.0
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    *** Debugger waiting 
    for connection (0) ***
    type=1400 audit(0.0:945): avc: denied { write } for name="property_service" dev="tmpfs" ino=8524 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
    GL_VERSION: OpenGL ES 3.1 - Build 4.51.51292-R
    GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 3.10 - Build 4.51.51292-R
    property_set: property_set returned -1
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    Detected device 22B0:34 family 17:11
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    0xed6de000 Launching thread(s), CPUs 4
    *** Debugger waiting for connection (1) ***
    *** Service (starter) Create ***
    This request is sent from a test device.
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **
    main
    ** Activity (main) Resume **
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
     
    Last edited: Mar 15, 2019
  6. dcoun

    dcoun Member Licensed User

    My main activity code:
    Code:
    #Region  Project Attributes
        
    #ApplicationLabel: B4A Example
        
    #VersionCode: 1
        
    #VersionName:
        
    'SupportedOrientations possible values: unspecified, landscape or portrait.
        #SupportedOrientations: unspecified
        
    #CanInstallToExternalStorage: False
        
    #AdditionalJar: com.google.android.gms:play-services-base
        
    #BridgeLogger: True
    #End Region

    #Region  Activity Attributes
        
    #FullScreen: False
        
    #IncludeTitle: True
    #End Region

    Sub Process_Globals
        
    'These global variables will be declared once when the application starts.
        'These variables can be accessed from all modules.

    End Sub

    Sub Globals
        
    Private BannerAd As AdView

    End Sub

    Sub Activity_Create(FirstTime As Boolean)
        
    Log("main"&Starter.consent.ConsentState)
        
    Activity.LoadLayout("main")
       
    End Sub

    Sub Activity_Resume
        
    Log( Starter.consent.ConsentState)
       
        
    If Starter.consent.ConsentState = Starter.consent.STATE_UNKNOWN And Starter.consent.IsRequestLocationInEeaOrUnknown Then
        Starter.consent.ShowConsentForm(
    "https://www.mysite.com/privacy.html"TrueTrueTrue)
        
    Wait For consent_FormResult (Success As Boolean, UserPrefersAdFreeOption As Boolean)
        
    If Success Then
            
    Log($"Consent form result: ${Starter.consent.ConsentState}, AdFree: ${UserPrefersAdFreeOption}"$)
        
    Else
            
    Log($"Error: ${LastException}"$)
            
    End If
        
    End If
    End Sub

    Sub Activity_Pause (UserClosed As Boolean)

    End Sub
    Code in resume does not run when app starts, as expected because the requestinfoupdate has not finished.
    But, when after that I rotate the screen, the consent window from Google is shown. The requestinfoupdate finishes but the event does not fire
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Where is the output of this line:
    Code:
    Log(consent.ConsentState)
    Change it to:
    Code:
    Log("*********************: " & consent.ConsentState)
     
  8. dcoun

    dcoun Member Licensed User

    My Starter unit now:
    Code:
    #Region  Service Attributes
        
    #StartAtBoot: False
        
    #ExcludeFromLibrary: True
    #End Region

    Sub Process_Globals
        
    Public consent As ConsentManager, xui As XUI
    End Sub

    Sub Service_Create
        consent.Initialize(
    "consent")
        
    Log("*********************: " & consent.ConsentState)
        consent.addTestDevice(
    "31F6FB8E34815CF697C342C8AB312170")
        consent.SetDebugGeography(
    True)
        consent.RequestInfoUpdate(
    Array("pub-1111111111111111"))
        
    Wait For consent_InfoUpdate (Success As Boolean)
         
    If Success = False Then Log($"Error getting consent state: ${LastException}"$)
        
    If Success Then
            
    Log($"Consent form result: ${consent.ConsentState}"$)
        
    Else
            
    Log($"Error: ${LastException}"$)
        
    End If
        
    Log("*********************: " & consent.ConsentState)
        
    Log("arrived here")
    End Sub

    Sub Service_Start (StartingIntent As Intent)
       

    End Sub

    Sub Service_TaskRemoved
        
    'This event will be raised when the user removes the app from the recent apps list.
    End Sub

    'Return true to allow the OS default exceptions handler to handle the uncaught exception.
    Sub Application_Error (Error As Exception, StackTrace As StringAs Boolean
        
    Return True
    End Sub

    Sub Service_Destroy

    End Sub
    Code:
    common created.
    Starting remote logger. Port: 
    7500
    Use EGL_SWAP_BEHAVIOR_PRESERVED: 
    true
    Hello, this 
    is UFO GRALLOC/Intel Corporation
     ro.camera.rec.pixel_format = 
    0x10f (271)
     ro.ycbcr.pixel_format = 
    0x10f (271)
    Initialized EGL, version 
    1.4
    Failed 
    to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
    droid_create_context : config 
    id = 11 conf->NativeVisualID=1
    Requested context : GLES 
    2.0
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    *** Debugger waiting 
    for connection (0) ***
    type=1400 audit(0.0:949): avc: denied { write } for name="property_service" dev="tmpfs" ino=8524 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
    GL_VERSION: OpenGL ES 3.1 - Build 4.51.51292-R
    GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 3.10 - Build 4.51.51292-R
    property_set: property_set returned -1
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    Detected device 22B0:34 family 17:11
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    0xed855000 Launching thread(s), CPUs 4
    After accept
    *** Debugger waiting for connection (1) ***
    *** Service (starter) Create ***
    *********************:
    This request is sent from a test device.
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **
    main
    ** Activity (main) Resume **
    *********************:
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
     
    Last edited: Mar 15, 2019
  9. Erel

    Erel Administrator Staff Member Licensed User

  10. Erel

    Erel Administrator Staff Member Licensed User

  11. dcoun

    dcoun Member Licensed User

    You have right, I have tested even with that uncommented and the same happens. I tested it again following the https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/ but still the same results. I will follow again the tutorial.

    The following returns True
    Code:
    Sub CheckForGooglePlayServices As Boolean
        
    Dim GoogleApiAvailablity As JavaObject
        GoogleApiAvailablity = GoogleApiAvailablity.InitializeStatic(
    "com.google.android.gms.common.GoogleApiAvailability").RunMethod("getInstance"Null)
        
    Dim context As JavaObject
        context.InitializeContext
        
    If GoogleApiAvailablity.RunMethod("isGooglePlayServicesAvailable"Array(context)) <> 0 Then
            GoogleApiAvailablity.RunMethod(
    "makeGooglePlayServicesAvailable"Array(context))
            
    Return False
        
    End If
        
    Return True
    End Sub
     
  12. dcoun

    dcoun Member Licensed User

    After hours trying to find a solution, I arrived to nothing. I re-installed B4A, I read every thread in the forum on Admod for different versions of B4A.
    My last log is the following, and I give up
    Code:
    Logger connected to:  TETRATAB CASEBOOK_3
    --------- beginning of main
    ClassLoader referenced unknown 
    path: /data/app/medsite.mypatients-1/lib/x86
    Class com.google.firebase.auth.FirebaseAuthRegistrar 
    is not an found.
    java.lang.ClassNotFoundException: com.google.firebase.auth.FirebaseAuthRegistrar
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:
    324)
        at java.lang.Class.forName(Class.java:
    285)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@
    16.1.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@
    16.1.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@
    16.1.0:543)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:365)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:332)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:316)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@
    16.1.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1748)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1723)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@
    16.1.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:
    5177)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:
    4772)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:
    4712)
        at android.app.ActivityThread.access$
    1700(ActivityThread.java:150)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1418)
        at android.os.Handler.dispatchMessage(Handler.java:
    102)
        at android.os.Looper.loop(Looper.java:
    148)
        at android.app.ActivityThread.main(ActivityThread.java:
    5444)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    746)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    636)
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "com.google.firebase.auth.FirebaseAuthRegistrar" on path: DexPathList[[zip file "/data/app/medsite.mypatients-1/base.apk"],nativeLibraryDirectories=[/data/app/medsite.mypatients-1/lib/x86, /vendor/lib, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    511)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    469)
        ... 
    24 more
        Suppressed: java.lang.ClassNotFoundException: com.google.firebase.auth.FirebaseAuthRegistrar
            at java.lang.Class.classForName(Native Method)
            at java.lang.BootClassLoader.findClass(ClassLoader.java:
    781)
            at java.lang.BootClassLoader.loadClass(ClassLoader.java:
    841)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:
    504)
            ... 
    25 more
        Caused by: java.lang.NoClassDefFoundError: Class 
    not found using the boot class loader; no stack trace available
    Class com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar 
    is not an found.
    java.lang.ClassNotFoundException: com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:
    324)
        at java.lang.Class.forName(Class.java:
    285)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@
    16.1.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@
    16.1.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@
    16.1.0:543)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:365)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:332)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:316)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@
    16.1.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1748)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1723)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@
    16.1.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:
    5177)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:
    4772)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:
    4712)
        at android.app.ActivityThread.access$
    1700(ActivityThread.java:150)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1418)
        at android.os.Handler.dispatchMessage(Handler.java:
    102)
        at android.os.Looper.loop(Looper.java:
    148)
        at android.app.ActivityThread.main(ActivityThread.java:
    5444)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    746)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    636)
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" on path: DexPathList[[zip file "/data/app/medsite.mypatients-1/base.apk"],nativeLibraryDirectories=[/data/app/medsite.mypatients-1/lib/x86, /vendor/lib, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    511)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    469)
        ... 
    24 more
        Suppressed: java.lang.ClassNotFoundException: com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar
            at java.lang.Class.classForName(Native Method)
            at java.lang.BootClassLoader.findClass(ClassLoader.java:
    781)
            at java.lang.BootClassLoader.loadClass(ClassLoader.java:
    841)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:
    504)
            ... 
    25 more
        Caused by: java.lang.NoClassDefFoundError: Class 
    not found using the boot class loader; no stack trace available
    com.google.firebase.auth.FirebaseAuth 
    is not linked. Skipping initialization.
    com.google.firebase.crash.FirebaseCrash 
    is not linked. Skipping initialization.
    FirebaseApp initialization successful
    common created.
    Starting remote logger. Port: 
    7500
    App measurement 
    is starting up, version: 14711
    To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    To enable faster debug mode event logging run:
      adb 
    shell setprop debug.firebase.analytics.app medsite.mypatients
    Use EGL_SWAP_BEHAVIOR_PRESERVED: 
    true
    Hello, this 
    is UFO GRALLOC/Intel Corporation
     ro.camera.rec.pixel_format = 
    0x10f (271)
     ro.ycbcr.pixel_format = 
    0x10f (271)
    After accept
    Initialized EGL, version 
    1.4
    Failed 
    to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
    droid_create_context : config 
    id = 11 conf->NativeVisualID=1
    Requested context : GLES 
    2.0
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    *** Debugger waiting 
    for connection (0) ***
    type=1400 audit(0.0:1355): avc: denied { write } for name="property_service" dev="tmpfs" ino=8524 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
    GL_VERSION: OpenGL ES 3.1 - Build 4.51.51292-R
    GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 3.10 - Build 4.51.51292-R
    property_set: property_set returned -1
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    Detected device 22B0:34 family 17:11
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    0xed714000 Launching thread(s), CPUs 4
    *** Debugger waiting for connection (1) ***
    Copying updated assets files (1)
    *** Service (starter) Create ***
    true
    1*********************:
    This request is sent from a test device.
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **
    main
    Tag Manager is not found and thus will not be used
    ** Activity (main) Resume **
    2*********************:
    Failed to resolve target intent service, skipping classname enforcement
    Error while delivering the message: ServiceIntent not found.
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
    -1 received
    writer error
    java.net.SocketException: sendto failed: EPIPE (Broken pipe)
        at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:542)
        at libcore.io.IoBridge.sendto(IoBridge.java:511)
        at java.net.PlainSocketImpl.write(PlainSocketImpl.java:500)
        at java.net.SocketException: shutdown failed: ENOTCONN (Transport endpoint is not connected)
    java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:37)
        at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:266)
        at java.io.OutputStream.write(OutputStream.java:82)
        at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:161)
        at java.lang.Thread.run(Thread.java:818)
    Caused by: android.system.ErrnoException: sendto failed: EPIPE (Broken pipe)
        at libcore.io.Posix.sendtoBytes(Native Method)
        at libcore.io.Posix.sendto(Posix.java:211)
        at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
        at libcore.io.IoBridge.sendto(IoBridge.java:509)
        ... 6 more
        at java.net.PlainSocketImpl.shutdownInput(PlainSocketImpl.java:361)
        at java.net.Socket.shutdownInput(Socket.java:635)
        at anywheresoftware.b4a.remotelogger.Connector.mainLoop(Connector.java:105)
        at anywheresoftware.b4a.remotelogger.Connector.run(Connector.java:53)
        at java.lang.Thread.run(Thread.java:818)
    Caused by: android.system.ErrnoException: shutdown failed: ENOTCONN (Transport endpoint is not connected)
        at libcore.io.Posix.shutdown(Native Method)
        at libcore.io.ForwardingOs.shutdown(ForwardingOs.java:159)
        at java.net.PlainSocketImpl.shutdownInput(PlainSocketImpl.java:359)
        ... 4 more
    Starting remote logger. Port: 7500
    After accept
    ** Activity (main) Pause, UserClosed = false **
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
     
  13. dcoun

    dcoun Member Licensed User

    The following is from a second device
    Code:
    Logger connected to:  OnePlus A0001
    --------- beginning of main
    Sending signal. PID: 
    14872 SIG: 9
    Class com.google.firebase.FirebaseApp failed 
    lock verification and will run slower.
    Common causes 
    for lock verification issues are non-optimized dex code
    and incorrect proguard optimizations.
    Class android.support.v4.util.SimpleArrayMap failed 
    lock verification and will run slower.
    Class com.google.firebase.FirebaseApp$GlobalBackgroundStateListener failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.api.internal.BackgroundDetector failed 
    lock verification and will run slower.
    Class com.google.firebase.auth.FirebaseAuthRegistrar 
    is not an found.
    java.lang.ClassNotFoundException: com.google.firebase.auth.FirebaseAuthRegistrar
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:
    453)
        at java.lang.Class.forName(Class.java:
    378)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@
    16.1.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@
    16.1.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@
    16.1.0:543)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:365)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:332)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:316)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@
    16.1.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1919)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1894)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@
    16.1.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:
    6239)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:
    5805)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:
    5722)
        at android.app.ActivityThread.-wrap1(Unknown Source:
    0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1656)
        at android.os.Handler.dispatchMessage(Handler.java:
    106)
        at android.os.Looper.loop(Looper.java:
    164)
        at android.app.ActivityThread.main(ActivityThread.java:
    6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:
    440)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    807)
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "com.google.firebase.auth.FirebaseAuthRegistrar" on path: DexPathList[[zip file "/data/app/medsite.mypatients-XKQmo8AUrjRdUuik_yqw2g==/base.apk"],nativeLibraryDirectories=[/data/app/medsite.mypatients-XKQmo8AUrjRdUuik_yqw2g==/lib/arm, /system/lib, /system/vendor/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    312)
        ... 
    24 more
    Class com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar 
    is not an found.
    java.lang.ClassNotFoundException: com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:
    453)
        at java.lang.Class.forName(Class.java:
    378)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@
    16.1.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@
    16.1.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@
    16.1.0:543)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:365)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:332)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:316)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@
    16.1.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1919)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1894)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@
    16.1.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:
    6239)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:
    5805)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:
    5722)
        at android.app.ActivityThread.-wrap1(Unknown Source:
    0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1656)
        at android.os.Handler.dispatchMessage(Handler.java:
    106)
        at android.os.Looper.loop(Looper.java:
    164)
        at android.app.ActivityThread.main(ActivityThread.java:
    6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:
    440)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    807)
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" on path: DexPathList[[zip file "/data/app/medsite.mypatients-XKQmo8AUrjRdUuik_yqw2g==/base.apk"],nativeLibraryDirectories=[/data/app/medsite.mypatients-XKQmo8AUrjRdUuik_yqw2g==/lib/arm, /system/lib, /system/vendor/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    312)
        ... 
    24 more
    Class com.google.firebase.components.EventBus failed 
    lock verification and will run slower.
    Class com.google.firebase.components.Lazy failed 
    lock verification and will run slower.
    Class android.support.v4.content.ContextCompat failed 
    lock verification and will run slower.
    Class com.google.firebase.iid.FirebaseInstanceId failed 
    lock verification and will run slower.
    App restored, clearing state
    Class com.google.firebase.iid.zzat failed 
    lock verification and will run slower.
    Class com.google.firebase.iid.zzba failed 
    lock verification and will run slower.
    Class com.google.firebase.iid.zzaq failed 
    lock verification and will run slower.
    com.google.firebase.auth.FirebaseAuth 
    is not linked. Skipping initialization.
    com.google.firebase.crash.FirebaseCrash 
    is not linked. Skipping initialization.
    Class com.google.android.gms.measurement.internal.zzbw failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzai$zza failed 
    lock verification and will run slower.
    Class com.google.android.gms.internal.measurement.zzsi failed 
    lock verification and will run slower.
    Class com.google.android.gms.internal.measurement.zzrx failed 
    lock verification and will run slower.
    Class com.google.android.gms.internal.measurement.zzsp failed 
    lock verification and will run slower.
    Class com.google.android.gms.internal.measurement.zzse failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzq failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzas failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzfx failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzaq failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzdy failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzda failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzfd failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzy failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzbr failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzbv failed 
    lock verification and will run slower.
    FirebaseApp initialization successful
    Class com.google.android.gms.internal.measurement.zzru failed 
    lock verification and will run slower.
    Class anywheresoftware.b4a.BA failed 
    lock verification and will run slower.
    common created.
    Starting remote logger. Port: 
    7500
    Class com.google.android.gms.measurement.internal.zzes failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.api.internal.GoogleServices failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.internal.zzp failed 
    lock verification and will run slower.
    App measurement 
    is starting up, version: 14711
    To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    To enable faster debug mode event logging run:
      adb 
    shell setprop debug.firebase.analytics.app medsite.mypatients
    HWUI GL Pipeline
    <qeglDrvAPI_eglInitialize:
    379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca)
    OpenGL ES Shader Compiler Version: E031
    .29.00.00
    Build Date: 
    04/04/16 Mon
    Local Branch: mybranch19053788
    Remote Branch: quic/LA.BF
    .1.1.3_rb1.12
    Local Patches: NONE
    Reconstruct Branch: NOTHING
    android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 
    0
    Initialized EGL, version 
    1.4
    Swap behavior 
    1
    After accept
    <qeglDrvAPI_eglGetConfigAttrib:
    607>: EGL_BAD_ATTRIBUTE
    *** Debugger waiting 
    for connection (0) ***
    <qeglDrvAPI_eglGetConfigAttrib:
    607>: EGL_BAD_ATTRIBUTE
    Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
    Class com.google.firebase.analytics.FirebaseAnalytics failed 
    lock verification and will run slower.
    Loading /vendor/lib/hw/android.hardware.graphics.mapper@
    2.0-impl.so from current namespace instead of sphal namespace.
    Class com.google.firebase.iid.zzav failed 
    lock verification and will run slower.
    Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
    <qeglDrvAPI_eglGetConfigAttrib:
    607>: EGL_BAD_ATTRIBUTE
    Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
    *** Debugger waiting 
    for connection (1) ***
    Long monitor contention with owner Measurement Worker (
    15017) at long com.android.org.conscrypt.NativeCrypto.RSA_generate_key_ex(int, byte[])(NativeCrypto.java:-2) waiters=0 in com.google.firebase.iid.zzax com.google.firebase.iid.zzaw.zzb(java.lang.String, java.lang.String, java.lang.String) for 573ms
    Class com.google.android.gms.tasks.zzu failed 
    lock verification and will run slower.
    Class com.google.android.gms.tasks.zzr failed 
    lock verification and will run slower.
    Class com.google.android.gms.tasks.zzm failed 
    lock verification and will run slower.
    Class com.google.android.gms.tasks.zzk failed 
    lock verification and will run slower.
    Class com.google.android.gms.tasks.zzg failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.internal.BaseGmsClient failed 
    lock verification and will run slower.
    Class com.google.firebase.iid.zzad failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.internal.GmsClientSupervisor failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.stats.ConnectionTracker failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.internal.zze failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.GoogleSignatureVerifier failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.zzc failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.zzg failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.internal.BaseGmsClient$zze failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.internal.zzf failed 
    lock verification and will run slower.
    Class com.google.android.gms.measurement.internal.zzef failed 
    lock verification and will run slower.
    Tag Manager 
    is not found and thus will not be used
    Copying updated assets files (
    1)
    *** 
    Service (starter) Create ***
    Do partial code cache collection, code=30KB, data=29KB
    After code 
    cache collection, code=29KB, data=29KB
    Increasing code 
    cache capacity to 128KB
    Class com.google.android.gms.common.GoogleApiAvailability failed 
    lock verification and will run slower.
    true
    1*********************:
    Use ConsentInformation.getInstance(context).addTestDevice(
    "1B326948D1F35550D30B2A4982AF4819"to get test ads on this device.
    ** 
    Service (starter) Start **
    No Network Security Config specified, using platform default
    Class com.google.firebase.iid.zzag failed 
    lock verification and will run slower.
    Class com.google.android.gms.common.internal.BaseGmsClient$zzc failed 
    lock verification and will run slower.
    ** 
    Activity (main) Create, isFirst = true **
    main
    Do partial code cache collection, code=62KB, data=54KB
    After code 
    cache collection, code=60KB, data=53KB
    Increasing code 
    cache capacity to 256KB
    ** 
    Activity (main) Resume **
    2*********************:
    Class com.google.android.gms.measurement.internal.zzev failed 
    lock verification and will run slower.
    Class com.google.android.gms.tasks.zzn failed 
    lock verification and will run slower.
    Class android.support.v4.content.WakefulBroadcastReceiver failed 
    lock verification and will run slower.
    binding 
    to the service failed
    Class com.google.firebase.iid.zzb failed 
    lock verification and will run slower.
    ** 
    Activity (main) Pause, UserClosed = false **
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    Please upload the updated project.
     
  15. dcoun

    dcoun Member Licensed User

    I have created a new project and I have still the InfoUpdate event problem but now even the DebugGeography can not be set. I have included Analytics & Crashlytics but I have no data from the Google Firebase page. From all the forum pages I have managed to read the files are the following:
    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="26"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    CreateResourceFromFile(Macro, Themes.DarkTheme)
    'End of default text.
    CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
    CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
    CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
    CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
    The Main is
    Code:
    #Region  Project Attributes
        
    #ApplicationLabel: medsite test
        
    #VersionCode: 1
        
    #VersionName:
        
    'SupportedOrientations possible values: unspecified, landscape or portrait.
        #SupportedOrientations: unspecified
        
    #CanInstallToExternalStorage: False
        
    #AdditionalJar: com.google.android.gms:play-services-base
    '    #AdditionalJar: com.google.android.gms:play-services-location
        #BridgeLogger: True
    #End Region

    #Region  Activity Attributes
        
    #FullScreen: False
        
    #IncludeTitle: True
    #End Region

    Sub Process_Globals
        
    Private consreceived As Boolean=False
    End Sub

    Sub Globals
        
    Private BannerAd As AdView
        
    Private Label1 As Label
        
    Private Label2 As Label
    End Sub

    Sub Activity_Create(FirstTime As Boolean)
        
    Activity.LoadLayout("main")
        
    Wait For (GetAdvertisingId) Complete (Id As String)
        
    If Id <> "" Then
            
    Log(Id)
            Label2.text=
    Id
        
    End If
    End Sub

    Sub Activity_Resume
        
    Log("Main resume state: " & Starter.consent.ConsentState&" geography:" & Starter.consent.IsRequestLocationInEeaOrUnknown)
        
    If consreceived Then ConsentStateAvailable
        
    If BannerAd.IsInitialized Then BannerAd.Resume
        Label1.Text=
    "Geo: "&Starter.consent.IsRequestLocationInEeaOrUnknown&" State: "&Starter.consent.ConsentState
    End Sub

    Sub Activity_Pause (UserClosed As Boolean)
        
    If BannerAd.IsInitialized Then BannerAd.Pause
    End Sub

    Public Sub ConsentStateAvailable
        consreceived=
    True
        Label1.Text=
    "By event: Geo: "&Starter.consent.IsRequestLocationInEeaOrUnknown&" State: "&Starter.consent.ConsentState
        
    If Starter.consent.ConsentState = Starter.consent.STATE_UNKNOWN And Starter.consent.IsRequestLocationInEeaOrUnknown Then
            Starter.consent.ShowConsentForm(
    "https://www.mysite.com/privacy.html"TrueTrueTrue)
            
    Wait For consent_FormResult (Success As Boolean, UserPrefersAdFreeOption As Boolean)
            
    If Success Then
                
    Log($"Consent form result: ${Starter.consent.ConsentState}, AdFree: ${UserPrefersAdFreeOption}"$)
            
    Else
                
    Log($"Error: ${LastException}"$)
            
    End If
        
    End If
        BannerAd.Initialize2(
    "BannerAd""ca-app-pub-1111111111111111/2222222222", BannerAd.SIZE_SMART_BANNER)
        
    Dim height As Int
        
    If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
            
    'phones
            If 100%x > 100%y Then height = 32dip Else height = 50dip
        
    Else
            
    'tablets
            height = 90dip
        
    End If
        
    Activity.AddView(BannerAd, 0dip100%y - height, 100%x, height)
        LoadAd
        Starter.analytics.SendEvent(
    "Consent", CreateMap ("ConsentState": Starter.consent.ConsentState,"ConsentGeo":Starter.consent.IsRequestLocationInEeaOrUnknown))
    End Sub

    Sub LoadAd
        
    Dim builder As AdRequestBuilder
        builder.Initialize
        
    Dim consent As ConsentManager = Starter.consent
        
    If consent.IsRequestLocationInEeaOrUnknown Then
            
    If consent.ConsentState = consent.STATE_NON_PERSONALIZED Then
                builder.NonPersonalizedAds
            
    Else if consent.ConsentState = consent.STATE_UNKNOWN Then
                
    Return
            
    End If
        
    End If
        builder.addTestDevice(
    "31F6FB8E34815CF697C342C8AB312170")
        BannerAd.LoadAdWithBuilder(builder)
    End Sub

    Public Sub BannerAd_FailedToReceiveAd(ErrorCode As String)
        
    Log("Banner error: "&ErrorCode)
    End Sub

    Public Sub BannerAd_ReceiveAd
        
    Log("Banner received an Ad")
    End Sub

    Public Sub BannerAd_PresentScreen
        
    Log("Banner Ad presented")
    End Sub

    Public Sub BannerAd_AdScreenDismissed
        
    Log("Banner Ad screen dismissed")
    End Sub

    Private Sub GetAdvertisingId As ResumableSub
        
    Dim jo As JavaObject = Me
        jo.RunMethod(
    "GetAdvertisingId"Null)
        
    Wait For AdvertisingId_Ready (Success As Boolean, Id As String)
        
    Return Id
    End Sub


    #if Java
    import java.util.concurrent.Callable;
    import com.google.android.gms.ads.identifier.AdvertisingIdClient;
    import com.google.android.gms.ads.identifier.AdvertisingIdClient.Info;

    public static void GetAdvertisingId() {
       BA.runAsync(processBA, mostCurrent, "advertisingid_ready", new Object[] {false, ""}
           , new Callable<Object[]>() {
                       @Override
                       public Object[] call() throws Exception {
                           String id = AdvertisingIdClient.getAdvertisingIdInfo(mostCurrent).getId();
                           return new Object[] {true, id};
                       }
                   }); }
    #End If
    The Starter is
    Code:
    #Region  Service Attributes
        
    #StartAtBoot: False
        
    #ExcludeFromLibrary: True
    #End Region

    Sub Process_Globals
        
    Public consent As ConsentManager
        
    Public analytics As FirebaseAnalytics
    End Sub

    Sub Service_Create
        
    Log("Has Google services: "&CheckForGooglePlayServices)
        analytics.Initialize
        consent.Initialize(
    "consent")
        consent.addTestDevice(
    "31F6FB8E34815CF697C342C8AB312170")
        consent.SetDebugGeography(
    True)
        
    Log("Starter state: " & consent.ConsentState)
        
    Log("Starter geography:" & consent.IsRequestLocationInEeaOrUnknown)
        consent.RequestInfoUpdate(
    Array("pub-111111111111111"))
        
    Wait For consent_InfoUpdate (Success As Boolean)
         
    If Success = False Then Log($"Error getting consent state: ${LastException}"$)
        
    If Success Then
            
    Log($"Consent form result: ${consent.ConsentState}"$)
        
    Else
            
    Log($"Error: ${LastException}"$)
        
    End If
        
    Log("arrived here")
        CallSubDelayed(Main,
    "ConsentStateAvailable")
    End Sub

    Sub Service_Start (StartingIntent As Intent)
        

    End Sub

    Sub Service_TaskRemoved
        
    'This event will be raised when the user removes the app from the recent apps list.
    End Sub

    'Return true to allow the OS default exceptions handler to handle the uncaught exception.
    Sub Application_Error (Error As Exception, StackTrace As StringAs Boolean
        
    Log(Error)
        
    Log(StackTrace)
        
    Return True
    End Sub

    Sub Service_Destroy

    End Sub

    Sub CheckForGooglePlayServices As Boolean
        
    Dim GoogleApiAvailablity As JavaObject
        GoogleApiAvailablity = GoogleApiAvailablity.InitializeStatic(
    "com.google.android.gms.common.GoogleApiAvailability").RunMethod("getInstance"Null)
        
    Dim context As JavaObject
        context.InitializeContext
        
    If GoogleApiAvailablity.RunMethod("isGooglePlayServicesAvailable"Array(context)) <> 0 Then
            GoogleApiAvailablity.RunMethod(
    "makeGooglePlayServicesAvailable"Array(context))
            
    Return False
        
    End If
        
    Return True
    End Sub
    And the unfiltered log in a device with Intel processor
    Code:
    Logger connected to:  TETRATAB CASEBOOK_3
    --------- beginning of main
    ClassLoader referenced unknown 
    path: /data/app/medsite.test-1/lib/x86
    Class com.google.firebase.auth.FirebaseAuthRegistrar 
    is not an found.
    java.lang.ClassNotFoundException: com.google.firebase.auth.FirebaseAuthRegistrar
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:
    324)
        at java.lang.Class.forName(Class.java:
    285)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@
    16.1.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@
    16.1.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@
    16.1.0:543)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:365)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:332)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@
    16.1.0:316)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@
    16.1.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1748)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:
    1723)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@
    16.1.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:
    5177)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:
    4772)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:
    4712)
        at android.app.ActivityThread.access$
    1700(ActivityThread.java:150)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
    1418)
        at android.os.Handler.dispatchMessage(Handler.java:
    102)
        at android.os.Looper.loop(Looper.java:
    148)
        at android.app.ActivityThread.main(ActivityThread.java:
    5444)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    746)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    636)
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "com.google.firebase.auth.FirebaseAuthRegistrar" on path: DexPathList[[zip file "/data/app/medsite.test-1/base.apk"],nativeLibraryDirectories=[/data/app/medsite.test-1/lib/x86, /vendor/lib, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    511)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    469)
        ... 
    24 more
        Suppressed: java.lang.ClassNotFoundException: com.google.firebase.auth.FirebaseAuthRegistrar
            at java.lang.Class.classForName(Native Method)
            at java.lang.BootClassLoader.findClass(ClassLoader.java:
    781)
            at java.lang.BootClassLoader.loadClass(ClassLoader.java:
    841)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:
    504)
            ... 
    25 more
        Caused by: java.lang.NoClassDefFoundError: Class 
    not found using the boot class loader; no stack trace available
    com.google.firebase.auth.FirebaseAuth 
    is not linked. Skipping initialization.
    FirebaseApp initialization successful
    common created.
    Starting remote logger. Port: 
    27896
    App measurement 
    is starting up, version: 15300
    To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    To enable faster debug mode event logging run:
      adb 
    shell setprop debug.firebase.analytics.app medsite.test
    Use EGL_SWAP_BEHAVIOR_PRESERVED: 
    true
    Hello, this 
    is UFO GRALLOC/Intel Corporation
     ro.camera.rec.pixel_format = 
    0x10f (271)
     ro.ycbcr.pixel_format = 
    0x10f (271)
    Initialized EGL, version 
    1.4
    Failed 
    to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
    droid_create_context : config 
    id = 11 conf->NativeVisualID=1
    Requested context : GLES 
    2.0
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    *** Debugger waiting 
    for connection (0) ***
    type=1400 audit(0.0:2001): avc: denied { write } for name="property_service" dev="tmpfs" ino=8524 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
    GL_VERSION: OpenGL ES 3.1 - Build 4.51.51292-R
    GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 3.10 - Build 4.51.51292-R
    property_set: property_set returned -1
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    Detected device 22B0:34 family 17:11
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    After accept
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    0xed74a000 Launching thread(s), CPUs 4
    *** Debugger waiting for connection (1) ***
    Copying updated assets files (1)
    *** Service (starter) Create ***
    Has Google services: true
    Starter state:
    Starter geography:false
    This request is sent from a test device.
    ** Service (starter) Start **
    ** Activity (main) Create, isFirst = true **
    ** Activity (main) Resume **
    Main resume state:  geography:false
    96103d4f-d1fd-48fe-ae1f-d1f1284300a6
    Tag Manager is not found and thus will not be used
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
    Failed to resolve target intent service, skipping classname enforcement
    Error while delivering the message: ServiceIntent not found.
    ** Activity (main) Pause, UserClosed = false **
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    ** Activity (main) Create, isFirst = false **
    ** Activity (main) Resume **
    Main resume state: UNKNOWN geography:false
    96103d4f-d1fd-48fe-ae1f-d1f1284300a6
    ** Activity (main) Pause, UserClosed = false **
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
    Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
    ** Activity (main) Create, isFirst = false **
    ** Activity (main) Resume **
    Main resume state: UNKNOWN geography:false
    96103d4f-d1fd-48fe-ae1f-d1f1284300a6
    ** Activity (main) Pause, UserClosed = false **
    Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
    I have rotated two times the device as it is shown in the logs.
    If you believe I have missed something from the documentation, it is OK, I will check again. It is now probably for a future project, so I have the time.
    Thank you in advance
     
  16. Erel

    Erel Administrator Staff Member Licensed User

    Please upload the updated project.
     
  17. dcoun

    dcoun Member Licensed User

    As you ordered
     

    Attached Files:

  18. Erel

    Erel Administrator Staff Member Licensed User

    Works fine here after I set the correct publisher id:
    Code:
    consent.RequestInfoUpdate(Array("pub-<your number here>"))
     
  19. dcoun

    dcoun Member Licensed User

    So, the code is OK. That is wonderful.
    I did copy-paste the publisher ID from admob in https://apps.admob.com/v2/settings
    Today, I noticed that DebugGeography returns true now
    So, it is a Google's problem? What do you recommend? Should I wait for a couple of days?
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    Hard to say. Make sure to carefully follow the tutorial.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice