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>
Related
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
Trying to upload instant application but getting this error
You should have at least one active APK that is mapped to site 'sample.com' via a web 'intent-filter'.
<activity
android:name=".ui.InstantSplash"
android:screenOrientation="portrait"
android:theme="#style/splashScreenTheme">
<meta-data
android:name="default-url"
android:value="https://sample.com/base-app/salt_one" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter
android:autoVerify="true"
tools:targetApi="m">
<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" />
<data android:host="sample.com" />
<data android:pathPrefix="/base-app" />
<data android:scheme="https" />
</intent-filter>
</activity>
Upload installable APK in alpha, beta or production with same HOST web 'intent-filter'.
You are defining an Intent filter with the scheme and host:
<data android:scheme="http" />
<data android:host="sample.com" />
so you have to access your deep links with
http://sample.com
but this domain must be a valid domain, and this domain must be of your property because you need to add the assetlinks.json
The website www.example.com publishes a statement list at
https://www.example.com/.well-known/assetlinks.json. This is the
official name and location for a statement list on a site; statement
lists in any other location, or with any other name, are not valid for
this site. In our example, the statement list consists of one
statement, granting its Android app the permission to open links on
its site:
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target" : { "namespace": "android_app", "package_name": "com.example.app",
"sha256_cert_fingerprints": ["hash_of_app_certificate"] }
}]
Read more about it:
https://developers.google.com/digital-asset-links/v1/getting-started#quick-usage-example
Instant apps does not support HTTP. Your default-url should be HTTPS
<meta-data
android:name="default-url"
android:value="https://sample.com/base-app/salt_one" />
Your app must also define a default URL for your app. Within the same Android manifest as your entry-point activity, you define the default URL for your app by adding a element with a value attribute that provides a valid HTTPS URL that the activity can handle. Further, this default url must also be part of the CATEGORY_LAUNCHER activity's intent filter in the installed app.
The following code snippet shows an Android manifest that defines an entry-point activity and default URL for an instant app.
<activity
android:name=".MainActivity">
<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="http" />
<data android:scheme="https" />
<data android:host="example.com" />
</intent-filter>
<meta-data
android:name="default-url"
android:value="https://www.example.com/index.html" />
</activity>
Instant apps does not support HTTP. Your default-url should be HTTPS
For more details can you check android AIA documentation.
There is some inappropriate string for error message, can you ensure fix with, installable APK in alpha, beta or production with same HOST web 'intent-filter'.
My problem is that uploading my signed APK for my android instant app to google play console gives me the following error:
Your site 'anam-instant.mybluemix.net' has not been linked through the Digital Assets Link protocol to your app. Please link your site through the Digital Assets Link protocol to your app.
I have a single base module, with the AndroidManifest.xml intent filter as follows:
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter
android:autoVerify="true"
android:order="1" >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="https" />
<data android:scheme="http" />
<data android:host="MYURL.net" />
<data android:pathPrefix="/hello" />
</intent-filter>
<meta-data
android:name="default-url"
android:value="https://MYURL.net/hello"/>
At /.well-known/assetlinks.json
[
{
relation: [
"delegate_permission/common.handle_all_urls"
],
target: {
namespace: "android_app",
package_name: "com.example.anam.my_instantapp",
sha256_cert_fingerprints: ["SHA256-CERT"]
}
}
]
I have Google app signing enabled and got my sha256 cert from there, using the Upload certificate.
I have verified that the package name is the same as the package name in the base module's AndroidManifest.xml.
I have verified that my robots.txt allows all.
I'm trying to release this under Instant app development.
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)