the app was working perfectly with release/debug mode
after publishing to play the app is crashing on some devices
i was never able to reproduce the crash on my device
i was able to put my hand on one devices the app is crashing on (galaxy s7 edge)
here is crash log
the weird thing is that installing the same app with b4a bridge it will work perfectly
while uploading the exact same apk to google play store will case a crash on these devices !!
starter service code
java code
here is the app link to google play
any help is highly appreciated
after publishing to play the app is crashing on some devices
Today, 11:28 AM on app version 25
Huawei HUAWEI Y7 Prime 2018 (HWLDN-Q), Android 8.0
Report 1 of 3
java.lang.RuntimeException:
at anywheresoftware.b4a.BA.parseBoolean (BA.java:612)
at anywheresoftware.b4a.BA.ObjectToBoolean (BA.java:682)
at com.beisat.android.starter._service_create (starter.java:205)
at java.lang.reflect.Method.invoke (Native Method)
at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:196)
at anywheresoftware.b4a.BA.raiseEvent (BA.java:176)
at com.beisat.android.starter.onCreate (starter.java:56)
at android.app.ActivityThread.handleCreateService (ActivityThread.java:3967)
at android.app.ActivityThread.-wrap5 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2092)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7529)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)
i was never able to reproduce the crash on my device
i was able to put my hand on one devices the app is crashing on (galaxy s7 edge)
here is crash log
*** Service (starter) Create ***
starter_service_create (java line: 205)
java.lang.RuntimeException: Cannot parse: null as boolean
at anywheresoftware.b4a.BA.parseBoolean(BA.java:612)
at anywheresoftware.b4a.BA.ObjectToBoolean(BA.java:682)
at com.beisat.android.starter._service_create(starter.java:205)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at com.beisat.android.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3544)
at android.app.ActivityThread.-wrap4(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1786)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
the weird thing is that installing the same app with b4a bridge it will work perfectly
while uploading the exact same apk to google play store will case a crash on these devices !!
starter service code
B4X:
#Region Service Attributes
#StartAtBoot: False
#ExcludeFromLibrary: 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.
Dim language As String
Dim config, translation As Map
Dim night_mode As Boolean
End Sub
Sub Service_Create
'This is the program entry point.
'This is a good place to load resources that are not specific to a single activity.
config.Initialize
translation.Initialize
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
'gets or sets the app language
If File.Exists(File.DirInternal, "config.map") Then
config = File.ReadMap(File.DirInternal, "config.map")
language = config.Get("lang")
night_mode = config.Get("night_mode")
Else 'if config file not found
If Get_Language.Contains("ar") Then
language = "ar"
Else
language = "en"
End If
config.Put("lang", language)
config.Put("night_mode", False)
File.WriteMap(File.DirInternal, "config.map", config)
End If
translation = File.ReadMap(File.DirAssets, "translation.lang")
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 String) As Boolean
Return True
End Sub
Sub Service_Destroy
End Sub
java code
B4X:
public static String _service_create() throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "service_create", false))
{return ((String) Debug.delegate(processBA, "service_create", null));}
RDebugUtils.currentLine=6029312;
//BA.debugLineNum = 6029312;BA.debugLine="Sub Service_Create";
RDebugUtils.currentLine=6029315;
//BA.debugLineNum = 6029315;BA.debugLine="config.Initialize";
_config.Initialize();
RDebugUtils.currentLine=6029316;
//BA.debugLineNum = 6029316;BA.debugLine="translation.Initialize";
_translation.Initialize();
RDebugUtils.currentLine=6029318;
//BA.debugLineNum = 6029318;BA.debugLine="CallSubDelayed(FirebaseMessaging, \"SubscribeToTop";
anywheresoftware.b4a.keywords.Common.CallSubDelayed(processBA,(Object)(mostCurrent._firebasemessaging.getObject()),"SubscribeToTopics");
RDebugUtils.currentLine=6029321;
//BA.debugLineNum = 6029321;BA.debugLine="If File.Exists(File.DirInternal, \"config.map\") Th";
if (anywheresoftware.b4a.keywords.Common.File.Exists(anywheresoftware.b4a.keywords.Common.File.getDirInternal(),"config.map")) {
RDebugUtils.currentLine=6029322;
//BA.debugLineNum = 6029322;BA.debugLine="config = File.ReadMap(File.DirInternal, \"config.";
_config = anywheresoftware.b4a.keywords.Common.File.ReadMap(anywheresoftware.b4a.keywords.Common.File.getDirInternal(),"config.map");
RDebugUtils.currentLine=6029323;
//BA.debugLineNum = 6029323;BA.debugLine="language = config.Get(\"lang\")";
_language = BA.ObjectToString(_config.Get((Object)("lang")));
RDebugUtils.currentLine=6029324;
//BA.debugLineNum = 6029324;BA.debugLine="night_mode = config.Get(\"night_mode\")";
_night_mode = BA.ObjectToBoolean(_config.Get((Object)("night_mode")));
}else {
RDebugUtils.currentLine=6029326;
//BA.debugLineNum = 6029326;BA.debugLine="If Get_Language.Contains(\"ar\") Then";
if (_get_language().contains("ar")) {
RDebugUtils.currentLine=6029327;
//BA.debugLineNum = 6029327;BA.debugLine="language = \"ar\"";
_language = "ar";
}else {
RDebugUtils.currentLine=6029329;
//BA.debugLineNum = 6029329;BA.debugLine="language = \"en\"";
_language = "en";
};
RDebugUtils.currentLine=6029331;
//BA.debugLineNum = 6029331;BA.debugLine="config.Put(\"lang\", language)";
_config.Put((Object)("lang"),(Object)(_language));
RDebugUtils.currentLine=6029333;
//BA.debugLineNum = 6029333;BA.debugLine="config.Put(\"night_mode\", False)";
_config.Put((Object)("night_mode"),(Object)(anywheresoftware.b4a.keywords.Common.False));
RDebugUtils.currentLine=6029334;
//BA.debugLineNum = 6029334;BA.debugLine="File.WriteMap(File.DirInternal, \"config.map\", co";
anywheresoftware.b4a.keywords.Common.File.WriteMap(anywheresoftware.b4a.keywords.Common.File.getDirInternal(),"config.map",_config);
};
RDebugUtils.currentLine=6029337;
//BA.debugLineNum = 6029337;BA.debugLine="translation = File.ReadMap(File.DirAssets, \"trans";
_translation = anywheresoftware.b4a.keywords.Common.File.ReadMap(anywheresoftware.b4a.keywords.Common.File.getDirAssets(),"translation.lang");
RDebugUtils.currentLine=6029339;
//BA.debugLineNum = 6029339;BA.debugLine="End Sub";
return "";
}
here is the app link to google play
Beisat Online Fashion Shopping - Apps on Google Play
Beisat is a leading in online selling for women's, men's and children's fashion
play.google.com
any help is highly appreciated
Last edited: