Android Question Log Issue

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

I am using B4A 3.00 and using the latest B4A-Bridge from the Google Play Store (v2.09).

When I use code like:

Main Activity:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   Log("hello")
End Sub

It will log it 2 times in the Log in the IDE.

I am not sure if my app is now running twice some how or if it is logging everything 2 times.
This also happened even before the new B4A-Bridge update that just got pushed to my phone.

I am running the above on Android 4.1.2 using a Samsung S2 (GT-I9100)
Running the same code on my Sony Xperia Z (C6603) on Android 4.2.2 it doesn't log everything 2 times and works like normal.
(I am doing all the above in debug mode in B4A 3.00)

Is this a bug in the B4A-Bridge/IDE or is it my app that is running 2 times some how ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Your app is not running twice.

Your Samsung device doesn't "behave" as it should be. Starting from Android 4.1 it is not possible to read the logs of other apps. So B4A-Bridge should only see its own logs. To workaround this issue other B4A apps, in debug mode only, send their logs to B4A-Bridge over a UDP connection.

The expected result is that you will see the log messages once. On some devices the new Android 4.1 limitation was not implemented correctly and the result is that you see the messages twice.
 
Upvote 0
Top