I created a new sample project for displaying the Facebook audience network Banner ad at bottom of my activity.
My app is running in device but not displaying anything at bottom. I already added the hash for test device.
MainActivity.java
package liveradio.radioz.com.facebookads;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.facebook.ads.*;
import android.widget.LinearLayout;
public class MainActivity extends AppCompatActivity {
private AdView adView;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
adView = new AdView(this, "PLACEMENT-ID", AdSize.BANNER_HEIGHT_50);
// Find the Ad Container
LinearLayout adContainer = (LinearLayout) findViewById(R.id.banner_container);
// Add the ad view to your activity layout
adContainer.addView(adView);
AdSettings.addTestDevice("DEVICE-ID");
// Request an ad
adView.loadAd();
}
#Override
protected void onDestroy() {
if (adView != null) {
adView.destroy();
}
super.onDestroy();
}
}
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="liveradio.radioz.com.facebookads.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="#+id/banner_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
/>
</android.support.constraint.ConstraintLayout>
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="liveradio.radioz.com.facebookads">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Log :
01/12 12:13:01: Launching app
$ adb shell am start -n "liveradio.radioz.com.facebookads/liveradio.radioz.com.facebookads.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: liveradio.radioz.com.facebookads.test | liveradio.radioz.com.facebookads
Waiting for application to come online: liveradio.radioz.com.facebookads.test | liveradio.radioz.com.facebookads
Waiting for application to come online: liveradio.radioz.com.facebookads.test | liveradio.radioz.com.facebookads
Connecting to liveradio.radioz.com.facebookads
Waiting for application to start debug server
Waiting for application to come online: liveradio.radioz.com.facebookads.test | liveradio.radioz.com.facebookads
Connecting to liveradio.radioz.com.facebookads
Connected to the target VM, address: 'localhost:8645', transport: 'socket'
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/zygote: Not late-enabling -Xcheck:jni (already on)
W/zygote: Suspending all threads took: 83.944ms
W/zygote: Unexpected CPU variant for X86 using defaults: x86
I/zygote: Background concurrent copying GC freed 9752(4MB) AllocSpace objects, 0(0B) LOS objects, 61% free, 973KB/2MB, paused 48.188ms total 236.235ms
W/ActivityThread: Application liveradio.radioz.com.facebookads is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
I/zygote: Debugger is active
I/System.out: Debugger has connected
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1486)
I/InstantRun: starting instant run server: is main process
I/WebViewFactory: Loading com.android.chrome version 61.0.3163.98 (code 316409812)
I/zygote: The ClassLoaderContext is a special shared library.
I/cr_LibraryLoader: Time to load native libraries: 3 ms (timestamps 6510-6513)
I/chromium: [INFO:library_loader_hooks.cc(136)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_LibraryLoader: Expected native library version number "61.0.3163.98", actual native library version number "61.0.3163.98"
E/FBAudienceNetwork: You don't call AudienceNetworkAds.initialize(). Some functionality may not work properly.
D/IS_UNITY: false
D/AdInternalSettings: Test mode device hash: 877dd37b-fff7-4fa1-b83d-776592220359
D/AdInternalSettings: When testing your app with Facebook's ad units you must specify the device hashed ID to ensure the delivery of test ads, add the following code before loading an ad: AdSettings.addTestDevice("877dd37b-fff7-4fa1-b83d-776592220359");
D/IS_UNITY: false
E/ActivityThread: Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider
D/OpenGLRenderer: HWUI GL Pipeline
V/StudioProfiler: StudioProfilers agent attached.
V/StudioProfiler: Acquiring Application for Events
V/StudioProfiler: Transformed class: java/net/URL
W/zygote: Current dex file has more than one class in it. Calling RetransformClasses on this class might fail if no transformations are applied to it!
V/StudioProfiler: Memory control stream started.
[ 01-12 12:13:06.606 20774:20877 D/ ]
HostConnection::get() New Host Connection established 0xd1835a80, tid 20877
I/zygote: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/EGL_emulation: eglCreateContext: 0xe4b85540: maj 3 min 0 rcv 3
D/EGL_emulation: eglMakeCurrent: 0xe4b85540: ver 3 0 (tinfo 0xe4b83360)
D/EGL_emulation: eglMakeCurrent: 0xe4b85540: ver 3 0 (tinfo 0xe4b83360)
W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true
I/cr_BrowserStartup: Initializing chromium process, singleProcess=false
[ 01-12 12:13:07.026 20774:20774 D/ ]
HostConnection::get() New Host Connection established 0xd1583c00, tid 20774
D/EGL_emulation: eglCreateContext: 0xcecec360: maj 3 min 0 rcv 3
D/EGL_emulation: eglMakeCurrent: 0xcecec360: ver 3 0 (tinfo 0xe21fff60)
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
W/cr_CrashFileManager: /data/user/0/liveradio.radioz.com.facebookads/cache/WebView/Crash Reports does not exist or is not a directory
W/com.facebookads: type=1400 audit(0.0:22): avc: denied { read } for name="vmstat" dev="proc" ino=4026532039 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
D/IS_UNITY: false
I/zygote: Background concurrent copying GC freed 7886(1025KB) AllocSpace objects, 5(100KB) LOS objects, 50% free, 1746KB/3MB, paused 680us total 122.639ms
I/zygote: Do partial code cache collection, code=30KB, data=25KB
I/zygote: After code cache collection, code=30KB, data=25KB
I/zygote: Increasing code cache capacity to 128KB
V/StudioProfiler: Live memory tracking disabled.
V/StudioProfiler: Live memory tracking enabled.
V/StudioProfiler: JNIEnv not attached
V/StudioProfiler: Loaded classes: 6311
V/StudioProfiler: Tracking initialization took: 648527000ns
I/zygote: Do partial code cache collection, code=60KB, data=44KB
I/zygote: After code cache collection, code=56KB, data=43KB
I/zygote: Increasing code cache capacity to 256KB
Disconnected from the target VM, address: 'localhost:8645', transport: 'socket'
I'm getting the build successful and installed in my device. When I open the app I can't see any ads or test ads at bottom of my main activity.
If you've added Audience network libraries, you can add the code below to show test ads without worrying about adding a test device.
if (BuildConfig.DEBUG) {
AdSettings.setTestMode(true);
}
Add this code, preferably in your Application class.
First Implement this library:
implementation 'com.facebook.android:audience-network-sdk:4.99.1'
than use below code:
com.facebook.ads.AdView adView;
adView = new com.facebook.ads.AdView(this, "PLACEMENT-ID",
com.facebook.ads.AdSize.BANNER_HEIGHT_50);
((LinearLayout) adContainer).addView(adView);
adView.loadAd();
first, add this library to your grade file
implementation 'com.facebook.android:audience-network-sdk:6.12.0'
then paste this code in your xml file
<LinearLayout
android:id="#+id/banner_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
/>
In your Java code paste this code and also replace IMG_16_9_APP_INSTALL#YOUR_PLACEMENT_ID with your banner ad ID
adView = new AdView(this, "IMG_16_9_APP_INSTALL#YOUR_PLACEMENT_ID", AdSize.BANNER_HEIGHT_50);
LinearLayout adContainer = (LinearLayout) findViewById(R.id.banner_container);
adContainer.addView(adView);
adView.loadAd();
for more information you can follow official link of meta
https://developers.facebook.com/docs/audience-network/setting-up/ad-setup/android/banner
Related
I am trying to call asp.net web api from Android Client using Volley library. The .net API is working fine and listening ports are:
http://localhost:5000 and https://localhost:5001 in my local machine.
But,When, I try to run android client keeping the base url as http://10.0.2.2:5000/api/login
I found below error in console->
04/23 23:13:41: Launching 'app' on Nexus 6 API 24.
Install successfully finished in 9 s 435 ms.
$ adb shell am start -n "com.example.tourexpwip/com.example.tourexpwip.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 3662 on device 'Nexus_6_API_24 [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/art: Late-enabling -Xcheck:jni
W/art: Unexpected CPU variant for X86 using defaults: x86
W/System: ClassLoader referenced unknown path: /data/app/com.example.tourexpwip-1/lib/x86
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
I/System.out: URL: http://10.0.2.2:5000/api/login/
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/: HostConnection::get() New Host Connection established 0xa67ec7c0, tid 3662
E/Volley: [210] NetworkUtility.shouldRetryException: Unexpected response code 307 for http://10.0.2.2:5000/api/login/
D/: HostConnection::get() New Host Connection established 0xa67ecac0, tid 3683
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/EGL_emulation: eglCreateContext: 0xb5c05660: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0xb5c05660: ver 2 0 (tinfo 0xb5c032b0)
W/System.err: com.android.volley.ServerError
at com.android.volley.toolbox.NetworkUtility.shouldRetryException(NetworkUtility.java:201)
W/System.err: at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:145)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:132)
W/System.err: at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90)
I/Choreographer: Skipped 68 frames! The application may be doing too much work on its main thread.
D/EGL_emulation: eglMakeCurrent: 0xb5c05660: ver 2 0 (tinfo 0xb5c032b0)
I/Choreographer: Skipped 35 frames! The application may be doing too much work on its main thread.
The controller class for login in ASP.NET web api->
namespace TourExpWIP1.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class LoginController : ControllerBase
{
NetCoreAuthenticationContext dbContext = new NetCoreAuthenticationContext();
public string Post([FromBody] TblUser value)
{
if (dbContext.TblUser.Any(user => user.UserName.Equals(value.UserName)))
{
TblUser user = dbContext.TblUser.Where(u => u.UserName.Equals(value.UserName)).First();
var client_post_hash_password = Convert.ToBase64String(
Common.SaltHashPassword(
Encoding.ASCII.GetBytes(value.Password),
Convert.FromBase64String(user.Salt)));
if (client_post_hash_password.Equals(user.Password))
return JsonConvert.SerializeObject(user);
else return JsonConvert.SerializeObject("Wrong Password");
}
else
{
return JsonConvert.SerializeObject("user does not exists in db");
}
}
}
}
Try this
1.In Android Manifiest, in tag application add:
inside tag application add this tag:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<application
android:usesCleartextTraffic="true"
android:networkSecurityConfig="#xml/network_security_config"
...
/>
2.With a corresponding network_security_config.xml in app/src/main/res/xml/:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>
More details please find from here- Link
I faced infinite run when I am trying using ListView with retrieving data from firebase, and I don't know how can I solve it.
My main goal is retrieving from firebase with a dynamic number of clients who have a status of "Not approved".
This my RUN
10/03 21:30:58: Launching app $ adb shell am start -n
"com.example.atheer.booklyv1/com.example.atheer.booklyv1.MainActivity"
-a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Connected to
process 8309 on device emulator-5554 Capturing and displaying logcat
messages from application. This behavior can be disabled in the
"Logcat output" section of the "Debugger" settings page.
W/atheer.booklyv: JIT profile information will not be recorded:
profile file does not exits. I/chatty:
uid=10086(com.example.atheer.booklyv1) identical 10 lines
W/atheer.booklyv: JIT profile information will not be recorded:
profile file does not exits. W/atheer.booklyv: Unsupported class
loader W/atheer.booklyv: Skipping duplicate class check due to
unsupported classloader W/DynamiteModule: Local module descriptor
class for com.google.firebase.auth not found. W/DynamiteModule: Local
module descriptor class for com.google.firebase.auth not found.
W/atheer.booklyv: Verification of android.content.Intent
com.google.android.gms.common.zzf.zza(android.content.Context, int,
java.lang.String) took 130.356ms I/BiChannelGoogleApi: [FirebaseAuth:
] No Fallback module; NOT setting up for lazy initialization
D/FirebaseAuth: Notifying id token listeners about user (
N72Vpxaf6dao4pSf5cvBJ1jwzGo2 ). D/FirebaseApp:
com.google.firebase.crash.FirebaseCrash is not linked. Skipping
initialization. V/FA: Cancelling job. JobID: -1422956107 V/FA:
Registered activity lifecycle callback I/FirebaseInitProvider:
FirebaseApp initialization successful I/InstantRun: starting instant
run server: is main process V/FA: Collection enabled V/FA: App
package, google app id: com.example.atheer.booklyv1,
1:666514046827:android:60ad4570c33e1aec I/FA: App measurement is
starting up, version: 11910
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 com.example.atheer.booklyv1 D/FA: Debug-level message logging enabled
W/DynamiteModule: Local module descriptor class for
com.google.firebase.auth not found. V/FA: onActivityCreated V/FA:
Connecting to remote service I/FirebaseAuth: [FirebaseAuth:] Loading
module via FirebaseOptions.
[FirebaseAuth:] Preparing to create service connection to gms implementation V/FA: Connection attempt already in progress
W/atheer.booklyv: Accessing hidden method
Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z
(light greylist, reflection) W/atheer.booklyv: Accessing hidden method
Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light
greylist, reflection) D/OpenGLRenderer: Skia GL Pipeline V/FA:
Connection attempt already in progress
Activity resumed, time: 1574868 I/FA: Tag Manager is not found and thus will not be used D/FirebaseApp: Notifying auth state
listeners. D/FirebaseApp: Notified 0 auth state listeners. D/FA:
Logging event (FE): screen_view(_vs),
Bundle[{firebase_event_origin(_o)=auto,
firebase_screen_class(_sc)=MainActivity,
firebase_screen_id(_si)=5185910341027462403}] D/:
HostConnection::get() New Host Connection established 0xdeffec40, tid
8354 I/ConfigStore:
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay
retrieved: 0
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay
retrieved: 0 I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1 W/OpenGLRenderer: Failed to choose
config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0 D/EGL_emulation: eglCreateContext:
0xcc20f240: maj 3 min 0 rcv 3 D/EGL_emulation: eglMakeCurrent:
0xcc20f240: ver 3 0 (tinfo 0xe2730c60) D/EGL_emulation:
eglMakeCurrent: 0xcc20f240: ver 3 0 (tinfo 0xe2730c60) V/FA:
Connection attempt already in progress D/FA: Connected to remote
service V/FA: Processing queued up service tasks: 4 V/StudioProfiler:
StudioProfilers agent attached. V/StudioProfiler: Acquiring
Application for Events V/StudioProfiler: Transformed class:
java/net/URL W/atheer.booklyv: Current dex file has more than one
class in it. Calling RetransformClasses on this class might fail if no
transformations are applied to it! V/StudioProfiler: Memory control
stream started. V/StudioProfiler: Live memory tracking disabled.
V/StudioProfiler: Live memory tracking enabled.
JNIEnv not attached V/StudioProfiler: Loaded classes: 11553 V/StudioProfiler: Tracking initialization took:
410566000ns W/ActivityThread: handleWindowVisibility: no activity for
token android.os.BinderProxy#f188cbd V/FA: Recording user engagement,
ms: 4164 V/FA: Activity paused, time: 1579010 V/FA: onActivityCreated
I/atheer.booklyv: Background concurrent copying GC freed 662(4MB)
AllocSpace objects, 0(0B) LOS objects, 49% free, 3MB/6MB, paused
1.122ms total 328.178ms D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto,
engagement_time_msec(_et)=4164,
firebase_screen_class(_sc)=MainActivity,
firebase_screen_id(_si)=5185910341027462403}] V/FA: Activity resumed,
time: 1580197 D/FA: Logging event (FE): screen_view(_vs),
Bundle[{firebase_event_origin(_o)=auto,
firebase_previous_class(_pc)=MainActivity,
firebase_previous_id(_pi)=5185910341027462403,
firebase_screen_class(_sc)=mHomePage,
firebase_screen_id(_si)=5185910341027462404}] D/EGL_emulation:
eglMakeCurrent: 0xcc20f240: ver 3 0 (tinfo 0xe2730c60)
W/ActivityThread: handleWindowVisibility: no activity for token
android.os.BinderProxy#877a26c V/FA: Recording user engagement, ms:
4828 V/FA: Activity paused, time: 1585022 V/FA: onActivityCreated
D/FA: Logging event (FE): user_engagement(_e),
Bundle[{firebase_event_origin(_o)=auto,
engagement_time_msec(_et)=4828, firebase_screen_class(_sc)=mHomePage,
firebase_screen_id(_si)=5185910341027462404}] I/DynamiteModule:
Considering local module com.google.android.gms.firebase_database:4
and remote module com.google.android.gms.firebase_database:6
Selected remote version of com.google.android.gms.firebase_database, version >= 6 V/FA: Activity
resumed, time: 1585685 I/Choreographer: Skipped 37 frames! The
application may be doing too much work on its main thread.
W/atheer.booklyv: Unsupported class loader W/atheer.booklyv: Skipping
duplicate class check due to unsupported classloader D/FA: Logging
event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto,
firebase_previous_class(_pc)=mHomePage,
firebase_previous_id(_pi)=5185910341027462404,
firebase_screen_class(_sc)=loginActivity,
firebase_screen_id(_si)=5185910341027462405}] I/OpenGLRenderer: Davey!
duration=916ms; Flags=1, IntendedVsync=1585088907737,
Vsync=1585705574379, OldestInputEvent=9223372036854775807,
NewestInputEvent=0, HandleInputStart=1585721516670,
AnimationStart=1585721565670, PerformTraversalsStart=1585722412670,
DrawStart=1586003516670, SyncQueued=1586003568670,
SyncStart=1586003659670, IssueDrawCommandsStart=1586003710670,
SwapBuffers=1586004070670, FrameCompleted=1586005330670,
DequeueBufferDuration=162000, QueueBufferDuration=300000,
D/EGL_emulation: eglMakeCurrent: 0xcc20f240: ver 3 0 (tinfo
0xe2730c60) D/NetworkSecurityConfig: No Network Security Config
specified, using platform default I/AssistStructure: Flattened final
assist data: 3404 bytes, containing 1 windows, 11 views V/FA:
Inactivity, disconnecting from the service I/AssistStructure:
Flattened final assist data: 3428 bytes, containing 1 windows, 11
views W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod()
returned Gms D/FirebaseAuth: Notifying id token listeners about user (
N72Vpxaf6dao4pSf5cvBJ1jwzGo2 ). D/FirebaseApp: Notifying auth state
listeners. D/FirebaseApp: Notified 1 auth state listeners. V/FA:
Recording user engagement, ms: 21363 V/FA: Connecting to remote
service W/ActivityThread: handleWindowVisibility: no activity for
token android.os.BinderProxy#48f31b0 V/FA: Activity paused, time:
1607047 D/FA: Logging event (FE): user_engagement(_e),
Bundle[{firebase_event_origin(_o)=auto,
engagement_time_msec(_et)=21363,
firebase_screen_class(_sc)=loginActivity,
firebase_screen_id(_si)=5185910341027462405}] V/FA: onActivityCreated
V/FA: Connection attempt already in progress I/atheer.booklyv:
NativeAlloc concurrent copying GC freed 25494(1649KB) AllocSpace
objects, 19(632KB) LOS objects, 50% free, 3MB/7MB, paused 580us total
742.771ms V/FA: Connection attempt already in progress V/FA: Activity resumed, time: 1608103 D/FA: Logging event (FE): screen_view(_vs),
Bundle[{firebase_event_origin(_o)=auto,
firebase_previous_class(_pc)=loginActivity,
firebase_previous_id(_pi)=5185910341027462405,
firebase_screen_class(_sc)=dashboardAdmin,
firebase_screen_id(_si)=5185910341027462406}] D/EGL_emulation:
eglMakeCurrent: 0xcc20f240: ver 3 0 (tinfo 0xe2730c60) V/FA:
Connection attempt already in progress D/FA: Connected to remote
service V/FA: Processing queued up service tasks: 4 W/ActivityThread:
handleWindowVisibility: no activity for token
android.os.BinderProxy#7f475a4 V/FA: Recording user engagement, ms:
5136 V/FA: Activity paused, time: 1613235 D/FA: Logging event (FE):
user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto,
engagement_time_msec(_et)=5136,
firebase_screen_class(_sc)=dashboardAdmin,
firebase_screen_id(_si)=5185910341027462406}] V/FA: onActivityCreated
V/FA: Activity resumed, time: 1613594 D/FA: Logging event (FE):
screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto,
firebase_previous_class(_pc)=dashboardAdmin,
firebase_previous_id(_pi)=5185910341027462406,
firebase_screen_class(_sc)=approvedAdmin,
firebase_screen_id(_si)=5185910341027462407}] D/EGL_emulation:
eglMakeCurrent: 0xcc20f240: ver 3 0 (tinfo 0xe2730c60)
D/EGL_emulation: eglMakeCurrent: 0xcc20f240: ver 3 0 (tinfo
0xe2730c60) W/atheer.booklyv: Long wait of 5.943ms for
Thread[1,tid=8309,Native,Thread*=0xe6674000,peer=0x738f9ec8,"main"]
suspension! D/EGL_emulation: eglMakeCurrent: 0xcc20f240: ver 3 0
(tinfo 0xe2730c60) D/EGL_emulation: eglMakeCurrent: 0xcc20f240: ver 3
0 (tinfo 0xe2730c60) D/EGL_emulation: eglMakeCurrent: 0xcc20f240: ver
3 0 (tinfo 0xe2730c60) V/FA: Inactivity, disconnecting from the
service E/StudioProfiler: JVMTI error:
15(JVMTI_ERROR_THREAD_NOT_ALIVE) I/chatty:
uid=10086(com.example.atheer.booklyv1) Binder:8309_5 identical 3 lines
E/StudioProfiler: JVMTI error: 15(JVMTI_ERROR_THREAD_NOT_ALIVE)
I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection
to gms implementation
And this is my java code
package com.example.atheer.booklyv1;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.ArrayList;
import java.util.Map;
public class approvedAdmin extends AppCompatActivity implements View.OnClickListener{
DatabaseReference dref;
ListView listview;
ArrayList<String> list=new ArrayList<>();
ArrayAdapter<String> adapter;
public approvedAdmin() {
}
#Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_approved_admin);
listview=(ListView)findViewById(R.id.list);
dref= FirebaseDatabase.getInstance().getReference("client");
// adapter.notifyDataSetChanged();
dref.addChildEventListener(new ChildEventListener() {
#Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
String status;
String name;
String email;
Toast.makeText(approvedAdmin.this, "ok", Toast.LENGTH_SHORT).show();
for(DataSnapshot ds: dataSnapshot.getChildren() ){
if (ds.hasChild("Status")){
status=ds.child("Status").getValue(String.class);
if (status.equalsIgnoreCase("Not approved")){
name= ds.child("name").getValue(String.class);
list.add(name);
adapter= new ArrayAdapter<String>(approvedAdmin.this, android.R.layout.simple_list_item_1, list);
listview.setAdapter(adapter);
}}
}}
#Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
}
#Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
}
#Override
public void onChildMoved(DataSnapshot dataSnapshot, String s) {
}
#Override
public void onCancelled(DatabaseError databaseError) {
}
});
}
#Override
public void onClick(View v) {
}
}
And this is my xml code
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".approvedAdmin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<ListView
android:id="#android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
You need to move out setting up adapter code out from for loop, like below
for(DataSnapshot ds: dataSnapshot.getChildren() ){
if (ds.hasChild("Status")){
status=ds.child("Status").getValue(String.class);
if (status.equalsIgnoreCase("Not approved")){
name= ds.child("name").getValue(String.class);
list.add(name);
}
}
}
adapter= new ArrayAdapter<String>(approvedAdmin.this, android.R.layout.simple_list_item_1, list);
listview.setAdapter(adapter);
You also need to change the listview id from android:id="#android:id/list" to android:id="#+id/list"
I am developing Appium tests for an Android app. The problem happens during the login to facebook which works through a WebView. The login to facebook is necessary for the app login and the app registration. The login to facebook is in both cases (app login and app registration) the same, so I execute in both cases the same method:
private void logInAtFacebook(String email, String password) {
findElementWithTimeout(By.className("android.webkit.WebView"), 10);
Set<String> contextHandles = driver.getContextHandles();
for (String s : contextHandles) {
if (s.contains("WEBVIEW")) {
driver.context(s);
}
}
findElement(By.xpath("//input[#name='email']")).sendKeys(email);
findElement(By.xpath("//input[#name='pass']")).sendKeys(password);
findElement(By.xpath("//button[#name='login']")).click();
findElement(By.xpath("//button[#name='__CONFIRM__']")).click();
driver.context("NATIVE_APP");
}
It is weird, that the app login with facebook works, but the app registration with facebook crashes. The second last line in the above method...
findElement(By.xpath("//button[#name='__CONFIRM__']")).click();
...doesn't return, but the button is clicked in the UI. In other words, the execution stops at this line, so that the next line...
driver.context("NATIVE_APP");
... is never executed. I am really confused. Why is the same code working for the app login, but not for the registration?!
Iv'e copied the logs from Android Studio:
First, the last lines before it crashes during app registration:
01-30 14:18:25.016 24439-24439/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:18:44.103 24439-24439/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:18:44.184 24439-24439/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:18:44.260 24439-24439/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:18:44.322 24439-24439/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:18:44.401 24439-24450/de.blabla I/art: Background partial concurrent mark sweep GC freed 133(8KB) AllocSpace objects, 3(18MB) LOS objects, 13% free, 24MB/28MB, paused 9.861ms total 80.852ms
01-30 14:18:44.416 24439-24439/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:18:44.516 24439-24475/de.blabla D/EGL_emulation: eglMakeCurrent: 0x7df02443c260: ver 2 0 (tinfo 0x7df02440ce80)
01-30 14:18:44.633 24439-24439/de.blabla W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 24439
01-30 14:18:44.807 24439-24475/de.blabla D/EGL_emulation: eglMakeCurrent: 0x7df02443c260: ver 2 0 (tinfo 0x7df02440ce80)
01-30 14:18:45.111 24439-24475/de.blabla D/EGL_emulation: eglMakeCurrent: 0x7df02443c260: ver 2 0 (tinfo 0x7df02440ce80)
And the same lines of the working app login:
01-30 14:21:17.179 25078-25078/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:21:30.464 25078-25078/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:21:30.573 25078-25078/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:21:30.640 25078-25078/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:21:30.644 25078-25089/de.blabla I/art: Background partial concurrent mark sweep GC freed 156(6KB) AllocSpace objects, 2(12MB) LOS objects, 11% free, 30MB/34MB, paused 3.293ms total 143.091ms
01-30 14:21:30.717 25078-25078/de.blabla W/art: Attempt to remove non-JNI local reference, dumping thread
01-30 14:21:30.843 25078-25112/de.blabla D/EGL_emulation: eglMakeCurrent: 0x7df024436640: ver 2 0 (tinfo 0x7df02440c900)
01-30 14:21:31.002 25078-25078/de.blabla W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 25078
01-30 14:21:31.153 25078-25112/de.blabla D/EGL_emulation: eglMakeCurrent: 0x7df024436640: ver 2 0 (tinfo 0x7df02440c900)
01-30 14:21:31.564 25078-25112/de.blabla D/EGL_emulation: eglMakeCurrent: 0x7df024436640: ver 2 0 (tinfo 0x7df02440c900)
01-30 14:21:31.721 25078-25248/de.blabla ... *no it continues the test as it should*
Have you tried sending app to background for 0 seconds just after "__ CONFIRM__" button is clicked?
Example:
findElement(By.xpath("//button[#name='login']")).click();
findElement(By.xpath("//button[#name='__CONFIRM__']")).click();
driver.runAppInBackground(0);
driver.context("NATIVE_APP");
Sometimes when tasks are done in background, you lose focus and you are not able to find, click or even make a screenshot with Appium...
Let me know if it worked
I found an inconvenient workaround, but it works for now:
private void logInAtFacebook(String email, String password) {
findElementWithTimeout(By.className("android.webkit.WebView"), 10);
Set<String> contextHandles = driver.getContextHandles();
for (String s : contextHandles) {
if (s.contains("WEBVIEW")) {
driver.context(s);
}
}
findElement(By.xpath("//input[#name='email']")).sendKeys(email);
findElement(By.xpath("//input[#name='pass']")).sendKeys(password);
findElement(By.xpath("//button[#name='login']")).
driver.context("NATIVE_APP");
driver.findElementByAccessibilityId("Continue").click();
}
The problem had something to do with the click within the WebView, so I decided to go back to context "NATIVE_APP" before the last click on the "Continue-Button" happens.
I'm still hoping for a better way to fix this!
I want a dark colored theme.
I changed the following in styles.xml:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
to
<style name="AppTheme" parent="android:Theme.Black">
and I also tried many other strings which either don't compile or cause the same crash.
Android monitor shows:
08-11 20:07:00.938 29773-29773/? I/zygote: Not late-enabling -Xcheck:jni (already on)
08-11 20:07:00.956 29773-29773/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
08-11 20:07:01.122 29773-29773/com.example.timothyswan.myapplication I/InstantRun: starting instant run server: is main process
08-11 20:07:01.283 29773-29805/com.example.timothyswan.myapplication D/OpenGLRenderer: HWUI GL Pipeline
08-11 20:07:01.457 29773-29805/com.example.timothyswan.myapplication I/OpenGLRenderer: Initialized EGL, version 1.4
08-11 20:07:01.457 29773-29805/com.example.timothyswan.myapplication D/OpenGLRenderer: Swap behavior 1
08-11 20:07:01.457 29773-29805/com.example.timothyswan.myapplication W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
08-11 20:07:01.457 29773-29805/com.example.timothyswan.myapplication D/OpenGLRenderer: Swap behavior 0
08-11 20:07:01.459 29773-29805/com.example.timothyswan.myapplication D/EGL_emulation: eglCreateContext: 0xaa4b1920: maj 2 min 0 rcv 2
08-11 20:07:01.461 29773-29805/com.example.timothyswan.myapplication D/EGL_emulation: eglMakeCurrent: 0xaa4b1920: ver 2 0 (tinfo 0x9e4aa9f0)
[ 08-11 20:07:01.479 29773:29805 D/ ]
SurfaceInterface::setAsyncMode: set async mode 1
08-11 20:07:01.493 29773-29805/com.example.timothyswan.myapplication D/EGL_emulation: eglMakeCurrent: 0xaa4b1920: ver 2 0 (tinfo 0x9e4aa9f0)
And the 'run' console shows:
08/11 22:01:07: Launching app
$ adb shell am start -n "com.example.timothyswan.myapplication/com.example.timothyswan.myapplication.InspirationBasic" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 6973 on device emulator-5554
Application terminated.
The theme of an AppCompatActivity (not Activity) must be an descendant of an Theme.AppCompat.
So check if your activity extends AppCompatActivity or not.
If so, change it extends Activity, or make your own theme which inherits from Theme.AppCompat and apply to your activity
I am developing an app using Android Studio.
The problem is that app gets crashed twice within few minutes of running it and besides Application terminated. and normal logs no error is shown in the logcat.
Here's complete logcat:
02/12 22:31:34: Launching app
Cold swapped changes.
$ adb shell am start -n "com.abc.xxx/com.abc.xxx.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 13399 on device micromax-micromax_aq4502-2864004C04884I2
I/art: Late-enabling -Xcheck:jni
W/System: ClassLoader referenced unknown path: /data/app/com.abc.xxx-2/lib/arm
I/InstantRun: Instant Run Runtime started. Android package is com.abc.xxx, real application class is null.
W/System: ClassLoader referenced unknown path: /data/app/com.abc.xxx-2/lib/arm
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
I/art: Background sticky concurrent mark sweep GC freed 11281(1218KB) AllocSpace objects, 22(696KB) LOS objects, 15% free, 5MB/6MB, paused 13.077ms total 70.659ms
I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
I/DynamiteModule: Selected local version of com.google.android.gms.flags
W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found.
I/DynamiteModule: Considering local module com.google.android.gms.crash:0 and remote module com.google.android.gms.crash:4
I/DynamiteModule: Selected remote version of com.google.android.gms.crash, version >= 4
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000012/n/armeabi-v7a
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000012/n/armeabi
I/FirebaseCrashApiImpl: FirebaseCrashApiImpl created by ClassLoader p[DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/00000012/DynamiteModulesC_GmsCore_prodmnc_hdpi_release.apk"],nativeLibraryDirectories=[/data/user/0/com.google.android.gms/app_chimera/m/00000012/n/armeabi-v7a, /data/user/0/com.google.android.gms/app_chimera/m/00000012/n/armeabi, /vendor/lib, /system/lib]]]
I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
I/DynamiteModule: Selected local version of com.google.android.gms.flags
W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found.
I/FA: App measurement is starting up, version: 10084
I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
D/FA: Debug-level message logging enabled
D/FA: AppMeasurement singleton hash: 198168520
V/FA: Collection enabled
V/FA: App package, google app id: com.abc.xxx, 1:987905869088:android:e7f50263e7b8aa58
I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.getsportalapp.sportal
V/FA: Registered activity lifecycle callback
I/FirebaseCrash: FirebaseCrash reporting initialized com.google.android.gms.internal.zzbks#e551d72
I/FirebaseInitProvider: FirebaseApp initialization successful
V/FA: Using measurement service
V/FA: Connecting to remote service
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
W/com.facebook.appevents.AppEventsLogger: activateApp events are being logged automatically. There's no need to call activateApp explicitly, this is safe to remove.
I/GAC: Building GoogleApiClient
I/CrashlyticsCore: Initializing Crashlytics 2.3.15.167
V/FA: Connection attempt already in progress
V/FA: Activity resumed, time: 824779068
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: false
D/signedIn: onAuthStateChanged:signed_in:ShXMXdc5kHUQZWG3lGudJtt2
I/DynamiteModule: Considering local module com.google.android.gms.firebase_database:4 and remote module com.google.android.gms.firebase_database:5
I/DynamiteModule: Selected remote version of com.google.android.gms.firebase_database, version >= 5
I/OpenGLRenderer: Initialized EGL, version 1.4
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
E/RecyclerView: No adapter attached; skipping layout
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 2
E/RecyclerView: No adapter attached; skipping layout
D/getInvitation: getInvitation: no deep link found.
D/called: again
D/cLat: 2.8418744
D/cLng: 8.7791019
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
W/PersistentConnection: pc_0 - Using an unspecified index. Consider adding '".indexOn": "g"' at geofire to your security and Firebase Database rules for better performance
W/PersistentConnection: pc_0 - Using an unspecified index. Consider adding '".indexOn": "g"' at geofire to your security and Firebase Database rules for better performance
W/PersistentConnection: pc_0 - Using an unspecified index. Consider adding '".indexOn": "g"' at geofire to your security and Firebase Database rules for better performance
W/PersistentConnection: pc_0 - Using an unspecified index. Consider adding '".indexOn": "g"' at geofire to your security and Firebase Database rules for better performance
W/Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000010/n/armeabi
D/DynamitePackage: Instantiated singleton DynamitePackage.
D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
I/DynamiteModule: Considering local module com.google.android.gms.piccard.dynamite:0 and remote module com.google.android.gms.piccard.dynamite:12
I/DynamiteModule: Selected remote version of com.google.android.gms.piccard.dynamite, version >= 12
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000010/n/armeabi
W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
I/Ads: Starting ad request.
I/WebViewFactory: Loading com.google.android.webview version 53.0.2785.124 (code 278512400)
D/diffAnother: -6283000
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/cr_LibraryLoader: Time to load native libraries: 6 ms (timestamps 5738-5744)
I/cr_LibraryLoader: Expected native library version number "53.0.2785.124", actual native library version number "53.0.2785.124"
V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {611ead6}
I/cr_LibraryLoader: Expected native library version number "53.0.2785.124", actual native library version number "53.0.2785.124"
I/chromium: [INFO:library_loader_hooks.cc(151)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
W/cr_media: Requires BLUETOOTH permission
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
I/cr_Ime: ImeThread is not enabled.
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 13399
I/DynamiteModule: Considering local module com.google.android.gms.tagmanager:8 and remote module com.google.android.gms.tagmanager:9
I/DynamiteModule: Selected remote version of com.google.android.gms.tagmanager, version >= 9
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
W/GoogleTagManager: No container asset found in /assets/containers. Checking top level /assets directory for container assets.
W/GoogleTagManager: Tag Manager's event handler WILL NOT be installed (no container loaded)
I/GoogleTagManager: Tag Manager initilization took 213ms
V/FA: Using measurement service
V/FA: Connecting to remote service
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 1
I/Ads: Scheduling ad refresh 45000 milliseconds from now.
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
I/cr_Ime: ImeThread is not enabled.
I/Ads: Ad finished loading.
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 13399
I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
D/diffAnother: 1129000
D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
I/Ads: Starting ad request.
D/diffAnother: -6300000
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
I/cr_Ime: ImeThread is not enabled.
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 13399
I/Ads: Scheduling ad refresh 45000 milliseconds from now.
I/Ads: Ad finished loading.
V/FA: Using measurement service
V/FA: Connecting to remote service
D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=29568, _sc=MainActivity, _si=-6311178554893906199}]
V/FA: Using measurement service
V/FA: Connection attempt already in progress
V/FA: Activity paused, time: 824808635
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 2
W/com.facebook.appevents.AppEventsLogger: activateApp events are being logged automatically. There's no need to call activateApp explicitly, this is safe to remove.
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
D/call1: called
D/call2: called
D/call1: called
D/call2: called
D/error1: ERROR1
D/error1: ERROR1
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
V/RenderScript: 0xb8457a88 Launching thread(s), CPUs 4
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
V/FA: Inactivity, disconnecting from the service
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
I/Ads: Ad is not visible. Not refreshing ad.
I/Ads: Scheduling ad refresh 60000 milliseconds from now.
I/Ads: Ad is not visible. Not refreshing ad.
I/Ads: Scheduling ad refresh 60000 milliseconds from now.
Application terminated.
I tried integrating crashlytics but even it doesn't show any error when the app crashes in this manner.
The question is how will I be able to fix the error if I don't even know what the error is?
Please help me with this.
I think the issue is related to your ad view.
In last line it is showing that ad is not visible.