Roberto P. Well-Known Member Licensed User Longtime User Mar 28, 2015 #1 I have to run from one activity (with a callsub) the same activity (with different parameters), but I see that you can not ?! how can I solve this need \ limit? in other words I have the Task activity, with the Open function (id as int) from the same activity I throw the same with a different parameter to open another task thank you
I have to run from one activity (with a callsub) the same activity (with different parameters), but I see that you can not ?! how can I solve this need \ limit? in other words I have the Task activity, with the Open function (id as int) from the same activity I throw the same with a different parameter to open another task thank you
warwound Expert Licensed User Longtime User Mar 28, 2015 #2 Use a little inline java to call the native android Activity recreate() method: http://developer.android.com/reference/android/app/Activity.html#recreate() Upvote 0
Use a little inline java to call the native android Activity recreate() method: http://developer.android.com/reference/android/app/Activity.html#recreate()
Erel B4X founder Staff member Licensed User Longtime User Mar 29, 2015 #3 Have you tried to call Activity.Finish followed by StartActivity(Me)? Upvote 0
warwound Expert Licensed User Longtime User Mar 29, 2015 #4 Here's some working code you can add to any activity and then be able to recreate it: Code: Copy Sub RecreateActivity Log("RecreateActivity called") Dim JavaObject1 As JavaObject JavaObject1.InitializeContext JavaObject1.RunMethod("NativeRecreateActivity", Null) End Sub #If JAVA public void NativeRecreateActivity(){ this.recreate(); } #End If Martin. Upvote 0
Here's some working code you can add to any activity and then be able to recreate it: Code: Copy Sub RecreateActivity Log("RecreateActivity called") Dim JavaObject1 As JavaObject JavaObject1.InitializeContext JavaObject1.RunMethod("NativeRecreateActivity", Null) End Sub #If JAVA public void NativeRecreateActivity(){ this.recreate(); } #End If Martin.
Roberto P. Well-Known Member Licensed User Longtime User Apr 3, 2015 #5 Hi warwound, thanks, recreate native working properly. how can I call the recreated passing a parameter similar to callsub2 or callsub3? greetings Upvote 0
Hi warwound, thanks, recreate native working properly. how can I call the recreated passing a parameter similar to callsub2 or callsub3? greetings
warwound Expert Licensed User Longtime User Apr 3, 2015 #6 I think you'll need to use Process Globals to store values that the recreated activity will read. Upvote 0
Roberto P. Well-Known Member Licensed User Longtime User Apr 7, 2015 #7 ok, thanks for the advice best regards Upvote 0