Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure blob storage - Android support #27742

Closed
devzeze opened this issue Mar 18, 2022 · 10 comments
Closed

Azure blob storage - Android support #27742

devzeze opened this issue Mar 18, 2022 · 10 comments
Assignees
Labels
Android Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files)

Comments

@devzeze
Copy link

devzeze commented Mar 18, 2022

What SDK to use on Android?

I noticed the Android SDK is still referenced in the documentation https://github.com/Azure/azure-storage-java
But the last release was some years ago and it looks like SDK is not maintained anymore.

Are you supporting azure-storage for Android? And if yes what SDK should we use?

The Android SDK still works (implementation 'com.microsoft.azure.android:azure-storage-android:2.0.0@aar') but I am concerned about the future of this SDK and looks like is becoming a risk to rely on that.

I tried to use implementation 'com.azure:azure-storage-blob:12.14.4' and I got an exception:

java.lang.LinkageError: Package versions: jackson-annotations=0.0, jackson-core=0.0, jackson-databind=0.0, jackson-dataformat-xml=0.0, jackson-datatype-jsr310=0.0, azure-core=1.25.0, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot

However when I look at dependency tree the dependencies are there.

Thank you
Jose

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 18, 2022
@joshfree joshfree added Storage Storage Service (Queues, Blobs, Files) Client This issue points to a problem in the data-plane of the library. labels Mar 18, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 18, 2022
@joshfree joshfree added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. Android labels Mar 18, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 18, 2022
@joshfree
Copy link
Member

@amishra-dev could you please follow up?

/cc @anuchandy

@nishanthvasu
Copy link

nishanthvasu commented Mar 23, 2022

@devzeze I am also facing this issue. @joshfree @anuchandy @amishra-dev Can you please give update on this as soon as possible?

@izvictor
Copy link

izvictor commented Mar 28, 2022

Hello,
Do you have any news about this topic , we are facing the same dilemma? should we still use the Android SDK which seems not to be maintained ?
Thank you for your answer.
Regards.

@devzeze
Copy link
Author

devzeze commented Apr 15, 2022

Hi @joshfree , @amishra-dev any news regarding this topic?

@devzeze
Copy link
Author

devzeze commented May 23, 2022

Hi @anuchandy, any news regarding this topic?

@joshfree joshfree assigned jaschrep-msft and unassigned amishra-dev Dec 5, 2022
@joshfree
Copy link
Member

joshfree commented Dec 5, 2022

@jaschrep-msft is the right owner to follow up with on Storage

/cc @vcolin7 @anuchandy

@joshfree joshfree assigned vcolin7 and unassigned anuchandy Dec 5, 2022
@jaschrep-msft
Copy link
Member

The library found at https://github.com/Azure/azure-storage-android is relegated to community support and has been for many years at this point.

The library found at https://github.com/Azure/azure-storage-java has been deprecated in favor of the storage libraries found in this Azure SDK for Java repository.

Storage libraries found here do not officially support Android. While there exists an Azure SDK for Android repository, it supports very few services, not including Storage. There is currently no timeline on including Storage support for Android.

@vcolin7
Copy link
Member

vcolin7 commented Dec 5, 2022

@jaschrep-msft is correct, there are currently no officially supported Storage libraries for Android. You can technically use the Storage libraries for Java on certain Android API levels at your own risk as they were not designed to run on Android; also due to the fact that Reactor (one of our core dependencies) can only run on Android API level 26+ out of the box and 21+ with desugaring enabled.

@vcolin7
Copy link
Member

vcolin7 commented Dec 17, 2022

I spent a bit more time testing out whether it was possible to use the Java Storage library on Android. It turns out you can, but only in API levels 26 and 27, mainly because before level 26 you need to use desugaring for some Java APIs used by Reactor and our libraries and MethodHandles.invokeExact() (which we internally use) can only be desugared starting on level 26. On the other hand, the use of some external SDK APIs is restricted by Google starting on Android 28 (Pie), including two APIs we use in our Azure Core libraries:

Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;)V
Ljava/lang/invoke/LambdaMetafactory;->metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;

I must note I ran these tests the same Storage's version as you (12.14.4, the latest). You can try to use an earlier version of the library if you want it to work with newer Android versions that don't use the restricted APIs I mentioned (28+). As far as I know, the latest Azure Core version that does not use this is 1.22.0, which should be paired with com.azure:azure-core-http-okhttp:1.7.5 and com.azure:azure-storage-blob:12.14.2 (which isn't too far back from what you're using right now) to ensure everything works as expected.

I will be closing this issue for the time being as it is not really a bug, but feel free to open a feature request on the Android repository for supporting the Storage service, maybe with enough demand support can be added at some point in the future

@devzeze
Copy link
Author

devzeze commented Jan 2, 2023

Feature request created on Android repository.

Azure/azure-sdk-for-android#1272

If others also need the feature please go there and upvote.

Azure/azure-sdk-for-android#1272

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

8 participants