PhoneGap getting started guide is helpful for Windows and Mac users. But Linux users (Ubuntu distro mainly) left in dark. I first tweeted about it in Twitter and a PhoneGap employee replied as below @mayooresan getting started is essentially just the docs for the platform you are targeting (android in ur case) — xnoɹǝʃ uɐıɹq […]
Android Studio is Not Launching
So just like all other Android devs out there, after the Google I/O 13 session you downloaded the Android Studio and installed it to find out that you can’t launch it. Don’t worry you are not alone. It’s a global phenomenon. First step Navigate to your Android Studio installation path first and locate the bin […]
Download and Begin Android Development Instantly
I know setting up Android development environment is bit lengthy and annoying. You need to download Eclipse, Android Plugin, SDK etc separably and set it up on your machine. Now once again, Google comes to rescue. You can download Android SDK which includes following Eclipse + ADT plugin Android SDK Tools Android Platform-tools The latest […]
Drawing a Grid on HTML5 Canvas
If you wanna draw a Grid as below in the image then following code snippet will help you. var canvas = $(“#myCanvas”); var context = canvas.get(0).getContext(“2d”); //setting grid color context.strokeStyle = “rgb(255, 0, 0)”; //drawding grid for(x=0; x
Get Reference to Canvas using jQuery
You can use JavaScript to get reference to a canvas in HTML5 but if you are someone so much into jQuery then you can use the following method to get reference to canvas using jQuery. Old School Way var canvas = document.getElementById(“canvas”); var context = canvas.getContext(“2d”); jQuery Way var canvas = $(“#myCanvas”); var context = […]
Dynamically List JQuery Mobile (Style Issue)
Recently I’ve been working on Mobile Jquery and stuff. I was doing a dynamic listview with mobile jquery and when is loaded it is very plain and no styles were applied. After searching online for a while I figure out we need to refresh the list to apply the style. Check out the code below. […]
List Audios in SD-Card in a ListView
For one of my recent project, I need to list down all the media files (audio files to be specific) available in sd-card. First I was trying to scan the sd-card and filtering out only the audio files so on. My code got so messy. Later via this question on StackOverflow I figured out my […]
Check Network Availability
Apps that communicates with web services needs to check network availability before calling them. Failing do so may break the app when there are no network present. You can use following code segment/method to check the network availability. If network available then TRUE returned from the method. boolean networkStatus = getNetworkStatus(); if(networkStatus){ call the web […]
Rename Android Project’s Package Name
Android applications are uniquely identified using the package name. So you must not name your application’s package name to something like “a.b.c” as there is a high possibility someone else too named that way. Read this question at StackOverFlow to learn more about android package naming convention. In case u started a project with silly […]
Check whether file exists
In the current app I’m developing user has privileged to add an image to the application. Image Uri (sd card location) will be saved in SQLite. Now the problem arises what if the user deletes the image in SD card and app trying to access it. Definitely that’ll be a force close. This is how we can check […]