distriqt / airnativeextensions

DEPRECATED: Original repository of the distriqt native extensions and is no longer maintained. Please see our site for the latest ANEs
https://airnativeextensions.com
2 stars 0 forks source link

Calendar extension not creating event without UI on Android #263

Closed orlioto closed 9 years ago

orlioto commented 9 years ago

Hello,

I have experienced the following problem: When trying to add an event using the Calendar.service.addEvent(e) method on Android devices nothing happens. addEventWithUI() works fine and both methods were tested on iOS and work OK. Tested on Android 4.4.4 and 4.1.2 the without UI method does not seem to work.

Any ideas? Thank you Orlin

marchbold commented 9 years ago

Hi, Can you show me the properties you are using on the event? Cheers

orlioto commented 9 years ago

Hi, most of it is as described in the example:

var e:EventObject = new EventObject(); e.title = "TEST EVENT"; e.startDate = new Date(); e.endDate = new Date(); e.startDate.hours = e.startDate.hours; e.startDate.minutes = e.startDate.minutes + 3; e.endDate.hours = e.endDate.hours+1;

var a:EventAlarmObject = new EventAlarmObject(); a.offset = -1; e.alarms.push( a );

Calendar.service.addEvent(e);

Cheers

simonuria commented 9 years ago

hi, on my galaxy s3 and galaxy tab2 both with android 4.1.2 everything works fine bur on my galaxy s4 with android 4.4.2 when i want to run the testCalendar.apk the app stops - what happens ? please help. thanx

regards simon

marchbold commented 9 years ago

@simonuria Is this related to this issue? If not could you create another issue. Please include more information about where the application stops and if possible the logs from the device. Cheers

marchbold commented 9 years ago

@orlioto Could you post the logs from the device you are testing on? I've just confirmed it is working on 4.x so will need some more information to chase down this error.

simonuria commented 9 years ago

hi, thanx for your answer ! i googled and find out that i had the wrong air sdk for android 4.4 - so i updated in flash to air 15 and everything works fine:))))))))

orlioto commented 9 years ago

After inspecting the log I figured it out myself. It was a missing permission in the xml. Thank you! Cheers!

marchbold commented 9 years ago

Good to hear @orlioto !

I'll have a look into making sure the isSupported flag correctly checks this.