swiftp
swiftp copied to clipboard
can not run in android 8.0 on pixel mobile
I am running this app on pixel mobile,but can't run normally. here is resolve solution: Intent intent = new Intent(FsService.ACTION_STOP_FTPSERVER); intent.setPackage(getActivity().getPackageName()); getActivity().sendBroadcast(intent); should add setPackage of every send broadcast Intent.
Thanks to report. I don't have 8 on my device yet, so this is good to get a heads up! I'd like to know why this is needed.
Do you have multiple versions of swiftp installed? (demo/free/paid - release/debug)
new safety rules for android o? i had cloned your git repo and created a repo named RsFTP and under GPL3 license. here is link: https://github.com/tuzhao/rsftp .
Reading up on this, I believe broadcasts are indeed much more limited in android O: https://developer.android.com/preview/features/background.html#broadcasts
It would be nice if you could fork the repo instead of cloning. One of your nice changes, the welcome and exit code additions, will now be much harder to be tracked or picked up. It would also allow you to keep your project more in sync with swiftp. https://help.github.com/articles/fork-a-repo/
ok,I had forked.
Indeed, for android O, all usages of sendbroadcast will have to be reworked. This programming pattern makes use of system broadcasts and most could make use of LocalBroadcastManager.
One possible problem will be Tasker integration. The intents
be.ppareit.swiftp.ACTION_START_FTPSERVER
be.ppareit.swiftp.ACTION_STOP_FTPSERVER
are explicit public to enable scripting.
A good course of action is start using LocalBroadcastManager, keep the above intents public and keep using api 25 (pre android O) for a little while. This will make the code ready for api 26 and above in the future while for now keep the public intents working.
yeah,you are right. using api 25 makes app run normally. I don't test using LocalBroadcastManager. Anyway,solving problems is our ultimate goal. ha ha...
I'll keep the issue open. While not a problem as long as we keep using api 25, it will eventually become a problem.