B4A Library DebugOverlay v1.0.0 (show the overlay even on desktop when called from a service)

This is a wrapper for this Github project.

A quote from the Github project site:
A logcat alike overlay to display log messages in your app as independent overlay.
Typically in android you would log some app internals for debugging puropose by using Log.d(). However, sometimes you may need to display that logging messages right on the screen to make them visible for non developers that have to verify certain app internals, like tracking.


DebugOverlay
Author:
DonManfred <[email protected]>
Version: 1.01
  • DebugOverlay
    Methods:
    • Initialize (EventName As String, height As Int)
    • IsInitialized As Boolean
    • clear
    • enqueueMessage (fortmatedMsg As String, paramters() As Object)
      Enqueue a message. Will be dispatched directly to the {@link DebugOverlayService} if service
      is already bound or enqueued into a message queue and be dispatched once the {@link
      DebugOverlayService} is connected
      msg: The message to dispatch
    • log (msg As String)

687474703a2f2f68616e6e6573646f72666d616e6e2e636f6d2f696d616765732f64656275676f7665726c61792e706e67



If you use the DebugOverlay from a service then you can show the overlay even if your app is in background. Or you are on the "Desktop"... As long as the Overlay is initialized once it can reappear on a new output.

See a Snapshot from my Devicedesktop

DebugOverlay001.png



NOTE: The project is discontinued. There is a new (better!) alternative available in the pro-bundle from @Informatix ... See here for more infos.
 

Attachments

  • DebugOverlayEx.zip
    11.9 KB · Views: 385
  • libDebugOverlayV1.0.0.zip
    11 KB · Views: 341
  • libDebugOverlayV1.0.1.zip
    11.6 KB · Views: 355
Last edited:

Informatix

Expert
Licensed User
Longtime User
I did not understand the benefit over logging these messages until I read the readme of the github project. Here it is:
Typically in android you would log some app internals for debugging puropose by using Log.d(). However, sometimes you may need to display that logging messages right on the screen to make them visible for non developers that have to verify certain app internals, like tracking.
I doubt that I will demand to users to debug for me but I understand now the usefulness.
 

DonManfred

Expert
Licensed User
Longtime User
Yes. But yesterday i did something that could bring some problems..

I manually stopped the service (which is used for the overlay and which is added to manifest) with the taskmanager ...
Seems that the library does not work anymore now. URGS...
The additional service will not run again it seems.



I´m investigating... But i think i ned to open a new thread for it
 

DonManfred

Expert
Licensed User
Longtime User
I´m investigating...
Got it working again. For the lib to get running i initial used a fixed height hardcoded.

Yesterday i wanted to try to make it flexible (changleable by code)...

I found out that the problem was not that the service was not running.
The problem was that the calculated height of the view was 0!

So, the view WAS VISIBLE; just with a height of 0 :D
 

aidymp

Well-Known Member
Licensed User
Longtime User
This can be very useful for developers who use B4A-Bridge. Starting from Android 4.1 B4A-Bridge can only show the logs when running in debug mode.

With this library the developer can see the logs in release mode as well.

That explains my total lack of debug messages! in the end I used USB debugging, but this is going to help me a lot!!!

Thank you @DonManfred

Aidy
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Can we have the ability to customize the "Donmanfred present DebugOverlay" message and the Overlay height ?
Thanks in advance
 

Jaames

Active Member
Licensed User
Longtime User
Nice one, it can be useful in many situations where we can't use standard debugging and logging. Thanks !
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Sorry for asking a lot .
Can we have source code ? It seems I need to get more customizations :)
Thanks in advance
 

demasi

Active Member
Licensed User
Longtime User
Fantastic, DonManfred! Very useful.
I was looking for something like this.
Thank you very much.
 

demasi

Active Member
Licensed User
Longtime User
Is there a way to include a set visible atribute of the overlay window?
I think it will be nice to use, lets say, a toggle button to show or hide the overlay.
Sometimes the overlay blocks some application's controls.
 

demasi

Active Member
Licensed User
Longtime User
@DonManfred I tried the other lib, but it works different of yours.
Wiuth your lib we can just use as a log window, we don´t need to create views, listviews, etc. It not adds more code to our apps.
The only thing I miss in your lib its a show and hide method.
I know you stopped the development, but can´t you just add this?
Unfortunately my java knowledge is not enough to create a wrapper or change the code.
I think this will be a good contribution for the community.
Thank you.
 
Top