I am using the PIM Demo sample from Blackberry inside my application to add event to the device's calendar. The problem is there is no reminder or any dialog boxes popped up when the event starts.
Is there any way to set this manually? Or is there anything wrong with the programs?
I would like to have any form of reminder, could be an alarm, dialog box, or even just a notification will do.
Regards,
To have a reminder you must set the Event.ALARM field in the PIM Event to the number of seconds before the start of the event you want the remider:
Event.set(Event.ALARM, 0, 0, 900);
Will set a reminder for 15 minutes before the event.
Related
I'm trying to implement local notifications to my app. They will function as a reminder for an event, but the notifications must come from my app, and not from Calendar or Reminders.
My question is, how can I create notificaitons that fire before a certain date, while showing the actual date in the 'time-field'?
This is what the Calendar can do:
Notice the top right corner saying "in 5m".
I'm trying to get the same functionality for my own notifications, but I can't find anything about it. This is the only thing I can get:
As soon as the notification arrives, it says "Now", and then proceeds to count up the amount of minutes ago. I need it to be sent X minutes before, and count down to "Now", then count up. Is this possible?
How about you create multiple custom Notification.Name like this posting. You could have .onTime, .fiveMinutesReminder, .tenMinutesReminder, and so on. The logic in your app would set when to fire those reminders. Your selector handler function would need to have some kind of switch statement to handler different reminder. The handler will need to show different text message based on the kind of the reminder.
I have two questions regarding Remote Control Events on iOS:
I know that music applications are registered to remote control events and then can receive such events from the iPhone's player widget.
Let's say I want my app to fire such events, is that possible?
How does headphones for example generate those events?
Without private API, you cannot send remotecontrol event to your application.
The reason is we cannot create such an Event (UIEvent) to send out by using:
[[UIApplication sharedApplication] sendEvent:anEvent];
You can, however save a registered event then play back by calling the above-function.
I don't know if it possible for headphone events but with private API, you can send some events like: home button press, power button press or mouse events (not tested).
You should read this book:
http://www.amazon.com/gp/product/1118057651/ref=pd_lpo_sbs_dp_ss_1?pf_rd_p=1535523702&pf_rd_s=lpo-top-stripe-1&pf_rd_t=201&pf_rd_i=0321278542&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=0T2AMHJCEEKJN41YJHD5
It'll be a hard work to make this works.
Take a look at GSEvent to know how to send an event to OS (iOS).
Edit: I've found 2 event types in GSEvent.GSEventType:
kGSEventHeadsetButtonDown = 1018,
kGSEventHeadsetButtonUp = 1019,
PS: - this use private API so it will be rejected if you post this app to AppStore.
I am developing a mobile application which requires an online internet connection.
I have called CheckInternetConnection codes in Form.OnCreate this method checks the intenet connection and will show a MessageBox which is saying you are not connected.
When I run this app on ios Simulator or ios Device, there is just SplashScreen and the app will stay there forever. I thought MessageBox goes under the splash screen, so I decided to move my code to other events, I tried OnPaint, OnActivate, OnResize but all of them are same.
I appreciate any help.
Try using Form.OnShow this will call the MessageBox when the form is first shown. Make sure to use a boolean flag in order to not show the message twice
What I'd like to do is to set-up a local notification in my iOS app which can remind me one hour ahead of a meeting, and gives me the distance between my current location and the location of the meeting. This means I need to update the alert message when the notification is fired. Is it possible to do it in iOS?
I found this related question how can i set alertbody text on runningtime when local notification is fired in ios4 develop?, but it's more than 2 years old. So I'm hoping there is at least some work-around to have such functionality.
According to the documentation :
The alert has a property for the message (the alertBody property) and for the title of the action button or slider (alertAction); both of these string values can be internationalized for the user’s current language preference.
Check here for some example
I'm trying to make an app that warns me when a current event is going to end. I have an entity (the event), with a date attribute - which is the end date for the event. How can I set a notification alert to pop up for like two days before the event ends? Any links to other tutorials or any hints will be much appreciated.
You can use Local Notifications for this.
http://developer.apple.com/library/ios/#DOCUMENTATION/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008194