antest1 / kcanotify

Viewer Application for KanColle Android
GNU General Public License v3.0
204 stars 29 forks source link

Data Interface Request #42

Closed zeropad closed 6 years ago

zeropad commented 6 years ago

Hi @antest1,

As a kcanotify user, I love this powerful and wonderful app. Thank you for your remarkable work. Meanwhile, I am also using Akashi-Toolkit to check game information. Unfortunately, the usability of so features of Akashi-Toolkit, like Quest counter, Fleet information and Equip Improvement, are relatively low. Due to the Akashi-Toolkit does not sniff the network, it is unable to get real-time data. Hence, users have to provide their data manually.

I have contact with the Akashi-Toolkit dev team. They are more than willing to support real-time data. However, because Android allows only one VpnService at a time, supporting sniffer may result in conflicts between kcanotify and Akashi-Toolkit. So, they are wondering if kcanotify willing to support any data interface, which allows the third party applications to get real-time data.

I have thought about the implementation. Maybe the mechanism could use ContentProvider to support a read-only database interface. and when gaming data updated, kcanotify send a global Broadcast to inform all other apps.

Looking forward to your insight。

Regards, Zeropad

antest1 commented 6 years ago

Hello,

First, thanks for your interest in kcanotify. I think it is good idea, and I'm willing to provide the real-time data for other 3rd party applications, including Akashi-Toolkit.

The implementation itself would be not much different with your suggestion, but some discussion about the content and format when sharing the kancolle data would be needed among the developers. Basically, I think it is okay to share the request-response pair (excluding api_token, since it is a private data), and let the processing of the data be left to each application.

Since kcanotify itself is not quite lightweight, maybe the sniffer would be an individual application and each app works as client can be good model for this case. (In this case, I should extract sniffer part and make new application again :P)

If there are any other suggestions, please feel free to comment here.

zeropad commented 6 years ago

Hi, I think the idea of splitting is very cool. I will pass this idea to Akashi-Toolkit dev team. Thank you.

antest1 commented 6 years ago

I just release the first candidate of the KcaSniffer, which can provides the kancolle data in real-time.

You can check the download link and specification in this link: https://github.com/antest1/KcaSniffer

There is also a demo for using the KcaSniffer. (KcaSampleClient) Checking this repository would be help to know how to apply KcaSniffer to other application.