1

I'am use onsen ui framework (javascript with html) for create mobile application in webview android and ios,but I want show message for user when I want user update my application using javascript and html.

Is there a way to do this ?

BrTkCa
  • 4,703
  • 3
  • 24
  • 45
Jack King
  • 251
  • 1
  • 4
  • 14
  • Do you want something more than what each platform already does once you upload a new version to their respective stores? – Munsterlander Oct 17 '16 at 04:05
  • Like many applications when the developer wants to update its application. Sends a message to the application of the user wants to download a new version of the application @Munsterlander – Jack King Oct 19 '16 at 14:34
  • Yeah, but for Android and iOS it already does that when you upload a new version with an incremented version number. Basically, the user gets a prompt saying the application has been updated. Do you want to duplicate this effort by having an app specific message? I saw your post on the community forums, so I am just trying to get an idea of what you want, then we can answer. – Munsterlander Oct 19 '16 at 23:05
  • I mean, when I want the user updates the application I want to receive the message to the user (Now go to google play or iTunes) to download the new version. For example, today I'm upload a new version of the application to the store . how I notice user to go to the store to download the new version useing javascript (onsen ui) @Munsterlander – Jack King Oct 21 '16 at 12:05
  • Ok, thats what I thought. What I am trying to say though, is Android as well as iOS already does that. The moment you upload the new version, the play store puts out a notification. If you want to do it in the app as well (basically duplicate the effort), you would then have to use an external push service. Monaca offers it and here is how you integrate it: https://docs.monaca.io/en/manual/backend/push_notification/ – Munsterlander Oct 21 '16 at 15:15
  • i don't know anything about monaca . please give me another way be easy for do it . @Munsterlander – Jack King Oct 21 '16 at 21:08
  • Do you have a server that you control where you can update a file that the app can poll? – Munsterlander Oct 22 '16 at 01:24
  • I searched for a new idea and i found (GitHup) where a small section of javascript included from githup to my project . whene i want show message for the user only do I modify the code in githup and when user connect with internet the section from githup will included to app . What do you think the idea its true or false? @Munsterlander – Jack King Oct 22 '16 at 11:23
  • Its possible. What you will have to do is add javascript to your app that would ping a website everytime it is opened. That website would have the current version of your app. Locally, if they are different then you would show a message. That is the only way to do this with just JS and not using a messaging service. Again, I would say why, because the apps do this natively so this is redundant effort, but I digress... – Munsterlander Oct 22 '16 at 15:11
  • in (index.html) webview i put`` the file `up.js` now is empty when i dont want show message . now i want show message for user i will go to my githup and put the code`document.getelemntById("show_m").onclick` to my file `up.js` now if user open here app the button for show message will auto clicked(if he have internet) . now when he open app without internet he dont see the message because dont include file from githup .. you saying every time he open her app the message show . no only if he connect internet and when i add code to file `up.js` – Jack King Oct 22 '16 at 18:25
  • Try looking at: http://stackoverflow.com/questions/18647775/apache-javascript-and-phonegap-whats-the-best-way-to-listen-to-some-random-e – Munsterlander Oct 22 '16 at 23:34
  • Or this one: https://gist.github.com/shazron/1045503 – Munsterlander Oct 22 '16 at 23:35
  • Another great example: https://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery – Munsterlander Oct 22 '16 at 23:36

0 Answers0