I received quite a number of crash reported in my Xamarin.Android app reported in Play Console with the following stack trace:
at mono.android.Runtime.register (Native Method)
at md5dd7a5194eb3bf67181b6a5c267c0f7e7.PushNotificationMessagingService. (PushNotificationMessagingService.java:15)
at java.lang.Class.newInstance (Native Method)
at android.app.ActivityThread.handleCreateService (ActivityThread.java:3470)
at android.app.ActivityThread.-wrap4 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1748)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:206)
at android.app.ActivityThread.main (ActivityThread.java:6733)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:845)
I have no idea what crashed. The only thing it point to is the push notification services in the app with no additional information. They happen on Android 8.0 and above devices only. Android 8.0 above doesn’t required any special permission to receive notification. No similar crash reported in App Center (I use App Center as my crash reporting tool). Search online doesn’t return me anything meaningful. So I just ignore the error since no user complain anything to me.
Then today I found out that Android 8.0 and above required channel id when showing notification else it will crash in the background. Oh, snap, this is the problem! If you have simiar crash stack trace, this is probably the answer: https://blog.xamarin.com/android-oreo-notification-channels/
Every time I reformatted my machine and reinstall back Android Studio / Visual Studio. There are always some components in Android development tools are broken. It work perfectly previous, but now it doesn’t work on new freshly installed machine. It is always a new problem. This is annoying.
When I launch Android Device Monitor from Visual Studio 2017 or launch the android device monitor manually from executable. The following error pop up.
Failed to load the JNI shared library “C:\Program Files\Java\jdk1.8.0_181\bin\..\jre\bin\server\jvm.dll”
Depend on your installed JDK version, the error message might be different.
This is because Visual Studio tried to launch the x86 version of Android Device Monitor, while my machine only have x64 Java SDK / JDK installed, so it complain that. Unlike previous Visual Studio which install x86 JDK, all new Visual Studio now come with x64 JDK only.
Continue reading Failed to Launch Android Device Monitor
Try to code your first example of WkWebview / UIWebView in your iOS app always return a blank screen or white screen? You are not alone. Apparently since iOS 9, all HTTP / non-secure web connection is block by default. It is something call App Transport Security (ATS).
You can add the following configuration into Info.plist to allow WkWebview / UIWebView to load HTTP / non-secure web page:
Or you can completely disable App Transport Security by
I came across Xamarin Test Recorder a few days ago, and feel that it really can solve the pain I have with Appium which need a lot of work to write a single test. Give it a try to install but it fail with the following message below and no body in the marketplace review seem to know why and leave a one star review. Because no body care to read the description!
Continue reading Xamarin Test Recorder Installation: VSIXInstaller.NoApplicableSKUsException