Everyone likes it when you remember their name. One of the simplest, most effective things you can do to make your app more lovable is to remember who your user is—especially when the user upgrades to a new device or starts carrying a tablet as well
In order to securely access an online service, users need to authenticate to the service—they need to provide proof of their identity. For an application that accesses a third-party service, the security problem is even more complicated. Not only
Just as your application can send data to other applications, so too can it easily receive data from applications. Think about how users interact with your application, and what data types you want to receive from other applications. For example, a
So far we've talked about accessing Google APIs, which use accounts and users defined by Google. If you have your own online service, though, it won't have Google accounts or users, so what do you do? It turns out to be relatively straightforward to
Beginning in Android 3.0, using the SearchView widget as an item in the action bar is the preferred way to provide search in your app. Like with all items in the action bar, you can define theSearchView to show at all times, only when there is room,
Implementing an effective and user friendly share action in your ActionBar is made even easier with the introduction ofActionProvider in Android 4.0 (API Level 14). An ActionProvider, once attached to a menu item in the action bar, handles both the
There are many ways to store your data, such as in an online database, in a local SQLite database, or even in a text file. It is up to you to decide what is the best solution for your application. This lesson shows you how to create a SQLite virtual
Suppose you are implementing a crowd-sourced weather service that makes a global weather map by blending together pictures of the sky taken by devices running your client app. Integrating photos is only a small part of your application. You want to
The SearchView and action bar are only available on Android 3.0 and later. To support older platforms, you can fall back to the search dialog. The search dialog is a system provided UI that overlays on top of your application when
Your application has a job to do, and integrating videos is only a small part of it. You want to take videos with minimal fuss, and not reinvent the camcorder. Happily, most Android-powered devices already have a camera application that records
短按耳機鍵預設是暫停/播放音樂功能,按照如下的修改方式可以實現短按耳機鍵暫停/播放FM please delete your media button code, modify as below:1. AndroidMenifest.xml :<receiver android:name=".FMRadioActivity$MediaButtonReceiver"> <intent-filter> <action
int (*(*F(int,int)))(int)是什麼類型?首先,int(*M)(int),其中M為函數指標,則(*F)(int,int)=M,用N代替*F,F為指向N的指標,則N(int,int)=M,這表示N是一個函數,參數為2個int,其傳回值為函數指標M。故F為函數指標,該函數指標所指向的函數的參數為2個int,傳回值為函數指標。另:int a;int F();可以想象成F()=a,即表示F是個函數,其傳回值為a的類型。上面的N(int,int)=M中,N(int,int)與M同類型,
Directly controlling a device camera requires a lot more code than requesting pictures or videos from existing camera applications. However, if you want to build a specialized camera application or something fully integrated in your app UI,
When developing your Android application to take advantage of multiple APKs on Google Play, it’s important to adopt some good practices from the get-go, and prevent unnecessary headaches further into the development process. This lesson shows you
When developing your Android application to take advantage of multiple APKs on Google Play, it’s important to adopt some good practices from the get-go, and prevent unnecessary headaches further into the development process. This lesson shows you