Android Application Design - Accessing website data - android

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/

Related

How to make android web app?

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

Making android app get data from rails table

I am new to rails and wish to make my Android app work with data created in my rails app.What is the best strategy to auto-generate/auto-update a JSON or an XML feed with the data created by my rails app to be used with my android app?
JSON is the way to go.
Make specific controllers and actions to provide the data that your Android app needs to consume, and use something like the RABL or jbuilder gem to create json templates with the data structure that you want. You will need to use the Json libraries for android
Some further reading for you as it's impossible to provide a more detailed answer to such a general question
http://railscasts.com/episodes/322-rabl
http://railscasts.com/episodes/320-jbuilder
and a nice simple tutorial on how to post json from Android
http://localtone.blogspot.co.uk/2009/07/post-json-using-android-and-httpclient.html
and how to consume json
http://hmkcode.com/android-parsing-json-data/
You should find the time to watch all of that video but it's the last half that is really important.
Then to handle versioning of your Rails API/REST interface or whatever you want to call it
http://railscasts.com/episodes/350-rest-api-versioning
Rails and Android or iPhone for that matter make an awesome combination.
The above should be enough to get you started at least to get you to the point where you can ask more specific questions, but once you get your head round the basics you really need to use a sync adapter to handle the traffic. The Android development team really URGE you to take the sync adapter approach as can be seen in this very long googl I/O video
http://www.youtube.com/watch?v=xHXn3Kg2IQE

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?

I want to make an app for android that updates via the internet so the information is always current. What is the best way to implement this?

I want to make an app for android that updates via the internet so the information in the app is always current. What is the best way to implement this?
I understand I will need the information stored somewhere?
And I will need to be able to access it and read it into the app?
I am not looking for specific code so much as a general way this could be implemented.
As an example think of a weather app that must pull weather data from an online source.
Thanks
In general you could achieve what you want in one of the following ways (both are popular methods and used in many apps):
Implement a web service layer to pull the data from the server back to your application. In Android, this is normally done via JSON based REST API. JSON is used nowadays as the data is regarded more compact that XML and it's easier to deal and manipulate in Android.
Note that it's common to implement caching in phone local storage if the data is not updated frequently.
Most of the time, the authoritative data is stored in the server
With this method, you could arrange the layout freely on your app. However, you need to write Java code to arrange the layout
You could also add better interactivity especially if you are thinking that your UI will have a lot of touch interfaces or animation
Other way you could do this is by developing a mobile HTML webpage that you could embed in Android via Webview. A simple tutorial is available on Android's website
This method will retrieve HTML from the server, the same way your desktop browser retrieves HTML. The only difference is that the HTML is mobile optimized. Good example of mobile optimized HTML is gMail from Google
Using this method, unless you have full control of the server side, you don't necessary can control the layout as the server is the one that generates the HTML
A lot of times that interactivity is reduced with this approach though Javascript framework such as Sencha and others are quickly reducing the interactivity gap between native code (#1) and using HTML

Categories

Resources