• Apps
  • Mouse for SONIM XP3

OK, after reading some in the forums, I got the matvt 1.0.3 app working on my Sonim xp5s. If the select key is the same on the xp3plus, I think it might work. I do not have an xp3plus, so if any of you do, could you follow the steps I list and confirm whether this works or not? I first uninstalled the apps4flip mouse.

Then, I installed [Login to see the link] using adb.

Next I ran the following adb commands:

adb shell pm uninstall -k --user 0 com.lge.voicecommand
adb shell appops set com.android.cts.io.github.virresh.matvt SYSTEM_ALERT_WINDOW allow
adb shell settings put secure accessibility_enabled 1
adb shell settings put secure enabled_accessibility_services com.android.cts.io.github.virresh.matvt/com.android.cts.io.github.virresh.matvt.services.MouseEventService
adb shell am startservice com.android.cts.io.github.virresh.matvt/com.android.cts.io.github.virresh.matvt.services.MouseEventService

I got the standard "Error: Requires permission not exported from uid 10104" message from the last command, and ignored it.

I restarted my phone.

I opened the matvt app in my applications list.

I selected Override Activation Key

In the box underneath that, I typed 18 (for the # key), then selected SAVE.

Now, when I long press (for about 1 second) the # key, a mouse appears on my screen. It moves with the D-Pad, and the center D-Pad button does select things.

    • TechgenLevel 6 - Platinum Elite Member

    • Edited

    drfreemlizard
    I just rechecked, and the keycode is 66 on the xp3 [sorry about the post where I said the xp3 is different, I hadnt checked it in a while, and 66 just didnt sound familiar]. So I'm not sure whats the issue people seem to be having. It could be they just didnt set it up right like you suggest in this post:
    drfreemlizard

      Techgen It could be they just didnt set it up right

      I figured that might be the case. That’s why I wrote the step-by-step, so they have a link to the modified apk, along with the modified adb commands. It’s nothing original with me, but a compilation of information I got from a few different threads on the board.

      Just another tidbit: Someone (I forget who) mentioned above that their home screen shortcuts didn’t work anymore. The home screen shortcuts on my Sonim xp5s do still work, but I have to double tap the buttons.

      [Login to see the link] I have the xp3plus, tried the same steps you laid out, and got the same result. Can now see a cursor moving around the screen, but it won't click anything.

      Hmmm... I wasn't able to find anything in the source code referring to a specific key code, anyhow. I wonder if any of the Android services or imported bits the code calls on had their names changed in Android 11. If the code is importing a module whose name is changed or whose function is served by something else now, that would certainly booger up the app

      [Login to see the link] [Login to see the link] [Login to see the link]
      I may have found the problem with the mouse, though I have no real idea. When I clicked on "MATVT-Mouse for Android is displaying over other apps" in My Notifications, (on the xp3plus), a screen pops up "Display over other apps", under that it says "Feature not available" "This feature has been turned off because it slows down your phone". When I had clicked the same thing on the xp3, it leads me to a screen that lets me toggle with the mouse's ability to "display over other apps".
      Another piece of possible relevant information. On the xp3, went to the downloaded app "Hidden Settings". Scrolled all the way down where there are two settings that start with "Display over..." Clicked the first one, led me to a screen where I can select one of many apps, and toggle the ability to "display over..." Clicked the second one, led me to a screen where I can theoretically toggle the ability for the Hidden settings app to display over other apps. I say theoretically because it doesn't actually let me toggle for some reason...irrelevant...Now on the Xp3Plus, when I click on the first setting thats labeled "Display over..." it leads me to the screen I described above, "This feature has been turned off..." And when I click the second one, a long message pops up on the screen. I'll just write the end of the message which I think is relevant. "requires android.permission.INTERNAL_SYSTEM_WINDOW
      Do you guys think any of this is the reason the mouse won't click?

        anonymousflipphone Interesting. I'm considering getting an xp3plus, so maybe I'll be better able to delve into this. Now, am I understanding correctly: The "android.permission.INTERNAL.SYSTEM.WINDOW" message pops up when you tried to allow the hidden settings window display over other apps?

        Another question. It references "this feature has been turned off because it slows down your phone." Does the xp3plus have any system optimizing features in the settings menu? Like battery optimization, or speed/memory optimization? If so, try turning anything that resembles that sort of thing off, then retry allowing the mouse to display over other apps. Although, if I understood your earlier post, it is already drawing over other apps (i.e. you can see the mouse cursor) but you just can't select anything.

        Thanks, by the way, for letting me know about this!

        [Login to see the link] -"Now, am I understanding correctly: The "android.permission.INTERNAL.SYSTEM.WINDOW" message pops up when you tried to allow the hidden settings window display over other apps?"-Yes. It was the end of a very long message, but I think this is the most relevant part.
        -"Although, if I understood your earlier post, it is already drawing over other apps (i.e. you can see the mouse cursor) but you just can't select anything."-I know, I was thinking the same thing.

        UPDATE: Sonim provided a software update, after updating I now can see an option to toggle the "display over..." when clicking on the mouse app in the notifications, just like on the xp3, but the mouse app still wont click.

        This is the complete message that appears - java.lang.SecurityException; Permission Denial; starting Intent { dat=package:com.jami.tool.hiddensettingscmp=comandroid.settings/.Settings$AppDrawOverlaySettingsActivity (hasextras) } from ProcessRecord{a6dbb7c6696;com.jami.tool.hiddensetting:shy.luo.process.sub/u0a172}(pid=6696, uid=10172) requiresandroid.permission.INTERNAL_SYSTEM_WINDOW

        So, doing a little digging on [Login to see the link]'s MATVT github page found this [Login to see the link] . Apparently the problem is with Android 11. Maybe try using the fork made by ybtag and report back? Other than that, for now, I guess we hope for an update to Android 12.

        7 days later

        Well, I don't see it, either! Sorry about that. The code seems to be posted there though, so I guess one could compile it.

        Question for those of you with this phone: will a bluetooth mouse pair and work with it?
        If it will, I will ask the folks on github if the app could be made to call on whatever function the bluetooth mouse uses to "click" on things instead of the accessibility function that got messed up in Android 11.

        2 months later

        I went looking for a solution here, but found everyone saying with the app it wouldn't click. But honestly, after what drfreemlizard last said, I don't think you don't need to install any of these extra apps. I have an XP3 Plus (XP3900) and yes, all you need to do is get a Bluetooth mouse. I have a battery app I that I created with the help of another developer in the Ukraine who unfortunately is busy with his own problems right now. Anyway, with the app I was able to side load it onto the phone using a USB cable from my computer (Google Play Store where my app is sold is not an option on the XP3 Plus). Unfortunately, I was unable to select some options like picking a different font or size of the number in the status bar. It defaulted to the default selection and would not let me choose anything else. I bought a cheap $8 Bluetooth mouse from Amazon which arrived today, paired it up with the phone after turning on Bluetooth and it worked just great. Was easily able to pick the option I wanted with the mouse pointer in my app. Problem solved. So yes, drfreemlizard. A Bluetooth mouse WILL pair and work with it without any other mouse app installed because I never installed any.