alucas / Snorlax

Xposed module (Android) to check pokemons stats
Other
23 stars 7 forks source link

[Idea] Use Snorlax to feed PogoSuite.com Lucky Egg calculator #38

Open jane0815 opened 7 years ago

jane0815 commented 7 years ago

It would be awesome if the module could export pokemon number and candys to feed an Lucky Egg Calc App like this: https://www.reddit.com/r/pokemongodev/comments/5iapvb/pogosuitecom_update_lucky_egg_calculator_v1040/

alucas commented 7 years ago

It might not be too difficult to export Pokemon and eggs count, we just need to define a format ;)

tstiegler commented 7 years ago

Hey, I'm the owner of pogosuite. This would be pretty simple to do since there is already an import format via URL.

The format starts as a JSON array, for example.

[
  {
    "i": "16",
    "c": "144",
    "p": "15",
    "d": false
  },
  {
    "i": "13",
    "c": "190",
    "p": "20",
    "d": true
  }
]

It is an array of objects, each object represents a pokemon.

So the JSON block above represents: Pidgey (15, 144 candy, not a new dex), Weedle (13, 190 candy, new dex entry).

After that point, the JSON object is stringified and then converted to base64 (Im not sure this is entirely required but i liked printable characters being in the URLs). This is then added to the URL after a hash. So the resulting URL would be.

http://pogosuite.com/luckyegg/#Ww0KICB7DQogICAgImkiOiAiMTYiLA0KICAgICJjIjogIjE0NCIsDQogICAgInAiOiAiMTUiLA0KICAgICJkIjogZmFsc2UNCiAgfSwNCiAgew0KICAgICJpIjogIjEzIiwNCiAgICAiYyI6ICIxOTAiLA0KICAgICJwIjogIjIwIiwNCiAgICAiZCI6IHRydWUNCiAgfQ0KXQ==

However, i'm not sure how this will react if the app is already on the device. I'm not too sure they will integrate properly.