ninetwozero / BF3-Battlelog

Hello world! This is the number one unofficial Battlefield 3 Battlelog-application for Android.
https://market.android.com/details?id=com.ninetwozero.battlelog
23 stars 7 forks source link

Active platoon detection #30

Open peter-budo opened 12 years ago

peter-budo commented 12 years ago

At the moment I guess platoons data are collected from left side of the home screen (bellow avatar) that gives only list of platoon where person is but not active platoon. Therefore when user open Platoon tab he will see as "Active platoon:" name of the first platoon in alphabetic order.

In order to determinate which platoon is active we need to parse data from main menu bar (Home, Multi-player, Co-op, etc) where active platoon can be found. When parsing look for :

  1. div id=base-sub-navbar
  2. li rel=platoon
  3. surf:container id=base-dropdown-menu-your-platoons (this a parent container for platoons)
  4. and look for child surf:container that has div with class=base-dropdown-item-platoon-active
karllindmark commented 12 years ago

I'll just add a link here: https://github.com/ninetwozero/BF3-Battlelog/issues/31

karllindmark commented 12 years ago

I think it's quite funny that we don't get to know either of the things via the JSON; which platoon is to be considered "active" as well as if the user has any "platoon invites" that need to be responded to. There actually is an unused array called "platoons[]" tied to the notifications, but I reckon that might be leftovers from the notifications.

peter-budo commented 12 years ago

OK, best if you create new Milestone and assign both these issues/suggestions there ;)