B4A Library Notification Builder Library.

Discussion in 'Additional libraries, classes and official updates' started by barx, Mar 17, 2013.

  1. Raywingit

    Raywingit Member Licensed User

    Update: Extended my images to watch face, but it arrives with a half screen of white, like a blob of gum stuck on it. (the notification strait-jacket)
    I get a good-looking display once the notification is swiped off left, BUT the screen fades out after 10 seconds.
    If I change the background by sending another BigPicture notification during 10 seconds, the image gets updated but the phone buzzes or beeps every time.
    Google has pulled the OnGoingEvent setting, which might have done the trick.
    Any ideas on telling the LG G watch not to fall into half-awake mode?
     
  2. Raywingit

    Raywingit Member Licensed User

    Vibrate problem solved by feeding in a zero calorie vibrate command.

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

    panagiotisden2 Active Member Licensed 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 :)
     
  4. barx

    barx Well-Known Member Licensed 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 ;)
     
  5. Philip Prins

    Philip Prins Active Member Licensed User

    Hello ,

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

    Regards,
    Philip
     
  6. DonManfred

    DonManfred Expert Licensed User

    Are you using b4a 6+?
     
  7. Philip Prins

    Philip Prins Active Member Licensed 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 likes this.
  8. DonManfred

    DonManfred Expert Licensed User

    Note that only one line of these are needed
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    BTW, you don't really need to edit the library xml.

    It is enough to add to your code:
    Code:
    #AdditionalJar: com.android.support:support-v4
     
  10. DonManfred

    DonManfred Expert Licensed User

    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
    Code:
    #AdditionalJar: com.android.support:support-v4
    to any new project. So i´m already save if i use the lib in a new project.
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    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.

    This is a matter of choice. Personally I prefer to add it in the code.
     
  12. DonManfred

    DonManfred Expert Licensed User

    I see. Thank you for your answer! ;)
     
  13. panagiotisden2

    panagiotisden2 Active Member Licensed User

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

    barx Well-Known Member Licensed User

    Oh ok.

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

    barx Well-Known Member Licensed User

    So, what do i need to do? just remove the DependsOn and document adding the dependancy to the manifest?
     
  16. DonManfred

    DonManfred Expert Licensed User

    yes.
    no
    Add
    Code:
    #AdditionalJar: com.android.support:support-v4
    to your main activity
     
  17. uniplan

    uniplan Active Member Licensed 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.


     
  18. DickD

    DickD Active Member Licensed User

    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.
     
  19. panagiotisden2

    panagiotisden2 Active Member Licensed User

    try with v7
     
  20. DickD

    DickD Active Member Licensed User

    V7 of what? That's not a versoin of B4A, Android Studio or Sdk. I'm using Java v8.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice