-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Android] Calendar.findEvents missing id-filter #9
Comments
You must be running an older version of the plugin as the line you refer to is no longer the same in version 1.1.1. Please upgrade/clean and let me know what happens :) |
My bad, didn't notice the new version. Sorry! The id-filter is working fine with that version, but the permission-requesting ist strange on android. Also rejecting the permissions crashes the app: java.lang.RuntimeException: Unable to resume activity {de.hud.biff/com.tns.NativeScriptActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=123, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {de.hud.biff/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: TypeError: Calendar._reject is not a function StackTrace: I guess I stay with 1.0.7 and filtering the id by hand. If you need any information, just contact me. Greetings Torsten |
I added those loggings:
This is the result: "hasPermission call"
"createEvent call"
"findEvents call"
The problem is this:
you are calling the check-method with a string and not with an array. After changing it to
it works better. Now the popup still appears twice (once for read and one for write) but after this, it never appears again. |
You are right, that should have been an array! That's fixed now. Available in 1.1.2. About the 2 prompts: the plugin is asking permission for the action it wants to perform, so for If your app wants to do both things you can invoke the |
Hey,
I tried to load a freshly created event (the promise of create event returned "10"), so these options were given to findEvents:
JS: {"startDate":"1970-01-01T00:00:00.000Z","endDate":"2970-01-01T00:00:00.000Z","id":"10"}
According to the documentation:
/**
* Find events matched on ALL params passed in.
*/
this only should find id=10, but it lists every event for the time period. It looks like calendar.android.js is missing the check for the id in Calendar._findEvents line 130 following.
At the moment I cannot test if it works for ios but according to calendar.ios.js there is a check in Calendar.findEvents line 214.
Is this a bug, or is searching by id not supported on android? :)
Thanks for your support!
Torsten
The text was updated successfully, but these errors were encountered: