Android Question [solved] B4A 8.0 - All apps are now crashing

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Erel,

I just installed the new version of B4A and my apps are crashing. Can I get a copy of the previous version so I can re-compile them.

Thanks.
 

johndb

Active Member
Licensed User
Longtime User
Hi Erel,

I just installed the new version of B4A and my apps are crashing. Can I get a copy of the previous version so I can re-compile them.

Thanks.
What is causing your crashes? We need details in order to help you.
I have compiled several of my apps with the new version without a single problem.
Also, don't direct your question to a single user.
 
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
Hi John,

It crashes all of my apps that use a service. I just re-compiled with version 8.0 on one of my apps and as soon as I started the app it crashed with this message:

B4X:
MyAppName has stopped.

I tried this with my other apps and they all did the same thing.

Looks like version 8.0 is not compatible with any of the apps. Looks like I need to get a copy of the previous version so I can re-compile all of the apps.
 
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

I noticed it's crashing on this statement:
B4X:
Service.StartForeground( 8, nNotify)

Looks like I can't start the service in the foreground. I thought starting a service in the foreground will stop it from pre-maturely being killed by Android. I will keep this statement commented out and see if anything else crashes the app.
 
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

The app compiles and runs now so I need to see if it gets killed by Android because the service is scheduled to wake up 5 times each day. I won't know until tomorrow at this same time. I will let you know if I don't need to run the service in the foreground.
 
Upvote 0

Claudio Oliveira

Active Member
Licensed User
Longtime User
You don't need to do it this way...
Please, spare some time and read Erel's tutorial I pointed out in post #4
It is totally related to the issue you're talking about, and will definitely help you solve it once and for good.
 
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Claudio,

I just implemented the coding into my app but found out I can't do notifications like the previous version let me.

This is what the notification code looks like:

B4X:
nNotify.SetInfo("My App Name", "This is my notification message.", "")
nNotify.Notify(2)

What should the coding look like for version 8.0 because it crashes my app? I had to comment out all of the notifications so the app will not crash.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Last edited:
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…