Tuesday, March 27, 2012

Android Reboot to recovery if volume buttons are not working

Step 1. Power Off your android phone
Step 2. Open FastBoot (for eg. in HTC Desire press Back and Power Button )
Step 3. Open CMD on your windows machine, move to sdk/platform-tools. where adb and fastboot exe are  
            present
Step 4. Run the following command
                   
                                fastboot oem gencheckpt

Done ! your phone will reboot to recovery

Source :XDA

Wednesday, November 16, 2011

Android :connot see the image/file/video that has been saved by application on SD card

Well this thing may cause a head-storm

Scenario :
Your application has saved/write a file/picture/video that is not being reflected in the gallery.
The reason behind this is that media Scanner is not aware of the new files ..

So the Simple solution to this problem is

try Running this piece of code after u have closed your output stream after writing the file:


MediaScannerConnection.scanFile(context, new String[] { filePath+fileName }, null, null);

Tuesday, November 15, 2011

Android Loading Dialog Box

By this you can show a loading dialog box to the user while performing a background task


First declare the ProgressBar and its Handler:


    ProgressDialog progressBarDialog;
     Handler handler=new Handler() {
             @Override
             public void handleMessage(Message msg)
             {
                
                 if(progressBarDialog != null)
                 {
                     progressBarDialog.dismiss();
                
                        ///Write the code u want to perform after the previous task was completed
                 }
                
             }
         };
   

Place the task/function/code u want to perform inside run()

progressBarDialog = ProgressDialog.show(PhoneLog.this, "Cyber Sports", "Saving...", true);
                        new Thread()
                        {
                            public void run()
                            {
                                GenerateResponse();///example of the task u want to perform
                                handler.sendMessage(handler.obtainMessage());
                            }
                        }.start();

And its done!!

Android Check intertnet connection is available or not

  //////Check Internet Connection return True or False  ///////

        public static boolean isInternetAvailable(Context context)
        {
             boolean isInetrnetAvailable = false;
             try
             { 
                  ConnectivityManager connectivityManager = (ConnectivityManager)   
                   context.getSystemService(Context.CONNECTIVITY_SERVICE);
                  NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
               
                  if(networkInfo != null)
                  {  
                       if( networkInfo.isConnected())
                       {
                           isInetrnetAvailable  = true;
                       }
                       else
                       {
                           isInetrnetAvailable  = false;
                       }
                  }
                  else
                  {
                      isInetrnetAvailable = false;
                  }
             }
             catch(Exception exception)
             {
                 isInetrnetAvailable = false;
             }
             
             return isInetrnetAvailable;
        }


------------------------------------------
in addition  you can navigate the user to Wireless and Network settings through calling ....

 startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));

Wednesday, October 19, 2011

Icecream Sandwhich for HTC Desire

Hey Guys... after watching several videos online .. i updated Android Sdk and tried ICS on emulator..
Its full of lots of feature .... its mouthwatering

So cant wait it to taste it...


just waiting for any Aosp ROM to get released what u think!!!

I will post any links if  i got the one as I am keeping eye on this every second


P.S.

here is the link this ICS ROM is a SDK Port .... u can give it a try ...


http://forum.xda-developers.com/showthread.php?t=1313577

and here is the video



enjoY!


UPDATE 15 NOV 2011

As the Google  has released the source code ...so the serious development will begin ..we can see some alpha - beta  within a week

++ CyanogenMod has declared that it will try to support all 60 devices with ICS(within 2 months)
that includes HTC Desire too
So we will definitely get the taste of  Ice Cream Sandwhich

Mean While the rooted users can get ICS theme  a system theme + you can also have same in Go launcher 
combining both themes u get a real feel of ICS a bit..


UPDATE 21 NOV 2011

There goes the development.....

[DEV-WIP] ICS for Desire [ITL41D-SOURCE] [DOWNLOAD AVAILABLE]

Thursday, October 13, 2011

Disable Android Market Updater

Hate the new market........

So well if you are rooted than you can achieve by typing following command in emulator on your phone

Emulator Market link

Command

su -
pm disable com.android.vending.updater