• Apps
  • Mouse for SONIM XP3

Falconer is that select for the mouse or were you responding to someone other than myself?

Just providing that info for the developer, in case he ever checks in here again.

  • TechgenLevel 6 - Platinum Elite Member

  • Edited

Falconer Oh, so that's prob the issue {like I suspected it's different than the xp3.} EDIT: My mistake, after verifying, the keycode on the xp3 is also 66, in which case I'm not sure what the issue is - see my later post.
Tag [Login to see the link] to let him know, or contact him through his github page to see if he has a chance to add it in the next version.

    2 months later

    [Login to see the link] If anyone else is using the Sonim xp5s, it's select key is also 66 according to the event viewer app. Or I presume that is what:

    KeyUP
    action=1
    code=66
    repeat=0

    means. So if virresh creates a version that functions on the xp3 plus, it should also function on the xp5s.

    I wonder, is there a possibility of creating a select button override option, just as there is an activation button override? Then people could use the key event app and adjust the mouse for their phone if the select button code has changed. But I'm talking about things far above my head.

    4 days later

    Techgen what is the key code for the xp3? I have virresh's source code open in Android studio but I don't know anything about Java. I was hoping I could simply find the references to the other key code and change them to 66.

      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!