Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add event and profile parameter about access point activation #30

Closed
jpggithub opened this issue Aug 30, 2017 · 5 comments
Closed

add event and profile parameter about access point activation #30

jpggithub opened this issue Aug 30, 2017 · 5 comments
Labels
feature request Proposal for new features

Comments

@jpggithub
Copy link

Please add an option "Activation/Deactivation of the the Access point functionality"

  • in the event configuration
  • in the profile confguration
    If I understand well how Easer works, it would permit to :
  1. deactivate the access point functionality of my smartphone if the battery is discharging
  2. activate the access point functionality of my smartphone if the battery is charging

I would also interested by an option that permits to put my smartphone in airplane mode if it is discharging to save the battery.

@renyuneyun
Copy link
Owner

Were I correct, only a new Operation is needed and then you can select it in the profile and link it with an event.
I'll have a try.

To put the phone into the airplane mode, the app (Easer) should be a system app or use root permission (though on lower versions, e.g. Android 2.3 if I'm correct, this isn't required). This isn't ideal (at least for now) and users may get confused, so I didn't implement it in the first place. (Actually the cellular network is in a similar situation, although that is the case in a even higher android version)
Maybe it will be added when other informing mechanisms are implemented.

@renyuneyun renyuneyun added the feature request Proposal for new features label Sep 5, 2017
@jpggithub
Copy link
Author

Thanks for taking my proposal in account ! :-)

I test this new operation but it didn't work on my two samsung (S4 and Note 2).
If I manually put the hotspot "on" on my smartphone, Easer don't put it off.
If the hotspot is "off", Easer don't put it on.
I try the same configuration to toggle the bluetooth or the wifi on or off and it worked.

@jpggithub
Copy link
Author

Sorry, I correct my previous message about put the hotspot on/off with an event "battery is charging/discharging"

  • It works on my Galaxy Note 2, Android 5.1.1, CM 12.1
  • It does not work on my S4, Android 6.0.1, LineageOS 13.0. Another point is that the "Outline" page updates correctly and completely when charging, but it does not update when the phone is discharging and should have the profile "hotspot off". Again, anything works well if I want to trigger the bluetooth on/off with the same event.
    I tried to reboot my S4 but the bugs remains.

@renyuneyun
Copy link
Owner

Hmm... That seems to be two different problems.

The first one is that switching hotspot on/off doesn't work on some devices; the second is "outline" doesn't behave correctly.

Regarding the first issue: Android doesn't provide the API (directly) to switch hostspot on/off so I used some workarounds (adapted from web). However, the workaround doesn't work on all devices (i.e. may fail on some devices). Unfortunately I currently doesn't know how to solve this. Maybe this could be solved if Easer is installed as a system app (and uses some system privilaged APIs) or uses root permission, but they are not available in Easer now (although it is in the longer plan).

For the second issue: I think this is due to the after-run check for loading profiles. Could you try some others to see if this only happens for "hotspot"? If hotspot is not the only one which has this problem, please open another issue and describe there.

@jpggithub
Copy link
Author

jpggithub commented Sep 13, 2017

Tests made as recommended, results are on #32

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature request Proposal for new features
Projects
None yet
Development

No branches or pull requests

2 participants