Get Metadata of Audio files using Cursor in Android

We are building a music app and as you would have guessed we would require all the audio metadata. At first, we tried using Android’s Intent but it would let us select only one audio file at a time. Also, there was a setback if the user had disabled the default music player and other player did not listen to this intent. So we tried to look up for other ways to obtain metadata of all the audio files. We first used MediaMetaDataRetriever but it would give null String for some of the audio objects.

»
Posted in Android

Transfer data from Client to Server using Sockets

In the previous post - Connect Two Android Devices over WiFi using Network Service Disocvery, we showed how we used Network Service Discovery to connect two android devices over WiFi. In this post, we are going to show how we used this to our advantage to connect and send data to the server client.

»
Posted in Android

Connect Two Android Devices over WiFi using Network Service Disocvery

We have started working on another Android app which lets user stream music on another Android device wirelessly. I’ll keep adding posts as the app progresses. This is the first part of the series. This is a completely new territory for me as I have never worked with sockets, networks and in general most of the android. So there might be some issues, but we’ll keep refining till we find the best way.

»
Posted in Android

java.lang.reflect.Method for Callback methods

I keep looking for ways to do things right. For calling some function of my activity, I’d pass activity to that class and call that particular method. I did not feel right doing this and I wanted to make my class more generic so I started looking for better approaches. I found this approach, where I can pass any function as reflect.Method and invoke it in that class. This seemed perfect, but as it turns out this also has some issues of its own.

»
Posted in Java

Timer Utility for Android

We launched LenX last week and got a lot of feedback. One of them was to include a timer utility to set the exposure time. I looked up a bit and found out that the best way to do this was to use Handler and create a separate thread.

»
Posted in Android

LenX - Long Exposure Photography for Android

So, finally, after 2 months of grappling with Android development and studying optimization of image processing on phones & photography concepts, me & my friends have finally bought our idea to fruition.

»
Posted in Android

Touch to Focus Android Camera

I have been working on LenX for few weeks now, and as it is a camera app, it was necessary to add some type of focus. We decided to add touch based focus. Wherever user touches the screen, Android camera would try to focus in that area.

»
Posted in Android

Make Action Bar Transparent

I have been working on an app which produces long exposure effect. As of now, we are almost ready with the free version of the app. For this, I got some feedback from some of the users. One of them said that we should make the action bar transparent and since it’s a camera app, it’d look great if it’s interface looked similar to that of Google Camera app. We are nowhere near that app, but we thought of giving it a try. Plus, making the Action Bar transparent gives more space for the camera preview.

»
Posted in Android

Face Detection using Android Camera Preview

I have been working on making a perfect Camera Preview interface with burst capability, touch focus, face detection, frame processing, pinch zoom and whatever that I could think of.

»
Posted in Android

Android CameraPreview with PreviewCallback and Processing Frames using Threads

Recently, I have started working with Android extensively. It hasn’t been easy. I had to figure out a lot of stuff and that too simultaneously. How UI works, how threads run, how to process frames, etc. In my previous post, I have shown how to process each frame onPreviewFrame callback. In this post, I am going to write about using asynchronous threads to do image processing so that workload of ui thread reduces.

»
Posted in Android

Beginning D3.js

A friend was working on a project for data visualization using D3.js and I decided to help. I didn’t know much about javascript and d3. I still don’t, but I learned few things on my way. I wouldn’t bore you with details explaining how d3.js works as there are a lot of better sites for that. I made few different types of charts using d3.js and kind of made my own library. It has chain syntax facility and also it’s pretty easy to use. One can update the parameters easily. I’d put it on GitHub once I finish scrubbing it up.

»
Posted in Data Visualization

FFmpeg with OpenCV on Android

I am currently working on android application which takes a video file and processes each frame to create a long exposure effect. If you have worked with OpenCV on Android, you’d be aware of the face that OpenCV does not support FFmpeg on android yet. To do this one needs to manually build FFmpeg for android.

»
Posted in Android