Who can help me to read out data transmission from another app?
I need to read out a temperature and humidity measuring device (SmartProbes 605-i) from Testo.
Here is the info link from Testo on how to do it.
Dim bundleid As String = "test17"
Dim url As String = $"${scheme}://start?bundleid=${bundleid}&userinfo=0"$
Dim in As Intent
in.Initialize(in.ACTION_VIEW, url)
StartActivity(in)
Is it normal that my app then goes to pause? what goes to test17? my package name?
I have that in the resume now.
B4X:
If IsRelevantIntent(Activity.GetStartingIntent) Then
Dim in As JavaObject = Activity.GetStartingIntent
Dim uri As String = in.RunMethod("getParcelableExtra", Array("android.intent.extra.STREAM"))
Log("Testo Daten: " & uri)
End If
1. Switch to B4XPages. Your app will not be paused (unless the process is killed).
2. Get the starting intent in B4XPage_Foreground:
B4X:
B4XPages.GetNativeParent(Me).GetStartingIntent
3. You need to make sure to check whether this intent was already handled as it isn't cleared.
B4X:
Dim NewIntent As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent
If NewIntent <> OldIntent Then
OldIntent = NewIntent
'here check that this intent has the relevant information
End If