Friday, 5 February 2016

Copy SQLite database from assets folder

public class DatabaseManager extends SQLiteOpenHelper {

    // *************** Declare all the global variable *******************//
    private Context myContext;
    private String PACKAGE_NAME = "YOUR_PACKAGE_NAME";

    // path of your datbase
    private String DB_PATH = Environment.getDataDirectory() + "/data/"
            + PACKAGE_NAME + "/databases/";

    // the extension may be .sqlite or .db
    private static String DB_NAME = "YOUR_DATABASE_NAME";
    private static String DB_ASSETNAME = "YOUR_ASSET_DATABASE_NAME";
    public SQLiteDatabase myDataBase;
    private ContentValues contentValues;

    private Cursor cursor;
    private ArrayList> arrayList;
    private ArrayList array_list;
    private HashMap hashMap;

    private SimpleDateFormat dateformat, timeformat;

    public DatabaseManager(Context context) throws IOException {
        super(context, DB_NAME, null, 1);
        // this.myDataBase = getWritableDatabase();
        this.myContext = context;
        boolean dbexist = checkdatabase();
        if (dbexist) {
            // System.out.println("Database exists");
            opendatabase();
        } else {
            System.out.println("Database doesn't exist");
            createdatabase();
        }
    }

    public void createdatabase() throws IOException {
        boolean dbexist = checkdatabase();
        if (dbexist) {
            System.out.println(" Database exists.");
        } else {
            this.getReadableDatabase();
            try {
                copydatabase();

            } catch (IOException e) {
                throw new Error("Error copying database");
            }
        }
    }

    private boolean checkdatabase() {
        // SQLiteDatabase checkdb = null;
        boolean checkdb = false;
        try {
            String myPath = DB_PATH + DB_NAME;
            File dbfile = new File(myPath);
            // checkdb =
            // SQLiteDatabase.openDatabase(myPath,null,SQLiteDatabase.OPEN_READWRITE);
            checkdb = dbfile.exists();
        } catch (SQLiteException e) {
            System.out.println("Database doesn't exist.....");
        }
        return checkdb;
    }

    private void copydatabase() throws IOException {
        // Open your local db as the input stream
        InputStream myinput = myContext.getAssets().open(DB_ASSETNAME);

        // Path to the just created empty db
        // String out filename = DB_PATH + DB_NAME;

        // Open the empty db as the output stream
        OutputStream myoutput = new FileOutputStream(DB_PATH + DB_NAME);

        // transfer byte to input file to output file
        byte[] buffer = new byte[1024];
        int length;
        while ((length = myinput.read(buffer)) > 0) {
            myoutput.write(buffer, 0, length);
        }

        // Close the streams
        myoutput.flush();
        myoutput.close();
        myinput.close();

    }

    public void opendatabase() throws SQLException {
        // Open the database
        String mypath = DB_PATH + DB_NAME;
        myDataBase = SQLiteDatabase.openDatabase(mypath, null,
                SQLiteDatabase.OPEN_READWRITE);
    }

    @Override
    public synchronized void close() {
        if (myDataBase != null) {
            myDataBase.close();
        }
        super.close();
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}

Monday, 30 November 2015

Volley Get and Post Method Example

//for get method

private JSONObject jObj;

private void volleyGetMethod() {


        JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.GET,

                YOUR_URL, null,
                new Response.Listener() {

                    @Override

                    public void onResponse(JSONObject response) {

                        try {


                            jObj = new JSONObject(response.toString());


// rest of your code here

                           

                        } catch (Exception e) {

                            e.printStackTrace();
                        }

                    }

                }, new Response.ErrorListener() {

            @Override

            public void onErrorResponse(VolleyError error) {

                // System.out.println(error.getMessage());


            }

        }) {

            /**

             * Passing some request headers
             */
            @Override
            public Map getHeaders() throws AuthFailureError {
                HashMap headers = new HashMap();
                headers.put("Content-Type", "application/json; charset=utf-8");
                return headers;
            }

        };

        jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(60000,
                DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
                DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));

        // Adding request to request queue

        Volley.newRequestQueue(activity).add(jsonObjReq);
    }


// for post method

private void volleyPostMethod() {

JSONObject obj = new JSONObject();


try {


obj.put("number", "");

                        //  add other parameter here..

} catch (Exception e) {


}


JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.POST,

YOUR_URL, obj,
new Response.Listener() {

@Override

public void onResponse(JSONObject response) {

try {


System.out.println("res -- " + response.toString());


JSONObject jsonObject = new JSONObject(response

.toString());

// rest of your code here

} catch (Exception e) {

e.printStackTrace();

}


activity.runOnUiThread(new Runnable() {


@Override

public void run() {

// rest of your code here


}
});

}

}, new Response.ErrorListener() {

@Override

public void onErrorResponse(VolleyError error) {

// show Dialog for error

}

}) {

/**

* Passing some request headers
*/
@Override
public Map getHeaders() throws AuthFailureError {
HashMap headers = new HashMap();
headers.put("Content-Type", "application/json; charset=utf-8");
return headers;
}

};

jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(60000,
DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));

// Adding request to request queue

Volley.newRequestQueue(activity).add(jsonObjReq);

}

Tuesday, 25 March 2014

Internet Download Manager 6.18 Build 12 Final Retail + Crack(Updated)


Internet Download Manager (also called IDM) is a shareware download manager. It is only available for the Microsoft Windows operating system.


Instructions to install Internet Download Manager IDM 6.18 build 12(Updated)



1. Run the IDM Setup (idman618build12f.exe)

2. After installing IDM, copy and paste the Crack file of IDMan in installed folder (IDMan.exe)

3. Everytime you update IDM, fake serial notification and registration dialog will occur.     In this case, use 2 Step for activation.

4. After copy past run registry file in crack folder.

5. Note - If the Crack deleted, you may have to disable your AntiVirus Software temporarily.

This is because the Crack makes changes to the executable files of the software.The AntiVirus Software detects the Crack as a Virus.



If any problem in crack the idm please read the file named READ ME!! in crack folder for crack the idm..


Download from Here......


Friday, 14 March 2014

Remove WAT

Remove WAT



RemoveWAT can crack windows 7 sp1, windows 7 ultimate, enterprise, professional, home, Basic, etc. It’s 100% work and tested. RemoveWAT (Windows Activation Technologies) completely from the OS, whilst still retaining OS genuine status and receiving all updates. So that users can validate the illegal pirated copies of Windows 7 as genuine status forever and permanently. Also allows you to download windows update.
Features list:
  • Requires no additional processes running after patching.
  • Has a theoretical 100% success rate due to it being hardware independent.
  • Efficiently coded with safety checks to prevent damage to a Windows installation.
  • Un-install option.
  • Complete removal of all genuine related elements visible to the user, whilst keeping the core activation system active, allowing you to pass various genuine checks without issue.
  • Progress bar to allow overview of completion time.
  • A completley safe solution with zero risk of bricking your bootsector or rendering your pc unbootable
What’s new in RemoveWAT 2.2.6:
  • Now provides total WAT protection and fully disables the timebomb in evaluation copies
  • Correct Un-install
  • renames slmgr on x64 as well
  • Works on unicode systems
  • silent mode with /s switch
  • UI tweaked slightly
  • No reboot necessary
  • Passes WGA on x64
How it works:
  • Close all antivirus and firewalls, and then run the program with administrator privileges (from the internet need not be switched off)
  • Click “Remove WAT” and wait until you see the message on successful completion of the procedure
  • Computer will restart automatically
  • All the system is activated


Download From Here.....



Other Link

(if above downloaded activator not work)




Sunday, 19 January 2014

Flash Light

Flash Light For Android











Download APK file from here....
size : 360 kb






Wednesday, 8 January 2014

Windows 8.1 Download ISO

Windows 8.1 Download ISO 32 / 64 Bit Free Official

Features of Windows 8.1 Below are unique Windows 8.1 features you can check after windows 8.1 download:- 

1. Direct Desktop Boot Support  
2. Resize Apps Windows  
3. Improved Device Encryption  
4. Resistance to Everyday Malware Attacks  
5. Remote Business Data Removal in case of lost or Stolen




6. Automated Lock Down Feature  
7. Integrated VPN  
8. Broadband Tethering  
9. NFC Tap To Pair Support  
10. Web Application Proxy  
11. Enhanced Environment for Virtual Desktops

Free Download Windows 8.1 ISO


32 Bit


64 Bit




Installation Keys These are official codes for installation of Windows 8.1 These will only help for installation purpose of Windows 8.1
 
Professional-x64: MHF9N-XY6XB-WVXMC-BTDCT-MKKG7 
Professional-x86: XHQ8N-C3MCJ-RQXB6-WCHYG-C9WKB



Download Windows 8 Pro

Download Windows 8 Pro ISO 32 Bit / 64 Bit Free



Everything you think about above all is on the new Windows 8 Start screen. Tiles on the Start screen of Microsoft windows 8 are joined with individuals, applications, organizers, photographs, or online sites, and are buzzing with the most cutting edge insight, so you’re cutting-edge at a look.  Windows 8 is immaculate for PCs with just a rodent and console, those with touchscreens, and those with both. Whatever sort of PC you have, you’ll find snappy and liquid courses to switch between applications, move things around, and go easily from one place to a different one.



Microsoft Windows 8 accompanies another store for applications, the Windows Store. Open the Store right from your Start screen to skim and download windows 8 applications for cooking, photographs, brandishes, news, and a considerable measure progressively—a large number of them unlimited. The latest version is Windows 8.1 now. You can download windows 8.1 iso  Download Windows 8 and it incorporates the Xbox Music application, which gives you gain entrance to to an entire universe of music.Sign in with your Microsoft record to any of your PCs running Windows 8 and you’ll promptly see your particular underpinning, presentation inclination, and settings.

Download Windows 8 Pro ISO    

32 Bit 




 64 Bit     


Windows 8 Pro Installation Keys As per Microsoft Technet and MSDN below are two installation keys which will be required to install Windows 8 Professional. Note that these are not activation keys. These are only installation keys which you’ll need to enter during installation process.  

NG4HW-VH26C-733KW-K6F98-J8CK4 
XKY4K-2NRWR-8F6P2-448RF-CRYQH

Tuesday, 7 January 2014

Blackmart Alpha v0.99.2.44 Apk- Get Paid Android Apps for Free

Blackmart Alpha v0.99.2.44 Apk- Get Paid Android Apps for Free






Blackmart Alpha a black market where you can get any paid apps available in the market for free. It can download thousands of applications for free. It has a new market look, similar like appbrain or applanet. Also it supports all android versions and is easy to install.

Features:
  • Can download any paid apps available in android market for free.
  • Can get cracked apps.
  • Can download apps that are blocked on your device by the market.

Download From Here


Monday, 6 January 2014

Norton Internet Security 2014

Norton Internet Security 2014 



1.Download & install Norton Internet Security 2014: NIS-TW-21.1.0-EN-US.exe [English 30 day trial Version].

2.Download Activator.


3.For activation Go to this Youtube link and download Youtube video.

https://www.youtube.com/watch?v=ROg3b8AoYS0


For activation you can also read the TEXT document which is already given in activator RAR file and follw the step written in text document or show video for activation.....



Download Activator




Sunday, 24 November 2013

How to Bypass Android Pattern Lock

How to Bypass Android Pattern Lock


Android introduces a cool new feature to ensure protection of private data to it's users by Pattern Lock technique. It is a unique thinking , other than remembering or setting difficult combination of password characters whether in numeric or alphabetic form. Pattern lock provides a huge set of patterns to choose from. User may set any unique and different pattern according to their wish anytime.



With advantage of locking screen using this unique way , there is also a problem that sometimes many of android users have to face i.e. what if they forget the pattern they had used to lock their device or try to unlock it with wrong pattern number of times that turned device to get locked permanently ?
If you stuck in such problem so dont worry there are three methods to unlock your device.

Method 1. Unlock Lock Pattern Using Your Email




First method includes a simple way of logging in to your Google account and then getting RID of that lock pattern.This is easiest and most recommended way of unlocking your device.So if you have entered wrong pattern for 5 times and then if it is showing you the Forgot Lock Pattern option, then you can login through your Google account and bypass the lock pattern system on your device.

Method 2. Unlock Lock Pattern Using Command Prompt

If you have forgotten your email too and unable to log in to your google account then the second method could be handy that includes executing few lines of script in command prompt which will allow you to write any pattern and to get into your OS . As this method includes use of command lines , so it is not that user friendly but it is the most effective way for sure. It involves a few steps :

Step 1: Connect your Android Phone to Your Computer.

Step 2 : Open command prompt as administrator.

Step 3 : Now in command prompt window type the following code carefully exactly as it is and then press  enter.

adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit

 Step 4 : Now you will some screen as shown below and then you can reboot your phone and now when your will start again then try unlocking your phone using any random lock pattern and it will work pretty fine.


Step 5 : If you face any problem repeat same steps but instead of the above code try usingadb shell rm /data/system/gesture.keyand then press enter and now try rebooting your device to see if it works.


 Method 3. Unlock Using Hard Reset Option

Hard Reset is an inbuilt feature of android phones and tablets and every device has it. This method will unlock your device but will remove all user's data and settings as well. You should use this method when none of the above methods work for you and you need to unlock your device urgently. This will remove only the data from phone memory and not from the SD card available in phone.

It involves a few steps to unlock device :

Step 1 : Switch off your phone.

Step 2 : Now while turning your phone on , you need to press some specific combination of keys. Generally it is volume up + power button in many of the android devices so try them first and if they dont work for you so here are list of some popular device combination keys or else better way is to google it.
  • Nexus 7 - Volume Up + Volume Down + Power
  • Samsung Galaxy S3 - Volume Up + Home + Power
  • Motorola Droid X - Home + Power 
Step 3 : Now when your phone starts up and you see the logo of your phone , leave the power but but continue holding the volume up button until you see android recovery screen.


you will see some screen like shown above. Just navigate to wipe data/factory reset using volume keys and then press Power button to select it.

Step 4 : You will see a screen as shown below :


Step 5 : After you reach to Yes option , select it by using power switch and then it will erase all data on your phone and will unlock it and so ready to be used once again .


So these were possibly all methods for unlocking Android device and to Bypass the pattern lock of android device