Progress Dialog simple sample source code

Progress Dialog In Android

ProgressDialog is a  dialog showing a progress indicator and an optional text message or view. Only a text message or a view can be used at the same time.The dialog can be made cancelable on back key press.The progress range is 0..10000.

The ProgressDialog is used to show Loading action when performing the  background tasks like reading file , performing a http connection etc. This is very much coupled with the AsyncTask.

Progress Dialog Usage

The ProgressDialog provides 2 types of constructors, which takes context as one of its paramenter.
ProgressDialog(Context context)
ProgressDialog(Context context,int theme)

Note: when working with fragments use getActivity() method to get the activity context.
Official Documentation : Progress Dialog
 

Progress Dialog Sample Source Code


import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;

public class MainActivity extends Activity {

    ProgressDialog barProgressDialog;
   
    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        // create a Progress Dialog Object
        barProgressDialog = new ProgressDialog(MainActivity.this);

        // Set variuous attributes of the ProgressDialog object
        barProgressDialog.setTitle("Loading ...");
        barProgressDialog.setMessage("Please wait ( about 4 sec)");
        barProgressDialog.setProgressStyle(barProgressDialog.STYLE_HORIZONTAL);
        barProgressDialog.setProgress(0);
        barProgressDialog.setMax(20);
        barProgressDialog.show();

        // This is used to dismiss the dialog, This can be invoked when ever yopu want the dialog to disappear, like on button click

        barProgressDialog.dismiss();
       
    }

}



Upgrading your Android Jellybean 4.2.1 into KitKat 4.4.2 in Samsung galaxy s4

Prerequisites for Upgrading to Android 4.4.2 Kitkat in Samsung Galaxy s4


The article explains several steps involved in upgrading your Android Jellybean OS to  Android 4.4.2 KitKatin your samsung galazy s4 smart phone ,But, beforeyou flash the firmware manually, you should be aware of the following:


- Have a proper back-up of all important data on the device,so on failure you can reflash the data .
- The handset must have at least 80 percent battery power so there will not be any crash during up gradation .
- The USB drivers for the Samsung Galaxy S4 must be installed on the computer and USB Debugging must be enabled.
- After flashing the firmware, any installed custom ROM will be lost.
- Custom recovery, such as ClockworkMod Recovery or TWRP, will also be lost.
- The Android 4.4.2 KitKat XXUFNB7 firmware is only for the Galaxy S4 with the model number GT-I9500. Do not try this on any other Galaxy S4 model.


Here are the firmware details:
PDA: I9500XXUFNB7
CSC: I9500OLBFNB4
MODEM: I9500DXUFNB2
Version: Android 4.4.2
Build date: Feb. 28, 2014
Regions: Malaysia, Indonesia, Philippines, Singapore, Thailand, Vietnam
CAUTION: You do this at your own risk, we are not responsible for any dammage that is caused to your device due to these operation, our aim is just to share the information
Step 1: Download the firmware package and extract the zip file. You will get a .tar.md5 file and along with other files. [Download links 12]
Step 2: Download Odin v3.09, and extract the zip file. You will get Odin3 v3.07.exe along with  other files.
Step 3: Run Odin3 v3.09 as an Administrator.
Step 4: Switch off the Galaxy S4 and boot it into Download Mode by pressing and holding Volume Down, Home and Power buttons.
s

Step 5: Connect the Galaxy S4 to the computer via the USB cable and wait until a blue sign appears in Odin.
Step 6: Click on the AP button in Odin and select the .tar.md5 file that was extracted in Step 1.
- Click on ‘CP’ and select file with ‘MODEM’ in its name. Ignore this step if there is no such file.
- Click on ‘CSC’ and select file with ‘CSC’ in its name. Ignore this step if there is no such file.
- Click on ‘PIT’ and select the .pit file. Ignore this step if there is no such file.
Step 7: In Odin, ensure that the Auto Reboot and F. Reset Time options are checked. The re-partition check box should be checked only if a .pit file was chosen in the previous step.
Step 8: Now, click on the Start button in Odin to begin the installation process.
Step 9: After the installation is complete, the device will restart automatically.
Step 10: Once you get the Samsung logo on the home screen, you can unplug the device from the computer and close Odin.
You are done with upgrading your old Android Jellybean OS of your Samsung galaxy s4 into brand new Android KitKat 4.4.2 OS.


Reading and writing data from and into a file in Android using java

This Article will give complete information about reading and writing data from and into a android file system , Article also provides the required functions to porform these operations, so the user can directly use those functions in his/her program  .



Writing Files to Internal Storage

public static void writeFileInternalStorage(String strWrite, Context context,String fileName) 
            {
                    try 
                    {
                             // Check if Storage is Readable 
                            if (isSdReadable())   // isSdReadable()e method is define at bottom of the post
                            {
                                    String smsfilename = fileName;
                                    FileOutputStream fos = context.openFileOutput(smsfilename,Context.MODE_PRIVATE);
                                    fos.write(strWrite.getBytes());
                                    fos.flush();
                                    fos.close();
                                    
                            }
                    } 
                    catch (Exception e) 
                    {
                        // Your Code
                    }
            }




Writing Files to SD Card




public static void writeFileOnSDCard(String strWrite, Context context,String fileName)
            {


                    try 
                    {
                            if (isSdReadable())   // isSdReadable()e method is define at bottom of the post
                            {
                                    String fullPath = Environment.getExternalStorageDirectory().getAbsolutePath();
                                    File myFile = new File(fullPath + File.separator + "/"+fileName);

                                    FileOutputStream fOut = new FileOutputStream(myFile);
                                    OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);
                                    myOutWriter.append(strWrite);
                                    myOutWriter.close();
                                    fOut.close();
                            }
                    }
                    catch (Exception e)
                    {
                            //do your stuff here
                    }
            }



Reading files from Internal Storage


public static String readFileFromSDCard(String fileName,Context context)
            {
                        String stringToReturn = "";
                        try 
                        {
                                if(isSdReadable())    // isSdReadable()e method is define at bottom of the post
                                {
                                        String fullPath = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "/"+fileName;

                                        InputStream inputStream = context.openFileInput(fullPath);
             
                                        if ( inputStream != null ) 
                                        {
                                                InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
                                                BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
                                                String receiveString = "";
                                                StringBuilder stringBuilder = new StringBuilder();
                 
                                                while ( (receiveString = bufferedReader.readLine()) != null ) 
                                                {
                                                        stringBuilder.append(receiveString);
                                                }
                                                inputStream.close();
                                                stringToReturn = stringBuilder.toString();
                                        }
                                }
                        }
                        catch (FileNotFoundException e) 
                        {
                                    Log.e("TAG", "File not found: " + e.toString());
                        }
                        catch (IOException e) 
                        {
                                Log.e("TAG", "Can not read file: " + e.toString());
                        }
    
                        return stringToReturn;
            } 

Reading Files from SD card



public static String readFileInternalStorage(String fileName, Context context)
            {
                    String stringToReturn = " ";
                    try 
                    {
                            if(isSdReadable())   // isSdReadable()e method is define at bottom of the post
                            {
                                    String sfilename = fileName;
                                    InputStream inputStream = context.openFileInput(sfilename);
             
                                    if ( inputStream != null ) 
                                    {
                                            InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
                                            BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
                                            String receiveString = "";
                                            StringBuilder stringBuilder = new StringBuilder();
                 
                                            while ( (receiveString = bufferedReader.readLine()) != null )
                                            {
                                                    stringBuilder.append(receiveString);
                                            }
                                            inputStream.close();
                                            stringToReturn = stringBuilder.toString();
                                    }
                            }
                    }
                    catch (FileNotFoundException e) 
                    {
                            Log.e("TAG", "File not found: " + e.toString());
                    }
                    catch (IOException e) 
                    {
                            Log.e("TAG", "Can not read file: " + e.toString());
                    }
    
                    return stringToReturn;
            }
            

Function checks the readability of a file system


public static boolean isSdReadable() 
            {

                    boolean mExternalStorageAvailable = false;
                    try 
                    {
                            String state = Environment.getExternalStorageState();

                            if (Environment.MEDIA_MOUNTED.equals(state))
                            {
                                    // We can read and write the media
                                    mExternalStorageAvailable = true;
                                    Log.i("isSdReadable", "External storage card is readable.");
                            }
                            else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) 
                            {
                                    // We can only read the media
                                    Log.i("isSdReadable", "External storage card is readable.");
                                    mExternalStorageAvailable = true;
                            } 
                            else
                            {
                                    // Something else is wrong. It may be one of many other
                                    // states, but all we need to know is we can neither read nor
                                    // write
                                    mExternalStorageAvailable = false;
                            }
                    } catch (Exception ex) 
                    {

                    }
                    return mExternalStorageAvailable;
            }

NFS Shift for android | NFS Shift for android free download

NFS Shift 

Almost all the racing game lovers will surely love NFS shift, Specially when it is available on mobile phone. Because we get much reality in our phone mainly because of Accelerometer . So here is the game for you
NFS Shift .


Official Description

Drive the world’s fastest cars and enjoy some of the highest performance racing action ever seen on Android.


FEED YOUR NEED
Drive 20 cars, including the BMW M3 GT2, Lamborghini Gallardo, and Pagani Zonda.
EVERY PRO CIRCUIT DETAIL
Experience the sweeping skylines of 18 tracks in inspiring international locations (Chicago, London, Tokyo) through day and night driving. See and feel roaring engines, squealing tires, and crunching collisions. Above all, get speed, speed, and more speed!
UPGRADE, CUSTOMIZE, AND COMPETE
Fine tune performance with Top Speed, Acceleration, Tires, Suspension, and Nitrous upgrades. Add custom details like spoilers, rims, specialized paint jobs, and body kits.
HOW DO YOU RACE?
Jump into Quick Race or dominate the circuit in Career Mode. Select 3 Difficulty Settings (Rookie, Pro or Veteran). Track your evolution with DRIVER PROFILE.

We could only get HTC datas

Games features: htc data packet(97M):→Click here to download the data packet
i9100 data packet(81M):→Click here to download the data packet←                 

Routing Micromax a57 Step by step procedure

♠ admin in ,

 Routing Micromax a57

Here we will be dealing withe the methods to route your android device ,(Micromax a57 super phone ninja) It is quite easy and simple to route your phone, Do check out our tutorials online in our youtube channels.




Proceure to route Micromax a57

1. download the attachments here.
2. download this : http://www.mediafire.com/?jrzuezl8s5t8k0s
3. download android sdk from http://developer.android.com/sdk/index.html.
and install it by following the instruction onthe page.
4.extract the usb.ini file in the ".android" folder located at C:/users/(ur_name)/.android
5.You dont need to create this folder it should already exist...after you installed the sdk.
6.download and install unlock root from step 2
7. go to your phone's settings->applications->development and enable USB Debugging NOW connect your phone to PC.
8. go to C:/users/(ur_name)/android-sdk/platform-tools
9.open command line there
10 type adb devices (hit enter)
11. verify that A57 is listed.
12. now run unlock root. and click root option.
13. You are done

 For installing the driver of your phone do read this article Go here
In the above mentioned link the installation of driver is given very clearly,

-->

We guess this article helps, Test this in your own risk,, This was found on one of the online forums with many positive feedbacks.

Source

GTA 3 for android | GTA 3 for android free download


GTA is one of the popular games, So as the 10th anniversary Rockstar games have released GTA 3 for android/

Features Of GTA  3

• Visually stunning updated graphics, character and vehicle models
• HD quality resolution
• Gameplay optimized for touch screen devices
• Custom controls for the mobile platform
• Countless hours of gameplay
• Gamepad Support for select USB controllers

 

-->

 

Download Apk:

Gta3 apk (HVGA,QVGA,WVGA)

Download Link:(Ripped APK+Data Files)

DataFileHost:

Steps to follow:

Install apk and extract data files SDCard/Android/Data/

1)Open Game,Accept Eula USER AGREEMENT
2)It will ask you to download data again,press back and minimize game
3)now play game from notification bar or recent apps
4)Enjoy

Note:if ripped data files are not working for u then u will have to download data files directly from the app 

Request to the users : If anyone has downloaded the game and want to share it do contact us,

How to increase the RAM of your Mobile | Using virtual Ram on your android device

RAM is a important part in a computer or a android smartphone, So The major problems with the entry level smartphones is that they will be having less internal RAm, Foe example Samsung galaxy y or Micromax a50,a56,a52,a45 etc along with other local manufacturers. So here is the solution for that


How to Increase Ram In Your Device  HD Games In Micromax/Entry level  Android Device by increasing your RAM

Even you can try to play HIGH Graphics games on your phone
The First thing to be noted is YOUR PHONE SHOULD BE ROUTED

-->

Since Android runs on Linux kernel you can create the virtual partition on your phones memory card.

This is very simple and not at all difficult Follow following steps


****  Install BusyBox First Then allow it to set the SUDo (Super user permission)

***** next step is install the application called RAM Increaser Which helps you to create the swap partition

You are done Enjoy more Ram on your device


NOTE

**** Do not give too much Space of RAM in application, Your phone will crash give maximum upto 512 or max 1 GB not more


Proudly powered by Sacnorth Media