Jul 21, 2020 Replies: 1 When you're trying to get the starting intent of the activity from a B4xPage class object, add this sub to the activity you want to get the Intent from: B4X: Public Sub GetStartingIntent as Intent return Activity.GetStartingIntent End Sub And when you need to get it in the B4xPage call it with: B4X: Dim obj as Object = CallSub(Activity,"GetStartingIntent") Dim i as Intent = obj Click to expand...
When you're trying to get the starting intent of the activity from a B4xPage class object, add this sub to the activity you want to get the Intent from: B4X: Public Sub GetStartingIntent as Intent return Activity.GetStartingIntent End Sub And when you need to get it in the B4xPage call it with: B4X: Dim obj as Object = CallSub(Activity,"GetStartingIntent") Dim i as Intent = obj
Erel B4X founder Staff member Licensed User Longtime User Jul 21, 2020 #2 Simpler solution: Code: Dim in As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent Remember that the native parent of all pages, in B4A, is the Main activity.
Simpler solution: Code: Dim in As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent Remember that the native parent of all pages, in B4A, is the Main activity.