B4A Library Notification Builder Library.

barx

Well-Known Member
Licensed User
Longtime User
That and the fact the custom sound will not work from the assets folder
 

aaronk

Well-Known Member
Licensed User
Longtime User
Is there a way to play a wav/mp3 continually into the notification is pressed?

I have loaded the wav file using the 'Files' tab on the right, and need to work out how to make the wav file loop into the user presses on the notification.
 

Straker

Active Member
Licensed User
Longtime User
With the Barx's library you have an 'Insistent' property which continues the sound until the user clic on the notification
 

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
Is there a way to open an application, by clicking on the notification?
 

Straker

Active Member
Licensed User
Longtime User
Is there a way to open an application, by clicking on the notification?

When the user click on the notification, the corresponding activity is automatically opened in foreground.
 

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
But I call the notification from a Service Module
 

Straker

Active Member
Licensed User
Longtime User

barx

Well-Known Member
Licensed User
Longtime User
Is there a way to open an application, by clicking on the notification?

If it is your own app your wish to start see:

B4X:
nb.setActivity

If it is another app, try

B4X:
nb.setIntent
 

Mrjoey

Active Member
Licensed User
Longtime User
hey , im trying to build a expanded custom notification , but failed , here is my xml code:
B4X:
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/layout"
android:layout_width="match_parent"
    android:layout_height="150dp"
    android:orientation="horizontal" >
    android:padding="10dp" >

    <ImageView
        android:id="@+id/image"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_alignParentLeft="true"
        android:layout_marginRight="10dp" />

</RelativeLayout>

just testing with a imageview , the result is shown in the attached picture .
the notification seem to be the default notification but how to expand it , i tried to change the layout height but nothing changes.
can someone help me build a big custom notification like the second attached picture , with 3 buttons , im not interrested to use "BigPictureStyle", thank u
 

Attachments

  • Screenshot_2014-10-15-02-20-08.png
    100.7 KB · Views: 229
  • Screenshot_2014-10-13-14-33-06.png
    169.1 KB · Views: 229

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User

Even if the activity isn't active?
 

barx

Well-Known Member
Licensed User
Longtime User

barx

Well-Known Member
Licensed User
Longtime User
I've never tried a larger custom layout sorry, you will need to search the net and see how others have done it. Then we can apply that to b4a.
 

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
If your app is closed, tapping the notification will launch your app with the stated activity in the foreground.

What do you mean for "stated activity in the foreground"?
 

barx

Well-Known Member
Licensed User
Longtime User
But I start the notification from a ServiceModule and the Activity is close
That shouldn't matter. Have you tried it? If you have tried and it is not working then show us your code please...
 

FabioG

Active Member
Licensed User
Longtime User
I have a problem
since the last update with the creation of Notify Icon
is created but when I press the notification will not open my app
but it opens the Information page of the app (Android)

how can I fix it?
this is my code
the code is executed by a service

B4X:
Sub NotifyIcon(Visible As Boolean)
   
    Dim N As NotificationBuilder

    If Visible = True Then
        N.Initialize
        N.SmallIcon = "iconnotify"
        N.DefaultVibrate = False
        N.ContentTitle = Main.AppName
        N.ContentText = Main.TxTState
        N.CustomSound = ""
        N.DefaultLight = False       
        N.AutoCancel = False
        N.OnGoingEvent = True
        N.ShowTime = True
        N.setActivity(Main)
        N.AddAction("stopap",Main.EnableTextOn,"StopAp",Main)       
        n.setParentActivity(Main)
        N.Notify(1)
       
        Service.StartForeground(1,N.GetNotification)
    Else
        N.Initialize
        N.DefaultVibrate = False
        N.CustomSound = ""       
        N.AutoCancel = False
        N.Notify(1)
        N.Cancel(1)
       
        Service.StopForeground(1)
       
    End If

End Sub
 

barx

Well-Known Member
Licensed User
Longtime User
Can you provide a sample app that shows this behaviour as I've not seen it personally.

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