Skip to content

Commit

Permalink
thermal: release v1.0.0 (#28)
Browse files Browse the repository at this point in the history
* thermal: release v0.1.1

* thermal: v0.1.1 -> v1.0.0

* thermal: update root README
  • Loading branch information
ruccho authored Jun 26, 2024
1 parent a11599a commit ff08fff
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Packages/MobileSupportThermal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release notes

## v1.0.0 - 2024/06/26

- New Features :rocket:
- Thermal: New apis to get battery temperature and thermal headroom on Android

## v0.1.0 - 2023/02/10

- New Features :rocket:
Expand Down
18 changes: 18 additions & 0 deletions Packages/MobileSupportThermal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Below is an example.
```C#
private void StartThermalMonitoring()
{

#if UNITY_ANDROID
// OnBatteryTemperatureChanged is only available on Android
Thermal.OnBatteryTemperatureChanged += value => Debug.Log($"Battery Temperature: {value}");
#endif

#if UNITY_ANDROID || UNITY_IOS
Thermal.OnThermalStatusChanged += status => Debug.Log($"Thermal Status: {status}");
Thermal.StartMonitoring();
Expand All @@ -39,6 +45,18 @@ Below is an example.

If you want to stop monitoring, call `Thermal.StopStopMonitoring()`

### Thermal Headroom (Android)

On Android, `Thermal.GetThermalHeadroom()` is available to estimate CPU temperature.
Details: https://developer.android.com/reference/android/os/PowerManager#getThermalHeadroom(int)

```C#
private void GetThermalHeadroom()
{
Thermal.GetThermalHeadroom(0, out var headroom, out var resultForecastSeconds, out var isLatestValue);
}
```

## Setup

### Requirements
Expand Down
2 changes: 1 addition & 1 deletion Packages/MobileSupportThermal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jp.co.cyberagent.unity-mobile-support-thermal",
"displayName": "Mobile Support - Thermal",
"version": "0.1.0",
"version": "1.0.0",
"unity": "2019.4",
"description": "Tools to support thermal of mobile like iOS/Android.",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Scripts ars split into multiple packages, so choose packages what you only need.
| Package | Description | Latest Version | Readme Link | Changelog Link |
|-------------|------------------------------------------------------|----------------|----------------------------------------------------------|----------------------------------------------------------------|
| Storage | Functions to retrive information about storage | v0.2.0 | [README.md](Packages/MobileSupportStorage/README.md) | [CHANGELOG.md](Packages/MobileSupportStorage/CHANGELOG.md) |
| Thermal | Functions to retrive information about thermal | v0.1.0 | [README.md](Packages/MobileSupportThermal/README.md) | [CHANGELOG.md](Packages/MobileSupportThermal/CHANGELOG.md) |
| Thermal | Functions to retrive information about thermal | v1.0.0 | [README.md](Packages/MobileSupportThermal/README.md) | [CHANGELOG.md](Packages/MobileSupportThermal/CHANGELOG.md) |
| AndroidGame | Functions to integrate with Android GameManager APIs | v1.1.0 | [README.md](Packages/MobileSupportAndroidGame/README.md) | [CHANGELOG.md](Packages/MobileSupportAndroidGame/CHANGELOG.md) |
| QualityTuner | Package to get hardware specs and tool to decide quality level | v1.0.0 | [README.md](Packages/MobileSupportQualityTuner/README.md) | [CHANGELOG.md](Packages/MobileSupportQualityTuner/CHANGELOG.md) |

0 comments on commit ff08fff

Please sign in to comment.