MMI-Code within Automagic

Post your questions and help other users.

Moderator: Martin

Post Reply
herby
Posts: 5
Joined: 03 Nov 2013 22:17

MMI-Code within Automagic

Post by herby » 03 Nov 2013 22:41

Hi everybody,
I have a SAMSUNG Galaxy Note 2 (firmware 4.2.1) and I would like to automate two things:

1. When I'm at home, I often use my private galaxy note as a phone. In this case I normally use WiFi- and Telephone-Mode. Durings these automated modes I'd like to set the mmi-code "##21#" to cancel any forwarding.

2. When I'm not at home, I often use my company phone. In this case I'd like to set the mmi-code "**21*+49174..." for the forwarding from the galaxy to the company phone.

Both scripts work properly, but after the sendet mmi-code a messagebox appears und you have to press the OK-button.

Question:
Is there a way to avoid this OR is there a way to send a key by script or something else?

Thanks for your help, herby.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: MMI-Code within Automagic

Post by Martin » 04 Nov 2013 18:01

Hi,

There are two ways to simulate input:
1) on a rooted device you can send keystrokes with action Execute Root Command: input keyevent BACK. See this post for a description and some examples.

2) on a device without root you can use an action Control UI. This action requires that the accessibility service is activated. Some Samsung devices have a known bug where the launcher starts to talk when you switch home screens or open folders so this might not be an option for you.
Following script would simulate pressing the back key:
back();
Regards,
Martin

herby
Posts: 5
Joined: 03 Nov 2013 22:17

Re: MMI-Code within Automagic

Post by herby » 04 Nov 2013 21:32

Hi Martin,

thanks for your help.

Option 1) My device ins't rooted by now - so no way to check out.

Option 2) You're right. My Samsung device starts talking that I've opened/closed a folder when activating the service. In German the services are found under EINSTELLUNGEN -> EINGABEHILFE -> DIENSTE -> AUTOMAGIC Premium. This is not an option for me. By the way, when the service is activated, the Control UI works.

Is there another possibility to get my problem solved, eventually instead of using mmi-codes.

Regards,
herby

Post Reply