As the title states, how would I open an activity that is built into my extension from my extension and then open the screen that opened my activity with a start value?
Example:
public static class MyNewActivity extends Activity
Found my solution for opening the activity:
Intent i = new Intent(context.getApplicationContext(), MyNewActivity.class);
context.startActivity(i);
Hi @KodedScorpius
Sounds good that you found the solution yourself.
But I would like to share something with you:
package com.sunny.DeepLink;
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.content.Intent;
import android.content.pm.PackageManager;
import com.google.appinventor.components.annotations.DesignerComponent;
import com.google.appinventor.components.annotations.SimpleObject;
import com.google.appinventor.components.common.ComponentCategory;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.Component;
import com.google.appinventor.components.runtime.ComponentContainer;
import com.google.appinventor.components.annotations.androidmanifest.*;
import com.google.appinventor.components.annotations.UsesActivities;
/*
* @author vknow360 aka Sunny Gupta
* Contributed by meatomdeveloper
*/
@DesignerComponent(version = 2, description ="Adds deep link support<br> Developed by Sunny Gupta", category = ComponentCategory.EXTENSION, nonVisible = true, iconName = "https://res.cloudinary.com/andromedaviewflyvipul/image/upload/c_scale,h_20,w_20/v1571472765/ktvu4bapylsvnykoyhdm.png")
@UsesActivities(activities = {@ActivityElement(intentFilters = {@IntentFilterElement(actionElements = {@ActionElement(name = "android.intent.action.VIEW")}, categoryElements = {@CategoryElement(name = "android.intent.category.DEFAULT"), @CategoryElement(name = "android.intent.category.BROWSABLE")}, dataElements = {@DataElement(scheme = "appinventor",host="DeepLink"), @DataElement(scheme = "https",host="community.appinventor.mit.edu")})},name="com.sunny.DeepLink.DeepLink$DeepActivity")})
This file has been truncated. show original