Hi all,
For my project I would like to have an easy action: when is performed a Sub, for example, Activity_Create, it should just open a dialog listing all the possible "social networks" and email to share the text. Nothing more. On Android is very easy:
B4X:
Sub Globals
'Android code
Private
intent As INTENTID
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layout1")
intent.Initialize
intent.ShareText("HOLA!!!!")
End Sub
I suppose that it should be something like:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim avc As ActivityViewController
avc.Initialize("avc", Array("Some text to share together with an image", LoadBitmap(File.DirAssets, "smiley.png"))) ' I only want to share the text, nothing more!
avc.Show(Page1, Page1.RootPanel) 'Second parameter is relevant for iPad only. The arrow will point to the view.
End Sub
Sub Activity_Create(FirstTime As Boolean)Dim avc As ActivityViewController
avc.Initialize("avc", Array("I just want to share a text...")))
avc.Show(Page1, Page1.RootPanel)
End Sub