Interact with websites? - android

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.

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).

Migrate my E-commercial website on mobile phone platform using PhoneGap

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

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.

Add dynamic content to an existing HTML5 Web App for 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.

How to load dynamic content in PhoneGap?

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.

Categories

Resources