Obtaining a Google Maps API key

If you want to get google maps API Key for Android Project, follow the following steps :

  1. Navigate to your project in the Google APIs Console.
  2. In the Services page, verify that the “Google Maps Android API v2″ is enabled.
  3. In the left navigation bar, click API Access.
  4. In the resulting page, click Create New Android Key….
  5. In the resulting dialog, enter the SHA-1 fingerprint, then a semicolon, then your application’s package name. For example: 45:B5:E4:6F:36:AD:0A:98:94:B4:02:66:2B:12:17:F2:56:26:A0:E0;com.example
  6. The Google APIs Console responds by displaying Key for Android apps (with certificates) followed by a forty-character API key, for example:
    AIzaSyDftcYHqPFYDHNINji4mWrJQo_TKKIgiSA

 

Running a keytool

  1. Run the command prompt.
  2. cd C:\Program Files\Java\jdk1.7.0_09\bin
  3. keytool -exportcert -alias androiddebugkey -keystore “C:\Users\userName\.android\debug.keystore” -list -v
  4. The base password is android.
  5. You will be presented with the MD5, SHA1, and SHA256 keys; choose the one you need.

 

https://developers.google.com/maps/documentation/android/start

http://stackoverflow.com/questions/5488339/how-can-i-find-and-run-the-keytool

http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/

Generic Concept for Working with Database.

This post is for the students anyone who is planning to their project in Java and Database. Writing the same queries and checking single quotes, double quotes, commas is tedious job. So, why not to create Generic class which generates queries automatically only by providing table name, fields and values.

Design of Add New Product Form :Add New Product

The code to be written in submit button :Submit Code

Application Layer: Product.javaProduct_Class

Database.java

DatabaseLikewise you can create similar method for update, select and delete.

[Note: Instead of using String array, using ArrayList would be best.]