Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Problem with OneDrive SDK for Android SDK 31+ #167

Closed
isabsent opened this issue Mar 15, 2022 · 1 comment
Closed

Problem with OneDrive SDK for Android SDK 31+ #167

isabsent opened this issue Mar 15, 2022 · 1 comment

Comments

@isabsent
Copy link
Contributor

I am using your com.onedrive.sdk:onedrive-sdk-android:1.3.1 to access OneDrive cloud from my Android application. All is OK if targetSdkVersion 30 or less. For targetSdkVersion 31 and more I have this error:

Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

List of apks:
[0] '/home/lev/StudioProjects/explorer/app/build/outputs/apk/debug/app-debug.apk'
Installation failed due to: 'INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: 
/data/app/vmdl1023808381.tmp/base.apk (at Binary XML file line #749): com.microsoft.aad.adal.ApplicationReceiver: Targeting S+ 
(version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'

As I understand the reason is

compile ('com.microsoft.aad:adal:1.1.7') {
    exclude module: 'com.microsoft.aad'
}

in your OneDrive SDK which has class com.microsoft.aad.adal.ApplicationReceiver with a receiver declared in the manifest of this package:

    <receiver
        android:name = "com.microsoft.aad.adal.ApplicationReceiver">
        <intent-filter>
            <action android:name="android.intent.action.PACKAGE_ADDED"/>
            <action android:name="android.intent.action.PACKAGE_INSTALL"/>
            <data android:scheme="package"/>
        </intent-filter>
    </receiver> 

where android:exported="true" should be added to avoid this bug. Can you make this change to your library?

@baywet
Copy link
Member

baywet commented Oct 2, 2024

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #172 for more information

@baywet baywet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants