Keep screen on (prevent screen lock) in Android TWA app - android

I am a web developer and have a web app (PWA) bundled into an Android app with Bubblewrap and I would like to prevent screen lock while the app is open.
I believe there is no solution involving JavaScript in the web app itself so I'd need an Android solution.
How can I make this happen?
I have found various answers on here that say I should either add <android:KeepScreenOn="true"/> to the Android manifest or add getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); somewhere in the code and I have tried to add these snippets in various places in the code, but without success.
Where should I add the code for it to work?
Any help would be appreciated. Thanks!
The AndroidManifest.xml of the project created by Bubblewrap is:
<!-- The "package" attribute is rewritten by the Gradle build with the value of applicationId.
It is still required here, as it is used to derive paths, for instance when referring
to an Activity by ".MyActivity" instead of the full name. If more Activities are added to the
application, the package attribute will need to reflect the correct path in order to use
the abbreviated format. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="">
<application
android:name="Application"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/appName"
android:manageSpaceActivity="com.google.androidbrowserhelper.trusted.ManageDataLauncherActivity"
android:supportsRtl="true"
android:theme="#android:style/Theme.Translucent.NoTitleBar">
<meta-data
android:name="asset_statements"
android:resource="#string/assetStatements" />
<meta-data
android:name="web_manifest_url"
android:value="#string/webManifestUrl" />
<meta-data
android:name="twa_generator"
android:value="#string/generatorApp" />
<activity android:name="com.google.androidbrowserhelper.trusted.ManageDataLauncherActivity">
<meta-data
android:name="android.support.customtabs.trusted.MANAGE_SPACE_URL"
android:value="#string/launchUrl" />
</activity>
<activity android:name="LauncherActivity"
android:alwaysRetainTaskState="true"
android:label="#string/launcherName"
android:exported="true"
android:keepScreenOn="true">
<meta-data android:name="android.support.customtabs.trusted.DEFAULT_URL"
android:value="#string/launchUrl" />
<meta-data
android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR"
android:resource="#color/colorPrimary" />
<meta-data
android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR"
android:resource="#color/navigationColor" />
<meta-data
android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR_DARK"
android:resource="#color/navigationColorDark" />
<meta-data
android:name="androix.browser.trusted.NAVIGATION_BAR_DIVIDER_COLOR"
android:resource="#color/navigationDividerColor" />
<meta-data
android:name="androix.browser.trusted.NAVIGATION_BAR_DIVIDER_COLOR_DARK"
android:resource="#color/navigationDividerColorDark" />
<meta-data android:name="android.support.customtabs.trusted.SPLASH_IMAGE_DRAWABLE"
android:resource="#drawable/splash"/>
<meta-data android:name="android.support.customtabs.trusted.SPLASH_SCREEN_BACKGROUND_COLOR"
android:resource="#color/backgroundColor"/>
<meta-data android:name="android.support.customtabs.trusted.SPLASH_SCREEN_FADE_OUT_DURATION"
android:value="#integer/splashScreenFadeOutDuration"/>
<meta-data android:name="android.support.customtabs.trusted.FILE_PROVIDER_AUTHORITY"
android:value="#string/providerAuthority"/>
<meta-data android:name="android.app.shortcuts" android:resource="#xml/shortcuts" />
<meta-data android:name="android.support.customtabs.trusted.FALLBACK_STRATEGY"
android:value="#string/fallbackType" />
<meta-data android:name="android.support.customtabs.trusted.DISPLAY_MODE"
android:value="immersive" />
<meta-data android:name="android.support.customtabs.trusted.SCREEN_ORIENTATION"
android:value="#string/orientation"/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"
android:host="#string/hostName"/>
</intent-filter>
</activity>
<activity android:name="com.google.androidbrowserhelper.trusted.FocusActivity" />
<activity android:name="com.google.androidbrowserhelper.trusted.WebViewFallbackActivity"
android:configChanges="orientation|screenSize" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="#string/providerAuthority"
android:grantUriPermissions="true"
android:exported="false">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/filepaths" />
</provider>
<service
android:name=".DelegationService"
android:enabled="#bool/enableNotification"
android:exported="#bool/enableNotification">
<meta-data
android:name="android.support.customtabs.trusted.SMALL_ICON"
android:resource="#drawable/ic_notification_icon" />
<intent-filter>
<action android:name="android.support.customtabs.trusted.TRUSTED_WEB_ACTIVITY_SERVICE"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<activity
android:name="com.google.androidbrowserhelper.playbilling.provider.PaymentActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:configChanges="keyboardHidden|keyboard|orientation|screenLayout|screenSize"
android:exported="true">
<intent-filter>
<action android:name="org.chromium.intent.action.PAY" />
</intent-filter>
<meta-data
android:name="org.chromium.default_payment_method_name"
android:value="https://play.google.com/billing" />
</activity>
<!-- This service checks who calls it at runtime. -->
<service
android:name="com.google.androidbrowserhelper.playbilling.provider.PaymentService"
android:exported="true" >
<intent-filter>
<action android:name="org.chromium.intent.action.IS_READY_TO_PAY" />
</intent-filter>
</service>
</application>
</manifest>

Related

Flutter App Starts from splash screen, even when started from the background

`When the user navigates to another app via our flutter app, and then comes back to the flutter app the flutter app gets started from the splash screen. Instead of the app to resume from where the user left of it starts from the splash screen. This happens only in some of the devices (low-end devices) and works perfectly fine for the high-end device. For example if the user wants to make a purchase (using razor pay) and selects the option to pay via google pay, the user will be directed to the google pay app, upon successful payment in google pay the user will be navigated back to the app but the app will again start from the splash screen instead of listening to the payment event
The user initiates a buy
Razor pay pop up opens up, the user chooses to pay via google pay
The user is navigated to the google pay app, and makes the purchase.
The user comes back to the flutter app, but instead of resuming where the user left of the app starts from the beginning that is the splash screen.
The AndroidManifest.xml is as follows
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bynge.story">
<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
<!-- allows app to access Facebook app features -->
</queries>
<application android:label="Notion Press" android:icon="#mipmap/ic_launcher" android:usesCleartextTraffic="true" android:name="com.clevertap.android.sdk.Application">
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="bynge_local_notification" />
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="#mipmap/ic_launcher" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="#color/colorAccent" />
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="#style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize" android:exported="true">
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="#style/NormalTheme" />
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="#drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!-- Deep Links -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="bynge" android:host="app" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="bynge" android:host="series" android:pathPrefix="/seriesid/episodeid" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="bynge.in" android:pathPrefix="/wa" />
</intent-filter>
</activity>
<meta-data android:name="flutterEmbedding" android:value="2" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="#string/facebook_client_token"/>
<activity android:name="com.facebook.FacebookActivity" android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="#string/app_name" android:exported="true"/>
<activity android:name="com.facebook.CustomTabActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity android:name="com.yalantis.ucrop.UCropActivity" android:screenOrientation="portrait" android:theme="#style/Theme.AppCompat.Light.NoActionBar" android:exported="true"/>
<meta-data android:name="CLEVERTAP_BACKGROUND_SYNC" android:value="1"/>
<meta-data android:name="CLEVERTAP_NOTIFICATION_ICON" android:value="ic_launcher"/>
<meta-data android:name="flutterEmbedding" android:value="2" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="com.android.vending.BILLING" />

There was a problem while parsing the packageā€ on Android 12

While Installing on Android 12 I'm getting this error
adb: failed to install C:\Users\***\Desktop\***\build\app\outputs\flutter-apk\app.apk: Failure
[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl159430148.tmp/base.apk (at
Binary XML file line #263): com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver: Targeting S+
(version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
AndroidManifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ordeno">
<application
android:label="abcd"
android:name="${applicationName}"
android:icon="#mipmap/ic_launcher">
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="**********" />
<activity android:name="com.facebook.FacebookActivity"
android:exported="true"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/> <!-- stripe flutter -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="sdk"
android:host="3ds.sdk.io" />
</intent-filter>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Deep linking -->
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="dummy.page" />
<data android:scheme="https" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#drawable/notification_icon"
/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="#string/default_notification_channel_id"
/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="#color/default_color"
/>
</application>
</manifest>
I have added andriod:exported="true" to all the activity tag's, it still shows the same
Issue is because of flutter_local_notifications library.
Adding below lines inside <application></application> in AndroidManifest.xml will fix the problem.
<receiver android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" />
<receiver android:exported="true" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="true" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>

Can we track weburl opened in trusted web activity..?

I am working on an android app that open trusted web activity. but I want to track url which open in TWA for analytic reason. is their any way to track opening URL in trusted web activity? code which i written for TWA is only in the android manifest. I just copy-paste my android manifest file. just take a look.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dummy.work">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/appName"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.LauncherActivity"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name="android.support.customtabs.trusted.
LauncherActivity"
android:label="#string/appName">
<intent-filter>
<category
android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" />
<data
android:host="beta.turms.in"
android:scheme="https" />
<data
android:host="beta.turms.in"
android:pathPrefix="/"
android:scheme="https" />
</intent-filter>
<meta-data
android:name="android.support.customtabs.trusted.DEFAULT_URL"
android:value="#string/launchUrl" />
<meta-data
android:name="android.support.customtabs.trusted.
STATUS_BAR_COLOR"
android:resource="#color/colorPrimary" />
</activity>
<meta-data
android:name="use_browser_on_chromeOS"
android:resource="#bool/useBrowserOnChromeOS" />
<meta-data
android:name="asset_statements"
android:resource="#string/assetStatements" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/filepaths" />
</provider>
<service
android:name="android.support.customtabs.trusted.
TrustedWebActivityService"
android:enabled="#bool/enableNotification"
android:exported="#bool/enableNotification">
<intent-filter>
<action
android:name="android.support.customtabs.trusted.
TRUSTED_WEB_ACTIVITY_SERVICE" />
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<service android:name=".Firebase.MyFirebaseMessagingService">
<intent-filter>
<action
android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.
default_notification_color"
android:resource="#color/colorAccent" />
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
</application>
</manifest>

Comcast XfinityStream Android App APK Fire TV Stick

I have a Amazon Fire TV Stick (Gen 2) and I have been trying to sideload my Comcast XfinityStream APK to the device so I can watch live TV from the service I pay for. It is successfully installed on the device, but when I open it, it just shows a black screen and goes back to the main menu on the Fire Stick. I used a couple of the older versions, which up until recently worked fine, but they have since retired them and now none of them work. I am trying to get their newest play store app release to work correctly.
My main question is this: what causes an Android app to open, show a black screen, and within no time, goes back to the main menu screen on an Android device, with no errors or messages displayed? Does the Fire TV stick, being that is Android-based, have a directory where I check for logs of some sort when this type of app behavior happens?
Since the Fire TV stick is Android-based architecture on 5.x Lollipop, it should load up the same way as it does on my phone, in theory, but it doesn't. I have downloaded the APK file and looked into the manifests file, but haven't seen anything in there or a few other places I've looked that could show some type of restriction or 'blacklisting', if you will, the Fire TV stick from being able to use it. The API levels look correct as well as the hardware requirements. Does anyone have an idea what this could be? Here is the manifests file when it was decompiled:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:"http://schemas.android.com/apk/res/android" android:versionCode="40201001" android:versionName="4.2.1.001" android:installLocation="auto" package="com.xfinity.cloudtvr" platformBuildVersionCode="24" platformBuildVersionName="7.0">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="24" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.xfinity.cloudtvr.permission.C2D_MESSAGE" android:protectionLevel="signature|signatureOrSystem" />
<uses-permission android:name="com.xfinity.cloudtvr.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:theme="0x7f0c010c" android:label="#string/app_name" android:icon="0x7f0200da" android:name="com.xfinity.cloudtvr.XtvApplication" android:allowBackup="false" android:largeHeap="true" android:supportsRtl="true" android:resizeableActivity="false" android:networkSecurityConfig="0x7f060001">
<activity android:theme="0x7f0c010d" android:label="" android:name="com.xfinity.cloudtvr.view.BrowseActivity" android:launchMode="singleTop" android:windowSoftInputMode="20">
<intent-filter>
<data android:scheme="#string/localytics_push_key" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity android:name="com.xfinity.cloudtvr.view.authentication.WebAuthCallbackHelperActivity" android:exported="true">
<intent-filter>
<data android:scheme="#string/partner_continue_url_scheme" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.comcast.cim.android.view.launch.IntentForwardingActivity" android:launchMode="singleTask">
<intent-filter>
<data android:scheme="#string/deep_linking_scheme" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<data android:scheme="#string/universal_deep_linking_scheme_1" />
<data android:host="#string/universal_deep_linking_host_1" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<data android:scheme="#string/universal_deep_linking_scheme_2" />
<data android:host="#string/universal_deep_linking_host_1" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data android:name="LOCALYTICS_APP_KEY" android:value="#string/localytics_app_key" />
<receiver android:name="com.localytics.android.ReferralReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<activity android:name="com.localytics.android.PushTrackingActivity" />
<receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:permission="com.google.android.c2dm.permission.SEND" android:exported="true">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.xfinity.cloudtvr" />
</intent-filter>
</receiver>
<service android:name="com.localytics.android.GcmListenerService" android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service android:name="com.localytics.android.InstanceIDListenerService" android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service android:name="com.xfinity.common.analytics.LocalyticsCrashReportingIntentService" android:exported="false" />
<activity android:name="com.xfinity.common.view.LaunchActivity" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:theme="0x7f0c0200" android:label="" android:name="com.xfinity.cloudtvr.view.authentication.EligibilityCheckActivity" android:launchMode="singleTop" android:windowSoftInputMode="10" />
<activity android:name="com.comcast.cim.android.view.settings.SignoutActivity" android:noHistory="true" />
<activity android:theme="0x7f0c010e" android:label="" android:name="com.xfinity.cloudtvr.view.PlayerActivity" android:launchMode="singleTop" android:configChanges="orientation|screenSize" android:windowSoftInputMode="20" android:parentActivityName="com.xfinity.cloudtvr.view.BrowseActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".view.BrowseActivity" />
</activity>
<activity android:theme="0x7f0c0203" android:label="#string/settings" android:name="com.xfinity.cloudtvr.view.settings.XtvSettingsActivity" />
<receiver android:name="com.xfinity.cloudtvr.inhome.ConnectionChangedBroadcastReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<service android:name="com.xfinity.cloudtvr.downloads.XtvDownloadService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.downloads.XtvDownloadsNotificationReceiver$XtvNotificationBuilderService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.model.resumepoint.ResumePointSyncIntentService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.model.user.parentalcontrols.ParentalControlsSyncIntentService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.downloads.DownloadUpdateService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.downloads.DownloadPermCacheReloadService" android:exported="false" />
<activity android:name="com.xfinity.cloudtvr.view.settings.SettingsWebViewActivity" />
<service android:name="com.xfinity.common.user.FavoritesSyncIntentService" />
<activity android:theme="#*android:style/Theme.Translucent" android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity android:theme="#style/Theme_IAPTheme" android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity" />
<activity android:theme="#*android:style/Theme.Translucent.NoTitleBar" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:exported="false" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
</application>
</manifest>
I have been looking at this in notepad, so don't have the best view to look at all of the code and I am sort of new to Android coding and app development so I am just trying to see if anyone else who develops apps more in depth would know where to look and how to possibly fix the issue. I have tried installing Android System Webview and Google Chrome on the Fire TV stick without issues and that is what made the app work in its previous versions that have now since been retired.
Does anyone know where or what I could look for in the decompiled code or files that may impact/restrict the app when it is trying to start on the Fire TV Stick?
Here is the APK file version I am using: http://www.apkmirror.com/apk/comcast/xfinity-stream/xfinity-stream-4-2-1-001-release/xfinity-stream-4-2-1-001-android-apk-download/
I am sure this thread will be of much needed help for others as well because there are a bunch of people who have sideloaded this app and who are now experiencing this issue trying to get a new APK file up and running on the Fire TV Stick.

Custom URI Scheme

I'd like to be able to open my Android app from a URL. So in the AndroidManifest.xml I put this code:
<application
android:allowBackup="true"
android:theme="#android:style/Theme.NoTitleBar"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="#string/apikey" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id" />
<activity
android:name="com.myApp.LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="uritest" android:host="com.myApp" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
But when I go into my browser on the phone and type in "uritest://com.myApp" in the URL bar, it Google searches it instead of opening the app like I would expect it to. Is there something that I'm doing incorrectly? Any help in this matter would be greatly appreciated, thanks!

Categories

Resources