Created
November 29, 2019 10:18
-
-
Save gnanasekar-somanathan/20b441c976442bf44e45cc1c818df873 to your computer and use it in GitHub Desktop.
/hwebapk/AndroidManifest.xml & /hwebapk/res/values/strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String manifest = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?><manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" android:compileSdkVersion=\"28\" android:compileSdkVersionCodename=\"9\" package=\"org.chromium." + packagePath +"_webapk\" platformBuildVersionCode=\"28\" platformBuildVersionName=\"9\">\n" + | |
" <uses-permission android:name=\"android.permission.VIBRATE\"/>\n" + | |
" <application android:allowBackup=\"false\" android:icon=\"@mipmap/ic_launcher\" android:label=\"" + title + "\" android:supportsRtl=\"true\">\n" + | |
" <activity android:excludeFromRecents=\"true\" android:name=\"org.chromium.webapk.shell_apk.TransparentLauncherActivity\" android:relinquishTaskIdentity=\"true\" android:theme=\"@android:style/Theme.Translucent.NoTitleBar\">\n" + | |
" <intent-filter>\n" + | |
" <action android:name=\"android.intent.action.VIEW\"/>\n" + | |
" <category android:name=\"android.intent.category.DEFAULT\"/>\n" + | |
" <category android:name=\"android.intent.category.BROWSABLE\"/>\n" + | |
" <data android:host=\""+ host +"\" android:pathPrefix=\"/\" android:scheme=\"https\"/>\n" + | |
" </intent-filter>\n" + | |
" </activity>\n" + | |
" <activity android:excludeFromRecents=\"true\" android:name=\"org.chromium.webapk.shell_apk.MainActivity\" android:theme=\"@android:style/Theme.Translucent.NoTitleBar\">\n" + | |
" <intent-filter>\n" + | |
" <action android:name=\"android.intent.action.MAIN\"/>\n" + | |
" <category android:name=\"android.intent.category.LAUNCHER\"/>\n" + | |
" </intent-filter>\n" + | |
" </activity>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.shellApkVersion\" android:value=\"89\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.runtimeHost\" android:value=\"org.chromium.chrome\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.runtimeHostApplicationName\" android:value=\"Chromium\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.startUrl\" android:value=\"https://" + host + urlpath + "\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.scope\" android:value=\"https://" + host +"\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.displayMode\" android:value=\"standalone\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.orientation\" android:value=\"portrait\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.themeColor\" android:value=\"2147483648L\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.backgroundColor\" android:value=\"2147483648L\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.iconId\" android:resource=\"@mipmap/app_icon\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.splashId\" android:resource=\"@drawable/splash_icon\"/>\n" + | |
" <meta-data android:name=\"org.chromium.webapk.shell_apk.distributor\" android:value=\"other\"/>\n" + | |
" <service android:exported=\"true\" android:name=\"org.chromium.webapk.shell_apk.WebApkServiceFactory\">\n" + | |
" <intent-filter>\n" + | |
" <action android:name=\"android.intent.action.MAIN\"/>\n" + | |
" <category android:name=\"android.intent.category.WEBAPK_API\"/>\n" + | |
" </intent-filter>\n" + | |
" </service>\n" + | |
" <service android:exported=\"true\" android:name=\"org.chromium.webapk.shell_apk.IdentityService\">\n" + | |
" <intent-filter>\n" + | |
" <action android:name=\"org.webapk.IDENTITY_SERVICE_API\"/>\n" + | |
" </intent-filter>\n" + | |
" </service>\n" + | |
" </application>\n" + | |
"</manifest>\n"; | |
String resString = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + | |
"<resources>\n" + | |
" <string name=\"choose_host_browser\">Choose a browser that supports this app:</string>\n" + | |
" <string name=\"choose_host_browser_dialog_quit\">CLOSE</string>\n" + | |
" <string name=\"choose_host_browser_dialog_title\">%1$s requires a web browser</string>\n" + | |
" <string name=\"host_browser_item_not_supporting_webapks\">\"%1$s Unsupported\"</string>\n" + | |
" <string name=\"install_host_browser_dialog_install_button\">INSTALL</string>\n" + | |
" <string name=\"install_host_browser_dialog_title\">%1$s requires the following app:</string>\n" + | |
" <string name=\"name\">Opening.. \"https://" + host + urlpath + " @Powered by Lite Browser</string>\n" + | |
" <string name=\"notification_channel_name\">General</string>\n" + | |
" <string name=\"short_name\">" + title + "</string>\n" + | |
"</resources>\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment