Catch info from google calendar. - Java for Android App Development

Hi,
I'm learning android app development, but still a newbie(know the basics), and i'm triing to do an alarm app that catches the info from google calendar and sets an alarm automaticly depending on the first event of the day.
So you configure the time like 1h before and it sets every day the alarma 1h before the first event on the calendar.
The problem is that i don't know how to catch the info from google calendar.
Anyone help?
Thanks in advance

So, as i wasn't capable of taking the info from google calendar and noone ansered, i've done it with tasker and root acces.
So i'll explain if someone is interested.
I run sqlite command in tasker thas gives me the info i want, in these case i'll be takin the hour and the day of the next events of an especific calendar.
Create profile at 00:00
-Run comand using root
sqlite3 -list /data/data/com.android.providers.calendar/databases/calendar.db "SELECT Instances.begin, calendar_id, Events.title FROM Instances JOIN Events ON Instances.event_id = Events._id WHERE Calendar_id=4 AND begin > %TIMEMS ORDER BY Instances.begin ASC LIMIT 5;" | awk -F "|" '{printf strftime("%H:%M %d",$1/1000)}{print " "}'
This returns 5 next events of the calendar with id=4 in these format
12:00 17
13:35 17
14:00 17
8:00 18
9:30 18
, if you want another calendar change Calendar_id=4 to the number you want or delete it if you want all calendars.
Where 12:00 is the hour and 17 the day of the month.
-After that separate variables and do an if the day of the month=%DAYM separate variable1 with : an set alarm.
Maybe i overexplained but like this i think is all clear if someone is trying more or less the same.

Related

Calendar / birthday help

Is there an easy way to enter someone's birthday date? Currently I have to scroll back through the years (cause default date is today) until I reach the date I'm after. Another thing is that when I do this from my ppc, I can't seem to be able to set an alarm, but the option's there in outlook. Finally, is there a way to search the calendar, was trying to find a certain apointment the other day, but couldn't remember the date so had to scroll through loads of days to find it. Thanks.
Entering a birthdate is as easy as editing the contact and in the field: Birthdate just enter the day month and year...
I am sorry, but the second thing: Searching for dates. I can't help you with that!

Android timezone change alters calendar times please vote

I was very disappointed to see that the android calendar has the same behaviour as the one on windows mobile in that if you change timezones then all your calendar appointments change by the difference between your previous and current timezone. I think this is an insane implementation and can't see any use to it.
It has been raised as an issue on the google android project so if you hate it as much as I do please vote for the issue by starring it and/or leave a comment asking for it to be high priority
http://code.google.com/p/android/issues/detail?id=5892
I don't understand the problem. The current implementation is exactly right. If the appointment times wouldn't change, your appointment would actually be shifted.
Are you having some special use case for your request?
krheinwald said:
I don't understand the problem. The current implementation is exactly right. If the appointment times wouldn't change, your appointment would actually be shifted.
Are you having some special use case for your request?
Click to expand...
Click to collapse
Say I am sitting here at home in Zurich and I am making entries for a trip to the US in multiple timezones, for each entry I put in my appointment times in local time, say a meeting at 3pm in NY.
I land in NY, take out the phone and it automatically switches to the NY timezone but the calendar is displaying the meeting now as 9am, thats useless, I want it to stick as 3pm, nor do I want to have to check the timezone for NY before I put the appointment in. When I travel I live in local time regardless of what timezone it is.
Same issues
I really have no idea why Google would do this. I mean you are exactly right, I input all meetnig time as timezone specific. Anyone that has any ideas on a solution would be appreciated? Thanks.
What you are supposed to do is create a calendar called "AMerican meetings" and one called "chinese meetings" lets say. the former will be set to former's time zone and the latter as whatever time zone china uses. IN this case when u create an event, it will use whatever is set on the web site/settings as the default for that calendar. BUT, the calendar itself will display whatever is set as the global "local time zone" on both the phone as well as the website (you can use the multiple time zone add on via labs for help with this too)...
Craziest thing
I have the same problem, except it took me an hour to find out what was going on, since I thought it was because of the Daylight Saving Time which just happened yesterday.
So - to reproduce the problem:
1) Set the timezone to TZ1
2) Create calendar event at time HH:MM
3) Set timezone to TZ2
Result - calendar event is shifted.
Whoever implemented this should quit his job and hide in the most forgotten place on earth. I mean - WTF?
I understand SOME use of this - I create a calendar event that I want to share with someone from another TZ, then it should be translated to that TZ, but again - WTF??
Most of the users need just this: I create an event - a flight schedule for coming back from vacation. I create it before going on vacation, then I go on vacation and change the TZ. On the return day my alarm will ring x hours after the intended time (if vacation place is eastwards) or x hours before if vacation place is westwards. INSANE
What's even more insane is how people suggest solutions like creating two separate calendars and so on.
Come on, as one guy was saying here:
http://www.google.com/support/forum/p/Calendar/thread?tid=7ee74ad36e5b62fa&hl=en
"How hard could it be to just have the option to allow my 3pm appointment stay 3pm on my calendar no matter where I am? Come on Google!"
Here's someone who almost missed his flight
http://www.androidguys.com/2010/01/21/fixit-google-calendar-time-zones/

Auto calendar scheduler

Hey i was wondering if theres an app or a way to automatically schedule my school schedule into the calendar from now until june. i dont want to add my classes day by day just wanted to see if i can set the calendar for say organic chemistry every tuesday from 1-230 pm from now until may 15
AGREED!!! The recurrence in the HTC calendar program sucks!
Couldnt you do this in outlook and then sync your phone? I always do it this way and it seems to save time. Not sure if that helped you or not...
eboy44 said:
Hey i was wondering if theres an app or a way to automatically schedule my school schedule into the calendar from now until june. i dont want to add my classes day by day just wanted to see if i can set the calendar for say organic chemistry every tuesday from 1-230 pm from now until may 15
Click to expand...
Click to collapse
This can be done easily in your phone's calendar: create the appointment on the first date and time, in "occurs" go to "edit pattern", then you can adjust the periode (in your case weekly), start and end date. That´s all.
thanks! exactly what i was looking for

Calendar reminder time options, is there a way to add more?

The default calendar gives us the possibility to set a reminder at some default times which most times I don't like. Is there a way to add more reminder time options?
Thank you!
If you mean other than the 5 minutes through to the 1 week options then the answer is no. You need to get another calendar app.
I installed Business Calendar, put the reminder 3 hours before, and again I got the pop up message 1 hour before. Is this impossible even with other calendars?

How to Sync All your Google Calendar to your Android Phone

Usually when you sync your events in the google calendar to your android, ONLY the last 30 events would show up. After all the researches and experiments that I did. I finally come up with a solution to the problem.
1. In P.C. edit the existing events from the oldest to the latest events in google calendar. You don't need to edit each event completely, it would also work by just putting punctuation marks in the tittle of the event or adding text to "where, description" box.
2. Sync it to the phone (Check if the edited events appeared).
3. Export P.C. google calendar (close google calendar then open it again, wait several seconds).
4. Delete all calendar entrees make sure that the file you downloaded is not corrupted, *.ics inside(close google calendar then, wait several seconds).
5. Create a new event.
6. Turn-off then on your phone.
7. Sync your phone calendar (goto system settings-> Account & sync-> press on sync Calendar), in you phone you will see 1 latest event.
8. Now, Import the *.ics file, that was exported from step 3
9. repeat step 7.
Done! All your events is now sync to your phone.
I've always had everything synced perfectly, 5 Google Calendars and everything is synced until at least 2014...
did it
It works!
thank you very much
That was sound. Thanks.
bitmappp said:
Usually when you sync your events in the google calendar to your android, ONLY the last 30 events would show up. After all the researches and experiments that I did. I finally come up with a solution to the problem.
1. In P.C. edit the existing events from the oldest to the latest events in google calendar. You don't need to edit each event completely, it would also work by just putting punctuation marks in the tittle of the event or adding text to "where, description" box.
2. Sync it to the phone (Check if the edited events appeared).
3. Export P.C. google calendar (close google calendar then open it again, wait several seconds).
4. Delete all calendar entrees make sure that the file you downloaded is not corrupted, *.ics inside(close google calendar then, wait several seconds).
5. Create a new event.
6. Turn-off then on your phone.
7. Sync your phone calendar (goto system settings-> Account & sync-> press on sync Calendar), in you phone you will see 1 latest event.
8. Now, Import the *.ics file, that was exported from step 3
9. repeat step 7.
Done! All your events is now sync to your phone.
Click to expand...
Click to collapse
THANKS!!!
I have the Droid Razr and ive been looking for a solution for the past 4 months.
The only thing extra I had to do was between steps 4 and 5, I had to "Clear Data" in the Calendar Storage App on my phone.
THANKS AGAIN!!!!
dmoney98
A simple way
Absolutely Amazing!!!
After days looking for a solution for this stupid error on Android to sync with Android's father (Google) I finally found something really helpfull.
The instruction was very nice, but I did it through a very simple way (with your tips, of course!).
1. I set my cellphone (SIII) to a older date, as 01/2005;
2. I put punctuation in all my calendar entries;
3. Just sync your calendar;
4. Set automatic date and time;
5. Sync again.
One more time. Nothing without your help. Thanks a lot!!
Thanks .good guide.I already worked this out accidentally
Sent from my GT-I9100
Thanks, been wondering about this.
how to sync all of Google calendar to your android
i found a real simple way. Just down load clear sync from the play store. It not only allow my calendar on my phone but my tablet and my other phone calendars to all up date and get all my past years of information from Google calendar.
Thanks. It's great.
... slaycio

Categories

Resources