Cutom Menu on Menu Button android

8 posts, 2 answers
  1. Dewet
    Dewet avatar
    11 posts
    Member since:
    Jan 2012

    Posted 31 May 2013 Link to this post

    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 

  2. Ed
    Ed avatar
    7 posts
    Member since:
    May 2011

    Posted 03 Jun 2013 Link to this post

    bump...

    I have the same question.  Any advice on customizing the menu button would be appreciated.
  3. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 04 Jun 2013 Link to this post

    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.
  4. Dewet
    Dewet avatar
    11 posts
    Member since:
    Jan 2012

    Posted 04 Jun 2013 Link to this post

    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
  5. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 04 Jun 2013 Link to this post

    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.
  6. Dewet
    Dewet avatar
    11 posts
    Member since:
    Jan 2012

    Posted 04 Jun 2013 Link to this post

    Hi Steve

    Thanks alot.. It makes more sense now.

    Thanks for the help.
    Regards,
  7. Dewet
    Dewet avatar
    11 posts
    Member since:
    Jan 2012

    Posted 05 Jun 2013 Link to this post

    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, 

  8. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 05 Jun 2013 Link to this post

    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.
Back to Top