How android application and web application working? - android

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.

Related

How do I create an app to mimic the data on a website?

Is it possible to create a mobile app for both Andriod and iOS which will display the same data as on a website written in HTML CSS and js?
The site only displays information but this info is used regularly by users. I have been asked if it's possible to create an app that the same info would be available on? Ideally, any changes made to the website would be reflected in the app without having to change the code for the app as well.
edit - The page on the app will still need functionality i.e being able to open modals when a button is clicked.
You could embed your site in a native app using a WebView. Nowadays you have several technologies as React native and Flutter that could help publishing your site as a multiplatform app.

Inject Javascript into Chrome with Android App?

Is there a way for an Android app to inject Javascript into a web page that's opened by Chrome?
The app would need to essentially run in the background 24/7 and startup with the phone as well.
We have a browser extension for Chrome that does similar. Basically it's just a content script that's added into every web page browsed by the user.
I couldn't find if there's a way to do that with an Android app or if it's impossible to modify web pages opened in Chrome.

Mobile App is not able to show a PDF that is stored on Web Server

My team works on a Mobile application, as well as a web application. The mobile apps are about 80% web views that live on the web server.
We have a Help page that now requires a link to a PDF File that also lives on the Web server.
When I attempt to make the controller return File("pdflink.pdf","application/pdf") everything works fine on the iOS application. When I try to use one of our Androids to hit the same link, the Android just shows a blank page and the PDF does not open.
I was wondering if anyone has ever had to create a mobile view on a web platform that was then called by mobile applications.
I have tried creating a view that used an iframe with the pdf in it, but that also did not work on either device (iOS/Android).
Any help with how to handle a web link to a pdf from mobile applications?

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.

How to communicate between Android web browser and my custom app

I would like to launch my custom app from web browser. I have found the answer to this question here: Make a link in the Android browser start up my app?
Now I would like to return some data from my custom application back to the web page that opened it and then POST it to the server.
Any ideas how to do this?
Matra
That is not possible, sorry.
You are welcome to have your custom application load some other Web page in the browser using an ACTION_VIEW Intent. Or, you can integrate WebView into your application and have much greater control.

Categories

Resources