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.
Related
I'm a little confused because I couldn't understand how android application working at the same time with web application . for example I have a web site and I wanna have a android app for my website and how can i programming at the same time , can i build my android app with php ?? this is the main question i have and i don't understand what i should do and how web site and android app working . for example Amazon has a android and ios app at the same and Amazon has a website , how those thing working together ???
You can build a webview app that is app where you can display HTML with Css and maybe also JS.
That is what google said about webview app:
By default, a WebView provides no browser-like widgets, does not enable JavaScript and web page errors are ignored. If your goal is only to display some HTML as a part of your UI, this is probably fine; the user won't need to interact with the web page beyond reading it, and the web page won't need to interact with the user. If you actually want a full-blown web browser, then you probably want to invoke the Browser application with a URL Intent rather than show it with a WebView.
You can find more information about a webview app is here: https://developer.android.com/reference/android/webkit/WebView.html
If you have any other questions about it feel free to ask.
I have just created a website based on prestahsop template (PHP + SMARTY), and I have made it work online.
Now I want to migrate the project on mobiles. I searched for several means of doing that, finally I am about to use PhoneGap for my solution.
But I have no idea if that can encapsulate the whole project on the mobile platform, and ideally be launched on Apple store. If not, I would like to get some advice to make changes.
Anyone having former experience can come to help? Thanks so much!
In addition to andre3wap response, you can use Prestashop Webservice API to link your application to your website. I've already done this in the past, the tricky part comes when you need to create an order in your Prestashop website from your application. But it's completely doable.
You will have to create an HTML + Javascript application with PhoneGap, that calls Prestashop via Ajax requests. If you want your application to work offline (and only create the order when the customer is back online) you will have to load every products on installation and sync when the app is online.
It's a lot of work.
EDIT related question: How to integrate prestashop with android?
If your web site only consists of HTML pages, yes; PhoneGap will be able to do most of the work(Just upload your HTML pages in a folder to build.phonegap.com for the conversion), there are other methods that can do the conversion, but that one is easier to me. (Read their documentation)
If your web site was created from a server side language, NO, phoneGap will not be able to fully convert it into a full fledged HyBrid App.
It gets very tricky when it comes on to Server Side scripting + phoneGap. What you can do is build html pages, and create "APIs" to load the data in the APP and use JavaScript to parse the data respectfully. (That phoneGap can handle)
You can read this article for an even more detailed explanation:
Usefull Article
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.
I am looking to use PhoneGap as my framework for an app that I will be developing for iOS and Android.
The client has a CMS that has already been fitted with a web service allowing us to generate a clean HTML page with the content. (Text and images)
Our goal is to allow the client to update his application with his CMS. What we thought could work best was to load the HTML generated by our CMS web service and inject it into the specified PhoneGap page. This would allow the client to have a dynamic application that he can manage certain pages through his CMS.
I have read that using a web view will NOT be accepted by Apple, so consider that we obviously want the app to be approved in your replies.
How would we go into getting a web service to load the dynamic content into the PhoneGap App and be approved by Apple?
Many thanks!
Loading an entire HTML page is not a wise move. It would be better to let the webservice output JSON wich you can then read with your app. Phonegap is html based so you can build a DOM from the json.
If you want to generate a full HTML page on the server then you can add the result of the service to your DOM.
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.