Batteries included
Post Reply
girinator
Posts: 1
Joined: 27 Aug 2019, 08:30

Autoconnect enabled, PPP widget 3 empty after device reboot

Post by girinator » 27 Aug 2019, 08:58

Hello,
thank you for the great job you did with PPP Widget 3!

We have one issue. After device reboot, the widget does not show anything (no texts in the fields, just showing icon). We must click on the widget icon (the colored area showing "PPP" and a little USB stick) and then it autoconnects and all is well. You probably describe that situation in http://www.draisberghof.de/android/pppwidget3.html as "Q: I plug in my modem with the widget on the workspace - but nothing happens. It has worked before!" with suggested solution to click to widget icon.

However we need the app on device to successfully connect to internet after the reboot, while there is no person to touch the icon and it causes problems to us.

I enabled the logging, but after device reboot, there is no log file created before I click on the widget icon. After I click the widget icon, it connects well.
I tried to enable and disable WiFi, enable or disable LAN. No change in behaviour.
If I disconnect and connect modem from USB, widget will reconnect as expected. But we can not do that often, there is no person when the device restarts.
The device runs Android 6.

Please, could you add something like you already have: am broadcast -a "de.draisberghof.pppwidget3.ACTION_CONNECT" but with ".ACTION_WIDGETCLICK" or similar? We can fire that event from our app lets say 10 seconds after device boot and it would solve the problem.

Thank you very much
with regards and admiration to your work
Jan

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Autoconnect enabled, PPP widget 3 empty after device reboot

Post by Josh » 29 Sep 2019, 08:52

If Android works as it should, it sends a signal ("intent") after to apps named BOOT_COMPLETED after starting up. I'm using this to initialize the widget but it does not seem to work flawlessly on all devices (meaning it does not reach PPP Widget in some cases).

Adding an extra intent will likely hit the very same snag because PPP Widget does not receive it. Still, I will look into it.

Note that on some devices, it takes quite a while until the BOOT_COMPLETED is issued. I have seen delays of up to 15 seconds.

Post Reply