Hi
Sometimes when my app is background and after example a day back to app,show notification in status bar that i cannot close it and i have to restart device for remove it
I use notification in app when i receive new data from b4j socket
I use NB6
The shot is attachment here
Sometimes when my app is background and after example a day back to app,show notification in status bar that i cannot close it and i have to restart device for remove it
I use notification in app when i receive new data from b4j socket
I use NB6
The shot is attachment here
B4X:
Dim notify As NB6
notify.Initialize("default","HOTEL","DEFAULT")
notify.AutoCancel(True).SetDefaults(True,True,True)
notify.AddButtonAction(Null,"Reply",Loader,"new_message_" & user_id)
Dim ph As Phone
If ph.SdkVersion >= 22 Then
notify.SmallIcon(LoadBitmapResize(File.DirAssets,"notification_icon_white.png",40dip,40dip,True))
Else
notify.SmallIcon(LoadBitmapResize(File.DirAssets,"notification_icon_color.png",40dip,40dip,True))
End If
notify.LargeIcon(LoadBitmapResize(File.DirAssets,"notification_icon_color.png",46dip,46dip,True))
notify.BigTextStyle(user_name,"",content)
notify.Build(user_name,content,message_object.Get("user_id"),Main).Notify(user_id)