If you are searching to a coordinate (such as street, house number, location…) in Google Maps , you’ll see that there are more information about public places near by such as airport, cafe, restaurant, store… This information is really helpful, for example, if I want to move to a new apartment, I would like to check if the public transport is near by, any supermarket is available, playground for my children is not too far… with Google Maps you’ll get all information. Or another example, if I’m on highway and too tired because of driving, I can find any motel/hotel near by my current location so that I can drop in and take a rest. Therefore today I would like to make a small demo to show how we can show Google Places on our Android smartphone or integrate this feature to our apps.
Integrating Google Maps (or any map service) is always a nice feature for our applications, but it seems to be “complicated” for integrating Google Maps because Google Maps is not officially supported in emulator because lacking of Google Play Service. That forces us to use a real device during developing app. For me, not nice. So in this post, I would like to show step by step how I configure my emulator so that a Google Maps app can be installed on there. To make such an emulator, we have to use a set of correct settings/files. If not, it won’t work. So you have to set all settings like mine. My emulator targets on Android 4.2.2 – API Level 17.
Linking to social networks may be one of special features of your program. Today I’d like to make a small demo to make a tweet in Twitter from Android. The demo will use oAuth to authenticate user with Twitter and allow him to tweet when authentication is successful. The app won’t make any authentication with username and password, the authentication process will happen at Twitter website. When the process finishes, a successful access token will be returned to notify if user entered correct log in data. We can store this token for later use without requiring user to log in again.
Pushing message from the server to client so that client doesn’t have to send the request to the server periodically is not a new concept anymore. Earlier when then client wants to check if the server wants to send something to him, he has to send dummy request to server repeatedly to ask for notifications. Although the server has nothing new, he is still overloaded because of handling these kinds of requests. Actively pushing message from the server to client will save him from unnecessary requests of clients. In this concept, the client will connect to the server through a channel and wait there for a new message. When the server wants to notify a client, he just uses the current active channel between him and client, then sends a message through it. The client receives notification and handles it. Server and client don’t have to send ping-pong message to communicate, all they have to do is building up an active channel between them and communicating through that channel.