maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Aliendalvik Control - Useful multitool! (https://talk.maemo.org/showthread.php?t=96334)

coderus 2016-01-09 09:52

Aliendalvik Control - Useful multitool!
 
Please read following description carefully before asking any questions.

Have settings applet with simple GUI actions:
  • Reset HTTP(S) default application in android
  • Show/Hide android navigation bar
  • Open android Downloads application
  • Select android keyboard (you can use Google Keyboard or any other in aliendalvik)

Useful utility for sending commands to aliendalvik. It creates dbus service (on session bus) org.coderus.aliendalvikcontrols with following methods:
  • sendKeyevent(int code): sending input events to android
  • sendInput(QString text): sending text input data to android
  • broadcastIntent(QString intent): invoking am broadcast -a intent command on android
  • startIntent(QString intent): invoking am start intent.split(" ") command on android
  • uriActivity(QString uri): sending uri VIEW intent to android
  • uriActivitySelector(QString uri): sending uri VIEW intent with chooser to android
  • shareText(QString text): opening android sharing menu for text/* data
  • shareFile(QString file, QString mimetype): opening android share menu for file by mimetype
  • hideNavBar(): hiding bottom android navigation bar
  • showNavBar(): showing bottom android navigation bar
  • getFocusedApp(): returns package name of topmost android app at this moment
  • isTopmostAndroid(): returns is android a topmost, or native sailfish ones

Application now automatically modifying android desktop files to make it accept parameters.
You can use latest version of Mimer to assign default web browser directly to selected android apps.

Package installs sharing plugin and replaces old Android ShareUI plugin.

Package also installs android-open-url.desktop and androd-open-url-selector.desktop files invoking uriActivity and uriActivitySelector methods which can be set (manually, via xdg-mime tool) to various mimetypes.

Post your improvement ideas in this thread.
Openrepos: https://openrepos.net/content/coderu...dalvik-control
GitHub: https://github.com/CODeRUS/aliendalvik-control

coderus 2016-01-09 10:04

Re: Aliendalvik Control - Set android browser as default
 
Settings mimehandler manually:
Code:

ln -sf /home/nemo/.local/share/applications/mimeapps.list /home/nemo/.local/share/applications/defaults.list
<- only once, to make things actually works. Then:
Code:

xdg-mime default android-open-url.desktop x-maemo-urischeme/http
xdg-mime default android-open-url.desktop x-maemo-urischeme/https

Searching activity name for other browser:
Open application desktop file. For example chrome desktop file /usr/share/applications/apkd_launcher_com_android_chrome-org_chromium_chrome_browser_document_ChromeLaunche rActivity.desktop and read last part for Exec line.
Chrome activity: com.android.chrome/org.chromium.chrome.browser.document.ChromeLaunche rActivity

coderus 2016-01-09 17:31

Re: Aliendalvik Control - Set android browser as default
 
Nobody interested or nobody figured how to use it?

Ancelad 2016-01-09 19:47

Re: Aliendalvik Control - Set android browser as default
 
I'm interested and I can say - it works!

Van-ess 2016-01-09 20:29

Re: Aliendalvik Control - Set android browser as default
 
I cannot understand the second part of "org.mozilla.firefox/org.mozilla.gecko.BrowserApp" to replace it for Chrome

coderus 2016-01-09 20:39

Re: Aliendalvik Control - Set android browser as default
 
open chrome desktop /usr/share/applications/apkd_launcher_com_android_chrome-org_chromium_chrome_browser_document_ChromeLaunche rActivity.desktop or other browser desktop. Last part of Exec line is activity you search for. For Chrome it's com.android.chrome/org.chromium.chrome.browser.document.ChromeLaunche rActivity

Added information in description :)

Van-ess 2016-01-09 21:11

Re: Aliendalvik Control - Set android browser as default
 
Ok, got it. Now I have
Code:

cat /home/nemo/.config/aliendalvikcontrol/mimehandlers/Chrome
com.android.chrome/org.chromium.chrome.browser.document.ChromeLauncherActivity

But I don't have /usr/share/applications/url-handler-Chrome.desktop or any similar file
Code:

ls /usr/share/applications/ | grep url
android-open-url.desktop
android-open-url-selector.desktop
jolla-messages-openurl.desktop
open-url.desktop
voicecall-ui-openurl.desktop

What should I do next?

coderus 2016-01-09 21:13

Re: Aliendalvik Control - Set android browser as default
 
start aliendalvik-control from terminal or invoke any dbus command of it to start it in background

corvinux 2016-01-10 12:44

Re: Aliendalvik Control - Set android browser as default
 
@coderus I can see your PoC would have same useful application for example to intercept SMS from Sailfishos and pass it to dalvik which we need for registration in app Signal. Can you look into it?
Tnx.

coderus 2016-01-10 13:14

Re: Aliendalvik Control - Set android browser as default
 
I dont think it's possible using intents.

coderus 2016-01-11 13:03

Re: Aliendalvik Control - Set android browser as default
 
Updatetee! mimehandlers no longer needed, application modify desktop files to accept parameters.

okourkoulos 2016-01-11 14:50

Re: Aliendalvik Control - Set android browser as default
 
Installed and now developer mode cannot be applied!
Well known "Problem with store" message!
All apps on homescreen went out from their folders in random order.
Rebuild registry from Utilities didn't help. Restart neither.

Had this problem a few times in the past when installed some other apps from Warehouse. Only thing that helped was Factory reset.
Ah, well, one more time, won't hurt, right?

coderus 2016-01-11 15:25

Re: Aliendalvik Control - Set android browser as default
 
it does nothing with store and repositories. applications icons can go out from folders, its small side effect :)

coderus 2016-01-26 18:39

Re: Aliendalvik Control - better android integration and controls
 
New update.
Brings sharing plugin replacing old android-shareui package
Adding gui with buttons to hide and show navigation bar
And some fixies.

coderus 2016-01-27 04:16

Re: Aliendalvik Control - hide ndroid navbar!
 
If anyone have app with non-latin name and it turned to !!! after installation of aliendalvik-control, please send me links to that apks.

TMavica 2016-01-27 05:39

Re: Aliendalvik Control - hide android navbar!
 
The screen keep blinking after open url in android apps with sailfish browser, if choose Firefox is fine.

Now how I can make the android popup dialog come out? because I accidently click 'Always'

coderus 2016-01-27 17:38

Re: Aliendalvik Control - hide android navbar!
 
v1.0.3 released

Leinad 2016-01-27 23:16

Re: Aliendalvik Control - hide android navbar!
 
thanks, that's great!
do you think, it would be possible to add a toggle for the navbar to powermenu?

traysh 2016-01-27 23:47

Re: Aliendalvik Control - hide android navbar!
 
It would be nice if navbar was hidden by default and shown when the proximity sensor was covered!

Or even pressing that ugly back button just by covering the proximity sensor.

Thank you once again, Coderus.

coderus 2016-01-29 09:00

Re: Aliendalvik Control - hide android navbar!
 
v1.0.4 fixed not launching some applications

Quote:

Originally Posted by Leinad (Post 1496666)
thanks, that's great!
do you think, it would be possible to add a toggle for the navbar to powermenu?

Sure thats possible

Quote:

Originally Posted by traysh (Post 1496668)
It would be nice if navbar was hidden by default and shown when the proximity sensor was covered!

Or even pressing that ugly back button just by covering the proximity sensor.

Thank you once again, Coderus.

Nice idea and seems doable. I'll test that scenarios.

coderus 2016-07-28 23:42

Re: Aliendalvik Control - hide android navbar!
 
Unexpected 1.0.6
Added:
- opening android Downloads dialog
- changing android input method (swiftkey in aliendalvik!)

monkeyisland 2016-07-30 13:04

Re: Aliendalvik Control - hide android navbar!
 
hi is there any chance to turn off he "clicks" from the android apps.
i mean as an example the sounds by using menu buttons or alien keyboard.

coderus 2016-09-04 20:10

Re: Aliendalvik Control - hide android navbar!
 
Quote:

Originally Posted by monkeyisland (Post 1511295)
hi is there any chance to turn off he "clicks" from the android apps.
i mean as an example the sounds by using menu buttons or alien keyboard.

Probably, if i can reproduce that clicking. I don't think i know what are you talking about :)

coderus 2016-09-04 20:10

Re: Aliendalvik Control - hide android navbar!
 
Released v1.0.7 with beter input method changing fucntions.

Hariainm 2016-09-05 01:11

Re: Aliendalvik Control - hide android navbar!
 
Thank you coderus. Can you please consider adding an on/off switch button on events pulley menu to enable/disable the Android bar? Thanks

coderus 2016-09-05 04:09

Re: Aliendalvik Control - hide android navbar!
 
Quote:

Originally Posted by Hariainm (Post 1514309)
Thank you coderus. Can you please consider adding an on/off switch button on events pulley menu to enable/disable the Android bar? Thanks

sounds cool, thanks :)

olympus 2016-09-05 08:54

Re: Aliendalvik Control - Useful multitool!
 
Would it be possible to allow alien.dalvik calls? Or is this SFOS related?

chenliangchen 2016-09-05 09:54

Re: Aliendalvik Control - Useful multitool!
 
Thank you Coderus for the update. I have also a request: Is it possible to re-adjust the position of app when navigation bar is removed? Otherwise the keyboard will be on top of the text I'm editing. (Generally the text will overlay part of the app) Is it possible to turn up the position (even with terminal?) many thanks

itdoesntmatt 2016-09-05 10:04

Re: Aliendalvik Control - Useful multitool!
 
to avoid prediction overlay with text, try an android keyboard (swype, swiftkey ..)

coderus 2016-09-05 10:07

Re: Aliendalvik Control - Useful multitool!
 
Quote:

Originally Posted by olympus (Post 1514318)
Would it be possible to allow alien.dalvik calls? Or is this SFOS related?

i can call from aliendalvik with no problems since i bought a phone

Quote:

Originally Posted by chenliangchen (Post 1514322)
Thank you Coderus for the update. I have also a request: Is it possible to re-adjust the position of app when navigation bar is removed? Otherwise the keyboard will be on top of the text I'm editing. (Generally the text will overlay part of the app) Is it possible to turn up the position (even with terminal?) many thanks

Not with sailfishos default keyboard.

olympus 2016-09-05 20:30

Re: Aliendalvik Control - Useful multitool!
 
Quote:

Originally Posted by coderus (Post 1514324)
i can call from aliendalvik with no problems since i bought a phone

I'm sorry, i guess i should've been more precise. Some android apps (like baby monitor) can make a call to a desired number. But if an android app starts a cellular call, SFOS wants confirmation by the user, making the app useless.

coderus 2016-09-06 04:53

Re: Aliendalvik Control - Useful multitool!
 
well, you need a patch to sfos, not aliendalvik.

coderus 2016-09-06 15:05

Re: Aliendalvik Control - Useful multitool!
 
v1.0.8

Added new settings:
- Enable/disable touch sounds
- Allow mock gps location
- Enable/disable installation non-store apks

Added eventsview toggle to show/hide android navigation bar quickly

itdoesntmatt 2016-09-06 15:55

Re: Aliendalvik Control - Useful multitool!
 
really great app right now. i will donate a beer,cause it is fantastic. and also with mock location,that i was waiting.:)

mrsellout 2016-09-06 16:05

Re: Aliendalvik Control - Useful multitool!
 
hey Coderus, sometimes the Reset android handler button doesn't work, and you have to manually edit the /usr/share/applications/mimeinfo.cache file as described in the post by Robomike here:
https://together.jolla.com/question/...post-id-143267

Hariainm 2016-09-06 16:25

Re: Aliendalvik Control - Useful multitool!
 
Thank you coderus. Android bar toggle works perfectly. Send you a small donation for your work :)

olympus 2016-09-06 16:34

Re: Aliendalvik Control - Useful multitool!
 
Quote:

Originally Posted by coderus (Post 1514390)
well, you need a patch to sfos, not aliendalvik.

yep.. seems logical. well i have no knowledge of patching whatsoever. do you already have a patch that does just that?

nodevel 2016-09-11 09:35

Re: Aliendalvik Control - Useful multitool!
 
I am having a major problem with this app/modification and every time I try it, I really regret doing so. Maybe someone (coderus?) could tell me what I'm doing wrong. Sorry for an upcoming lengthy post, but I'll try to describe the problem as detailed as possible to avoid confusion.

My workflow:
  • I use AlienDalvik very exceptionally. I have only 3-5 apps installed and the ones that are being used (on an irregular basis) are only F-Droid and OsmAnd.
  • I have AlienDalvik disabled 95% of the time and want to keep it that way.
  • I have Firefox for Android installed just in case some website doesn't work well in Sailfish Browser, but I haven't used it for months.
  • I use Sailfish Browser and have no intention to use any Android Browser as my primary one.
  • I would like to have the navigation bar hidden in Android apps.
  • I hate the touch sound in Android apps, so I'd like to have it disabled as well.

Every once in a while when I see an update for AlienDalvik Control in Warehouse, I go through these steps:
  1. "Oh, great, I can disable the navigation bar and touch sounds!"
  2. "I wonder why I uninstalled it the last time, but I'll install it now."
  3. All my currently installed Android apps stop working after the installation. "Oh, I see why I uninstalled it. But let's reinstall all Android apps, it's not that big of a problem."
  4. I reinstall the Android apps, they now seem to be working, so I redownload all OsmAnd maps.
  5. I open a link from somewhere and instead of opening Sailfish Browser, it shows some Android dialog. Remember that I like to have AlienDalvik turned off for 95% of the time, so this is a big inconvenience.
  6. I uninstall Firefox for Android in order to get rid of this dialog. No success, opening a link still launches AlienDalvik.
  7. "This is it." - I remove AlienDalvik Control.
  8. Opening a link now opens a random Android app, instead of opening Sailfish Browser.
  9. "This is it!!!" - I remove all Android apps and delete AlienDalvik.
  10. Things now work as they should.
  11. Later, I need maps for a trip, so I download AlienDalvik, F-Droid and OsmAnd.
  12. All links now open in OsmAnd, instead of Sailfish Browser. "****!"

Sure, maybe my workflow is not the ideal one for AlienDalvik Control, but there is at least something wrong with its uninstall scripts, as now I ended up with unusable AlienDalvik, as all links open in OsmAnd... I didn't want my links open in anything else than Sailfish Browser in the first place. This has been happening to me both on Jolla 1 and Jolla C.

Thanks for reading till the end and I hope it brings some valuable feedback. If nothing else, it could serve me as a reminder to refresh my memory before trying to install AlienDalvik Control again :)

coderus 2016-09-11 11:23

Re: Aliendalvik Control - Useful multitool!
 
Quote:

Originally Posted by mrsellout (Post 1514423)
hey Coderus, sometimes the Reset android handler button doesn't work, and you have to manually edit the /usr/share/applications/mimeinfo.cache file as described in the post by Robomike here:
https://together.jolla.com/question/...post-id-143267

This button reset default application in android, not sfos. For sfos install Mimer.

coderus 2016-09-11 11:29

Re: Aliendalvik Control - Useful multitool!
 
Quote:

Originally Posted by nodevel (Post 1514826)
I am having a major problem with this app/modification and every time I try it, I really regret doing so. Maybe someone (coderus?) could tell me what I'm doing wrong. Sorry for an upcoming lengthy post, but I'll try to describe the problem as detailed as possible to avoid confusion.

My workflow:
  • I use AlienDalvik very exceptionally. I have only 3-5 apps installed and the ones that are being used (on an irregular basis) are only F-Droid and OsmAnd.
  • I have AlienDalvik disabled 95% of the time and want to keep it that way.
  • I have Firefox for Android installed just in case some website doesn't work well in Sailfish Browser, but I haven't used it for months.
  • I use Sailfish Browser and have no intention to use any Android Browser as my primary one.
  • I would like to have the navigation bar hidden in Android apps.
  • I hate the touch sound in Android apps, so I'd like to have it disabled as well.

Every once in a while when I see an update for AlienDalvik Control in Warehouse, I go through these steps:
  1. "Oh, great, I can disable the navigation bar and touch sounds!"
  2. "I wonder why I uninstalled it the last time, but I'll install it now."
  3. All my currently installed Android apps stop working after the installation. "Oh, I see why I uninstalled it. But let's reinstall all Android apps, it's not that big of a problem."
  4. I reinstall the Android apps, they now seem to be working, so I redownload all OsmAnd maps.
  5. I open a link from somewhere and instead of opening Sailfish Browser, it shows some Android dialog. Remember that I like to have AlienDalvik turned off for 95% of the time, so this is a big inconvenience.
  6. I uninstall Firefox for Android in order to get rid of this dialog. No success, opening a link still launches AlienDalvik.
  7. "This is it." - I remove AlienDalvik Control.
  8. Opening a link now opens a random Android app, instead of opening Sailfish Browser.
  9. "This is it!!!" - I remove all Android apps and delete AlienDalvik.
  10. Things now work as they should.
  11. Later, I need maps for a trip, so I download AlienDalvik, F-Droid and OsmAnd.
  12. All links now open in OsmAnd, instead of Sailfish Browser. "****!"

Sure, maybe my workflow is not the ideal one for AlienDalvik Control, but there is at least something wrong with its uninstall scripts, as now I ended up with unusable AlienDalvik, as all links open in OsmAnd... I didn't want my links open in anything else than Sailfish Browser in the first place. This has been happening to me both on Jolla 1 and Jolla C.

Thanks for reading till the end and I hope it brings some valuable feedback. If nothing else, it could serve me as a reminder to refresh my memory before trying to install AlienDalvik Control again :)

Listed problems should not happen for sure :D

Please tell, where you opening links? In android application or sailfish? Try ty use Mimer and reset web browser to Sailfish one.

For applications what can't be started please send me desktop file of your application before installing aliendalvik controls, after installation, and after uninstallation. I will check if there any problems.


All times are GMT. The time now is 03:53.

vBulletin® Version 3.8.8