Basically, I want to retrieve content from wikipedia. But I want to display it inside my Android Apps directly. Not immidiately redirect to the internet browser, but to display it inside my apps first.
Currently, I manage to request the Wikipedia API and get only the main content by using http://en.wikipedia.org/w/api.php?action=parse&prop=text&format=xml&page=Bla_Bla_Bla. and because I parse the data, I will use WebView to render in the Android. It successfully rendered. But only to those unprotected article...
If it is protected such as Mona Lisa, the output was not rendered properly in the WebView Android.
I want to know has anybody try to retrieve a wikipedia content and display it in your android apps, easily and beautifully?
Thank you :)
Wikipedia | F-Droid - Free and Open Source Android App Repository.
The official mobile version of English Wikipedia is located at https://en.m.wikipedia.org, with the official desktop version of English Wikipedia located at en.wikipedia.org. A toggle switch between mobile and desktop view is available at the bottom of every page.
Once you install it on your Android device, you can actually use it to download the whole website, and access its millions of articles even when you're offline (or when you don't want to use your data plan).
I have managed to find an answer. I think I over complicated this thing.
We can actually retrieve the content perfectly without calling the mediawiki API.
Wikipedia already provides a mobile interface.
I just need to use a WebView to load http://en.m.wikipedia.org/wiki/ and add the topic at the end of the url.
For example the Mona Lisa site: https://en.m.wikipedia.org/wiki/Mona_Lisa
References: http://en.wikipedia.org/wiki/Help:Mobile_access#Official_online_version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With