How to open an activity/screen from extension?

Hi
So after getting suggestions to open desired screen on link click in CustomWebView extension, I am trying implement it for three days.
Here is what I have done:

I tried getPackageManager.getLaunchIntentForPackage() but that is also not working for other screens except Screen1.
Kindly note that the same code was working with default package name a few months ago.
I will check it tomorrow whether it is working now or not.

Also I have question that is it possible to switch to activity if it is already opened else open it?

Thank you. :slightly_smiling_face:

I think that can help :slightly_smiling_face::
https://appsandbiscuits.com/moving-between-activities-with-intents-android-8-697b3b70fdfd

Nope (on Firefox):

Thanks for the help :slight_smile:

Here is my latest code:

I have even tried using Class.forName(screen) but none works.
Everytime it launches Screen1.

Kindly have a look here Sir @ewpatton

I have solved the problem myself using JsonUtil:

 JsonUtil.getObjectFromJson(screen, true).toString();

Since tinyDb saves value in encoded form so we shall have to decode it which I was not doing earlier.
Thank you everyone.

But still if someone knows answer of below question then kindly post it.

1 Like

you can take a look at app-inventor Barcode Scanner source-code.