Comments (11)
yea i see, i feel like that doesnt work at all, bacause
onDestroy
isnt always called...
Yes, when reinstalling at the emulator it doesn't get called, but under real life conditions it's mostly fine.
BTW, I really appreciate your continuous work for Snapdrop for Android - reduce the code/maintain complexity and making it better from user perspective. Thanks for your help!
from snapdrop-android.
from snapdrop-android.
I suspect that it may have something to do with loadAgain it seems somewhat hacky to me, could you explain why you implemented it and if it could be removed?
For sure this is a very hacky workaround. Actually I tried to remove that workaround before releasing the new version but somehow the app shows itself as peer which is gone after a website reload. But I can try to debug into it again...
from snapdrop-android.
The PR fixes the injection isssue.
Yea the showing itself seem to be due to this code
if (onlinePastThreeMin()) {
WebStorage.getInstance().deleteAllData();
cookieManager.setCookie("https://snapdrop.net/",
"peerid=" + UUID.randomUUID().toString() + ";" +
"path=/server;" +
"max-age=86400;"
);
}
if removed it doesnt show itself anymore...well sometimes it does if you quit and reopen fast...but only once - with this code sometimes the app is creating 3 peers or more
Is this code requiered for anything else?
from snapdrop-android.
Is this code requiered for anything else?
It was required when using my github fork, but probably not when using the original website. Thanks for finding the fix 😃👍
I will try your PR and report back...
from snapdrop-android.
I have to say it seems no different if this code is remved or not and i also encountered the app showing itself sometimes with loadAgain
and the cookies
so i think we can remove that code, then at least the js injection works, but the showing itself issue remains...let me see if i find something int the snapdrop repo
from snapdrop-android.
here it is RobinLinus/snapdrop#215
i'm not sure though how to interpret this...maybe we need to send the goodbye to the server before when the app i closed for good?
from snapdrop-android.
I tried to do that in the onDestroy
method via leaving the website which works in most cases rather well
from snapdrop-android.
yea i see, i feel like that doesnt work at all, bacause onDestroy
isnt always called...
from snapdrop-android.
Maybe this is only an issue if the app is force closed and reopened, which should be rare under real life conditions, i'll test some more, but i think removing the cookie
and loadAgain
is a good idea either way, because they do not fully prevent the app from showing itself and add other bugs.
EDIT: yea that seems to be the case, there are no duplicates if the app is
- in the background long enough
- the app is closed and opened after a few minutes (2-3)
so you can safely merge :)
from snapdrop-android.
sure no problem, this was really bugging me :P
from snapdrop-android.
Related Issues (20)
- IP address as Base URL HOT 4
- Pairdrop HOT 31
- PairDrop QR support
- [Pairdrop] text send dialog prefill doesn't work HOT 6
- "Please verify you are connected with a WiFi network" popup might not be necessary for pairdrop
- Please check F-Droid builds HOT 3
- APK for Google TV HOT 2
- Android HOT 1
- Add Greek Language Support on Crowdin. HOT 2
- File extention lost
- Webapp not active when opening app settings
- ZeroSSL not recognized on custom instance
- Support self-hosted pairdrop HOT 1
- make it available offline HOT 1
- snapdrop-android translations overwrite translations provided by pairdrop.net HOT 1
- Built-in QR scanner HOT 4
- Link sharing to app(pairdrop) no longer works :(
- Did the whole pairdrop repo just vanished? HOT 27
- Download .apk from github directly with Obtainium HOT 2
- Transfer files to PC individually instead of zip HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snapdrop-android.