B4A Library Notification Builder Library.

Raywingit

Member
Licensed User
Longtime User
Vibrate problem solved by feeding in a zero calorie vibrate command.

nb.CustomVibrate = Array As Long(0, 0, 0, 0)
 

panagiotisden2

Active Member
Licensed User
Longtime User
Hello,
Is it possible to add some custom text in the time position? I want to write something like "3 days ago"

And is it possible to detect which notification (Id) the user swiped away?

Thanks in advance and thanks for this great library
 

barx

Well-Known Member
Licensed User
Longtime User
I don't believe you can replace the time text. You would have to hide the time and use ContentInfo (Closest I think you can get).

As for known which notification has been tapped, see the tag system
 

Philip Prins

Active Member
Licensed User
Longtime User
Hello ,

I cannot find the support 4 .jar.
Where can i find it , i looked in D:\Android\extras\android

Regards,
Philip
 

Philip Prins

Active Member
Licensed User
Longtime User
Yes i found the solution ,change the manifest of the library to
HTML:
<dependsOn>com.android.support:support-v4</dependsOn>
    <dependsOn>com.android.support:support-v4</dependsOn>
    <dependsOn>com.android.support:support-v4</dependsOn>
    <dependsOn>com.android.support:support-v4</dependsOn>
    <dependsOn>com.android.support:support-v4</dependsOn>
    <dependsOn>com.android.support:support-v4</dependsOn>
 

DonManfred

Expert
Licensed User
Longtime User
you don't really need to edit the library xml.

It is enough to add
So, adding a additionaljar has a higher priority than the dependson in the library xml?

Out of curiosity: is it not better to edit the library xml (if you do it right)?
I mean. if editing the xml i do not need to remind myself to add
B4X:
#AdditionalJar: com.android.support:support-v4
to any new project. So i´m already save if i use the lib in a new project.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
So, adding a additionaljar has a higher priority than the dependson in the library xml?
Not exactly. Starting from B4A v6 the IDE will prefer the maven repositories over the old jar files for the most common dependencies. It will only do it if there is at least one maven type dependency.

Practically by adding the dependency of com.android.support:support-v4 you remove the dependency of android-support-v4.jar.

There was a bug in v6.00 where the IDE has still checked for the existence of the jar file. This bug was fixed.

is it not better to edit the library xml (if you do it right)?
This is a matter of choice. Personally I prefer to add it in the code.
 

panagiotisden2

Active Member
Licensed User
Longtime User
I don't believe you can replace the time text. You would have to hide the time and use ContentInfo (Closest I think you can get).

As for known which notification has been tapped, see the tag system

no, i want to know which notification the user closed(swiped right or left it to hide it)
 

barx

Well-Known Member
Licensed User
Longtime User
no, i want to know which notification the user closed(swiped right or left it to hide it)
Oh ok.

Then I believe what you want is a combination of tags and setting a DeleteIntent...
 

barx

Well-Known Member
Licensed User
Longtime User
So, what do i need to do? just remove the DependsOn and document adding the dependancy to the manifest?
 

uniplan

Active Member
Licensed User
Longtime User
I used SetActivity method to Set the activity that will be launched when the Notification is tapped.

In particular when the notification is pressed and my app is in the background. I want to resume it.

I have no problem doing this with SetActivity.

But I would like to know if I can understand in the event activity_resume if the same has been generated when the notification is tapped or it is generated by an other event.


It is possible?

How?

Thanks.


 

DickD

Active Member
Licensed User
Notification Builder Library. Now With JellyBean style expanding notifications
The installation instructions for this library don't work. I am using B4A v6.50 so added the line you indicate (#additionaljar: com.android.support:support-v4) into the manifest file. However I get the following error when compiling my project: "Cannot find: C:\Program Files (x86)\Anywhere Software\Basic4android\libraries\android-support-v4.jar". I tried to add the android-support-v4.jar to the additional library folder but can not find this file anywhere. Apparently the latest version of Android SDK no longer uses this file.
 

Dave O

Well-Known Member
Licensed User
Longtime User
I tried to add the android-support-v4.jar to the additional library folder but can not find this file anywhere. Apparently the latest version of Android SDK no longer uses this file.

In the Android SDK Manager, at the bottom under Extras, do you have the "Android Support Library" installed?

I'm not sure if my android-support-v4.jar is from that or from an earlier manual copy/paste-file action I took. Mine is dated Apr 26 2016, if that helps.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…