Error Reporting

salmander

Active Member
Licensed User
Longtime User
Hi everyone,

I am trying to implement a feature in my app where, all the errors are logged and then sent to the server. I searched the forum but couldn't find anything on the subject. My idea is, when an error occurs, it saves it to a text file, and then post it to the server when there is an active internet connection.

Can anyone point me to the right direction please?

Thanks
 
Last edited:

salmander

Active Member
Licensed User
Longtime User
Thanks Erel. But what method shall I use to log the error messages? Will LogCat method work or some other method? If logcat is the way, then where should I start/stop the logcat? If I put logcat start in every activity's resume event, and stop it on pause event, will it affect the performance of my app or device? Any tips please?

Cheers.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Hi.

I've just been trying to create an ACRA library but haven't got it to work yet.

I managed to successfully add it to a native java Android app - the app raises an exception and sends a crash report to my Google Docs.
Google Docs is set to notify me when a crash report is received - all very handy.

BUT i cannot get ACRA to work in B4A, the library compiles and i created a simple app with a single button.
A click on the button raises an exception but no crash report is sent.

I'll continue to try and get it to work.

Martin.
 
Upvote 0

salmander

Active Member
Licensed User
Longtime User
wow...that would be really useful.
As of now, is there a solution within B4A though?

Good luck Martin.

Cheers
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
I think your only option would be to enclose all code with try catch blocks - so you could catch and save all exceptions.

That could be a lot of work and also add a lot of bloat to your app.

ACRA works at a higher level - it attaches itself to the Android Application class and does it's magic within the Application class.

Martin.
 
Upvote 0

salmander

Active Member
Licensed User
Longtime User
Ya I know what you are saying. That is my primary concern at this point. Even though some of the code is already in Try Catch block, but still if I add that in every function, its just too much hassle, and I am sure not the right way. Anyway, thanks for your reply... I am looking forward to try your library soon ;)

Good Luck mate

Cheers
 
Upvote 0

salmander

Active Member
Licensed User
Longtime User
Good point Erel.

I will wait for martins Lib for a bit. If that doesn't come out soon, then, I will go this way.

Cheers
 
Upvote 0
Top