Closed mbelchuke closed 1 year ago
Hi @mbelchuke
In v2.6.4 there seems to be exported
tag in all of the activities mentioned in the log. Which version of the SDK are you using and did you try with v2.6.4?
Even if some exported
tags are missing you can try the node markers to modify merged manifest for now.
https://developer.android.com/studio/build/manage-manifests#node_markers
Please let us know if this helps.
Thanks
Hi. We are using 2.6.4
But it still seems to create the manifest file without exported
tag.
We've tried the merge node, but it doesn't seem to be working.
This is the manifest file created by version 2.6.4
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="eu.nets.pia" android:versionCode="160" android:versionName="2.4.0" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="30" />
<queries>
<package android:name="fi.danskebank.mobilepay" />
<package android:name="dk.danskebank.mobilepay.vendor.sprint" />
<package android:name="no.dnb.vipps.mt" />
<package android:name="no.dnb.vipps" />
<package android:name="se.bankgirot.swish" />
</queries>
<uses-permission android:name="android.permission.INTERNET" />
<!-- section-start-to-remove-by-script -->
<!-- permissions required by card scanner -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<!-- end -->
<!-- section-end-to-remove-by-script -->
<application
android:allowBackup="true"
android:supportsRtl="true" >
<activity
android:name="eu.nets.pia.ui.webview.PaytrailActivity"
android:configChanges="uiMode"
android:screenOrientation="portrait"
android:theme="@style/Pia.AppTheme" />
<activity
android:name="eu.nets.pia.ui.webview.ThreeDSecureActivity"
android:configChanges="uiMode"
android:screenOrientation="portrait"
android:theme="@style/Pia.AppTheme" />
<activity
android:name="eu.nets.pia.ui.webview.PayPalActivity"
android:configChanges="uiMode"
android:screenOrientation="portrait"
android:theme="@style/Pia.AppTheme" />
<activity
android:name="eu.nets.pia.ui.main.PiaActivity"
android:configChanges="uiMode"
android:screenOrientation="portrait"
android:theme="@style/Pia.AppTheme" />
<activity
android:name="eu.nets.pia.cardio.CardIOActivity"
android:configChanges="keyboardHidden|orientation|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Pia.AppTheme" />
<activity
android:name="eu.nets.pia.ui.wallet.WalletPaymentActivity"
android:configChanges="keyboardHidden|orientation|uiMode"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent" />
<activity
android:name="eu.nets.pia.wallets.MobilepayActivity"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent" >
<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="piasdk_mobilepay"
android:scheme="${applicationId}" />
</intent-filter>
</activity>
<activity
android:name="eu.nets.pia.wallets.VippsTestActivity"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent" >
<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="piasdk_vipps_test"
android:scheme="${applicationId}" />
</intent-filter>
</activity>
<activity
android:name="eu.nets.pia.wallets.VippsActivity"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent" >
<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="piasdk_vipps"
android:scheme="${applicationId}" />
</intent-filter>
</activity>
<activity
android:name="eu.nets.pia.wallets.SwishActivity"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent" >
<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="piasdk_swish"
android:scheme="${applicationId}" />
</intent-filter>
</activity>
</application>
Okay. Seems that you have some issues regarding your nuget package. If we uninstall the package and reference the DLL directly, it seems to be building and merging the manifest correctly with exported tag applied.
Though, there seems to be another conflict when doing this. It seems that the new DLL is missing these to methods:
public unsafe static ActivityResultContract CardPaymentActivityContractXamarin()
and
public unsafe static void StartCardProcessActivity(ActivityResultLauncher p0, CardProcess p1, Java.Lang.Boolean p2)
Hi @mbelchuke
Sorry for the late reply.
Try to modify your AndroidManifest.xml
as follows
Add xmlns:tools="http://schemas.android.com/tools"
attribute for <manifest>
element as shown below
<manifest xmlns:tools="http://schemas.android.com/tools" ...>
And then add below lines between <application>
and </application>
element
<activity
android:name="eu.nets.pia.wallets.MobilepayActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent"
tools:node="merge">
<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="piasdk_mobilepay"
android:scheme="${applicationId}" />
</intent-filter>
</activity>
<activity
android:name="eu.nets.pia.wallets.VippsTestActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent"
tools:node="merge">
<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="piasdk_vipps_test"
android:scheme="${applicationId}" />
</intent-filter>
</activity>
<activity
android:name="eu.nets.pia.wallets.VippsActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent"
tools:node="merge">
<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="piasdk_vipps"
android:scheme="${applicationId}" />
</intent-filter>
</activity>
<activity
android:name="eu.nets.pia.wallets.SwishActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/Pia.Theme.Transparent"
tools:node="merge">
<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="piasdk_swish"
android:scheme="${applicationId}" />
</intent-filter>
</activity>
Please let us know if this helps.
Thanks
Closing this issue as solved, feel free to reopen the issue if required
We can't seem to override the AndroidManifest.xml in Xamarin, to force the export tag to be added.
Is this something you are able to fix in the next release?
Xamarin Forms 5.0.0.2515 Android Target Framework Android 12.0