Android Question Crash, java.lang.IllegalStateException

mw71

Active Member
Licensed User
Longtime User
i have crash in the Log (Play Console):

java.lang.RuntimeException:
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3194)
at android.app.ActivityThread.-wrap17 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1672)
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:438)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)

Caused by: java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1521)
at android.app.ContextImpl.startService (ContextImpl.java:1477)
at android.content.ContextWrapper.startService (ContextWrapper.java:650)
at android.content.ContextWrapper.startService (ContextWrapper.java:650)
at de.udxsoft.udxlog.start_backup$start_backup_BR.onReceive (start_backup.java:16)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3187)

start_backup.java is context.startService(in); in:
B4X:
public class start_backup extends  android.app.Service{
    public static class start_backup_BR extends android.content.BroadcastReceiver {

        @Override
        public void onReceive(android.content.Context context, android.content.Intent intent) {
            android.content.Intent in = new android.content.Intent(context, start_backup.class);
            if (intent != null)
                in.putExtra("b4a_internal_intent", intent);
            context.startService(in);
        }

    }
there ist no BA.DebugLine....

- the File ist Compile with B4A 7.8
- the Service ist start with StartService or StartServiceAt

It is this "Problem"?: https://www.b4x.com/android/forum/threads/automatic-foreground-mode.90546/#post-574230
 

hookshy

Well-Known Member
Licensed User
Longtime User
have the same problems to all my apps , upgraded today to B4A v8.30
I have updated the target sdk and use runtimepermisions ...
Saveing the program to this new b4a version will solve the problem from first post ? ... just do not know what to do else
 
Upvote 0
Top