openbmap / radiocells-scanner-android

WLAN and cell tower scanner for Radiocells.org
https://www.radiocells.org
Other
55 stars 26 forks source link

Is there any intent to start/stop scanning #188

Open thuryn opened 7 years ago

thuryn commented 7 years ago

I would like to to start/stop scanning by intent. This feature allow me to start/stop scanning automatically by Tasker. Is there any possiblity yet?

wish7code commented 7 years ago

Have a look at https://radiocells.org/default/wiki/auto-logging

You have to call the corresponding activity (e.g. StartTracking) based on your trigger. Let me know, whether this works for you!

Cheers Toby

thuryn commented 7 years ago

Thank you for reply. It works with tasker, but ... One have to have screen switched on and the application opens. When I left the phone in my pocket, application never starts.

wish7code commented 7 years ago

I'm not to familiar with tasker: can you start services (instead of activities) from tasker too? In this case we might expose the tasks as services instead of activities.

EDIT: Typo

thuryn commented 7 years ago

Well, is it possible just to hang the app on some specific intent(s)? I can just send intent and app start to record on a background. For example - this app do that: https://play.google.com/store/apps/details?id=googoo.android.btgps - I can just send intent and the app start connection without loading UI on a screen.

wish7code commented 7 years ago

Thanks for the link! Exactly what I was looking for.. Seems like they've chosen the service over the activity approach..

Start - googoo.android.btgps.action.SERVICE_START Stop - googoo.android.btgps.action.SERVICE_STOP Toggle - googoo.android.btgps.action.SERIVCE_TOGGLE

Will see, what I can do!

wish7code commented 7 years ago

5fcbe58a adds the following intents

Calling them starts/stops the tracking or uploads new tracks to the server

Just uploaded latest nightly to server: http://radiocells.org/static/app-debug.apk If you like you may want to test at own risk ;-)

Two important warnings nevertheles:

thuryn commented 7 years ago

perfect, I'll try it

thuryn commented 7 years ago

I cannot install the package - when I try to install it I get error (it's translated from czech language): "Error occurs during analyzing of package". What with this?

gdt commented 7 years ago

From a paranoia point of view, I don't like it that some other random app can send intents to start/stop and particularly upload. This lets the other app, which perhaps doesn't have GPS and (in some future paradise) internet permissions to exiltrate location. Right now, there's a security property that the scanner app will only scan and upload when I ask it to. An easy fix is to make a setting "allow scanning via intents" and default to no. Or perhaps two: allow scanning, and allow uploads, since while I'm complaining I can also see that this is useful.

wish7code commented 7 years ago

@thuryn Maybe something went wrong with the build. I was in a rush when building.. I just re-uploaded a new build. You might try again.

If the problem remains, what's your Android version?

wish7code commented 7 years ago

@gdt At least you know you're under surveillance when the Radiobeacon screen turns up without your action :-)

Seriously, good suggestion, I'll add an option under Advanced Settings to turn automation on/off

thuryn commented 7 years ago

Thank you for response. I've downloaded, but package is zero in length .

  1. března 2017 20:18:14 CET, wish7code notifications@github.com napsal:

    @thuryn Maybe something went wrong with the build. I was in a rush when building.. I just re-uploaded a new build. You might try again.

    If the problem remains, what's your Android version?

    -- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/openbmap/radiocells-scanner-android/issues/188#issuecomment-284045045

wish7code commented 7 years ago

Strange thing.. I just downloaded and installed on another device. The apk is 14.8 MB in size.

Might want to try downloading https://radiocells.org/static/app-debug.apk in your desktop browser and manually copy it to your device?

thuryn commented 7 years ago

I've just tryed to install the app with adb and this is the result:

[100%] /data/local/tmp/app-debug.apk

On sobota 4. března 2017 12:02:44 CET wish7code wrote:

Strange thing.. I just downloaded and installed on another device. The apk is 14.8 MB in size.

Might want to try downloading https://radiocells.org/static/app-debug.apk in your desktop browser and manually copy it to your device?

wish7code commented 7 years ago

You used

adb install app-debug.apk

right? What's the result (think Github stripped out a screenshot)?

thuryn commented 7 years ago

Yes, I used adb install app-debug.apk and the error was: Failure [INSTALL_FAILED_OLDER_SDK]

Sorry for late response