How to Set Up Android App to Support Expansion Files

Google Play currently requires that your APK file be no more than 50MB. For most applications, this is plenty of space for all the application's code and assets. However, some apps need more space for high-fidelity graphics, media files, or other large assets. Previously, if your app exceeded 50MB, you…

Creating a simple music player with iOS

You want to play music or just some audio content with a simple UI within your app? There were several libraries for doing that: MusicPlayerViewController, MDAudioPlayerController and many more. But none of them seem to be active any more. If you are starting development on an app that includes a…

Recycler View Item Click Listener

With the Android L release, RecyclerView has replaced ListView as the goto component for creating a view for providing window to a large data set. It promises lots of performance improvements over the standard list view. To use the RecyclerView widget, you have to specify an adapter and a layout…

Switch to a new song/audio in background for iOS

If you have a music app, you might be using a code like this to play songs in your iOS app: - (void)next { // Find new index NSUInteger newIndex; // Create a new audio player for this index NSError *error = nil; AVAudioPlayer *newAudioPlayer =[[AVAudioPlayer alloc] initWithContentsOfURL:[(MDAudioFile *)[soundFiles objectAtIndex:selectedIndex] filePath…

Dynamically adding attributes to an Ember Data Model

Often times, you want to add some attributes to an Ember Data model dynamically (e.g. you might want a translateable attribute for each available locale). Lets say, you have a name attribute that you want to translate in English, Spanish, French and Chinese. Here's how you would usually write…