This blog has moved to http://vshivam.github.io/ and now hosted using github-pages. Check it out!!
The Gesture SDK on Samsung Galaxy phones supports an interesting feature of detecting palm movements in front of the screen. The issue however is that they’re only supported on Galaxy S5, Note3 and Note4 devices and since December 2014, Samsung provides no further updates for the SDK for new Samsung mobile devices. But it’s still… Continue reading Detecting hand gestures on Samsung Galaxy.
This blog will be divided into two parts. First, how can we store files in the private storage of our Android application so that it is not directly accessible by other applications running on the device, such as the file manager and second, how to open these files using an external application. Step 1 :… Continue reading Storing files privately on Android and opening them using an external application.
There’s no easy way to be able to switch the jQuery Mobile colour swatch dynamically for the whole page. A quick google search suggests this stackoverflow question where the accepted answer suggests removing and adding relevant classes for the required colour swatch. For instance : There are a bunch of other elements that you’ll need to update as mentioned… Continue reading Dynamically change jQuery Mobile colour swatch.
As discussed in the last post, I use the JmDNS library for service advertisement on the local area network. You can refer to it here. In this post, I’ll explain how I used the pyZeroconf library to search for the service advertised by the android device. There do exist other libraries but the ones that I… Continue reading Multicast DNS Service discovery in python.
While working on the Ambient Dynamix project, I needed to search for android devices running the Dynamix framework from a python based application running on the desktop. Starting API 16, android provides the NSDManager class to advertise and search for services. However, to be able to support pre android 16 devices, I used the JmDNS… Continue reading Using JmDNS for service advertisement and discovery on android.
While working on the Ambient Dynamix Project, I needed to create a listview which contains a non fixed number of headers each one followed by some list items. A common solution is to use the MergeAdapter. A MergeAdapter object exposes the addAdapter(), addView() and addViews() methods. The demo included in the repo is pretty self… Continue reading Inflating different xml layouts in an Android ListView for different Objects.
Ideally when I have to remove a list item from a listview, I’d remove the data object from the collection which the adapter uses and then do a adapter.notifyDataSetChanged() call which’ll redraw the list view. Consider an adapter which uses an array list of Strings. Now, to delete an item from the ListView, But this… Continue reading Hiding a list item from an Android ListView without removing it from the data source.