Sure
B4X:
standout.Snotif.SetInfo("Hallo","Float",Me) ' Me is Main Activity
I've been trying your solution for long time with no luck, could you please show me how to do it?
[CODE lang="b4x" highlight="33-36"]#Region Project Attributes
#ApplicationLabel: Floating StandOut Example 1
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
' remenber Add on Manifest this permission:
' <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private PanelMain As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.LoadLayout("main")
standout.Snotif.Initialize
standout.Snotif.Icon = "icon"
standout.Snotif.SetInfo("Title","Body",Me)
standout.Snotif.Notify(1)
FloatingStandOut.PathImage=File.DirAssets
FloatingStandOut.NameFileImage="image2.png"
FloatingStandOut.X=50%x
FloatingStandOut.Y=50%y
FloatingStandOut.SetStartActivity(True,True,False)
FloatingStandOut.SetStopFloating(True,True,True)
End Sub
Sub Activity_Resume
FloatingStandOut.Stop
End Sub
Sub Activity_Pause (UserClosed As Boolean)
' FloatingStandOut.Start(Me)
End Sub
Sub Button1_Click
Dim Permission As SpecialPermission
Permission.Initialize
If Permission.GetPermission Then
FloatingStandOut.Start(Me)
Else
Permission.OpenSettingPermission
End If
Activity.Finish
End Sub
[/CODE]