Deep link url define in debug Manifest is not working - android

It was working fine till we have single Manifest file now we have created different Manifest for different build variant now deep link for debug variant not working. Please help me on this.Thanks
Here is the Manifest file for debug
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.app.myapp">
<application
android:name=".MyApplication"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:allowBackup="false"
android:theme="#style/Theme.AndroidAppUser.Default"
tools:replace="android:allowBackup"
>
<activity
android:name=".ui.MainActivity"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:exported="true"
android:windowSoftInputMode="adjustPan"
android:hardwareAccelerated="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="mydomain.com"
android:pathPattern="/.*" />
</intent-filter>
</activity>
</application>
</manifest>

Related

Deeplinks with dynamic feature modules

As I'm splitting up the app I'm working on into multiple dynamic feature modules I would like each module to be able to handle its own deeplinks.
To test this I have added intent filters to two activities in a dynamic module and one intent-filter for an activity in the "main" module.
I would like to support three deeplinks:
testing://open/a
testing://open/a/b
testing://open/c/d
When trying to open one of the links android gives me 3 different options to open the links. I would however prefer that no options are given and the correct activity is opened. How can I achieve that?
Bonus question, are manifests from the dynamic feature modules merged with the one in the main module if it's included at install or downloaded later?
Dynamic feature module manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
package="com.testing">
<dist:module
dist:instant="false"
dist:title="#string/title">
<dist:delivery>
<dist:install-time />
</dist:delivery>
<dist:fusing dist:include="true" />
</dist:module>
<application
android:allowBackup="false"
android:largeHeap="true"
android:supportsRtl="true">
<activity
android:name=".activities.BActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter
android:autoVerify="true"
android:label="B">
<data
android:scheme="testing"
android:path="/open/a/b" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity
android:name=".activities.DActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter
android:autoVerify="true"
android:label="D">
<data
android:scheme="testing"
android:path="/open/c/d" />
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
</application>
</manifest>
And the main manifest like so:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
xmlns:tools="http://schemas.android.com/tools"
package="com.testing.customer">
<application
android:name=".App"
android:allowBackup="false"
android:appCategory="productivity"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:resizeableActivity="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
tools:targetApi="o">
<activity
android:name=".home.AActivity"
android:clearTaskOnLaunch="true"
android:exported="true"
android:label="A"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan">
<intent-filter
android:autoVerify="true"
android:label="A">
<data
android:scheme="testing"
android:path="/open/a" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
</application>
</manifest>

Build successful but crashes

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.harshil.home.myapplication">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.harshil.home.myapplication.CustomActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="com.harshil.home.myapplication.LAUNCH"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="http"/>
</intent-filter>
</activity>
</application>
What is wrong with above android manifest.xml?
Everytime my app is crashing. I m new to stackoverflow so didnt know how to post so i just copy pasted.
It was due to exception button which i created but running it second time from emulator or mobile it works fine! Thanks all!

App does not come up with http scheme

My manifest file is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ir.technovaa.offer">
<application
android:name=".OfferApplication"
android:allowBackup="false"
android:icon="#drawable/offer_icon"
android:label="#string/app_name"
android:supportsRtl="false"
android:theme="#style/AppTheme">
<activity
android:name=".activity.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.IntroductionActivity" />
<activity
android:name=".activity.CallbackActivity">
<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="offer.ir"
android:path="/refer"/>
</intent-filter>
</activity>
</application>
</manifest>
So, problem is in CallbackActivity, with the http scheme, CallbackActivity does not come up with a link, but if I change it to a custom scheme like android:scheme="offer" it works just fine and the activity will come up with the redirect link. So, what should I do for make http scheme works. Thank you.

How to edit manifest file to connect android application to google drive

I have been trying to connect my app to drive using this tutorial:. This tutorial redirects to this website: . I got stuck at point 4 where it asks to edit manifest and redirects here. It seems to me that instructions' aren't clear for the same. Could you please help me out on editing manifest.xml. Thanks.
My manifest.xml file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bignerdranch.android.drive_app" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Based on the tutorial that you are following, these are the changes you should make to your Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bignerdranch.android.drive_app" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<activity android:name=".MainActivity" >
<meta-data android:name="com.google.android.apps.drive.APP_ID" android:value="id=put-yourID-here" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.apps.drive.DRIVE_OPEN" />
<data android:mimeType="application/vnd.google-apps.drive-sdk.1234567890" />
<data android:mimeType="image/png" />
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/jpg" />
</intent-filter>
</activity>
</application>
</manifest>
By the way, the data android:mimeType elements are optional - but perhaps you will need these for the rest of the tutorial.

Android Studio doesn't install app with launcher, app only visible in app settings

Android Studio doesn't install app properly. It's not visible in the apps launcher. Already tried to keep only MAIN and LAUNCHER intent filter.
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:name=".App">
<activity
android:name=".ui.main.MainActivity"
android:label="#string/title_activity_navigation_drawer" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="mainactivity" />
</intent-filter>
</activity>
<activity android:name=".ui.web.WebViewActivity"/>
</application>
The solution was to define intent filters seperately:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:name=".App">
<activity
android:name=".ui.main.MainActivity"
android:label="#string/title_activity_navigation_drawer" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"></category>
</intent-filter>
<intent-filter>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="mainactivity" />
</intent-filter>
</activity>
<activity android:name=".ui.web.WebViewActivity"/>
</application>
Example in android documentation

Categories

Resources