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