Closed kartagis closed 7 years ago
Should be permission issue. If a call to getLibrary returns permission error, you should call requestAuthorization. Something like this:
cordova.plugins.photoLibrary.getLibrary(
function (library) { },
function (err) {
if (err.startsWith('Permission')) {
// call requestAuthorization, and retry
}
// Handle error - it's not permission-related
}
);
Isn't this what --variable PHOTOLIBRARY_USAGE_DESCRIPTION='' does?
On 26 January 2017 at 11:08, viskin notifications@github.com wrote:
Should be permission issue. If a call to getLibrary returns permission error, you should call requestAuthorization. Something like this:
cordova.plugins.photoLibrary.getLibrary( function (library) { }, function (err) { if (err.startsWith('Permission')) { // call requestAuthorization, and retry } // Handle error - it's not permission-related } );
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/terikon/cordova-plugin-photo-library/issues/35#issuecomment-275329291, or mute the thread https://github.com/notifications/unsubscribe-auth/ABiHXnBXcuREdzPPNMtxopao1i0fkxgVks5rWFR-gaJpZM4LtQDV .
--
@kartagis all that does is set the message that will be shown on permission prompt. I havent tried this plugin yet but I think @viskin is right. Try querying for permission again.
@viskin @cozzbie aye, it was permission issue. After I use requestAuthorization, how do retry reading the library? getLibrary again?
I tried requestAuthorization, and called getLibrary in the callback, but it's way too slow on iOS. 19204ms to be precise (if not more).
Wow, 20sec...
1- It's only the time getLibrary runs 2- There are 1185 photos on my device
On Fri, 27 Jan 2017 at 21:29, viskin notifications@github.com wrote:
Wow, 20sec...
- Is it time getLibrary method runs, or also retrieving thumbnails?
- How many photos are on your device?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/terikon/cordova-plugin-photo-library/issues/35#issuecomment-275737959, or mute the thread https://github.com/notifications/unsubscribe-auth/ABiHXiIOHn4NFNe7yBr3DPhMw4sdmw4Kks5rWjedgaJpZM4LtQDV .
--
Moving to the other issue, as this is no more relevant
Hello, Although the code at https://jsfiddle.net/kartagis/pjdqp3ku/6/ loads up the images instantly on Android, it stalls at
ActivityIndicator.show()
on iOS, resulting in not showing any images.