Ads 468x60px

Featured Posts

Saturday, May 9, 2015

Android: InstantSafe App

InstantSafe app is to save people in case of emergency and provide them instant help from their family/friends and local emergency help services. You can also instantly track your mobile phone or your family/friends can find your location to provide immediate help.

If you or your loved one ever walk through a dark alley, travelling abroad and have or witness serious life-threatening situation like fire or medical emergency or you just need to alert someone of your whereabouts just quickly click your mobile phone power button 4 times or click app SAFE button to instantly inform your family/friends/guardians that you need help.

How it works:

You just have to quickly click mobile phone power button 4 times or click app SAFE button in case of emergency to inform your emergency contacts. It will instantly initiate a call to your emergency call contact and send personalized help SMS including your location (a Google maps link) to your emergency SMS contacts even if your mobile phone screen is locked (No need even to get mobile phone out of your pocket). In personal emergency contacts you can add your family/friend/guardian contacts for emergency call or SMS. In local emergency contacts you can add local emergency help service contacts like police, hospital, fire brigade etc. You can save a personalized help SMS to be sent in case of emergency. You can save a location request code. When your mobile phone receives an SMS having exact specified location request code it will automatically send its location in reply.

What is different?

- Quick 4 times mobile phone power button click will inform emergency contacts instantly
In case of panic you don't have to launch complete application or even unlock mobile phone screen lock to inform your emergency contacts. Mostly emergency help applications provide just an emergency button.
- Mobile phone location in response to location request code SMS
It can help you to track your mobile phone or your family/friends can find your location to provide you immediate help. It can be used in case your mobile is lost; family/friends are worried about you.
- No internet required
Although Internet is easily available everywhere but still to facilitate more people from basic to advanced smartphone users and to avoid internet connectivity issues in case of emergency, this app works fine without internet. Mostly emergency help applications require internet.
- Intuitive User interface
It has simple, tidy, easy to use interface.


- SAFE button to inform emergency contacts
- Quick mobile phone power button 4 clicks to inform emergency contacts
- No need to launch app, unlock mobile phone screen lock or even get mobile phone out of your pocket
- Immediately initiate call to emergency call contact
- Help SMS with your current coordinates to multiple emergency SMS contacts
- Add mobile phone contacts directly
- Personalized help SMS
- Custom location request code
- Self-activated reply with current location for location request code
- Notifications for emergency call/SMS contact and help SMS
- Power button, location request code, notification and sound settings
- Power saving approach for minimum battery consumption
- Application works fine without Internet connection
- Application is free of ads


Make sure in mobile phone settings, location services are 'ON' and high accuracy mode using GPS, Wi-Fi and cellular networks to determine location is enabled.

Saturday, October 18, 2014

Java: Connection with MySQL using JDBC

This will help you create connection with MySQL database using Java (JDBC). You have to update database URL, username and password in the code, then run it you will get connection established as output.  Please include mysql-connector-java-5.1.23-bin.jar in your project build path. You can download it from here:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBConnection {

public static void main(String[] args){

    public static Connection getConnection(){
    Connection conn = null;
            String url = "jdbc:mysql://localhost/database_name";
            String user = "root";
            String password = "";
            conn =  DriverManager.getConnection(url, user, password);
            System.out.println("Connection established");
        catch(ClassNotFoundException e)
        catch(SQLException e)
        return conn;

Thursday, September 25, 2014

Android: Show Input Dialog

This code simply shows how to use an input dialog box and get input value from it.

public void showInputDialog(Context context){
AlertDialog.Builder alert = new AlertDialog.Builder(context);

alert.setMessage("Enter Text");

// Set an EditText view to get user input
final EditText input = new EditText(context);

new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
String value = input.getText().toString().trim();

new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
// Canceled.