Comments (16)
I think this is a very good approach. Given Snorlax is already very well structured and modularized. It could instead be used as a dedicated data provider to other modules outside of xposed. Would you mind sharing your code?
from snorlax.
You mean like broadcasting every response and request?
from snorlax.
For starters, broadcasting a few response (and maybe requests if they have interesting data) would be more than enough. GetMapObjects and GetInventory come to mind.
The broadcasting will ensure that the data is accessed as read only. Snorlax could also enable or disable which response gets broadcasted on its user interface.
I will upload a snippet of code soon
from snorlax.
GetPlayer
would be useful too.
from snorlax.
Sounds nice... I'd like to take a look on that snippet @krosk
from snorlax.
Have a look there for the in-Snorlax part:
krosk@3340796
krosk@de6c0d5
Disclaimer: code totally not cleaned for sharing, please improve upon it
Out of Snorlax, I implement a BroadcastReceiver that listens to the intent "com.icecream.snorlax.BROADCAST_GETMAPOBJECTS" and do my thing on the Intent data, each time it is broadcasted (that is, directly when I receive a response).
from snorlax.
Ok ok I like the idea! Currently Im working with a feature that works with gson and auto-value-gson to persist some data on external storage... For code consistency I'm going to drop json objects and json arrays for the libraries mentioned
from snorlax.
Make a pull request to dev branch 💃
from snorlax.
Sure, feel free to change to whatever library is best. I made the pull request to dev branch.
from snorlax.
For map objects, I do the following output:
{
"wild":[
{
"encounter_id":-967454372306407651,
"pokedex":16,
"time_till_hidden_ms":342782,
"last_modified_timestamp_ms":1476463374878,
"latitude":10.464603324116037,
"longitude":-66.97483351084206,
"spawnpoint_id":"8c2a5f8b4cf",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":6355789224367253853,
"pokedex":13,
"time_till_hidden_ms":88790,
"last_modified_timestamp_ms":1476463374878,
"latitude":10.46444625169523,
"longitude":-66.97492658741469,
"spawnpoint_id":"8c2a5f8b4b5",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":-629473294973047011,
"pokedex":16,
"time_till_hidden_ms":1005374945,
"last_modified_timestamp_ms":1476463374878,
"latitude":10.464753331328524,
"longitude":-66.97464735772928,
"spawnpoint_id":"8c2a5f8b4df",
"s2_cell_id":-8346753907698958336
}
],
"map":[
{
"encounter_id":-967454372306407651,
"pokedex":16,
"expiration_timestamp_ms":1476463717660,
"latitude":10.464603324116037,
"longitude":-66.97483351084206,
"spawnpoint_id":"8c2a5f8b4cf",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":6355789224367253853,
"pokedex":13,
"expiration_timestamp_ms":1476463463668,
"latitude":10.46444625169523,
"longitude":-66.97492658741469,
"spawnpoint_id":"8c2a5f8b4b5",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":-629473294973047011,
"pokedex":16,
"expiration_timestamp_ms":-1,
"latitude":10.464753331328524,
"longitude":-66.97464735772928,
"spawnpoint_id":"8c2a5f8b4df",
"s2_cell_id":-8346753907698958336
}
],
"nearby":[
{
"encounter_id":-967454372306407651,
"pokedex":16,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":1907947272857238701,
"pokedex":29,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":6355789224367253853,
"pokedex":13,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":-629473294973047011,
"pokedex":16,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":2017617235307389421,
"pokedex":35,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
}
],
"disk":[
]
}
Data is coming from:
mapCell.getWildPokemonsList();
mapCell.getCatchablePokemonsList();
mapCell.getNearbyPokemonsList();
mapCell.getFortsList(); (Has lure info)
Is that ok?
from snorlax.
Feature implemented, live on dev branch... last commit 7f07e18
from snorlax.
Yes it is. Later you may consider putting the Pokémon data too (IV moves et
etc) from wild pokemons, they are all interesting data
On Oct 14, 2016 18:46, "Pedro Diaz" [email protected] wrote:
For map objects, I do the following output:
{
"wild":[
{
"encounter_id":-967454372306407651,
"pokedex":16,
"time_till_hidden_ms":342782,
"last_modified_timestamp_ms":1476463374878,
"latitude":10.464603324116037,
"longitude":-66.97483351084206,
"spawnpoint_id":"8c2a5f8b4cf",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":6355789224367253853,
"pokedex":13,
"time_till_hidden_ms":88790,
"last_modified_timestamp_ms":1476463374878,
"latitude":10.46444625169523,
"longitude":-66.97492658741469,
"spawnpoint_id":"8c2a5f8b4b5",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":-629473294973047011,
"pokedex":16,
"time_till_hidden_ms":1005374945,
"last_modified_timestamp_ms":1476463374878,
"latitude":10.464753331328524,
"longitude":-66.97464735772928,
"spawnpoint_id":"8c2a5f8b4df",
"s2_cell_id":-8346753907698958336
}
],
"map":[
{
"encounter_id":-967454372306407651,
"pokedex":16,
"expiration_timestamp_ms":1476463717660,
"latitude":10.464603324116037,
"longitude":-66.97483351084206,
"spawnpoint_id":"8c2a5f8b4cf",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":6355789224367253853,
"pokedex":13,
"expiration_timestamp_ms":1476463463668,
"latitude":10.46444625169523,
"longitude":-66.97492658741469,
"spawnpoint_id":"8c2a5f8b4b5",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":-629473294973047011,
"pokedex":16,
"expiration_timestamp_ms":-1,
"latitude":10.464753331328524,
"longitude":-66.97464735772928,
"spawnpoint_id":"8c2a5f8b4df",
"s2_cell_id":-8346753907698958336
}
],
"nearby":[
{
"encounter_id":-967454372306407651,
"pokedex":16,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":1907947272857238701,
"pokedex":29,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":6355789224367253853,
"pokedex":13,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":-629473294973047011,
"pokedex":16,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
},
{
"encounter_id":2017617235307389421,
"pokedex":35,
"distance_in_meters":0.0,
"fort_id":"",
"s2_cell_id":-8346753907698958336
}
],
"disk":[
]
}
Data is coming from:
mapCell.getWildPokemonsList();
mapCell.getCatchablePokemonsList();
mapCell.getNearbyPokemonsList();
mapCell.getFortsList(); (Has lure info)
Is that ok?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFfHJaqoC7ZXwhWK955MW7cdZW__00Pks5qz7H2gaJpZM4KTx5-
.
from snorlax.
Yea i saw that data while developing... I need to write a wiki page how this works and describe the json... later this week.
from snorlax.
I guess PokemonData is empty?
87 10948-12052/? I/Xposed: # POGOProtos.Map.Pokemon.WildPokemonOuterClass$WildPokemon@8c75375f
encounter_id: 6384545302645539549
last_modified_timestamp_ms: 1476476848898
latitude: 10.464471799054811
longitude: -66.9741819751367
pokemon_data {
captured_cell_id: 0
creation_time_ms: 0
id: 0
pokemon_id: ODDISH
pokemon_id_value: 43
}
spawn_point_id: "8c2a5f8b45f"
time_till_hidden_ms: 991900925
10-14 16:27:30.597 10948-12052/? I/Xposed: # POGOProtos.Map.Pokemon.WildPokemonOuterClass$WildPokemon@222b7c0d
encounter_id: -1970438569539709811
last_modified_timestamp_ms: 1476476848898
latitude: 10.464903338332592
longitude: -66.97446120465979
pokemon_data {
captured_cell_id: 0
creation_time_ms: 0
id: 0
pokemon_id: PIDGEY
pokemon_id_value: 16
}
spawn_point_id: "8c2a5f8b51b"
time_till_hidden_ms: 243498
10-14 16:27:30.607 10948-12052/? I/Xposed: # POGOProtos.Map.Pokemon.WildPokemonOuterClass$WildPokemon@d1765ef8
encounter_id: -7314530930160370019
last_modified_timestamp_ms: 1476476848898
latitude: 10.464793007606314
longitude: -66.97408889865065
pokemon_data {
captured_cell_id: 0
creation_time_ms: 0
id: 0
pokemon_id: EEVEE
pokemon_id_value: 133
}
spawn_point_id: "8c2a5f8b5ad"
time_till_hidden_ms: 48562
10-14 16:27:30.623 10948-12052/? I/Xposed: # POGOProtos.Map.Pokemon.WildPokemonOuterClass$WildPokemon@c5f37dbc
encounter_id: 7195631391279886685
last_modified_timestamp_ms: 1476476848898
latitude: 10.46497127620056
longitude: -66.97427505163357
pokemon_data {
captured_cell_id: 0
creation_time_ms: 0
id: 0
pokemon_id: PARAS
pokemon_id_value: 46
}
spawn_point_id: "8c2a5f8b509"
time_till_hidden_ms: 323010
10-14 16:27:30.633 10948-12052/? I/Xposed: # POGOProtos.Map.Pokemon.WildPokemonOuterClass$WildPokemon@8ec4b71
encounter_id: 100303499573695229
last_modified_timestamp_ms: 1476476848898
latitude: 10.465231614627145
longitude: -66.97446120465979
pokemon_data {
captured_cell_id: 0
creation_time_ms: 0
id: 0
pokemon_id: ZUBAT
pokemon_id_value: 41
}
spawn_point_id: "8c2a5f8b56f"
time_till_hidden_ms: 816730
10-14 16:27:30.640 10948-12052/? I/Xposed: # POGOProtos.Map.Pokemon.WildPokemonOuterClass$WildPokemon@dc7ce47
encounter_id: -1043922175575498419
last_modified_timestamp_ms: 1476476848898
latitude: 10.464924534602977
longitude: -66.97474043428026
pokemon_data {
captured_cell_id: 0
creation_time_ms: 0
id: 0
pokemon_id: PIDGEY
pokemon_id_value: 16
}
spawn_point_id: "8c2a5f8b525"
time_till_hidden_ms: 268402
from snorlax.
I never tried. I assumed since there is the pokemon data object in the protobuf, it should have contained valid data, Seems like maybe they did not include data?
from snorlax.
Yea it's empty... sounds logic anyways.
Maybe it's time to broadcast player and inventory
from snorlax.
Related Issues (20)
- Add extra options for custom format. HOT 5
- Buddy pokemon's distance shows incorrectly. HOT 3
- Add IV to head up notification. HOT 4
- [BUG] Snorlax settings crashes/freeze if phone is locked. HOT 1
- Export csv pokemon list HOT 2
- Translatable movesets HOT 5
- Nickname limited in number of characters HOT 3
- Auto Dismiss Notification & Toast Notification HOT 1
- Format bug HOT 1
- Port to Magisk Manager HOT 4
- Small issue with the types (FIre vs FIght / GRass vs GRound) HOT 1
- There are thousands of devices begging for an "update" HOT 3
- Feature - History / Log
- Run on disabled Xposed
- fisherman and youngster medals
- CP formula changed by Niantic today HOT 1
- Ditto
- Winter costumes doesn't show HOT 1
- Snorlax not working with latest version
- Edxposed passing safety net
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snorlax.