Categories
Programming

Android Gesture Detector Demo

Android provides a dedicated GestureDetector class to detect common gestures. It implements a SimpleOnGestureListener which can be used to detect the following gestures: onDoubleTap(MotionEvent e) onDoubleTapEvent(MotionEvent e) onDown(MotionEvent e) onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) onLongPress(MotionEvent e) onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) onShowPress(MotionEvent e) onSingleTapConfirmed(MotionEvent e) onSingleTapUp(MotionEvent e) Let us […]

Categories
Programming

Download All Images from a Remote Directory : Python Script

Here’s a quick Python script which you can use to download all images from a remote directory say from www.example.com/dir1/. I have used beautiful soup to do all the heavy-lifting. from BeautifulSoup import BeautifulSoup as bs import urlparse from urllib2 import urlopen from urllib import urlretrieve import os import sys def main(url, out_folder=”D:/deckfinal/”): soup = […]

Categories
Programming

Free Blue Corporate Style CSS Web Template | Knowpapa Giveaway of the Week

The Free Blue Corporate Style CSS Web Template giveaway of the week by designer/author: Sangita Chaudhary License You are granted the use license which enables you to use this template FREE of charge. Because this is released under Creative commons license, You can modify the theme in any way you like and even use it […]

Categories
Programming

Capture Image using android.hardware module

The android.hardware.camera module provides a direct access to camera API and is the preferred method of taking pictures when you need a finer control over various camera parameters. The first step involves adding the following to your AndroidManifest.xml <?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.knowpapa.camerademo” …. > …… <application …. …. > <activity ……… android:name=”.CameraDemoActivity” android:screenOrientation […]

Categories
Programming

Android Code to Capture Image Using the Built-In Camera App

The simplest way to capture an image is to use Android’s built-In camera app capabilities via the intent filter. The intent filter of the built in camera app is named: android.media.action.IMAGE_CAPTURE Accordingly to access this function you simply need to create an intent that would be caught by the above filter. In addition you need […]

Categories
Programming

Getting Started with LibGDX for Android Game Development

Getting the Development Environment Ready 1) Install Java Development Kit (JDK) 2) Install Eclipse 3) Install and Configure Android Software Development Kit(SDK) 4) Download Libgdx Prerequisites The tutorial will assume a certain level of familiarity with Java language. I also assume a basic level of familiarity with Android API assuming you understand basic terms like […]

Categories
Programming

Open GL Error Fix for Windows 7 and XP

So you have been playing your favorite game (Angry Birds anyone ?) in your android or iOS mobile phone and now you decided to play it on your desktop only to get an error that reads something like: OpenGL 1.x/2.0/ renderer not supported or DirectX renderer not supported ? OpenGL (Open Graphics Library) and DirectX […]

Categories
Programming

Android: using XML to Persist Data

If you have a handful of data to be stored, using SharedPreferences to persist your data may not be very convenient. Android lets you store data as XML file and then read it back into your source.Using XML you can make up your own custom tags to store data in a file that is both […]

Categories
Programming

Android: Using Shared Preferences for Storing Data

The SharedPreferences API in Android Content(android.content.sharedpreferences) is the easiest and most convenient way to store simple data types like boolean, int and float as key-value pairs. The data that you store through this method is private to a given application and is not visible to other applications (even those that access the particular application’s storage). […]

Categories
Programming

Android: Getting the Development Environment Ready

If you are an existing Android developer and are comfortable with any section, please feel free to skim through it. Download and Install the following components in the order specified (Ignore things that you have already installed). 1. Java Development Kit(JDK) – latest version 2. Android SDK 3. Eclipse IDE for Java Developers 4. ADT […]