Please make use of AsyncTask .

Mukesh Kumar,
Android Consultant/Freelancer,
India,Hyderabad.

On Fri, Nov 25, 2011 at 4:01 PM, NaveenShrivastva <
kumarnaveen.si...@gmail.com> wrote:

> @Override
>
> public void onAttachedToWindow()
> {
> this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
> super.onAttachedToWindow();
> }
>
> This code for home key block is not working with handler , please give me
> advice how to handle this one now.
>
>
> On Fri, Nov 25, 2011 at 3:55 PM, NaveenShrivastva <
> kumarnaveen.si...@gmail.com> wrote:
>
>> I am using handler inside onCreate for loading dialog, when using handler
>> then home block key code not works , but when removing handler then  it's
>>
>> work fine .
>>
>>
>> How to block home key with using handler .......
>>
>> Home blocking key works that time activity title bar visible , but here
>> that's hidden by code.
>>
>> Please help me.
>>
>> *final* Handler handler = *new* *Handler*() {
>>
>>
>>
>>    *public* void *handleMessage*(Message msg) {
>>
>>
>>
>>       dialog.*dismiss*();
>>       }
>>    };
>>
>>
>>
>>
>>
>>
>> On Fri, Nov 25, 2011 at 3:03 PM, NaveenShrivastva <
>> kumarnaveen.si...@gmail.com> wrote:
>>
>>> Please give me more guide line for handle this cases ...
>>>
>>>
>>> On Fri, Nov 25, 2011 at 3:03 PM, NaveenShrivastva <
>>> kumarnaveen.si...@gmail.com> wrote:
>>>
>>>> I am using *public class VideoPlayer extends Activity implements
>>>> OnCompletionListener*
>>>>
>>>> this class interface here in this class i am also using the back button
>>>> .....
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Nov 25, 2011 at 2:55 PM, Mukesh Srivastav <mukicha...@gmail.com>
>>>> wrote:
>>>> > Dear Naveen,
>>>> > In order to achieve this, The Architecture of the application should
>>>> be like
>>>> > this.
>>>> > 1. Create an ParentActivity which extends the Activity
>>>> > 2. And all other activities should extend the parent acitivity.
>>>> > Add the below code to the parent activity , rest it take cares in any
>>>> part
>>>> > of your application. hope you got it.
>>>> >
>>>> > Regards,
>>>> > Mukesh Kumar,
>>>> > Android Consultant/Freelancer,
>>>> > India,Hyderabad.
>>>> > On Fri, Nov 25, 2011 at 2:49 PM, Naveen <kumarnaveen.si...@gmail.com>
>>>> > wrote:
>>>> >>
>>>> >> I am writing this code for block Home keypad of phone when playing
>>>> >> video file android , that works fine but when i am using this code in
>>>> >> another application then it's not working...trying to find possible
>>>> >> way why not disabling the home key
>>>> >>
>>>> >> public void onAttachedToWindow()
>>>> >> {
>>>> >> this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
>>>> >> super.onAttachedToWindow();
>>>> >> }
>>>> >>
>>>> >> Here manifest file permissions are:
>>>> >>
>>>> >>        <uses-permission xmlns:android="
>>>> http://schemas.android.com/apk/res/
>>>> >> android"
>>>> >>
>>>> >>  android:name="android.permission.INTERNET"></uses-permission>
>>>> >>    <uses-permission
>>>> >> android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
>>>> >>
>>>> >> <uses-permission
>>>> android:name="android.permission.READ_INPUT_STATE"></
>>>> >> uses-permission>
>>>> >> <uses-permission
>>>> >> android:name="android.permission.ACCESS_NETWORK_STATE" />
>>>> >>  <uses-permission android:name="android.permission.READ_PHONE_STATE"/
>>>> >> >
>>>> >> <uses-permission
>>>> >> android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
>>>> >>  <uses-permission
>>>> >> android:name="android.permission.ACCESS_FINE_LOCATION" />
>>>> >>        <uses-permission
>>>> >> android:name="android.permission.ACCESS_MOCK_LOCATION" />
>>>> >>        <uses-permission
>>>> >> android:name="android.permission.ACCESS_COARSE_LOCATION" />
>>>> >> <uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
>>>> >>
>>>> >>
>>>> >> Activity
>>>> >>
>>>> >>   <activity android:name="VideoPlayer" android:theme="@android:style/
>>>> >> Theme.NoTitleBar.Fullscreen" android:screenOrientation="landscape"/>
>>>> >>
>>>> >> --
>>>> >> 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
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>  --
> 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