Ongoing notification?

JonPM

Well-Known Member
Licensed User
Longtime User
Just wondering if it's possible with B4A to create an ongoing notification bar with multiple icons that launch different activities (ie open browser, launch email app, etc). So like a shortcut bar but one that resides in the notification area. It would also need to start automatically if the phone it's restarted. Is this currently possible?

Sent from my DROIDX
 

JonPM

Well-Known Member
Licensed User
Longtime User
It is possible to do it. You will need to create several notification objects. One for each icon.

To start your application after boot you should mark Project - Service properties - Start at boot.

Kind of a late reply...

But can the notification icons be lined up horizontally? Or only vertically.
 
Upvote 0

JonPM

Well-Known Member
Licensed User
Longtime User
This is what I am describing. A horizontal graphical notification in which there are different buttons to toggle different events. Possible?
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
I dont know about this particular example (whether is is an actual notification or not) but my SGS had some buttons on the music player notification.

This is done through remote views, and I just noticed that B4A does support remote views albeit for widgets only.

Now, if it is possible to get the 'contentview' of the notification via reflection, it may indeed be possible to do something like this.

Nevertheless it will require careful handling.
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
Okay I tried to make a library to set the contentview of a notification, but it does not work.
There are probably too many wrappers to circumvent.
Its not such a small job as I thought it would be. Its a big task.
I know Erel will be a bit angry at how I am obliterating his code :(


Nevertheless here is the code I copied around with:
EDIT: Removed
 
Last edited:
Upvote 0

JonPM

Well-Known Member
Licensed User
Longtime User
Thanks for trying. I wish I could help but this might as well be a foreign language to me. Anyone?

Sent from my DROIDX
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
@thedesolatesoul, unless I posted this code in another thread (or gave explicit permission), you should not decompile the code and post it.
Hi Erel,
I apologize. I did realise I was on the border with that one, but got a bit over-enthusiastic. No malice intended. Honest to god, :sign0013::sign0013::sign0013:
I will be more careful next time.
 
Upvote 0
Top