marzika / Snapprefs

A project which offer enhanced features for Snapchat throught the Xposed Framework.
GNU General Public License v3.0
272 stars 83 forks source link

Implemented an entire snap saving overhhaul #199

Closed Andrerm124 closed 8 years ago

Andrerm124 commented 8 years ago

Resolves #197 | #189 | #168

I appreciate I have changed a lot of code and may have over stepped my boundary but I love this app and want to do my part. I'd appreciate some credit if this PR goes ahead - I've put a lot of time into this update

Changelog:

I already have the code to allow chat messages to be saved to files instead of saving them in the app (Incase you want to go incognito and not show the other user you've saved them) however the code is incredibly inefficient so far and so I didn't include it in this PR. Please let me know if this is something that interests you.

Testing should definitely be made by more people - This has only been tested by me on 2 devices - A Oneplus One running Resurrection Remix (CM13 based rom) and a Nexus 6 emulation running stock Lollypop 5.0.0

@marzika If you'd like to message me privately you can do so through XDA: http://forum.xda-developers.com/member.php?u=7487310

PedroC1999 commented 8 years ago

I will happily test that as this a feature I crave - How would I go about installing this?

Andrerm124 commented 8 years ago

@PedroC1999 Currently the only way to test this is to build the apk yourself using the original source with my files swapped in. Marz has stated that no APK's should be distributed by anyone other than himself, a reasonable request as it is safer for his users that way.

If you can't build it yourself, you'll have to wait until he gives the go ahead :)

NightMean commented 8 years ago

It's not rly that hard if you know what you are doing,I found everything I needed on google and I'm currently testing it.It works perfectly ! :)

Andrerm124 commented 8 years ago

@NightMean That's great to hear :) Since you're using this "unofficial" version, I'd be grateful if you experience any crashes to post the logs here, just to save Marz from trying to fix things that aren't implemented yet. Also recommendations are always appreciated :D

NightMean commented 8 years ago

Yeah sure no problem,I didn't have any crash yet so it's really stable for me :) I just compiled apk with latest commits so I'm going to test it

NightMean commented 8 years ago

@Andrerm124 is My Story supposed to save or the prevention for save is already implemented ?

Andrerm124 commented 8 years ago

@NightMean "My Story" as in a story you've posted? If so I'm not actually 100% certain about that. I think I tested it a while ago and it didn't save (Which is how it should be). If you'd like to show me your logs I can see exactly what's happening

Andrerm124 commented 8 years ago

@NightMean Yeah I've just tested it and it does skip it however it does so in a pretty shoddy manner, I'll try make it more efficient now. Currently it's just not matching the HEADER with the PAYLOAD so it never saves.

NightMean commented 8 years ago

@Andrerm124 Yeah mine story,kinda funny it was saving few times,I oppened snapchat oppened my story and it saved all of them.I deleted photos (while snapchat was running) and then oppened my story again and it didn't saved.When I closed snapchat and reoppened it,watch my story it saved again but the story was 23 hours old.Now I posted new story and it's not saving at all so I don't know what went wrong there :D Like I have no problems if it's not saving it that's good since I'm saving my sent snaps but if you want to look here are the logs (logcat was filtered for name snap) Xposed_SnapprefsUnofficial.txt Logcat-SnapprefsUnofficial.txt

Andrerm124 commented 8 years ago

@NightMean Thanks a lot for those logs! It seems that when I implemented Asynchronous saving last night I bypassed a check to see if the SnapData was completed. A quick change should fix it however I've not yet figured out how to tell if the snap we're viewing is our's. I've got a few ideas in mind to test though :)

Andrerm124 commented 8 years ago

@NightMean Should have fixed it in the latest PR Sync

NightMean commented 8 years ago

@Andrerm124 Damn you rock! Looks like it's fixed it's not happening anymore.I have another 2 devices so I'm gonna see if every one of them runs with no problems :)

marzika commented 8 years ago

The PR seems fine for me and looks really really polished, I am ready to merge it, but I have some additions:

If you have fixed the first issue, could you please push a commit so I can merge it? Thanks in advance and if you are interested in helping us out, please contact me at Hangouts, PM'd my email address to you on XDA.

Andrerm124 commented 8 years ago

@marzika Glad you're happy with the PR and I'd be glad to help you guys out.

I've always used spaces to separate things (Like brackets) so I never considered it was an issue, sorry about that.

As for the copyrighted button image; You're right about that however I'm away from my computer for tonight so I'll have to resolve the issue tomorrow unfortunately.

NightMean commented 8 years ago

@Andrerm124 Just testing latest commits on story and now it's saying failing saving,should it write that as reminder that this is mine story or there shouldn't be nothing ? Edit:Also when I watch someone story img will save but if I want to open it again it doesn't say anyting if the img exist.Snapchat has to be relaunched to show it,not rly a problem just sayin :)

Andrerm124 commented 8 years ago

@NightMean The first issue I wasn't aware of and I'm not too sure why that's happening. Will have to run some tests to see what's going on.

The second issue I can't really do a whole lot about without performing a ton of checks. It's possible, but not particularly worth it. I was aware that this would be a problem from the start but considering the alternative (Not having autosave) it was a worthwhile tradeoff.

EDIT: I can solve the second issue for the Sweep2Save and the Button save options - It's the autosave which is a pain to resolve

NightMean commented 8 years ago

@Andrerm124 alright like everything seems to be working on autosave (I have to test the s2s and save button) and my story isn't saving which isn't bad but just saying

I mean like if the photo saves then there isn't any problem.Just it may confuse people if it won't say it but not a big deal.

Andrerm124 commented 8 years ago

@NightMean Yeah I agree and thought it myself a while ago but I can't figure out how to do it correctly. I'll keep it in mind and might come up with a solution at some point :) Thanks again for the info!

Andrerm124 commented 8 years ago

@NightMean Could you give me a logcat of the story issue? I should be able to pinpoint the issue a bit easier if you can. If not don't worry about it, I'll do some local tests.

NightMean commented 8 years ago

@Andrerm124 My story or someone story ?

Andrerm124 commented 8 years ago

@NightMean Your story, when you get the "Failed saving" message

NightMean commented 8 years ago

There you have it Xposed-MyStory.txt Logcat-MyStory.txt

Andrerm124 commented 8 years ago

@NightMean Holy cow thanks to you I've just found a major typo which basically bypassed any checks to see if the PAYLOAD is attached. Major bug resolved right there :+1:

Can't believe that has gone under the radar for so long!

NightMean commented 8 years ago

@Andrerm124 Great to hear that I can help you fix the problems ! 👍

PedroC1999 commented 8 years ago

Has the edit from a few hours ago been uploaded yet?

NightMean commented 8 years ago

@PedroC1999 Not yet you will see it here when it will be published

Andrerm124 commented 8 years ago

@marzika Implemented the changes you asked for. Hopefully it's what you are expecting. @PedroC1999 @NightMean Uploaded the changes now, sorry for the delay. Was finding an effective way to hook the save button image :)

PedroC1999 commented 8 years ago

I have compiled the app myself using your fork (your repo) however SnapPrefs is failing to hook snapchat, however the new SP loads and is stable

NightMean commented 8 years ago

@PedroC1999 you also ? I had to disable the module reboot and turn it on again to get it working

PedroC1999 commented 8 years ago

Must genuinely be a bug or Xposed cache problem, possibly Xposed is referencing some sort of "App ID" that was exclusive to the old SnapPrefs app, I am not 100% sure on Android Code terminology but have good sense and programming ability in other langauges

Andrerm124 commented 8 years ago

I'm not sure what you mean, I haven't had any issues hooking snapchat. Could you elaborate a bit more please?

NightMean commented 8 years ago

@Andrerm124 I noticed that now sometimes it says Image already exist and somtimes Snap already saved.. Interesting :D Also when I try to save My Story then open someone story it says Failing saving,if new snap is published it will save it normally so not rly issue Also I noticed that you can't exit the viewing of snap even if S2S isn't enabled with the swipe down you have to click through every story to exit,only pressing back button works

NightMean commented 8 years ago

@Andrerm124 could have been just because we updated from last commits to newest ones.If you will push new commits maybe it won't happend again

PedroC1999 commented 8 years ago

@Andrerm124 Basically, SnapPrefs is failing to have any leverage of SnapChat, none of the UI has changed etc, its asif SnapPrefs wasnt even installed

Andrerm124 commented 8 years ago

Right there still seem to be some issues with saving so after I'm finishing cooking something to eat I'm going to do a partial logic flow test and refactor from there. Could be a big change later if I find many problems.

Andrerm124 commented 8 years ago

That's what I get for trying to push out the last commit quickly hahah. Also guys I think this PR is getting extremely blocked up so I'm going to ask that we go to the Gitter page to discuss things

NightMean commented 8 years ago

Sure