All Discussions
  • Apps
  • Mouse for SONIM XP3

Started by Techgen · Apr 05, 2021 · Page 2 of 3
darren051

matteovisco I was able to install F-droid from the browser when i initially bought the phone I think it was blocked after the update I got yesterday. I've only had the phone for 3 days but that was the first thing I downloaded before I discovered this site but I this community is so small that there apps go months or years without updates.

oh and shortcuts on the home screen dont work anymore either

darren051

darren051

Techgen

virresh

Has anyone been able to install the Mouse pointer successful meaning able to select options on side-loaded apps specifically on the XP3 PLUS?
It seems me only one other person are having the issue I have used ADB on Linux and WEBADB and factory reset at least 5times. Is making this work possible who do i need to DONATE to get it working?

I don't think anyone has been able to get the mouse to work on the XP3plus, no. The “virresh” mouse installs but does not “click” successfully.

And yes, you used to be able to install apps easily, but then they pushed a system update, and now you have to use ADB to sideload apps. Luckily that still works just fine, with the very minor caveat that USB debug has to be turned back on every time you restart the phone.

The keycode for the select button is 66.

darren051

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.

Techgen

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 @virresh 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.

darren051

@virresh Hi can you update the mouse App for the Sonim XP3 PLUS please it is no longer working.

I put the apk on my xp3 but it won't install. what should I do?

@virresh 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.

darren051

anonymousflipphone I doubt it I've contacted @virresh twice within the last several months but have not received a response in several months I assume the project is abandoned unfortunately.

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 https://github.com/virresh/matvt/releases/download/phone-v1.03/matvt-v1.0.3-phone-app-release.apk 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.

Techgen

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.

@drfreemlizard 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

@drfreemlizard @Techgen @darren051
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!

@drfreemlizard -"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

@Techgen would you know the adb command to enable "requiresandroid.permission.INTERNAL_SYSTEM_WINDOW"?

So, doing a little digging on @virresh's MATVT github page found this https://github.com/virresh/matvt/issues/37 . 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.

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.

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.

That's what I did for my XP5s, and it works. I mostly used it for apps that needed a mouse cursor for initial setup options but I could then operate with keys. Smart Audiobook Player, Audible(which stopped working after the 8.1 update :_🙂, and an ebook reader, mostly to set which folder things were saved to or where my library was stored. But, having used both, I will say a software mouse is more convenient, as using a bluetooth mouse means you have to remember to keep it charged, bring it along, and hold/juggle two devices if you don't have a convenient place to set your phone down. Assuming you are using apps that need a cursor in actual operation instead of just setup.

Biden2020prez

Whats the mouse that scolls when you go to the bottom of the screen?

darren051

So there is still no working mouse for the XP3 plus? I bought the phone based on having so functionality to navigate with a couple third party apps. I need to learn how to code..is there a way we can pay someone to develop it?

The Sonim XP3 Plus uses Android 11 Go, which unfortunately suffers form a bug that prevents virtual mice from being able to click (some Google dev accidentally set non-touch devices to get filtered out when finding where a virtual mouse click event was received). It was fixed in Android 12 Go and was supposed to be backported to Android 11 Go quite a while ago. The dev behind matvt said he cannot find a workaround.

Unfortunately, I think it's pretty unlikely this phone will ever be updated far enough along to see that patch if it hasn't already. Sad reality is dumbphones (or any cheap Android phones, really) rarely get any updates beyond what comes with them.

If the virtual mouse function is critical for you, I'd recommend returning the phone and getting either a regular Sonim XP3, Schok Classic (NOT the Schok Flip, which also runs Android 11 Go) or something with a touch screen, like the CAT S22.

darren051 the switchboard app works fine as a mouse on the xp3+

appsphoarflip Hi - Do you have any technical details on where this fix was done in Android 12? I just bought a Sonim XP3Plus and this is a real bummer 🙁
I intend taking a look at that code and seeing what the issue is myself and perhaps even reaching out to Sonim. No promises but any technical details you have (github issues, commits etc) would be great. Surely this virtual mouse thing is fixable.

Just for anyone else trying to get this working, I downloaded, built and installed the version of the virtual mouse at https://github.com/ybtag/matvt and it seems to work so far. Still testing it. This repo is a fork that was kindly done by someone and I am not sure if it has been merged back into the main repo, or it just worked for me because of some random cosmic event. Might be worth another look though. Scrolling does work but I can select chats in WhatsApp 🙂

Biden2020prez Thanks! I may take a further look at this, but as you see below, I found a build that works for me initially anyway... and yes, I would hate to be that guy. Been there, got the t-shirt 🙂

sdmde

seamus how do i find the apk?

Biden2020prez

sdmde click the link he posted, goto 7 tags on top, click on releases, download the akpk.