Are you sure that this error is related to your app? The filtered logs doesn't hide "critical" level messages.
Did your app crash?
Actually I got a very strange problem, but not sure if my application did crash or not. I will have to go to very details with hope that other members can benefit from this topic / discussion.
Background:
- My app has one Activity, one Code module and one Service (SMS intent with broadcastreceiver).
- If I run it using / thru B4A debug or Release, the application can start successfully (I can intercept SMS and other functions work well). Being running "completely" like this, I checked and see it consumes around 9 - 13Mb (on Galaxy Note II). The reason why I did check app consumed memory is because of the Problem I describe below.
Problem:
- If I switch off the phone and power it on again, my app is expected to restart automatically (set StartAtBoot = True), and in reality it does restart with its notification icon normally. However, now I cannot intercept SMS anymore. Checked the logs,
I don't see my Main Activity created complety. Checked the Running Task list, however, I still can see that my app is there, but now it
consumes only 3 - 5Mb. This gives me a guess that only the Service is running (without Main activity)!!!
- Checked the filter log I can see there is an error as described in my previous post, but having spent 3 days I cannot find out the cause. But I discovered that if I run my app again "
manually" (by clicking on its icon in the app drawer), it comes back to work perfectly.
My (temporary) Solution:
- So I guessed that when auto restaring,
my app is running only with its Service, but without the Main activity. As a solution, I work around it by adding "StartActivity(Main)" in the Sub Service_Create.
- My problem (with the work around above) can be solved "artificially", but I never know why it happened.
Codes:
My Main activity (I simplified for easier reading):
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout1")
'// Loading the Settings
If FirstTime Then
SettingsManager.Initialize ' It is a Map
If File.Exists(File.DirInternal,"Settings.txt") = True Then
Manager = File.ReadMap(File.DirInternal, "Settings.txt")
Else
SetDefaults
End If
Update_Settings("SMS")
StartService(Interceptor)
End If
'// The codes for setting the layout of Views are here
'//Load the Sub that will call the panel with login password
Load_Password
End Sub
And My Service (again, it is simplified):
Sub Service_Create
If ContactsMap.IsInitialized = False Then
ContactsMap.Initialize
BlockersMap.Initialize
Codes.GetBlockMap '// Codes is my Code Module
Codes.GetContactMap
Codes.Reset_Notification(False)
Broadcast.Initialize("BroadcastReceiver")
ClearList.Initialize
Timer1.Initialize("Timer1", 1000) ' 1000 = 1 second
OS.Initialize("") '// OS is OperatingSystem
End If
Timer1.Enabled = False
Service.StartForeground(123456, n1)
StartActivity(Main) '<-- I added this as a workaround, and my app can be autostarted and work well now.
End Sub
Please let me know if you need me to post also the unfiltered log related to this error message.
Thank you very much.
Rgds, bsnqt