Neraud / PADListener

Android application to sync PAD to PADherder
GNU General Public License v2.0
25 stars 18 forks source link

Friend Data Feature #43

Closed Spiridios closed 9 years ago

Spiridios commented 9 years ago

I don't know if this is possible, or within the scope of PADListener. I would like a way to get at my friend data (display name, rank, currently visible monsters, or whatever info is transmitted), and I don't know of any other way to get at this than how PADListener currently gets the monster data.

Maybe you could just save JSON text on the file system, or make a way to send it somehow via email or dropbox or some service I'm not thinking of, since there isn't a PAD app that tracks this (yet). I'm envisioning that there may eventually be a web app that can consume this, but for now it's just for me and other interested devs to play with.

Neraud commented 9 years ago

The friend's data can be captured using the same API call as the monster box when going through the title screen. You can already export this data as a JSON file from the View captured data screen and share it using any Android app that registers the share intent (email is the most common way).

I can add a 3rd tab there to display the friends data. I'd have to investigate what information is in this section of the capture, but it looks like there's the id, name, rank, both leaders and a few other fields.

This data would only be refreshed when going through the title screen, not when adding / remove friends (that could require to keep the listener started during the whole time PAD is started).

Spiridios commented 9 years ago

Oh, this looks really cool! I'm sorry, I didn't realize there was more data in the capture than just monster data, and I didn't realize you had a way to share it.

This should work for now for experimenting with. I can see some of the obvious fields too like monster number and level, I'm sure I can work out the rest pretty quickly later today when I get home. I suppose, for now, you can close this feature request unless you really want to add an extra tab for friend data. If I actually make a useful app I can re-open a feature request with the API for you to call.

Neraud commented 9 years ago

I'll add the tab, it's not that much work.

Do you plan on publishing a web API to push data to, or an Android application ? The captured data should already be accessible through a public ContentProvider for other Android app to consume.

Spiridios commented 9 years ago

Web API. I'm much more versed in web apps than I am in mobile development.

Spiridios commented 9 years ago

It was fairly trivial to determine what most of the fields were, but I'm not sure what fields 0, and 8 through 13 are for. 0 appears to always be a value of 4, 8 appears to be related to starter color, but starter color looks like it's actually field 4, field 9 appears to always be 1, and 10-13 appear to always be 0. I also couldn't find a field that indicated if I had used the friend recently. I'll study it more closely this evening, but do you have any insight in these fields?