How to make android web app? - android

I'm new to android apps , I want a good tutorial for android web app
also I have heared aboud webview I think it just include page url and I don't like that I want to have my own app design and display specific data , make filteration , make search and may user whould login too.
simply another view for my website
Thank You

It depends of the kind of web. For example for a blog (Wordpress, Blogger), a social network (facebook, twitter, etc), you can use json objects to interactuate with your web.
I had a simple app that retrieve data from a wordpress blog, you can take a look to learn something about managing json objects and http requests.
This is the link: Material App, Wordpress Blog

You can use my code as a reference: Android XML Multi-Node Reading Using Current Date.
The only difference is that I used XML instead of JSON, but the main concept behind both is pretty much the same. Also I recommend using Async.
As for learning Android API, I would go to Youtube tutorials as well as: https://developer.android.com/guide/index.html

Related

Create Android Client For Website

As a beginner wanting to become more familiar with the android platform, I wanted to create a web client for a website.
Something similar to https://play.google.com/store/apps/details?id=com.krinsen.javadocreader&hl=en
However, I am confused about how the author created the custom UI for the java docs.
To my understanding, there are 2 ways to do this.
One approach is with WebViews. I quickly prototyped a sample of this but I believe (correct me if I'm wrong) that I can't change the UI of the WebView and will have to view the page from the perspective of a browser. Unfortunately, this does not look very well as the website was not mobile optimized and there are inconsistent spacings and odd whitespace.
The second approach is to manually create each View using the different layouts provided by android (LinearLayout, TableLayout, etc). This should create a more custom mobile experience as I can manually construct how each page will look. However, this seems time-consuming as I will need to manually create a different UI page for each page of the website. Also I am confused as to how to pull the data from the website as each new view in the new UI will need the content from the website. Do I need to do HTML parsing to pull the content or is there a better way in the android sdk? What is a good approach that android developers take to extract the different forms of content from a website to redisplay on a android client?
Finally, since I have a very beginner understanding of this situation, am I correct in assuming that most likely the creator of the application mentioned above did something similar to the second approach I mentioned?
What is a good approach that android developers take to extract the different forms of content from a website to redisplay on a android client?
I think the best way is to provide an API for native application. Parsing HTML might look nice untill you need to suppport every change in your HTML page. But if you are not the owner of web-site there is no other choise if only you don't contact owners and ask for an API.

Retrieve data from Wordpress in my Android Application

I need to access Wordpress posts (Outside) from my Android Application. I need to display somehow the last post ( Maybe Titles in a listview), and edit some of them by entering new text, picture and video.
I came across many explanations about how to do that in php. But since I'm working with Andoird. I need it in Java
Any idea how to do that ??
I'm not familiar with WordPress, but I can suggest you to start with RSS-parsing of your posts (WordPress provides RSS, right?).
One way of doing it would be to access the WordPress database. I am not 100% familiar with WordPress but I think the posts are stored in the table wp_posts. You should also be able to find, access, and edit any data within.
I Know buddy What you Want to do with Wordpess and Android Application. i Can give you Some Scripts..
Download SVN Grabber
downloadsvn.codeplex.com/
Download Wordpress Android Source Code from wordpress.
android.svn.wordpress.org/
You can do Your Task using Wordpress Rest Api
Documentation
developer.wordpress.com/docs/api/
Wordpress XML-RPC Api
codex.wordpress.org/XML-RPC_WordPress_API
I also Working with Android Native Application via Wordpress

Designing user interface for android

I don't know whether I should ask this question here. I have very little experience in development of android application. I did few researches. Let me explain my problem. I am making an android app to show a details of a university. I used a WebView to display the results from a HTML & CSS page it was very easy for me here is a demo. I thought of using JSON for fetching data form the database. Now I am not sure how to populate it. Please suggest me a way to populate the same data as in that example page.
I have visited http://android.stackoverflow.com but in FAQs I found this question shouldn't be asked there. I hope I am asking it in the right place.
You can populate your data using Listview. You can use a custom or default adapter for setting it in the ListView. And you don't need to use JSON for fetching data from database. You can fetch data from database using Cursor.
For such a simple solution with low amount of data you might also consider to create a pure mobile web-application using a JavaScript based template systems. It would suffice as an pragmatic approach.
The templates also provide flexibility at later points during your development cycle when you may switch the underlying software-platform (for instance from a web to a native app)
I recommend PURE or handlebars.
See
Overview of client-side web templating systems
Embedded.JS
handlebars.js
pure (Simple and ultra-fast templating tool to generate HTML from JSON data")
stackoverflow: Javascript template system - PURE, EJS, jquery plugin?

How to create a live scorer app for Android?

I am developing an android app where I will provide a button on which, when ever the user clicks, they will get the live score updates of the Soccer game.
Are there any tutorials for that or, any Open-source code available for that
I am trying to achieve some what like the image given below:
Your required tasks is pretty straight forward. I suggest you use the android developers site to learn the basics and tool stack involved in android programming. Early in this process you will come across the 'Views' tutorial which outlines about half of what you need to do (display the scores in a pretty format).
I suggest you get this part of it running first (just a pretty display with test scores on it), after that creating the network request and getting the data from the server should a fairly easy path using Android's or apache HTTP classes.
You would somehow have to retrieve the current score from a server.
You would basically need a site which can provide you the live data in an xml format, for instance. There are sites which provide this. Of course, they won't provide it for free. May be you would get it free for some smaller league for you to test.
You can simply read the xml, using xml serialization or maybe XmlDocument if you use c# as a language for scripting.
I did a simple google search, and I found this article by www.thegamecontriver.com, they use unity to create a Live Standing App. Maybe you will find this useful. Of course, it is not difficult to use the same method to do it for Live Scores.
You can find the link for the post here
Live Standings App Tutorial

Android Application Design - Accessing website data

I am new to Android development and am interested in working out a design of an application. I am however, unfamiliar with the best way to handle what I want to do. I am interested in obtaining information from my band's Joomla website and placing it into an Android application. At the moment I'd like to get News articles posted and potentially other information that I create on the site. I was thinking of doing this by setting up RSS feeds for the website. Would it be better to somehow access the data directly by connecting to the database? I don't know PHP so I can't develop a webservice to access the content. Any ideas?
In this case I think using the RSS feed would work just fine and it saves the hassle of connecting directly to the database. Just use any XML parser. I think Jsoup would work:
http://jsoup.org/

Categories

Resources