12

Is there a way to catch some thing like double_tap event (with a BroadcastReceiver of some kind, anything of similar sort or something else)?

I have a service to show the View by adding to WindowManager ( FLAG = TYPE_SYSTEM_ERROR) .

It displays ok on lockscreen but it seems I can only unlock screen when i delete this view ( may be the higher priority of this view - So i have to remove it and unlock screen normally).

Any way to do this ? many thanks

sorry for my unclear question. No need DoubleTapToWake, i mean lockscreen , not the "black screen" when device sleep :)

UPDATE:

I want to find a way that I can catch a event ( double tab, swipe,..). And the device does not need to Root and use this app normally.

I used AppTabWidget but it doesn't seem to be the correct way. I have no idea, and so no code to share.... Example: http://techcrunch.com/2014/07/07/lokloks-new-messaging-app-lets-you-draw-on-your-friends-lock-screen/

Community
  • 1
  • 1
kemdo
  • 1,429
  • 3
  • 15
  • 29
  • Can you explain exactly what you are trying to achieve? – Kelevandos Mar 04 '15 at 10:00
  • Post your `code` what you have done so far? – Maveňツ Mar 04 '15 at 11:14
  • 3
    Why do you want to catch a double tap event when the screen is locked? What are you trying to do? – Suragch Mar 08 '15 at 12:55
  • Hi suragch. I want to create a app that can help androider can interact with "picture image" in lockscreen.... From 5.0 android remove appwidget to display it self on lock screen,.... So I want to find a new way to do this.... thanks for your question ^.,,.^ – kemdo Mar 09 '15 at 02:38
  • By the "double tap on lock screen" u mean when the phone is locked (by using the power switch) or when you can see the screen with some lock on it ? – cafebabe1991 Mar 10 '15 at 06:37
  • Yes when I can see the screen with some lock on it. – kemdo Mar 10 '15 at 06:39
  • @kemdo the app you linked as an example is a lockscreen replacement – dvhh Mar 11 '15 at 07:40

1 Answers1

0

This will require kernel changes to be supported in all the phones.DoubleTapTo wake kernels are provided by various developers. From application level you cannot do much when screen is locked in android.

Saurav
  • 560
  • 4
  • 17
  • PLease see the app that interact with lockscreen: http://techcrunch.com/2014/07/07/lokloks-new-messaging-app-lets-you-draw-on-your-friends-lock-screen/ – kemdo Mar 11 '15 at 06:32
  • I will not be able to test this app for now. One question: Does this app support DoubleTapToWake in all phones ? Because this is your main question . – Saurav Mar 11 '15 at 06:36
  • sorry for my unclear question. No need DoubleTapToWake, i mean lockscreen , not the "black screen" when device sleep :) – kemdo Mar 11 '15 at 06:38
  • @kemdo the app you linked to replace the lock screen – dvhh Mar 11 '15 at 07:40