Instant App publish error - android

When i publish preview version, play store tip:
You must use at least one APK that maps to the "example.com" site via the network "intent-filter".
It no problem on develop version.
<activity android:name=".MainActivity">
<meta-data
android:name="default-url"
android:value="https://example.com/"/>
<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:host="example.com"
android:pathPattern="/"
android:scheme="https"/>
<data android:scheme="http"/>
</intent-filter>
</activity>

because it is the test phase, so the online version of the installation App has not added default url. add default-url to installation App manifest.xml it will be ok.

Related

Deeplink errors displayed on Google Console different from in AndroidManifest.xml

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.

Firebase crashlytics error with msal library in android manifest

I have weird issue happens only on one phone, but it application was working for months on this phone Samsung Galaxy s8 for a long time. Reinstalls doesn't give the solution. Install previous version doesn't work as well. It works on other phones. What happens, how to fix it?
error from crashlytics:
Fatal Exception: com.microsoft.identity.client.exception.MsalClientException
Intent filter for: BrowserTabActivity is missing. Please make sure you have the following activity in your AndroidManifest.xml <activity android:name="com.microsoft.identity.client.BrowserTabActivity"> <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="com.example.deepdiveandroid" android:path="mypath" android:scheme="msauth" /> </intent-filter> </activity>
com.microsoft.identity.client.PublicClientApplicationConfiguration.checkIntentFilterAddedToAppManifestForBrokerFlow (PublicClientApplicationConfiguration.java:591)
My androidmanifest.xml
<activity
android:name="com.microsoft.identity.client.BrowserTabActivity">
<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="msauth"
android:host="com.example.myname"
android:path="/M41ng+ad69kgXmsY1eacX8frPLy=" />
</intent-filter>
</activity>
*it happens after just open the app
**path is changed to random, normally it is different.

Intent.action.VIEW does not work on some devices

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.

Deep link not open app in http scheme

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

Android : Paypal Express checkout integration not working

I am integrating paypal express checkout to my android studio project.
Added dependencies compile 'com.braintreepayments.api:braintree:2.+'
Added below code in manifest.xml
<activity android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<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="${applicationId}.braintree" />
</intent-filter>
</activity>
Finally calling paypal fragment using below code
BraintreeFragment mBraintreeFragment = BraintreeFragment.newInstance(PayActivity.this, tokenValue);
PayPalRequest request = new PayPalRequest(amount.getText().toString())
.currencyCode("USD");
PayPal.requestOneTimePayment(mBraintreeFragment, request);
But the app is not redirecting to the paypal screen.
Can you guys please let me know what else i need to do to achieve this.
Thanks.
<activity android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<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="com.myhomework.myhomework.braintree" />
</intent-filter>
</activity>
your data android:scheme = should be equal to ua package name.braintree.. and if your packagename or package id has capitalised letters please use small

Categories

Resources