B4A Library [Library] Advanced Notification

barx

Well-Known Member
Licensed User
Longtime User
The library contains a typo.

B4X:
an.Icon("NotificationIcon")

Should be in the format of

B4X:
an.Icon = "NotificationIcon"

I will update the tooltip text when I get a couple of minutes. The functionality is working fine.

Thanks @NJDude
 

barx

Well-Known Member
Licensed User
Longtime User
Updated to V1.2

See First Post

Thanks
 

barx

Well-Known Member
Licensed User
Longtime User
As usual, you are right. I'm really slacking at this these days lol.

Should be sorted now.
 

Amalkotey

Active Member
Licensed User
Longtime User
@barx:

Both the icon as also is the text not displayed. The library version is specified when B4A with 1.11. Where can I find the version 1.2 because?

B4X:
If AdvNotification.IsInitialized = False Then
   AdvNotification.Initialize
   AdvNotification.Icon = "icon"
   AdvNotification.SetInfo2("Test", Global.cMessage, "True", Main)
   AdvNotification.Sound = False
   AdvNotification.Vibrate = False
End If
 

Amalkotey

Active Member
Licensed User
Longtime User
The Lib is attached to the first post.

The zip file in post 1 contains the version 1.0 and in post 6, you can find the version 1.11. This shows me in B4A.
 

barx

Well-Known Member
Licensed User
Longtime User
The Zip in post #1 originally contained v1.0, but I edited the post and updated it to latest v1.20.

I have just downloaded the new zip and can confirm it is v1.2
 

cmweb

Active Member
Licensed User
Longtime User
Hi,

your library is very interesting...

Would it be possible to add a feature to not only use images from objects/res/drawable folder, but also to use custom images during runtime as icon for the notification?

That would be a *great* feature...

Best regards,

Carsten
 

Amalkotey

Active Member
Licensed User
Longtime User
The Zip in post #1 originally contained v1.0, but I edited the post and updated it to latest v1.20.

I have just downloaded the new zip and can confirm it is v1.2

@barx:

Ok, now, I could download the version 1.2
 

NeoTechni

Well-Known Member
Licensed User
Longtime User

Thats what I came here to ask for.

Also, what about progress bars?
 

barx

Well-Known Member
Licensed User
Longtime User
Unfortunately the requested image feature is not supported and there is no way to implement it.

As for progress bars, the original model for notifications doesn't support progress bars. This is one reason the Custom Notification library was made.

Later versions of android support a new model called Notification Builder. This DOES support progress bars but only in the later versions. HoneyComb onwards I think.

I, personally am working on a non android project at the moment. Once complete I will probably have a go at a Notification Builder implementation. Or maybe someone else will do it before I get round to it...
 

Inman

Well-Known Member
Licensed User
Longtime User

Remember this post of mine from Custom Notification Library thread? Now it is happening to Advanced Notification as well.

Did you make any changes regarding this in version 1.2?
 

Inman

Well-Known Member
Licensed User
Longtime User
Remember this post of mine from Custom Notification Library thread? Now it is happening to Advanced Notification as well.

Did you make any changes regarding this in version 1.2?

With the help of barx I figured out this issue. It was because I used SetIcon() after SetInfo(). I just changed the order of the statements and now it works great.

I think it will be better to give SetInfo right before Notify(), just to be on the safe side.
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
Problem with insistent?

Thanks for a great library but I've encountered a couple of problems, the first was that I was unable to get the notification to show at all but I've solved this myself as it was due to me not assiging an icon. As per the default B4A notifier object, the icon is NOT optional and must be set, maybe this could be given a mention on you're first post?

Now with my notification working I have been unable to make it insistent. Thats not to say that I haven't had it work at all, as I have, but it seems very intermittent as to whether the notification continues to vibrate the phone and make a sound until opened. I've tried declaring the an.Insistent=True at different lines in relation to the other settings but it appears to make no diffference.

This needs to work reliably as my application is designed to run as a service that monitors incoming messages, if a message contains the word "Emergency" then the phone needs to notify the user immediately as they will be required to react ASAP.

I attempted to attach my work in progress but our company policy is preventing me from doing so, but if required then I can do so from home later. I will continue to work toward a solution using another service module. I've tested on two phones up to now, an LG Optimus GT540 (android 2.1) and a HTC Wildfire S (android 2.3.5). My app will be used as a "Lone Working" solution for the company I work for, it will not be released to market.

Kind regards,
RandomCoder
 

SiriusDG

Member
Licensed User
Longtime User
A few questions

Hi, great library, just started using it this morning. I have a few questions. First, I set icon="icon", and in the notification bar it is good, but in the drop down window pane, the icon is not scaling, and since the base image is larger than the actual display view, I end up seeing about 1/4 of the icon very up close. Is there something I am supposed to do to fix this, or do I have to create a different sized icon?

Second (and this may not be your issue at all) but when it plays the custom sound, the volume is very faint... does the library itself have any way to scale the volume for it's notifications, or is that all Android OS level?

Thanx!!

David
 

barx

Well-Known Member
Licensed User
Longtime User
Thanks to everyone that has used this lib and found it useful.

This library has now been deprecated and all things notification will now happen with my new library.
 

MarcWinter

New Member
Licensed User
Longtime User
Is there any way to access a sound-file that has been included with the project via the files-tab and thus been placed in the android_asset path?

an.SetCustomSound("file:///android_asset/et-voila.mp3")​

doesn't work (no sound played).

Thanks,

Marc
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…