trigger for closing s cover (samsung)
Moderator: Martin
trigger for closing s cover (samsung)
I was wondering if it would be possible to have a trigger for closing s cover (samsung).
normally it would trigger the built in app s view. but alongside that, i want to change screen timeout for example. or other things.
Kind regards for your respons!
normally it would trigger the built in app s view. but alongside that, i want to change screen timeout for example. or other things.
Kind regards for your respons!
Re: trigger for closing s cover (samsung)
To my knowledge Android has no API for this and Samsung does not provide an extension to access the feature so it's probably not possible to add a trigger in Automagic.
On a rooted device you could check if the system log prints something special when the cover is closed and react to this output with trigger Command Output: logcat -c; logcat -v time *:D (check: as root).
Regards,
Martin
On a rooted device you could check if the system log prints something special when the cover is closed and react to this output with trigger Command Output: logcat -c; logcat -v time *:D (check: as root).
Regards,
Martin
Re: trigger for closing s cover (samsung)
Okay i did. Now what? Thw flow had an emergency stop. The phone is rooted by the way
Last edited by henkster on 08 Mar 2014 21:44, edited 1 time in total.
Re: trigger for closing s cover (samsung)
Where can i find the system log?
Re: trigger for closing s cover (samsung)
You can test-execute the command directly in the trigger Command Output by using the button 'Test command...'.
This should print the log in a new window.
This should print the log in a new window.
Re: trigger for closing s cover (samsung)
Found this on Stack Overflow:
"Search for com.samsung.cover.OPEN or com.samsung.ssrm.COVER_OPEN
In the extras, coverOpen will tell you if the cover opened or closed"
"Search for com.samsung.cover.OPEN or com.samsung.ssrm.COVER_OPEN
In the extras, coverOpen will tell you if the cover opened or closed"
Re: trigger for closing s cover (samsung)
Okay but how to trigger it with automagic?
Re: trigger for closing s cover (samsung)
The trigger is "General Broadcast". If you copy either
"com.samsung.cover.OPEN" or "com.samsung.ssrm.COVER_OPEN" into the action field
Then use Access Intent Extras field to extract result then you should be angle to see if you have opened or closed the cover. Unfortunately, I'm on a Note 2 and don't use the S View cover so I can't test it myself. I've added a flow for testing if Spen is detached as nearest example of this that I have.
http://automagic4android.com/flow.php?i ... 9a1b2683a5
"com.samsung.cover.OPEN" or "com.samsung.ssrm.COVER_OPEN" into the action field
Then use Access Intent Extras field to extract result then you should be angle to see if you have opened or closed the cover. Unfortunately, I'm on a Note 2 and don't use the S View cover so I can't test it myself. I've added a flow for testing if Spen is detached as nearest example of this that I have.
http://automagic4android.com/flow.php?i ... 9a1b2683a5
Re: trigger for closing s cover (samsung)
Does not seem to work either. Logcat did not seem to give me anything strangely enough. However I saw with cpu overlay that the command "com.android.SuspendWindow" was called. Can I trigger automagic to use that? "General broadcast" did not work for me..
Re: trigger for closing s cover (samsung)
This is the output of logcat:
03-14 19:44:49.218 I/SuspendWindow(845): --------hallStatusChange,status=0
03-14 19:44:49.219 I/SuspendWindow(845): -------UpdataViewForHallStatus,status=0
03-14 19:44:49.225 V/ActivityManager(621): Broadcast: Intent { act=android.agold.action.UPDATE_SUSPEND_WINDOW flg=0x10 (has extras) } ordered=false userid=0 callerApp=ProcessRecord{424f3ae8 845:com.android.SuspendWindow/u0a10076}
03-14 19:44:49.236 I/SuspendWindow(845): -----BootReceiver--intent.getAction()=android.intent.action.AGOLD_COMPLETED
03-14 19:44:49.239 I/SuspendWindow(845): ----mBroadcastReceiver--action=android.agold.action.UPDATE_SUSPEND_WINDOW
03-14 19:44:49.282 I/SuspendWindow(845): ----mTimeNumberView----
03-14 19:44:49.285 I/SuspendWindow(845): *************X=202***********Y=197
03-14 19:44:49.285 I/SuspendWindow(845): ************mWeekStr= vr
03-14 19:44:49.299 I/jbl (845): -----SuspendWindowService----onStartCommand----
03-14 19:44:49.300 I/SuspendWindow(845): ------AgoldCheckHallStatus----status=0
03-14 19:44:49.300 I/SuspendWindow(845): hour=19 minute=44
03-14 19:44:49.302 I/ScrollLayout(845): SetOnViewChangeListener mOnViewChangeListener = com.android.SuspendWindow.windowView$1@42339418
03-14 19:44:49.303 I/SuspendWindow(845): getNewMissedCallSize : selection=type=3 AND new=1
03-14 19:44:49.319 I/SuspendWindow(845): --GetMissCallCount--mMissCallCount=0
03-14 19:44:49.339 I/SuspendWindow(845): -----agoldGetMessagesCount,mMissInfoCount=3
03-14 19:44:49.364 I/SuspendWindow(845): ----mTimeNumberView----
03-14 19:44:49.365 I/SuspendWindow(845): *************X=202***********Y=197
03-14 19:44:49.365 I/SuspendWindow(845): ************mWeekStr= vr
03-14 19:44:49.404 I/SuspendWindow(845): ----mTimeNumberView----
03-14 19:44:49.406 I/SuspendWindow(845): *************X=202***********Y=197
03-14 19:44:49.406 I/SuspendWindow(845): ************mWeekStr= vr
03-14 19:44:49.940 I/SuspendWindow(845): --------hallStatusChange,status=1
03-14 19:44:49.941 I/SuspendWindow(845): -------UpdataViewForHallStatus,status=1
03-14 19:44:49.949 V/ActivityManager(621): Broadcast: Intent { act=agold.andorid.intent.hide.SUSPEND_WINDOW flg=0x10 } ordered=false userid=0 callerApp=ProcessRecord{424f3ae8 845:com.android.SuspendWindow/u0a10076}
03-14 19:44:49.963 I/SuspendWindow(845): ----mBroadcastReceiver--action=agold.andorid.intent.hide.SUSPEND_WINDOW
03-14 19:44:49.218 I/SuspendWindow(845): --------hallStatusChange,status=0
03-14 19:44:49.219 I/SuspendWindow(845): -------UpdataViewForHallStatus,status=0
03-14 19:44:49.225 V/ActivityManager(621): Broadcast: Intent { act=android.agold.action.UPDATE_SUSPEND_WINDOW flg=0x10 (has extras) } ordered=false userid=0 callerApp=ProcessRecord{424f3ae8 845:com.android.SuspendWindow/u0a10076}
03-14 19:44:49.236 I/SuspendWindow(845): -----BootReceiver--intent.getAction()=android.intent.action.AGOLD_COMPLETED
03-14 19:44:49.239 I/SuspendWindow(845): ----mBroadcastReceiver--action=android.agold.action.UPDATE_SUSPEND_WINDOW
03-14 19:44:49.282 I/SuspendWindow(845): ----mTimeNumberView----
03-14 19:44:49.285 I/SuspendWindow(845): *************X=202***********Y=197
03-14 19:44:49.285 I/SuspendWindow(845): ************mWeekStr= vr
03-14 19:44:49.299 I/jbl (845): -----SuspendWindowService----onStartCommand----
03-14 19:44:49.300 I/SuspendWindow(845): ------AgoldCheckHallStatus----status=0
03-14 19:44:49.300 I/SuspendWindow(845): hour=19 minute=44
03-14 19:44:49.302 I/ScrollLayout(845): SetOnViewChangeListener mOnViewChangeListener = com.android.SuspendWindow.windowView$1@42339418
03-14 19:44:49.303 I/SuspendWindow(845): getNewMissedCallSize : selection=type=3 AND new=1
03-14 19:44:49.319 I/SuspendWindow(845): --GetMissCallCount--mMissCallCount=0
03-14 19:44:49.339 I/SuspendWindow(845): -----agoldGetMessagesCount,mMissInfoCount=3
03-14 19:44:49.364 I/SuspendWindow(845): ----mTimeNumberView----
03-14 19:44:49.365 I/SuspendWindow(845): *************X=202***********Y=197
03-14 19:44:49.365 I/SuspendWindow(845): ************mWeekStr= vr
03-14 19:44:49.404 I/SuspendWindow(845): ----mTimeNumberView----
03-14 19:44:49.406 I/SuspendWindow(845): *************X=202***********Y=197
03-14 19:44:49.406 I/SuspendWindow(845): ************mWeekStr= vr
03-14 19:44:49.940 I/SuspendWindow(845): --------hallStatusChange,status=1
03-14 19:44:49.941 I/SuspendWindow(845): -------UpdataViewForHallStatus,status=1
03-14 19:44:49.949 V/ActivityManager(621): Broadcast: Intent { act=agold.andorid.intent.hide.SUSPEND_WINDOW flg=0x10 } ordered=false userid=0 callerApp=ProcessRecord{424f3ae8 845:com.android.SuspendWindow/u0a10076}
03-14 19:44:49.963 I/SuspendWindow(845): ----mBroadcastReceiver--action=agold.andorid.intent.hide.SUSPEND_WINDOW