I've been planning to build an Android application built on Foursquare APIs. I went to the foursquare developer site and tried out the android oauth example. Also I noticed in the showcase several fancy apps such as Instgram, LocalMind. I wonder where (websites like github) I can find their source codes so that I can have a taste of how to develop a real foursquare app.
I am not sure there is a direct answer to your question.. With the exception of code snippets found by google code search or regular google search, do not expect to find full source code for integration with APIs..
As far as oauth goes, there are many examples with a simple google search on how to make it work (note that you have the Venues API that does not requires the oauth process)
As far as source code goes, you should check out this page it should have links to many examples. (got here after two clicks from that page..)
From my experience, we are developing a foursquare-enabled app with a custom server software - in short, our Android app will access our server, which will access foursquare (if required) and get data and pass it to our client (Android/iPhone/whatever).
Bottom line - eventually, you really should learn the API yourself, know the different endpoints and the returned data structures, experiment with different search results and then, if you wonder on what is the right way to get specific data or if you think you are doing something right and getting the wrong data, this is probably the place to ask about it.
The API Explorer should help a lot in doing that.
Related
Some may feel that this is a general question, but I don't believe that. I believe that this is a very important aspect of development and I am trying to learn from others.
Let's say I am making a clone of the twitter app.
Now, the front end is very do-able through traditional android code, however I don't know how to design the backend of the app.
I could use a database - but that seems better suited for older more traditional in house software applications.
I read a little about google app Engine, but I am not sure if that is a solution that should really be used for something like this. Realistically I do not know what options I have and I could use some direction for my research - because I don't want to make a mistake in my architecture only to have to go back and redesign the backend.
I would like to know what types of things I should be researching so that I can evaluate my options appropriately.
Thanks
In this case, you are looking at accessing the Twitter APIs to meet your functionality. You should look at an approach like the following:
Do you want to clone the Twitter App as is ? or certain functionality of it ? Identify that stuff.
Research the Twitter API in detail. For all your Twitter app needs, the requirement could be met directly by your API. Any local functionality for composing, replying, offline, etc can be met by your Android client itself and you do not necessarily need any backend functionality.
If you are looking at providing more value added services (some examples are below) :
Analyze the Tweets to provide enhanced information
Combine Twitter Data with information from other data sources
Provide metrics for all users of your Twitter App
Set User Preferences such that you can sync these preferences to multiple devices if the user logs in from anywhere
In such scenarios, doing work on the Server side will make things easier. Google App Engine is a great backend with which you can achieve a lot of the above functionality. It provides you a PaaS where you can use various services (datastore, networking, email) to boost your productivity, along with choices of languages (Java, Python, PHP and Go).
I want to make an app that displays the information from play developer console in an easy to read way.
What procedure would be best to use to get an html file that i can scrape the info out of?
Is there a library that can simplify this proccess?
I'm currently trying to do this on a php website I'm developing. So far, I've managed to authenticate through the service, get JSON responses of various statistics, and I'm currently trying to parse them.
If you need some help/guidelines, don't hesitate to ask me a few questions, I'd be glad to help. (I've been inspired by the Andlytics android app github project, in order to do this)
I know you want to do this with Android, but the mains steps are the same. I really advice that you check how Andlytics does it.
Also, I can confirm that there is no library available yet, I've been searching for a while before trying to do my own thing.
How can I display a twitter feed In Android programmatically?
Please be more specific of what you want to do (maybe what your motivation is), what you know/tried already and where exactly you are stuck. It makes answering your questions easier.
Having said that, I see two main aspects of what your app should do:
Fetch the tweets for a given feed
Displaying them
I guess how building Android apps and user interfaces works is something you already know to some extend (if not this is a separate question).
So what is missing is a way to communicate with the twitter server and retrieve the tweets. For tasks like that (not only twitter) there are usually APIs defined and you can find libraries to do most of the hard work for you.
In this case a web search for "twitter api android" leads you to twitter's list of available Twitter libraries, sorted by language. Android programming is usually done in Java. In the list you find three Java libraries to choose from, with one explicitly mentioned as Android compatible: twitter4j (under Apache license).
Have fun playing around with that one. The section "code examples" might be worth a look as well.
Edit: Twitter API ME is also android compatible (and GPL / LGPL licensed). And there is TwAPIme, an app demonstrating its features, with source code available (for download link and license see end of description in Google Play).
This is my website: http://www.stustu.co.uk..
I want to create an app that can pull down the listings from this website and display the entries in the form I want; enable users to manage their online accounts conveniently within the app; post new entries. Basically, a similar app to Amazon and eBay.
But I've no clue about how to query the information from the website in the app...
The website itself is WordPress based (quite simple, therefore), and my initial thought was to find some API from WordPress. I did find the official WordPress app, which comes with the source code, but it helps little as its code mainly deals with blogging.
So here's my question:
What are the normal ways a web developer would use on the server side to achieve my aim?
Is that achievable for WordPress?
If not, are there workarounds?
I'm a new self-taught developer, sorry that the question is a bit broad.
The most common approach when you're trying to communicate between an app and a website is to use a web service. Popular architectures include using REST or SOAP to communicate with your server.
This video will teach you how to use REST interface properly on your Android application, while in this link you will find that using SOAP has its disadvantages over REST especially on Android(or mobile in general).
I personally recommend using REST APIs with responses in JSON format for your web service. Twitter did the right thing with their own rest api, and you can structure yours similarly.
Other links you will be finding useful as you develop your application:
google-gson
jackson JSON
http://blogs.developerforce.com/developer-relations/2011/02/rest-api-android-awesome.html
Sorry about not answering your question about Wordpress, as I never had the opportunity to use it. For my apology, have this potato.
How much experience do you have with android? If you have none you should go find the getting started tutorials on the developer site and complete a few of them to familiarize your self with the structure of an android application before you attempt something like this.
The next thing to consider is: does your site look and act nicely on mobile? If so do you want your application to simply be a dedicated browser that pulls up your site? Or do you want to create the entire application natively? In the latter case you'll have to build (or find) some sort of APIs that allow you to tie in to the functionality of your site from within the java in the application.
My experience is mostly on Android so I cannot suggest any strategies or examples for how you'd go about setting up your APIs. But I do know if you attempt to build something that sophisticated natively on android with little experience you'll likely get frustrated early.
I currently use the Graph API and it seems like it has many bugs.
Example (Missing Posts):
Query "home" using the Graph API Explorer (with all permissions granted).
Look at the posts shown in Facebook website or the Facebook Android application (both set to show recent posts first).
Compare the result and you will probably see some posts missing (it can be missing videos, photos or just simple text statuses).
I recently published a question regarding another problem (Graph API returns some hidden posts). So it returns posts that it shouldn't and ignores posts that it should.
Obviously there is a way to get all items correctly but I've researched this issue for a long time and it seems like the Graph API is simply not the solution.
I'm wondering if anyone else have seen these kind of issues using the Graph API and if switching to FQL helped. Knowing which API is used by Facebook's official application will hopefully put an end to the pure Graph API vs FQL question.
EDIT: Answering my original question - The Facebook for Android application is using FQL. Yet I would like to know if it's possible to show a correct 1-1 reflection of the stream/wall using just the Graph API.
The official Facebook apps use undocumented and generally unavailable api's. From monitoring and decrypting the network traffic, it's mostly fql calls, however they have access to data and methods that arent available to third party developers. So you will often find discrepancies such as this when using the feed. However, I usually find that fql and graph return the same result, but a different feed than Facebook.com and their mobile apps.