Hello Erel, B4x community and rest (api) of you good people.
I need to make a fairly simple task.
- user copied text to clipboard
1. display our app in the app list to choose from
2. process the text in the app.
I have already implemented sharing images to our app with this example
so I assume that it shouldn't be too difficult to add this but ...
[I'm using b4xpages in our project so I planted the activity_resume sub in the main module]
TIA
I need to make a fairly simple task.
- user copied text to clipboard
1. display our app in the app list to choose from
2. process the text in the app.
I have already implemented sharing images to our app with this example
Receiving shared images from other apps
This example shows how to create an app that can act as a sharing target. It will be listed in the list of apps that show when the user shares an image. The first step is to add an intent filter to the manifest editor. The intent filter tells the OS which types of resources the app supports...
www.b4x.com
so I assume that it shouldn't be too difficult to add this but ...
[I'm using b4xpages in our project so I planted the activity_resume sub in the main module]
Main:
Sub Activity_Resume
B4XPages.Delegate.Activity_Resume
If IsRelevantIntent(Activity.GetStartingIntent) Then
Dim in As JavaObject = Activity.GetStartingIntent
Dim uri As String = in.RunMethod("getParcelableExtra", Array("android.intent.extra.STREAM"))
Dim flag As Boolean
Try
Log("Loading bitmap from: " & uri)
Dim bmp As Bitmap = LoadBitmapResize("ContentDir", uri, 100%x, 100%y,flag)
Activity.SetBackgroundImage(bmp)
Catch
Log(LastException)
End Try
End If
End Sub
TIA
Last edited: