This is a migrated thread and some comments may be shown as answers.

Cutom Menu on Menu Button android

7 Answers 59 Views
HTML5, CSS, JavaScript
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dewet
Top achievements
Rank 1
Dewet asked on 31 May 2013, 11:28 AM
Hi 

I would like to know if I could prevent the default action of updating the Icenium app when the Menu button is pressed. And rather show a menu with a Update option.. The client wants to have different options when selecting the menu button like to create a New form , update the App or even close the application ..

Can this event be override with the phonegap menubutton listener event , or any way if any?

If it can be. What code should we execute to call the Update.

Kind regards, 
De Wet Ellis 

7 Answers, 1 is accepted

Sort by
0
Ed
Top achievements
Rank 1
answered on 04 Jun 2013, 01:54 AM
bump...

I have the same question.  Any advice on customizing the menu button would be appreciated.
0
Accepted
Steve
Telerik team
answered on 04 Jun 2013, 10:39 AM
Hi guys,

The options menu button in Android is currently used for updating your deployed-on-device app with the latest bits of your project in Icenium (so you can test the latest version even when not connected with a usb). This behavior however is observed only when your app is built in Debug mode. When your app is built in Release mode, the LiveSync feature would not be included in your application and therefore the menu button is not utilized. We would consider whether introducing a programmatic way for invoking the LiveSync is viable and if so, implement it.

You can change the build mode to Release through Graphite: right click on the project solution -> Build Settings -> select Release.

About handling the menu button yourself and showing some menu - you can display a menu on the "menubutton" event triggered on the document. Here is a blogpost in which the writer explains how to use a little script he wrote for displaying a menu: Building a HTML Options Menu for PhoneGap Android.

Regards,
Steve
Telerik

Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
0
Dewet
Top achievements
Rank 1
answered on 04 Jun 2013, 10:46 AM
Hi Steve

Thanks for the feedback. I will definetley check out that blog.
It would be a great add on if the user could update the application through a custom action.

How would you suggest the user updates the application if changes are made?
Would they need to re-install the application from the apk or barcode?

Kind Regards,
De Wet Ellis
0
Accepted
Steve
Telerik team
answered on 04 Jun 2013, 10:52 AM
Hi De Wet Ellis,

Check the following help article that explains how the project LiveSync works: Using LiveSync.

Regards,
Steve
Telerik

Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
0
Dewet
Top achievements
Rank 1
answered on 04 Jun 2013, 10:56 AM
Hi Steve

Thanks alot.. It makes more sense now.

Thanks for the help.
Regards,
0
Dewet
Top achievements
Rank 1
answered on 05 Jun 2013, 07:07 AM
Hi Steve

Okay so after reading through the documentation I think I should ask the same question in a different way just to make sure. 

So we have one app and this app will be used on multiple devices with some people in the field not at the office where the development will be happening. Now we make critical changes to the application . 

How will they update there app to reflect the new changes ? Do we need to create a new APK or QR Code and send it to them so that they can do a re install? 

I published the application to my android phone using the QR Code and setting the build to release to replicate the live environment. Now I made some changes and these changes do not automatically reflect. 

I do how ever know that when the device is in debug I can refresh and the simulator will also refresh automatically but what to do in this case. 

Hope this makes sense. 
Thanks 

Regards, 

0
Steve
Telerik team
answered on 05 Jun 2013, 07:39 AM
Hello Dewet,

The LiveSync bits are included only when you build your app in Debug mode, this means that when you build in Release, the automagic update code would not be included. Note that this functionality has been introduced for the purpose of easing the development and testing process. It cannot be used for an app that would be published to the Google or Apple app stores.

So to sum up, if you would like to share you app to users so they can test, you can build in debug and they would be able to update the app by pressing the Menu button on their Android devices.

If you would like to build your app and deploy it to an app store, then you have to build in Release and the only way for users to update your app, would be to go to the app store and download your new version, which you have uploaded prior that.

Regards,
Steve
Telerik

Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
Tags
HTML5, CSS, JavaScript
Asked by
Dewet
Top achievements
Rank 1
Answers by
Ed
Top achievements
Rank 1
Steve
Telerik team
Dewet
Top achievements
Rank 1
Share this question
or