In case of activity life cycle when user pressing the back or home
button then onPause method calls by process

When i am trying to handle activitySwitchFlag  and database on pause
then app crash , please help me is any way for block home button for
my on activity if no then how to handle separate home and back button.

public void onPause(){
            super.onPause();
        
            Log.i("TAG", "onPause" );
                try {
                        EncryptVideo(IDValue);
                        
                        
                } catch (Exception e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                }
                
            if(activitySwitchFlag)
            {
                Log.i("TAG", "activity switch");
            }
            else{
                
                Log.i("TAG", "home button");
                finish();
               // video.pause();
              //  _HomeDBHANDLING();
        
            }
            activitySwitchFlag = false;
        }

On Thu, Nov 24, 2011 at 9:13 PM, Jim Graham <spooky1...@gmail.com> wrote:
> On Thu, Nov 24, 2011 at 02:14:21AM -0800, karthik wrote:
>>
>> i am working on an application in which if i click(normal click) on
>> the back button the moveTaskToBackgroud(true) must be called. else if
>> it is a longpress then there id nothing to do.
>
> You already got your answer from Mark Murphy...why are you posting
> this same post again?
>
> Later,
>   --jim
>
> --
> THE SCORE:  ME:  2  CANCER:  0
> 73 DE N5IAL (/4)        | "> There it was, right in the title bar:
> spooky1...@gmail.com    |  > Microsoft Operations POS."
> < Running FreeBSD 7.0 > |
> ICBM / Hurricane:       | "Never before has a TLA been so appropriately
>   30.44406N 86.59909W  |  mis-parsed."         (alt.sysadmin.recovery)
>
> Android Apps Listing at http://www.jstrack.org/barcodes.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to