Android Studio logging

82 views
Skip to first unread message

jam...@fastlaneinnovations.com

unread,
Oct 17, 2016, 2:12:18 AM10/17/16
to CodenameOne Discussions
My app uses the old GUI builder and the Bluetooth CN1LIB. When I connect to Android Studio with a USB cable and use logcat, I don't get much information that is useful. I've tried using Log.p,Log.e,system.out,system.err, and I can't get any of these to show up.

When I build the example app with hand-coded GUI, I get messages from the Android Bluetooth manager about all of its actions, as well as anything I write with Log.p.

Is there a way I can enable this on the old GUI Builder?

Chen Fishbein

unread,
Oct 17, 2016, 2:52:14 AM10/17/16
to CodenameOne Discussions, jam...@fastlaneinnovations.com
Logging has nothing to do with the project type, I don't know why you are not seeing your log on this specific project but it should work just fine, check your filtering rules on the android monitor maybe some rule is hiding your logs

jam...@fastlaneinnovations.com

unread,
Oct 17, 2016, 9:58:37 PM10/17/16
to CodenameOne Discussions, jam...@fastlaneinnovations.com
I see that the problem is that there is nothing to filter by. The BTDemo app will have the main package name in the logcat entries, but on my app it is just a "?" In that area, which most every other process also has. I don't see anything to distinguish my app, and I don't know why it doesn't show the package name.

Shai Almog

unread,
Oct 17, 2016, 10:34:02 PM10/17/16
to CodenameOne Discussions, jam...@fastlaneinnovations.com
It should write the app name in the logcat. Does the demo have the app title filled in?

jam...@fastlaneinnovations.com

unread,
Oct 18, 2016, 11:21:53 AM10/18/16
to CodenameOne Discussions, jam...@fastlaneinnovations.com
The title is filled out. Here are some logcat snippets. It looks like I can still find the information in my app, but it's definitely not as convenient. All of the properties (Title, main class name, package name, etc) are filled out for both the BTDemo and my app, I don't really understand why it doesn't come through in the logs. I'll probably just create a Bluetooth filter so this isn't really going to be a big problem, I was just curious if I was doing something obviously wrong.

BTDemo app, all the BT activities are easy to see:
10-18 08:08:12.011 13124-13143/com.fastlaneinnovations.BTDemo D/OpenGLRenderer: CacheTexture 21 upload: x, y, width height = 0, 0, 512, 255
10-18 08:08:12.017 800-821/? V/WindowManager: findFocusedWindow: Found new focus @ 3 = Window{e09be4b u0 com.fastlaneinnovations.BTDemo/com.fastlaneinnovations.BTDemo.BTDemoStub}
10-18 08:08:12.032 800-1474/? V/WindowManager: findFocusedWindow: Found new focus @ 3 = Window{e09be4b u0 com.fastlaneinnovations.BTDemo/com.fastlaneinnovations.BTDemo.BTDemoStub}
10-18 08:08:12.070 13124-13142/com.fastlaneinnovations.BTDemo I/System.out: showKeyboard false
10-18 08:08:12.119 202-1635/? I/BufferQueueProducer: [com.fastlaneinnovations.BTDemo/com.fastlaneinnovations.BTDemo.BTDemoStub](this:0xb842aad0,id:1904,api:1,p:13124,c:202) new GraphicBuffer needed
10-18 08:08:12.121 13124-13143/com.fastlaneinnovations.BTDemo D/GraphicBuffer: register, handle(0xb8aca1a8) (w:480 h:800 s:480 f:0x1 u:0x000f02)
10-18 08:08:12.139 13124-13143/com.fastlaneinnovations.BTDemo D/OpenGLRenderer: CacheTexture 21 upload: x, y, width height = 0, 46, 512, 38
10-18 08:08:12.390 800-821/? D/ActivityManager: ACT-IDLE_NOW_MSG from windowsVisible() for idle: ActivityRecord{96d0dc8 u0 com.fastlaneinnovations.BTDemo/.BTDemoStub t657}
10-18 08:08:12.392 800-821/? V/WindowManager: findFocusedWindow: Found new focus @ 3 = Window{e09be4b u0 com.fastlaneinnovations.BTDemo/com.fastlaneinnovations.BTDemo.BTDemoStub}
10-18 08:08:23.449 202-1635/? I/BufferQueueProducer: [com.fastlaneinnovations.BTDemo/com.fastlaneinnovations.BTDemo.BTDemoStub](this:0xb842aad0,id:1904,api:1,p:13124,c:202) queueBuffer: fps=0.26 dur=11434.54 max=11024.79 min=153.40
10-18 08:08:23.474 13124-13142/com.fastlaneinnovations.BTDemo D/CN1BT: execute: write [{"characteristic":"2222","address":"C5:D9:9C:7B:03:22","value":"UlBNMzozMDAw","service":"2220"}]
10-18 08:08:23.474 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothAdapter: isEnabled
10-18 08:08:23.475 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.476 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.476 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.476 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.476 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.478 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothDevice: getName: name = TPO-1
10-18 08:08:23.479 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothGatt: writeCharacteristic() - uuid: 00002222-0000-1000-8000-00805f9b34fb
10-18 08:08:23.479 13124-13142/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.481 13124-13124/com.fastlaneinnovations.BTDemo D/SettingsInterface:  from settings cache , name = sound_effects_enabled , value = 0
10-18 08:08:23.576 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothGatt: onNotify() - Device=C5:D9:9C:7B:03:22 UUID=00002221-0000-1000-8000-00805f9b34fb srvcType=0 srvcInstId=0 charInstId=0
10-18 08:08:23.576 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.576 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.576 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.576 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.577 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.577 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.577 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.579 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: getName: name = TPO-1
10-18 08:08:23.580 13124-13136/com.fastlaneinnovations.BTDemo D/BTDemo: [Binder_1] 0:33:29,438 - Notification received: {"address":"C5:D9:9C:7B:03:22","name":"TPO-1","value":"T0s=","service":"2220","characteristic":"2221","status":"subscribedResult"}
10-18 08:08:23.582 13124-13136/com.fastlaneinnovations.BTDemo D/BTDemo: [Binder_1] 0:33:29,439 - The incoming message after decoding: OK
10-18 08:08:23.592 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothGatt: onCharacteristicWrite() - Device=C5:D9:9C:7B:03:22 UUID=00002222-0000-1000-8000-00805f9b34fb Status=0 srvcType=0 srvcInstId=0 charInstId=0
10-18 08:08:23.592 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.592 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.592 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.592 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.592 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.593 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.593 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: mAddress: C5:D9:9C:7B:03:22
10-18 08:08:23.595 13124-13136/com.fastlaneinnovations.BTDemo D/BluetoothDevice: getName: name = TPO-1
10-18 08:08:23.596 13124-13136/com.fastlaneinnovations.BTDemo D/BTDemo: [Binder_1] 0:33:29,453 - Hi message sent callback triggered.
10-18 08:08:23.621 13124-13143/com.fastlaneinnovations.BTDemo D/OpenGLRenderer: CacheTexture 21 upload: x, y, width height = 0, 115, 512, 45

Here is my app, also filtering by the app name, and while BT is connecting. Not much to see:
10-18 08:13:47.368 202-1635/? I/BufferQueueProducer: [com.fastlaneinnovations.rpcontrol/com.fastlaneinnovations.rpcontrol.RallyPacControlStub](this:0xb842f9c8,id:1909,api:1,p:13393,c:202) queueBuffer: fps=0.09 dur=22112.82 max=22028.03 min=84.79
10-18 08:13:47.381 13393-13406/? W/System.err:     at com.fastlaneinnovations.rpcontrol.c.a(Unknown Source)
10-18 08:13:47.381 13393-13406/? W/System.err:     at com.fastlaneinnovations.rpcontrol.c.b(Unknown Source)
10-18 08:13:47.415 800-810/? D/AppOps: noteOperation: allowing code 0 uid 10082 package com.fastlaneinnovations.rpcontrol
10-18 08:13:48.614 800-814/? D/AppOps: startOperation: allowing code 3 uid 10082 package com.fastlaneinnovations.rpcontrol
10-18 08:13:48.637 13393-13413/? W/System.err:     at com.fastlaneinnovations.rpcontrol.c.a(Unknown Source)
10-18 08:13:48.637 13393-13413/? W/System.err:     at com.fastlaneinnovations.rpcontrol.b.run(Unknown Source)
10-18 08:13:48.656 202-5352/? I/BufferQueueProducer: [com.fastlaneinnovations.rpcontrol/com.fastlaneinnovations.rpcontrol.RallyPacControlStub](this:0xb842f9c8,id:1909,api:1,p:13393,c:202) queueBuffer: fps=1.55 dur=1287.45 max=1203.41 min=84.04
10-18 08:13:49.306 13393-13414/? D/Posix: [Posix_connect Debug]Process com.fastlaneinnovations.rpcontrol :443
10-18 08:13:49.664 202-427/? I/BufferQueueProducer: [com.fastlaneinnovations.rpcontrol/com.fastlaneinnovations.rpcontrol.RallyPacControlStub](this:0xb842f9c8,id:1909,api:1,p:13393,c:202) queueBuffer: fps=54.56 dur=1008.04 max=33.27 min=8.13
10-18 08:13:51.700 202-427/? I/BufferQueueProducer: [com.fastlaneinnovations.rpcontrol/com.fastlaneinnovations.rpcontrol.RallyPacControlStub](this:0xb842f9c8,id:1909,api:1,p:13393,c:202) queueBuffer: fps=2.95 dur=2036.50 max=1218.99 min=16.75
10-18 08:13:52.706 202-1400/? I/BufferQueueProducer: [com.fastlaneinnovations.rpcontrol/com.fastlaneinnovations.rpcontrol.RallyPacControlStub](this:0xb842f9c8,id:1909,api:1,p:13393,c:202) queueBuffer: fps=54.67 dur=1006.02 max=31.61 min=9.61

Shai Almog

unread,
Oct 18, 2016, 10:14:25 PM10/18/16
to CodenameOne Discussions, jam...@fastlaneinnovations.com
Odd, Chen might have an idea.
Reply all
Reply to author
Forward
0 new messages