I want to verify my app links as these are directly opening in browser in Android 12. I referred this documentation to verify my app links. But it still shows 0 verified links in my app info. Below is my code of SplashActivity in manifest file
<activity
android:name="in.powerplay.splash.SplashActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/SplashTheme"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<data android:host="portal.getpowerplay.in" />
<data android:host="profile.getpowerplay.in" />
<data android:scheme="https" />
<data android:scheme="http" />
<data android:scheme="app" />
<data android:scheme="pp" />
</intent-filter>
</activity>
I also added the links in assets.json file and you can see in the below screenshots that it's working fine
screenshot 1
screenshot 2
Any help would be appreciated. Thanks in advance!
Related
I'm trying to use <nav-graph> generator to generate <intent-filter> elements in my AndroidManifest.xml
In one of the fragments in my nav_graph.xml, I added:
<deepLink app:uri="axzae://notifications" />
In the generated APK, the AndroidManifest.xml looks like below
<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="axzae" />
<data android:host="notifications" />
<data android:path="/" />
</intent-filter>
Now, the problem is with the additional android:path="/". It made the app only respond to axzae://notifications/ but not axzae://notifications (take note of the ending slash)
Is there anywhere I can make <nav-graph> to support axzae://notifications deeplink or without generating the <data android:path="/" /> line?
apparently, jetpack navigations can't resolve the generated axzae://notifications/. the app launched but it will always open up your startDestination. so it's actually broken.
another thing to note is it works fine for second-layer deep links. Example axzae://notifications/settings will work fine.
I will resort to a workaround for now by manually populating the TLD/host-only deep links in AndroidManifest.xml
<activity
android:name=".ui.MainActivity"
android:exported="true"
android:theme="#style/Theme.App">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<nav-graph android:value="#navigation/nav_graph" />
<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="axzae" />
<data android:host="home" />
<data android:host="notifications" />
...
</intent-filter>
</activity>
I am facing the below issue while publishing the Instant app from Google Play Console.
The same app is published before without any error. Please check the manifest content of the Instant app. Domain masked for privacy.
The default URL is set in Instant and main app as well. FYI, the source code for Instant and main is different.
<activity
android:name=".InstantPaymentHome"
android:windowSoftInputMode="adjustResize"
android:configChanges="locale"
android:exported="true">
<meta-data
android:name="default-url"
android:value="https://www.mydomain.com.sa" />
<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="mydomain.com.sa"
android:pathPattern="/pay" />
</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="www.mydomain.com.sa"
android:pathPattern="/pay" />
</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="http"
android:host="mydomain.com.sa"
android:pathPattern="/pay" />
</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="http"
android:host="www.mydomain.com.sa"
android:pathPattern="/pay" />
</intent-filter>
</activity>
So I faced the same issue and after some trial and error I have managed to get passed it
My setup was quite similar to the OP
The problem, I believe, is that the URL defined in <meta-data android:name="default-url" android:value="https://www.mydomain.com.sa" /> does not exactly match the one defined in the <intent-filter> because the <intent-filter> has android:pathPattern="/pay" so the URL defined by the intent-filter is "https://www.mydomain.com.sa/pay" but default-url is "https://www.mydomain.com.sa" without the /pay
So the solution that worked for me is to change the default-url to this
<activity ...>
<meta-data
android:name="default-url"
android:value="https://www.mydomain.com.sa/pay" />
....
</activity>
I have found a much cleaner solution. Just add the /.* to the pathPattern as below. The rest of the default-url and other remains remain the same.
<data
android:scheme="https"
android:host="www.example.com.sa"
android:pathPattern="/pay/.*" />
This has solved the problem I was facing.
Adding the wild character /.* will match any URL with a pattern like below
http://www.example.com/pay/en?amount=67&number=06737364646
http://www.example.com/pay/ar?amount=67
http://www.example.com/pay?amount=67
I'm building a app with sounds to be shared via WhatsApp, it's almost done, however is missing a single thing, that I already tried everything, but nothing seems to work.
I wanna that when the user click on share button of own whatsApp (the one that is a clip) my app be listed on list of possible apps to do that action, this way:
I already tried
use a intent filter on a activity like
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="audio/*" />
</intent-filter>
and too
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="audio/*" />
</intent-filter>
however my app wasn't shown, I already saw that is possible with other apps, I'm just doing something wrong.
How I can do to make my app be listed? Anyone knows?
Really Thx.
Note - the image is just a example, not a real one 'cause I can't print the screen of a real device, then I found this one on internet :(
EDIT 1
I tried this way too, but did not work
<activity
android:name=".activities.HomeActivity"
android:exported="true">
<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.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.OPENABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
</intent-filter>
</activity>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="audio/*" />
</intent-filter>
//and too
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="audio/*" />
</intent-filter>
Replace With below code
//this is to get text from other app
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
</intent-filter>
For more idea here is an official document form android : https://developer.android.com/training/sharing/receive.html
<intent-filter android:label="#string/app_name">
<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="olacabs.com" android:pathPrefix="/app/launch" />
<data android:scheme="olacabs" android:host="app" android:pathPrefix="/launch" />
</intent-filter>
this is the manifest file of an android app ! how to open this app via my website?
for example i opened linkedin app using this code
Linkedin
same way i need to open above app also ! how to do that . i have tried with
OLA
OLA
OLA
please help me , thanks in advance
I'm not sure if you have figured out by now, but the correct way to have the same activity handle 2 or more URIs is to have multiple intent-filters:
<intent-filter android:label="#string/app_name">
<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="olacabs.com" android:pathPrefix="/app/launch" />
</intent-filter>
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="olacabs" android:host="app" android:pathPrefix="/launch" />
</intent-filter>
I'm currently writing an Android App and it should open Files with the ending .meetme
Actually it should open them directly from Gmail, but I don't think that is possible.
This is the Code of my AndroidManifest.xml:
<activity android:name=".MeetingRequest" android:label="Meeting Request">
<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="file" />
<data android:mimeType="*/*" />
<data android:host="*" />
<data android:pathPattern=".*\\.meetme" />
</intent-filter>
</activity>
I've tried quite a few variations, if I open the file in Astro wit h a long click and open as text, my app shows up and can open it normally.
Would be grateful for any help.
Markus
After a lot of trial and error and reading nearly everything I could find, here's what finally worked for me:
<activity android:name=".DrawActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<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"/>
<action android:name="android.intent.action.EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:pathPattern="*.snowdragon"/>
<data android:mimeType="text/snowdragon"/>
</intent-filter>
</activity>