MediaManager is already initialized
Closed this issue · 3 comments
Hi.. I am using Media manager while uploading it was quite good.. When i take picture for upload first time it upload to cloud ,but when i take picture second time it shows mediamanager is already initialized.
10-12 13:00:09.702 13540-13540/com.taggery W/System.err: java.lang.IllegalStateException: MediaManager is already initialized
at com.cloudinary.android.MediaManager.init(MediaManager.java:169)
at com.cloudinary.android.MediaManager.init(MediaManager.java:123)
at com.taggery.fragment.FilterFragment.CloudinaryUpload(FilterFragment.java:561)
at com.taggery.fragment.FilterFragment.setPic(FilterFragment.java:436)
10-12 13:00:09.703 13540-13540/com.taggery W/System.err: at com.taggery.fragment.FilterFragment.init(FilterFragment.java:202)
i am using fragment for uploading..
Hi @AjithNoah ,
The MediaManager.init()
method must be called once per application lifecycle before using the Android library, preferably in Application.onCreate()
.
For more information, please see our docs:
https://cloudinary.com/documentation/android_integration#setup
Please let me know if it works for you.
Cheers,
Yakir
Thanks for the update, glad I could help.