Add dynamic content to an existing HTML5 Web App for Android - android

I have created a mobile web application using HTML5,CSS3 and Javascript/Jquery. I've used the PhoneGap Build to get it's apk.
Once people download the app, If I want to add new content to that app so that the user can see the new content, what is the most easiest way to achieve it ?
Is there a way to achieve this without the use of a web service ?
Whatever is the method you suggest, please go a bit in detail. I'm relatively new to dynamic content, have always been involved with static pages.
Also, can I use the Admin page template for my HTML5 mobile app too ?

There is no way to do what you are looking for.
As per your comments, you want to push the dynamic content from YOUR laptop to the user's PhoneGap app. This is not possible as there is no way to establish a connection between user's app and your laptop.
You mentioned, you don't want to use server calls. For me that's the only way.

Related

Is there a way to update the data inside the application? Without updating the entire application?

I'm trying to build an application, "Journal for Drivers".
I would like to add new information to the driver in this application. This information will be in text format (or text with images)
My question is, if I want to add a news update to the application, a news for drivers, can it be solved for example by some storage on a server, where the application automatically downloads this news? Or do I have to write the entire app in Android Studio and update the original version of the app?
There are three main ways to accomplish this:
You can create a webpage and use webview component to load this website in your application. In this case you will have full control on the data (backend) while you can change the ui of this webview on the fly without releasing new versions of your application. called also hybrid application (which is part native you still need to create apk with this webview) and web part which will be where most of your code exists.
You can create a native application which will be written in native only (java or kotlin) in this way you will need to release a new version every time you will change anything in your application. (including logic change or ui change).
You can create PWA project which will simulate a "native" application in this way you control 100% of the code and it will based on web. You can open a url on your mobile browser and you could "install" a mobile version of the webpage on your mobile device which will simulate a "native" application it also other platforms such as iOS, windows and Mac (if I'm not mistaken)
This can achieved via an endless number of strategies. One such strategy uses deep links along with an API for this. For this to work, you will need to set up an online server which will serve as a back end. This is where you will post your news updates to an endpoint or endpoints. This can be implemented in many ways. For example, you may just hardcode your updates to the html, or more likely you will store each article to some sort of db. When a user of the app goes to view an article, it will send an HTTP request to the server asking for the article. The server will then retrieve said article from the db, process it in whatever way needed, and send it back to your app.
Using this method, you only need to change your article on the back end (or better yet add your article to db and update a pointer that points to current article).

how can i add from my webpage to my android app with out updating the apk everytime?

hi guys i am constantly updating my website and i want all the stuff i update to appear in my app. so i don't have to make a new ".apk" update every time i add new stuff to my website.
would i use some sort of site scraping method?
what i would like to do is as new stuff gets added to my website it automatically pushes it to my app in some way
could some one at least point me in the right direction as i have only just got my head round setting up my website. please be nice and if u don't think this is worded right I am sorry.
An idea is to organize all your resource data in a REST web services and both website and Android App to get data from Web Services. So the data will be kept in one place (one place to do the updates) and be viewed from different platforms in your case a Web site and an Android App. However this is a very general architectural solution.
If you add a WebView to your application and point that to your website the application would always fetch the latest version. I think this would be a quick and easy option for you. Link to documentation: http://developer.android.com/reference/android/webkit/WebView.html
This would though require an internet connection for the user every time they use the application.
Here is the guide to web view API's https://developer.android.com/guide/webapps/webview.html

Simple Browser/Website web app mobile app/shortcut

I have a website/web app which I want to make available on mobile devices.
The website is responsive and can be used inthe mobile browser, but I want to make it available on google play / app store. My question is: how could I create a simple app that is actually a browser, which would run natively on the phone but load my web page in full screen?
Any simple solutions or frameworks?
Well there are different approaches to solve your questions I am trying to give you some rough idea with following two approaches.
Easy and simple one
1) Use web views and call home page url that's all.
For better performance.
2) Create a REST apis with only required data for your mobile app . And then use either web view or create your own views and show it to user . In this case if you create your native view then app will perform faster but development will take time.

How to show web content in android application without using webView

i am still developing android static app in which all the content are static , all the content which is deign by me nothing is taken by website but now
#
i am starting to develop web app that is, all content coming from website .
i searched lot of thing i got only "WebView" in which whole website will show in my WebView .
So there is a Problem, i want to get a specific content from any website like Event images from website and show in my Activity.
Please help me to start web app development.
is there any api ??
Thanks in advance.
#
In my understanding, what you want to create is an Application that will show content from a website, but not using WebView.
For those webs that do not provide an API (your own website, for example), you may want to have a look at JSOUP and give it a try.
For those webs that have API (for example: twitter), you should read its document and try some HTTP request.
You'll need to write APIs which'll allows you to make requests from your android code to the server code. Using these requests you'll be able to fetch data stored on a web server in a friendly format that can be used to display content on your android app.
I see you have clear some concepts, like Web app, browser, events. But remember the Logic from webApp is with javascript, so the Webview download the HTML to the device and if you have activate javascript in the webview thats work fine, remember you have some restriction with the hardware and process with webapps.
But android developer has a tutorial to create web apps.
When you create a native app doesnt mean is static, you can use Json, XML, Rest API, Web services, etc. to comunicate with a web server.
I recommend see how connect android app with external resources and webserver, here is an example.

Interact with websites?

If i am developing a third party tool. is there a way to interact with that website?
For example i am making a android Application which allow the user to search a specific website. Is there possible to load the search result in listview?
This was just an example.
So get information from a website becuase i want a different layout and so on.
EDIT* and how do i do it?
Thank you!
1) If you want to display the content of your webpage in a specifically designed application you can use WebKit, the web engine inside android, in a WebView. Check more on this link.
2) If you want to have a more granular control over the data shared you can use the apache http client to share data over http, and reformat it for the user. You can also set up customs http request between the terminal and your server to improve the mobile experience.

Categories

Resources