How to open an article in android app? - android

Can someone tell me what steps to follow to open an article in android app?
I do not meant open via browser but in-app.
Update description:
I do not mean open the actual website article, but copy the content (along with images, video links) and show it in the app with your preferred font, background etc

You can open a web page in-app (instead of the browser) by using a WebView (see documentation here). I recommend also reading the API guide topic Building Web Apps in WebView.

you may use webview to load your html file
WebView webView = (WebView)findViewById(R.id.webView1);
webview.loadUrl("file:///android_asset/file.html");

Related

Uber universal link not redirecting to the Play Store

We're trying to use an Uber universal link in a WebView on Android.
Following the affiliate program page documentation (here), we're using a link like this: https://m.uber.com/ul/?client_id=.
When we load that url in a WebView with a WebViewClient on a device that doesn't have the Uber app, it tries to redirect to the app using its url scheme (uber://?client_id=xxxx). This doesn't work, because the app is not installed.
However, when we load that url in Chrome, it brings us to the "Open Play Store" page. That is the desired behaviour.
Is there a way to make this work in a WebView?
According to Uber Documentation, using m.uber.com links in a WebView is considered as common mistake. Instead, open links using mobile browser.

how can i implement built-in browser like facebook app

i read article that facebook app has started opening links with its built-in browser
( related article url : http://www.androidcentral.com/facebook-enabling-app-browser-links-some-accounts )
it's quite cool so some apps were updated to use built-in browser.
i also want to develop own built-in browser and use in my app like facebook, but i can't find how to.
( i searched 'built-in browser', 'in-app browser' etc.. in google, but can't find how to make it. )
so, how can i develop own built-in browser? is there any development guide?
You should use a webview. Look this link... If your webpage that you want load is local you must put it in assets and call it with
webView.loadUrl("file:///android_asset/index.html");
otherwise like doc
http://developer.android.com/reference/android/webkit/WebView.html

Display offline html in android app with a tablet

I have to create an android app, that displays an offline html website. Does android sdk have an internal browser control? What kind of dev sw do you recommend to create this basic wrapper?
Read about WebView.
It's built-in webrowser engine and you can use it to your target.
Yes. WebView
http://developer.android.com/reference/android/webkit/WebView.html
This component allows you to specific a local url (file://) if required or even passed the complete html to the load method. Also capable of event handling for more advanced scenarios.

how to load android app from a web page link?

I am trying to load an android application from html file when browsing the page with android browser.
I have tried like below
<a android:scheme="com.mxtech.videoplayer.ad">Click </a>
But without any avail...
I am also trying to pass a video link to the app.
Any has any idea..
I have seen this kind of link can be done in apple ios.
And that's the Android way:
http://play.google.com/store/apps/details?id=<package_name>
e.g. https://play.google.com/store/apps/details?id=com.troubi.kingofmath
At an Android device the user will be asked whether he'd like to open this app in the browser or Google Play.

How to open URL from Android application and post values to the URL?

I am newbie to Android development, can you please help me for below scenario
From Android native application
Open url into browser, along with
Post some values to that page
Share me if you have test code.
To have a browser shown in you application with URL, you could use webView in your application. It can take a URL as its input.
You could refer to the document on the Android developers site for the usage:
http://developer.android.com/reference/android/webkit/WebView.html
And there is also an example available:
http://developer.android.com/resources/tutorials/views/hello-webview.html

Categories

Resources