I've made a PWA that work well. On my phone with chrome a can install it and it work well.
I've made a TWA but when I install it from the play store and launch it. The app don't launch, nothing happend, just un "black screen".
It happened when I config de /.well-known/assetlinks.json. Before I config the assetlinks.json the app work (but there is the url bar). When I config the assetlinks.json the app not work anymore.
the assetlinks is the same as the one give by the Play console.
A part of my manifest :
<activity android:name="com.google.androidbrowserhelper.trusted.LauncherActivity"
android:label="#string/appName" android:exported="true">
<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>
#string/hostName has correct value
targetSdkVersion 32
compileSdkVersion 32
I've mademany search, many test but nothing work. Do you have any idea why ?
How can I get some logs of what happen ?
Feel free if you need more information
Thanks for your help !
Related
My app shows errors with a deeplink in Google Play Console:
In which the failed link was "https:///"
In the AndroidManifest.xml has this configuration:
<activity
android:name=".AppLinksActivity"
android:resizeableActivity="false"
android:exported="true"
android:launchMode="singleTask">
<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="your_game_domain.extads.gl.com"
/>
</intent-filter>
</activity>
The other link works just fine. I don't know where the triple dashes in the faulty link come from.
Could anyone help me find the causes and how to fix this? Much appreciated.
When I click on the link: https://example.com/abcd on android version 6/7/8 it shows disambiguation dialog. We have already verified domain by placing json at: https://example.com/.well-known/assetlinks.json. I've done everything as per the documentation and still the link doesn't open without disambiguation. Please help me find what I'm missing.
Code in manifest:
<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="example.com"
android:pathPattern="/abcd"
/>
</intent-filter>
Late to the party but I too experienced the disambiguation always popping up. For those who haven't managed to resolve this yet (or to come), go to Logcat and search for "IntentFilterIntentOp". You should be seeing something like Verification 8 complete. Success:true. Failed hosts:. This may fail (Verifying IntentFilter. verificationId:8 scheme:"https" hosts:"example.co.za" package:"za.co.example.qa".) if you've uploaded your assetlinks.json file to one domain whilst it's not accessible on other or subdomains that you've registered in your intent-filter.
It's also worth mentioning that your App would have to have been launched at least once before in order for "IntentFilterIntentOp" to perform the necessary verification. Accessing a link via App Link Testing in Android Studio should thereafter automatically open your app without the disambiguation dialog.
update as of 2021 with Android 12:
Android changed web intent resolution policy that effects link handling, if you follow all the new requirements your app will be given a chance if not browser will handle those, more on this here:
web intent resolution requirements
/////////////////////Below behavior might still apply today//////////////////////
The Caveat here is if you install the app through playstore the default "link-handling policy" of the application with registered domains like www.example.com is set to "Handle in the app", which will open the app directly subject to intent filter verification without any disambiguation dialogues.
If you install the app by means other than playstore like through adb even though you sign it with keystore the default link handling policy is set to "Always ask" which will show disambiguation dialog even though the intent-filter verification passes for your app link.
Please try to add autoVerify="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="https"
android:host="example.com"
android:pathPattern="/abcd"
/>
you can try like this, both http and https:
<activity
android:name=".ui.MainActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="www.oschina.net"
android:scheme="http" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="www.oschina.net"
android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="my.oschina.net"
android:scheme="http" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="my.oschina.net"
android:scheme="https" />
</intent-filter>
</activity>
Got the same issue. Take a look at your sha256 fingerprint. If you test applinks with debug version of the app then you have to place the fingerprint for debug version. You can do it in Android Studio - Tools - App Links Assistant - Associate website.
When you run your app with Android studio, it is installed a debug APK on your device which might match the live config (which is for release APK or bundle) on your branch dashboard.
To handle de the debug (or test) mode in branch this is what I did
Setup test configuration in your branch dashboard:
On the top left on the dashboard there is a switch to access the test mode, click on it and fill the form for the test config.
Next create a debug link. The field values should be the same as for a live (release) mode link. the only difference the generated test link contains a prefix
yourapp.test-app.link/xxxxx
Create two Android manifest files for each type of APK or bundle:
app/src/debug/AndroidManifest.xml <- for debug APK or bundle
app/src/main/AndroidManifest.xml <- for release APK or bundle
Do the Branch SDK setup on both two manifest files
You should now be able to use the debug link without the disambiguation prompt showing
I need to open my application when clicked the URL Link in E-mail, Message or Browser applications. So, see the my code for this feature:
<activity
android:name=".ui.main.MainActivity"
android:configChanges="orientation"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="https" />
<data android:scheme="https" android:host="www.mysite.org"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.APP_EMAIL"/>
<category android:name="android.intent.category.APP_MESSAGING"/>
<category android:name="android.intent.category.APP_BROWSER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
This code is sufficient and works on some mobile devices, especially devices with android versions 5.0, 6.0 and 7.0 but does not work on versions 7.1 and 8.0. Why does this happen? Is it a permission problem?
Ex: Your url will be something like https://example.com and you have the intent filter in Android Manifest as below:
<activity
android:name="com.droid.MainActivity"
android:label="#string/app_name" >
<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:host="example.com"
android:scheme="https" />
</intent-filter>
</activity>
Use the URL Mapping editor to easily add URL intent filters to your Activities with Android App Links (Android Studio > Tools > Android App Links).
After reading changes in Android O I came to the conclusion that the problem is described as follows
URIs cannot contain empty labels. Previously, the platform supported a
workaround to accept empty labels in host names, which is an illegal
use of URIs. This workaround was for compatibility with older libcore
releases. Developers using the API incorrectly would see an ADB
message: "URI example..com has empty labels in the hostname. This is
malformed and will not be accepted in future Android releases."
Android 8.0 removes this workaround; the system returns null for
malformed URIs.
So try adding android:label="string resource" to your intent-filter syntax so the user will see it in the alternatives menu.
basically l would like my app to appear in the Android's sharing menu so that images shared from the device's gallery can be displayed in my app.
To achieve this I added an intent-to my application's AndroidManifest.xml. The description of the main activity now looks like this:
<activity android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation" android:label="AppName" android:name=".AppActivity" android:theme="#style/Theme.Titanium">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</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:mimeType="image/*"/>
<data android:scheme="content"/>
</intent-filter>
Unfortunately my application does not appear in the list of apps that can handle images. Neither on the device nor the emulator. On my Android device this list is displayed at least whereas the emulator directly opens the messages app without giving me the possibility to choose an app.
Am I missing something that is important for the system to recognize my app correctly for image content types?
Further information: - Titanium SDK: 3.1.0.GA - Mac OS X: 10.8.4 - Android Device: 2.3.3 - Android Emulator: 4.2.2
2 Steps for this
1- Clean your code and run the app in emulator or device. In build > android folder you will see a AndroidManifest.xml file. copy that file. make a folder in resource named platform then android folder inside platform folder and paste xml file in it.
2- Here is the code of my app
<activity android:name=".VocabulizrActivity"
android:label="Vocabulizr" android:theme="#style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
Please add the code written in tags. It worked for me as I posted the same Question once .. There are 2 more mimeType since you are using images so you can use this
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/png" />
Here is My Question's Link
I have an app which has been deployed to Play and is compatible with any device running 2.1 or later; no special restrictions or requirements defined in AndroidManifest.xml.
There have been several complaints from users trying to install the app via Google Play but getting messages that it is not compatible. In all of these cases sideloading the app works perfectly.
Digging a little deeper into the problem it appears that in all cases, the people reporting the problem are using a device that did not ship with Google Play installed. IE. the device probably failed Google's CTS.
Having said that, they are able to install other apps via Google Play but not ours. Again, sideloading our app onto these devices works fine. Does anybody know why this might be? I assume it must be something I am doing incorrectly in AndroidManifest.xml but I see nothing suspicious.
EDIT: Here's the AndroidManifest.xml, altered to protect the names of the innocent:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.foo.bar"
android:versionCode="1"
android:versionName="#string/global_app_version">
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="10"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="#string/global_app_short_name" android:icon="#drawable/app">
<activity android:name=".HomeActivity"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter android:label="#string/global_app_short_name">
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".AActivity"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter android:label="#string/global_app_short_name">
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
</activity>
<activity android:name=".BActivity"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter android:label="#string/global_app_short_name">
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
</activity>
<activity android:name=".CActivity"
android:launchMode="singleTask"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="stateHidden">
<intent-filter android:label="#string/global_app_short_name">
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
</activity>
<activity android:name=".DActivity"
android:launchMode="singleTask"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter android:label="#string/global_app_short_name">
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
</activity>
<activity android:name=".EActivity"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter android:label="#string/global_app_short_name">
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
</activity>
<activity android:name=".FActivity"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter android:label="#string/global_app_short_name">
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
</activity>
<!-- This activity is invoked whenever an xxx is opened -->
<activity android:name=".GActivity"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter android:label="#string/global_app_short_name">
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:mimeType="application/xxx"/>
<data android:mimeType="application/yyy"/>
<data android:mimeType="application/zzz"/>
<data android:mimeType="application/aaa"/>
<data android:mimeType="application/bbb"/>
</intent-filter>
</activity>
</application>
</manifest>
I found the culprit - Copy Protection was enabled. From Google's notes on the setting:
http://developer.android.com/guide/google/play/filters.html
To copy protect an application, set copy protection to "On" when you
configure publishing options for your application. Google Play will
not show copy-protected applications on developer devices or
unreleased devices.
In other words, having to side-load Google Play is just a side effect of being an "unreleased device" / device that fails the Google CTS. In any case, disabling copy protection resolved the issue.
Maybe the hardware they are running is not compatible with your app? Maybe you require a touch screen and they don't have it; maybe you require telephony and they don't have it?
Note that depending on your target api you might get some implicit hardware requirements.
Anyway, trying to get a log from them would be most helpful!
Maybe the affected users can try and reset the Google Play Store app on their devices:
Menu --> Settings --> Apps --> Google Play Store
Then click "Force close" and "Clear data"
Then start Google Play Store again, login, and try to install your app again.
If you have any in-app products or if you are selling the application for money then Google Play automatically filters you out of certain countries it doesn't support billing for. You can email Google to ask here.