I recently came across Node.js technology, which is nothing but JavaScript based event driven server side platform. Further studies made me use Haml-js for templating. As of I studied, using both of them we can make good maintainable and scalable applications. For improving Haml-js performance, I had to cache the compiled templates on some location […]
In Android, How to obtain Uri of image on SD-Card
How to get URI of image stored on SD-Card? Step 1:- Read the image from SD-Card.
1 2 |
File sdCardDir = Environment.getExternalStorageDirectory(); File yourFile = new File(sdCardDir, "path/to/the/file/filename.ext"); |
Step 2:- Once you get object of image file, you can get URI of the image.
1 |
Uri imageUri = yourFile.toUri(); |
Next:- You ready to use URI wherever you want. Below e.g. shows we can use it to start intent for the […]
Android Emulator, localhost and host files on Windows
We all use emulator with comes with Android SDK to test, how app / websites behave in Android devices. While working on my applications I wanted to access my localhost which was apache server. I tired using IP address as 127.0.0.1 and typing http://localhost many times. But then I gone through the Android Developer site […]
Android ListView with separate headers and images loading from remote server
ListView is one of the commonly used widget in Android. You might have used normal ListView which is just the list of things (text/images). Sometimes you might want to use ListView which has sections or headers. There were no straight forward(easy ways) to do this in Android. Jeff Sharkeys shown us way for creating such […]