Android Question B4A when it is in begug no longer shows the log

emexes

Expert
Licensed User
Still No log ..What should I do to fix it?
Do you have any old/spare Android phones nearby? Or friends or family with an old/spare phone? You do NOT need a working a SIM phone account. Usually don't even need a SIM in the phone.

Or: can you buy a cheap prepaid phone at a local shop? Here in Australia, I have regularly picked up phones for under $30 (EUR 20). They have small screens (well... 4") and are locked to a network, but for the purpose of B4A development, this is no problem (unless your app is something to do with phone functions, I guess).

A last resort is to install B4A-Bridge on a friend/family phone and run a short app that generates some logs, just to confirm that the issue is something to do with the phone. Problem with doing this is: everything that evermore goes wrong with that phone will be your fault ;-)

Also, it won't fix the log problem with your original phone, but it does give confidence that the B4A setup is still working, and thus not to give up.

I still have not worked out precisely what triggers the issue, or fixes it, but so far it has eventually righted itself. I understand that it is mighty irritating the way it happens just when you need logs the most, though, so... I feel your pain.

:)
 
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
Just for another idea, notice at the top of your app, the line under Region Project attributes:
The line is displayed: #VersionCode: (your number)
You might try increasing your number to a larger integer if it's a newer project than others. I had that problem before and now I keep track of my highest previous VersionCode number and increase it with each new project, especially if I have some problem.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Although I have read your thread completely I don't remember if you have this (below) in your code. The portion that I'm referring to is:
#BridgeLogger: True (which is near the bottom).

B4X:
#Region  Project Attributes
    #ApplicationLabel: AreaCalc
    #VersionCode:21
    #VersionName:
 
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: True
    #IncludeTitle: True
    #BridgeLogger: True

#End Region

One last suggestion; I have come to the point where whenever I make one of these code change attempts and have a problem, I consider clicking: project>build configurations (and add a character or more than one) for a new package name). This suggestion is just a shot in the dark. You can always change it back to the original package name the same way (I think). Maybe it would be safest to copy and paste the entire code and then change that new experimental package name as I suggested.
 
Last edited:
Upvote 0

Angelo Messina

Active Member
Licensed User
Longtime User
I tried this too, but nothing to do. I tried with an old Android phone and the log appeared. but only with this device.
 
Upvote 0

emexes

Expert
Licensed User
I tried this too, but nothing to do. I tried with an old Android phone and the log appeared. but only with this device.
This is good. If I understand correctly:

- You have more than one Android phone.
- The log does not work on one of the phones.
- The log does work on a different phone.

This indicates that the PC/IDE side of the connection is ok. Not 100% guarantee, but much better than if you did not have a working setup to test against.

I was wondering if you'd tried Shelby's version and build-name changes, but... now I see, yes you have. Spewin! Worth a shot, though.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
I tried this too, but nothing to do. I tried with an old Android phone and the log appeared. but only with this device.

On the telephone that is not working properly

Delete all B4A-Bridge data by:

Go to setting menu
  • Go to apps option
  • Uninstall the app
  • Choose the B4A-Bridge app
  • Choose memory option for B4A-Bridge
  • Under Data the option Delete data
In B4A, press <ctrl-P> for Clean up project

If it doesn't work, it might be a stupid question, but are you sure that the developer mode is on on the phone (could be turned off with a system update).
 
Upvote 0

Angelo Messina

Active Member
Licensed User
Longtime User
I removed the filter selection.And here's what happens to the log

Logger connesso a: Lenovo Lenovo TAB 2 A10-70L
--------- beginning of main
getServiceInstance failed!
readlink('/proc/self/fd/22') failed:
Permission denied [fd=22]

warning: unable to get realpath for the library "libperfservicenative.so". Will use given name.Failed to get GED Log Buf, err(0)
 
Upvote 0

emexes

Expert
Licensed User
Another random thought: make sure the phone has only one connection to the internet.

ie put it into Flight Mode, then switch phone off and on, make sure still in Flight Mode, then connect to wifi anyway.

And/or find the bit in Settings to disable mobile data.

Or even remove the SIM.
 
Upvote 0

cliv

Member
Licensed User
Longtime User
I removed the filter selection.And here's what happens to the log

B4X:
Logger connected to:  Lenovo Lenovo TAB 2 A10-70L
--------- beginning of main
getServiceInstance failed!
readlink('/proc/self/fd/22') failed: Permission denied [fd=22]
warning: unable to get realpath for the library "libperfservicenative.so". Will use given name.
Failed to get GED Log Buf, err(0)
[getaddrinfo]: hostname=192.168.0.2; servname=(null); netid=0; mark=0
[getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0


Same message error SAME TABLET Lenovo TAB2 A10-70L Android 6
 
Upvote 0
Top