B4A Library Notification Builder Library. - barx    Dec 12, 2017   (48 reactions) Pass a NotificationCustomLayout object.
API 11+
CustomSound As String
Sets a custom sound to be played on new notification
Example:
<code>cn.CustomSound = "file:///sdcard/notification/ringer.mp3"</code>
CustomVibrate() As Long
Sets a custom vibrate pattern for new notification
The Array of values B4A Question hardware state - James Chamblin (first post)    Oct 21, 2015 For example: 'Activity.LoadLayout("Layout1") If FirstTime = True Then Toggle.Initialize Ringer = Toggle.RingerMode T.Initialize("timer",1000) T.Enabled = True End If End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) If UserClosed = Tru B4A Question Recognize BlueStack emulator - Addo (first post)    Apr 10, 2019 /** * Is wifi enabled * * @return the boolean */ public boolean isWifiEnabled() { boolean wifiState = false; WifiManager wifiManager = (WifiManager) BA.applicationContext.getSystemService(Context.WIFI_SERVICE); if (wifiManager != null) { wifiState = wifiManager.isWif B4A Question Notification Sound Without Icon/Alert - Marcos Alves (first post)    May 20, 2018 Thaks @Erel ... That's exactly what I done... I checkd phone rigermode in order to respect the user silence configuration before playing a sound related to an app event... something like tihis: If Phone1.GetRingerMode <> Phone1.RINGER_SILENT And Phone1.GetRingerMode <> Phone1.RINGER_VIBRATE Then B4A Question Phone.GetMute? (not Phone.SetMute) - JackKirk (first post)    Jan 01, 2016 Johan,
Once again thank you for your prompt response - I'm starting to get really impressed with this community and how it enhances B4A.
I was able to install and run the project you supplied above without any problems.
I now have a clear understanding of how to incorporate small bits of Java - a B4A Question Can I stop SetRingerMode from beeping? - Semen Matusovskiy (first post)    Sep 20, 2018 I don't know, what you use, but "native" public void setRingerMode (int ringerMode) uses
2 - RINGER_MODE_NORMAL 0 - RINGER_MODE_SILENT 1 - RINGER_MODE_VIBRATE
Try zero instead of 2.
BTW, setRingerMode requires android.permission.ACCESS_NOTIFICATION_POLICY in manifest + (API23+) to ask user to B4A Library Custom Notification Library: Barx - barx    Apr 09, 2015   (7 reactions) Name it mylayout.xml and make it read only. Example: cn.Initialize(2) 'Initializes the notification and sets the layout to Two Text fields plus One Image IsInitialized As Boolean Notify (Id As Int) Displays the notification. Id: - The notification Id. This can be used later to update the notificati B4A Question Default message sound - francoisg    Jul 22, 2015 Hi,
I am using the following code to play a "message" ringtone.
Sub makeNotificationsound
' ** Vibrate ...
Dim pv As PhoneVibrate
pv.Vibrate(1000)
' ** Play default authentication sound ...
Dim mp As MediaPlayer
mp.Initialize
' ** Use ringtone manager to get default soun B4A Question reduce volume of mp3 player in the background - MMB1979 (first post)    Feb 27, 2015 THX Erel!!! It works! But you should better not be in vibration ringer mode - otherwise you will not hear anything. You could use the Alarm stream instead, but that would mean that you would not hear it through the headphone but the phone speaker! However, if you change the ringer whilst playing y B4A Question Countdown Alarm - pojeck (first post)    Dec 15, 2020 Sub Process_Globals
Dim gDevice As Phone
Private gPhone As PhoneVibrate
Dim gRTM As RingtoneManager
Dim gSound As String
End Sub
Sub PlaySound
gSound = gRTM.GetDefault(gRTM.TYPE_NOTIFICATION)
gRTM.Play(gSound)
gPhone.Vibrate(1000)
End Sub
I found this code and it's work Page: 1   2   3   4   5   6   7   Powered by ColBERT |