I am trying to setup applinks in my android app. In my manifest file I have something like this:
<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="myapp.example.com" />
</intent-filter>
So my question is where EXACTLY will the app try to download the assetlinks.json file:
a - https://myapp.example.com/.well-know/assetlinks.json
b - https://example.com/.well-know/assetlinks.json
c - https://www.example.com/.well-know/assetlinks.json
Thanks for your help
According to this Google Guide, it'll try to download from:
https://myapp.example.com/.well-known/assetlinks.json
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.
I have some difficulties while importing my first APK on Play Store. A simple WebView App.
I have this error message :
Importation error.
The domain name "https://chimeria.net" you specified is not valid
Enter a valid domain name.
Where https://chimeria.net is the url of the embeded website in the WebView...
After the documentation I read (https://developers.google.com/digital-asset-links/v1/getting-started):
I created a json file at
https://chimeria.net/.well-known/assetlinks.json
I took the SHA256 value from My Developer play store page, at the tab Application Signature.
screenshot of where i picked up the SHA546 KEY
I added this line in the AndroidManifest.xml of the app:
<meta-data android:name="asset_statements" android:resource="#string/asset_statements" />
I added this in the res/values/strings.xml file of the app
<string name="asset_statements">
[{
\"relation\": [\"delegate_permission/common.share_location\"],
\"target\": {
\"namespace\": \"web\",
\"site\": \"https://chimeria.net\"
}
}]
</string>
Later in my manifest file, I declared
<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="https://chimeria.net" />
<data android:scheme="https" />
</intent-filter>
The app was created with Android Studio (Android App Bundle) that gave me an .aab file.
No matter what I tried, my app was refused because the link was not accepted.
And finnaly I wasted all possible attemple in a day.
Would somebody know what I am doing wrong ?
Thanks you for your help
chimeria.net is the host, https or http is the scheme.
You probably want to change your manifest to:
<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="chimeria.net" />
<data android:scheme="https" android:host="chimeria.net" />
</intent-filter>
I have implemented Deep link in my application in manifest file I have define intent-filter like this
<activity
android:name=".activity.ProfilePreviewActivity"
android:theme="#style/AppTheme.ActionBar.Transparent">
<intent-filter android:autoVerify="true" android:label="#string/app_name"
tools:targetApi="m">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:host="appsdata2.cloudapp.net"
android:scheme="https"
/>
</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="appsdata2.cloudapp.net"
android:scheme="http"
/>
</intent-filter>
</activity>
Now Problem is :
I have define scheme for both and also added android:autoVerify="true"
In Android 6.0.1 With app install
https scheme - url open app and work perfect
http scheme - url open browser not the actual App ? Am I missing something?
I have follow https://stackoverflow.com/a/39486914/1293313 but no luck
and In Android 7.1.1 With app install
https scheme - url open app and work perfect
http scheme - url open app and work perfect (edited)
First check the link is reachable by adb or not by using:
adb shell am start -n com.example.simon.test/.activity.ProfilePreviewActivity
Just try below code because chrome has some issues in opening links.
<activity
android:name=".activity.ProfilePreviewActivity"
android:theme="#style/AppTheme.ActionBar.Transparent">
<!-- For chrome 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:host="appsdata2.cloudapp.net"
android:scheme="http"
android:pathPrefix="/"/>
</intent-filter>
<!-- For adb -->
<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="appsdata2.cloudapp.net"
android:scheme="http"/>
</intent-filter>
</activity>
Try to test the links form the browser
I'd like to register my Ionic app (through Cordova) to open certain file types. Just like Dropbox does. When a user has a file on another application (like email), and he clicks 'open with', there's a list which contains the Dropbox app.
Heres a tutorial from Apple: https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html
Is there any Cordova plugin that support both Android and iOS and gives a JS API to that feature? Thanks in advance.
You can achieve FileType association in Cordova.
It includes 2 steps.
1) register files in Android Manifest / iOS plist as
Manifest
<intent-filter
android:icon='#drawable/ic_launcher'
android:label='AndroidMHT File'
android:priority='1'>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="*/*" />
<data android:pathPattern="*.mht" />
</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="http" android:host="*" android:pathPattern=".*\\.mht" />
<data android:scheme="https" android:host="*" android:pathPattern=".*\\.mht" />
</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="message/rfc822" android:scheme="http" />
<data android:mimeType="multipart/related" android:scheme="http" />
<data android:mimeType="message/rfc822" android:scheme="https" />
<data android:mimeType="multipart/related" android:scheme="https" />
</intent-filter>
plist
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>Document-molecules-320.png</string>
<string>Document-molecules-64.png</string>
</array>
<key>CFBundleTypeName</key>
<string>Molecules Structure File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.sunsetlakesoftware.molecules.pdb</string>
<string>org.gnu.gnu-zip-archive</string>
</array>
</dict>
</array>
2) Use the File Opener Plugin for Cordova
You may need to pass necessary flags to open those files.
Reference: Android, iOS and a phonegap community forum thread
Hope it helps.
check this link.
Regarding Let'sRefactor its is correct except for fileopener , in the intent you should identify what function to call ( in native of-course ) when a user open file with your app.
It is all explained in the link above.
Any ideas why I get this error when I call getSession().startAuthentication() for the Android Dropbox SDK?
: FATAL EXCEPTION: main
: java.lang.IllegalStateException: URI scheme in your app's manifest is not set up correctly. You should have a com.dropbox.client2.android.AuthActivity with the scheme: db-CHANGE_ME
Yet my AndroidManifest.xml has the following within the <Application></Application> as instructed in the getting started instructions.
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:launchMode="singleTask"
android:configChanges="orientation|keyboard">
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="db-MYKEYISHERE" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
If you're actually seeing "db-CHANGE_ME" (i.e. that's not a placeholder you used to obscure your app key), then it means you haven't updated the app key in the Java code of your app. That error message outputs the key which was provided in the Java code, and expects it to match the key in the manifest.
Your clean build might've picked some Java changes which weren't previously built.
For those facing this problem, if you're like me you might not pay attention to a little detail, take a look at your manifest:
<intent-filter>
<data android:scheme="db-APP_KEY" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
You shouldn't replace the whole string db-APP_KEY with your app key, you should leave db- there db-{HERE YOUR APP KEY} I know I know, it took me a while to figure out this.
Example:
<intent-filter>
<data android:scheme="db-hafsa324dasd" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
When I copied the App_ Key I forgot to add the 'db' part to my answer.
Example:
<data android:scheme="db-APP_KEY" />
Should be :
<data android:scheme="db-hafsa324dasd" />
Should Not Be :
<data android:scheme="hafsa324dasd" />
No idea why this should be the case but a project clean did the trick (I added the code to the manifest days ago and cleaned several times since)