B4A Question Get NotificationID within Activity started by Notification [SOLVED] - Erel (first post)    May 27, 2021   (1 reaction) Tip: the correct way to work with Activity.GetStartingIntent:
Sub Process_Globals
Private OldIntent As Intent
End Sub
Sub ActivityResume
Dim in As Intent = Activity.GetStartingIntent
If in.IsInitialized And in <> OldIntent Then
OldIntent = in
'....
End If B4A Question [SOLVED] B4X Intent based camera - fbritop (first post)    Mar 01, 2022   (1 reaction) Solved. There was a missed line regarding Activity_Resume in Main that was not supposed to be there. If Activity.GetStartingIntent = lastintent Then Return B4A Question Open a module or activity with the service in the background - Erel (first post)    Jul 25, 2023   (1 reaction) You need to call StartActivity(Main) With some logic you can catch this intent and open a specific page. It should be done in Activity_Resume using Activity.GetStartingIntent. B4A Question Notification click to specific page - Erel (first post)    Nov 25, 2021   (4 reactions) Check the attached project and note the code in Main.Activity_Resume Sub Activity_Resume B4XPages.Delegate.Activity_Resume Dim in As Intent = Activity.GetStartingIntent If in.IsInitialized And in.HasExtra("Notification_Tag") And in <> LastIntent Then LastIntent = in Dim B4A Question How app was started - JohnC (first post)    Dec 20, 2022   (1 reaction) Try adding this code in the Activity_Create and see if it displays different info for each different way you launch the app:
Log(Activity.getStartingIntent.Action & " (" & Activity.GetStartingIntent.ExtrasToString & ")") B4A Library SumUp mobile Payment - PhiloSophical (first post)    Mar 25, 2021   (1 reaction) Log(Activity.GetStartingIntent.ExtrasToString) looks like this:- Bundle @NeverGiveUp2 - thank you so much for this code example - brilliant! Still works after 7 years! I discovered yesterday - Thank you forum! B4A Tutorial NFC - Reading and Writing - Erel    Aug 16, 2022   (24 reactions) Sub Activity_Resume
'forces all nfc intents to be sent to this activity
nfc.EnableForegroundDispatch
Dim si As Intent = Activity.GetStartingIntent
'check that the intent is a new intent
If si.IsInitialized = False Or si = prevIntent Then Return
prevIntent = si
If si.Action.EndsW B4A Question NB6 and B4XPages - Erel (first post)    Aug 04, 2020   (10 reactions) Good question. 1. Main module, expand the template region and add in Activity_Resume: B4XPages.MainPage.ActivityResume 2. Add to B4XMainPage: Public Sub ActivityResume Dim in As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent If in.IsInitialized And in <> LastIntent Then B4A Question Read (WhatsApp/Media/WhatsApp Video) Files - KMatle (first post)    Jun 28, 2021   (1 reaction) ExtrasToString) If Activity.GetStartingIntent.Action="android.intent.action.MAIN" Then Return 'App is started via icon (must be started with 'share to' End If FileList=GetUrisFromStartingIntent(Activity.GetStartingIntent) If FileList.Size>0 Then For i=0 To FileList.S B4A Question Upload files with WebView - tiagovsilva (first post)    Jun 28, 2021 I dont know if this makes sense but I wanted to set the file type on Activity Resume, like this: Dim i As Intent i = Activity.GetStartingIntent i.setType(any_file_type) On Activity Resume, after selecting the file, the intent has no extras and the intent action is MAIN Sub Activity_Resume Dim i Page: 1   2   3   4   5   6   7   Powered by ColBERT |