- import com.google.appinventor.components.runtime.HVArrangement;
- import com.google.appinventor.components.runtime.PermissionResultHandler;
- import com.google.appinventor.components.annotations.androidmanifest.*;
- import com.google.appinventor.components.annotations.UsesActivities;
- import com.google.appinventor.components.annotations.UsesPermissions;
- import com.google.appinventor.components.annotations.DesignerProperty;
- import com.google.appinventor.components.annotations.PropertyCategory;
- import com.google.appinventor.components.common.PropertyTypeConstants;
- import android.view.MotionEvent;
- @DesignerComponent(version = 7, description ="An extended form of Web Viewer <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",helpUrl="https://github.com/vknow360/CustomWebView")
- @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 = "http"), @DataElement(scheme = "https")}), @IntentFilterElement(actionElements = {@ActionElement(name = "android.intent.action.VIEW")}, categoryElements = {@CategoryElement(name = "android.intent.category.DEFAULT"), @CategoryElement(name = "android.intent.category.BROWSABLE")}, dataElements = {@DataElement(scheme = "http"), @DataElement(scheme = "https"), @DataElement(mimeType = "text/html"), @DataElement(mimeType = "text/plain"), @DataElement(mimeType = "application/xhtml+xml")})},name="com.sunny.CustomWebView.WebActivity")})
- @SimpleObject(external=true)
- @UsesPermissions(permissionNames="android.permission.WRITE_EXTERNAL_STORAGE,android.permission.ACCESS_DOWNLOAD_MANAGER,android.permission.ACCESS_FINE_LOCATION,android.permission.RECORD_AUDIO, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.CAMERA,android.permission.VIBRATE,android.webkit.resource.VIDEO_CAPTURE,android.webkit.resource.AUDIO_CAPTURE")
- public final class CustomWebView extends AndroidNonvisibleComponent{
- public boolean NO_VIEW = true;
- public Activity activity;
- public WebView webView;
- public Context context;
- public boolean UsesLocation = false;
- public boolean followLinks = true;
- public boolean prompt = true;