shadowsocks / shadowsocks-android

A shadowsocks client for Android
Other
35.2k stars 11.57k forks source link

Android N Quick Setting Tile support #671

Closed 109021017 closed 8 years ago

109021017 commented 8 years ago

A quick setting toggle for shadowsocks in the new notification panel would be much convenient. Android N Tile api

AnyOfYou commented 8 years ago

I'm tried to implement this feature a few days ago, but it's seems this feature don't have any detailed API for now.

Mygod commented 8 years ago

That sure sounds convenient. I know CyanogenMod has support for custom tiles as well. I'll look into both when I've got time. :-)

Mygod commented 8 years ago

After digging around for a while, I implemented a draft of quick settings tile for N preview. It can now display service status and open main activity on click. I didn't find anything to provide a custom user interface though. I expect to see this improvement in the official N release. :-)

See the commit above for more details.

Mygod commented 8 years ago

For some reasons, I can't seem to add custom tiles to my device (CM13). I've also tried another app and it didn't work. Postponing supporting CM APIs as well. For anyone that's interested, I've also pushed a commit into my fork to get started. (see above)

madeye commented 8 years ago

Awesome! Let's keep this issue open and wait until the Android N API becomes stable.

Mygod commented 8 years ago

Just checked Android N preview 3 docs. Nothing was added for quicksettings Tile API. I have submitted an issue at Android's issue tracker. Hopefully something will happen soon. :-)

109021017 commented 8 years ago

The Android N APIs are now final.

Mygod commented 8 years ago

Apparently nothing has changed. Merging after doing some final test.

Mygod commented 8 years ago

The quick settings tile has been changed to a quick switch button. It costs only ~4MB RAM when Shadowsocks isn't running.

It has also been tested on API level 23 where it didn't crash. :-D

madeye commented 8 years ago

@Mygod :thumbsup:

109021017 commented 8 years ago

👍 So is this update gonna be released any time soon? I'm really looking forward to it.