As you say, I tried to import this class into my Activity..But It is doesn't work..Do you have any demo project to give me ? I've traped at this place for a long times and need your kindly help...Sincerely!
On Wed, Jul 22, 2009 at 3:53 PM, Sansiro <wangjiangfeng0...@gmail.com>wrote: > > Stephen > I did not create Power class. The Power class is packaged in > android.os.Power by Google > But it's so strange that you can not find it in SDK documents > > On 7月22日, 下午3时15分, Stephen Le <yangle...@gmail.com> wrote: > > Sansiro > > I want to know , Did you created the Power class in your own project? or > > other ways? Pls tell me... > > > > On Wed, Jul 22, 2009 at 1:55 PM, Sansiro <wangjiangfeng0...@gmail.com > >wrote: > > > > > > > > > > > > > > > > > emm,I'm Sorry to say that the result I just said before is not right. > > > > > By using the native method setScreenState(), I make my device's screen > > > off.The code is: > > > > > int x=Power.setScreenState(false);//make the screen off > > > System.out.println(x);//0 will be print out > > > Thread.sleep(3000); > > > x=Power.setScreenState(true);//make the screen on > > > System.out.println(x);//0 will be print out > > > > > I tried this code on emulator, it works too. > > > PS: I use the 1.1r1 SDK and emulator > > > > > On Jul 21, 9:17 pm, Yuri Dario <mc6...@mclink.it> wrote: > > > > Hi, > > > > > > > public static native int setScreenState(boolean on) > > > > > > tried this one, but calling it does nothing, and always returns 2; > > > > since this is a native method, I think it means EACCESS (permission > > > > denied). > > > > > > thanks, > > > > > > Yuri > > > > -- > > Sincerely! > > > -- Sincerely! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---