Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

NX Activity Log Switch

From GameBrew
NX Activity Log
Nxactivitylog.png
General
Authortallbl0nde, zdm65477730
TypeUtilities
Version1.5.0
LicenseMIT License
Last Updated2024/03/15
Links
Download
Website
Source
Support Author

NX Activity Log is a homebrew application that reads and displays the amount of information about our play activity that we should have been given on the User Page.

The UI has been designed to feel familiar and is navigated in a similar manner to the Switch's firmware.

Features

  • Viewing Play Activity (per user)
    • All Time Activity:
      • Total Playtime in minutes.
      • Number of times a game has been launched.
    • Date of first launch:
      • Date/time of most recent launch.
      • Average time spent in a game.
      • Sorting games by time played, recently played, etc..
    • Recent Activity (see note below).
      • Graph visualizing play time.
      • View by day, month or year.
      • Total playtime in seconds.
    • Number of launches:
      • Viewing each "Play Session".
    • Event-by-event breakdown of your activity.
  • Multi-language Support
    • English, Chinese (Simplified and Traditional), French, German, Italian, Korean, Portugese, Russian, Spanish and Turkish.
  • Theme Support
    • Automatic theme detection to match the Switch's colour scheme.
    • Custom Themes:
      • All colours used in the app can be adjusted.
      • Set a custom background image.
        • Requires a PNG saved at /config/NX-Activity-Log/background.png.
  • Update in-app
    • Checks for updates automatically and displays an icon if one is available.
    • Update completely within the app.
  • User Page Replacement
    • Requires LayeredFS and either Atmosphere 0.10.0+, ReiNX or SXOS (or build and copy the forwarder to your CFW-specific titles folder).
    • Requires .nro to be at /switch/NX-Activity-Log/NX-Activity-Log.nro.

Note: The data shown in Recent Activity and Details may be slightly inaccurate over larger periods of time (ie. off by a few minutes). If activity is not being shown for earlier periods of time it is likely your Switch has been reset at some point, which wipes the data used to calculate playtime in this way.

Installation

Place the .nro to the /switch/ folder on the SD card.

User guide

Exported JSON Format

All play data that can be read by NX-Activity-Log is included in the exported JSON (i.e. the system's data and any imported data).

The JSON has the following format

  • exportString: Timestamp of export in human readable format.
  • exportTimestamp: Timestamp of export in POSIX.
  • exportVersion: Version of NX-Activity-Log that exported the data.
  • users: Array of users on the system.
    • id: Unique ID of user.
    • name: Username of user.
    • titles: Array of titles played by the user.
      • events: Array of play events for the title by the user (see libnx/switchbrew for an explanation of these).
        • clockTimestamp: Timestamp in POSIX of event.
        • steadyTimestamp: Timestamp of a 'steady' clock, used to calculation duration between events as the clock may change.
        • type: Type of play event.
      • id: Unique ID of title (otherwise known as Title ID or Program ID).
      • name: Name of title (in system's locale).
      • summary: Object containing summary of play stats for the title by the user.
        • firstPlayed: Time in POSIX of first play.
        • lastPlayed: Time in POSIX of last play.
        • launches: Number of times the game was launched.
        • playtime: Playtime in seconds.

Reporting Incorrect Data

If you are seeing wildly incorrect values/believe the playtime shown is incorrect within Recent Activity or the Details screen, please do the following:

  • Download and run the .nro from here.
  • Leave it run; if it appears to be frozen leave it for up to a minute.
  • Once it is done there should be a playlog.txt at the root of your SD card.
  • Create an issue with the following:
    • Screenshots of the incorrect data (make sure the date/time and playtime are visible).
    • The playlog.txt acquired from the last steps.

Note: If the data shown under All Activity is incorrect, there is nothing that can be done. These values are read directly from the Switch and aren't the result of any calculations.

Controls

Hold ZL/ZR (when scrolling a long list) - Scroll faster

Screenshots

nxactivitylog.png

nxactivitylog2.png

nxactivitylog3.png

Known issues

  • The main issue at the moment is that a few users' playtime is incorrect. This is due to the Switch being factory reset at some point and/or some games not requiring a user to be selected to play it.
  • Having a lot of games logged can cause too much memory usage when launched via User Page/Album, leading to out of memory crashes and/or missing images/text.
  • Having a lot of games logged causes a long pause/freeze when loading the "All Activity" screen.

Changelog

v1.5.0 2024/03/15 (by zdm65477730)

  • Support HOS16.0.0.
  • Fix play time in total time exceed 100%.
  • Add year suffix for some local lang, e.g. Chinese.
  • Allow run under Applet mode.
  • Make sure all account play events in list.
  • Optimize the memory usage.
  • Fix ghost record issue in all views(All, Recent and Hidden view).
  • Fix crash when deleting import data.
  • Correct the time unit(time_t in second should be uint64_t).

v1.4.0 2021/07/10

  • Added data export to JSON.
    • All data shown in the app (both Recent Activity 'events' and All Activity 'summaries' are exported.
    • See the wiki for the format of the JSON.
  • Added a basic, experimental import from JSON.
    • This only imports data to NX-Activity-Log, the system's log isn't touched.
    • Data is only imported to Recent Activity due to limitations on merging All Activity.
  • Added 'Adjust Playtime' setting.
    • This setting allows for the playtime shown in All Activity to be increased/decreased in order to make up for lost time, etc.
    • These changes are applied on a per-user basis.
    • This may be useful when importing data as the import doesn't change the values shown in All Activity.
  • Added 'Hide Titles' setting.
    • Titles can be marked as hidden in order to hide them from all screens in NX-Activity-Log.
    • These changes are applied across all users.
  • Added Traditional Chinese translation.
  • Translations now fallback to English if a string is missing.
    • Note: Translations haven't been updated yet so the newer features will only be shown in English.
  • Improved title metadata parsing.
  • Built with latest version of Aether.
    • Most of the "heavy" UI is now rendered asynchronously.
      • In simple terms, most of the app should now be more responsive.
  • Built with latest libnx.

v1.3.2 2020/07/10

  • Added Chinese translation (@tiansongyu).
  • Added Korean translation (@jhs516).
  • Slightly altered French translation (@provomeister).
  • Small UI Improvements.
    • No more 'gaps' in some rounded rectangles.
    • Ellipses now look like ellipses.
    • Slightly less memory usage due to a change in how lists are drawn.
  • Built with latest libnx.

v1.3.1 2020/05/07

  • Added Spanish translation (@ivanmarban).
  • Added Turkish translation (@fpscan).
  • Fixed a memory leak when applying a custom theme.
  • Small changes to support ReiNX 3.0.
    • The forwarder will now (un)install to/from /ReiNX/contents instead of /ReiNX/titles.

v1.3.0 2020/04/26

  • Added support for firmware 10.0.0.
  • Added support for other languages.
    • There are now 5 languages aside from English available. A huge thankyou to those who translated the app!.
    • These are: French, German, Italian, Portugese and Russian.
    • Game titles with Korean or Chinese characters are now shown correctly.
  • Added ability to update within the app.
    • Once per day the app will automatically check for an update.
      • A small download icon will be shown if an update is available.
    • The update can be performed by selecting 'Check for Updates' in Settings.
  • Custom theme support.
    • An image can be set as the background by placing it at /config/NX-Activity-Log/background.png and toggling the option in Settings
      • If it is not 1280x720 it will be shrinked/stretched to fit the screen.
    • Every colour used in the app can be customized.
  • The language and theme can be changed/edited without needing to restart the app.
  • Adjusted the behaviour when changing between view types.
    • For example, changing from 'By Month' to 'By Day' while the current month is shown will jump to the current date instead of the 1st.
  • Improved User Page functionality.
    • The application can now be quit by pressing B when launched as the User Page.
    • Previously it had to be quit by pressing HOME.
  • Various UI Improvements:
    • Multi-line text is no longer 'squished' together, making it easier to read.
    • Korean and Chinese characters are now rendered correctly.
    • Reduced freeze when changing between some screens due to some elements being drawn twice.
  • Built with libnx v3.1.0.
    • This should fix the "timezone issue".
  • General stability improvements to enhance the user’s experience.

v1.2.2 2020/03/30

  • Fixed an issue introduced in v1.2.1 where play time was incorrectly shown and calculated on recent activity/details.
    • This occurred if you had your 'Default View Type' set to anything other than 'By Day'.

v1.2.1 2020/05/25

  • Graph bars no longer go off screen if playtime is larger than anticipated.
    • These bars are indicated with a plus after the value label (if you have them enabled).
    • This is aimed at you time travellers out there.
  • Ability to choose 12/24 hour time formatting.
  • Added option to choose screen to show on launch.
  • Added option to select view type on launch.
  • Further improvements to the play time algorithm (thanks @Heartbeat-Heartbreak for testing).
    • If this has messed up your play time (it shouldn't though) please see how to report it in the readme.

v1.2.0 2020/02/19

  • Graphs have been added to the Recent Activity and Details screens.
    • The value labels can be turned off in settings.
  • A date selector panel has been added so spamming L/R to change date is no longer needed.
  • 'Replace User Page' will no longer install the forwarder if the .nro is in the incorrect location.
    • The expected location of the .nro is now /switch/NX-Activity-Log/NX-Activity-Log.nro.
    • This should prevent any related crashes.
  • Ability to view 'Play Sessions'.
    • These are a period of time from when a game was launched to when it was quit (by actually closing not just minimising).
    • The individual events used to calculate all activity can be viewed by selecting a session.
  • The user can be changed without having to exit the app.
  • The algorithm for counting play time has been slightly improved.
  • Removed restriction on available date range.
    • This allows for viewing of data in the future/before the Switch was released (due to incorrect time).
  • Behind the scenes:
    • Almost all of the codebase has been rewritten.
    • The UI has been moved to my own UI library Aether.
      • This has fixed a few UI bugs and should make UI-related changes faster.
  • A number of bugs fixed, including:
    • A crash after 20 successive launches due to not closing a service.
    • A crash due to an incorrect config.ini.
    • Random black screen freeze requiring a hard reset.
    • Unable to replace user page on SX OS.
  • Tip: Hold ZL/ZR when scrolling through a long list to scroll faster.

v1.1.0 2019/12/13

  • Ability to view recent play activity.
    • View by day, month or year.
    • This should be fairly accurate, see the readme for more info!.
  • Re-added applet mode support.
    • Added my own user select to avoid issues with the player select applet.
  • Ability to override User Page.
    • A toggle is available within settings.
    • Only works on Atmosphere 0.10.0+, ReiNX and SXOS.
  • Changed method of finding played games.
    • Even more games should appear now!.
    • Games that haven't been played are now ignored.
  • Enhancements to the user's experience:.
    • Hold ZL/ZR when scrolling through a list to scroll faster.
    • Added a "panel" for selecting from a list of options.
      • It's now easier to choose how to sort, etc..
    • Most settings apply instantly.
  • Updated to libnx 3.0.0.

v1.0.0 2019/11/26

  • A stunning new UI! It follows the appearance and usage of the Switch's UI for familiarity.
    • Everything is completely accessible via either touch or a controller.
  • NX Activity Log can no longer be used in "Applet Mode".
    • I plan to support applet mode again in the future though.
  • The activity of deleted games can be hidden by toggling an option in settings.
  • Entries for unplayed games can also be hidden.

v0.2.0 2019/10/10

  • Deleted games are now shown.
  • Average play time per launch is now shown.
  • Formatting has been improved.
    • Everything should now be more readable.
  • Never played games are no longer first when sorting by "First Played".

v0.1.0 2019/10/02

  • First Release.
  • View play data per user.
    • First/last played timestamp.
    • Total playtime (in minutes).
    • Number of launches.
  • Various sorting options.
    • Alphabetically.
    • Playtime.
    • Recently Played.
    • Home Menu.
    • First Played.
    • Launches.
  • And that's about it (for now, at least).

Credits

Thanks to:

  • AtlasNX for SimpleIniParser.
    • Used to read/write the config file.
  • nlohmann for his JSON library.
  • Switchbrew for nx-hbloader.
  • Adapted to override User Page with this app.
  • Anyone else involved with the development of homebrew tools and reverse engineering of the Switch.

External links

Advertising: