how to add event to calendar in j2me/ LWUIT - java-me

Is it possible to programatically add an event to a Calendar on Button click in j2me for S60 using LWUIT? I guess there has to be an Native Extension for this, right? Or is there any other way.
Please Help...

If you mean the phone's Calendar you can do this with PIM API. Please check addEventInfo method and how it is used at http://developers.sun.com/mobility/apis/pim/pim5/

Related

Disable button once clicked MS bot framework

I am creating chatbot application using MS bot framework. In that, I want to disable both buttons once Yes or No is clicked.
Sorry but the webchat (and other channels) does not support what you want to do, even if it would be useful for many cases.
There is a sort of workaround if you really need to have buttons that cannot be used: use SuggestedActions (see doc here), it will look like the following:
Once clicked the buttons disappear.
If you are using facebook messenger you can use quick replies. They will disappear after interactions.
https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies
Microsoft.Bot.Builder.ConnectorEx.FacebookQuickReply

How to send new message-based invites without GKMatchmakerViewController

For some reasons we do not want to use the GKMatchmakerViewController. Currently we are offering the user of our App the possibility to invite their Game Center friends via a friends list displayed in our UI.
While this is still possible in iOS 10, the user will no longer have the possibility to add the GC friends. Therefore we want to use the new message-based invites introduced in iOS 10.
How can this be archived without using the GKMatchmakerViewController? I just want to display a button invite friends which opens the view to send message-based invites to anybody exactly as the button in the GKMatchmakerViewController does.
It is currently (iOS 10.2) not possible to display the iMessage view without the GKMatchmakerViewController.
In my app, I'm going to still provide fully custom views for the matchmaking. Only if a player on a device with iOS 10 wants to invite a friend, I'll display the GKMatchmakerViewController. This is not a great solution but currently, it seems like the most feasible workaround.
I'll also file an issue for that in Apple's bug reporter.
See GKGameSession. This class can send invite link. May be ios10 only

How can I programmatically show the select device dialog?

I am using the Cast Companion Library and most of it is working well however I have not been able to figure out how to show the device chooser programmatically.
Basically when a user chooses a video on my app I would like to show the chooser if they haven't yet connected.
Thanks.
If you are using the MediaRouteButton and it's accessible:
mediaRouteButton.performClick();
you need to "Developing a custom UI with the MediaRouter API’s and MediaRouter.Callback" but I didn't find any example how to do it .
First, I suggest you do not do that. I don't know what you are planning to do in your app so I can't say much but don't do something custom in terms of user interaction/flow that is different from other apps and the apps offered by the framework; people will not expect that.
On the technical side, if you want to open the standard dialog, I am not aware of any trick but I haven't looked at the MediaRouter code in v7 support library for that; since that is open source, you are welcome to look in there and see if there is any simple way to do that. If you want to design your custom one, you should be able to do that; the CastCompanionLibrary provides a sample of the Callback dialog and the one for chooser follows a similar pattern.
As a side note, you mentioned you want to open the chooser when user selects a movie. So how can they select to play locally? Are you planning to add additional selection to that dialog for local playback?

Switch OFF Mobile Phone through J2ME Midlet

I want to Switch OFF my Phone through code via a button click. any idea how to do it in J2ME .?
thanks in advance.
Unofrtunately there is no MIDlet-Permission to allow you to do that.
(not really an answer, but I'm too newbie on StackOverflow to be allowed comments)

J2ME problem in using TWUIK framework

i am developing application in which requirement is to use TWUIK framework in J2ME
i have worked with j2me polish as well as LWUIT but i didnt find any kind of help regarding
TWUIK. Even i am not able to create sample application which simply contain two textbox for login.
core style in TWUIK is to creating every component on canvas
i can create textbox but cant even get focus to that component
Experts any one can guide me???
Thanks in Advance

Resources