build HTML5 offline web applications with Java - java

I want to build HTML5 Offline Web Applications but want to code in pure Java. I have seen Sencha GXT 3 but I am unsure as it supports for offline cache HTML5 or not.
If you have any experience with HTML5 Offline Web Applications then please let me know which one is better.
More Detail:
I want to host this HTML5 app to a webserver. User browse this app and it downloads itself into user's mobile. With this app user can fill reports, report GPS coordinates, take snaps and save them in each separate folder in mobile device and when mobile connects to Internet it uploads all the data.
Since this is an HTML5 and deployed on some webserver, User with any mobile phone having a browser should use it. Is this possible ???
GWT Mobile PhoneGap Showcase Android Market

Take a look at mgwt it has an offline linker that works with any GWT project, see: http://code.google.com/p/mgwt/wiki/HTML5Manifest

Related

Doubts related to Android wear development | Beginner

I have built a Java Spring Application. This application in the end after doing its work pushes data to a sqlite database.
Now the functionality that i want to add is: Once data is pushed into db, i want to send a custom notification on an app running on android wear. This custom notification should have a message and some options for user to respond to. Finally on seeing the notification on android wear the user should select one of the options and that should be stored in a database.
As i am new to android development, I cannot understand three things:
1. What kind of android application should i develop?
2. How can this android application receive some message or data from some other service (in my case java application)?
3. How to save user response to database?
Some guidance would be really appreciated.
Thanks
I will try to answer all your questions. If your current Java application is a web app, then you will end up building a mobile/wearable app that will communicate to this web app. If your current Java application is not a web app, you will either have to integrate its logic into the mobile/wearable app directly or turn it into a web app so it can communicate with the mobile/wearable app.
You will end up developing two Android apps, essentially. A mobile app for the mobile device and a wearable app that will communicate with the mobile app. This can all be done in Android Studio and in one project though, so it will basically be one application at the end of the day.
Like I mentioned above, you will have to either integrate that existing application's logic directly into your new Android mobile app, or turn your Spring app into a web app and host it on a server that your Android mobile app can call out to to get data.
Android has the concept of local databases and can actually use SQLite on the device. This is most likely how you would store the response from your service.

How to use Slack's OAuth2 with a Java desktop application

Is there a way to authenticate a java desktop application with Slack using OAuth2? I am trying to follow Slack's guide.
I am getting stuck because it says you get the access token inside of the redirect uri of your application. But since the app I am making does not exist inside of the web browser, is there anyway I can do this?
Can my java application launch a localhost site that it can communicate with to use as the redirect uri? If so, how?
Desktop app as internal integration
Before we get into more details please note that there is an easy solution if you plan to use your desktop app for your own Slack workspace ONLY. In that case your app does not need to support the full Oauth work flow and you have two options:
Install your app as internal integration via the management page
of your Slack app and then copy & paste the token to your desktop app
Create a legacy token for your Slack workspace and then copy & paste to your desk (not recommended)
I also like to clarify upfront that your app only needs to run the Oauth process ONCE for installing it into a new Slack workspace. The resulting token has no expiration date and has not to be refrehed.
Desktop app for multiple Slack workspaces
If you plan to distribute your desktop app to multiple Slack workspaces you will need to support the full Oauth installation process.
Slack is using Oauth 2.0, so in principle all the standard answers from this older Oauth wiki article should work for Slack too.
However, since you can not assume that the local machines of your users are reachable from the Internet (e.g. redirecting back to a local web server will not work, since Slack will most likely not be able to reach it), you will need a web helper app that runs on a web server and is reachable from the Internet.
This web helper app is basically a small web site, which performs the complete Oauth dance for the installation process into a new Slack workspace. You app can open a browser window and redirect to the web helper app to start the login process. You then have two basic approaches how to handle the connect back to your desktop app:
Show the resulting token to the user and ask him to copy & paste it
to your desktop app (simple approach)
Store the resulting token in your web helper app and provide an API to your desktop app to fetch it automatically. (user-friendly approach)
If you are looking for a starting point for such a web helper app, take a look at this example PHP script for installing Slack apps.

Is EMM what I'm looking for?

We have a Java based web application and an android app for our enterprise needs. We would like to remotely push the android app from the web application and we don't know how to achieve this. After searching in Google, I found Android EMM but did not understand what that is exactly as there were no other blogs or tutorials other than the Google site which was difficult for me to understand.
It is similar to MDM solution but do MDM servers have an app preinstalled in the devices so that the installed app manages the installation of other apps?
Can anybody tell how to remotely push the android app from my web application?
To remotely push an app to an Android device you need to manage this device, you cannot just push an app on anyone's device. To manage a device you need to set up this device as managed, which will require a factory reset.
If you want to pursue this approach you can try the Android Management API.
You can just upload .apk file to your server and provide a link to the user. This is a very simple solution but requires user to agree "install apk from third party sources". In this case, a user needs to agree with installing apk.
If you want to install apk without user agreement you need to activate Device Owner on Android (Fred mentioned in the comment this approach).

how to embed android emulator in HTML page

i am working on a project that enables a user to have a demo of an application that he is about to download..
something similar to https://www.manymo.com ; but i am struck on how to embed the emulator in the webpage.
Any help regarding this is highly appreciated.
This is just a way on how to approach
Create android emulator and install VNC server
then use a web based vnc client and embeded it in your server .(most solutions need activex/java enabled browsers).
webased VNC clients to look out for
https://novnc.com/info.html
embedding instructions
https://github.com/novnc/noVNC/blob/master/docs/EMBEDDING.md
One approach can be
Create a minimal android emulator image and install the app
Start a server that
starts the android emulator
has Chrome remote desktop
the size of the desktop is exactly the size of the emulator
In the browser, offer a Chrome remote view that connects to the server

J2ME applet - run Java in a mobile's web browser

I'm looking to embed a J2ME application as an applet in a web page to be accessed via a mobile phone web browser. Every major web browser supports the embedding of Java applets - does an analog exist for cell phone web browsers?
If not, does there exist a cross-platform way of launching a J2ME application from a mobile web browser?
J2ME doesn't support applets, and you install it onto the device in an application-specific way. You can't launch it from a web browser.
You're most likely out of luck. The best that you'll be able to do is provide a link to the .jar file.
You could, of course, run J2ME applets with normal browsers using http://www.microemu.org/ microemulator, but that won't work on the mobile device's browser.

Categories