mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-01-28 22:01:50 +00:00
Compare commits
45 Commits
linux-v0.1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
339c478564 | ||
|
|
c9dd79bb82 | ||
|
|
5cd7db574a | ||
|
|
e10fe21ba5 | ||
|
|
b4deccff7e | ||
|
|
dcbbb2ce98 | ||
|
|
e5836c9869 | ||
|
|
287163e116 | ||
|
|
a75557d6dc | ||
|
|
0e1f784737 | ||
|
|
f3b1db2513 | ||
|
|
b5f0c32751 | ||
|
|
8088594df5 | ||
|
|
345b7b9051 | ||
|
|
fa30d3c09a | ||
|
|
826e395379 | ||
|
|
574c193a6d | ||
|
|
10bf2fe68c | ||
|
|
e192dc114b | ||
|
|
de82cdd8c2 | ||
|
|
a06c673400 | ||
|
|
a80680ff73 | ||
|
|
36c55169f1 | ||
|
|
93ac06b8e3 | ||
|
|
aa0898a65a | ||
|
|
ecfbcd1c02 | ||
|
|
5231b12c71 | ||
|
|
0123449d80 | ||
|
|
8a5d6087c9 | ||
|
|
f12fe90134 | ||
|
|
8fbdfd879c | ||
|
|
0a608afbe6 | ||
|
|
be362c5079 | ||
|
|
141f1e7604 | ||
|
|
1dbb36a2aa | ||
|
|
938f0d5448 | ||
|
|
e3eab3e31e | ||
|
|
55d1a69b21 | ||
|
|
f4fbcc9e88 | ||
|
|
944195b193 | ||
|
|
e8e1650145 | ||
|
|
4a4494121d | ||
|
|
3696a4e729 | ||
|
|
7356e57878 | ||
|
|
acf2b9bea7 |
@@ -16,5 +16,5 @@ indent_size = 4
|
||||
trim_trailing_whitespace = false
|
||||
max_line_length = off
|
||||
|
||||
[*.{py,java,r,R,kt,xml,kts}]
|
||||
[*.{py,java,r,R,kt,xml,kts,h,hpp,cpp,qml}]
|
||||
indent_size = 4
|
||||
|
||||
@@ -122,7 +122,7 @@ If primary is removed, mic will be changed and the secondary will be the new pri
|
||||
|
||||
## Conversational Awareness
|
||||
|
||||
AirPods send conversational awareness packets when the person wearing them start speaking. The packet format is as follows:
|
||||
AirPods send conversational awareness packets when the person wearing them starts speaking. The packet format is as follows:
|
||||
|
||||
```plaintext
|
||||
04 00 04 00 4B 00 02 00 01 [level]
|
||||
@@ -307,7 +307,7 @@ All values are formatted as IEEE 754 floats in little endian order.
|
||||
|
||||
## Configure Stem Long Press
|
||||
|
||||
I have noted all the packets sent to configure what the press and hold of the steam should do. The packets sent are specific to the current state. And are probably overwritten everytime the AirPods are connected to a new (apple) device that is not synced with icloud (i think)... So, for non-Apple device too, the configuration needs to be stored and overwritten everytime the AirPods are connected to the device. That is the only way to keep the configuration.
|
||||
I have noted all the packets sent to configure what the press and hold of the steam should do. The packets sent are specific to the current state. And are probably overwritten everytime the AirPods are connected to a new (apple) device that is not synced with icloud (i think)... So, for non-Apple devices too, the configuration needs to be stored and overwritten everytime the AirPods are connected to the device. That is the only way to keep the configuration.
|
||||
|
||||
This is also the only way to control the configuration as the previous state needs to be known, and then the new state can be set.
|
||||
|
||||
@@ -403,20 +403,3 @@ Once tracking is active, the AirPods stream sensor packets with the following co
|
||||
| orientation 3 | 47 | 2 |
|
||||
| Horizontal Acceleration | 51 | 2 |
|
||||
| Vertical Acceleration | 53 | 2 |
|
||||
|
||||
# LICENSE
|
||||
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
report@kavishdevar.me.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
@@ -1,70 +0,0 @@
|
||||
# Welcome to LibrePods contributing guide <!-- omit in toc -->
|
||||
|
||||
Thank you for considering a contribution to LibrePods! Your support helps bring Apple-exclusive AirPods features to Linux and Android.
|
||||
|
||||
Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectful.
|
||||
|
||||
This guide provides an overview of the contribution workflow, from opening an issue to creating and reviewing a pull request (PR).
|
||||
|
||||
## New contributor guide
|
||||
|
||||
To get an overview of the project, read the [README](./README.md). Here are some resources to help you get started with open-source contributions:
|
||||
|
||||
- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
|
||||
- [Set up Git](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git)
|
||||
- [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow)
|
||||
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)
|
||||
|
||||
## Getting started
|
||||
|
||||
To navigate our codebase with confidence, see the [README](./README.md) for setup instructions and usage details. We accept various types of contributions, which don’t always require writing code (like translations).
|
||||
|
||||
To develop for the Android App, Android Studio is the preferred IDE. And you can use any IDE for the linux program, it is just python!
|
||||
|
||||
### Issues
|
||||
|
||||
#### Create a new issue
|
||||
|
||||
If you find a bug or want to suggest a feature, check if an issue already exists by searching through our [existing issues](https://github.com/kavishdevar/librepods/issues). If no relevant issue exists, open a new one and fill in the details.
|
||||
|
||||
#### Solve an issue
|
||||
|
||||
Browse our [issues list](https://github.com/kavishdevar/librepods/issues) to find an interesting issue to work on. Use labels to filter issues and pick one that matches your expertise. If you’d like to work on an issue, open a PR with your solution.
|
||||
|
||||
### Make Changes
|
||||
|
||||
#### Make changes locally
|
||||
|
||||
1. Fork the repository and clone it to your local environment.
|
||||
```
|
||||
git clone https://github.com/kavishdevar/librepods.git
|
||||
cd AirPods-Like-Normal
|
||||
```
|
||||
2. Create a working branch to start your changes.
|
||||
```
|
||||
git checkout -b your-feature-branch
|
||||
```
|
||||
3. Make your changes, following the existing style and structure.
|
||||
|
||||
4. Test your changes to ensure they work as expected and do not introduce new issues.
|
||||
|
||||
### Commit your changes
|
||||
|
||||
Commit your changes with a descriptive message.
|
||||
|
||||
### Pull Request
|
||||
|
||||
When your changes are ready, create a pull request (PR):
|
||||
- Fill out the PR template to help reviewers understand your changes.
|
||||
- If your PR is related to an issue, don’t forget to [link your PR to it](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
|
||||
- Enable the checkbox to allow maintainers to edit your PR, so any required changes can be merged easily.
|
||||
|
||||
Once your PR is open, a team member will review it. They may ask questions or request additional information.
|
||||
|
||||
- If changes are requested, apply them in your fork and commit them to the PR branch.
|
||||
- Mark conversations as resolved as you apply feedback.
|
||||
- For merge conflicts, follow this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to resolve them.
|
||||
|
||||
### Your PR is merged!
|
||||
|
||||
Congratulations! :tada: Once merged, your contributions will be publicly available in LibrePods.
|
||||
147
LICENSE
147
LICENSE
@@ -1,5 +1,5 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
@@ -7,15 +7,17 @@
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
@@ -24,34 +26,44 @@ them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
@@ -60,7 +72,7 @@ modification follow.
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
@@ -537,45 +549,35 @@ to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
@@ -633,29 +635,40 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
101
README.md
101
README.md
@@ -1,13 +1,7 @@
|
||||

|
||||
|
||||
[](https://xdaforums.com/t/app-root-for-now-airpodslikenormal-unlock-apple-exclusive-airpods-features-on-android.4707585/)
|
||||
[](https://github.com/kavishdevar/librepods/releases/latest)
|
||||
[](https://github.com/kavishdevar/librepods/releases)
|
||||
[](https://github.com/kavishdevar/librepods/stargazers)
|
||||
[](https://github.com/kavishdevar/librepods/issues)
|
||||
[](https://github.com/kavishdevar/librepods/blob/main/LICENSE)
|
||||
[](https://github.com/kavishdevar/librepods/graphs/contributors)
|
||||
>[!IMPORTANT]
|
||||
Development paused due to lack of time until 17th May 2026 (JEE Advanced). PRs and issues might not be responded to until then.
|
||||
|
||||

|
||||
|
||||
## What is LibrePods?
|
||||
|
||||
@@ -19,9 +13,10 @@ LibrePods unlocks Apple's exclusive AirPods features on non-Apple devices. Get a
|
||||
| ------ | --------------------- | ---------------------------------------------------------- |
|
||||
| ✅ | AirPods Pro (2nd Gen) | Fully supported and tested |
|
||||
| ✅ | AirPods Pro (3rd Gen) | Fully supported (except heartrate monitoring) |
|
||||
| ✅ | AirPods Max | Fully supported (client shows unsupported features) |
|
||||
| ⚠️ | Other AirPods models | Basic features (battery status, ear detection) should work |
|
||||
|
||||
Most features should work with any AirPods. Currently, I've only got AirPods Pro 2 to test with.
|
||||
Most features should work with any AirPods. Currently, I've only got AirPods Pro 2 to test with. But, I believe the protocol remains the same for all other AirPods (based on analysis of the bluetooth stack on macOS).
|
||||
|
||||
## Key Features
|
||||
|
||||
@@ -36,39 +31,31 @@ Most features should work with any AirPods. Currently, I've only got AirPods Pro
|
||||
- **Other customizations**:
|
||||
- Rename your AirPods
|
||||
- Customize long-press actions
|
||||
- Few accessibility features
|
||||
- All accessibility settings
|
||||
- And more!
|
||||
|
||||
See our [pinned issue](https://github.com/kavishdevar/librepods/issues/20) for a complete feature list and roadmap.
|
||||
* Features marked with an asterisk require the VendorID to be change to that of Apple.
|
||||
|
||||
## Platform Support
|
||||
|
||||
### Linux
|
||||
for the old version see the [Linux README](./linux/README.md). (doesn't have many features, maintainer didn't have time to work on it)
|
||||
|
||||
The Linux version runs as a system tray app. Connect your AirPods and enjoy:
|
||||
new version in development ([#241](https://github.com/kavishdevar/librepods/pull/241))
|
||||
|
||||
- Battery monitoring
|
||||
- Automatic Ear detection
|
||||
- Conversational Awareness
|
||||
- Switching Noise Control modes
|
||||
- Device renaming
|
||||
|
||||
> [!NOTE]
|
||||
> Work in progress, but core functionality is stable and usable.
|
||||
|
||||
For installation and detailed info, see the [Linux README](/linux/README.md).
|
||||

|
||||
|
||||
### Android
|
||||
|
||||
#### Screenshots
|
||||
|
||||
| | | |
|
||||
| -------------------------------------------------------------------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------- |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
| | | |
|
||||
| --------------------------------------------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|
||||
|
||||
here's a very unprofessional demo video
|
||||
@@ -77,16 +64,20 @@ https://github.com/user-attachments/assets/43911243-0576-4093-8c55-89c1db5ea533
|
||||
|
||||
#### Root Requirement
|
||||
|
||||
If you are using ColorOS/OxygenOS 16, you don't need root except for customizing transparency mode, setting up hearing aid, and use Bluetooth Multipoint. Changing ANC, conversational awareness, ear detection, and other customizations will work without root. For everyone else:
|
||||
|
||||
> [!CAUTION]
|
||||
> **You must have a rooted device with Xposed to use LibrePods on Android.** This is due to a [bug in the Android Bluetooth stack](https://issuetracker.google.com/issues/371713238). Please upvote the issue by clicking the '+1' icon on the IssueTracker page.
|
||||
> **You must have a rooted device with Xposed to use LibrePods on Android.** This is due to a [bug in the Android Bluetooth stack](https://issuetracker.google.com/issues/371713238). Please upvote the issue by clicking the '+1' icon on the IssueTracker page. DO NOT leave a +1 comment - use the +1 button in the top right of the page next to the "Hotlists" field. Leaving +1 comment spam makes it impossible for developers to engage in the necessary technical discussion to implement this fix, and will disincentivize the responsible Google developers from engaging. I don't know a fix for Android versions <13 either. So, this needs a phone running A13+.
|
||||
>
|
||||
> There are **no exceptions** to the root requirement until Google merges the fix.
|
||||
> There are **no exceptions** to the root requirement until Google/your OEM figures out a fix.
|
||||
|
||||
Until then, you must xposed. I used to provide a non-xposed method too, where the module used overlayfs to replace the bluetooth library with a locally patched one, but that was broken due to how various devices handled overlayfs and a patched library. With xposed, you can also enable the DID hook enabling a few extra features.
|
||||
|
||||
## Bluetooth DID (Device Identification) Hook
|
||||
## Changing VendorID in the DID profile to that of Apple
|
||||
|
||||
Turns out, if you change the manufacturerid to that of Apple, you get access to several special features!
|
||||
Turns out, if you change the VendorID in DID Profile to that of Apple, you get access to several special features!
|
||||
|
||||
You can do this on Linux by editing the DeviceID in `/etc/bluetooth/main.conf`. Add this line to the config file `DeviceID = bluetooth:004C:0000:0000`. For android you can enable the `act as Apple device` setting in the app's settings.
|
||||
|
||||
### Multi-device Connectivity
|
||||
|
||||
@@ -96,13 +87,11 @@ Upto two devices can be simultaneously connected to AirPods, for audio and contr
|
||||
|
||||
Accessibility settings like customizing transparency mode (amplification, balance, tone, conversation boost, and ambient noise reduction), and loud sound reduction can be configured.
|
||||
|
||||
All hearing aid customizations can be done from Android, including setting the audiogram result. The app doesn't provide a way to take a hearing test because it requires much more precision. It is much better to use an already available audiogram result.
|
||||
|
||||
To enable these features, enable App Settings -> `act as Apple Device`.
|
||||
All hearing aid customizations can be done from Android (linux soon), including setting the audiogram result. The app doesn't provide a way to take a hearing test because it requires much more precision. It is much better to use an already available audiogram result.
|
||||
|
||||
#### A few notes
|
||||
|
||||
- Due to recent AirPods' firmware upgrades, you must enable `Off listening mode` to switch to `Off`. This is because in this mode, louds sounds are not reduced.
|
||||
- Due to recent AirPods' firmware upgrades, you must enable `Off listening mode` to switch to `Off`. This is because in this mode, loud sounds are not reduced.
|
||||
|
||||
- If you have take both AirPods out, the app will automatically switch to the phone speaker. But, Android might keep on trying to connect to the AirPods because the phone is still connected to them, just the A2DP profile is not connected. The app tries to disconnect the A2DP profile as soon as it detects that Android has connected again if they're not in the ear.
|
||||
|
||||
@@ -110,9 +99,32 @@ To enable these features, enable App Settings -> `act as Apple Device`.
|
||||
|
||||
- If you want the AirPods icon and battery status to show in Android Settings app, install the app as a system app by using the root module.
|
||||
|
||||
## Supporters
|
||||
|
||||
A huge thank you to everyone supporting the project!
|
||||
- @davdroman
|
||||
- @tedsalmon
|
||||
- @wiless
|
||||
- @SmartMsg
|
||||
- @lunaroyster
|
||||
- @ressiwage
|
||||
|
||||
## Special thanks
|
||||
- @tyalie for making the first documentation on the protocol! ([tyalie/AAP-Protocol-Definition](https://github.com/tyalie/AAP-Protocol-Defintion))
|
||||
- @rithvikvibhu and folks over at lagrangepoint for helping with the hearing aid feature ([gist](https://gist.github.com/rithvikvibhu/45e24bbe5ade30125f152383daf07016))
|
||||
- @devnoname120 for helping with the first root patch
|
||||
- @timgromeyer for making the first version of the linux app
|
||||
- @hackclub for hosting [High Seas](https://highseas.hackclub.com) and [Low Skies](https://low-skies.hackclub.com)!
|
||||
|
||||
## Star History
|
||||
|
||||
[](https://star-history.com/#kavishdevar/librepods&Date)
|
||||
<a href="https://www.star-history.com/#kavishdevar/librepods&type=date&legend=top-left">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=kavishdevar/librepods&type=date&theme=dark&legend=top-left" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=kavishdevar/librepods&type=date&legend=top-left" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=kavishdevar/librepods&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
# License
|
||||
|
||||
@@ -120,15 +132,16 @@ LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License.
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program over [here](/LICENSE). If not, see <https://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
All trademarks, logos, and brand names are the property of their respective owners. Use of them does not imply any affiliation with or endorsement by them. All AirPods images, symbols, and the SF Pro font are the property of Apple Inc.
|
||||
|
||||
@@ -12,9 +12,9 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "me.kavishdevar.librepods"
|
||||
minSdk = 28
|
||||
minSdk = 33
|
||||
targetSdk = 36
|
||||
versionCode = 8
|
||||
versionCode = 9
|
||||
versionName = "0.2.0"
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ android {
|
||||
compose = true
|
||||
viewBinding = true
|
||||
}
|
||||
androidResources {
|
||||
generateLocaleConfig = true
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path = file("src/main/cpp/CMakeLists.txt")
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"
|
||||
tools:ignore="ForegroundServicesPolicy" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
|
||||
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
@@ -156,10 +156,6 @@ class MainActivity : ComponentActivity() {
|
||||
|
||||
setContent {
|
||||
LibrePodsTheme {
|
||||
getSharedPreferences("settings", MODE_PRIVATE).edit {
|
||||
putLong(
|
||||
"textColor",
|
||||
MaterialTheme.colorScheme.onSurface.toArgb().toLong())}
|
||||
Main()
|
||||
}
|
||||
}
|
||||
@@ -381,7 +377,7 @@ fun Main() {
|
||||
TroubleshootingScreen(navController)
|
||||
}
|
||||
composable("head_tracking") {
|
||||
HeadTrackingScreen(navController)
|
||||
HeadTrackingScreen()
|
||||
}
|
||||
composable("onboarding") {
|
||||
Onboarding(navController, context)
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:Suppress("unused")
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
@@ -472,7 +472,12 @@ fun StyledToggle(
|
||||
val attManager = ServiceManager.getService()?.attManager ?: return
|
||||
val isDarkTheme = isSystemInDarkTheme()
|
||||
val textColor = if (isDarkTheme) Color.White else Color.Black
|
||||
val checkedValue = attManager.read(attHandle).getOrNull(0)?.toInt()
|
||||
val checkedValue = try {
|
||||
attManager.read(attHandle).getOrNull(0)?.toInt()
|
||||
} catch (e: Exception) {
|
||||
Log.w("StyledToggle", "Error reading initial value for $label: ${e.message}")
|
||||
null
|
||||
} ?: 0
|
||||
var checked by remember { mutableStateOf(checkedValue !=0) }
|
||||
var backgroundColor by remember { mutableStateOf(if (isDarkTheme) Color(0xFF1C1C1E) else Color(0xFFFFFFFF)) }
|
||||
val animatedBackgroundColor by animateColorAsState(targetValue = backgroundColor, animationSpec = tween(durationMillis = 500))
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.composables
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.constants
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.constants
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
@@ -160,9 +160,9 @@ fun AccessibilitySettingsScreen(navController: NavController) {
|
||||
val mediaEQEnabled = remember { mutableStateOf(false) }
|
||||
|
||||
val pressSpeedOptions = mapOf(
|
||||
0.toByte() to "Default",
|
||||
1.toByte() to "Slower",
|
||||
2.toByte() to "Slowest"
|
||||
0.toByte() to stringResource(R.string.default_option),
|
||||
1.toByte() to stringResource(R.string.slower),
|
||||
2.toByte() to stringResource(R.string.slowest)
|
||||
)
|
||||
val selectedPressSpeedValue =
|
||||
aacpManager?.controlCommandStatusList?.find { it.identifier == AACPManager.Companion.ControlCommandIdentifiers.DOUBLE_CLICK_INTERVAL }?.value?.takeIf { it.isNotEmpty() }
|
||||
@@ -196,9 +196,9 @@ fun AccessibilitySettingsScreen(navController: NavController) {
|
||||
}
|
||||
|
||||
val pressAndHoldDurationOptions = mapOf(
|
||||
0.toByte() to "Default",
|
||||
1.toByte() to "Slower",
|
||||
2.toByte() to "Slowest"
|
||||
0.toByte() to stringResource(R.string.default_option),
|
||||
1.toByte() to stringResource(R.string.slower),
|
||||
2.toByte() to stringResource(R.string.slowest)
|
||||
)
|
||||
val selectedPressAndHoldDurationValue =
|
||||
aacpManager?.controlCommandStatusList?.find { it.identifier == AACPManager.Companion.ControlCommandIdentifiers.CLICK_HOLD_INTERVAL }?.value?.takeIf { it.isNotEmpty() }
|
||||
@@ -234,9 +234,9 @@ fun AccessibilitySettingsScreen(navController: NavController) {
|
||||
}
|
||||
|
||||
val volumeSwipeSpeedOptions = mapOf(
|
||||
1.toByte() to "Default",
|
||||
2.toByte() to "Longer",
|
||||
3.toByte() to "Longest"
|
||||
1.toByte() to stringResource(R.string.default_option),
|
||||
2.toByte() to stringResource(R.string.longer),
|
||||
3.toByte() to stringResource(R.string.longest)
|
||||
)
|
||||
val selectedVolumeSwipeSpeedValue =
|
||||
aacpManager?.controlCommandStatusList?.find { it.identifier == AACPManager.Companion.ControlCommandIdentifiers.VOLUME_SWIPE_INTERVAL }?.value?.takeIf { it.isNotEmpty() }
|
||||
@@ -322,7 +322,7 @@ fun AccessibilitySettingsScreen(navController: NavController) {
|
||||
label = stringResource(R.string.press_speed),
|
||||
description = stringResource(R.string.press_speed_description),
|
||||
options = pressSpeedOptions.values.toList(),
|
||||
selectedOption = selectedPressSpeed?: "Default",
|
||||
selectedOption = selectedPressSpeed?: stringResource(R.string.default_option),
|
||||
onOptionSelected = { newValue ->
|
||||
selectedPressSpeed = newValue
|
||||
aacpManager?.sendControlCommand(
|
||||
@@ -340,7 +340,7 @@ fun AccessibilitySettingsScreen(navController: NavController) {
|
||||
label = stringResource(R.string.press_and_hold_duration),
|
||||
description = stringResource(R.string.press_and_hold_duration_description),
|
||||
options = pressAndHoldDurationOptions.values.toList(),
|
||||
selectedOption = selectedPressAndHoldDuration?: "Default",
|
||||
selectedOption = selectedPressAndHoldDuration?: stringResource(R.string.default_option),
|
||||
onOptionSelected = { newValue ->
|
||||
selectedPressAndHoldDuration = newValue
|
||||
aacpManager?.sendControlCommand(
|
||||
@@ -403,7 +403,7 @@ fun AccessibilitySettingsScreen(navController: NavController) {
|
||||
label = stringResource(R.string.volume_swipe_speed),
|
||||
description = stringResource(R.string.volume_swipe_speed_description),
|
||||
options = volumeSwipeSpeedOptions.values.toList(),
|
||||
selectedOption = selectedVolumeSwipeSpeed?: "Default",
|
||||
selectedOption = selectedVolumeSwipeSpeed?: stringResource(R.string.default_option),
|
||||
onOptionSelected = { newValue ->
|
||||
selectedVolumeSwipeSpeed = newValue
|
||||
aacpManager?.sendControlCommand(
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
@@ -218,7 +218,9 @@ fun AirPodsSettingsScreen(dev: BluetoothDevice?, service: AirPodsService,
|
||||
val darkMode = isSystemInDarkTheme()
|
||||
val hazeStateS = remember { mutableStateOf(HazeState()) }
|
||||
|
||||
val showDialog = remember { mutableStateOf(!sharedPreferences.getBoolean("donationDialogShown", false)) }
|
||||
// val showDialog = remember { mutableStateOf(!sharedPreferences.getBoolean("donationDialogShown", false)) }
|
||||
|
||||
val showDialog = remember { mutableStateOf(false) }
|
||||
|
||||
StyledScaffold(
|
||||
title = deviceName.text,
|
||||
@@ -384,7 +386,7 @@ fun AirPodsSettingsScreen(dev: BluetoothDevice?, service: AirPodsService,
|
||||
.fillMaxWidth(0.9f)
|
||||
) {
|
||||
Text(
|
||||
text = "Troubleshoot Connection",
|
||||
text = stringResource(R.string.troubleshooting),
|
||||
style = TextStyle(
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.Medium,
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalHazeMaterialsApi::class, ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
// this is absolutely unnecessary, why did I make this. a simple toggle would've sufficed
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
@@ -83,7 +86,6 @@ import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.navigation.NavController
|
||||
import com.kyant.backdrop.backdrops.layerBackdrop
|
||||
import com.kyant.backdrop.backdrops.rememberLayerBackdrop
|
||||
import dev.chrisbanes.haze.hazeSource
|
||||
@@ -108,7 +110,7 @@ import kotlin.random.Random
|
||||
@RequiresApi(Build.VERSION_CODES.Q)
|
||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalAnimationApi::class)
|
||||
@Composable
|
||||
fun HeadTrackingScreen(navController: NavController) {
|
||||
fun HeadTrackingScreen() {
|
||||
DisposableEffect(Unit) {
|
||||
ServiceManager.getService()?.startHeadTracking()
|
||||
onDispose {
|
||||
@@ -743,5 +745,5 @@ private fun AccelerationPlot() {
|
||||
@Preview
|
||||
@Composable
|
||||
fun HeadTrackingScreenPreview() {
|
||||
HeadTrackingScreen(navController = NavController(LocalContext.current))
|
||||
HeadTrackingScreen()
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
@@ -96,13 +96,10 @@ fun HearingAidAdjustmentsScreen(@Suppress("unused") navController: NavController
|
||||
val toneSliderValue = remember { mutableFloatStateOf(0.5f) }
|
||||
val ambientNoiseReductionSliderValue = remember { mutableFloatStateOf(0.0f) }
|
||||
val conversationBoostEnabled = remember { mutableStateOf(false) }
|
||||
val eq = remember { mutableStateOf(FloatArray(8)) }
|
||||
val leftEQ = remember { mutableStateOf(FloatArray(8)) }
|
||||
val rightEQ = remember { mutableStateOf(FloatArray(8)) }
|
||||
val ownVoiceAmplification = remember { mutableFloatStateOf(0.5f) }
|
||||
|
||||
val phoneMediaEQ = remember { mutableStateOf(FloatArray(8) { 0.5f }) }
|
||||
val phoneEQEnabled = remember { mutableStateOf(false) }
|
||||
val mediaEQEnabled = remember { mutableStateOf(false) }
|
||||
|
||||
val initialLoadComplete = remember { mutableStateOf(false) }
|
||||
|
||||
val initialReadSucceeded = remember { mutableStateOf(false) }
|
||||
@@ -111,8 +108,8 @@ fun HearingAidAdjustmentsScreen(@Suppress("unused") navController: NavController
|
||||
val hearingAidSettings = remember {
|
||||
mutableStateOf(
|
||||
HearingAidSettings(
|
||||
leftEQ = eq.value,
|
||||
rightEQ = eq.value,
|
||||
leftEQ = leftEQ.value,
|
||||
rightEQ = rightEQ.value,
|
||||
leftAmplification = amplificationSliderValue.floatValue + (0.5f - balanceSliderValue.floatValue) * amplificationSliderValue.floatValue * 2,
|
||||
rightAmplification = amplificationSliderValue.floatValue + (balanceSliderValue.floatValue - 0.5f) * amplificationSliderValue.floatValue * 2,
|
||||
leftTone = toneSliderValue.floatValue,
|
||||
@@ -157,7 +154,8 @@ fun HearingAidAdjustmentsScreen(@Suppress("unused") navController: NavController
|
||||
toneSliderValue.floatValue = parsed.leftTone
|
||||
ambientNoiseReductionSliderValue.floatValue = parsed.leftAmbientNoiseReduction
|
||||
conversationBoostEnabled.value = parsed.leftConversationBoost
|
||||
eq.value = parsed.leftEQ.copyOf()
|
||||
leftEQ.value = parsed.leftEQ.copyOf()
|
||||
rightEQ.value = parsed.rightEQ.copyOf()
|
||||
ownVoiceAmplification.floatValue = parsed.ownVoiceAmplification
|
||||
Log.d(TAG, "Updated hearing aid settings from notification")
|
||||
} else {
|
||||
@@ -192,8 +190,8 @@ fun HearingAidAdjustmentsScreen(@Suppress("unused") navController: NavController
|
||||
}
|
||||
|
||||
hearingAidSettings.value = HearingAidSettings(
|
||||
leftEQ = eq.value,
|
||||
rightEQ = eq.value,
|
||||
leftEQ = leftEQ.value,
|
||||
rightEQ = rightEQ.value,
|
||||
leftAmplification = amplificationSliderValue.floatValue + if (balanceSliderValue.floatValue < 0) -balanceSliderValue.floatValue else 0f,
|
||||
rightAmplification = amplificationSliderValue.floatValue + if (balanceSliderValue.floatValue > 0) balanceSliderValue.floatValue else 0f,
|
||||
leftTone = toneSliderValue.floatValue,
|
||||
@@ -216,26 +214,6 @@ fun HearingAidAdjustmentsScreen(@Suppress("unused") navController: NavController
|
||||
attManager.enableNotifications(ATTHandles.HEARING_AID)
|
||||
attManager.registerListener(ATTHandles.HEARING_AID, hearingAidATTListener)
|
||||
|
||||
try {
|
||||
if (aacpManager != null) {
|
||||
Log.d(TAG, "Found AACPManager, reading cached EQ data")
|
||||
val aacpEQ = aacpManager.eqData
|
||||
if (aacpEQ.isNotEmpty()) {
|
||||
eq.value = aacpEQ.copyOf()
|
||||
phoneMediaEQ.value = aacpEQ.copyOf()
|
||||
phoneEQEnabled.value = aacpManager.eqOnPhone
|
||||
mediaEQEnabled.value = aacpManager.eqOnMedia
|
||||
Log.d(TAG, "Populated EQ from AACPManager: ${aacpEQ.toList()}")
|
||||
} else {
|
||||
Log.d(TAG, "AACPManager EQ data empty")
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "No AACPManager available")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Error reading EQ from AACPManager: ${e.message}")
|
||||
}
|
||||
|
||||
var parsedSettings: HearingAidSettings? = null
|
||||
for (attempt in 1..3) {
|
||||
initialReadAttempts.intValue = attempt
|
||||
@@ -261,7 +239,8 @@ fun HearingAidAdjustmentsScreen(@Suppress("unused") navController: NavController
|
||||
toneSliderValue.floatValue = parsedSettings.leftTone
|
||||
ambientNoiseReductionSliderValue.floatValue = parsedSettings.leftAmbientNoiseReduction
|
||||
conversationBoostEnabled.value = parsedSettings.leftConversationBoost
|
||||
eq.value = parsedSettings.leftEQ.copyOf()
|
||||
leftEQ.value = parsedSettings.leftEQ.copyOf()
|
||||
rightEQ.value = parsedSettings.rightEQ.copyOf()
|
||||
ownVoiceAmplification.floatValue = parsedSettings.ownVoiceAmplification
|
||||
initialReadSucceeded.value = true
|
||||
} else {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalStdlibApi::class, ExperimentalEncodingApi::class)
|
||||
|
||||
@@ -186,7 +186,7 @@ fun LongPress(navController: NavController, name: String) {
|
||||
listeningModeItems.add(
|
||||
SelectItem(
|
||||
name = stringResource(R.string.off),
|
||||
description = "Turns off noise management",
|
||||
description = stringResource(R.string.listening_mode_off_description),
|
||||
iconRes = R.drawable.noise_cancellation,
|
||||
selected = (currentByte and 0x01) != 0,
|
||||
onClick = {
|
||||
@@ -212,7 +212,7 @@ fun LongPress(navController: NavController, name: String) {
|
||||
listeningModeItems.addAll(listOf(
|
||||
SelectItem(
|
||||
name = stringResource(R.string.transparency),
|
||||
description = "Lets in external sounds",
|
||||
description = stringResource(R.string.listening_mode_transparency_description),
|
||||
iconRes = R.drawable.transparency,
|
||||
selected = (currentByte and 0x04) != 0,
|
||||
onClick = {
|
||||
@@ -235,7 +235,7 @@ fun LongPress(navController: NavController, name: String) {
|
||||
),
|
||||
SelectItem(
|
||||
name = stringResource(R.string.adaptive),
|
||||
description = "Dynamically adjust external noise",
|
||||
description = stringResource(R.string.listening_mode_adaptive_description),
|
||||
iconRes = R.drawable.adaptive,
|
||||
selected = (currentByte and 0x08) != 0,
|
||||
onClick = {
|
||||
@@ -258,7 +258,7 @@ fun LongPress(navController: NavController, name: String) {
|
||||
),
|
||||
SelectItem(
|
||||
name = stringResource(R.string.noise_cancellation),
|
||||
description = "Blocks out external sounds",
|
||||
description = stringResource(R.string.listening_mode_noise_cancellation_description),
|
||||
iconRes = R.drawable.noise_cancellation,
|
||||
selected = (currentByte and 0x02) != 0,
|
||||
onClick = {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.util.Log
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -39,11 +40,13 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.DisposableEffect
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.MutableState
|
||||
import androidx.compose.runtime.mutableFloatStateOf
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.Font
|
||||
@@ -62,7 +65,6 @@ import kotlinx.coroutines.delay
|
||||
import me.kavishdevar.librepods.R
|
||||
import me.kavishdevar.librepods.composables.StyledScaffold
|
||||
import me.kavishdevar.librepods.services.ServiceManager
|
||||
import me.kavishdevar.librepods.utils.AACPManager
|
||||
import me.kavishdevar.librepods.utils.ATTHandles
|
||||
import me.kavishdevar.librepods.utils.HearingAidSettings
|
||||
import me.kavishdevar.librepods.utils.parseHearingAidSettingsResponse
|
||||
@@ -91,7 +93,6 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
return
|
||||
}
|
||||
|
||||
val aacpManager = remember { ServiceManager.getService()?.aacpManager }
|
||||
val backdrop = rememberLayerBackdrop()
|
||||
StyledScaffold(
|
||||
title = stringResource(R.string.hearing_test)
|
||||
@@ -105,16 +106,25 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
.padding(horizontal = 16.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp)
|
||||
) {
|
||||
val textColor = if (isSystemInDarkTheme()) Color.White else Color.Black
|
||||
|
||||
Spacer(modifier = Modifier.height(spacerHeight))
|
||||
|
||||
Text(
|
||||
text = stringResource(R.string.hearing_test_value_instruction),
|
||||
fontSize = 16.sp,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
style = TextStyle(
|
||||
fontSize = 16.sp,
|
||||
color = textColor,
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro))
|
||||
),
|
||||
textAlign = TextAlign.Center,
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro))
|
||||
)
|
||||
|
||||
val tone = remember { mutableFloatStateOf(0.5f) }
|
||||
val ambientNoiseReduction = remember { mutableFloatStateOf(0.0f) }
|
||||
val ownVoiceAmplification = remember { mutableFloatStateOf(0.5f) }
|
||||
val leftAmplification = remember { mutableFloatStateOf(0.5f) }
|
||||
val rightAmplification = remember { mutableFloatStateOf(0.5f) }
|
||||
val conversationBoostEnabled = remember { mutableStateOf(false) }
|
||||
val leftEQ = remember { mutableStateOf(FloatArray(8)) }
|
||||
val rightEQ = remember { mutableStateOf(FloatArray(8)) }
|
||||
@@ -128,40 +138,21 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
HearingAidSettings(
|
||||
leftEQ = leftEQ.value,
|
||||
rightEQ = rightEQ.value,
|
||||
leftAmplification = 0.5f,
|
||||
rightAmplification = 0.5f,
|
||||
leftTone = 0.5f,
|
||||
rightTone = 0.5f,
|
||||
leftAmplification = leftAmplification.value,
|
||||
rightAmplification = rightAmplification.value,
|
||||
leftTone = tone.value,
|
||||
rightTone = tone.value,
|
||||
leftConversationBoost = conversationBoostEnabled.value,
|
||||
rightConversationBoost = conversationBoostEnabled.value,
|
||||
leftAmbientNoiseReduction = 0.0f,
|
||||
rightAmbientNoiseReduction = 0.0f,
|
||||
netAmplification = 0.5f,
|
||||
balance = 0.5f,
|
||||
ownVoiceAmplification = 0.5f
|
||||
leftAmbientNoiseReduction = ambientNoiseReduction.value,
|
||||
rightAmbientNoiseReduction = ambientNoiseReduction.value,
|
||||
netAmplification = leftAmplification.value + rightAmplification.value / 2,
|
||||
balance = 0.5f + (rightAmplification.value - leftAmplification.value) / 2,
|
||||
ownVoiceAmplification = ownVoiceAmplification.value
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
val hearingAidEnabled = remember {
|
||||
val aidStatus = aacpManager?.controlCommandStatusList?.find { it.identifier == AACPManager.Companion.ControlCommandIdentifiers.HEARING_AID }
|
||||
val assistStatus = aacpManager?.controlCommandStatusList?.find { it.identifier == AACPManager.Companion.ControlCommandIdentifiers.HEARING_ASSIST_CONFIG }
|
||||
mutableStateOf((aidStatus?.value?.getOrNull(1) == 0x01.toByte()) && (assistStatus?.value?.getOrNull(0) == 0x01.toByte()))
|
||||
}
|
||||
|
||||
val hearingAidListener = remember {
|
||||
object : AACPManager.ControlCommandListener {
|
||||
override fun onControlCommandReceived(controlCommand: AACPManager.ControlCommand) {
|
||||
if (controlCommand.identifier == AACPManager.Companion.ControlCommandIdentifiers.HEARING_AID.value ||
|
||||
controlCommand.identifier == AACPManager.Companion.ControlCommandIdentifiers.HEARING_ASSIST_CONFIG.value) {
|
||||
val aidStatus = aacpManager?.controlCommandStatusList?.find { it.identifier == AACPManager.Companion.ControlCommandIdentifiers.HEARING_AID }
|
||||
val assistStatus = aacpManager?.controlCommandStatusList?.find { it.identifier == AACPManager.Companion.ControlCommandIdentifiers.HEARING_ASSIST_CONFIG }
|
||||
hearingAidEnabled.value = (aidStatus?.value?.getOrNull(1) == 0x01.toByte()) && (assistStatus?.value?.getOrNull(0) == 0x01.toByte())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val hearingAidATTListener = remember {
|
||||
object : (ByteArray) -> Unit {
|
||||
override fun invoke(value: ByteArray) {
|
||||
@@ -170,6 +161,11 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
leftEQ.value = parsed.leftEQ.copyOf()
|
||||
rightEQ.value = parsed.rightEQ.copyOf()
|
||||
conversationBoostEnabled.value = parsed.leftConversationBoost
|
||||
tone.value = parsed.leftTone
|
||||
ambientNoiseReduction.value = parsed.leftAmbientNoiseReduction
|
||||
ownVoiceAmplification.value = parsed.ownVoiceAmplification
|
||||
leftAmplification.value = parsed.leftAmplification
|
||||
rightAmplification.value = parsed.rightAmplification
|
||||
Log.d(TAG, "Updated hearing aid settings from notification")
|
||||
} else {
|
||||
Log.w(TAG, "Failed to parse hearing aid settings from notification")
|
||||
@@ -178,20 +174,14 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
aacpManager?.registerControlCommandListener(AACPManager.Companion.ControlCommandIdentifiers.HEARING_AID, hearingAidListener)
|
||||
aacpManager?.registerControlCommandListener(AACPManager.Companion.ControlCommandIdentifiers.HEARING_ASSIST_CONFIG, hearingAidListener)
|
||||
}
|
||||
|
||||
DisposableEffect(Unit) {
|
||||
onDispose {
|
||||
aacpManager?.unregisterControlCommandListener(AACPManager.Companion.ControlCommandIdentifiers.HEARING_AID, hearingAidListener)
|
||||
aacpManager?.unregisterControlCommandListener(AACPManager.Companion.ControlCommandIdentifiers.HEARING_ASSIST_CONFIG, hearingAidListener)
|
||||
attManager.unregisterListener(ATTHandles.HEARING_AID, hearingAidATTListener)
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(leftEQ.value, rightEQ.value, conversationBoostEnabled.value, initialLoadComplete.value, initialReadSucceeded.value) {
|
||||
LaunchedEffect(leftEQ.value, rightEQ.value, conversationBoostEnabled.value, initialLoadComplete.value, initialReadSucceeded.value, leftAmplification.value, rightAmplification.value, tone.value, ambientNoiseReduction.value, ownVoiceAmplification.value) {
|
||||
if (!initialLoadComplete.value) {
|
||||
Log.d(TAG, "Initial device load not complete - skipping send")
|
||||
return@LaunchedEffect
|
||||
@@ -205,17 +195,17 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
hearingAidSettings.value = HearingAidSettings(
|
||||
leftEQ = leftEQ.value,
|
||||
rightEQ = rightEQ.value,
|
||||
leftAmplification = 0.5f,
|
||||
rightAmplification = 0.5f,
|
||||
leftTone = 0.5f,
|
||||
rightTone = 0.5f,
|
||||
leftAmplification = leftAmplification.value,
|
||||
rightAmplification = rightAmplification.value,
|
||||
leftTone = tone.value,
|
||||
rightTone = tone.value,
|
||||
leftConversationBoost = conversationBoostEnabled.value,
|
||||
rightConversationBoost = conversationBoostEnabled.value,
|
||||
leftAmbientNoiseReduction = 0.0f,
|
||||
rightAmbientNoiseReduction = 0.0f,
|
||||
netAmplification = 0.5f,
|
||||
balance = 0.5f,
|
||||
ownVoiceAmplification = 0.5f
|
||||
leftAmbientNoiseReduction = ambientNoiseReduction.value,
|
||||
rightAmbientNoiseReduction = ambientNoiseReduction.value,
|
||||
netAmplification = leftAmplification.value + rightAmplification.value / 2,
|
||||
balance = 0.5f + (rightAmplification.value - leftAmplification.value) / 2,
|
||||
ownVoiceAmplification = ownVoiceAmplification.value
|
||||
)
|
||||
Log.d(TAG, "Updated settings: ${hearingAidSettings.value}")
|
||||
sendHearingAidSettings(attManager, hearingAidSettings.value, debounceJob)
|
||||
@@ -227,24 +217,6 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
attManager.enableNotifications(ATTHandles.HEARING_AID)
|
||||
attManager.registerListener(ATTHandles.HEARING_AID, hearingAidATTListener)
|
||||
|
||||
try {
|
||||
if (aacpManager != null) {
|
||||
Log.d(TAG, "Found AACPManager, reading cached EQ data")
|
||||
val aacpEQ = aacpManager.eqData
|
||||
if (aacpEQ.isNotEmpty()) {
|
||||
leftEQ.value = aacpEQ.copyOf()
|
||||
rightEQ.value = aacpEQ.copyOf()
|
||||
Log.d(TAG, "Populated EQ from AACPManager: ${aacpEQ.toList()}")
|
||||
} else {
|
||||
Log.d(TAG, "AACPManager EQ data empty")
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "No AACPManager available")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Error reading EQ from AACPManager: ${e.message}")
|
||||
}
|
||||
|
||||
var parsedSettings: HearingAidSettings? = null
|
||||
for (attempt in 1..3) {
|
||||
initialReadAttempts.intValue = attempt
|
||||
@@ -268,6 +240,11 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
leftEQ.value = parsedSettings.leftEQ.copyOf()
|
||||
rightEQ.value = parsedSettings.rightEQ.copyOf()
|
||||
conversationBoostEnabled.value = parsedSettings.leftConversationBoost
|
||||
tone.value = parsedSettings.leftTone
|
||||
ambientNoiseReduction.value = parsedSettings.leftAmbientNoiseReduction
|
||||
ownVoiceAmplification.value = parsedSettings.ownVoiceAmplification
|
||||
leftAmplification.value = parsedSettings.leftAmplification
|
||||
rightAmplification.value = parsedSettings.rightAmplification
|
||||
initialReadSucceeded.value = true
|
||||
} else {
|
||||
Log.d(TAG, "Failed to read/parse initial hearing aid settings after ${initialReadAttempts.intValue} attempts")
|
||||
@@ -288,17 +265,23 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
Spacer(modifier = Modifier.width(60.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.left),
|
||||
fontSize = 18.sp,
|
||||
modifier = Modifier.weight(1f),
|
||||
textAlign = TextAlign.Center,
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro))
|
||||
style = TextStyle(
|
||||
fontSize = 18.sp,
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro)),
|
||||
color = textColor
|
||||
)
|
||||
)
|
||||
Text(
|
||||
text = stringResource(R.string.right),
|
||||
fontSize = 18.sp,
|
||||
modifier = Modifier.weight(1f),
|
||||
textAlign = TextAlign.Center,
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro))
|
||||
style = TextStyle(
|
||||
fontSize = 18.sp,
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro)),
|
||||
color = textColor
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -313,8 +296,11 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
.width(60.dp)
|
||||
.align(Alignment.CenterVertically),
|
||||
textAlign = TextAlign.End,
|
||||
fontSize = 16.sp,
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro)),
|
||||
style = TextStyle(
|
||||
color = textColor,
|
||||
fontSize = 16.sp,
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro))
|
||||
),
|
||||
)
|
||||
OutlinedTextField(
|
||||
value = leftEQ.value[index].toString(),
|
||||
@@ -324,10 +310,11 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
val newArray = leftEQ.value.copyOf()
|
||||
newArray[index] = parsed
|
||||
leftEQ.value = newArray
|
||||
Log.d(TAG, "Left EQ updated at index $index to $parsed")
|
||||
}
|
||||
},
|
||||
// label = { Text("Value", fontSize = 14.sp, fontFamily = FontFamily(Font(R.font.sf_pro))) },
|
||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
|
||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal),
|
||||
textStyle = TextStyle(
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro)),
|
||||
fontSize = 14.sp
|
||||
@@ -342,10 +329,11 @@ fun UpdateHearingTestScreen(@Suppress("unused") navController: NavController) {
|
||||
val newArray = rightEQ.value.copyOf()
|
||||
newArray[index] = parsed
|
||||
rightEQ.value = newArray
|
||||
Log.d(TAG, "Right EQ updated at index $index to $parsed")
|
||||
}
|
||||
},
|
||||
// label = { Text("Value", fontSize = 14.sp, fontFamily = FontFamily(Font(R.font.sf_pro))) },
|
||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
|
||||
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal),
|
||||
textStyle = TextStyle(
|
||||
fontFamily = FontFamily(Font(R.font.sf_pro)),
|
||||
fontSize = 14.sp
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.screens
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
@file:Suppress("DEPRECATION")
|
||||
@@ -93,8 +93,8 @@ import me.kavishdevar.librepods.utils.AirPodsInstance
|
||||
import me.kavishdevar.librepods.utils.AirPodsModels
|
||||
import me.kavishdevar.librepods.utils.BLEManager
|
||||
import me.kavishdevar.librepods.utils.BluetoothConnectionManager
|
||||
import me.kavishdevar.librepods.utils.CrossDevice
|
||||
import me.kavishdevar.librepods.utils.CrossDevicePackets
|
||||
//import me.kavishdevar.librepods.utils.CrossDevice
|
||||
//import me.kavishdevar.librepods.utils.CrossDevicePackets
|
||||
import me.kavishdevar.librepods.utils.GestureDetector
|
||||
import me.kavishdevar.librepods.utils.HeadTracking
|
||||
import me.kavishdevar.librepods.utils.IslandType
|
||||
@@ -167,7 +167,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
var headGestures: Boolean = true,
|
||||
var disconnectWhenNotWearing: Boolean = false,
|
||||
var conversationalAwarenessVolume: Int = 43,
|
||||
var textColor: Long = -1L,
|
||||
var qsClickBehavior: String = "cycle",
|
||||
var bleOnlyMode: Boolean = false,
|
||||
|
||||
@@ -193,7 +192,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
var leftLongPressAction: StemAction = StemAction.defaultActions[StemPressType.LONG_PRESS]!!,
|
||||
var rightLongPressAction: StemAction = StemAction.defaultActions[StemPressType.LONG_PRESS]!!,
|
||||
|
||||
var cameraAction: AACPManager.Companion.StemPressType? = null,
|
||||
var cameraAction: StemPressType? = null,
|
||||
|
||||
// AirPods device information
|
||||
var airpodsName: String = "",
|
||||
@@ -207,6 +206,9 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
var airpodsVersion3: String = "",
|
||||
var airpodsHardwareRevision: String = "",
|
||||
var airpodsUpdaterIdentifier: String = "",
|
||||
|
||||
// phone's mac, needed for tipi
|
||||
var selfMacAddress: String = ""
|
||||
)
|
||||
|
||||
private lateinit var config: ServiceConfig
|
||||
@@ -368,9 +370,29 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
|
||||
sharedPreferences.registerOnSharedPreferenceChangeListener(this)
|
||||
|
||||
val process = Runtime.getRuntime().exec(arrayOf("su", "-c", "settings", "get", "secure", "bluetooth_address"))
|
||||
val output = process.inputStream.bufferedReader().use { it.readLine() }
|
||||
localMac = output.trim()
|
||||
localMac = config.selfMacAddress
|
||||
if (localMac.isEmpty()) {
|
||||
localMac = try {
|
||||
val process = Runtime.getRuntime().exec(
|
||||
arrayOf("su", "-c", "settings get secure bluetooth_address")
|
||||
)
|
||||
|
||||
val exitCode = process.waitFor()
|
||||
|
||||
if (exitCode == 0) {
|
||||
process.inputStream.bufferedReader().use { it.readLine()?.trim().orEmpty() }
|
||||
} else {
|
||||
""
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Error retrieving local MAC address: ${e.message}. We probably aren't rooted.")
|
||||
""
|
||||
}
|
||||
config.selfMacAddress = localMac
|
||||
sharedPreferences.edit {
|
||||
putString("self_mac_address", localMac)
|
||||
}
|
||||
}
|
||||
|
||||
ServiceManager.setService(this)
|
||||
startForegroundNotification()
|
||||
@@ -453,8 +475,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
43
|
||||
)
|
||||
|
||||
if (!contains("textColor")) putLong("textColor", -1L)
|
||||
|
||||
if (!contains("qs_click_behavior")) putString("qs_click_behavior", "cycle")
|
||||
if (!contains("name")) putString("name", "AirPods")
|
||||
|
||||
@@ -556,11 +576,11 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
MODE_PRIVATE
|
||||
)
|
||||
)
|
||||
Log.d(TAG, "Initializing CrossDevice")
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
CrossDevice.init(this@AirPodsService)
|
||||
Log.d(TAG, "CrossDevice initialized")
|
||||
}
|
||||
// Log.d(TAG, "Initializing CrossDevice")
|
||||
// CoroutineScope(Dispatchers.IO).launch {
|
||||
// CrossDevice.init(this@AirPodsService)
|
||||
// Log.d(TAG, "CrossDevice initialized")
|
||||
// }
|
||||
|
||||
sharedPreferences = getSharedPreferences("settings", MODE_PRIVATE)
|
||||
macAddress = sharedPreferences.getString("mac_address", "") ?: ""
|
||||
@@ -573,7 +593,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
when (state) {
|
||||
TelephonyManager.CALL_STATE_RINGING -> {
|
||||
val leAvailableForAudio = bleManager.getMostRecentStatus()?.isLeftInEar == true || bleManager.getMostRecentStatus()?.isRightInEar == true
|
||||
if ((CrossDevice.isAvailable && !isConnectedLocally && earDetectionNotification.status.contains(0x00)) || leAvailableForAudio) CoroutineScope(Dispatchers.IO).launch {
|
||||
// if ((CrossDevice.isAvailable && !isConnectedLocally && earDetectionNotification.status.contains(0x00)) || leAvailableForAudio) CoroutineScope(Dispatchers.IO).launch {
|
||||
if (leAvailableForAudio) runBlocking {
|
||||
takeOver("call")
|
||||
}
|
||||
if (config.headGestures) {
|
||||
@@ -583,7 +604,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
}
|
||||
TelephonyManager.CALL_STATE_OFFHOOK -> {
|
||||
val leAvailableForAudio = bleManager.getMostRecentStatus()?.isLeftInEar == true || bleManager.getMostRecentStatus()?.isRightInEar == true
|
||||
if ((CrossDevice.isAvailable && !isConnectedLocally && earDetectionNotification.status.contains(0x00)) || leAvailableForAudio) CoroutineScope(
|
||||
// if ((CrossDevice.isAvailable && !isConnectedLocally && earDetectionNotification.status.contains(0x00)) || leAvailableForAudio) CoroutineScope(
|
||||
if (leAvailableForAudio) CoroutineScope(
|
||||
Dispatchers.IO).launch {
|
||||
takeOver("call")
|
||||
}
|
||||
@@ -641,8 +663,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
sharedPreferences.edit { putString("name", config.deviceName) }
|
||||
}
|
||||
|
||||
Log.d("AirPodsCrossDevice", CrossDevice.isAvailable.toString())
|
||||
if (!CrossDevice.isAvailable) {
|
||||
// Log.d("AirPodsCrossDevice", CrossDevice.isAvailable.toString())
|
||||
// if (!CrossDevice.isAvailable) {
|
||||
Log.d(TAG, "${config.deviceName} connected")
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
connectToSocket(device!!)
|
||||
@@ -654,7 +676,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
sharedPreferences.edit {
|
||||
putString("mac_address", macAddress)
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
} else if (intent?.action == AirPodsNotifications.AIRPODS_DISCONNECTED) {
|
||||
device = null
|
||||
isConnectedLocally = false
|
||||
@@ -719,7 +742,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
if (profile == BluetoothProfile.A2DP) {
|
||||
val connectedDevices = proxy.connectedDevices
|
||||
if (connectedDevices.isNotEmpty()) {
|
||||
if (!CrossDevice.isAvailable) {
|
||||
// if (!CrossDevice.isAvailable) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
connectToSocket(device)
|
||||
}
|
||||
@@ -728,7 +751,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
sharedPreferences.edit {
|
||||
putString("mac_address", macAddress)
|
||||
}
|
||||
}
|
||||
// }
|
||||
this@AirPodsService.sendBroadcast(
|
||||
Intent(AirPodsNotifications.AIRPODS_CONNECTED)
|
||||
)
|
||||
@@ -745,9 +768,9 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
}
|
||||
}
|
||||
|
||||
if (!isConnectedLocally && !CrossDevice.isAvailable) {
|
||||
clearPacketLogs()
|
||||
}
|
||||
// if (!isConnectedLocally && !CrossDevice.isAvailable) {
|
||||
// clearPacketLogs()
|
||||
// }
|
||||
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
bleManager.startScanning()
|
||||
@@ -819,8 +842,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
.getString("name", device?.name),
|
||||
batteryNotification.getBattery()
|
||||
)
|
||||
CrossDevice.sendRemotePacket(batteryInfo)
|
||||
CrossDevice.batteryBytes = batteryInfo
|
||||
// CrossDevice.sendRemotePacket(batteryInfo)
|
||||
// CrossDevice.batteryBytes = batteryInfo
|
||||
|
||||
for (battery in batteryNotification.getBattery()) {
|
||||
Log.d(
|
||||
@@ -1203,7 +1226,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
headGestures = sharedPreferences.getBoolean("head_gestures", true),
|
||||
disconnectWhenNotWearing = sharedPreferences.getBoolean("disconnect_when_not_wearing", false),
|
||||
conversationalAwarenessVolume = sharedPreferences.getInt("conversational_awareness_volume", 43),
|
||||
textColor = sharedPreferences.getLong("textColor", -1L),
|
||||
qsClickBehavior = sharedPreferences.getString("qs_click_behavior", "cycle") ?: "cycle",
|
||||
|
||||
// AirPods state-based takeover
|
||||
@@ -1229,7 +1251,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
leftLongPressAction = StemAction.fromString(sharedPreferences.getString("left_long_press_action", "CYCLE_NOISE_CONTROL_MODES") ?: "CYCLE_NOISE_CONTROL_MODES")!!,
|
||||
rightLongPressAction = StemAction.fromString(sharedPreferences.getString("right_long_press_action", "DIGITAL_ASSISTANT") ?: "DIGITAL_ASSISTANT")!!,
|
||||
|
||||
cameraAction = sharedPreferences.getString("camera_action", null)?.let { AACPManager.Companion.StemPressType.valueOf(it) },
|
||||
cameraAction = sharedPreferences.getString("camera_action", null)?.let { StemPressType.valueOf(it) },
|
||||
|
||||
// AirPods device information
|
||||
airpodsName = sharedPreferences.getString("airpods_name", "") ?: "",
|
||||
@@ -1243,6 +1265,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
airpodsVersion3 = sharedPreferences.getString("airpods_version3", "") ?: "",
|
||||
airpodsHardwareRevision = sharedPreferences.getString("airpods_hardware_revision", "") ?: "",
|
||||
airpodsUpdaterIdentifier = sharedPreferences.getString("airpods_updater_identifier", "") ?: "",
|
||||
|
||||
selfMacAddress = sharedPreferences.getString("self_mac_address", "") ?: ""
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1251,6 +1275,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
|
||||
when(key) {
|
||||
"name" -> config.deviceName = preferences.getString(key, "AirPods") ?: "AirPods"
|
||||
"mac_address" -> macAddress = preferences.getString(key, "") ?: ""
|
||||
"automatic_ear_detection" -> config.earDetectionEnabled = preferences.getBoolean(key, true)
|
||||
"conversational_awareness_pause_music" -> config.conversationalAwarenessPauseMusic = preferences.getBoolean(key, false)
|
||||
"show_phone_battery_in_widget" -> {
|
||||
@@ -1262,7 +1287,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
"head_gestures" -> config.headGestures = preferences.getBoolean(key, true)
|
||||
"disconnect_when_not_wearing" -> config.disconnectWhenNotWearing = preferences.getBoolean(key, false)
|
||||
"conversational_awareness_volume" -> config.conversationalAwarenessVolume = preferences.getInt(key, 43)
|
||||
"textColor" -> config.textColor = preferences.getLong(key, -1L)
|
||||
"qs_click_behavior" -> config.qsClickBehavior = preferences.getString(key, "cycle") ?: "cycle"
|
||||
|
||||
// AirPods state-based takeover
|
||||
@@ -1323,7 +1347,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
)!!
|
||||
setupStemActions()
|
||||
}
|
||||
"camera_action" -> config.cameraAction = preferences.getString(key, null)?.let { AACPManager.Companion.StemPressType.valueOf(it) }
|
||||
"camera_action" -> config.cameraAction = preferences.getString(key, null)?.let { StemPressType.valueOf(it) }
|
||||
|
||||
// AirPods device information
|
||||
"airpods_name" -> config.airpodsName = preferences.getString(key, "") ?: ""
|
||||
@@ -1337,10 +1361,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
"airpods_version3" -> config.airpodsVersion3 = preferences.getString(key, "") ?: ""
|
||||
"airpods_hardware_revision" -> config.airpodsHardwareRevision = preferences.getString(key, "") ?: ""
|
||||
"airpods_updater_identifier" -> config.airpodsUpdaterIdentifier = preferences.getString(key, "") ?: ""
|
||||
}
|
||||
|
||||
if (key == "mac_address") {
|
||||
macAddress = preferences.getString(key, "") ?: ""
|
||||
"self_mac_address" -> config.selfMacAddress = preferences.getString(key, "") ?: ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2096,7 +2118,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
SystemApisUtils.setMetadata(
|
||||
device,
|
||||
device.METADATA_COMPANION_APP,
|
||||
"me.kavisdevar.librepods".toByteArray()
|
||||
"me.kavishdevar.librepods".toByteArray()
|
||||
) &&
|
||||
SystemApisUtils.setMetadata(
|
||||
device,
|
||||
@@ -2139,11 +2161,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
?.getString("name", bluetoothDevice?.name)
|
||||
if (bluetoothDevice != null && action != null && !action.isEmpty()) {
|
||||
Log.d(TAG, "Received bluetooth connection broadcast: action=$action")
|
||||
if (ServiceManager.getService()?.isConnectedLocally == true) {
|
||||
Log.d(TAG, "Device is already connected locally, checking if we should keep audio connected")
|
||||
if (ServiceManager.getService()?.socket?.isConnected == true) ServiceManager.getService()?.manuallyCheckForAudioSource() else Log.d(TAG, "We're not connected, ignoring")
|
||||
return
|
||||
}
|
||||
if (BluetoothDevice.ACTION_ACL_CONNECTED == action) {
|
||||
val uuid = ParcelUuid.fromString("74ec2172-0bad-4d01-8f77-997b2be0722a")
|
||||
bluetoothDevice.fetchUuidsWithSdp()
|
||||
@@ -2178,19 +2195,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
return START_STICKY
|
||||
}
|
||||
|
||||
fun manuallyCheckForAudioSource() {
|
||||
val shouldResume = MediaController.getMusicActive() // todo: for some reason we lose this info after disconnecting, probably android dispatches some event. haven't investigated yet.
|
||||
if (airpodsInstance == null) return
|
||||
Log.d(TAG, "disconnectedBecauseReversed: $disconnectedBecauseReversed, otherDeviceTookOver: $otherDeviceTookOver")
|
||||
if ((earDetectionNotification.status[0] != 0.toByte() && earDetectionNotification.status[1] != 0.toByte()) || disconnectedBecauseReversed || otherDeviceTookOver) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"For some reason, Android connected to the audio profile itself even after disconnecting. Disconnecting audio profile again! I will resume: $shouldResume"
|
||||
)
|
||||
disconnectAudio(this, device, shouldResume = shouldResume)
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.R)
|
||||
@SuppressLint("MissingPermission", "HardwareIds")
|
||||
fun takeOver(takingOverFor: String, manualTakeOverAfterReversed: Boolean = false, startHeadTrackingAgain: Boolean = false) {
|
||||
@@ -2266,14 +2270,19 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
return
|
||||
}
|
||||
|
||||
if (CrossDevice.isAvailable) {
|
||||
Log.d(TAG, "CrossDevice is available, continuing")
|
||||
}
|
||||
else if (bleManager.getMostRecentStatus()?.isLeftInEar == true || bleManager.getMostRecentStatus()?.isRightInEar == true) {
|
||||
Log.d(TAG, "At least one AirPod is in ear, continuing")
|
||||
}
|
||||
else {
|
||||
Log.d(TAG, "CrossDevice not available and AirPods not in ear, skipping")
|
||||
// if (CrossDevice.isAvailable) {
|
||||
// Log.d(TAG, "CrossDevice is available, continuing")
|
||||
// }
|
||||
// else if (bleManager.getMostRecentStatus()?.isLeftInEar == true || bleManager.getMostRecentStatus()?.isRightInEar == true) {
|
||||
// Log.d(TAG, "At least one AirPod is in ear, continuing")
|
||||
// }
|
||||
// else {
|
||||
// Log.d(TAG, "CrossDevice not available and AirPods not in ear, skipping")
|
||||
// return
|
||||
// }
|
||||
|
||||
if (bleManager.getMostRecentStatus()?.isLeftInEar == false && bleManager.getMostRecentStatus()?.isRightInEar == false) {
|
||||
Log.d(TAG, "Both AirPods are out of ear, not taking over audio")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2312,10 +2321,10 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
}
|
||||
|
||||
Log.d(TAG, "Taking over audio")
|
||||
CrossDevice.sendRemotePacket(CrossDevicePackets.REQUEST_DISCONNECT.packet)
|
||||
// CrossDevice.sendRemotePacket(CrossDevicePackets.REQUEST_DISCONNECT.packet)
|
||||
Log.d(TAG, macAddress)
|
||||
|
||||
sharedPreferences.edit { putBoolean("CrossDeviceIsAvailable", false) }
|
||||
// sharedPreferences.edit { putBoolean("CrossDeviceIsAvailable", false) }
|
||||
device = getSystemService(BluetoothManager::class.java).adapter.bondedDevices.find {
|
||||
it.address == macAddress
|
||||
}
|
||||
@@ -2340,7 +2349,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
showIsland(this, batteryNotification.getBattery().find { it.component == BatteryComponent.LEFT}?.level!!.coerceAtMost(batteryNotification.getBattery().find { it.component == BatteryComponent.RIGHT}?.level!!),
|
||||
IslandType.TAKING_OVER)
|
||||
|
||||
CrossDevice.isAvailable = false
|
||||
// CrossDevice.isAvailable = false
|
||||
}
|
||||
|
||||
private fun createBluetoothSocket(device: BluetoothDevice, uuid: ParcelUuid): BluetoothSocket {
|
||||
@@ -2385,7 +2394,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
Log.d(TAG, "<LogCollector:Start> Connecting to socket")
|
||||
HiddenApiBypass.addHiddenApiExemptions("Landroid/bluetooth/BluetoothSocket;")
|
||||
val uuid: ParcelUuid = ParcelUuid.fromString("74ec2172-0bad-4d01-8f77-997b2be0722a")
|
||||
if (!isConnectedLocally && !CrossDevice.isAvailable) {
|
||||
if (!isConnectedLocally) {
|
||||
socket = try {
|
||||
createBluetoothSocket(device, uuid)
|
||||
} catch (e: Exception) {
|
||||
@@ -2503,7 +2512,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
})
|
||||
val bytes = buffer.copyOfRange(0, bytesRead)
|
||||
val formattedHex = bytes.joinToString(" ") { "%02X".format(it) }
|
||||
CrossDevice.sendReceivedPacket(bytes)
|
||||
// CrossDevice.sendReceivedPacket(bytes)
|
||||
updateNotificationContent(
|
||||
true,
|
||||
sharedPreferences.getString("name", device.name),
|
||||
@@ -2541,6 +2550,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
this@AirPodsService.device = device
|
||||
updateNotificationContent(false)
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "Already connected locally, skipping socket connection (isConnectedLocally = $isConnectedLocally, socket.isConnected = ${this::socket.isInitialized && socket.isConnected})")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2566,7 +2577,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
override fun onServiceDisconnected(profile: Int) {}
|
||||
}, BluetoothProfile.A2DP)
|
||||
isConnectedLocally = false
|
||||
CrossDevice.isAvailable = true
|
||||
// CrossDevice.isAvailable = true
|
||||
}
|
||||
|
||||
fun disconnectAirPods() {
|
||||
@@ -2611,20 +2622,20 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
}
|
||||
|
||||
fun getBattery(): List<Battery> {
|
||||
if (!isConnectedLocally && CrossDevice.isAvailable) {
|
||||
batteryNotification.setBattery(CrossDevice.batteryBytes)
|
||||
}
|
||||
// if (!isConnectedLocally && CrossDevice.isAvailable) {
|
||||
// batteryNotification.setBattery(CrossDevice.batteryBytes)
|
||||
// }
|
||||
return batteryNotification.getBattery()
|
||||
}
|
||||
|
||||
fun getANC(): Int {
|
||||
if (!isConnectedLocally && CrossDevice.isAvailable) {
|
||||
ancNotification.setStatus(CrossDevice.ancBytes)
|
||||
}
|
||||
// if (!isConnectedLocally && CrossDevice.isAvailable) {
|
||||
// ancNotification.setStatus(CrossDevice.ancBytes)
|
||||
// }
|
||||
return ancNotification.status
|
||||
}
|
||||
|
||||
fun disconnectAudio(context: Context, device: BluetoothDevice?, shouldResume: Boolean = false) {
|
||||
fun disconnectAudio(context: Context, device: BluetoothDevice?) {
|
||||
val bluetoothAdapter = context.getSystemService(BluetoothManager::class.java).adapter
|
||||
bluetoothAdapter?.getProfileProxy(context, object : BluetoothProfile.ServiceListener {
|
||||
override fun onServiceConnected(profile: Int, proxy: BluetoothProfile) {
|
||||
@@ -2635,13 +2646,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
return
|
||||
}
|
||||
val method =
|
||||
proxy.javaClass.getMethod("disconnect", BluetoothDevice::class.java)
|
||||
method.invoke(proxy, device)
|
||||
if (shouldResume) {
|
||||
Handler(Looper.getMainLooper()).postDelayed({
|
||||
MediaController.sendPlay()
|
||||
}, 150)
|
||||
}
|
||||
proxy.javaClass.getMethod("setConnectionPolicy", BluetoothDevice::class.java, Int::class.java)
|
||||
method.invoke(proxy, device, 0)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
} finally {
|
||||
@@ -2658,8 +2664,8 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
if (profile == BluetoothProfile.HEADSET) {
|
||||
try {
|
||||
val method =
|
||||
proxy.javaClass.getMethod("disconnect", BluetoothDevice::class.java)
|
||||
method.invoke(proxy, device)
|
||||
proxy.javaClass.getMethod("setConnectionPolicy", BluetoothDevice::class.java, Int::class.java)
|
||||
method.invoke(proxy, device, 0)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
} finally {
|
||||
@@ -2679,9 +2685,11 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
override fun onServiceConnected(profile: Int, proxy: BluetoothProfile) {
|
||||
if (profile == BluetoothProfile.A2DP) {
|
||||
try {
|
||||
val method =
|
||||
val policyMethod = proxy.javaClass.getMethod("setConnectionPolicy", BluetoothDevice::class.java, Int::class.java)
|
||||
policyMethod.invoke(proxy, device, 100)
|
||||
val connectMethod =
|
||||
proxy.javaClass.getMethod("connect", BluetoothDevice::class.java)
|
||||
method.invoke(proxy, device)
|
||||
connectMethod.invoke(proxy, device) // reduces the slight delay between allowing and actually connecting
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
} finally {
|
||||
@@ -2700,9 +2708,11 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
override fun onServiceConnected(profile: Int, proxy: BluetoothProfile) {
|
||||
if (profile == BluetoothProfile.HEADSET) {
|
||||
try {
|
||||
val method =
|
||||
val policyMethod = proxy.javaClass.getMethod("setConnectionPolicy", BluetoothDevice::class.java, Int::class.java)
|
||||
policyMethod.invoke(proxy, device, 100)
|
||||
val connectMethod =
|
||||
proxy.javaClass.getMethod("connect", BluetoothDevice::class.java)
|
||||
method.invoke(proxy, device)
|
||||
connectMethod.invoke(proxy, device)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
} finally {
|
||||
@@ -2761,7 +2771,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
|
||||
}
|
||||
telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE)
|
||||
isConnectedLocally = false
|
||||
CrossDevice.isAvailable = true
|
||||
// CrossDevice.isAvailable = true
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
package me.kavishdevar.librepods.ui.theme
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.ui.theme
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.ui.theme
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
@@ -596,7 +596,7 @@ class AACPManager {
|
||||
eqData = FloatArray(8) { i -> eq1.get(i) }
|
||||
Log.d(TAG, "EQ Data set to: ${eqData.toList()}, eqOnPhone: $eqOnPhone, eqOnMedia: $eqOnMedia")
|
||||
}
|
||||
|
||||
|
||||
Opcodes.INFORMATION -> {
|
||||
Log.e(TAG, "Parsing Information Packet")
|
||||
val information = parseInformationPacket(packet)
|
||||
@@ -1201,7 +1201,8 @@ class AACPManager {
|
||||
var offset = 9
|
||||
for (i in 0 until deviceCount) {
|
||||
if (offset + 8 > data.size) {
|
||||
throw IllegalArgumentException("Data array too short to parse all connected devices")
|
||||
Log.w(TAG, "Data array too short to parse all connected devices, returning what we have")
|
||||
break
|
||||
}
|
||||
val macBytes = data.sliceArray(offset until offset + 6)
|
||||
val mac = macBytes.joinToString(":") { "%02X".format(it) }
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is a very basic ATT (Attribute Protocol) implementation. I have only implemented
|
||||
* what is necessary for LibrePods to function, i.e. reading and writing characteristics,
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
@@ -149,7 +149,8 @@ class AirPodsPro2Lightning: AirPodsBase(
|
||||
Capability.HEARING_AID,
|
||||
Capability.ADAPTIVE_AUDIO,
|
||||
Capability.ADAPTIVE_VOLUME,
|
||||
Capability.SWIPE_FOR_VOLUME
|
||||
Capability.SWIPE_FOR_VOLUME,
|
||||
Capability.HEAD_GESTURES
|
||||
)
|
||||
)
|
||||
|
||||
@@ -171,7 +172,8 @@ class AirPodsPro2USBC: AirPodsBase(
|
||||
Capability.HEARING_AID,
|
||||
Capability.ADAPTIVE_AUDIO,
|
||||
Capability.ADAPTIVE_VOLUME,
|
||||
Capability.SWIPE_FOR_VOLUME
|
||||
Capability.SWIPE_FOR_VOLUME,
|
||||
Capability.HEAD_GESTURES
|
||||
)
|
||||
)
|
||||
|
||||
@@ -230,4 +232,4 @@ object AirPodsModels {
|
||||
fun getModelByModelNumber(modelNumber: String): AirPodsBase? {
|
||||
return models.find { modelNumber in it.modelNumber }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple's ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple's ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods Contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:Suppress("PrivatePropertyName")
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
@@ -115,6 +115,11 @@ class RadareOffsetFinder(context: Context) {
|
||||
}
|
||||
|
||||
fun isSdpOffsetAvailable(): Boolean {
|
||||
val sharedPreferences = ServiceManager.getService()?.applicationContext?.getSharedPreferences("settings", Context.MODE_PRIVATE) // ik not good practice- too lazy
|
||||
if (sharedPreferences?.getBoolean("skip_setup", false) == true) {
|
||||
Log.d(TAG, "Setup skipped, returning true for SDP offset.")
|
||||
return true
|
||||
}
|
||||
try {
|
||||
val process = Runtime.getRuntime().exec(arrayOf("/system/bin/getprop", SDP_OFFSET_PROP))
|
||||
val reader = BufferedReader(InputStreamReader(process.inputStream))
|
||||
@@ -462,7 +467,7 @@ class RadareOffsetFinder(context: Context) {
|
||||
// findAndSaveL2cuProcessCfgReqOffset(libraryPath, envSetup)
|
||||
// findAndSaveL2cCsmConfigOffset(libraryPath, envSetup)
|
||||
// findAndSaveL2cuSendPeerInfoReqOffset(libraryPath, envSetup)
|
||||
|
||||
|
||||
// findAndSaveSdpOffset(libraryPath, envSetup) Should not be run by default, only when user asks for it.
|
||||
|
||||
} catch (e: Exception) {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.kavishdevar.librepods.utils
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
*
|
||||
* Copyright (C) 2025 LibrePods contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
LibrePods - AirPods liberated from Apple’s ecosystem
|
||||
Copyright (C) 2025 LibrePods contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:OptIn(ExperimentalEncodingApi::class)
|
||||
|
||||
|
||||
1
android/app/src/main/res/resources.properties
Normal file
1
android/app/src/main/res/resources.properties
Normal file
@@ -0,0 +1 @@
|
||||
unqualifiedResLocale=en
|
||||
217
android/app/src/main/res/value-it/strings.xml
Normal file
217
android/app/src/main/res/value-it/strings.xml
Normal file
@@ -0,0 +1,217 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">LibrePods</string>
|
||||
<string name="app_description">Libera i tuoi AirPods dall'ecosistema Apple.</string>
|
||||
<string name="app_widget_description">Visualizza lo stato della batteria dei tuoi AirPods direttamente dalla schermata principale!</string>
|
||||
<string name="accessibility">Accessibilità</string>
|
||||
<string name="tone_volume">Volume Tono</string>
|
||||
<string name="tone_volume_description">Regola il volume del tono degli effetti sonori riprodotti dagli AirPods.</string>
|
||||
<string name="audio">Audio</string>
|
||||
<string name="adaptive_audio">Audio Adattivo</string>
|
||||
<string name="customize_adaptive_audio">Personalizza Audio Adattivo</string>
|
||||
<string name="adaptive_audio_description">L'audio adattivo risponde dinamicamente al tuo ambiente e cancella o permette i rumori esterni. Puoi personalizzare l'Audio Adattivo per permettere più o meno rumore.</string>
|
||||
<string name="buds">Auricolari</string>
|
||||
<string name="case_alt">Custodia</string>
|
||||
<string name="test">Test</string>
|
||||
<string name="name">Nome</string>
|
||||
<string name="noise_control">Modalità di Ascolto</string>
|
||||
<string name="off">Spento</string>
|
||||
<string name="transparency">Trasparenza</string>
|
||||
<string name="adaptive">Adattivo</string>
|
||||
<string name="noise_cancellation">Cancellazione del Rumore</string>
|
||||
<string name="press_and_hold_airpods">Premi e Tieni Premuto sugli AirPods</string>
|
||||
<string name="press_and_hold_noise_control_description">Premi e tieni premuto sullo stelo per alternare tra le modalità di ascolto selezionate.</string>
|
||||
<string name="head_gestures">Gesti della Testa</string>
|
||||
<string name="left">Sinistra</string>
|
||||
<string name="right">Destra</string>
|
||||
<string name="conversational_awareness">Consapevolezza Conversazionale</string>
|
||||
<string name="conversational_awareness_description">Abbassa il volume dei contenuti multimediali e riduce il rumore di fondo quando inizi a parlare con altre persone.</string>
|
||||
<string name="personalized_volume">Volume Personalizzato</string>
|
||||
<string name="personalized_volume_description">Regola il volume dei contenuti multimediali in risposta al tuo ambiente.</string>
|
||||
<string name="noise_cancellation_single_airpod">Cancellazione del Rumore con un Solo AirPod</string>
|
||||
<string name="noise_cancellation_single_airpod_description">Consenti agli AirPods di essere messi in modalità di cancellazione del rumore quando è presente un solo AirPod nell'orecchio.</string>
|
||||
<string name="volume_control">Controllo Volume</string>
|
||||
<string name="volume_control_description">Regola il volume scorrendo verso l'alto o verso il basso sul sensore situato sullo stelo degli AirPods Pro.</string>
|
||||
<string name="airpods_not_connected">AirPods non connessi</string>
|
||||
<string name="airpods_not_connected_description">Si prega di connettere i tuoi AirPods per accedere alle impostazioni.</string>
|
||||
<string name="back">Indietro</string>
|
||||
<string name="app_settings">Personalizzazioni</string>
|
||||
<string name="relative_conversational_awareness_volume">Volume relativo</string>
|
||||
<string name="relative_conversational_awareness_volume_description">Riduce a una percentuale del volume corrente invece del volume massimo.</string>
|
||||
<string name="conversational_awareness_pause_music">Metti in Pausa la Musica</string>
|
||||
<string name="conversational_awareness_pause_music_description">Quando inizi a parlare, la musica verrà messa in pausa.</string>
|
||||
<string name="appwidget_text">ESEMPIO</string>
|
||||
<string name="add_widget">Aggiungi widget</string>
|
||||
<string name="noise_control_widget_description">Controlla la Modalità di Controllo del Rumore direttamente dalla tua Schermata Principale.</string>
|
||||
<string name="island_connected_text">Connesso</string>
|
||||
<string name="island_connected_remote_text">Connesso a Linux</string>
|
||||
<string name="island_taking_over_text">Connesso</string>
|
||||
<string name="island_moved_to_remote_text">Spostato su Linux</string>
|
||||
<string name="island_moved_to_other_device_text">Spostato su %1$s</string>
|
||||
<string name="island_moved_to_other_device_reversed_text">Riconnetti dalla notifica</string>
|
||||
<string name="head_tracking">Tracciamento della Testa</string>
|
||||
<string name="head_gestures_details">Annuisci per rispondere alle chiamate e scuoti la testa per rifiutarle.</string>
|
||||
<string name="general_settings_header">Generale</string>
|
||||
<string name="qs_click_behavior_title">Azione del Tile Impostazioni Rapide</string>
|
||||
<string name="qs_click_behavior_dialog_desc">Mostra la finestra di dialogo per il controllo del rumore al tocco.</string>
|
||||
<string name="qs_click_behavior_cycle_desc">Alterna tra le modalità al tocco.</string>
|
||||
<string name="developer_options_header">Sviluppatore</string>
|
||||
<string name="more_settings_title">Apri le Impostazioni degli AirPods</string>
|
||||
<string name="more_settings_subtitle">Gestisci le funzionalità e le preferenze degli AirPods</string>
|
||||
<string name="ear_detection">Rilevamento Automatico dell'Orecchio</string>
|
||||
<string name="auto_play">Riproduzione Automatica</string>
|
||||
<string name="auto_pause">Pausa Automatica</string>
|
||||
<string name="troubleshooting">Risoluzione dei Problemi</string>
|
||||
<string name="troubleshooting_description">Raccogli i log per diagnosticare i problemi con la connessione degli AirPods</string>
|
||||
<string name="collect_logs">Raccogli Log</string>
|
||||
<string name="saved_logs">Log Salvati</string>
|
||||
<string name="no_logs_found">Nessun log salvato trovato</string>
|
||||
<string name="takeover_header">Preferenze di Connessione Automatica</string>
|
||||
<string name="takeover_airpods_state">Connetti ai tuoi AirPods quando il loro stato è:</string>
|
||||
<string name="takeover_disconnected">Disconnesso</string>
|
||||
<string name="takeover_disconnected_desc">Gli AirPods non sono connessi a un dispositivo</string>
|
||||
<string name="takeover_idle">Inattivo</string>
|
||||
<string name="takeover_idle_desc">Un dispositivo è connesso ai tuoi AirPods, ma non riproduce contenuti multimediali né è in chiamata</string>
|
||||
<string name="takeover_music">Riproduzione di contenuti multimediali</string>
|
||||
<string name="takeover_music_desc">Un dispositivo sta riproducendo contenuti multimediali sui tuoi AirPods</string>
|
||||
<string name="takeover_call">In chiamata</string>
|
||||
<string name="takeover_call_desc">Un dispositivo è in chiamata con i tuoi AirPods</string>
|
||||
<string name="takeover_phone_state">Connetti agli AirPods quando il tuo telefono è:</string>
|
||||
<string name="takeover_ringing_call">Ricezione di una chiamata</string>
|
||||
<string name="takeover_ringing_call_desc">Il tuo telefono inizia a squillare</string>
|
||||
<string name="takeover_media_start">Avvio della riproduzione di contenuti multimediali</string>
|
||||
<string name="takeover_media_start_desc">Il tuo telefono inizia a riprodurre contenuti multimediali</string>
|
||||
<string name="undo">Annulla</string>
|
||||
<string name="customize_transparency_mode_description">Puoi personalizzare la modalità Trasparenza per i tuoi AirPods Pro per aiutarti a sentire ciò che ti circonda.</string>
|
||||
<string name="loud_sound_reduction_description">La Riduzione dei Suoni Forti può ridurre attivamente la tua esposizione ai forti rumori ambientali quando in modalità Trasparenza e Adattiva. La Riduzione dei Suoni Forti non è attiva in modalità Spento.</string>
|
||||
<string name="loud_sound_reduction">Riduzione dei Suoni Forti</string>
|
||||
<string name="call_controls">Controlli Chiamata</string>
|
||||
<string name="automatically_connect">Connetti automaticamente a questo dispositivo</string>
|
||||
<string name="automatically_connect_description">Quando abilitato, gli AirPods tenteranno di connettersi automaticamente a questo dispositivo. Altrimenti, tenteranno di connettersi automaticamente solo se sono stati connessi in precedenza.</string>
|
||||
<string name="sleep_detection">Metti in pausa i contenuti multimediali quando ti addormenti</string>
|
||||
<string name="off_listening_mode">Modalità Ascolto Disattivata</string>
|
||||
<string name="off_listening_mode_description">Quando questa opzione è attiva, le modalità di ascolto degli AirPods includeranno un'opzione "Spento". I livelli di suono forti non vengono ridotti quando la modalità di ascolto è impostata su "Spento".</string>
|
||||
<string name="microphone">Microfono</string>
|
||||
<string name="microphone_mode">Modalità Microfono</string>
|
||||
<string name="microphone_automatic">Automatico</string>
|
||||
<string name="microphone_always_right">Sempre Destro</string>
|
||||
<string name="microphone_always_left">Sempre Sinistro</string>
|
||||
<string name="answer_call">Rispondi alla chiamata</string>
|
||||
<string name="mute_unmute">Silenzia/Riattiva</string>
|
||||
<string name="hang_up">Riaggancia</string>
|
||||
<string name="press_once">Premi una Volta</string>
|
||||
<string name="press_twice">Premi Due Volte</string>
|
||||
<string name="hearing_aid">Apparecchio Acustico</string>
|
||||
<string name="adjustments">Regolazioni</string>
|
||||
<string name="swipe_to_control_amplification">Scorri per controllare l'amplificazione</string>
|
||||
<string name="swipe_amplification_description">Quando sei in modalità Trasparenza e nessun contenuto multimediale è in riproduzione, scorri verso l'alto e verso il basso sui controlli Touch dei tuoi AirPods Pro per aumentare o diminuire l'amplificazione dei suoni ambientali.</string>
|
||||
<string name="transparency_mode">Modalità Trasparenza</string>
|
||||
<string name="customize_transparency_mode">Personalizza la Modalità Trasparenza</string>
|
||||
<string name="press_speed">Velocità di Pressione</string>
|
||||
<string name="press_speed_description">Regola la velocità richiesta per premere due o tre volte sui tuoi AirPods.</string>
|
||||
<string name="press_and_hold_duration">Durata della Pressione Prolungata</string>
|
||||
<string name="press_and_hold_duration_description">Regola la durata richiesta per premere e tenere premuto sui tuoi AirPods.</string>
|
||||
<string name="volume_swipe_speed">Velocità di Scorrimento del Volume</string>
|
||||
<string name="volume_swipe_speed_description">Per evitare regolazioni involontarie del volume, seleziona il tempo di attesa preferito tra gli scorrimenti.</string>
|
||||
<string name="equalizer">Equalizzatore</string>
|
||||
<string name="apply_eq_to">Applica EQ a</string>
|
||||
<string name="phone">Telefono</string>
|
||||
<string name="media">Media</string>
|
||||
<string name="band_label">Banda %d</string>
|
||||
<string name="default_option">Predefinito</string>
|
||||
<string name="slower">Più lento</string>
|
||||
<string name="slowest">Il più lento</string>
|
||||
<string name="longer">Più lungo</string>
|
||||
<string name="longest">Il più lungo</string>
|
||||
<string name="darker">Più scuro</string>
|
||||
<string name="brighter">Più luminoso</string>
|
||||
<string name="less">Meno</string>
|
||||
<string name="more">Di più</string>
|
||||
<string name="amplification">Amplificazione</string>
|
||||
<string name="balance">Bilanciamento</string>
|
||||
<string name="tone">Tono</string>
|
||||
<string name="ambient_noise_reduction">Riduzione del Rumore Ambientale</string>
|
||||
<string name="conversation_boost">Potenziamento Conversazione</string>
|
||||
<string name="conversation_boost_description">Potenziamento Conversazione concentra i tuoi AirPods Pro sulla persona che parla di fronte a te, rendendo più facile sentire in una conversazione faccia a faccia.</string>
|
||||
<string name="hearing_aid_description">Gli AirPods possono utilizzare i risultati di un test dell'udito per apportare modifiche che migliorano la chiarezza delle voci e dei suoni intorno a te.\n\nApparecchio Acustico è destinato solo a persone con perdita dell'udito da lieve a moderata.</string>
|
||||
<string name="media_assist">Assistenza Media</string>
|
||||
<string name="media_assist_description">Gli AirPods Pro possono utilizzare i risultati di un test dell'udito per apportare modifiche che migliorano la chiarezza di musica, video e chiamate.</string>
|
||||
<string name="adjust_media">Regola Musica e Video</string>
|
||||
<string name="adjust_calls">Regola Chiamate</string>
|
||||
<string name="widget">Widget</string>
|
||||
<string name="show_phone_battery_in_widget">Mostra la batteria del telefono nel widget</string>
|
||||
<string name="show_phone_battery_in_widget_description">Visualizza il livello della batteria del tuo telefono nel widget accanto alla batteria degli AirPods</string>
|
||||
<string name="conversational_awareness_volume">Volume Consapevolezza Conversazionale</string>
|
||||
<string name="quick_settings_tile">Tile Impostazioni Rapide</string>
|
||||
<string name="open_dialog_for_controlling">Apri finestra di dialogo per il controllo</string>
|
||||
<string name="open_dialog_for_controlling_description">Se disabilitato, cliccando sul QS si scorrerà tra le modalità. Se abilitato, verrà mostrata una finestra di dialogo per controllare la modalità di controllo del rumore e la consapevolezza conversazionale.</string>
|
||||
<string name="disconnect_when_not_wearing">Disconnetti AirPods quando non indossati</string>
|
||||
<string name="disconnect_when_not_wearing_description">Sarai ancora in grado di controllarli con l'app - questo disconnette solo l'audio.</string>
|
||||
<string name="advanced_options">Opzioni Avanzate</string>
|
||||
<string name="set_identity_resolving_key">Imposta Chiave di Risoluzione Identità (IRK)</string>
|
||||
<string name="set_identity_resolving_key_description">Imposta manualmente il valore IRK utilizzato per risolvere gli indirizzi casuali BLE</string>
|
||||
<string name="set_encryption_key">Imposta Chiave di Crittografia</string>
|
||||
<string name="set_encryption_key_description">Imposta manualmente il valore ENC_KEY utilizzato per decrittografare le pubblicità BLE</string>
|
||||
<string name="use_alternate_head_tracking_packets">Utilizza pacchetti alternativi di tracciamento della testa</string>
|
||||
<string name="use_alternate_head_tracking_packets_description">Abilita questo se il tracciamento della testa non funziona per te. Questo invia dati diversi agli AirPods per richiedere/interrompere i dati di tracciamento della testa.</string>
|
||||
<string name="act_as_an_apple_device">Comportati come un dispositivo Apple</string>
|
||||
<string name="act_as_an_apple_device_description">Abilita la connettività multi-dispositivo e le funzionalità di Accessibilità come la personalizzazione della modalità Trasparenza (amplificazione, tono, riduzione del rumore ambientale, potenziamento conversazione ed EQ)</string>
|
||||
<string name="act_as_an_apple_device_warning">Potrebbe essere instabile!! Un massimo di due dispositivi possono essere connessi ai tuoi AirPods. Se li stai usando con un dispositivo Apple come un iPad o un Mac, connetti prima quel dispositivo e poi il tuo Android.</string>
|
||||
<string name="reset_hook_offset">Reimposta Offset Hook</string>
|
||||
<string name="reset_hook_offset_description">Questo cancellerà l'offset hook corrente e richiederà di rifare la procedura di configurazione. Sei sicuro di voler continuare?</string>
|
||||
<string name="reset">Reimposta</string>
|
||||
<string name="hook_offset_reset_success">Offset hook è stato resettato. Reindirizzamento alla configurazione...</string>
|
||||
<string name="hook_offset_reset_failure">Impossibile reimpostare l'offset hook</string>
|
||||
<string name="irk_set_success">IRK impostata correttamente</string>
|
||||
<string name="encryption_key_set_success">Chiave di crittografia impostata correttamente</string>
|
||||
<string name="irk_hex_value">Valore Esadecimale IRK</string>
|
||||
<string name="enc_key_hex_value">Valore Esadecimale ENC_KEY</string>
|
||||
<string name="enter_irk_hex">Inserisci IRK di 16 byte come stringa esadecimale (32 caratteri):</string>
|
||||
<string name="enter_enc_key_hex">Inserisci ENC_KEY di 16 byte come stringa esadecimale (32 caratteri):</string>
|
||||
<string name="must_be_32_hex_chars">Devono essere esattamente 32 caratteri esadecimali</string>
|
||||
<string name="error_converting_hex">Errore durante la conversione esadecimale:</string>
|
||||
<string name="found_offset_restart_bluetooth">Offset trovato, riavviare il processo Bluetooth</string>
|
||||
<string name="digital_assistant">Assistente Digitale</string>
|
||||
<string name="on">Attivo</string>
|
||||
<string name="camera_remote">Telecomando Fotocamera</string>
|
||||
<string name="camera_control">Controllo Fotocamera</string>
|
||||
<string name="camera_control_description">Scatta una foto, avvia o interrompi la registrazione e altro utilizzando Premere una Volta o Premere e Tenere Premuto. Quando si utilizzano gli AirPods per le azioni della fotocamera, se si seleziona Premere una Volta, i gesti di controllo dei media non saranno disponibili e, se si seleziona Premere e Tenere Premuto, la modalità di ascolto e i gesti dell'Assistente Digitale non saranno disponibili.</string>
|
||||
<string name="camera_control_app_description">Imposta un pacchetto app personalizzato per il rilevamento della fotocamera</string>
|
||||
<string name="set_custom_camera_package">Imposta Appid Fotocamera Personalizzata</string>
|
||||
<string name="enter_custom_camera_package">Inserisci l'id dell'applicazione della fotocamera:</string>
|
||||
<string name="custom_camera_package">Appid Fotocamera Personalizzata</string>
|
||||
<string name="custom_camera_package_set_success">Appid fotocamera personalizzata impostata correttamente</string>
|
||||
<string name="app_listener_service_label">Ascoltatore fotocamera</string>
|
||||
<string name="app_listener_service_description">Servizio di ascolto per LibrePods per rilevare quando la fotocamera è attiva per attivare il controllo della fotocamera sugli AirPods.</string>
|
||||
<string name="open_source_licenses">Licenze Open Source</string>
|
||||
<string name="hearing_test">Aggiorna Test Uditivo</string>
|
||||
<string name="update_hearing_test">Aggiorna Risultato Test Uditivo</string>
|
||||
<string name="att_manager_is_null_try_reconnecting">ATT Manager è nullo, prova a riconnetterti.</string>
|
||||
<string name="permissions_required">Sono richieste le seguenti autorizzazioni per utilizzare l'app. Si prega di concederle per continuare.</string>
|
||||
<string name="shake_your_head_or_nod">Scuoti la testa o annuisci!</string>
|
||||
<string name="root_access_required">Accesso Root Richiesto</string>
|
||||
<string name="this_app_needs_root_access_to_hook_onto_the_bluetooth_library">Questa app ha bisogno dell'accesso root per agganciarsi alla libreria Bluetooth</string>
|
||||
<string name="root_access_denied">L'accesso root è stato negato. Si prega di concedere i permessi di root.</string>
|
||||
<string name="troubleshooting_steps">Passaggi per la Risoluzione dei Problemi</string>
|
||||
<string name="hearing_test_value_instruction">Si prega di inserire i valori di perdita in dbHL</string>
|
||||
<string name="about">Informazioni</string>
|
||||
<string name="model_name">Nome Modello</string>
|
||||
<string name="model_number">Numero Modello</string>
|
||||
<string name="serial_number">Numero di Serie</string>
|
||||
<string name="version">Versione</string>
|
||||
<string name="hearing_health">Salute Uditiva</string>
|
||||
<string name="hearing_protection">Protezione dell'Udito</string>
|
||||
<string name="workspace_use">Uso in Ambienti di Lavoro</string>
|
||||
<string name="ppe">Protezione EN 352</string>
|
||||
<string name="workspace_use_description">La protezione EN 352 limita il livello massimo dei media a 82 dBA e soddisfa i requisiti applicabili dello standard EN 352 per la protezione individuale dell'udito.</string>
|
||||
<string name="environmental_noise">Rumore Ambientale</string>
|
||||
<string name="reconnect_to_last_device">Riconnetti all'ultimo dispositivo connesso</string>
|
||||
<string name="disconnect">Disconnetti</string>
|
||||
<string name="support_me">Supportami</string>
|
||||
<string name="never_show_again">Non mostrare più</string>
|
||||
<string name="support_dialog_description">Di recente ho perso il mio AirPod sinistro. Se hai trovato utile LibrePods, considera di supportarmi su GitHub Sponsors in modo che possa acquistare un sostituto e continuare a lavorare su questo progetto: anche una piccola somma fa molto. Grazie per il tuo supporto!</string>
|
||||
<string name="support_librepods">Supporta LibrePods</string>
|
||||
<string name="listening_mode_off_description">Disattiva la gestione del rumore</string>
|
||||
<string name="listening_mode_transparency_description">Lascia entrare i suoni esterni</string>
|
||||
<string name="listening_mode_adaptive_description">Regola dinamicamente il rumore esterno</string>
|
||||
<string name="listening_mode_noise_cancellation_description">Blocca i suoni esterni</string>
|
||||
</resources>
|
||||
217
android/app/src/main/res/values-es/strings.xml
Normal file
217
android/app/src/main/res/values-es/strings.xml
Normal file
@@ -0,0 +1,217 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">LibrePods</string>
|
||||
<string name="app_description">Libera tus AirPods del ecosistema de Apple.</string>
|
||||
<string name="app_widget_description">¡Ve el estado de batería de tus AirPods desde tu pantalla de inicio!</string>
|
||||
<string name="accessibility">Accesibilidad</string>
|
||||
<string name="tone_volume">Volumen del tono</string>
|
||||
<string name="tone_volume_description">Ajusta el volumen de los efectos de sonido reproducidos por los AirPods.</string>
|
||||
<string name="audio">Audio</string>
|
||||
<string name="adaptive_audio">Audio Adaptativo</string>
|
||||
<string name="customize_adaptive_audio">Personalizar Audio Adaptativo</string>
|
||||
<string name="adaptive_audio_description">El audio adaptativo responde al entorno y cancela o permite ruido externo. Puedes ajustarlo para permitir más o menos ruido.</string>
|
||||
<string name="buds">Auriculares</string>
|
||||
<string name="case_alt">Estuche</string>
|
||||
<string name="test">Probar</string>
|
||||
<string name="name">Nombre</string>
|
||||
<string name="noise_control">Modo de Escucha</string>
|
||||
<string name="off">Desactivado</string>
|
||||
<string name="transparency">Transparencia</string>
|
||||
<string name="adaptive">Adaptativo</string>
|
||||
<string name="noise_cancellation">Cancelación de Ruido</string>
|
||||
<string name="press_and_hold_airpods">Pulsar y Mantener AirPods</string>
|
||||
<string name="press_and_hold_noise_control_description">Mantén presionado para alternar entre los modos seleccionados.</string>
|
||||
<string name="head_gestures">Gestos de Cabeza</string>
|
||||
<string name="left">Izquierdo</string>
|
||||
<string name="right">Derecho</string>
|
||||
<string name="conversational_awareness">Detección de Conversación</string>
|
||||
<string name="conversational_awareness_description">Reduce el volumen y el ruido de fondo cuando comienzas a hablar.</string>
|
||||
<string name="personalized_volume">Volumen Personalizado</string>
|
||||
<string name="personalized_volume_description">Ajusta el volumen en función del entorno.</string>
|
||||
<string name="noise_cancellation_single_airpod">Cancelación de sonido con un solo AirPod</string>
|
||||
<string name="noise_cancellation_single_airpod_description">Permite activar la cancelación de sonido con un solo auricular puesto.</string>
|
||||
<string name="volume_control">Control de Volumen</string>
|
||||
<string name="volume_control_description">Ajusta el volumen deslizando arriba o abajo en el control táctil de los AirPods Pro.</string>
|
||||
<string name="airpods_not_connected">AirPods no conectados</string>
|
||||
<string name="airpods_not_connected_description">Por favor, conecta tus AirPods para acceder a los ajustes.</string>
|
||||
<string name="back">Atrás</string>
|
||||
<string name="app_settings">Personalización</string>
|
||||
<string name="relative_conversational_awareness_volume">Volumen relativo</string>
|
||||
<string name="relative_conversational_awareness_volume_description">Reduce a un porcentaje del volumen actual en vez del volumen máximo.</string>
|
||||
<string name="conversational_awareness_pause_music">Pausar música</string>
|
||||
<string name="conversational_awareness_pause_music_description">La música se pausará cuando comiences a hablar.</string>
|
||||
<string name="appwidget_text">EJEMPLO</string>
|
||||
<string name="add_widget">Añadir widget</string>
|
||||
<string name="noise_control_widget_description">Controla el modo de control de ruido desde tu pantalla de inicio.</string>
|
||||
<string name="island_connected_text">Conectado</string>
|
||||
<string name="island_connected_remote_text">Conectado a Linux</string>
|
||||
<string name="island_taking_over_text">Conectado</string>
|
||||
<string name="island_moved_to_remote_text">Transferido a Linux</string>
|
||||
<string name="island_moved_to_other_device_text">Transferido a %1$s</string>
|
||||
<string name="island_moved_to_other_device_reversed_text">Reconectar desde notificación</string>
|
||||
<string name="head_tracking">Seguimiento de Cabeza</string>
|
||||
<string name="head_gestures_details">Asiente para contestar y niega para rechazar.</string>
|
||||
<string name="general_settings_header">General</string>
|
||||
<string name="qs_click_behavior_title">Acción del botón de Ajustes Rápidos</string>
|
||||
<string name="qs_click_behavior_dialog_desc">Mostrar diálogo de control de ruido al tocar.</string>
|
||||
<string name="qs_click_behavior_cycle_desc">Alternar modos al tocar.</string>
|
||||
<string name="developer_options_header">Desarrollador</string>
|
||||
<string name="more_settings_title">Abrir Ajustes de AirPods</string>
|
||||
<string name="more_settings_subtitle">Gestionar funciones y preferencias</string>
|
||||
<string name="ear_detection">Detección Automática de Oído</string>
|
||||
<string name="auto_play">Reproducción automática</string>
|
||||
<string name="auto_pause">Pausa automática</string>
|
||||
<string name="troubleshooting">Solución de Problemas</string>
|
||||
<string name="troubleshooting_description">Recopila registros para diagnosticar problemas de conexión de los AirPods</string>
|
||||
<string name="collect_logs">Recopilar registros</string>
|
||||
<string name="saved_logs">Guardar registros</string>
|
||||
<string name="no_logs_found">No se encontraron registros</string>
|
||||
<string name="takeover_header">Preferencias de Autoconexión</string>
|
||||
<string name="takeover_airpods_state">Conectar a tus AirPods cuando su estado sea:</string>
|
||||
<string name="takeover_disconnected">Desconectado</string>
|
||||
<string name="takeover_disconnected_desc">AirPods no conectados a ningún dispositivo</string>
|
||||
<string name="takeover_idle">Inactivos</string>
|
||||
<string name="takeover_idle_desc">Un dispositivo está conectado a tus AirPods, pero no está reproduciendo audio ni llamando</string>
|
||||
<string name="takeover_music">Reproduciendo</string>
|
||||
<string name="takeover_music_desc">Un dispositivo está reproduciendo audio en tus AirPods</string>
|
||||
<string name="takeover_call">En llamada</string>
|
||||
<string name="takeover_call_desc">Un dispositivo está en llamada con tus AirPods</string>
|
||||
<string name="takeover_phone_state">Conectar a tus AirPods cuando el teléfono esté:</string>
|
||||
<string name="takeover_ringing_call">Llamada entrante</string>
|
||||
<string name="takeover_ringing_call_desc">El teléfono empieza a sonar</string>
|
||||
<string name="takeover_media_start">Iniciando reproducción</string>
|
||||
<string name="takeover_media_start_desc">El teléfono empieza a reproducir audio</string>
|
||||
<string name="undo">Deshacer</string>
|
||||
<string name="customize_transparency_mode_description">Puedes personalizar el modo Transparencia de tus AirPods Pro para oír mejor tu entorno.</string>
|
||||
<string name="loud_sound_reduction_description">Reducción de Sonidos Fuertes puede reducir activamente la exposición a entornos ruidosos en modo Transparencia y Adaptativo. Reducción de Sonidos Fuertes no está activa en modo Desactivado.</string>
|
||||
<string name="loud_sound_reduction">Reducción de Sonidos Fuertes</string>
|
||||
<string name="call_controls">Controles de Llamada</string>
|
||||
<string name="automatically_connect">Conectar a este dispositivo automáticamente</string>
|
||||
<string name="automatically_connect_description">Al activarse, los AirPods intentarán conectarse automáticamente a este dispositivo. Si no es posible, se intentarán conectar al último dispositivo utilizado.</string>
|
||||
<string name="sleep_detection">Pausar audio al quedarse dormido</string>
|
||||
<string name="off_listening_mode">Modo de Escucha Desactivado</string>
|
||||
<string name="off_listening_mode_description">Cuando está activado, los modos de escucha de AirPods incluyen la opción Desactivado. Cuando el modo de Escucha Desactivado está activado no se reducen ruidos fuertes.</string>
|
||||
<string name="microphone">Micrófono</string>
|
||||
<string name="microphone_mode">Modo de Micrófono</string>
|
||||
<string name="microphone_automatic">Automático</string>
|
||||
<string name="microphone_always_right">Siempre derecho</string>
|
||||
<string name="microphone_always_left">Siempre izquierdo</string>
|
||||
<string name="answer_call">Responder</string>
|
||||
<string name="mute_unmute">Silenciar/Desilenciar</string>
|
||||
<string name="hang_up">Colgar</string>
|
||||
<string name="press_once">Pulsar una vez</string>
|
||||
<string name="press_twice">Pulsar dos veces</string>
|
||||
<string name="hearing_aid">Audífono</string>
|
||||
<string name="adjustments">Ajustes</string>
|
||||
<string name="swipe_to_control_amplification">Deslizar para controlar amplificación</string>
|
||||
<string name="swipe_amplification_description">Cuando en modo Transparencia y no hay audio reproduciéndose, desliza hacia arriba y/o abajo en los controles táctiles de los AirPods Pro para ajustar la amplificación ambiental.</string>
|
||||
<string name="transparency_mode">Modo Transparencia</string>
|
||||
<string name="customize_transparency_mode">Personalizar Modo Transparencia</string>
|
||||
<string name="press_speed">Velocidad de pulsación</string>
|
||||
<string name="press_speed_description">Ajusta la velocidad necesaria para pulsar dos o tres veces en tus AirPods.</string>
|
||||
<string name="press_and_hold_duration">Duración de pulsación prolongada</string>
|
||||
<string name="press_and_hold_duration_description">Ajusta la duración requerida para pulsación prolongada en tus AirPods.</string>
|
||||
<string name="volume_swipe_speed">Velocidad de deslizamiento</string>
|
||||
<string name="volume_swipe_speed_description">Selecciona el tiempo entre deslizamientos para evitar ajustes involuntarios.</string>
|
||||
<string name="equalizer">Ecualizador (EQ)</string>
|
||||
<string name="apply_eq_to">Aplicar EQ a</string>
|
||||
<string name="phone">Teléfono</string>
|
||||
<string name="media">Multimedia</string>
|
||||
<string name="band_label">Banda %d</string>
|
||||
<string name="default_option">Predeterminado</string>
|
||||
<string name="slower">Más lento</string>
|
||||
<string name="slowest">Muy lento</string>
|
||||
<string name="longer">Más largo</string>
|
||||
<string name="longest">Muy largo</string>
|
||||
<string name="darker">Más oscuro</string>
|
||||
<string name="brighter">Más claro</string>
|
||||
<string name="less">Menos</string>
|
||||
<string name="more">Más</string>
|
||||
<string name="amplification">Amplificación</string>
|
||||
<string name="balance">Balance</string>
|
||||
<string name="tone">Tono</string>
|
||||
<string name="ambient_noise_reduction">Reducción de Ruido Ambiental</string>
|
||||
<string name="conversation_boost">Refuerzo de Conversación</string>
|
||||
<string name="conversation_boost_description">Refuerzo de Conversación enfoca tu AirPods Pro en la persona frente a ti facilitando la escucha de conversaciones cara a cara.</string>
|
||||
<string name="hearing_aid_description">Los AirPods pueden usar resultados de pruebas auditivas para mejorar la claridad de voces y sonidos de tu alrededor.\n\nEl modo Audífono tiene como objetivo ayudar a personas con problemas auditivos leves o moderados.</string>
|
||||
<string name="media_assist">Asistencia Multimedia</string>
|
||||
<string name="media_assist_description">Los AirPods Pro pueden usar resultados de pruebas auditivas para mejorar la claridad de música, video y llamadas.</string>
|
||||
<string name="adjust_media">Ajustar Música y Video</string>
|
||||
<string name="adjust_calls">Ajustar Llamadas</string>
|
||||
<string name="widget">Widget</string>
|
||||
<string name="show_phone_battery_in_widget">Mostrar batería del teléfono en Widget</string>
|
||||
<string name="show_phone_battery_in_widget_description">Mostrar la batería del teléfono junto a la de los AirPods en el Widget.</string>
|
||||
<string name="conversational_awareness_volume">Volumen de Detección de Conversación</string>
|
||||
<string name="quick_settings_tile">Botón de Ajustes Rápidos</string>
|
||||
<string name="open_dialog_for_controlling">Abrir diálogo de controles</string>
|
||||
<string name="open_dialog_for_controlling_description">Si está desactivado, al pulsar Ajustes rápidos alterna modos. Si está activado, muestra un diálogo de controles para control de ruido y detección de conversaciones.</string>
|
||||
<string name="disconnect_when_not_wearing">Desconectar AirPods cuando no estén puestos</string>
|
||||
<string name="disconnect_when_not_wearing_description">Aún podrás controlarlos con la aplicación, este ajuste sólo desconecta el audio.</string>
|
||||
<string name="advanced_options">Opciones Avanzadas</string>
|
||||
<string name="set_identity_resolving_key">Establecer Identity Resolving Key (IRK)</string>
|
||||
<string name="set_identity_resolving_key_description">Configura manualmente valor utilizado IRK para resolver direcciones aleatorias BLE.</string>
|
||||
<string name="set_encryption_key">Establecer Clave de Cifrado (ENC_KEY)</string>
|
||||
<string name="set_encryption_key_description">Configurar manualmente valor ENC_KEY utilizado para descifrar BLE cifrado.</string>
|
||||
<string name="use_alternate_head_tracking_packets">Utilizar paquetes head tracking alternativos</string>
|
||||
<string name="use_alternate_head_tracking_packets_description">Activar si head tracking no funciona. Esto enviará datos distintos a AirPods para solicitar/detener datos head tracking.</string>
|
||||
<string name="act_as_an_apple_device">Actuar como dispositivo Apple</string>
|
||||
<string name="act_as_an_apple_device_description">Activa conectividad multidispositivo y funciones de Accesibilidad como modo transparencia personalizado (amplificación, tono, reducción de ruido ambiente, potenciador de conversaciones, y EQ).</string>
|
||||
<string name="act_as_an_apple_device_warning">¡Puede ser inestable! Se puede conectar como máximo dos dispositivos a tus AirPods. Si estás utilizando un dispositivo de Apple, como un iPad o Mac, por favor conéctalo antes y posteriormente conecta tu dispositivo Android.</string>
|
||||
<string name="reset_hook_offset">Restablecer Hook Offset</string>
|
||||
<string name="reset_hook_offset_description">Esto elimina el hook offset actual y requiere volver a realizar la configuración inicial. ¿Estás seguro que quieres continuar?</string>
|
||||
<string name="reset">Restablecer</string>
|
||||
<string name="hook_offset_reset_success">Hook offset restablecido. Redirigiendo a configuración inicial...</string>
|
||||
<string name="hook_offset_reset_failure">Error al restablecer hook offset</string>
|
||||
<string name="irk_set_success">IRK ha sido establecido</string>
|
||||
<string name="encryption_key_set_success">Clave de cifrado establecida</string>
|
||||
<string name="irk_hex_value">Valor IRK Hex</string>
|
||||
<string name="enc_key_hex_value">Valor ENC_KEY Hex</string>
|
||||
<string name="enter_irk_hex">Introducir 16-byte IRK como formato hexadecimal (32 caracteres):</string>
|
||||
<string name="enter_enc_key_hex">Introducir 16-byte ENC_KEY como formato hexadecimal (32 caracteres):</string>
|
||||
<string name="must_be_32_hex_chars">Debe tener exactamente 32 caracteres hexadecimales</string>
|
||||
<string name="error_converting_hex">Error convirtiendo hex:</string>
|
||||
<string name="found_offset_restart_bluetooth">Offset encontrado. Por favor, reinicie el proceso Bluetooth</string>
|
||||
<string name="digital_assistant">Asistente Digital</string>
|
||||
<string name="on">Activado</string>
|
||||
<string name="camera_remote">Control Remoto de Cámara</string>
|
||||
<string name="camera_control">Control de Cámara</string>
|
||||
<string name="camera_control_description">Toma fotos o inicia grabación usando Pulsar una vez o Pulsación Prolongada. Los AirPods para acciones de la cámara: si selecciona Pulsar una vez, los gestos de control multimedia no estarán disponibles, y si selecciona Pulsación Prolongada, el modo de escucha y los gestos del Asistente Digital no estarán disponibles.</string>
|
||||
<string name="camera_control_app_description">Configurar un paquete de aplicaciones personalizado para la detección de la cámara</string>
|
||||
<string name="set_custom_camera_package">Establecer Appid de cámara personalizada</string>
|
||||
<string name="enter_custom_camera_package">Introduzca el ID de la aplicación de la cámara:</string>
|
||||
<string name="custom_camera_package">Aplicación de cámara personalizada Appid</string>
|
||||
<string name="custom_camera_package_set_success">Appid de cámara establecido correctamente</string>
|
||||
<string name="app_listener_service_label">Escucha de cámara</string>
|
||||
<string name="app_listener_service_description">Servicio de escucha para LibrePods que detecta cuándo la cámara está activa para activar el control de la cámara en los AirPods.</string>
|
||||
<string name="open_source_licenses">Licencias de Código Abierto</string>
|
||||
<string name="hearing_test">Actualizar Prueba Auditiva</string>
|
||||
<string name="update_hearing_test">Actualizar el Resultado de la Prueba Auditiva</string>
|
||||
<string name="att_manager_is_null_try_reconnecting">ATT Manager es nulo. Intente reconectar.</string>
|
||||
<string name="permissions_required">Se requieren los siguientes permisos para utilizar la aplicación. Por favor, autorícelos para continuar.</string>
|
||||
<string name="shake_your_head_or_nod">¡Mueve la cabeza o asiente!</string>
|
||||
<string name="root_access_required">Se requiere acceso root</string>
|
||||
<string name="this_app_needs_root_access_to_hook_onto_the_bluetooth_library">Esta aplicación necesita acceso root para conectarse a la biblioteca Bluetooth</string>
|
||||
<string name="root_access_denied">Se ha denegado el acceso root. Por favor, conceda permisos root.</string>
|
||||
<string name="troubleshooting_steps">Pasos para la resolución de problemas</string>
|
||||
<string name="hearing_test_value_instruction">Introduzca los valores de pérdida en dbHL.</string>
|
||||
<string name="about">Acerca de</string>
|
||||
<string name="model_name">Nombre del modelo</string>
|
||||
<string name="model_number">Número de modelo</string>
|
||||
<string name="serial_number">Número de serie</string>
|
||||
<string name="version">Versión</string>
|
||||
<string name="hearing_health">Salud Auditiva</string>
|
||||
<string name="hearing_protection">Protección Auditiva</string>
|
||||
<string name="workspace_use">Workspace en uso</string>
|
||||
<string name="ppe">Protección EN 352</string>
|
||||
<string name="workspace_use_description">La norma EN 352 limita el nivel máximo de los medios a 82 dBA y cumple los requisitos aplicables de la norma EN 352 para la protección auditiva personal.</string>
|
||||
<string name="environmental_noise">Ruido ambiental</string>
|
||||
<string name="reconnect_to_last_device">Reconectar al último dispositivo conectado</string>
|
||||
<string name="disconnect">Desconectar</string>
|
||||
<string name="support_me">Apóyame</string>
|
||||
<string name="never_show_again">No volver a mostrar</string>
|
||||
<string name="support_dialog_description">Hace poco perdí mi AirPod izquierdo. Si LibrePods te ha resultado útil, considera apoyarme en GitHub Sponsors para que pueda comprar un reemplazo y seguir trabajando en este proyecto; incluso una pequeña donación es de gran ayuda. ¡Gracias por tu apoyo!</string>
|
||||
<string name="support_librepods">Apoya a LibrePods</string>
|
||||
<string name="listening_mode_off_description">Desactiva la gestión del ruido</string>
|
||||
<string name="listening_mode_transparency_description">Deja entrar los sonidos externos</string>
|
||||
<string name="listening_mode_adaptive_description">Ajuste dinámico del ruido externo</string>
|
||||
<string name="listening_mode_noise_cancellation_description">Bloquea los sonidos externos</string>
|
||||
</resources>
|
||||
217
android/app/src/main/res/values-fr/strings.xml
Normal file
217
android/app/src/main/res/values-fr/strings.xml
Normal file
@@ -0,0 +1,217 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">LibrePods</string>
|
||||
<string name="app_description">Libérez vos AirPods de l\'écosystème Apple.</string>
|
||||
<string name="app_widget_description">Voyez l\'état de la batterie de vos AirPods directement depuis votre écran d\'accueil !</string>
|
||||
<string name="accessibility">Accessibilité</string>
|
||||
<string name="tone_volume">Volume de la tonalité</string>
|
||||
<string name="tone_volume_description">Ajustez le volume des effets sonores émis sur les AirPods.</string>
|
||||
<string name="audio">Audio</string>
|
||||
<string name="adaptive_audio">Audio Adaptatif</string>
|
||||
<string name="customize_adaptive_audio">Personnaliser l\'Audio Adaptatif</string>
|
||||
<string name="adaptive_audio_description">L\'audio Adaptatif répond dynamiquement à votre environnement et annule ou laisse entrer le bruit extérieur. Vous pouvez personnaliser l\'Audio Adaptatif pour laisser entrer plus ou moins de bruit.</string>
|
||||
<string name="buds">Écouteurs</string>
|
||||
<string name="case_alt">Boîtier</string>
|
||||
<string name="test">Test</string>
|
||||
<string name="name">Nom</string>
|
||||
<string name="noise_control">Mode d\'écoute</string>
|
||||
<string name="off">Désactivé</string>
|
||||
<string name="transparency">Transparence</string>
|
||||
<string name="adaptive">Adaptatif</string>
|
||||
<string name="noise_cancellation">Réduction de bruit</string>
|
||||
<string name="press_and_hold_airpods">Appuyer et maintenir les AirPods</string>
|
||||
<string name="press_and_hold_noise_control_description">Maintenez la tige pour passer entre les modes d\'écoute sélectionnés.</string>
|
||||
<string name="head_gestures">Gestes de la tête</string>
|
||||
<string name="left">Gauche</string>
|
||||
<string name="right">Droite</string>
|
||||
<string name="conversational_awareness">Détection des conversations</string>
|
||||
<string name="conversational_awareness_description">Baisse le volume des médias et réduit le bruit de fond lorsque vous commencez à parler à quelqu\'un.</string>
|
||||
<string name="personalized_volume">Volume personnalisé</string>
|
||||
<string name="personalized_volume_description">Ajuste le volume des médias en réponse à votre environnement.</string>
|
||||
<string name="noise_cancellation_single_airpod">Réduction du bruit avec un écouteur</string>
|
||||
<string name="noise_cancellation_single_airpod_description">Permet d\'activer la réduction de bruit même avec un seul AirPod à l\'oreille.</string>
|
||||
<string name="volume_control">Contrôle du volume</string>
|
||||
<string name="volume_control_description">Ajustez le volume en balayant vers le haut ou vers le bas sur le capteur situé sur la tige des AirPods Pro.</string>
|
||||
<string name="airpods_not_connected">AirPods non connectés</string>
|
||||
<string name="airpods_not_connected_description">Veuillez connecter vos AirPods pour accéder aux réglages.</string>
|
||||
<string name="back">Retour</string>
|
||||
<string name="app_settings">Personnalisations</string>
|
||||
<string name="relative_conversational_awareness_volume">Volume relatif</string>
|
||||
<string name="relative_conversational_awareness_volume_description">Réduit à un pourcentage du volume actuel plutôt qu\'au volume maximum.</string>
|
||||
<string name="conversational_awareness_pause_music">Mettre la musique en pause</string>
|
||||
<string name="conversational_awareness_pause_music_description">Quand vous commencez à parler, la musique sera mise en pause.</string>
|
||||
<string name="appwidget_text">EXEMPLE</string>
|
||||
<string name="add_widget">Ajouter le widget</string>
|
||||
<string name="noise_control_widget_description">Contrôlez le mode de réduction de bruit directement depuis votre écran d\'accueil.</string>
|
||||
<string name="island_connected_text">Connecté</string>
|
||||
<string name="island_connected_remote_text">Connecté à Linux</string>
|
||||
<string name="island_taking_over_text">Connecté</string>
|
||||
<string name="island_moved_to_remote_text">Déplacé vers Linux</string>
|
||||
<string name="island_moved_to_other_device_text">Déplacé vers %1$s</string>
|
||||
<string name="island_moved_to_other_device_reversed_text">Reconnecté depuis la notification</string>
|
||||
<string name="head_tracking">Suivi de la tête</string>
|
||||
<string name="head_gestures_details">Hochez la tête pour répondre aux appels, secouez-la pour refuser.</string>
|
||||
<string name="general_settings_header">Général</string>
|
||||
<string name="qs_click_behavior_title">Action de la tuile dans les réglages rapides</string>
|
||||
<string name="qs_click_behavior_dialog_desc">Afficher le dialogue de contrôle du bruit au toucher.</string>
|
||||
<string name="qs_click_behavior_cycle_desc">Faire défiler les modes au toucher.</string>
|
||||
<string name="developer_options_header">Développeur</string>
|
||||
<string name="more_settings_title">Ouvrir les réglages des AirPods</string>
|
||||
<string name="more_settings_subtitle">Gérer les fonctionnalités et préférences des AirPods</string>
|
||||
<string name="ear_detection">Détection automatique des oreilles</string>
|
||||
<string name="auto_play">Lecture Automatique</string>
|
||||
<string name="auto_pause">Pause Automatique</string>
|
||||
<string name="troubleshooting">Dépannage</string>
|
||||
<string name="troubleshooting_description">Collecter des journaux pour diagnostiquer les problèmes de connexion des AirPods</string>
|
||||
<string name="collect_logs">Collecter les journaux</string>
|
||||
<string name="saved_logs">Journaux enregistrés</string>
|
||||
<string name="no_logs_found">Aucun journal sauvegardé trouvé</string>
|
||||
<string name="takeover_header">Préférences d\'auto-connexion</string>
|
||||
<string name="takeover_airpods_state">Se connecter aux AirPods lorsque leur état est :</string>
|
||||
<string name="takeover_disconnected">Déconnectés</string>
|
||||
<string name="takeover_disconnected_desc">Les AirPods ne sont connectés à aucun appareil</string>
|
||||
<string name="takeover_idle">Inactifs</string>
|
||||
<string name="takeover_idle_desc">Un appareil est connecté à vos AirPods, mais ne lit pas de média et n\'est pas en appel</string>
|
||||
<string name="takeover_music">Lecture de média</string>
|
||||
<string name="takeover_music_desc">Un appareil lit du média via les AirPods</string>
|
||||
<string name="takeover_call">En appel</string>
|
||||
<string name="takeover_call_desc">Un appareil est en appel via les AirPods</string>
|
||||
<string name="takeover_phone_state">Se connecter aux AirPods lorsque votre téléphone :</string>
|
||||
<string name="takeover_ringing_call">Reçoit un appel</string>
|
||||
<string name="takeover_ringing_call_desc">Votre téléphone commence à sonner</string>
|
||||
<string name="takeover_media_start">Démarre la lecture média</string>
|
||||
<string name="takeover_media_start_desc">Votre téléphone commence à lire un média</string>
|
||||
<string name="undo">Annuler</string>
|
||||
<string name="customize_transparency_mode_description">Vous pouvez personnaliser le mode Transparence de vos AirPods Pro pour vous aider à entendre ce qui vous entoure.</string>
|
||||
<string name="loud_sound_reduction_description">La réduction des sons forts peut réduire activement votre exposition aux bruits ambiants forts en mode Transparence et Adaptatif. La réduction des sons forts n\'est pas active en mode Désactivé.</string>
|
||||
<string name="loud_sound_reduction">Réduction des sons forts</string>
|
||||
<string name="call_controls">Contrôle des appels</string>
|
||||
<string name="automatically_connect">Se connecter automatiquement à cet appareil</string>
|
||||
<string name="automatically_connect_description">Quand ce mode est activé, les AirPods essaieront de se connecter automatiquement à cet appareil. Sinon, ils essaieront uniquement de se connecter automatiquement au dernier appareil connecté.</string>
|
||||
<string name="sleep_detection">Mettre en pause l\'écoute au moment de s\'endormir</string>
|
||||
<string name="off_listening_mode">Mode d\'écoute Désactivé</string>
|
||||
<string name="off_listening_mode_description">Quand ce paramètre est activé, les modes d\'écoute incluront une option Désactivé. Les sons forts ne sont pas réduits en mode Désactivé.</string>
|
||||
<string name="microphone">Microphone</string>
|
||||
<string name="microphone_mode">Mode du microphone</string>
|
||||
<string name="microphone_automatic">Automatique</string>
|
||||
<string name="microphone_always_right">Toujours à droite</string>
|
||||
<string name="microphone_always_left">Toujours à gauche</string>
|
||||
<string name="answer_call">Répondre aux appels</string>
|
||||
<string name="mute_unmute">Muet / Activer le son</string>
|
||||
<string name="hang_up">Raccrocher</string>
|
||||
<string name="press_once">Appuyer une fois</string>
|
||||
<string name="press_twice">Appuyer deux fois</string>
|
||||
<string name="hearing_aid">Aide auditive</string>
|
||||
<string name="adjustments">Ajustements</string>
|
||||
<string name="swipe_to_control_amplification">Balayer pour contrôler l\'amplification</string>
|
||||
<string name="swipe_amplification_description">En mode Transparence et sans lecture média, balayez sur les commandes tactiles des AirPods Pro pour augmenter ou diminuer l\'amplification des sons environnants.</string>
|
||||
<string name="transparency_mode">Mode Transparence</string>
|
||||
<string name="customize_transparency_mode">Personnaliser le mode Transparence</string>
|
||||
<string name="press_speed">Vitesse d\'appui</string>
|
||||
<string name="press_speed_description">Ajustez la vitesse requise pour appuyer deux ou trois fois sur vos AirPods.</string>
|
||||
<string name="press_and_hold_duration">Durée d\'appui et de maintien</string>
|
||||
<string name="press_and_hold_duration_description">Ajustez la durée requise pour maintenir la pression sur vos AirPods.</string>
|
||||
<string name="volume_swipe_speed">Vitesse du balayage du volume</string>
|
||||
<string name="volume_swipe_speed_description">Pour éviter les changements de volume involontaires, sélectionnez le délai préféré entre les balayages.</string>
|
||||
<string name="equalizer">Égaliseur</string>
|
||||
<string name="apply_eq_to">Appliquer l\'EQ à</string>
|
||||
<string name="phone">Téléphone</string>
|
||||
<string name="media">Média</string>
|
||||
<string name="band_label">Bande %d</string>
|
||||
<string name="default_option">Par défaut</string>
|
||||
<string name="slower">Plus lent</string>
|
||||
<string name="slowest">Très lent</string>
|
||||
<string name="longer">Plus long</string>
|
||||
<string name="longest">Très long</string>
|
||||
<string name="darker">Plus sombre</string>
|
||||
<string name="brighter">Plus clair</string>
|
||||
<string name="less">Moins</string>
|
||||
<string name="more">Plus</string>
|
||||
<string name="amplification">Amplification</string>
|
||||
<string name="balance">Balance</string>
|
||||
<string name="tone">Tonalité</string>
|
||||
<string name="ambient_noise_reduction">Réduction des bruits ambiants</string>
|
||||
<string name="conversation_boost">Amplificateur de conversation</string>
|
||||
<string name="conversation_boost_description">L\'Amplificateur de conversation concentre les AirPods Pro sur la personne en face de vous, facilitant les conversations en face-à-face.</string>
|
||||
<string name="hearing_aid_description">Les AirPods peuvent utiliser les résultats d\'un test auditif pour améliorer la clarté des voix et des sons autour de vous.\n\nL\'aide auditive est destinée aux personnes ayant une perte auditive légère à modérée.</string>
|
||||
<string name="media_assist">Aide multimédia</string>
|
||||
<string name="media_assist_description">Les AirPods Pro peuvent utiliser les résultats d\'un test auditif pour améliorer la clarté de la musique, des vidéos et des appels.</string>
|
||||
<string name="adjust_media">Ajuster la musique et les vidéos</string>
|
||||
<string name="adjust_calls">Ajuster les appels</string>
|
||||
<string name="widget">Widget</string>
|
||||
<string name="show_phone_battery_in_widget">Afficher la batterie du téléphone dans le widget</string>
|
||||
<string name="show_phone_battery_in_widget_description">Affiche le niveau de batterie du téléphone dans le widget avec celle des AirPods</string>
|
||||
<string name="conversational_awareness_volume">Volume de détection des conversations</string>
|
||||
<string name="quick_settings_tile">Tuile des réglages rapides</string>
|
||||
<string name="open_dialog_for_controlling">Ouvrir le dialogue de contrôle</string>
|
||||
<string name="open_dialog_for_controlling_description">Si désactivé, appuyer sur la tuile fera défiler les modes. Si activé, un dialogue apparaîtra pour contrôler le mode d\'écoute et la détection de conversation.</string>
|
||||
<string name="disconnect_when_not_wearing">Déconnecter les AirPods quand ils ne sont pas portés</string>
|
||||
<string name="disconnect_when_not_wearing_description">Vous pourrez toujours les contrôler depuis l\'app — cela déconnecte juste l\'audio.</string>
|
||||
<string name="advanced_options">Options avancées</string>
|
||||
<string name="set_identity_resolving_key">Définir la clé d\'identité et de résolution (IRK)</string>
|
||||
<string name="set_identity_resolving_key_description">Définir manuellement la clé IRK utilisée pour la résolution des adresses BLE aléatoires</string>
|
||||
<string name="set_encryption_key">Définir la clé de chiffrement</string>
|
||||
<string name="set_encryption_key_description">Définir manuellement la clé ENC_KEY utilisée pour déchiffrer les publicités BLE</string>
|
||||
<string name="use_alternate_head_tracking_packets">Utiliser des paquets alternatifs pour le suivi de la tête</string>
|
||||
<string name="use_alternate_head_tracking_packets_description">Activez ceci si le suivi de tête ne fonctionne pas. Cela envoie un autre type de données aux AirPods pour demander/arrêter le suivi de la tête.</string>
|
||||
<string name="act_as_an_apple_device">Se comporter comme un appareil Apple</string>
|
||||
<string name="act_as_an_apple_device_description">Active la connectivité multi-appareils et les fonctionnalités d\'accessibilité comme la personnalisation du mode transparence (amplification, tonalité, réduction de bruit ambiant, amplificateur de conversations, EQ)</string>
|
||||
<string name="act_as_an_apple_device_warning">Peut être instable !! Un maximum de deux appareils peut être connecté à vos AirPods. Si vous utilisez un appareil Apple comme un iPad ou un Mac, connectez-le d\'abord, puis connectez votre Android.</string>
|
||||
<string name="reset_hook_offset">Réinitialiser l\'offset du hook</string>
|
||||
<string name="reset_hook_offset_description">Cela effacera l\'offset actuel et nécessitera de refaire la configuration. Voulez-vous vraiment continuer ?</string>
|
||||
<string name="reset">Réinitialiser</string>
|
||||
<string name="hook_offset_reset_success">Hook offset réinitialisé. Redirection vers la configuration…</string>
|
||||
<string name="hook_offset_reset_failure">Impossible de réinitialiser l\'hook offset</string>
|
||||
<string name="irk_set_success">Clé IRK définie avec succès</string>
|
||||
<string name="encryption_key_set_success">Clé de chiffrement définie avec succès</string>
|
||||
<string name="irk_hex_value">Valeur hex IRK</string>
|
||||
<string name="enc_key_hex_value">Valeur hex ENC_KEY</string>
|
||||
<string name="enter_irk_hex">Entrez l\'IRK de 16 octets en string hexadécimal (32 caractères) :</string>
|
||||
<string name="enter_enc_key_hex">Entrez l\'ENC_KEY de 16 octets en string hexadécimal (32 caractères) :</string>
|
||||
<string name="must_be_32_hex_chars">Doit contenir exactement 32 caractères hexadécimaux</string>
|
||||
<string name="error_converting_hex">Erreur lors de la conversion hexadécimale :</string>
|
||||
<string name="found_offset_restart_bluetooth">Offset trouvé. Veuillez redémarrer le processus Bluetooth.</string>
|
||||
<string name="digital_assistant">Assistant numérique</string>
|
||||
<string name="on">Activé</string>
|
||||
<string name="camera_remote">Télécommande de l\'appareil photo</string>
|
||||
<string name="camera_control">Contrôle de la caméra</string>
|
||||
<string name="camera_control_description">Prenez une photo, lancez/arrêtez un enregistrement, etc., avec un appui simple ou un appui long. Si vous utilisez un appui simple, les gestes de contrôle multimédia seront indisponibles ; si vous utilisez un appui long, les gestes de mode d\'écoute et d\'assistant numérique seront indisponibles.</string>
|
||||
<string name="camera_control_app_description">Définir un paquet d\'application de caméra personnalisé</string>
|
||||
<string name="set_custom_camera_package">Définir un appid de caméra personnalisé</string>
|
||||
<string name="enter_custom_camera_package">Entrez l\'identifiant de l\'application caméra :</string>
|
||||
<string name="custom_camera_package">Appid caméra personnalisé</string>
|
||||
<string name="custom_camera_package_set_success">Appid caméra personnalisé défini avec succès</string>
|
||||
<string name="app_listener_service_label">Service d\'écoute de la caméra</string>
|
||||
<string name="app_listener_service_description">Service d\'écoute pour que LibrePods détecte quand la caméra est active afin d\'activer le contrôle caméra via les AirPods.</string>
|
||||
<string name="open_source_licenses">Licences open source</string>
|
||||
<string name="hearing_test">Mettre à jour le test d\'audition</string>
|
||||
<string name="update_hearing_test">Mettre à jour les résultats du test d\'audition</string>
|
||||
<string name="att_manager_is_null_try_reconnecting">ATT Manager est null, essayez de reconnecter.</string>
|
||||
<string name="permissions_required">Les permissions suivantes sont requises pour utiliser l\'application. Veuillez les accorder pour continuer.</string>
|
||||
<string name="shake_your_head_or_nod">Secouez la tête ou hochez-la !</string>
|
||||
<string name="root_access_required">Accès root requis</string>
|
||||
<string name="this_app_needs_root_access_to_hook_onto_the_bluetooth_library">Cette application nécessite l\'accès root pour s\'injecter dans la bibliothèque Bluetooth.</string>
|
||||
<string name="root_access_denied">Accès root refusé. Veuillez accorder les permissions root.</string>
|
||||
<string name="troubleshooting_steps">Étapes de dépannage</string>
|
||||
<string name="hearing_test_value_instruction">Veuillez entrer les valeurs de perte en dBHL</string>
|
||||
<string name="about">À propos</string>
|
||||
<string name="model_name">Nom du modèle</string>
|
||||
<string name="model_number">Numéro du modèle</string>
|
||||
<string name="serial_number">Numéro de série</string>
|
||||
<string name="version">Version</string>
|
||||
<string name="hearing_health">Santé auditive</string>
|
||||
<string name="hearing_protection">Protection auditive</string>
|
||||
<string name="workspace_use">Usage en environnement de travail</string>
|
||||
<string name="ppe">Protection EN 352</string>
|
||||
<string name="workspace_use_description">La protection EN 352 limite le niveau sonore maximal à 82 dBA et répond aux exigences applicables de la norme EN 352 pour la protection auditive personnelle.</string>
|
||||
<string name="environmental_noise">Bruit environnemental</string>
|
||||
<string name="reconnect_to_last_device">Reconnecter au dernier appareil</string>
|
||||
<string name="disconnect">Déconnecter</string>
|
||||
<string name="support_me">Soutenez-moi</string>
|
||||
<string name="never_show_again">Ne plus afficher</string>
|
||||
<string name="support_dialog_description">J\'ai récemment perdu mon AirPod gauche. Si LibrePods vous est utile, pensez à me soutenir sur GitHub Sponsors pour m\'aider à en racheter un et continuer ce projet — même un petit montant aide beaucoup. Merci pour votre soutien !</string>
|
||||
<string name="support_librepods">Soutenir LibrePods</string>
|
||||
<string name="listening_mode_off_description">Désactiver la gestion du bruit</string>
|
||||
<string name="listening_mode_transparency_description">Laisser entrer les sons extérieurs</string>
|
||||
<string name="listening_mode_adaptive_description">Ajuster dynamiquement les sons extérieurs</string>
|
||||
<string name="listening_mode_noise_cancellation_description">Bloquer les sons extérieurs</string>
|
||||
</resources>
|
||||
217
android/app/src/main/res/values-pt/strings.xml
Normal file
217
android/app/src/main/res/values-pt/strings.xml
Normal file
@@ -0,0 +1,217 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">LibrePods</string>
|
||||
<string name="app_description">Libere seus AirPods do ecossistema da Apple.</string>
|
||||
<string name="app_widget_description">Veja o status da bateria dos seus AirPods diretamente na tela inicial!</string>
|
||||
<string name="accessibility">Acessibilidade</string>
|
||||
<string name="tone_volume">Volume do Tom</string>
|
||||
<string name="tone_volume_description">Ajuste o volume do tom dos efeitos sonoros reproduzidos pelos AirPods.</string>
|
||||
<string name="audio">Áudio</string>
|
||||
<string name="adaptive_audio">Áudio Adaptativo</string>
|
||||
<string name="customize_adaptive_audio">Personalizar Áudio Adaptativo</string>
|
||||
<string name="adaptive_audio_description">O áudio adaptativo responde dinamicamente ao seu ambiente e cancela ou permite ruídos externos. Você pode personalizar o Áudio Adaptativo para permitir mais ou menos ruído.</string>
|
||||
<string name="buds">Fones</string>
|
||||
<string name="case_alt">Estojo</string>
|
||||
<string name="test">Teste</string>
|
||||
<string name="name">Nome</string>
|
||||
<string name="noise_control">Modo de Escuta</string>
|
||||
<string name="off">Desligado</string>
|
||||
<string name="transparency">Transparência</string>
|
||||
<string name="adaptive">Adaptativo</string>
|
||||
<string name="noise_cancellation">Cancelamento de Ruído</string>
|
||||
<string name="press_and_hold_airpods">Pressionar e Segurar AirPods</string>
|
||||
<string name="press_and_hold_noise_control_description">Pressione e segure a haste para alternar entre os modos de escuta selecionados.</string>
|
||||
<string name="head_gestures">Gestos com a Cabeça</string>
|
||||
<string name="left">Esquerdo</string>
|
||||
<string name="right">Direito</string>
|
||||
<string name="conversational_awareness">Consciência Conversacional</string>
|
||||
<string name="conversational_awareness_description">Reduz o volume da mídia e diminui o ruído de fundo quando você começa a falar com outras pessoas.</string>
|
||||
<string name="personalized_volume">Volume Personalizado</string>
|
||||
<string name="personalized_volume_description">Ajusta o volume da mídia em resposta ao seu ambiente.</string>
|
||||
<string name="noise_cancellation_single_airpod">Cancelamento de Ruído com um AirPod</string>
|
||||
<string name="noise_cancellation_single_airpod_description">Permite que os AirPods sejam colocados em modo de cancelamento de ruído quando apenas um AirPod está no seu ouvido.</string>
|
||||
<string name="volume_control">Controle de Volume</string>
|
||||
<string name="volume_control_description">Ajuste o volume deslizando para cima ou para baixo no sensor localizado na haste dos AirPods Pro.</string>
|
||||
<string name="airpods_not_connected">AirPods não conectados</string>
|
||||
<string name="airpods_not_connected_description">Por favor, conecte seus AirPods para acessar as configurações.</string>
|
||||
<string name="back">Voltar</string>
|
||||
<string name="app_settings">Personalizações</string>
|
||||
<string name="relative_conversational_awareness_volume">Volume relativo</string>
|
||||
<string name="relative_conversational_awareness_volume_description">Reduz para uma porcentagem do volume atual em vez do volume máximo.</string>
|
||||
<string name="conversational_awareness_pause_music">Pausar Música</string>
|
||||
<string name="conversational_awareness_pause_music_description">Quando você começar a falar, a música será pausada.</string>
|
||||
<string name="appwidget_text">EXEMPLO</string>
|
||||
<string name="add_widget">Adicionar widget</string>
|
||||
<string name="noise_control_widget_description">Controle o Modo de Controle de Ruído diretamente da sua Tela Inicial.</string>
|
||||
<string name="island_connected_text">Conectado</string>
|
||||
<string name="island_connected_remote_text">Conectado ao Linux</string>
|
||||
<string name="island_taking_over_text">Conectado</string>
|
||||
<string name="island_moved_to_remote_text">Movido para Linux</string>
|
||||
<string name="island_moved_to_other_device_text">Movido para %1$s</string>
|
||||
<string name="island_moved_to_other_device_reversed_text">Reconectar pela notificação</string>
|
||||
<string name="head_tracking">Rastreamento de Cabeça</string>
|
||||
<string name="head_gestures_details">Acene para atender chamadas e balance a cabeça para recusar.</string>
|
||||
<string name="general_settings_header">Geral</string>
|
||||
<string name="qs_click_behavior_title">Ação do Bloco de Configurações Rápidas</string>
|
||||
<string name="qs_click_behavior_dialog_desc">Mostrar diálogo de controle de ruído ao tocar.</string>
|
||||
<string name="qs_click_behavior_cycle_desc">Alternar entre modos ao tocar.</string>
|
||||
<string name="developer_options_header">Desenvolvedor</string>
|
||||
<string name="more_settings_title">Abrir Configurações dos AirPods</string>
|
||||
<string name="more_settings_subtitle">Gerencie recursos e preferências dos AirPods</string>
|
||||
<string name="ear_detection">Detecção Automática de Ouvido</string>
|
||||
<string name="auto_play">Reprodução Automática</string>
|
||||
<string name="auto_pause">Pausa Automática</string>
|
||||
<string name="troubleshooting">Solução de Problemas</string>
|
||||
<string name="troubleshooting_description">Coletar logs para diagnosticar problemas com a conexão dos AirPods</string>
|
||||
<string name="collect_logs">Coletar Logs</string>
|
||||
<string name="saved_logs">Logs Salvos</string>
|
||||
<string name="no_logs_found">Nenhum log salvo encontrado</string>
|
||||
<string name="takeover_header">Preferências de Auto-conexão</string>
|
||||
<string name="takeover_airpods_state">Conectar aos seus AirPods quando o status for:</string>
|
||||
<string name="takeover_disconnected">Desconectado</string>
|
||||
<string name="takeover_disconnected_desc">Os AirPods não estão conectados a um dispositivo</string>
|
||||
<string name="takeover_idle">Inativo</string>
|
||||
<string name="takeover_idle_desc">Um dispositivo está conectado aos seus AirPods, mas não está reproduzindo mídia ou em uma chamada</string>
|
||||
<string name="takeover_music">Reproduzindo mídia</string>
|
||||
<string name="takeover_music_desc">Um dispositivo está reproduzindo mídia nos seus AirPods</string>
|
||||
<string name="takeover_call">Em chamada</string>
|
||||
<string name="takeover_call_desc">Um dispositivo está em uma chamada com seus AirPods</string>
|
||||
<string name="takeover_phone_state">Conectar aos AirPods quando seu telefone estiver:</string>
|
||||
<string name="takeover_ringing_call">Recebendo uma chamada</string>
|
||||
<string name="takeover_ringing_call_desc">Seu telefone começa a tocar</string>
|
||||
<string name="takeover_media_start">Iniciando reprodução de mídia</string>
|
||||
<string name="takeover_media_start_desc">Seu telefone começa a reproduzir mídia</string>
|
||||
<string name="undo">Desfazer</string>
|
||||
<string name="customize_transparency_mode_description">Você pode personalizar o modo de Transparência para seus AirPods Pro para ajudá-lo a ouvir o que está ao seu redor.</string>
|
||||
<string name="loud_sound_reduction_description">A Redução de Som Alto pode reduzir ativamente sua exposição a ruídos ambientais altos quando estiver nos modos Transparência e Adaptativo. A Redução de Som Alto não está ativa no modo Desligado.</string>
|
||||
<string name="loud_sound_reduction">Redução de Som Alto</string>
|
||||
<string name="call_controls">Controles de Chamada</string>
|
||||
<string name="automatically_connect">Conectar a este dispositivo automaticamente</string>
|
||||
<string name="automatically_connect_description">Quando habilitado, os AirPods tentarão conectar a este dispositivo automaticamente. Caso contrário, eles tentarão conectar automaticamente apenas quando conectados pela última vez.</string>
|
||||
<string name="sleep_detection">Pausar mídia ao adormecer</string>
|
||||
<string name="off_listening_mode">Modo de Escuta Desligado</string>
|
||||
<string name="off_listening_mode_description">Quando isso estiver ativado, os modos de escuta dos AirPods incluirão uma opção Desligado. Os níveis de som alto não são reduzidos quando o modo de escuta está definido como Desligado.</string>
|
||||
<string name="microphone">Microfone</string>
|
||||
<string name="microphone_mode">Modo do Microfone</string>
|
||||
<string name="microphone_automatic">Automático</string>
|
||||
<string name="microphone_always_right">Sempre Direito</string>
|
||||
<string name="microphone_always_left">Sempre Esquerdo</string>
|
||||
<string name="answer_call">Atender chamada</string>
|
||||
<string name="mute_unmute">Silenciar/Ativar Som</string>
|
||||
<string name="hang_up">Desligar</string>
|
||||
<string name="press_once">Pressionar Uma Vez</string>
|
||||
<string name="press_twice">Pressionar Duas Vezes</string>
|
||||
<string name="hearing_aid">Auxiliar de Audição</string>
|
||||
<string name="adjustments">Ajustes</string>
|
||||
<string name="swipe_to_control_amplification">Deslize para controlar a amplificação</string>
|
||||
<string name="swipe_amplification_description">Quando estiver no modo Transparência e nenhuma mídia estiver sendo reproduzida, deslize para cima e para baixo nos controles de toque dos seus AirPods Pro para aumentar ou diminuir a amplificação dos sons ambientais.</string>
|
||||
<string name="transparency_mode">Modo Transparência</string>
|
||||
<string name="customize_transparency_mode">Personalizar Modo Transparência</string>
|
||||
<string name="press_speed">Velocidade de Pressionamento</string>
|
||||
<string name="press_speed_description">Ajuste a velocidade necessária para pressionar duas ou três vezes nos seus AirPods.</string>
|
||||
<string name="press_and_hold_duration">Duração de Pressionar e Segurar</string>
|
||||
<string name="press_and_hold_duration_description">Ajuste a duração necessária para pressionar e segurar nos seus AirPods.</string>
|
||||
<string name="volume_swipe_speed">Velocidade de Deslize de Volume</string>
|
||||
<string name="volume_swipe_speed_description">Para evitar ajustes de volume não intencionais, selecione o tempo de espera preferido entre deslizes.</string>
|
||||
<string name="equalizer">Equalizador</string>
|
||||
<string name="apply_eq_to">Aplicar EQ a</string>
|
||||
<string name="phone">Telefone</string>
|
||||
<string name="media">Mídia</string>
|
||||
<string name="band_label">Banda %d</string>
|
||||
<string name="default_option">Padrão</string>
|
||||
<string name="slower">Mais Lento</string>
|
||||
<string name="slowest">Mais Lento</string>
|
||||
<string name="longer">Mais Longo</string>
|
||||
<string name="longest">Mais Longo</string>
|
||||
<string name="darker">Mais Escuro</string>
|
||||
<string name="brighter">Mais Claro</string>
|
||||
<string name="less">Menos</string>
|
||||
<string name="more">Mais</string>
|
||||
<string name="amplification">Amplificação</string>
|
||||
<string name="balance">Balanço</string>
|
||||
<string name="tone">Tom</string>
|
||||
<string name="ambient_noise_reduction">Redução de Ruído Ambiental</string>
|
||||
<string name="conversation_boost">Amplificação de Conversa</string>
|
||||
<string name="conversation_boost_description">A Amplificação de Conversa foca seus AirPods Pro na pessoa falando na sua frente, facilitando ouvir em uma conversa face a face.</string>
|
||||
<string name="hearing_aid_description">Os AirPods podem usar os resultados de um teste auditivo para fazer ajustes que melhoram a clareza de vozes e sons ao seu redor.\n\nO Auxiliar de Audição é destinado apenas para pessoas com perda auditiva leve a moderada percebida.</string>
|
||||
<string name="media_assist">Assistente de Mídia</string>
|
||||
<string name="media_assist_description">Os AirPods Pro podem usar os resultados de um teste auditivo para fazer ajustes que melhoram a clareza de música, vídeo e chamadas.</string>
|
||||
<string name="adjust_media">Ajustar Música e Vídeo</string>
|
||||
<string name="adjust_calls">Ajustar Chamadas</string>
|
||||
<string name="widget">Widget</string>
|
||||
<string name="show_phone_battery_in_widget">Mostrar bateria do telefone no widget</string>
|
||||
<string name="show_phone_battery_in_widget_description">Exiba o nível de bateria do seu telefone no widget junto com a bateria dos AirPods</string>
|
||||
<string name="conversational_awareness_volume">Volume de Consciência Conversacional</string>
|
||||
<string name="quick_settings_tile">Bloco de Configurações Rápidas</string>
|
||||
<string name="open_dialog_for_controlling">Abrir diálogo para controlar</string>
|
||||
<string name="open_dialog_for_controlling_description">Se desabilitado, clicar no bloco de configurações rápidas alternará entre modos. Se habilitado, mostrará um diálogo para controlar o modo de controle de ruído e a consciência conversacional</string>
|
||||
<string name="disconnect_when_not_wearing">Desconectar AirPods quando não estiver usando</string>
|
||||
<string name="disconnect_when_not_wearing_description">Você ainda poderá controlá-los com o aplicativo - isso apenas desconecta o áudio.</string>
|
||||
<string name="advanced_options">Opções Avançadas</string>
|
||||
<string name="set_identity_resolving_key">Definir Chave de Resolução de Identidade (IRK)</string>
|
||||
<string name="set_identity_resolving_key_description">Defina manualmente o valor IRK usado para resolver endereços aleatórios BLE</string>
|
||||
<string name="set_encryption_key">Definir Chave de Criptografia</string>
|
||||
<string name="set_encryption_key_description">Defina manualmente o valor ENC_KEY usado para descriptografar anúncios BLE</string>
|
||||
<string name="use_alternate_head_tracking_packets">Usar pacotes alternativos de rastreamento de cabeça</string>
|
||||
<string name="use_alternate_head_tracking_packets_description">Habilite isso se o rastreamento de cabeça não funcionar para você. Isso envia dados diferentes para os AirPods para solicitar/parar dados de rastreamento de cabeça.</string>
|
||||
<string name="act_as_an_apple_device">Agir como um dispositivo Apple</string>
|
||||
<string name="act_as_an_apple_device_description">Habilita conectividade multi-dispositivo e recursos de Acessibilidade como personalização do modo de transparência (amplificação, tom, redução de ruído ambiental, amplificação de conversa e equalizador)</string>
|
||||
<string name="act_as_an_apple_device_warning">Pode ser instável!! Um máximo de dois dispositivos pode estar conectado aos seus AirPods. Se você estiver usando com um dispositivo Apple como iPad ou Mac, então conecte esse dispositivo primeiro e depois seu Android.</string>
|
||||
<string name="reset_hook_offset">Redefinir Offset do Hook</string>
|
||||
<string name="reset_hook_offset_description">Isso limpará o offset do hook atual e exigirá que você passe pelo processo de configuração novamente. Tem certeza de que deseja continuar?</string>
|
||||
<string name="reset">Redefinir</string>
|
||||
<string name="hook_offset_reset_success">O offset do hook foi redefinido. Redirecionando para a configuração...</string>
|
||||
<string name="hook_offset_reset_failure">Falha ao redefinir o offset do hook</string>
|
||||
<string name="irk_set_success">IRK foi definido com sucesso</string>
|
||||
<string name="encryption_key_set_success">A chave de criptografia foi definida com sucesso</string>
|
||||
<string name="irk_hex_value">Valor Hexadecimal IRK</string>
|
||||
<string name="enc_key_hex_value">Valor Hexadecimal ENC_KEY</string>
|
||||
<string name="enter_irk_hex">Digite o IRK de 16 bytes como string hexadecimal (32 caracteres):</string>
|
||||
<string name="enter_enc_key_hex">Digite o ENC_KEY de 16 bytes como string hexadecimal (32 caracteres):</string>
|
||||
<string name="must_be_32_hex_chars">Deve ter exatamente 32 caracteres hexadecimais</string>
|
||||
<string name="error_converting_hex">Erro ao converter hexadecimal:</string>
|
||||
<string name="found_offset_restart_bluetooth">Offset encontrado, por favor reinicie o processo Bluetooth</string>
|
||||
<string name="digital_assistant">Assistente Digital</string>
|
||||
<string name="on">Ligado</string>
|
||||
<string name="camera_remote">Controle Remoto da Câmera</string>
|
||||
<string name="camera_control">Controle da Câmera</string>
|
||||
<string name="camera_control_description">Capture uma foto, inicie ou pare a gravação e mais usando Pressionar Uma Vez ou Pressionar e Segurar. Ao usar AirPods para ações da câmera, se você selecionar Pressionar Uma Vez, os gestos de controle de mídia estarão indisponíveis, e se você selecionar Pressionar e Segurar, os gestos de modo de escuta e Assistente Digital estarão indisponíveis.</string>
|
||||
<string name="camera_control_app_description">Defina um pacote de aplicativo personalizado para detecção de câmera</string>
|
||||
<string name="set_custom_camera_package">Definir ID do Aplicativo de Câmera Personalizado</string>
|
||||
<string name="enter_custom_camera_package">Digite o ID do aplicativo da câmera:</string>
|
||||
<string name="custom_camera_package">ID do Aplicativo de Câmera Personalizado</string>
|
||||
<string name="custom_camera_package_set_success">ID do aplicativo de câmera personalizado definido com sucesso</string>
|
||||
<string name="app_listener_service_label">Ouvinte de câmera</string>
|
||||
<string name="app_listener_service_description">Serviço de ouvinte do LibrePods para detectar quando a câmera está ativa para ativar o controle da câmera nos AirPods.</string>
|
||||
<string name="open_source_licenses">Licenças de Código Aberto</string>
|
||||
<string name="hearing_test">Atualizar Teste Auditivo</string>
|
||||
<string name="update_hearing_test">Atualizar Resultado do Teste Auditivo</string>
|
||||
<string name="att_manager_is_null_try_reconnecting">O gerenciador ATT está nulo, tente reconectar.</string>
|
||||
<string name="permissions_required">As seguintes permissões são necessárias para usar o aplicativo. Por favor, conceda-as para continuar.</string>
|
||||
<string name="shake_your_head_or_nod">Balance a cabeça ou acene!</string>
|
||||
<string name="root_access_required">Acesso Root Necessário</string>
|
||||
<string name="this_app_needs_root_access_to_hook_onto_the_bluetooth_library">Este aplicativo precisa de acesso root para conectar-se à biblioteca Bluetooth</string>
|
||||
<string name="root_access_denied">O acesso root foi negado. Por favor, conceda permissões root.</string>
|
||||
<string name="troubleshooting_steps">Etapas de Solução de Problemas</string>
|
||||
<string name="hearing_test_value_instruction">Por favor, digite os valores de perda em dbHL</string>
|
||||
<string name="about">Sobre</string>
|
||||
<string name="model_name">Nome do Modelo</string>
|
||||
<string name="model_number">Número do Modelo</string>
|
||||
<string name="serial_number">Número de Série</string>
|
||||
<string name="version">Versão</string>
|
||||
<string name="hearing_health">Saúde Auditiva</string>
|
||||
<string name="hearing_protection">Proteção Auditiva</string>
|
||||
<string name="workspace_use">Uso no Local de Trabalho</string>
|
||||
<string name="ppe">Proteção EN 352</string>
|
||||
<string name="workspace_use_description">A Proteção EN 352 limita o nível máximo de mídia a 82 dBA e atende aos requisitos aplicáveis do padrão EN 352 para proteção auditiva pessoal.</string>
|
||||
<string name="environmental_noise">Ruído Ambiental</string>
|
||||
<string name="reconnect_to_last_device">Reconectar ao último dispositivo conectado</string>
|
||||
<string name="disconnect">Desconectar</string>
|
||||
<string name="support_me">Me Apoiar</string>
|
||||
<string name="never_show_again">Nunca mostrar novamente</string>
|
||||
<string name="support_dialog_description">Recentemente perdi meu AirPod esquerdo. Se você achou o LibrePods útil, considere me apoiar no GitHub Sponsors para que eu possa comprar uma substituição e continuar trabalhando neste projeto - mesmo uma pequena quantia faz muita diferença. Obrigado pelo seu apoio!</string>
|
||||
<string name="support_librepods">Apoiar LibrePods</string>
|
||||
<string name="listening_mode_off_description">Desativa o gerenciamento de ruído</string>
|
||||
<string name="listening_mode_transparency_description">Permite sons externos</string>
|
||||
<string name="listening_mode_adaptive_description">Ajusta dinamicamente o ruído externo</string>
|
||||
<string name="listening_mode_noise_cancellation_description">Bloqueia sons externos</string>
|
||||
</resources>
|
||||
217
android/app/src/main/res/values-tr/strings.xml
Normal file
217
android/app/src/main/res/values-tr/strings.xml
Normal file
@@ -0,0 +1,217 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">LibrePods</string>
|
||||
<string name="app_description">AirPods\'unuzu Apple\'ın ekosisteminden kurtarın</string>
|
||||
<string name="app_widget_description">Ana ekranınızdan doğrudan AirPods pil durumunuzu görün!</string>
|
||||
<string name="accessibility">Erişilebilirlik</string>
|
||||
<string name="tone_volume">Ton Seviyesi</string>
|
||||
<string name="tone_volume_description">AirPods tarafından çalınan ses efektlerinin ton seviyesini ayarlayın.</string>
|
||||
<string name="audio">Ses</string>
|
||||
<string name="adaptive_audio">Uyarlanabilir Ses</string>
|
||||
<string name="customize_adaptive_audio">Uyarlanabilir Sesi Özelleştir</string>
|
||||
<string name="adaptive_audio_description">Uyarlanabilir ses, ortamınıza dinamik olarak tepki verir ve dış gürültüyü engeller veya geçirir. Uyarlanabilir Sesi daha fazla veya daha az gürültü geçirecek şekilde özelleştirebilirsiniz.</string>
|
||||
<string name="buds">Kulaklıklar</string>
|
||||
<string name="case_alt">Kılıf</string>
|
||||
<string name="test">Test</string>
|
||||
<string name="name">İsim</string>
|
||||
<string name="noise_control">Dinleme Modu</string>
|
||||
<string name="off">Kapalı</string>
|
||||
<string name="transparency">Şeffaflık</string>
|
||||
<string name="adaptive">Uyarlanabilir</string>
|
||||
<string name="noise_cancellation">Gürültü Engelleme</string>
|
||||
<string name="press_and_hold_airpods">AirPods\'a Basılı Tutun</string>
|
||||
<string name="press_and_hold_noise_control_description">Seçili dinleme modları arasında geçiş yapmak için sapı basılı tutun.</string>
|
||||
<string name="head_gestures">Kafa Hareketleri</string>
|
||||
<string name="left">Sol</string>
|
||||
<string name="right">Sağ</string>
|
||||
<string name="conversational_awareness">Konuşma Farkındalığı</string>
|
||||
<string name="conversational_awareness_description">Başkalarıyla konuşmaya başladığınızda medya sesini düşürür ve arka plan gürültüsünü azaltır.</string>
|
||||
<string name="personalized_volume">Kişiselleştirilmiş Ses</string>
|
||||
<string name="personalized_volume_description">Ortamınıza göre medya sesini ayarlar.</string>
|
||||
<string name="noise_cancellation_single_airpod">Tek AirPod ile Gürültü Engelleme</string>
|
||||
<string name="noise_cancellation_single_airpod_description">Sadece bir AirPod kulağınızdayken gürültü engelleme moduna alınmasına izin verin.</string>
|
||||
<string name="volume_control">Ses Kontrolü</string>
|
||||
<string name="volume_control_description">AirPods Pro sapında bulunan sensörde yukarı veya aşağı kaydırarak sesi ayarlayın.</string>
|
||||
<string name="airpods_not_connected">AirPods bağlı değil</string>
|
||||
<string name="airpods_not_connected_description">Ayarlara erişmek için lütfen AirPods\'unuzu bağlayın.</string>
|
||||
<string name="back">Geri</string>
|
||||
<string name="app_settings">Özelleştirmeler</string>
|
||||
<string name="relative_conversational_awareness_volume">Göreceli ses</string>
|
||||
<string name="relative_conversational_awareness_volume_description">Maksimum ses yerine mevcut sesin yüzdesine göre azaltır.</string>
|
||||
<string name="conversational_awareness_pause_music">Müziği Duraklat</string>
|
||||
<string name="conversational_awareness_pause_music_description">Konuşmaya başladığınızda müzik duraklatılacaktır.</string>
|
||||
<string name="appwidget_text">ÖRNEK</string>
|
||||
<string name="add_widget">Widget ekle</string>
|
||||
<string name="noise_control_widget_description">Gürültü Kontrol Modunu doğrudan Ana Ekranınızdan kontrol edin.</string>
|
||||
<string name="island_connected_text">Bağlı</string>
|
||||
<string name="island_connected_remote_text">Linux\'a bağlı</string>
|
||||
<string name="island_taking_over_text">Bağlı</string>
|
||||
<string name="island_moved_to_remote_text">Linux\'a taşındı</string>
|
||||
<string name="island_moved_to_other_device_text">%1$s cihazına taşındı</string>
|
||||
<string name="island_moved_to_other_device_reversed_text">Bildirimden yeniden bağlan</string>
|
||||
<string name="head_tracking">Kafa Takibi</string>
|
||||
<string name="head_gestures_details">Aramaları yanıtlamak için başınızı sallayın, reddetmek için başınızı sallayın.</string>
|
||||
<string name="general_settings_header">Genel</string>
|
||||
<string name="qs_click_behavior_title">Hızlı Ayarlar Döşemesi Eylemi</string>
|
||||
<string name="qs_click_behavior_dialog_desc">Dokunulduğunda gürültü kontrolü iletişim kutusunu göster.</string>
|
||||
<string name="qs_click_behavior_cycle_desc">Dokunulduğunda modlar arasında geçiş yap.</string>
|
||||
<string name="developer_options_header">Geliştirici</string>
|
||||
<string name="more_settings_title">AirPods Ayarlarını Aç</string>
|
||||
<string name="more_settings_subtitle">AirPods özelliklerini ve tercihlerini yönetin</string>
|
||||
<string name="ear_detection">Otomatik Kulak Algılama</string>
|
||||
<string name="auto_play">Otomatik Oynat</string>
|
||||
<string name="auto_pause">Otomatik Duraklat</string>
|
||||
<string name="troubleshooting">Sorun Giderme</string>
|
||||
<string name="troubleshooting_description">AirPods bağlantı sorunlarını teşhis etmek için log toplayın</string>
|
||||
<string name="collect_logs">Log Topla</string>
|
||||
<string name="saved_logs">Kaydedilmiş Loglar</string>
|
||||
<string name="no_logs_found">Kaydedilmiş log bulunamadı</string>
|
||||
<string name="takeover_header">Otomatik Bağlanma tercihleri</string>
|
||||
<string name="takeover_airpods_state">Durumu şu olduğunda AirPods\'unuza bağlanın:</string>
|
||||
<string name="takeover_disconnected">Bağlantı kesildi</string>
|
||||
<string name="takeover_disconnected_desc">AirPods hiçbir cihaza bağlı değil</string>
|
||||
<string name="takeover_idle">Boşta</string>
|
||||
<string name="takeover_idle_desc">Bir cihaz AirPods\'unuza bağlı, ancak medya oynatmıyor veya aramada değil</string>
|
||||
<string name="takeover_music">Medya oynatılıyor</string>
|
||||
<string name="takeover_music_desc">Bir cihaz AirPods\'unuzda medya oynatıyor</string>
|
||||
<string name="takeover_call">Aramada</string>
|
||||
<string name="takeover_call_desc">Bir cihaz AirPods\'unuzla aramada</string>
|
||||
<string name="takeover_phone_state">Telefonunuz şu durumdayken AirPods\'a bağlanın:</string>
|
||||
<string name="takeover_ringing_call">Arama alınıyor</string>
|
||||
<string name="takeover_ringing_call_desc">Telefonunuz çalmaya başlar</string>
|
||||
<string name="takeover_media_start">Medya oynatma başlıyor</string>
|
||||
<string name="takeover_media_start_desc">Telefonunuz medya oynatmaya başlar</string>
|
||||
<string name="undo">Geri Al</string>
|
||||
<string name="customize_transparency_mode_description">AirPods Pro\'nuz için Şeffaflık modunu, etrafınızdakileri duymanıza yardımcı olacak şekilde özelleştirebilirsiniz.</string>
|
||||
<string name="loud_sound_reduction_description">Yüksek Ses Azaltma, Şeffaflık ve Uyarlanabilir moddayken yüksek çevresel gürültülere maruz kalmanızı aktif olarak azaltabilir. Kapalı modda Yüksek Ses Azaltma aktif değildir.</string>
|
||||
<string name="loud_sound_reduction">Yüksek Ses Azaltma</string>
|
||||
<string name="call_controls">Arama Kontrolleri</string>
|
||||
<string name="automatically_connect">Bu cihaza otomatik olarak bağlan</string>
|
||||
<string name="automatically_connect_description">Etkinleştirildiğinde, AirPods bu cihaza otomatik olarak bağlanmaya çalışacaktır. Aksi takdirde, yalnızca son bağlandığında otomatik bağlanmaya çalışacaktır.</string>
|
||||
<string name="sleep_detection">Uykuya dalarken medyayı duraklat</string>
|
||||
<string name="off_listening_mode">Kapalı Dinleme Modu</string>
|
||||
<string name="off_listening_mode_description">Bu açıkken, AirPods dinleme modları bir Kapalı seçeneği içerecektir. Dinleme modu Kapalı olarak ayarlandığında yüksek ses seviyeleri azaltılmaz.</string>
|
||||
<string name="microphone">Mikrofon</string>
|
||||
<string name="microphone_mode">Mikrofon Modu</string>
|
||||
<string name="microphone_automatic">Otomatik</string>
|
||||
<string name="microphone_always_right">Her Zaman Sağ</string>
|
||||
<string name="microphone_always_left">Her Zaman Sol</string>
|
||||
<string name="answer_call">Aramayı yanıtla</string>
|
||||
<string name="mute_unmute">Sessize Al/Aç</string>
|
||||
<string name="hang_up">Aramayı Sonlandır</string>
|
||||
<string name="press_once">Bir Kez Bas</string>
|
||||
<string name="press_twice">İki Kez Bas</string>
|
||||
<string name="hearing_aid">İşitme Cihazı</string>
|
||||
<string name="adjustments">Ayarlamalar</string>
|
||||
<string name="swipe_to_control_amplification">Güçlendirmeyi kontrol etmek için kaydırın</string>
|
||||
<string name="swipe_amplification_description">Şeffaflık modundayken ve medya oynatılmıyorken, çevresel seslerin güçlendirmesini artırmak veya azaltmak için AirPods Pro\'nuzun Dokunmatik kontrollerinde yukarı ve aşağı kaydırın.</string>
|
||||
<string name="transparency_mode">Şeffaflık Modu</string>
|
||||
<string name="customize_transparency_mode">Şeffaflık Modunu Özelleştir</string>
|
||||
<string name="press_speed">Basma Hızı</string>
|
||||
<string name="press_speed_description">AirPods\'unuzda iki veya üç kez basmak için gereken hızı ayarlayın.</string>
|
||||
<string name="press_and_hold_duration">Basılı Tutma Süresi</string>
|
||||
<string name="press_and_hold_duration_description">AirPods\'unuzda basılı tutmak için gereken süreyi ayarlayın.</string>
|
||||
<string name="volume_swipe_speed">Ses Kaydırma Hızı</string>
|
||||
<string name="volume_swipe_speed_description">İstenmeyen ses ayarlamalarını önlemek için, kaydırmalar arasındaki tercih edilen bekleme süresini seçin.</string>
|
||||
<string name="equalizer">Ekolayzer</string>
|
||||
<string name="apply_eq_to">EQ\'yu uygula</string>
|
||||
<string name="phone">Telefon</string>
|
||||
<string name="media">Medya</string>
|
||||
<string name="band_label">Bant %d</string>
|
||||
<string name="default_option">Varsayılan</string>
|
||||
<string name="slower">Daha Yavaş</string>
|
||||
<string name="slowest">En Yavaş</string>
|
||||
<string name="longer">Daha Uzun</string>
|
||||
<string name="longest">En Uzun</string>
|
||||
<string name="darker">Daha Koyu</string>
|
||||
<string name="brighter">Daha Parlak</string>
|
||||
<string name="less">Daha Az</string>
|
||||
<string name="more">Daha Fazla</string>
|
||||
<string name="amplification">Güçlendirme</string>
|
||||
<string name="balance">Denge</string>
|
||||
<string name="tone">Ton</string>
|
||||
<string name="ambient_noise_reduction">Ortam Gürültüsü Azaltma</string>
|
||||
<string name="conversation_boost">Konuşma Güçlendirme</string>
|
||||
<string name="conversation_boost_description">Konuşma Güçlendirme, AirPods Pro\'nuzu önünüzde konuşan kişiye odaklar, yüz yüze konuşmada duymayı kolaylaştırır.</string>
|
||||
<string name="hearing_aid_description">AirPods, etrafınızdaki seslerin ve konuşmaların netliğini artıran ayarlamalar yapmak için bir işitme testinin sonuçlarını kullanabilir.\n\nİşitme Cihazı yalnızca hafif ila orta derecede işitme kaybı olan kişiler için tasarlanmıştır.</string>
|
||||
<string name="media_assist">Medya Yardımı</string>
|
||||
<string name="media_assist_description">AirPods Pro, müzik, video ve aramaların netliğini artıran ayarlamalar yapmak için bir işitme testinin sonuçlarını kullanabilir.</string>
|
||||
<string name="adjust_media">Müzik ve Videoyu Ayarla</string>
|
||||
<string name="adjust_calls">Aramaları Ayarla</string>
|
||||
<string name="widget">Widget</string>
|
||||
<string name="show_phone_battery_in_widget">Widget\'ta telefon pilini göster</string>
|
||||
<string name="show_phone_battery_in_widget_description">Widget\'ta AirPods piliyle birlikte telefonunuzun pil seviyesini göster</string>
|
||||
<string name="conversational_awareness_volume">Konuşma Farkındalığı Sesi</string>
|
||||
<string name="quick_settings_tile">Hızlı Ayarlar Döşemesi</string>
|
||||
<string name="open_dialog_for_controlling">Kontrol için iletişim kutusunu aç</string>
|
||||
<string name="open_dialog_for_controlling_description">Devre dışı bırakılırsa, Hızlı Ayarlar\'a tıklamak modlar arasında geçiş yapar. Etkinleştirilirse, gürültü kontrol modu ve konuşma farkındalığını kontrol etmek için bir iletişim kutusu gösterir</string>
|
||||
<string name="disconnect_when_not_wearing">Takmadığınızda AirPods\'u bağlantıyı kes</string>
|
||||
<string name="disconnect_when_not_wearing_description">Uygulama ile hala kontrol edebileceksiniz - bu sadece sesi keser.</string>
|
||||
<string name="advanced_options">Gelişmiş Seçenekler</string>
|
||||
<string name="set_identity_resolving_key">Kimlik Çözümleme Anahtarı (IRK) Ayarla</string>
|
||||
<string name="set_identity_resolving_key_description">BLE rastgele adreslerini çözmek için kullanılan IRK değerini manuel olarak ayarlayın</string>
|
||||
<string name="set_encryption_key">Şifreleme Anahtarı Ayarla</string>
|
||||
<string name="set_encryption_key_description">BLE duyurularını şifresini çözmek için kullanılan ENC_KEY değerini manuel olarak ayarlayın</string>
|
||||
<string name="use_alternate_head_tracking_packets">Alternatif kafa takibi paketlerini kullan</string>
|
||||
<string name="use_alternate_head_tracking_packets_description">Kafa takibi sizin için çalışmıyorsa bunu etkinleştirin. Bu, kafa takibi verilerini istemek/durdurmak için AirPods\'a farklı veriler gönderir.</string>
|
||||
<string name="act_as_an_apple_device">Apple cihazı gibi davran</string>
|
||||
<string name="act_as_an_apple_device_description">Çoklu cihaz bağlantısını ve Şeffaflık modunu özelleştirme (güçlendirme, ton, ortam gürültüsü azaltma, konuşma güçlendirme ve EQ) gibi Erişilebilirlik özelliklerini etkinleştirir</string>
|
||||
<string name="act_as_an_apple_device_warning">Kararsız olabilir!! AirPods\'unuza maksimum iki cihaz bağlanabilir. iPad veya Mac gibi bir Apple cihazıyla kullanıyorsanız, lütfen önce o cihazı, sonra Android\'inizi bağlayın.</string>
|
||||
<string name="reset_hook_offset">Kanca Ofsetini Sıfırla</string>
|
||||
<string name="reset_hook_offset_description">Bu, mevcut kanca ofsetini temizleyecek ve kurulum sürecinden tekrar geçmenizi gerektirecektir. Devam etmek istediğinizden emin misiniz?</string>
|
||||
<string name="reset">Sıfırla</string>
|
||||
<string name="hook_offset_reset_success">Kanca ofseti sıfırlandı. Kuruluma yönlendiriliyor...</string>
|
||||
<string name="hook_offset_reset_failure">Kanca ofseti sıfırlanamadı</string>
|
||||
<string name="irk_set_success">IRK başarıyla ayarlandı</string>
|
||||
<string name="encryption_key_set_success">Şifreleme anahtarı başarıyla ayarlandı</string>
|
||||
<string name="irk_hex_value">IRK Onaltılık Değeri</string>
|
||||
<string name="enc_key_hex_value">ENC_KEY Onaltılık Değeri</string>
|
||||
<string name="enter_irk_hex">16 baytlık IRK\'yi onaltılık dize olarak girin (32 karakter):</string>
|
||||
<string name="enter_enc_key_hex">16 baytlık ENC_KEY\'i onaltılık dize olarak girin (32 karakter):</string>
|
||||
<string name="must_be_32_hex_chars">Tam olarak 32 onaltılık karakter olmalıdır</string>
|
||||
<string name="error_converting_hex">Onaltılık dönüştürme hatası:</string>
|
||||
<string name="found_offset_restart_bluetooth">Ofset bulundu, lütfen Bluetooth sürecini yeniden başlatın</string>
|
||||
<string name="digital_assistant">Dijital Asistan</string>
|
||||
<string name="on">Açık</string>
|
||||
<string name="camera_remote">Kamera Uzaktan Kumandası</string>
|
||||
<string name="camera_control">Kamera Kontrolü</string>
|
||||
<string name="camera_control_description">Bir Kez Bas veya Basılı Tut kullanarak fotoğraf çekin, kaydı başlatın veya durdurun ve daha fazlasını yapın. Kamera işlemleri için AirPods kullanırken, Bir Kez Bas\'ı seçerseniz, medya kontrol hareketleri kullanılamaz ve Basılı Tut\'u seçerseniz, dinleme modu ve Dijital Asistan hareketleri kullanılamaz.</string>
|
||||
<string name="camera_control_app_description">Kamera algılama için özel uygulama paketi ayarlayın</string>
|
||||
<string name="set_custom_camera_package">Özel Kamera uygulama kimliğini ayarla</string>
|
||||
<string name="enter_custom_camera_package">Kamera uygulamasının uygulama kimliğini girin:</string>
|
||||
<string name="custom_camera_package">Özel Kamera uygulama kimliği</string>
|
||||
<string name="custom_camera_package_set_success">Özel kamera uygulama kimliği başarıyla ayarlandı</string>
|
||||
<string name="app_listener_service_label">Kamera dinleyicisi</string>
|
||||
<string name="app_listener_service_description">Kamera aktif olduğunda algılamak ve AirPods\'ta kamera kontrolünü etkinleştirmek için LibrePods dinleyici servisi.</string>
|
||||
<string name="open_source_licenses">Açık Kaynak Lisansları</string>
|
||||
<string name="hearing_test">İşitme Testini Güncelle</string>
|
||||
<string name="update_hearing_test">İşitme Testi Sonucunu Güncelle</string>
|
||||
<string name="att_manager_is_null_try_reconnecting">ATT Yöneticisi null, yeniden bağlanmayı deneyin.</string>
|
||||
<string name="permissions_required">Uygulamayı kullanmak için aşağıdaki izinler gereklidir. Devam etmek için lütfen bunları verin.</string>
|
||||
<string name="shake_your_head_or_nod">Başınızı sallayın veya başınızı sallayın!</string>
|
||||
<string name="root_access_required">Root Erişimi Gerekli</string>
|
||||
<string name="this_app_needs_root_access_to_hook_onto_the_bluetooth_library">Bu uygulama Bluetooth kütüphanesine bağlanmak için root erişimine ihtiyaç duyar</string>
|
||||
<string name="root_access_denied">Root erişimi reddedildi. Lütfen root izinlerini verin.</string>
|
||||
<string name="troubleshooting_steps">Sorun Giderme Adımları</string>
|
||||
<string name="hearing_test_value_instruction">Lütfen kayıp değerlerini dbHL cinsinden girin</string>
|
||||
<string name="about">Hakkında</string>
|
||||
<string name="model_name">Model Adı</string>
|
||||
<string name="model_number">Model Numarası</string>
|
||||
<string name="serial_number">Seri Numarası</string>
|
||||
<string name="version">Sürüm</string>
|
||||
<string name="hearing_health">İşitme Sağlığı</string>
|
||||
<string name="hearing_protection">İşitme Koruması</string>
|
||||
<string name="workspace_use">İş Yeri Kullanımı</string>
|
||||
<string name="ppe">EN 352 Koruması</string>
|
||||
<string name="workspace_use_description">EN 352 Koruması, medyanın maksimum seviyesini 82 dBA ile sınırlar ve kişisel işitme koruması için geçerli EN 352 Standart gereksinimlerini karşılar.</string>
|
||||
<string name="environmental_noise">Çevresel Gürültü</string>
|
||||
<string name="reconnect_to_last_device">Son bağlanan cihaza yeniden bağlan</string>
|
||||
<string name="disconnect">Bağlantıyı Kes</string>
|
||||
<string name="support_me">Beni destekle</string>
|
||||
<string name="never_show_again">Bir daha gösterme</string>
|
||||
<string name="support_dialog_description">Yakın zamanda sol AirPod\'umu kaybettim. LibrePods\'u faydalı bulduysanız, bir yedek satın alıp bu proje üzerinde çalışmaya devam edebilmem için GitHub Sponsors\'ta beni desteklemeyi düşünün - küçük bir miktar bile çok işe yarar. Desteğiniz için teşekkürler!</string>
|
||||
<string name="support_librepods">LibrePods\'u Destekle</string>
|
||||
<string name="listening_mode_off_description">Gürültü yönetimini kapatır</string>
|
||||
<string name="listening_mode_transparency_description">Dış sesleri içeri alır</string>
|
||||
<string name="listening_mode_adaptive_description">Dış gürültüyü dinamik olarak ayarlar</string>
|
||||
<string name="listening_mode_noise_cancellation_description">Dış sesleri engeller</string>
|
||||
</resources>
|
||||
217
android/app/src/main/res/values-uk/strings.xml
Normal file
217
android/app/src/main/res/values-uk/strings.xml
Normal file
@@ -0,0 +1,217 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">LibrePods</string>
|
||||
<string name="app_description">Звільніть ваші AirPods від екосистеми Apple</string>
|
||||
<string name="app_widget_description">Перегляньте статус батареї ваших AirPods прямо з головного екрана!</string>
|
||||
<string name="accessibility">Доступність</string>
|
||||
<string name="tone_volume">Гучність Тону</string>
|
||||
<string name="tone_volume_description">Налаштуйте гучність тону звукових ефектів, які відтворюються на AirPods.</string>
|
||||
<string name="audio">Аудіо</string>
|
||||
<string name="adaptive_audio">Адаптивний Звук</string>
|
||||
<string name="customize_adaptive_audio">Налаштувати Адаптивний Звук</string>
|
||||
<string name="adaptive_audio_description">Адаптивний звук динамічно реагує на ваше оточення та приглушує або пропускає зовнішній шум. Ви можете налаштувати Адаптивний Звук, щоб пропускати більше або менше шуму.</string>
|
||||
<string name="buds">Навушники</string>
|
||||
<string name="case_alt">Кейс</string>
|
||||
<string name="test">Тест</string>
|
||||
<string name="name">Назва</string>
|
||||
<string name="noise_control">Режим Прослуховування</string>
|
||||
<string name="off">Вимкнено</string>
|
||||
<string name="transparency">Проникність</string>
|
||||
<string name="adaptive">Адаптування</string>
|
||||
<string name="noise_cancellation">Шумогасіння</string>
|
||||
<string name="press_and_hold_airpods">Натисніть і утримуйте AirPods</string>
|
||||
<string name="press_and_hold_noise_control_description">Натисніть і утримуйте ніжку, щоб перемикатися між обраними режимами прослуховування.</string>
|
||||
<string name="head_gestures">Жести Головою</string>
|
||||
<string name="left">Лівий</string>
|
||||
<string name="right">Правий</string>
|
||||
<string name="conversational_awareness">Виявлення Розмови</string>
|
||||
<string name="conversational_awareness_description">Знижує гучність медіа та зменшує фоновий шум, коли ви починаєте говорити.</string>
|
||||
<string name="personalized_volume">Персональна Гучність</string>
|
||||
<string name="personalized_volume_description">Налаштовує гучність медіа відповідно до вашого оточення.</string>
|
||||
<string name="noise_cancellation_single_airpod">Шумогасіння з одним AirPod</string>
|
||||
<string name="noise_cancellation_single_airpod_description">Дозволяє вмикати режим шумогасіння на AirPods, коли лише один AirPod знаходиться у вашому вусі.</string>
|
||||
<string name="volume_control">Налаштування Гучності</string>
|
||||
<string name="volume_control_description">Налаштуйте гучність, проводячи вгору або вниз по сенсору, розташованому на ніжці AirPods Pro.</string>
|
||||
<string name="airpods_not_connected">AirPods не підключені</string>
|
||||
<string name="airpods_not_connected_description">Будь ласка, підключіть ваші AirPods, щоб отримати доступ до налаштувань.</string>
|
||||
<string name="back">Назад</string>
|
||||
<string name="app_settings">Персоналізація</string>
|
||||
<string name="relative_conversational_awareness_volume">Відносна гучність</string>
|
||||
<string name="relative_conversational_awareness_volume_description">Зменшує до відсотка від поточної гучності, а не від максимальної.</string>
|
||||
<string name="conversational_awareness_pause_music">Призупинити Музику</string>
|
||||
<string name="conversational_awareness_pause_music_description">Коли ви почнете говорити, музику буде призупинено.</string>
|
||||
<string name="appwidget_text">ПРИКЛАД</string>
|
||||
<string name="add_widget">Додати віджет</string>
|
||||
<string name="noise_control_widget_description">Керуйте режимом шумоконтролю прямо з головного екрана.</string>
|
||||
<string name="island_connected_text">Підключено</string>
|
||||
<string name="island_connected_remote_text">Підключено до Linux</string>
|
||||
<string name="island_taking_over_text">Підключено</string>
|
||||
<string name="island_moved_to_remote_text">Переміщено до Linux</string>
|
||||
<string name="island_moved_to_other_device_text">Переміщено до %1$s</string>
|
||||
<string name="island_moved_to_other_device_reversed_text">Перепідключитися через повідомлення</string>
|
||||
<string name="head_tracking">Відстеження Голови</string>
|
||||
<string name="head_gestures_details">Кивніть, щоб відповісти на дзвінок, і похитайте головою, щоб відхилити.</string>
|
||||
<string name="general_settings_header">Основне</string>
|
||||
<string name="qs_click_behavior_title">Дія плитки швидких налаштувань</string>
|
||||
<string name="qs_click_behavior_dialog_desc">Показати діалог шумоконтролю при натисканні.</string>
|
||||
<string name="qs_click_behavior_cycle_desc">Перемикатися між режимами при натисканні.</string>
|
||||
<string name="developer_options_header">Розробник</string>
|
||||
<string name="more_settings_title">Відкрити Налаштування AirPods</string>
|
||||
<string name="more_settings_subtitle">Керуйте функціями та налаштуваннями AirPods</string>
|
||||
<string name="ear_detection">Автоматичне Розпізнавання Вуха</string>
|
||||
<string name="auto_play">Автовідтворення</string>
|
||||
<string name="auto_pause">Автопауза</string>
|
||||
<string name="troubleshooting">Усунення несправностей</string>
|
||||
<string name="troubleshooting_description">Зібрати логи для діагностики проблем з підключенням AirPods</string>
|
||||
<string name="collect_logs">Зібрати Логи</string>
|
||||
<string name="saved_logs">Збережені Логи</string>
|
||||
<string name="no_logs_found">Збережені Логи не знайдено</string>
|
||||
<string name="takeover_header">Налаштування авто-підключення</string>
|
||||
<string name="takeover_airpods_state">Підключатися до ваших AirPods, коли їхній статус:</string>
|
||||
<string name="takeover_disconnected">Відʼєднано</string>
|
||||
<string name="takeover_disconnected_desc">AirPods не підключені до жодного пристрою</string>
|
||||
<string name="takeover_idle">Бездіяльний</string>
|
||||
<string name="takeover_idle_desc">Пристрій підключено до ваших AirPods, але не відтворює медіа і не на дзвінку</string>
|
||||
<string name="takeover_music">Відтворення медіа</string>
|
||||
<string name="takeover_music_desc">Пристрій відтворює медіа на ваших AirPods</string>
|
||||
<string name="takeover_call">На дзвінку</string>
|
||||
<string name="takeover_call_desc">Пристрій на дзвінку з вашими AirPods</string>
|
||||
<string name="takeover_phone_state">Підключатися до AirPods, коли ваш телефон:</string>
|
||||
<string name="takeover_ringing_call">Отримання дзвінка</string>
|
||||
<string name="takeover_ringing_call_desc">Ваш телефон починає дзвонити</string>
|
||||
<string name="takeover_media_start">Початок відтворення медіа</string>
|
||||
<string name="takeover_media_start_desc">Ваш телефон починає відтворювати медіа</string>
|
||||
<string name="undo">Скасувати</string>
|
||||
<string name="customize_transparency_mode_description">Ви можете налаштувати режим проникності для ваших AirPods Pro, щоб допомогти чути, що відбувається навколо.</string>
|
||||
<string name="loud_sound_reduction_description">Зменшення гучних звуків може активно зменшити вплив гучних навколишніх шумів на вас у режимах Проникності та Адаптування. Зменшення гучних звуків не активне у вимкненому режимі.</string>
|
||||
<string name="loud_sound_reduction">Зменшення гучних звуків</string>
|
||||
<string name="call_controls">Контроль дзвінків</string>
|
||||
<string name="automatically_connect">Підключатися до цього пристрою автоматично</string>
|
||||
<string name="automatically_connect_description">Коли ця опція ввімкнена, AirPods будуть автоматично підключатися до цього пристрою. Коли вимкнена, вони будуть автопідключатися лише до пристрою, до якого підключалися востаннє.</string>
|
||||
<string name="sleep_detection">Призупинити медіа при засипанні</string>
|
||||
<string name="off_listening_mode">Вимкнути режим прослуховування</string>
|
||||
<string name="off_listening_mode_description">Коли це ввімкнено, режими прослуховування AirPods будуть включати опцію «Вимкнено». Гучні звуки не зменшуються, коли режим прослуховування встановлений на «Вимкнено».</string>
|
||||
<string name="microphone">Мікрофон</string>
|
||||
<string name="microphone_mode">Режим мікрофона</string>
|
||||
<string name="microphone_automatic">Автоматичний</string>
|
||||
<string name="microphone_always_right">Завжди правий</string>
|
||||
<string name="microphone_always_left">Завжди лівий</string>
|
||||
<string name="answer_call">Відповісти на дзвінок</string>
|
||||
<string name="mute_unmute">Вимкнути/Увімкнути звук</string>
|
||||
<string name="hang_up">Завершити Дзвінок</string>
|
||||
<string name="press_once">Натиснути один раз</string>
|
||||
<string name="press_twice">Натиснути двічі</string>
|
||||
<string name="hearing_aid">Слуховий апарат</string>
|
||||
<string name="adjustments">Налаштування</string>
|
||||
<string name="swipe_to_control_amplification">Провести пальцем для керування підсиленням</string>
|
||||
<string name="swipe_amplification_description">Коли в режимі Проникності і медіа не відтворюється, проведіть пальцем вгору або вниз по сенсорних елементах керування ваших AirPods Pro, щоб збільшити або зменшити підсилення навколишніх звуків.</string>
|
||||
<string name="transparency_mode">Режим Проникності</string>
|
||||
<string name="customize_transparency_mode">Налаштувати режим проникності</string>
|
||||
<string name="press_speed">Швидкість натискання</string>
|
||||
<string name="press_speed_description">Налаштуйте швидкість, необхідну для натискання два або три рази на ваших AirPods.</string>
|
||||
<string name="press_and_hold_duration">Тривалість натискання і утримування</string>
|
||||
<string name="press_and_hold_duration_description">Налаштуйте тривалість, необхідну для натискання і утримування на ваших AirPods.</string>
|
||||
<string name="volume_swipe_speed">Швидкість проведення пальцем для гучності</string>
|
||||
<string name="volume_swipe_speed_description">Щоб запобігти ненавмисним налаштуванням гучності, виберіть бажаний час очікування між проведеннями пальцем.</string>
|
||||
<string name="equalizer">Еквалайзер</string>
|
||||
<string name="apply_eq_to">Застосувати EQ до</string>
|
||||
<string name="phone">Телефон</string>
|
||||
<string name="media">Медіа</string>
|
||||
<string name="band_label">Смуга %d</string>
|
||||
<string name="default_option">За замовчуванням</string>
|
||||
<string name="slower">Повільніше</string>
|
||||
<string name="slowest">Найповільніше</string>
|
||||
<string name="longer">Довше</string>
|
||||
<string name="longest">Найдовше</string>
|
||||
<string name="darker">Темніше</string>
|
||||
<string name="brighter">Яскравіше</string>
|
||||
<string name="less">Менше</string>
|
||||
<string name="more">Більше</string>
|
||||
<string name="amplification">Підсилення</string>
|
||||
<string name="balance">Баланс</string>
|
||||
<string name="tone">Тон</string>
|
||||
<string name="ambient_noise_reduction">Зменшення навколишнього шуму</string>
|
||||
<string name="conversation_boost">Підсилення розмови</string>
|
||||
<string name="conversation_boost_description">Підсилення розмови фокусує ваші AirPods Pro на людині, яка говорить перед вами, полегшуючи спілкування віч-на-віч.</string>
|
||||
<string name="hearing_aid_description">AirPods можуть використовувати результати тесту слуху для налаштувань, які покращують чіткість голосів та звуків навколо вас.\n\nРежим слухового апарата призначений лише для людей із легким або помірним зниженням слуху.</string>
|
||||
<string name="media_assist">Допомога з медіа</string>
|
||||
<string name="media_assist_description">AirPods Pro можуть використовувати результати тесту слуху для налаштувань, які покращують чіткість музики, відео та дзвінків.</string>
|
||||
<string name="adjust_media">Налаштувати музику та відео</string>
|
||||
<string name="adjust_calls">Налаштувати дзвінки</string>
|
||||
<string name="widget">Віджет</string>
|
||||
<string name="show_phone_battery_in_widget">Показати заряд телефону у віджеті</string>
|
||||
<string name="show_phone_battery_in_widget_description">Відображати рівень заряду вашого телефону у віджеті разом із зарядом AirPods</string>
|
||||
<string name="conversational_awareness_volume">Гучність Усвідомлення Розмови</string>
|
||||
<string name="quick_settings_tile">Плитка Швидких Налаштувань</string>
|
||||
<string name="open_dialog_for_controlling">Відкрити діалог для керування</string>
|
||||
<string name="open_dialog_for_controlling_description">Якщо вимкнено, натискання на плитку швидких налаштувань перемикатиме між режимами. Якщо ввімкнено, вона покаже діалог для керування режимом шумоконтролю та усвідомленням розмови</string>
|
||||
<string name="disconnect_when_not_wearing">Відʼєднати AirPods, коли ви їх не носите</string>
|
||||
<string name="disconnect_when_not_wearing_description">Ви все ще зможете керувати ними через додаток — це просто відʼєднує аудіо.</string>
|
||||
<string name="advanced_options">Розширені Налаштування</string>
|
||||
<string name="set_identity_resolving_key">Встановити Ключ Ідентифікації (IRK)</string>
|
||||
<string name="set_identity_resolving_key_description">Вручну встановити значення IRK, що використовується для розпізнавання випадкових адрес BLE</string>
|
||||
<string name="set_encryption_key">Встановити Ключ Шифрування</string>
|
||||
<string name="set_encryption_key_description">Вручну встановити значення ENC_KEY, що використовується для розшифровки оголошень BLE</string>
|
||||
<string name="use_alternate_head_tracking_packets">Використовувати альтернативні пакети відстеження голови</string>
|
||||
<string name="use_alternate_head_tracking_packets_description">Ввімкніть це, якщо відстеження голови не працює у вас. Це надсилає різні дані до AirPods для запиту/зупинки даних відстеження голови.</string>
|
||||
<string name="act_as_an_apple_device">Діяти як пристрій Apple</string>
|
||||
<string name="act_as_an_apple_device_description">Увімкнює багатопристроєву з\'єднаність та функції доступності, такі як налаштування режиму проникності (підсилення, тон, зменшення навколишнього шуму, підсилення розмови та еквалайзер)</string>
|
||||
<string name="act_as_an_apple_device_warning">Може бути нестабільним!! Максимум два пристрої можуть бути підключені до ваших AirPods. Якщо ви використовуєте з пристроєм Apple, таким як iPad або Mac, то спочатку підключіть цей пристрій, а потім ваш Android.</string>
|
||||
<string name="reset_hook_offset">Скинути Зміщення Хука</string>
|
||||
<string name="reset_hook_offset_description">Це очистить поточне зміщення хука та потребуватиме повторного налаштування. Ви впевнені, що хочете продовжити?</string>
|
||||
<string name="reset">Скинути</string>
|
||||
<string name="hook_offset_reset_success">Зміщення хука було скинуто. Перенаправлення до налаштування...</string>
|
||||
<string name="hook_offset_reset_failure">Не вдалося скинути зміщення хука</string>
|
||||
<string name="irk_set_success">IRK було успішно встановлено</string>
|
||||
<string name="encryption_key_set_success">Ключ шифрування було успішно встановлено</string>
|
||||
<string name="irk_hex_value">Шістнадцяткове Значення IRK</string>
|
||||
<string name="enc_key_hex_value">Шістнадцяткове Значення ENC_KEY</string>
|
||||
<string name="enter_irk_hex">Введіть 16-байтовий IRK як шістнадцятковий рядок (32 символи):</string>
|
||||
<string name="enter_enc_key_hex">Введіть 16-байтовий ENC_KEY як шістнадцятковий рядок (32 символи):</string>
|
||||
<string name="must_be_32_hex_chars">Має бути точно 32 шістнадцяткових символи</string>
|
||||
<string name="error_converting_hex">Помилка перетворення шістнадцяткового числа:</string>
|
||||
<string name="found_offset_restart_bluetooth">Знайдено зміщення, будь ласка, перезапустіть Bluetooth</string>
|
||||
<string name="digital_assistant">Цифровий Асистент</string>
|
||||
<string name="on">Увімкнено</string>
|
||||
<string name="camera_remote">Дистанційне Управління Камерою</string>
|
||||
<string name="camera_control">Управління Камерою</string>
|
||||
<string name="camera_control_description">Зробіть фото, почніть або зупиніть запис та інше, натиснувши один раз або утримавши ніжку. Коли використовуєте AirPods для керування камерою, якщо ви оберете одне натискання, жести керування медіа будуть недоступні, а якщо утримання, режими прослуховування та жести Цифрового Асистента будуть недоступні.</string>
|
||||
<string name="camera_control_app_description">Встановіть власну програму для виявлення камери</string>
|
||||
<string name="set_custom_camera_package">Встановити власний ID програми камери</string>
|
||||
<string name="enter_custom_camera_package">Введіть ID програми камери:</string>
|
||||
<string name="custom_camera_package">Власний ID програми камери</string>
|
||||
<string name="custom_camera_package_set_success">Власний ID програми камери встановлено успішно</string>
|
||||
<string name="app_listener_service_label">Слухач камери</string>
|
||||
<string name="app_listener_service_description">Служба слухача LibrePods для виявлення, коли камера активна, щоб активувати керування камерою на AirPods.</string>
|
||||
<string name="open_source_licenses">Ліцензії Відкритого Коду</string>
|
||||
<string name="hearing_test">Оновити Тест Слуху</string>
|
||||
<string name="update_hearing_test">Оновити Результат Тесту Слуху</string>
|
||||
<string name="att_manager_is_null_try_reconnecting">Менеджер АТТ відсутній, спробуйте перепідключитися.</string>
|
||||
<string name="permissions_required">Для використання додатку потрібні наступні дозволи. Будь ласка, надайте їх, щоб продовжити.</string>
|
||||
<string name="shake_your_head_or_nod">Похитайте головою або кивніть!</string>
|
||||
<string name="root_access_required">Потрібен Root-доступ</string>
|
||||
<string name="this_app_needs_root_access_to_hook_onto_the_bluetooth_library">Цей додаток потребує root-доступу, щоб підключитися до бібліотеки Bluetooth</string>
|
||||
<string name="root_access_denied">Root-доступ було відмовлено. Будь ласка, надайте root-дозволи.</string>
|
||||
<string name="troubleshooting_steps">Кроки Усунення Несправностей</string>
|
||||
<string name="hearing_test_value_instruction">Будь ласка, введіть значення втрат у дБНС</string>
|
||||
<string name="about">Про додаток</string>
|
||||
<string name="model_name">Назва Моделі</string>
|
||||
<string name="model_number">Номер Моделі</string>
|
||||
<string name="serial_number">Серійний Номер</string>
|
||||
<string name="version">Версія</string>
|
||||
<string name="hearing_health">Здоров\'я Слуху</string>
|
||||
<string name="hearing_protection">Захист Слуху</string>
|
||||
<string name="workspace_use">Використання На Робочому Місці</string>
|
||||
<string name="ppe">Захист EN 352</string>
|
||||
<string name="workspace_use_description">Захист EN 352 обмежує максимальний рівень медіа до 82 дБА та відповідає застосовним стандартам EN 352 для особистого захисту слуху.</string>
|
||||
<string name="environmental_noise">Навколишній Шум</string>
|
||||
<string name="reconnect_to_last_device">Перепідключитися до останнього підключеного пристрою</string>
|
||||
<string name="disconnect">Відʼєднатися</string>
|
||||
<string name="support_me">Підтримати мене</string>
|
||||
<string name="never_show_again">Ніколи не показувати знову</string>
|
||||
<string name="support_dialog_description">Нещодавно я втратив свій лівий AirPod. Якщо LibrePods виявилися корисними для вас, розгляньте можливість підтримати мене на GitHub Sponsors, щоб я міг купити заміну та продовжити роботу над цим проектом — навіть невелика допомога має велике значення. Дякую за вашу підтримку!</string>
|
||||
<string name="support_librepods">Підтримати LibrePods</string>
|
||||
<string name="listening_mode_off_description">Вимикає керування шумом</string>
|
||||
<string name="listening_mode_transparency_description">Пропускає зовнішні звуки</string>
|
||||
<string name="listening_mode_adaptive_description">Динамічно налаштовує зовнішній шум</string>
|
||||
<string name="listening_mode_noise_cancellation_description">Блокує зовнішні звуки</string>
|
||||
</resources>
|
||||
217
android/app/src/main/res/values-vi/strings.xml
Normal file
217
android/app/src/main/res/values-vi/strings.xml
Normal file
@@ -0,0 +1,217 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">LibrePods</string>
|
||||
<string name="app_description">Sử dụng AirPods của bạn mà không cần hệ sinh thái của Apple.</string>
|
||||
<string name="app_widget_description">Xem trạng thái pin AirPods trên màn hình chính!</string>
|
||||
<string name="accessibility">Trợ năng</string>
|
||||
<string name="tone_volume">Âm lượng âm báo</string>
|
||||
<string name="tone_volume_description">Điều chỉnh âm lượng của hiệu ứng âm thanh do AirPods phát ra.</string>
|
||||
<string name="audio">Âm thanh</string>
|
||||
<string name="adaptive_audio">Âm thanh thích ứng</string>
|
||||
<string name="customize_adaptive_audio">Tùy chỉnh âm thanh thích ứng</string>
|
||||
<string name="adaptive_audio_description">Âm thanh thích ứng tự động phản ứng với môi trường xung quanh và chặn hoặc cho phép tiếng ồn bên ngoài. Bạn có thể tùy chỉnh Âm thanh thích ứng để cho phép nhiều hoặc ít tiếng ồn hơn.</string>
|
||||
<string name="buds">Tai nghe</string>
|
||||
<string name="case_alt">Hộp sạc</string>
|
||||
<string name="test">Kiểm tra</string>
|
||||
<string name="name">Tên</string>
|
||||
<string name="noise_control">Chế độ nghe</string>
|
||||
<string name="off">Tắt</string>
|
||||
<string name="transparency">Xuyên âm</string>
|
||||
<string name="adaptive">Thích ứng</string>
|
||||
<string name="noise_cancellation">Chống ồn chủ động</string>
|
||||
<string name="press_and_hold_airpods">Nhấn và giữ AirPods</string>
|
||||
<string name="press_and_hold_noise_control_description">Nhấn và giữ thân tai nghe để chuyển giữa các chế độ nghe đã chọn.</string>
|
||||
<string name="head_gestures">Cử chỉ đầu</string>
|
||||
<string name="left">Trái</string>
|
||||
<string name="right">Phải</string>
|
||||
<string name="conversational_awareness">Phát hiện giọng nói</string>
|
||||
<string name="conversational_awareness_description">Tự động bật chế độ xuyên âm khi bạn bắt đầu nói chuyện với người khác.</string>
|
||||
<string name="personalized_volume">Âm lượng cá nhân hóa</string>
|
||||
<string name="personalized_volume_description">Điều chỉnh âm lượng Media phù hợp với môi trường xung quanh.</string>
|
||||
<string name="noise_cancellation_single_airpod">Chống ồn với một bên tai nghe</string>
|
||||
<string name="noise_cancellation_single_airpod_description">Cho phép AirPods bật chế độ chống ồn ngay cả khi chỉ sử dụng một bên tai nghe.</string>
|
||||
<string name="volume_control">Điều khiển âm lượng</string>
|
||||
<string name="volume_control_description">Điều chỉnh âm lượng bằng cách vuốt lên hoặc xuống trên cảm biến nằm ở thân tai nghe.</string>
|
||||
<string name="airpods_not_connected">AirPods chưa được kết nối</string>
|
||||
<string name="airpods_not_connected_description">Vui lòng kết nối đến AirPods của bạn để truy cập cài đặt.</string>
|
||||
<string name="back">Quay lại</string>
|
||||
<string name="app_settings">Tùy chỉnh</string>
|
||||
<string name="relative_conversational_awareness_volume">Âm lượng tương đối</string>
|
||||
<string name="relative_conversational_awareness_volume_description">Giảm xuống phần trăm của âm lượng hiện tại thay vì âm lượng tối đa.</string>
|
||||
<string name="conversational_awareness_pause_music">Tạm dừng nhạc</string>
|
||||
<string name="conversational_awareness_pause_music_description">Khi bạn nói, nhạc sẽ bị tạm dừng.</string>
|
||||
<string name="appwidget_text">EXAMPLE</string>
|
||||
<string name="add_widget">Thêm widget</string>
|
||||
<string name="noise_control_widget_description">Điều khiển chế độ chống ồn trực tiếp từ màn hình chính.</string>
|
||||
<string name="island_connected_text">Đã kết nối</string>
|
||||
<string name="island_connected_remote_text">Đã kết nối với Linux</string>
|
||||
<string name="island_taking_over_text">Đã kết nối</string>
|
||||
<string name="island_moved_to_remote_text">Đã chuyển sang Linux</string>
|
||||
<string name="island_moved_to_other_device_text">Đã chuyển sang %1$s</string>
|
||||
<string name="island_moved_to_other_device_reversed_text">Kết nối lại từ thông báo</string>
|
||||
<string name="head_tracking">Theo dõi chuyển động đầu</string>
|
||||
<string name="head_gestures_details">Gật đầu để trả lời cuộc gọi, và lắc đầu để từ chối.</string>
|
||||
<string name="general_settings_header">Chung</string>
|
||||
<string name="qs_click_behavior_title">Hành động ô cài đặt nhanh</string>
|
||||
<string name="qs_click_behavior_dialog_desc">Hiển thị hộp thoại kiểm soát tiếng ồn khi chạm.</string>
|
||||
<string name="qs_click_behavior_cycle_desc">Chuyển đổi qua các chế độ khi chạm.</string>
|
||||
<string name="developer_options_header">Tùy chọn nhà phát triển</string>
|
||||
<string name="more_settings_title">Mở cài đặt AirPods</string>
|
||||
<string name="more_settings_subtitle">Quản lý tính năng và tùy chọn AirPods</string>
|
||||
<string name="ear_detection">Tự động phát hiện đeo tai nghe</string>
|
||||
<string name="auto_play">Tự động phát</string>
|
||||
<string name="auto_pause">Tự động tạm dừng</string>
|
||||
<string name="troubleshooting">Khắc phục sự cố</string>
|
||||
<string name="troubleshooting_description">Thu thập nhật ký để chẩn đoán sự cố kết nối AirPods</string>
|
||||
<string name="collect_logs">Thu thập nhật ký</string>
|
||||
<string name="saved_logs">Nhật ký đã lưu</string>
|
||||
<string name="no_logs_found">Không tìm thấy nhật ký đã lưu</string>
|
||||
<string name="takeover_header">Tùy chọn tự động kết nối</string>
|
||||
<string name="takeover_airpods_state">Kết nối với AirPods khi trạng thái là:</string>
|
||||
<string name="takeover_disconnected">Đã ngắt kết nối</string>
|
||||
<string name="takeover_disconnected_desc">AirPods không kết nối với thiết bị nào</string>
|
||||
<string name="takeover_idle">Rảnh tay</string>
|
||||
<string name="takeover_idle_desc">AirPods đã kết nối tới thiết bị nhưng không phát Media hoặc đang gọi</string>
|
||||
<string name="takeover_music">Đang phát Media</string>
|
||||
<string name="takeover_music_desc">AirPods đang phát Media</string>
|
||||
<string name="takeover_call">Đang gọi</string>
|
||||
<string name="takeover_call_desc">AirPods được dùng với cuộc gọi</string>
|
||||
<string name="takeover_phone_state">Kết nối với AirPods khi điện thoại:</string>
|
||||
<string name="takeover_ringing_call">Nhận cuộc gọi</string>
|
||||
<string name="takeover_ringing_call_desc">Điện thoại bắt đầu đổ chuông</string>
|
||||
<string name="takeover_media_start">Bắt đầu phát Media</string>
|
||||
<string name="takeover_media_start_desc">Điện thoại bắt đầu phát Media</string>
|
||||
<string name="undo">Hoàn tác</string>
|
||||
<string name="customize_transparency_mode_description">Bạn có thể tùy chỉnh chế độ xuyên âm cho AirPods để giúp bạn nghe những gì xung quanh.</string>
|
||||
<string name="loud_sound_reduction_description">Giảm âm thanh lớn có thể chủ động giảm tiếp xúc với tiếng ồn môi trường lớn khi ở chế độ xuyên âm và Thích ứng. Giảm âm thanh lớn không hoạt động ở chế độ Tắt.</string>
|
||||
<string name="loud_sound_reduction">Giảm âm thanh lớn</string>
|
||||
<string name="call_controls">Điều khiển cuộc gọi</string>
|
||||
<string name="automatically_connect">Tự động kết nối với thiết bị này</string>
|
||||
<string name="automatically_connect_description">Khi bật, AirPods sẽ cố gắng tự động kết nối với thiết bị này. Nếu không, chúng sẽ chỉ tự động kết nối khi đã kết nối lần cuối.</string>
|
||||
<string name="sleep_detection">Tạm dừng Media khi ngủ</string>
|
||||
<string name="off_listening_mode">Chế độ nghe Tắt</string>
|
||||
<string name="off_listening_mode_description">Khi bật, các chế độ nghe của AirPods sẽ bao gồm tùy chọn Tắt. Mức âm thanh lớn không được giảm khi chế độ nghe được đặt thành Tắt.</string>
|
||||
<string name="microphone">Micro</string>
|
||||
<string name="microphone_mode">Chế độ micro</string>
|
||||
<string name="microphone_automatic">Tự động</string>
|
||||
<string name="microphone_always_right">Micro luôn ở bên phải</string>
|
||||
<string name="microphone_always_left">Micro luôn ở bên trái</string>
|
||||
<string name="answer_call">Trả lời cuộc gọi</string>
|
||||
<string name="mute_unmute">Bật/tắt tiếng</string>
|
||||
<string name="hang_up">Kết thúc cuộc gọi</string>
|
||||
<string name="press_once">Nhấn một lần</string>
|
||||
<string name="press_twice">Nhấn hai lần</string>
|
||||
<string name="hearing_aid">Trợ thính</string>
|
||||
<string name="adjustments">Điều chỉnh</string>
|
||||
<string name="swipe_to_control_amplification">Vuốt để điều khiển âm thanh xung quanh</string>
|
||||
<string name="swipe_amplification_description">Khi ở chế độ xuyên âm và không phát Media, vuốt lên và xuống trên điều khiển cảm ứng của AirPods để tăng hoặc giảm độ âm thanh xung quanh.</string>
|
||||
<string name="transparency_mode">Chế độ Xuyên âm</string>
|
||||
<string name="customize_transparency_mode">Tùy chỉnh chế độ xuyên âm</string>
|
||||
<string name="press_speed">Tốc độ nhấn</string>
|
||||
<string name="press_speed_description">Điều chỉnh tốc độ cần thiết để nhấn hai hoặc ba lần trên AirPods.</string>
|
||||
<string name="press_and_hold_duration">Thời gian nhấn và giữ</string>
|
||||
<string name="press_and_hold_duration_description">Để điều chỉnh thời gian cần thiết, nhấn và giữ trên AirPods.</string>
|
||||
<string name="volume_swipe_speed">Tốc độ vuốt âm lượng</string>
|
||||
<string name="volume_swipe_speed_description">Để tránh điều chỉnh âm lượng ngoài ý muốn, hãy chọn thời gian chờ giữa các lần vuốt.</string>
|
||||
<string name="equalizer">Bộ chỉnh âm</string>
|
||||
<string name="apply_eq_to">Áp dụng EQ cho</string>
|
||||
<string name="phone">Điện thoại</string>
|
||||
<string name="media">Media</string>
|
||||
<string name="band_label">Dải %d</string>
|
||||
<string name="default_option">Mặc định</string>
|
||||
<string name="slower">Chậm hơn</string>
|
||||
<string name="slowest">Chậm nhất</string>
|
||||
<string name="longer">Lâu hơn</string>
|
||||
<string name="longest">Lâu nhất</string>
|
||||
<string name="darker">Tối hơn</string>
|
||||
<string name="brighter">Sáng hơn</string>
|
||||
<string name="less">Ít hơn</string>
|
||||
<string name="more">Nhiều hơn</string>
|
||||
<string name="amplification">Khuếch đại</string>
|
||||
<string name="balance">Cân bằng</string>
|
||||
<string name="tone">Âm sắc</string>
|
||||
<string name="ambient_noise_reduction">Giảm tiếng ồn xung quanh</string>
|
||||
<string name="conversation_boost">Tăng cường hội thoại</string>
|
||||
<string name="conversation_boost_description">Chế độ Tăng cường hội thoại giúp AirPods tập trung vào người đang nói trước mặt bạn, giúp dễ nghe hơn trong cuộc trò chuyện trực tiếp.</string>
|
||||
<string name="hearing_aid_description">AirPods có thể sử dụng kết quả của bài kiểm tra thính lực để thực hiện điều chỉnh cải thiện độ rõ của giọng nói và âm thanh xung quanh.\n\nTrợ thính chỉ dành cho người bị giảm thính lực nhẹ đến trung bình.</string>
|
||||
<string name="media_assist">Hỗ trợ Media</string>
|
||||
<string name="media_assist_description">AirPods có thể sử dụng kết quả của bài kiểm tra thính lực để thực hiện điều chỉnh cải thiện độ rõ của âm nhạc, video và cuộc gọi.</string>
|
||||
<string name="adjust_media">Điều chỉnh Media</string>
|
||||
<string name="adjust_calls">Điều chỉnh cuộc gọi</string>
|
||||
<string name="widget">Widget</string>
|
||||
<string name="show_phone_battery_in_widget">Hiển thị pin điện thoại trong widget</string>
|
||||
<string name="show_phone_battery_in_widget_description">Hiển thị pin điện thoại trong widget cùng với pin AirPods</string>
|
||||
<string name="conversational_awareness_volume">Âm lượng nhận biết hội thoại</string>
|
||||
<string name="quick_settings_tile">Ô cài đặt nhanh</string>
|
||||
<string name="open_dialog_for_controlling">Mở hộp thoại để điều khiển</string>
|
||||
<string name="open_dialog_for_controlling_description">Nếu tắt, nhấp vào QS sẽ chuyển đổi qua các chế độ. Nếu bật, nó sẽ hiển thị hộp thoại để điều khiển chế độ chống ồn và nhận biết hội thoại</string>
|
||||
<string name="disconnect_when_not_wearing">Ngắt kết nối AirPods khi không đeo</string>
|
||||
<string name="disconnect_when_not_wearing_description">Bạn vẫn có thể điều khiển chúng bằng ứng dụng - điều này chỉ ngắt kết nối âm thanh.</string>
|
||||
<string name="advanced_options">Tùy chọn nâng cao</string>
|
||||
<string name="set_identity_resolving_key">Đặt khóa phân giải danh tính (IRK)</string>
|
||||
<string name="set_identity_resolving_key_description">Đặt thủ công giá trị IRK được sử dụng để phân giải địa chỉ ngẫu nhiên BLE</string>
|
||||
<string name="set_encryption_key">Đặt khóa mã hóa</string>
|
||||
<string name="set_encryption_key_description">Đặt thủ công giá trị ENC_KEY được sử dụng để giải mã quảng cáo BLE</string>
|
||||
<string name="use_alternate_head_tracking_packets">Sử dụng gói theo dõi đầu thay thế</string>
|
||||
<string name="use_alternate_head_tracking_packets_description">Bật tính năng này nếu theo dõi chuyển động đầu không hoạt động. Điều này gửi dữ liệu khác đến AirPods để yêu cầu/dừng dữ liệu theo dõi chuyển động đầu.</string>
|
||||
<string name="act_as_an_apple_device">Hoạt động như thiết bị Apple</string>
|
||||
<string name="act_as_an_apple_device_description">Bật kết nối đa thiết bị và các tính năng Trợ năng như tùy chỉnh chế độ xuyên âm (khuếch đại, âm sắc, giảm tiếng ồn môi trường, tăng cường hội thoại và EQ)</string>
|
||||
<string name="act_as_an_apple_device_warning">Có thể không ổn định!! Tối đa hai thiết bị có thể kết nối với AirPods của bạn. Nếu bạn đang sử dụng với thiết bị Apple như iPad hoặc Mac, vui lòng kết nối thiết bị đó trước rồi mới đến Android.</string>
|
||||
<string name="reset_hook_offset">Đặt lại độ lệch hook</string>
|
||||
<string name="reset_hook_offset_description">Thao tác này sẽ xóa độ lệch hook hiện tại và yêu cầu bạn thực hiện lại quy trình thiết lập. Bạn có chắc chắn muốn tiếp tục?</string>
|
||||
<string name="reset">Đặt lại</string>
|
||||
<string name="hook_offset_reset_success">Đã đặt lại độ lệch hook. Đang chuyển hướng đến thiết lập...</string>
|
||||
<string name="hook_offset_reset_failure">Không thể đặt lại độ lệch hook</string>
|
||||
<string name="irk_set_success">Đã đặt IRK thành công</string>
|
||||
<string name="encryption_key_set_success">Đã đặt khóa mã hóa thành công</string>
|
||||
<string name="irk_hex_value">Giá trị Hex IRK</string>
|
||||
<string name="enc_key_hex_value">Giá trị Hex ENC_KEY</string>
|
||||
<string name="enter_irk_hex">Nhập IRK 16 byte dưới dạng chuỗi hex (32 ký tự):</string>
|
||||
<string name="enter_enc_key_hex">Nhập ENC_KEY 16 byte dưới dạng chuỗi hex (32 ký tự):</string>
|
||||
<string name="must_be_32_hex_chars">Phải chính xác 32 ký tự hex</string>
|
||||
<string name="error_converting_hex">Lỗi chuyển đổi hex:</string>
|
||||
<string name="found_offset_restart_bluetooth">Đã tìm thấy độ lệch, vui lòng khởi động lại tiến trình Bluetooth</string>
|
||||
<string name="digital_assistant">Trợ lý kỹ thuật số</string>
|
||||
<string name="on">Bật</string>
|
||||
<string name="camera_remote">Điều khiển máy ảnh từ xa</string>
|
||||
<string name="camera_control">Điều khiển máy ảnh</string>
|
||||
<string name="camera_control_description">Chụp ảnh, bắt đầu hoặc dừng quay video và nhiều hơn nữa bằng cách Nhấn một lần hoặc Nhấn và giữ. Khi sử dụng AirPods cho các hành động máy ảnh, nếu bạn chọn Nhấn một lần, cử chỉ điều khiển Media sẽ không khả dụng và nếu bạn chọn Nhấn và giữ, các cử chỉ chế độ nghe và Trợ lý kỹ thuật số sẽ không khả dụng.</string>
|
||||
<string name="camera_control_app_description">Đặt gói ứng dụng tùy chỉnh để phát hiện máy ảnh</string>
|
||||
<string name="set_custom_camera_package">Đặt ID ứng dụng máy ảnh tùy chỉnh</string>
|
||||
<string name="enter_custom_camera_package">Nhập ID ứng dụng của ứng dụng máy ảnh:</string>
|
||||
<string name="custom_camera_package">ID ứng dụng máy ảnh tùy chỉnh</string>
|
||||
<string name="custom_camera_package_set_success">Đã đặt ID ứng dụng máy ảnh tùy chỉnh thành công</string>
|
||||
<string name="app_listener_service_label">Trình lắng nghe máy ảnh</string>
|
||||
<string name="app_listener_service_description">Dịch vụ lắng nghe để LibrePods phát hiện khi máy ảnh đang hoạt động để kích hoạt điều khiển máy ảnh trên AirPods.</string>
|
||||
<string name="open_source_licenses">Giấy phép mã nguồn mở</string>
|
||||
<string name="hearing_test">Cập nhật bài kiểm tra thính lực</string>
|
||||
<string name="update_hearing_test">Cập nhật kết quả kiểm tra thính lực</string>
|
||||
<string name="att_manager_is_null_try_reconnecting">Trình quản lý ATT là null, thử kết nối lại.</string>
|
||||
<string name="permissions_required">Các quyền sau là cần thiết để sử dụng ứng dụng. Vui lòng cấp chúng để tiếp tục.</string>
|
||||
<string name="shake_your_head_or_nod">Lắc đầu hoặc gật đầu!</string>
|
||||
<string name="root_access_required">Yêu cầu quyền truy cập root</string>
|
||||
<string name="this_app_needs_root_access_to_hook_onto_the_bluetooth_library">Ứng dụng này cần quyền truy cập root để hook vào thư viện Bluetooth</string>
|
||||
<string name="root_access_denied">Quyền truy cập root đã bị từ chối. Vui lòng cấp quyền root.</string>
|
||||
<string name="troubleshooting_steps">Các bước khắc phục sự cố</string>
|
||||
<string name="hearing_test_value_instruction">Vui lòng nhập giá trị mất thính lực tính bằng dbHL</string>
|
||||
<string name="about">Giới thiệu</string>
|
||||
<string name="model_name">Tên sản phẩm</string>
|
||||
<string name="model_number">Số kiểu</string>
|
||||
<string name="serial_number">Số sê-ri</string>
|
||||
<string name="version">Phiên bản</string>
|
||||
<string name="hearing_health">Sức khỏe thính giác</string>
|
||||
<string name="hearing_protection">Bảo vệ thính giác</string>
|
||||
<string name="workspace_use">Sử dụng nơi làm việc</string>
|
||||
<string name="ppe">Bảo vệ EN 352</string>
|
||||
<string name="workspace_use_description">Bảo vệ EN 352 giới hạn mức tối đa của Media ở 82 dBA và đáp ứng các yêu cầu Tiêu chuẩn EN 352 hiện hành về bảo vệ thính giác cá nhân.</string>
|
||||
<string name="environmental_noise">Tiếng ồn môi trường</string>
|
||||
<string name="reconnect_to_last_device">Kết nối lại với thiết bị được kết nối lần cuối</string>
|
||||
<string name="disconnect">Ngắt kết nối</string>
|
||||
<string name="support_me">Hỗ trợ tôi</string>
|
||||
<string name="never_show_again">Không hiển thị lại</string>
|
||||
<string name="support_dialog_description">Gần đây tôi bị mất tai bên trái của AirPod. Nếu bạn thấy LibrePods hữu ích, hãy cân nhắc hỗ trợ tôi trên GitHub Sponsors để tôi có thể mua cái thay thế và tiếp tục làm việc trên dự án này - ngay cả một khoản nhỏ cũng rất có ý nghĩa. Cảm ơn sự hỗ trợ của bạn!</string>
|
||||
<string name="support_librepods">Hỗ trợ LibrePods</string>
|
||||
<string name="listening_mode_off_description">Tắt quản lý tiếng ồn</string>
|
||||
<string name="listening_mode_transparency_description">Cho phép âm thanh bên ngoài</string>
|
||||
<string name="listening_mode_adaptive_description">Điều chỉnh động tiếng ồn bên ngoài</string>
|
||||
<string name="listening_mode_noise_cancellation_description">Chặn âm thanh bên ngoài</string>
|
||||
</resources>
|
||||
@@ -194,6 +194,11 @@
|
||||
<string name="root_access_denied">Root 权限被拒绝。请授予 Root 权限。</string>
|
||||
<string name="troubleshooting_steps">故障排除步骤</string>
|
||||
<string name="hearing_test_value_instruction">请输入 dbHL 中的损失值</string>
|
||||
<string name="about">关于</string>
|
||||
<string name="model_name">型号名称</string>
|
||||
<string name="model_number">型号编号</string>
|
||||
<string name="serial_number">序列号</string>
|
||||
<string name="version">版本</string>
|
||||
<string name="hearing_health">听力健康</string>
|
||||
<string name="hearing_protection">听力保护</string>
|
||||
<string name="workspace_use">工作区使用</string>
|
||||
@@ -202,6 +207,12 @@
|
||||
<string name="environmental_noise">环境噪音</string>
|
||||
<string name="reconnect_to_last_device">重新连接到上次连接的设备</string>
|
||||
<string name="disconnect">断开连接</string>
|
||||
<string name="support_me">支持我</string>
|
||||
<string name="never_show_again">不再显示</string>
|
||||
<string name="support_dialog_description">我最近丢了我的左耳 AirPod。如果你觉得 LibrePods 有用,请考虑在 GitHub Sponsors 上支持我,这样我就可以购买一个替换品并继续从事这个项目——即使是少量捐助也能发挥很大作用。感谢你的支持!</string>
|
||||
<string name="support_librepods">支持 LibrePods</string>
|
||||
<string name="listening_mode_off_description">关闭噪音管理</string>
|
||||
<string name="listening_mode_transparency_description">允许外部声音进入</string>
|
||||
<string name="listening_mode_adaptive_description">动态调整外部噪音</string>
|
||||
<string name="listening_mode_noise_cancellation_description">阻隔外部声音</string>
|
||||
</resources>
|
||||
219
android/app/src/main/res/values-zh-rTW/strings.xml
Normal file
219
android/app/src/main/res/values-zh-rTW/strings.xml
Normal file
@@ -0,0 +1,219 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">LibrePods</string>
|
||||
<string name="app_description">讓你的 AirPods 擺脫 Apple 生態系統的束縛。</string>
|
||||
<string name="app_widget_description">直接從主畫面查看 AirPods 電池狀態!</string>
|
||||
<string name="accessibility">輔助使用</string>
|
||||
<string name="tone_volume">提示音音量</string>
|
||||
<string name="tone_volume_description">調整 AirPods 播放音效的提示音音量。</string>
|
||||
<string name="audio">音訊</string>
|
||||
<string name="adaptive_audio">自適應音訊</string>
|
||||
<string name="customize_adaptive_audio">自訂自適應音訊</string>
|
||||
<string name="adaptive_audio_description">自適應音訊會動態回應你的環境,並消除或允許外部噪音。你可以自訂自適應音訊以允許更多或更少的噪音。</string>
|
||||
<string name="buds">耳機</string>
|
||||
<string name="case_alt">充電盒</string>
|
||||
<string name="test">測試</string>
|
||||
<string name="name">名稱</string>
|
||||
<string name="noise_control">聽覺模式</string>
|
||||
<string name="off">關閉</string>
|
||||
<string name="transparency">通透模式</string>
|
||||
<string name="adaptive">自適應</string>
|
||||
<string name="noise_cancellation">降噪</string>
|
||||
<string name="press_and_hold_airpods">按住 AirPods</string>
|
||||
<string name="press_and_hold_noise_control_description">按住耳機柄即可在選定的聽覺模式之間循環切換。</string>
|
||||
<string name="head_gestures">頭部手勢</string>
|
||||
<string name="left">左耳</string>
|
||||
<string name="right">右耳</string>
|
||||
<string name="conversational_awareness">對話感知</string>
|
||||
<string name="conversational_awareness_description">當你開始與他人交談時,降低媒體音量並減少背景噪音。</string>
|
||||
<string name="personalized_volume">個人化音量</string>
|
||||
<string name="personalized_volume_description">根據你的環境調整媒體音量。</string>
|
||||
<string name="noise_cancellation_single_airpod">使用一只 AirPod 進行降噪</string>
|
||||
<string name="noise_cancellation_single_airpod_description">允許在僅配戴一只 AirPod 時進入降噪模式。</string>
|
||||
<string name="volume_control">音量控制</string>
|
||||
<string name="volume_control_description">透過在 AirPods Pro 耳機柄上的感測器向上或向下滑動來調整音量。</string>
|
||||
<string name="airpods_not_connected">未連接 AirPods</string>
|
||||
<string name="airpods_not_connected_description">請連接你的 AirPods 以存取設定。</string>
|
||||
<string name="back">返回</string>
|
||||
<string name="app_settings">自訂</string>
|
||||
<string name="relative_conversational_awareness_volume">相對音量</string>
|
||||
<string name="relative_conversational_awareness_volume_description">降低至當前音量的百分比,而不是最大音量。</string>
|
||||
<string name="conversational_awareness_pause_music">暫停音樂</string>
|
||||
<string name="conversational_awareness_pause_music_description">當你開始說話時,音樂將會暫停。</string>
|
||||
<string name="appwidget_text">範例</string>
|
||||
<string name="add_widget">新增小工具</string>
|
||||
<string name="noise_control_widget_description">直接從主畫面控制聽覺模式。</string>
|
||||
<string name="island_connected_text">已連線</string>
|
||||
<string name="island_connected_remote_text">已連線至 Linux</string>
|
||||
<string name="island_taking_over_text">已連線</string>
|
||||
<string name="island_moved_to_remote_text">已移至 Linux</string>
|
||||
<string name="island_moved_to_other_device_text">已移至 %1$s</string>
|
||||
<string name="island_moved_to_other_device_reversed_text">從通知重新連線</string>
|
||||
<string name="head_tracking">頭部追蹤</string>
|
||||
<string name="head_gestures_details">點頭接聽來電,搖頭拒接。</string>
|
||||
<string name="general_settings_header">一般</string>
|
||||
<string name="qs_click_behavior_title">快速設定方塊動作</string>
|
||||
<string name="qs_click_behavior_dialog_desc">輕觸時顯示聽覺模式對話方塊。</string>
|
||||
<string name="qs_click_behavior_cycle_desc">輕觸時循環切換模式。</string>
|
||||
<string name="developer_options_header">開發人員</string>
|
||||
<string name="more_settings_title">開啟 AirPods 設定</string>
|
||||
<string name="more_settings_subtitle">管理 AirPods 功能與偏好設定</string>
|
||||
<string name="ear_detection">自動耳朵偵測</string>
|
||||
<string name="auto_play">自動播放</string>
|
||||
<string name="auto_pause">自動暫停</string>
|
||||
<string name="troubleshooting">疑難排解</string>
|
||||
<string name="troubleshooting_description">收集記錄以診斷 AirPods 連線問題</string>
|
||||
<string name="collect_logs">收集記錄</string>
|
||||
<string name="saved_logs">已儲存的記錄</string>
|
||||
<string name="no_logs_found">找不到已儲存的記錄</string>
|
||||
<string name="takeover_header">自動連線偏好設定</string>
|
||||
<string name="takeover_airpods_state">當 AirPods 處於以下狀態時連線:</string>
|
||||
<string name="takeover_disconnected">已中斷連線</string>
|
||||
<string name="takeover_disconnected_desc">AirPods 未連接至任何裝置</string>
|
||||
<string name="takeover_idle">閒置</string>
|
||||
<string name="takeover_idle_desc">裝置已連接至你的 AirPods,但未播放媒體或通話中</string>
|
||||
<string name="takeover_music">正在播放媒體</string>
|
||||
<string name="takeover_music_desc">裝置正在你的 AirPods 上播放媒體</string>
|
||||
<string name="takeover_call">通話中</string>
|
||||
<string name="takeover_call_desc">裝置正在使用你的 AirPods 進行通話</string>
|
||||
<string name="takeover_phone_state">當你的手機處於以下狀態時連接至 AirPods:</string>
|
||||
<string name="takeover_ringing_call">接到來電</string>
|
||||
<string name="takeover_ringing_call_desc">你的手機開始響鈴</string>
|
||||
<string name="takeover_media_start">開始播放媒體</string>
|
||||
<string name="takeover_media_start_desc">你的手機開始播放媒體</string>
|
||||
<string name="undo">復原</string>
|
||||
<string name="customize_transparency_mode_description">你可以自訂 AirPods Pro 的通透模式,以協助你聽見周圍的聲音。</string>
|
||||
<string name="loud_sound_reduction_description">「降低高音量」可在通透模式和自適應模式下,主動減少你接觸到的環境高噪音。在「關閉」模式下,「降低高音量」不會作用。</string>
|
||||
<string name="loud_sound_reduction">降低高音量</string>
|
||||
<string name="call_controls">通話控制</string>
|
||||
<string name="automatically_connect">自動連接此裝置</string>
|
||||
<string name="automatically_connect_description">啟用後,AirPods 將嘗試自動連接至此裝置。否則,它們僅會在上次連接過此裝置時嘗試自動連接。</string>
|
||||
<string name="sleep_detection">入睡時暫停媒體</string>
|
||||
<string name="off_listening_mode">「關閉」聽覺模式</string>
|
||||
<string name="off_listening_mode_description">開啟此選項後,AirPods 聽覺模式將包含「關閉」選項。當聽覺模式設為「關閉」時,不會降低高音量。</string>
|
||||
<string name="microphone">麥克風</string>
|
||||
<string name="microphone_mode">麥克風模式</string>
|
||||
<string name="microphone_automatic">自動</string>
|
||||
<string name="microphone_always_right">總是右耳</string>
|
||||
<string name="microphone_always_left">總是左耳</string>
|
||||
<string name="answer_call">接聽來電</string>
|
||||
<string name="mute_unmute">靜音/取消靜音</string>
|
||||
<string name="hang_up">掛斷</string>
|
||||
<string name="press_once">按一下</string>
|
||||
<string name="press_twice">按兩下</string>
|
||||
<string name="hearing_aid">助聽器</string>
|
||||
<string name="adjustments">調整</string>
|
||||
<string name="swipe_to_control_amplification">滑動以控制增強</string>
|
||||
<string name="swipe_amplification_description">在通透模式且未播放媒體時,在 AirPods Pro 的觸控控制上向上或向下滑動,可增加或減少環境聲音的增強效果。</string>
|
||||
<string name="transparency_mode">通透模式</string>
|
||||
<string name="customize_transparency_mode">自訂通透模式</string>
|
||||
<string name="press_speed">按壓速度</string>
|
||||
<string name="press_speed_description">調整在 AirPods 上按兩下或三下所需的速度。</string>
|
||||
<string name="press_and_hold_duration">按住持續時間</string>
|
||||
<string name="press_and_hold_duration_description">調整在 AirPods 上按住所須的時間。</string>
|
||||
<string name="volume_swipe_speed">音量滑動速度</string>
|
||||
<string name="volume_swipe_speed_description">為防止意外調整音量,請選擇滑動之間的偏好等待時間。</string>
|
||||
<string name="equalizer">等化器</string>
|
||||
<string name="apply_eq_to">套用 EQ 至</string>
|
||||
<string name="phone">電話</string>
|
||||
<string name="media">媒體</string>
|
||||
<string name="band_label">頻段 %d</string>
|
||||
<string name="default_option">預設</string>
|
||||
<string name="slower">較慢</string>
|
||||
<string name="slowest">最慢</string>
|
||||
<string name="longer">較長</string>
|
||||
<string name="longest">最長</string>
|
||||
<string name="darker">較低沉</string>
|
||||
<string name="brighter">較清亮</string>
|
||||
<string name="less">較少</string>
|
||||
<string name="more">較多</string>
|
||||
<string name="amplification">增強</string>
|
||||
<string name="balance">平衡</string>
|
||||
<string name="tone">音色</string>
|
||||
<string name="ambient_noise_reduction">環境噪音抑制</string>
|
||||
<string name="conversation_boost">對話增強</string>
|
||||
<string name="conversation_boost_description">「對話增強」會將你的 AirPods Pro 聚焦於你面前說話的人,讓你在面對面交談時更容易聽清楚。</string>
|
||||
<string name="hearing_aid_description">AirPods 可以使用聽力測試的結果進行調整,以改善你周圍的語音和聲音清晰度。
|
||||
|
||||
助聽器功能僅適用於有輕度至中度聽力受損的人士。</string>
|
||||
<string name="media_assist">媒體輔助</string>
|
||||
<string name="media_assist_description">AirPods Pro 可以使用聽力測試的結果進行調整,以改善音樂、影片和通話的清晰度。</string>
|
||||
<string name="adjust_media">調整音樂與影片</string>
|
||||
<string name="adjust_calls">調整通話</string>
|
||||
<string name="widget">小工具</string>
|
||||
<string name="show_phone_battery_in_widget">在小工具中顯示手機電量</string>
|
||||
<string name="show_phone_battery_in_widget_description">在小工具中同時顯示手機電量與 AirPods 電量</string>
|
||||
<string name="conversational_awareness_volume">對話感知音量</string>
|
||||
<string name="quick_settings_tile">快速設定方塊</string>
|
||||
<string name="open_dialog_for_controlling">開啟控制對話方塊</string>
|
||||
<string name="open_dialog_for_controlling_description">若停用,點擊快速設定方塊將循環切換模式。若啟用,則會顯示用於控制聽覺模式和對話感知的對話方塊。</string>
|
||||
<string name="disconnect_when_not_wearing">未配戴時中斷 AirPods 連線</string>
|
||||
<string name="disconnect_when_not_wearing_description">你仍可使用應用程式控制它們,此選項僅會中斷音訊連線。</string>
|
||||
<string name="advanced_options">進階選項</string>
|
||||
<string name="set_identity_resolving_key">設定身分解析金鑰 (IRK)</string>
|
||||
<string name="set_identity_resolving_key_description">手動設定用於解析 BLE 隨機位址的 IRK 值</string>
|
||||
<string name="set_encryption_key">設定加密金鑰</string>
|
||||
<string name="set_encryption_key_description">手動設定用於解密 BLE 廣播的 ENC_KEY值</string>
|
||||
<string name="use_alternate_head_tracking_packets">使用替代頭部追蹤封包</string>
|
||||
<string name="use_alternate_head_tracking_packets_description">如果頭部追蹤對你無效,請啟用此選項。這會傳送不同的資料給 AirPods 以請求/停止頭部追蹤資料。</string>
|
||||
<string name="act_as_an_apple_device">作為 Apple 裝置</string>
|
||||
<string name="act_as_an_apple_device_description">啟用多裝置連線及輔助使用功能,例如自訂通透模式(增強、音色、環境噪音抑制、對話增強及 EQ)。</string>
|
||||
<string name="act_as_an_apple_device_warning">可能不穩定!!你的 AirPods 最多只能同時連接兩個裝置。如果你正與 iPad 或 Mac 等 Apple 裝置搭配使用,請先連接該裝置,然後再連接你的 Android。</string>
|
||||
<string name="reset_hook_offset">重設 Hook 偏移量</string>
|
||||
<string name="reset_hook_offset_description">這將清除目前的 Hook 偏移量,並需要你再次進行設定程序。確定要繼續嗎?</string>
|
||||
<string name="reset">重設</string>
|
||||
<string name="hook_offset_reset_success">Hook 偏移量已重設。正在重新導向至設定...</string>
|
||||
<string name="hook_offset_reset_failure">重設 Hook 偏移量失敗</string>
|
||||
<string name="irk_set_success">IRK 已設定成功</string>
|
||||
<string name="encryption_key_set_success">加密金鑰已設定成功</string>
|
||||
<string name="irk_hex_value">IRK 十六進位值</string>
|
||||
<string name="enc_key_hex_value">ENC_KEY 十六進位值</string>
|
||||
<string name="enter_irk_hex">輸入 16 位元組 IRK 為十六進位字串(32 個字元):</string>
|
||||
<string name="enter_enc_key_hex">輸入 16 位元組 ENC_KEY 為十六進位字串(32 個字元):</string>
|
||||
<string name="must_be_32_hex_chars">必須剛好是 32 個十六進位字元</string>
|
||||
<string name="error_converting_hex">轉換十六進位時發生錯誤:</string>
|
||||
<string name="found_offset_restart_bluetooth">找到偏移量,請重新啟動藍牙程序</string>
|
||||
<string name="digital_assistant">語音助理</string>
|
||||
<string name="on">開啟</string>
|
||||
<string name="camera_remote">相機遙控</string>
|
||||
<string name="camera_control">相機控制</string>
|
||||
<string name="camera_control_description">使用「按一下」或「按住」來拍攝相片、開始或停止錄影等。當使用 AirPods 進行相機動作時,若選擇「按一下」,媒體控制手勢將無法使用;若選擇「按住」,聽覺模式和語音助理手勢將無法使用。</string>
|
||||
<string name="camera_control_app_description">設定用於相機偵測的自訂應用程式套件</string>
|
||||
<string name="set_custom_camera_package">設定自訂相機應用程式 ID</string>
|
||||
<string name="enter_custom_camera_package">輸入相機應用程式的應用程式 ID:</string>
|
||||
<string name="custom_camera_package">自訂相機應用程式 ID</string>
|
||||
<string name="custom_camera_package_set_success">自訂相機應用程式 ID 設定成功</string>
|
||||
<string name="app_listener_service_label">相機監聽器</string>
|
||||
<string name="app_listener_service_description">LibrePods 的監聽器服務,用於偵測相機何時啟用,以啟動 AirPods 上的相機控制。</string>
|
||||
<string name="open_source_licenses">開放原始碼授權</string>
|
||||
<string name="hearing_test">更新聽力測試</string>
|
||||
<string name="update_hearing_test">更新聽力測試結果</string>
|
||||
<string name="att_manager_is_null_try_reconnecting">ATT Manager 為空值,請嘗試重新連線。</string>
|
||||
<string name="permissions_required">需要以下權限才能使用此應用程式。請授權以繼續。</string>
|
||||
<string name="shake_your_head_or_nod">搖頭或點頭!</string>
|
||||
<string name="root_access_required">需要 Root 權限</string>
|
||||
<string name="this_app_needs_root_access_to_hook_onto_the_bluetooth_library">此應用程式需要 Root 權限才能 Hook 藍牙程式庫</string>
|
||||
<string name="root_access_denied">Root 權限被拒絕。請授權 Root 權限。</string>
|
||||
<string name="troubleshooting_steps">疑難排解步驟</string>
|
||||
<string name="hearing_test_value_instruction">請輸入 dbHL 中的損失值</string>
|
||||
<string name="about">關於</string>
|
||||
<string name="model_name">型號名稱</string>
|
||||
<string name="model_number">型號號碼</string>
|
||||
<string name="serial_number">序號</string>
|
||||
<string name="version">版本</string>
|
||||
<string name="hearing_health">聽力健康</string>
|
||||
<string name="hearing_protection">聽力保護</string>
|
||||
<string name="workspace_use">工作場所使用</string>
|
||||
<string name="ppe">EN 352 防護</string>
|
||||
<string name="workspace_use_description">EN 352 防護將媒體的最大音量限制為 82 dBA,並符合個人聽力保護的適用 EN 352 標準要求。</string>
|
||||
<string name="environmental_noise">環境噪音</string>
|
||||
<string name="reconnect_to_last_device">重新連接至上次連接的裝置</string>
|
||||
<string name="disconnect">中斷連線</string>
|
||||
<string name="support_me">贊助我</string>
|
||||
<string name="never_show_again">不再顯示</string>
|
||||
<string name="support_dialog_description">我最近弄丟了左耳的 AirPod。如果你覺得 LibrePods 很好用,請考慮在 GitHub Sponsors 上贊助我,讓我能買個替換品並繼續開發這個專案,一點點金額也能帶來很大的幫助。感謝你的支持!</string>
|
||||
<string name="support_librepods">贊助 LibrePods</string>
|
||||
<string name="listening_mode_off_description">關閉噪音管理</string>
|
||||
<string name="listening_mode_transparency_description">允許外部聲音</string>
|
||||
<string name="listening_mode_adaptive_description">動態調整外部噪音</string>
|
||||
<string name="listening_mode_noise_cancellation_description">阻隔外部聲音</string>
|
||||
</resources>
|
||||
@@ -210,4 +210,8 @@
|
||||
<string name="never_show_again">Never show again</string>
|
||||
<string name="support_dialog_description">I recently lost my left AirPod. If you\'ve found LibrePods useful, consider supporting me on GitHub Sponsors so I can buy a replacement and continue working on this project- even a little amount goes a long way. Thank you for your support!</string>
|
||||
<string name="support_librepods">Support LibrePods</string>
|
||||
<string name="listening_mode_off_description">Turns off noise management</string>
|
||||
<string name="listening_mode_transparency_description">Lets in external sounds</string>
|
||||
<string name="listening_mode_adaptive_description">Dynamically adjust external noise</string>
|
||||
<string name="listening_mode_noise_cancellation_description">Blocks out external sounds</string>
|
||||
</resources>
|
||||
|
||||
29
head-tracking/colors.py
Normal file
29
head-tracking/colors.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import logging
|
||||
from logging import Formatter, LogRecord
|
||||
from typing import Dict
|
||||
|
||||
class Colors:
|
||||
RESET: str = "\033[0m"
|
||||
BOLD: str = "\033[1m"
|
||||
RED: str = "\033[91m"
|
||||
GREEN: str = "\033[92m"
|
||||
YELLOW: str = "\033[93m"
|
||||
BLUE: str = "\033[94m"
|
||||
MAGENTA: str = "\033[95m"
|
||||
CYAN: str = "\033[96m"
|
||||
WHITE: str = "\033[97m"
|
||||
BG_BLACK: str = "\033[40m"
|
||||
|
||||
class ColorFormatter(Formatter):
|
||||
FORMATS: Dict[int, str] = {
|
||||
logging.DEBUG: f"{Colors.BLUE}[%(levelname)s] %(message)s{Colors.RESET}",
|
||||
logging.INFO: f"{Colors.GREEN}%(message)s{Colors.RESET}",
|
||||
logging.WARNING: f"{Colors.YELLOW}%(message)s{Colors.RESET}",
|
||||
logging.ERROR: f"{Colors.RED}[%(levelname)s] %(message)s{Colors.RESET}",
|
||||
logging.CRITICAL: f"{Colors.RED}{Colors.BOLD}[%(levelname)s] %(message)s{Colors.RESET}"
|
||||
}
|
||||
|
||||
def format(self, record: LogRecord) -> str:
|
||||
log_fmt: str = self.FORMATS.get(record.levelno)
|
||||
formatter: Formatter = Formatter(log_fmt, datefmt="%H:%M:%S")
|
||||
return formatter.format(record)
|
||||
@@ -1,23 +1,25 @@
|
||||
import bluetooth
|
||||
import logging
|
||||
from bluetooth import BluetoothSocket
|
||||
from logging import Logger
|
||||
|
||||
class ConnectionManager:
|
||||
INIT_CMD = "00 00 04 00 01 00 02 00 00 00 00 00 00 00 00 00"
|
||||
START_CMD = "04 00 04 00 17 00 00 00 10 00 10 00 08 A1 02 42 0B 08 0E 10 02 1A 05 01 40 9C 00 00"
|
||||
STOP_CMD = "04 00 04 00 17 00 00 00 10 00 11 00 08 7E 10 02 42 0B 08 4E 10 02 1A 05 01 00 00 00 00"
|
||||
INIT_CMD: str = "00 00 04 00 01 00 02 00 00 00 00 00 00 00 00 00"
|
||||
START_CMD: str = "04 00 04 00 17 00 00 00 10 00 10 00 08 A1 02 42 0B 08 0E 10 02 1A 05 01 40 9C 00 00"
|
||||
STOP_CMD: str = "04 00 04 00 17 00 00 00 10 00 11 00 08 7E 10 02 42 0B 08 4E 10 02 1A 05 01 00 00 00 00"
|
||||
|
||||
def __init__(self, bt_addr="28:2D:7F:C2:05:5B", psm=0x1001, logger=None):
|
||||
self.bt_addr = bt_addr
|
||||
self.psm = psm
|
||||
self.logger = logger if logger else logging.getLogger(__name__)
|
||||
self.sock = None
|
||||
self.connected = False
|
||||
self.started = False
|
||||
def __init__(self, bt_addr: str = "28:2D:7F:C2:05:5B", psm: int = 0x1001, logger: Logger = None) -> None:
|
||||
self.bt_addr: str = bt_addr
|
||||
self.psm: int = psm
|
||||
self.logger: Logger = logger if logger else logging.getLogger(__name__)
|
||||
self.sock: BluetoothSocket = None
|
||||
self.connected: bool = False
|
||||
self.started: bool = False
|
||||
|
||||
def connect(self):
|
||||
def connect(self) -> bool:
|
||||
self.logger.info(f"Connecting to {self.bt_addr} on PSM {self.psm:#04x}...")
|
||||
try:
|
||||
self.sock = bluetooth.BluetoothSocket(bluetooth.L2CAP)
|
||||
self.sock = BluetoothSocket(bluetooth.L2CAP)
|
||||
self.sock.connect((self.bt_addr, self.psm))
|
||||
self.connected = True
|
||||
self.logger.info("Connected to AirPods.")
|
||||
@@ -28,7 +30,7 @@ class ConnectionManager:
|
||||
self.connected = False
|
||||
return self.connected
|
||||
|
||||
def send_start(self):
|
||||
def send_start(self) -> bool:
|
||||
if not self.connected:
|
||||
self.logger.error("Not connected. Cannot send START command.")
|
||||
return False
|
||||
@@ -40,7 +42,7 @@ class ConnectionManager:
|
||||
self.logger.info("START command has already been sent.")
|
||||
return True
|
||||
|
||||
def send_stop(self):
|
||||
def send_stop(self) -> None:
|
||||
if self.connected and self.started:
|
||||
try:
|
||||
self.sock.send(bytes.fromhex(self.STOP_CMD))
|
||||
@@ -51,7 +53,7 @@ class ConnectionManager:
|
||||
else:
|
||||
self.logger.info("Cannot send STOP; not started or not connected.")
|
||||
|
||||
def disconnect(self):
|
||||
def disconnect(self) -> None:
|
||||
if self.sock:
|
||||
try:
|
||||
self.sock.close()
|
||||
@@ -59,4 +61,4 @@ class ConnectionManager:
|
||||
except Exception as e:
|
||||
self.logger.error(f"Error during disconnect: {e}")
|
||||
self.connected = False
|
||||
self.started = False
|
||||
self.started = False
|
||||
|
||||
@@ -1,88 +1,65 @@
|
||||
import bluetooth
|
||||
import threading
|
||||
import time
|
||||
import logging
|
||||
import statistics
|
||||
import time
|
||||
from bluetooth import BluetoothSocket
|
||||
from collections import deque
|
||||
from colors import *
|
||||
from connection_manager import ConnectionManager
|
||||
from logging import Logger, StreamHandler
|
||||
from threading import Lock, Thread
|
||||
from typing import Any, Deque, List, Optional, Tuple
|
||||
|
||||
class Colors:
|
||||
RESET = "\033[0m"
|
||||
BOLD = "\033[1m"
|
||||
RED = "\033[91m"
|
||||
GREEN = "\033[92m"
|
||||
YELLOW = "\033[93m"
|
||||
BLUE = "\033[94m"
|
||||
MAGENTA = "\033[95m"
|
||||
CYAN = "\033[96m"
|
||||
WHITE = "\033[97m"
|
||||
BG_BLACK = "\033[40m"
|
||||
|
||||
class ColorFormatter(logging.Formatter):
|
||||
FORMATS = {
|
||||
logging.DEBUG: Colors.BLUE + "[%(levelname)s] %(message)s" + Colors.RESET,
|
||||
logging.INFO: Colors.GREEN + "%(message)s" + Colors.RESET,
|
||||
logging.WARNING: Colors.YELLOW + "%(message)s" + Colors.RESET,
|
||||
logging.ERROR: Colors.RED + "[%(levelname)s] %(message)s" + Colors.RESET,
|
||||
logging.CRITICAL: Colors.RED + Colors.BOLD + "[%(levelname)s] %(message)s" + Colors.RESET
|
||||
}
|
||||
|
||||
def format(self, record):
|
||||
log_fmt = self.FORMATS.get(record.levelno)
|
||||
formatter = logging.Formatter(log_fmt, datefmt="%H:%M:%S")
|
||||
return formatter.format(record)
|
||||
|
||||
handler = logging.StreamHandler()
|
||||
handler: StreamHandler = StreamHandler()
|
||||
handler.setFormatter(ColorFormatter())
|
||||
log = logging.getLogger(__name__)
|
||||
log: Logger = logging.getLogger(__name__)
|
||||
log.setLevel(logging.INFO)
|
||||
log.addHandler(handler)
|
||||
log.propagate = False
|
||||
|
||||
class GestureDetector:
|
||||
INIT_CMD = "00 00 04 00 01 00 02 00 00 00 00 00 00 00 00 00"
|
||||
START_CMD = "04 00 04 00 17 00 00 00 10 00 10 00 08 A1 02 42 0B 08 0E 10 02 1A 05 01 40 9C 00 00"
|
||||
STOP_CMD = "04 00 04 00 17 00 00 00 10 00 11 00 08 7E 10 02 42 0B 08 4E 10 02 1A 05 01 00 00 00 00"
|
||||
INIT_CMD: str = "00 00 04 00 01 00 02 00 00 00 00 00 00 00 00 00"
|
||||
START_CMD: str = "04 00 04 00 17 00 00 00 10 00 10 00 08 A1 02 42 0B 08 0E 10 02 1A 05 01 40 9C 00 00"
|
||||
STOP_CMD: str = "04 00 04 00 17 00 00 00 10 00 11 00 08 7E 10 02 42 0B 08 4E 10 02 1A 05 01 00 00 00 00"
|
||||
|
||||
def __init__(self, conn=None):
|
||||
self.sock = None
|
||||
self.bt_addr = "28:2D:7F:C2:05:5B"
|
||||
self.psm = 0x1001
|
||||
self.running = False
|
||||
self.data_lock = threading.Lock()
|
||||
def __init__(self, conn: ConnectionManager = None) -> None:
|
||||
self.sock: BluetoothSocket = None
|
||||
self.bt_addr: str = "28:2D:7F:C2:05:5B"
|
||||
self.psm: int = 0x1001
|
||||
self.running: bool = False
|
||||
self.data_lock: Lock = Lock()
|
||||
|
||||
self.horiz_buffer = deque(maxlen=100)
|
||||
self.vert_buffer = deque(maxlen=100)
|
||||
self.horiz_buffer: Deque[int] = deque(maxlen=100)
|
||||
self.vert_buffer: Deque[int] = deque(maxlen=100)
|
||||
|
||||
self.horiz_avg_buffer = deque(maxlen=5)
|
||||
self.vert_avg_buffer = deque(maxlen=5)
|
||||
self.horiz_avg_buffer: Deque[float] = deque(maxlen=5)
|
||||
self.vert_avg_buffer: Deque[float] = deque(maxlen=5)
|
||||
|
||||
self.horiz_peaks = []
|
||||
self.horiz_troughs = []
|
||||
self.vert_peaks = []
|
||||
self.vert_troughs = []
|
||||
self.horiz_peaks: List[int] = []
|
||||
self.horiz_troughs: List[int] = []
|
||||
self.vert_peaks: List[int] = []
|
||||
self.vert_troughs: List[int] = []
|
||||
|
||||
self.last_peak_time = 0
|
||||
self.peak_intervals = deque(maxlen=5)
|
||||
self.last_peak_time: float = 0
|
||||
self.peak_intervals: Deque[float] = deque(maxlen=5)
|
||||
|
||||
self.peak_threshold = 400
|
||||
self.direction_change_threshold = 175
|
||||
self.rhythm_consistency_threshold = 0.5
|
||||
self.peak_threshold: int = 400
|
||||
self.direction_change_threshold: int = 175
|
||||
self.rhythm_consistency_threshold: float = 0.5
|
||||
|
||||
self.horiz_increasing = None
|
||||
self.vert_increasing = None
|
||||
self.horiz_increasing: Optional[bool] = None
|
||||
self.vert_increasing: Optional[bool] = None
|
||||
|
||||
self.required_extremes = 3
|
||||
self.detection_timeout = 15
|
||||
self.detection_timeout: int = 15
|
||||
|
||||
self.min_confidence_threshold = 0.7
|
||||
self.min_confidence_threshold: float = 0.7
|
||||
|
||||
self.conn = conn
|
||||
self.conn: ConnectionManager = conn
|
||||
|
||||
def connect(self):
|
||||
def connect(self) -> bool:
|
||||
try:
|
||||
log.info(f"Connecting to AirPods at {self.bt_addr}...")
|
||||
if self.conn is None:
|
||||
from connection_manager import ConnectionManager
|
||||
self.conn = ConnectionManager(self.bt_addr, self.psm, logger=log)
|
||||
if not self.conn.connect():
|
||||
return False
|
||||
@@ -97,13 +74,13 @@ class GestureDetector:
|
||||
log.error(f"{Colors.RED}Connection failed: {e}{Colors.RESET}")
|
||||
return False
|
||||
|
||||
def process_data(self):
|
||||
def process_data(self) -> None:
|
||||
"""Process incoming head tracking data."""
|
||||
self.conn.send_start()
|
||||
log.info(f"{Colors.GREEN}✓ Head tracking activated{Colors.RESET}")
|
||||
|
||||
self.running = True
|
||||
start_time = time.time()
|
||||
start_time: float = time.time()
|
||||
|
||||
log.info(f"{Colors.GREEN}Ready! Make a YES or NO gesture{Colors.RESET}")
|
||||
log.info(f"{Colors.YELLOW}Tip: Use natural, moderate speed head movements{Colors.RESET}")
|
||||
@@ -118,10 +95,10 @@ class GestureDetector:
|
||||
if not self.sock:
|
||||
log.error("Socket not available.")
|
||||
break
|
||||
data = self.sock.recv(1024)
|
||||
formatted = self.format_hex(data)
|
||||
data: bytes = self.sock.recv(1024)
|
||||
formatted: str = self.format_hex(data)
|
||||
if self.is_valid_tracking_packet(formatted):
|
||||
raw_bytes = bytes.fromhex(formatted.replace(" ", ""))
|
||||
raw_bytes: bytes = bytes.fromhex(formatted.replace(" ", ""))
|
||||
horizontal, vertical = self.extract_orientation_values(raw_bytes)
|
||||
|
||||
if horizontal is not None and vertical is not None:
|
||||
@@ -132,7 +109,7 @@ class GestureDetector:
|
||||
self.vert_buffer.append(smooth_v)
|
||||
|
||||
self.detect_peaks_and_troughs()
|
||||
gesture = self.detect_gestures()
|
||||
gesture: Optional[str] = self.detect_gestures()
|
||||
|
||||
if gesture:
|
||||
self.running = False
|
||||
@@ -143,19 +120,19 @@ class GestureDetector:
|
||||
log.error(f"Data processing error: {e}")
|
||||
break
|
||||
|
||||
def disconnect(self):
|
||||
def disconnect(self) -> None:
|
||||
"""Disconnect from socket."""
|
||||
self.conn.disconnect()
|
||||
|
||||
def format_hex(self, data):
|
||||
def format_hex(self, data: bytes) -> str:
|
||||
"""Format binary data to readable hex string."""
|
||||
hex_str = data.hex()
|
||||
hex_str: str = data.hex()
|
||||
return ' '.join(hex_str[i:i+2] for i in range(0, len(hex_str), 2))
|
||||
|
||||
def is_valid_tracking_packet(self, hex_string):
|
||||
def is_valid_tracking_packet(self, hex_string: str) -> bool:
|
||||
"""Verify packet is a valid head tracking packet."""
|
||||
standard_header = "04 00 04 00 17 00 00 00 10 00 45 00"
|
||||
alternate_header = "04 00 04 00 17 00 00 00 10 00 44 00"
|
||||
standard_header: str = "04 00 04 00 17 00 00 00 10 00 45 00"
|
||||
alternate_header: str = "04 00 04 00 17 00 00 00 10 00 44 00"
|
||||
if not hex_string.startswith(standard_header) and not hex_string.startswith(alternate_header):
|
||||
return False
|
||||
|
||||
@@ -164,55 +141,55 @@ class GestureDetector:
|
||||
|
||||
return True
|
||||
|
||||
def extract_orientation_values(self, raw_bytes):
|
||||
def extract_orientation_values(self, raw_bytes: bytes) -> Tuple[Optional[int], Optional[int]]:
|
||||
"""Extract head orientation data from packet."""
|
||||
try:
|
||||
horizontal = int.from_bytes(raw_bytes[51:53], byteorder='little', signed=True)
|
||||
vertical = int.from_bytes(raw_bytes[53:55], byteorder='little', signed=True)
|
||||
horizontal: int = int.from_bytes(raw_bytes[51:53], byteorder='little', signed=True)
|
||||
vertical: int = int.from_bytes(raw_bytes[53:55], byteorder='little', signed=True)
|
||||
|
||||
return horizontal, vertical
|
||||
except Exception as e:
|
||||
log.debug(f"Failed to extract orientation: {e}")
|
||||
return None, None
|
||||
|
||||
def apply_smoothing(self, horizontal, vertical):
|
||||
def apply_smoothing(self, horizontal: int, vertical: int) -> Tuple[float, float]:
|
||||
"""Apply moving average smoothing (Apple-like filtering)."""
|
||||
self.horiz_avg_buffer.append(horizontal)
|
||||
self.vert_avg_buffer.append(vertical)
|
||||
|
||||
smooth_horiz = sum(self.horiz_avg_buffer) / len(self.horiz_avg_buffer)
|
||||
smooth_vert = sum(self.vert_avg_buffer) / len(self.vert_avg_buffer)
|
||||
smooth_horiz: float = sum(self.horiz_avg_buffer) / len(self.horiz_avg_buffer)
|
||||
smooth_vert: float = sum(self.vert_avg_buffer) / len(self.vert_avg_buffer)
|
||||
|
||||
return smooth_horiz, smooth_vert
|
||||
|
||||
def detect_peaks_and_troughs(self):
|
||||
def detect_peaks_and_troughs(self) -> None:
|
||||
"""Detect motion direction changes with Apple-like refinements."""
|
||||
if len(self.horiz_buffer) < 4 or len(self.vert_buffer) < 4:
|
||||
return
|
||||
|
||||
h_values = list(self.horiz_buffer)[-4:]
|
||||
v_values = list(self.vert_buffer)[-4:]
|
||||
h_values: List[int] = list(self.horiz_buffer)[-4:]
|
||||
v_values: List[int] = list(self.vert_buffer)[-4:]
|
||||
|
||||
h_variance = statistics.variance(h_values) if len(h_values) > 1 else 0
|
||||
v_variance = statistics.variance(v_values) if len(v_values) > 1 else 0
|
||||
h_variance: float = statistics.variance(h_values) if len(h_values) > 1 else 0
|
||||
v_variance: float = statistics.variance(v_values) if len(v_values) > 1 else 0
|
||||
|
||||
current = self.horiz_buffer[-1]
|
||||
prev = self.horiz_buffer[-2]
|
||||
current: int = self.horiz_buffer[-1]
|
||||
prev: int = self.horiz_buffer[-2]
|
||||
|
||||
if self.horiz_increasing is None:
|
||||
self.horiz_increasing = current > prev
|
||||
|
||||
dynamic_h_threshold = max(100, min(self.direction_change_threshold, h_variance / 3))
|
||||
dynamic_h_threshold: float = max(100, min(self.direction_change_threshold, h_variance / 3))
|
||||
|
||||
if self.horiz_increasing and current < prev - dynamic_h_threshold:
|
||||
if abs(prev) > self.peak_threshold:
|
||||
self.horiz_peaks.append((len(self.horiz_buffer)-1, prev, time.time()))
|
||||
direction = "➡️ " if prev > 0 else "⬅️ "
|
||||
direction: str = "➡️ " if prev > 0 else "⬅️ "
|
||||
log.info(f"{Colors.CYAN}{direction} Horizontal max: {prev} (threshold: {dynamic_h_threshold:.1f}){Colors.RESET}")
|
||||
|
||||
now = time.time()
|
||||
now: float = time.time()
|
||||
if self.last_peak_time > 0:
|
||||
interval = now - self.last_peak_time
|
||||
interval: float = now - self.last_peak_time
|
||||
self.peak_intervals.append(interval)
|
||||
self.last_peak_time = now
|
||||
|
||||
@@ -221,34 +198,34 @@ class GestureDetector:
|
||||
elif not self.horiz_increasing and current > prev + dynamic_h_threshold:
|
||||
if abs(prev) > self.peak_threshold:
|
||||
self.horiz_troughs.append((len(self.horiz_buffer)-1, prev, time.time()))
|
||||
direction = "➡️ " if prev > 0 else "⬅️ "
|
||||
direction: str = "➡️ " if prev > 0 else "⬅️ "
|
||||
log.info(f"{Colors.CYAN}{direction} Horizontal max: {prev} (threshold: {dynamic_h_threshold:.1f}){Colors.RESET}")
|
||||
|
||||
now = time.time()
|
||||
now: float = time.time()
|
||||
if self.last_peak_time > 0:
|
||||
interval = now - self.last_peak_time
|
||||
interval: float = now - self.last_peak_time
|
||||
self.peak_intervals.append(interval)
|
||||
self.last_peak_time = now
|
||||
|
||||
self.horiz_increasing = True
|
||||
|
||||
current = self.vert_buffer[-1]
|
||||
prev = self.vert_buffer[-2]
|
||||
current: int = self.vert_buffer[-1]
|
||||
prev: int = self.vert_buffer[-2]
|
||||
|
||||
if self.vert_increasing is None:
|
||||
self.vert_increasing = current > prev
|
||||
|
||||
dynamic_v_threshold = max(100, min(self.direction_change_threshold, v_variance / 3))
|
||||
dynamic_v_threshold: float = max(100, min(self.direction_change_threshold, v_variance / 3))
|
||||
|
||||
if self.vert_increasing and current < prev - dynamic_v_threshold:
|
||||
if abs(prev) > self.peak_threshold:
|
||||
self.vert_peaks.append((len(self.vert_buffer)-1, prev, time.time()))
|
||||
direction = "⬆️ " if prev > 0 else "⬇️ "
|
||||
direction: str = "⬆️ " if prev > 0 else "⬇️ "
|
||||
log.info(f"{Colors.MAGENTA}{direction} Vertical max: {prev} (threshold: {dynamic_v_threshold:.1f}){Colors.RESET}")
|
||||
|
||||
now = time.time()
|
||||
now: float = time.time()
|
||||
if self.last_peak_time > 0:
|
||||
interval = now - self.last_peak_time
|
||||
interval: float = now - self.last_peak_time
|
||||
self.peak_intervals.append(interval)
|
||||
self.last_peak_time = now
|
||||
|
||||
@@ -257,60 +234,60 @@ class GestureDetector:
|
||||
elif not self.vert_increasing and current > prev + dynamic_v_threshold:
|
||||
if abs(prev) > self.peak_threshold:
|
||||
self.vert_troughs.append((len(self.vert_buffer)-1, prev, time.time()))
|
||||
direction = "⬆️ " if prev > 0 else "⬇️ "
|
||||
direction: str = "⬆️ " if prev > 0 else "⬇️ "
|
||||
log.info(f"{Colors.MAGENTA}{direction} Vertical max: {prev} (threshold: {dynamic_v_threshold:.1f}){Colors.RESET}")
|
||||
|
||||
now = time.time()
|
||||
now: float = time.time()
|
||||
if self.last_peak_time > 0:
|
||||
interval = now - self.last_peak_time
|
||||
interval: float = now - self.last_peak_time
|
||||
self.peak_intervals.append(interval)
|
||||
self.last_peak_time = now
|
||||
|
||||
self.vert_increasing = True
|
||||
|
||||
def calculate_rhythm_consistency(self):
|
||||
def calculate_rhythm_consistency(self) -> float:
|
||||
"""Calculate how consistent the timing between peaks is (Apple-like)."""
|
||||
if len(self.peak_intervals) < 2:
|
||||
return 0
|
||||
|
||||
mean_interval = statistics.mean(self.peak_intervals)
|
||||
mean_interval: float = statistics.mean(self.peak_intervals)
|
||||
if mean_interval == 0:
|
||||
return 0
|
||||
|
||||
variances = [(i/mean_interval - 1.0) ** 2 for i in self.peak_intervals]
|
||||
consistency = 1.0 - min(1.0, statistics.mean(variances) / self.rhythm_consistency_threshold)
|
||||
variances: List[float] = [(i/mean_interval - 1.0) ** 2 for i in self.peak_intervals]
|
||||
consistency: float = 1.0 - min(1.0, statistics.mean(variances) / self.rhythm_consistency_threshold)
|
||||
return max(0, consistency)
|
||||
|
||||
def calculate_confidence_score(self, extremes, is_vertical=True):
|
||||
def calculate_confidence_score(self, extremes: List[Tuple[int, int, float]], is_vertical: bool = True) -> float:
|
||||
"""Calculate confidence score for gesture detection (Apple-like)."""
|
||||
if len(extremes) < self.required_extremes:
|
||||
return 0.0
|
||||
|
||||
sorted_extremes = sorted(extremes, key=lambda x: x[0])
|
||||
sorted_extremes: List[Tuple[int, int, float]] = sorted(extremes, key=lambda x: x[0])
|
||||
|
||||
recent = sorted_extremes[-self.required_extremes:]
|
||||
recent: List[Tuple[int, int, float]] = sorted_extremes[-self.required_extremes:]
|
||||
|
||||
avg_amplitude = sum(abs(val) for _, val, _ in recent) / len(recent)
|
||||
amplitude_factor = min(1.0, avg_amplitude / 600)
|
||||
avg_amplitude: float = sum(abs(val) for _, val, _ in recent) / len(recent)
|
||||
amplitude_factor: float = min(1.0, avg_amplitude / 600)
|
||||
|
||||
rhythm_factor = self.calculate_rhythm_consistency()
|
||||
rhythm_factor: float = self.calculate_rhythm_consistency()
|
||||
|
||||
signs = [1 if val > 0 else -1 for _, val, _ in recent]
|
||||
alternating = all(signs[i] != signs[i-1] for i in range(1, len(signs)))
|
||||
alternation_factor = 1.0 if alternating else 0.5
|
||||
signs: List[int] = [1 if val > 0 else -1 for _, val, _ in recent]
|
||||
alternating: bool = all(signs[i] != signs[i-1] for i in range(1, len(signs)))
|
||||
alternation_factor: float = 1.0 if alternating else 0.5
|
||||
|
||||
if is_vertical:
|
||||
vert_amp = sum(abs(val) for _, val, _ in recent) / len(recent)
|
||||
horiz_vals = list(self.horiz_buffer)[-len(recent)*2:]
|
||||
horiz_amp = sum(abs(val) for val in horiz_vals) / len(horiz_vals) if horiz_vals else 0
|
||||
isolation_factor = min(1.0, vert_amp / (horiz_amp + 0.1) * 1.2)
|
||||
vert_amp: float = sum(abs(val) for _, val, _ in recent) / len(recent)
|
||||
horiz_vals: List[int] = list(self.horiz_buffer)[-len(recent)*2:]
|
||||
horiz_amp: float = sum(abs(val) for val in horiz_vals) / len(horiz_vals) if horiz_vals else 0
|
||||
isolation_factor: float = min(1.0, vert_amp / (horiz_amp + 0.1) * 1.2)
|
||||
else:
|
||||
horiz_amp = sum(abs(val) for _, val, _ in recent)
|
||||
vert_vals = list(self.vert_buffer)[-len(recent)*2:]
|
||||
vert_amp = sum(abs(val) for val in vert_vals) / len(vert_vals) if vert_vals else 0
|
||||
isolation_factor = min(1.0, horiz_amp / (vert_amp + 0.1) * 1.2)
|
||||
horiz_amp: float = sum(abs(val) for _, val, _ in recent)
|
||||
vert_vals: List[int] = list(self.vert_buffer)[-len(recent)*2:]
|
||||
vert_amp: float = sum(abs(val) for val in vert_vals) / len(vert_vals) if vert_vals else 0
|
||||
isolation_factor: float = min(1.0, horiz_amp / (vert_amp + 0.1) * 1.2)
|
||||
|
||||
confidence = (
|
||||
confidence: float = (
|
||||
amplitude_factor * 0.4 +
|
||||
rhythm_factor * 0.2 +
|
||||
alternation_factor * 0.2 +
|
||||
@@ -319,12 +296,12 @@ class GestureDetector:
|
||||
|
||||
return confidence
|
||||
|
||||
def detect_gestures(self):
|
||||
def detect_gestures(self) -> Optional[str]:
|
||||
"""Recognize head gesture patterns with Apple-like intelligence."""
|
||||
if len(self.vert_peaks) + len(self.vert_troughs) >= self.required_extremes:
|
||||
all_extremes = sorted(self.vert_peaks + self.vert_troughs, key=lambda x: x[0])
|
||||
all_extremes: List[Tuple[int, int, float]] = sorted(self.vert_peaks + self.vert_troughs, key=lambda x: x[0])
|
||||
|
||||
confidence = self.calculate_confidence_score(all_extremes, is_vertical=True)
|
||||
confidence: float = self.calculate_confidence_score(all_extremes, is_vertical=True)
|
||||
|
||||
log.info(f"Vertical motion confidence: {confidence:.2f} (need {self.min_confidence_threshold:.2f})")
|
||||
|
||||
@@ -333,9 +310,9 @@ class GestureDetector:
|
||||
return "YES"
|
||||
|
||||
if len(self.horiz_peaks) + len(self.horiz_troughs) >= self.required_extremes:
|
||||
all_extremes = sorted(self.horiz_peaks + self.horiz_troughs, key=lambda x: x[0])
|
||||
all_extremes: List[Tuple[int, int, float]] = sorted(self.horiz_peaks + self.horiz_troughs, key=lambda x: x[0])
|
||||
|
||||
confidence = self.calculate_confidence_score(all_extremes, is_vertical=False)
|
||||
confidence: float = self.calculate_confidence_score(all_extremes, is_vertical=False)
|
||||
|
||||
log.info(f"Horizontal motion confidence: {confidence:.2f} (need {self.min_confidence_threshold:.2f})")
|
||||
|
||||
@@ -345,7 +322,7 @@ class GestureDetector:
|
||||
|
||||
return None
|
||||
|
||||
def start_detection(self):
|
||||
def start_detection(self) -> None:
|
||||
"""Begin gesture detection process."""
|
||||
log.info(f"{Colors.BOLD}{Colors.WHITE}Starting gesture detection...{Colors.RESET}")
|
||||
|
||||
@@ -353,7 +330,7 @@ class GestureDetector:
|
||||
log.error(f"{Colors.RED}Failed to connect to AirPods.{Colors.RESET}")
|
||||
return
|
||||
|
||||
data_thread = threading.Thread(target=self.process_data)
|
||||
data_thread: Thread = Thread(target=self.process_data)
|
||||
data_thread.daemon = True
|
||||
data_thread.start()
|
||||
|
||||
@@ -377,5 +354,5 @@ if __name__ == "__main__":
|
||||
print(f"{Colors.GREEN}• YES: {Colors.WHITE}nodding head up and down{Colors.RESET}")
|
||||
print(f"{Colors.RED}• NO: {Colors.WHITE}shaking head left and right{Colors.RESET}\n")
|
||||
|
||||
detector = GestureDetector()
|
||||
detector: GestureDetector = GestureDetector()
|
||||
detector.start_detection()
|
||||
@@ -1,63 +1,43 @@
|
||||
import math
|
||||
import drawille
|
||||
import numpy as np
|
||||
import logging
|
||||
import os
|
||||
from colors import *
|
||||
from drawille import Canvas
|
||||
from logging import Logger, StreamHandler
|
||||
from matplotlib.animation import FuncAnimation
|
||||
from matplotlib.pyplot import Axes, Figure
|
||||
from numpy.typing import NDArray
|
||||
from os import terminal_size as TerminalSize
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
class Colors:
|
||||
RESET = "\033[0m"
|
||||
BOLD = "\033[1m"
|
||||
RED = "\033[91m"
|
||||
GREEN = "\033[92m"
|
||||
YELLOW = "\033[93m"
|
||||
BLUE = "\033[94m"
|
||||
MAGENTA = "\033[95m"
|
||||
CYAN = "\033[96m"
|
||||
WHITE = "\033[97m"
|
||||
BG_BLACK = "\033[40m"
|
||||
|
||||
class ColorFormatter(logging.Formatter):
|
||||
FORMATS = {
|
||||
logging.DEBUG: Colors.BLUE + "[%(levelname)s] %(message)s" + Colors.RESET,
|
||||
logging.INFO: Colors.GREEN + "%(message)s" + Colors.RESET,
|
||||
logging.WARNING: Colors.YELLOW + "%(message)s" + Colors.RESET,
|
||||
logging.ERROR: Colors.RED + "[%(levelname)s] %(message)s" + Colors.RESET,
|
||||
logging.CRITICAL: Colors.RED + Colors.BOLD + "[%(levelname)s] %(message)s" + Colors.RESET
|
||||
}
|
||||
|
||||
def format(self, record):
|
||||
log_fmt = self.FORMATS.get(record.levelno)
|
||||
formatter = logging.Formatter(log_fmt, datefmt="%H:%M:%S")
|
||||
return formatter.format(record)
|
||||
|
||||
handler = logging.StreamHandler()
|
||||
handler: StreamHandler = StreamHandler()
|
||||
handler.setFormatter(ColorFormatter())
|
||||
log = logging.getLogger(__name__)
|
||||
log: Logger = logging.getLogger(__name__)
|
||||
log.setLevel(logging.INFO)
|
||||
log.addHandler(handler)
|
||||
log.propagate = False
|
||||
|
||||
|
||||
class HeadOrientation:
|
||||
def __init__(self, use_terminal=False):
|
||||
self.orientation_offset = 5500
|
||||
self.o1_neutral = 19000
|
||||
self.o2_neutral = 0
|
||||
self.o3_neutral = 0
|
||||
self.calibration_samples = []
|
||||
self.calibration_complete = False
|
||||
self.calibration_sample_count = 10
|
||||
self.fig = None
|
||||
self.ax = None
|
||||
self.arrow = None
|
||||
self.animation = None
|
||||
self.use_terminal = use_terminal
|
||||
def __init__(self, use_terminal: bool = False) -> None:
|
||||
self.orientation_offset: int = 5500
|
||||
self.o1_neutral: int = 19000
|
||||
self.o2_neutral: int = 0
|
||||
self.o3_neutral: int = 0
|
||||
self.calibration_samples: List[List[int]] = []
|
||||
self.calibration_complete: bool = False
|
||||
self.calibration_sample_count: int = 10
|
||||
self.fig: Optional[Figure] = None
|
||||
self.ax: Optional[Axes] = None
|
||||
self.arrow: Any = None
|
||||
self.animation: Optional[FuncAnimation] = None
|
||||
self.use_terminal: bool = use_terminal
|
||||
|
||||
def reset_calibration(self):
|
||||
def reset_calibration(self) -> None:
|
||||
self.calibration_samples = []
|
||||
self.calibration_complete = False
|
||||
|
||||
def add_calibration_sample(self, orientation_values):
|
||||
def add_calibration_sample(self, orientation_values: List[int]) -> bool:
|
||||
if len(self.calibration_samples) < self.calibration_sample_count:
|
||||
self.calibration_samples.append(orientation_values)
|
||||
return False
|
||||
@@ -66,57 +46,58 @@ class HeadOrientation:
|
||||
return True
|
||||
return True
|
||||
|
||||
def _calculate_calibration(self):
|
||||
def _calculate_calibration(self) -> None:
|
||||
if len(self.calibration_samples) < 3:
|
||||
log.warning("Not enough calibration samples")
|
||||
return
|
||||
samples = np.array(self.calibration_samples)
|
||||
self.o1_neutral = np.mean(samples[:, 0])
|
||||
avg_o2 = np.mean(samples[:, 1])
|
||||
avg_o3 = np.mean(samples[:, 2])
|
||||
self.o2_neutral = avg_o2
|
||||
self.o3_neutral = avg_o3
|
||||
samples: NDArray[[List[int]]] = np.array(self.calibration_samples)
|
||||
self.o1_neutral: float = np.mean(samples[:, 0])
|
||||
avg_o2: float = np.mean(samples[:, 1])
|
||||
avg_o3: float = np.mean(samples[:, 2])
|
||||
self.o2_neutral: float = avg_o2
|
||||
self.o3_neutral: float = avg_o3
|
||||
log.info("Calibration complete: o1_neutral=%.2f, o2_neutral=%.2f, o3_neutral=%.2f",
|
||||
self.o1_neutral, self.o2_neutral, self.o3_neutral)
|
||||
self.calibration_complete = True
|
||||
|
||||
def calculate_orientation(self, o1, o2, o3):
|
||||
def calculate_orientation(self, o1: float, o2: float, o3: float) -> Dict[str, float]:
|
||||
if not self.calibration_complete:
|
||||
return {'pitch': 0, 'yaw': 0}
|
||||
o1_norm = o1 - self.o1_neutral
|
||||
o2_norm = o2 - self.o2_neutral
|
||||
o3_norm = o3 - self.o3_neutral
|
||||
pitch = (o2_norm + o3_norm) / 2 / 32000 * 180
|
||||
yaw = (o2_norm - o3_norm) / 2 / 32000 * 180
|
||||
o1_norm: float = o1 - self.o1_neutral
|
||||
o2_norm: float = o2 - self.o2_neutral
|
||||
o3_norm: float = o3 - self.o3_neutral
|
||||
pitch: float = (o2_norm + o3_norm) / 2 / 32000 * 180
|
||||
yaw: float = (o2_norm - o3_norm) / 2 / 32000 * 180
|
||||
return {'pitch': pitch, 'yaw': yaw}
|
||||
|
||||
def create_face_art(self, pitch, yaw):
|
||||
def create_face_art(self, pitch: float, yaw: float) -> str:
|
||||
if self.use_terminal:
|
||||
try:
|
||||
ts = os.get_terminal_size()
|
||||
ts: TerminalSize = os.get_terminal_size()
|
||||
width, height = ts.columns, ts.lines * 2
|
||||
except Exception:
|
||||
width, height = 80, 40
|
||||
else:
|
||||
width, height = 80, 40
|
||||
center_x, center_y = width // 2, height // 2
|
||||
radius = (min(width, height) // 2 - 2) // 2
|
||||
pitch_rad = math.radians(pitch)
|
||||
yaw_rad = math.radians(yaw)
|
||||
canvas = drawille.Canvas()
|
||||
def rotate_point(x, y, z, pitch_r, yaw_r):
|
||||
radius: int = (min(width, height) // 2 - 2) // 2
|
||||
pitch_rad: float = math.radians(pitch)
|
||||
yaw_rad: float = math.radians(yaw)
|
||||
canvas: Canvas = Canvas()
|
||||
|
||||
def rotate_point(x: float, y: float, z: float, pitch_r: float, yaw_r: float) -> Tuple[int, int]:
|
||||
cos_y, sin_y = math.cos(yaw_r), math.sin(yaw_r)
|
||||
cos_p, sin_p = math.cos(pitch_r), math.sin(pitch_r)
|
||||
x1 = x * cos_y - z * sin_y
|
||||
z1 = x * sin_y + z * cos_y
|
||||
y1 = y * cos_p - z1 * sin_p
|
||||
z2 = y * sin_p + z1 * cos_p
|
||||
scale = 1 + (z2 / width)
|
||||
x1: float = x * cos_y - z * sin_y
|
||||
z1: float = x * sin_y + z * cos_y
|
||||
y1: float = y * cos_p - z1 * sin_p
|
||||
z2: float = y * sin_p + z1 * cos_p
|
||||
scale: float = 1 + (z2 / width)
|
||||
return int(center_x + x1 * scale), int(center_y + y1 * scale)
|
||||
for angle in range(0, 360, 2):
|
||||
rad = math.radians(angle)
|
||||
x = radius * math.cos(rad)
|
||||
y = radius * math.sin(rad)
|
||||
rad: float = math.radians(angle)
|
||||
x: float = radius * math.cos(rad)
|
||||
y: float = radius * math.sin(rad)
|
||||
x1, y1 = rotate_point(x, y, 0, pitch_rad, yaw_rad)
|
||||
canvas.set(x1, y1)
|
||||
for eye in [(-radius//2, -radius//3, 2), (radius//2, -radius//3, 2)]:
|
||||
@@ -129,14 +110,14 @@ class HeadOrientation:
|
||||
for dx in [-1, 0, 1]:
|
||||
for dy in [-1, 0, 1]:
|
||||
canvas.set(nx + dx, ny + dy)
|
||||
smile_depth = radius // 8
|
||||
mouth_local_y = radius // 4
|
||||
mouth_length = radius
|
||||
smile_depth: int = radius // 8
|
||||
mouth_local_y: int = radius // 4
|
||||
mouth_length: int = radius
|
||||
for x_offset in range(-mouth_length // 2, mouth_length // 2 + 1):
|
||||
norm = abs(x_offset) / (mouth_length / 2)
|
||||
y_offset = int((1 - norm ** 2) * smile_depth)
|
||||
local_x = x_offset
|
||||
local_y = mouth_local_y + y_offset
|
||||
norm: float = abs(x_offset) / (mouth_length / 2)
|
||||
y_offset: int = int((1 - norm ** 2) * smile_depth)
|
||||
local_x: int = x_offset
|
||||
local_y: int = mouth_local_y + y_offset
|
||||
mx, my = rotate_point(local_x, local_y, 0, pitch_rad, yaw_rad)
|
||||
canvas.set(mx, my)
|
||||
return canvas.frame()
|
||||
|
||||
@@ -1,61 +1,41 @@
|
||||
import struct
|
||||
import bluetooth
|
||||
import threading
|
||||
import time
|
||||
from datetime import datetime
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.animation import FuncAnimation
|
||||
import os
|
||||
import asciichartpy as acp
|
||||
import logging
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import os
|
||||
import struct
|
||||
import time
|
||||
from bluetooth import BluetoothSocket
|
||||
from colors import *
|
||||
from connection_manager import ConnectionManager
|
||||
from datetime import datetime as DateTime
|
||||
from drawille import Canvas
|
||||
from head_orientation import HeadOrientation
|
||||
from logging import Logger, StreamHandler
|
||||
from matplotlib.animation import FuncAnimation
|
||||
from matplotlib.legend import Legend
|
||||
from matplotlib.pyplot import Axes, Figure
|
||||
from numpy.typing import NDArray
|
||||
from rich.live import Live
|
||||
from rich.layout import Layout
|
||||
from rich.panel import Panel
|
||||
from rich.console import Console
|
||||
import drawille
|
||||
from head_orientation import HeadOrientation
|
||||
import logging
|
||||
from connection_manager import ConnectionManager
|
||||
from threading import Lock, Thread
|
||||
from typing import Any, Dict, List, Optional, TextIO, Tuple, Union
|
||||
|
||||
class Colors:
|
||||
RESET = "\033[0m"
|
||||
BOLD = "\033[1m"
|
||||
RED = "\033[91m"
|
||||
GREEN = "\033[92m"
|
||||
YELLOW = "\033[93m"
|
||||
BLUE = "\033[94m"
|
||||
MAGENTA = "\033[95m"
|
||||
CYAN = "\033[96m"
|
||||
WHITE = "\033[97m"
|
||||
BG_BLACK = "\033[40m"
|
||||
|
||||
class ColorFormatter(logging.Formatter):
|
||||
FORMATS = {
|
||||
logging.DEBUG: Colors.BLUE + "[%(levelname)s] %(message)s" + Colors.RESET,
|
||||
logging.INFO: Colors.GREEN + "%(message)s" + Colors.RESET,
|
||||
logging.WARNING: Colors.YELLOW + "%(message)s" + Colors.RESET,
|
||||
logging.ERROR: Colors.RED + "[%(levelname)s] %(message)s" + Colors.RESET,
|
||||
logging.CRITICAL: Colors.RED + Colors.BOLD + "[%(levelname)s] %(message)s" + Colors.RESET
|
||||
}
|
||||
|
||||
def format(self, record):
|
||||
log_fmt = self.FORMATS.get(record.levelno)
|
||||
formatter = logging.Formatter(log_fmt, datefmt="%H:%M:%S")
|
||||
return formatter.format(record)
|
||||
|
||||
handler = logging.StreamHandler()
|
||||
handler: StreamHandler = StreamHandler()
|
||||
handler.setFormatter(ColorFormatter())
|
||||
logger = logging.getLogger("airpods-head-tracking")
|
||||
logger: Logger = logging.getLogger("airpods-head-tracking")
|
||||
logger.setLevel(logging.INFO)
|
||||
logger.addHandler(handler)
|
||||
logger.propagate = True
|
||||
|
||||
INIT_CMD = "00 00 04 00 01 00 02 00 00 00 00 00 00 00 00 00"
|
||||
NOTIF_CMD = "04 00 04 00 0F 00 FF FF FE FF"
|
||||
START_CMD = "04 00 04 00 17 00 00 00 10 00 10 00 08 A1 02 42 0B 08 0E 10 02 1A 05 01 40 9C 00 00"
|
||||
STOP_CMD = "04 00 04 00 17 00 00 00 10 00 11 00 08 7E 10 02 42 0B 08 4E 10 02 1A 05 01 00 00 00 00"
|
||||
INIT_CMD: str = "00 00 04 00 01 00 02 00 00 00 00 00 00 00 00 00"
|
||||
NOTIF_CMD: str = "04 00 04 00 0F 00 FF FF FE FF"
|
||||
START_CMD: str = "04 00 04 00 17 00 00 00 10 00 10 00 08 A1 02 42 0B 08 0E 10 02 1A 05 01 40 9C 00 00"
|
||||
STOP_CMD: str = "04 00 04 00 17 00 00 00 10 00 11 00 08 7E 10 02 42 0B 08 4E 10 02 1A 05 01 00 00 00 00"
|
||||
|
||||
KEY_FIELDS = {
|
||||
KEY_FIELDS: Dict[str, Tuple[int, int]] = {
|
||||
"orientation 1": (43, 2),
|
||||
"orientation 2": (45, 2),
|
||||
"orientation 3": (47, 2),
|
||||
@@ -68,28 +48,28 @@ KEY_FIELDS = {
|
||||
}
|
||||
|
||||
class AirPodsTracker:
|
||||
def __init__(self):
|
||||
self.sock = None
|
||||
self.recording = False
|
||||
self.log_file = None
|
||||
self.listener_thread = None
|
||||
self.bt_addr = "28:2D:7F:C2:05:5B"
|
||||
self.psm = 0x1001
|
||||
self.raw_packets = []
|
||||
self.parsed_packets = []
|
||||
self.live_data = []
|
||||
self.live_plotting = False
|
||||
self.animation = None
|
||||
self.fig = None
|
||||
self.axes = None
|
||||
self.lines = {}
|
||||
self.selected_fields = []
|
||||
self.data_lock = threading.Lock()
|
||||
self.orientation_offset = 5500
|
||||
self.use_terminal = True # '--terminal' in sys.argv
|
||||
self.orientation_visualizer = HeadOrientation(use_terminal=self.use_terminal)
|
||||
def __init__(self) -> None:
|
||||
self.sock: BluetoothSocket = None
|
||||
self.recording: bool = False
|
||||
self.log_file: Optional[TextIO] = None
|
||||
self.listener_thread: Optional[Thread] = None
|
||||
self.bt_addr: str = "28:2D:7F:C2:05:5B"
|
||||
self.psm: int = 0x1001
|
||||
self.raw_packets: List[bytes] = []
|
||||
self.parsed_packets: List[bytes] = []
|
||||
self.live_data: List[bytes] = []
|
||||
self.live_plotting: bool = False
|
||||
self.animation: FuncAnimation = None
|
||||
self.fig: Optional[Figure] = None
|
||||
self.axes: Optional[Axes] = None
|
||||
self.lines: Dict[str, Any] = {}
|
||||
self.selected_fields: List[str] = []
|
||||
self.data_lock: Lock = Lock()
|
||||
self.orientation_offset: int = 5500
|
||||
self.use_terminal: bool = True # '--terminal' in sys.argv
|
||||
self.orientation_visualizer: HeadOrientation = HeadOrientation(use_terminal=self.use_terminal)
|
||||
|
||||
self.conn = None
|
||||
self.conn: Optional[ConnectionManager] = None
|
||||
|
||||
def connect(self):
|
||||
try:
|
||||
@@ -102,35 +82,35 @@ class AirPodsTracker:
|
||||
self.sock.send(bytes.fromhex(NOTIF_CMD))
|
||||
logger.info("Sent initialization command.")
|
||||
|
||||
self.listener_thread = threading.Thread(target=self.listen, daemon=True)
|
||||
self.listener_thread = Thread(target=self.listen, daemon=True)
|
||||
self.listener_thread.start()
|
||||
return True
|
||||
except Exception as e:
|
||||
logger.error("Connection error: %s", e)
|
||||
return False
|
||||
|
||||
def start_tracking(self, duration=None):
|
||||
def start_tracking(self, duration: Optional[float] = None) -> None:
|
||||
if not self.recording:
|
||||
self.conn.send_start()
|
||||
filename = "head_tracking_" + datetime.now().strftime("%Y%m%d_%H%M%S") + ".log"
|
||||
filename: str = f"head_tracking_{DateTime.now().strftime('%Y%m%d_%H%M%S')}.log"
|
||||
self.log_file = open(filename, "w")
|
||||
self.recording = True
|
||||
logger.info("Recording started. Saving data to %s", filename)
|
||||
|
||||
if duration is not None and duration > 0:
|
||||
def auto_stop():
|
||||
def auto_stop() -> None:
|
||||
time.sleep(duration)
|
||||
if self.recording:
|
||||
self.stop_tracking()
|
||||
logger.info("Recording automatically stopped after %s seconds.", duration)
|
||||
|
||||
timer_thread = threading.Thread(target=auto_stop, daemon=True)
|
||||
timer_thread = Thread(target=auto_stop, daemon=True)
|
||||
timer_thread.start()
|
||||
logger.info("Will automatically stop recording after %s seconds.", duration)
|
||||
else:
|
||||
logger.info("Already recording.")
|
||||
|
||||
def stop_tracking(self):
|
||||
def stop_tracking(self) -> None:
|
||||
if self.recording:
|
||||
self.conn.send_stop()
|
||||
self.recording = False
|
||||
@@ -141,39 +121,41 @@ class AirPodsTracker:
|
||||
else:
|
||||
logger.info("Not currently recording.")
|
||||
|
||||
def format_hex(self, data):
|
||||
hex_str = data.hex()
|
||||
def format_hex(self, data: bytes) -> str:
|
||||
hex_str: str = data.hex()
|
||||
return ' '.join(hex_str[i:i + 2] for i in range(0, len(hex_str), 2))
|
||||
|
||||
def parse_raw_packet(self, hex_string):
|
||||
def parse_raw_packet(self, hex_string: str) -> bytes:
|
||||
return bytes.fromhex(hex_string.replace(" ", ""))
|
||||
|
||||
def interpret_bytes(self, raw_bytes, start, length, data_type="signed_short"):
|
||||
def interpret_bytes(self, raw_bytes: bytes, start: int, length: int, data_type: str = "signed_short") -> Optional[Union[int, float]]:
|
||||
if start + length > len(raw_bytes):
|
||||
return None
|
||||
|
||||
if data_type == "signed_short":
|
||||
return int.from_bytes(raw_bytes[start:start + 2], byteorder='little', signed=True)
|
||||
elif data_type == "unsigned_short":
|
||||
return int.from_bytes(raw_bytes[start:start + 2], byteorder='little', signed=False)
|
||||
elif data_type == "signed_short_be":
|
||||
return int.from_bytes(raw_bytes[start:start + 2], byteorder='big', signed=True)
|
||||
elif data_type == "float_le":
|
||||
if start + 4 <= len(raw_bytes):
|
||||
return struct.unpack('<f', raw_bytes[start:start + 4])[0]
|
||||
elif data_type == "float_be":
|
||||
if start + 4 <= len(raw_bytes):
|
||||
return struct.unpack('>f', raw_bytes[start:start + 4])[0]
|
||||
return None
|
||||
match data_type:
|
||||
case "signed_short":
|
||||
return int.from_bytes(raw_bytes[start:start + 2], byteorder='little', signed=True)
|
||||
case "unsigned_short":
|
||||
return int.from_bytes(raw_bytes[start:start + 2], byteorder='little', signed=False)
|
||||
case "signed_short_be":
|
||||
return int.from_bytes(raw_bytes[start:start + 2], byteorder='big', signed=True)
|
||||
case "float_le":
|
||||
if start + 4 <= len(raw_bytes):
|
||||
return struct.unpack('<f', raw_bytes[start:start + 4])[0]
|
||||
case "float_be":
|
||||
if start + 4 <= len(raw_bytes):
|
||||
return struct.unpack('>f', raw_bytes[start:start + 4])[0]
|
||||
case _:
|
||||
return None
|
||||
|
||||
def normalize_orientation(self, value, field_name):
|
||||
def normalize_orientation(self, value: Optional[Union[int, float]], field_name: str) -> Optional[Union[int, float]]:
|
||||
if 'orientation' in field_name.lower():
|
||||
return value + self.orientation_offset
|
||||
|
||||
return value
|
||||
|
||||
def parse_packet_all_fields(self, raw_bytes):
|
||||
packet = {}
|
||||
def parse_packet_all_fields(self, raw_bytes: bytes) -> Dict[str, Union[int, float]]:
|
||||
packet: Dict[str, Union[int, float]] = {}
|
||||
|
||||
packet["seq_num"] = int.from_bytes(raw_bytes[12:14], byteorder='little')
|
||||
|
||||
@@ -186,14 +168,14 @@ class AirPodsTracker:
|
||||
packet[field_name] = self.normalize_orientation(raw_value, field_name)
|
||||
|
||||
for i in range(30, min(90, len(raw_bytes) - 1), 2):
|
||||
field_name = f"byte_{i:02d}"
|
||||
raw_value = self.interpret_bytes(raw_bytes, i, 2, "signed_short")
|
||||
field_name: str = f"byte_{i:02d}"
|
||||
raw_value: Optional[Union[int, float]] = self.interpret_bytes(raw_bytes, i, 2, "signed_short")
|
||||
if raw_value is not None:
|
||||
packet[field_name] = self.normalize_orientation(raw_value, field_name)
|
||||
|
||||
return packet
|
||||
|
||||
def apply_dark_theme(self, fig, axes):
|
||||
def apply_dark_theme(self, fig: Figure, axes: List[Axes]) -> None:
|
||||
fig.patch.set_facecolor('#1e1e1e')
|
||||
for ax in axes:
|
||||
ax.set_facecolor('#2d2d2d')
|
||||
@@ -210,21 +192,21 @@ class AirPodsTracker:
|
||||
for spine in ax.spines.values():
|
||||
spine.set_color('#555555')
|
||||
|
||||
legend = ax.get_legend()
|
||||
legend: Optional[Legend] = ax.get_legend()
|
||||
if (legend):
|
||||
legend.get_frame().set_facecolor('#2d2d2d')
|
||||
legend.get_frame().set_alpha(0.7)
|
||||
for text in legend.get_texts():
|
||||
text.set_color('white')
|
||||
|
||||
def listen(self):
|
||||
def listen(self) -> None:
|
||||
while True:
|
||||
try:
|
||||
data = self.sock.recv(1024)
|
||||
formatted = self.format_hex(data)
|
||||
timestamp = datetime.now().isoformat()
|
||||
data: bytes = self.sock.recv(1024)
|
||||
formatted: str = self.format_hex(data)
|
||||
timestamp: str = DateTime.now().isoformat()
|
||||
|
||||
is_valid = self.is_valid_tracking_packet(formatted)
|
||||
is_valid: bool = self.is_valid_tracking_packet(formatted)
|
||||
|
||||
if not self.live_plotting:
|
||||
if is_valid:
|
||||
@@ -238,8 +220,8 @@ class AirPodsTracker:
|
||||
self.log_file.flush()
|
||||
|
||||
try:
|
||||
raw_bytes = self.parse_raw_packet(formatted)
|
||||
packet = self.parse_packet_all_fields(raw_bytes)
|
||||
raw_bytes: bytes = self.parse_raw_packet(formatted)
|
||||
packet: Dict[str, Union[int, float]] = self.parse_packet_all_fields(raw_bytes)
|
||||
|
||||
with self.data_lock:
|
||||
self.live_data.append(packet)
|
||||
@@ -253,7 +235,7 @@ class AirPodsTracker:
|
||||
logger.error("Error receiving data: %s", e)
|
||||
break
|
||||
|
||||
def load_log_file(self, filepath):
|
||||
def load_log_file(self, filepath: str) -> bool:
|
||||
self.raw_packets = []
|
||||
self.parsed_packets = []
|
||||
try:
|
||||
@@ -262,11 +244,11 @@ class AirPodsTracker:
|
||||
line = line.strip()
|
||||
if line:
|
||||
try:
|
||||
raw_bytes = self.parse_raw_packet(line)
|
||||
raw_bytes: bytes = self.parse_raw_packet(line)
|
||||
self.raw_packets.append(raw_bytes)
|
||||
packet = self.parse_packet_all_fields(raw_bytes)
|
||||
packet: Dict[str, Union[int, float]] = self.parse_packet_all_fields(raw_bytes)
|
||||
|
||||
min_seq_num = min(
|
||||
min_seq_num: int = min(
|
||||
[parsed_packet["seq_num"] for parsed_packet in self.parsed_packets], default=0
|
||||
)
|
||||
|
||||
@@ -282,26 +264,26 @@ class AirPodsTracker:
|
||||
logger.error(f"Error loading log file: {e}")
|
||||
return False
|
||||
|
||||
def extract_field_values(self, field_name, data_source='loaded'):
|
||||
def extract_field_values(self, field_name: str, data_source: str = 'loaded') -> List[Union[int, float]]:
|
||||
if data_source == 'loaded':
|
||||
data = self.parsed_packets
|
||||
data: List[Dict[str, Union[int, float]]] = self.parsed_packets
|
||||
else:
|
||||
with self.data_lock:
|
||||
data = self.live_data.copy()
|
||||
data: List[Dict[str, Union[int, float]]] = self.live_data.copy()
|
||||
|
||||
values = [packet.get(field_name, 0) for packet in data if field_name in packet]
|
||||
values: List[Union[int, float]] = [packet.get(field_name, 0) for packet in data if field_name in packet]
|
||||
|
||||
if data_source == 'live' and len(values) > 5:
|
||||
try:
|
||||
values = np.array(values, dtype=float)
|
||||
values: NDArray[Any] = np.array(values, dtype=float)
|
||||
values = np.convolve(values, np.ones(5) / 5, mode='valid')
|
||||
except Exception as e:
|
||||
logger.warning(f"Smoothing error (non-critical): {e}")
|
||||
|
||||
return values
|
||||
|
||||
def is_valid_tracking_packet(self, hex_string):
|
||||
standard_header = "04 00 04 00 17 00 00 00 10 00"
|
||||
def is_valid_tracking_packet(self, hex_string: str) -> bool:
|
||||
standard_header: str = "04 00 04 00 17 00 00 00 10 00"
|
||||
|
||||
if not hex_string.startswith(standard_header):
|
||||
if self.live_plotting:
|
||||
@@ -316,13 +298,13 @@ class AirPodsTracker:
|
||||
return True
|
||||
|
||||
|
||||
def plot_fields(self, field_names=None):
|
||||
def plot_fields(self, field_names: Optional[List[str]] = None) -> None:
|
||||
if not self.parsed_packets:
|
||||
logger.error("No data to plot. Load a log file first.")
|
||||
return
|
||||
|
||||
if field_names is None:
|
||||
field_names = list(KEY_FIELDS.keys())
|
||||
field_names: List[str] = list(KEY_FIELDS.keys())
|
||||
|
||||
if not self.orientation_visualizer.calibration_complete:
|
||||
if len(self.parsed_packets) < self.orientation_visualizer.calibration_sample_count:
|
||||
@@ -339,16 +321,16 @@ class AirPodsTracker:
|
||||
self._plot_fields_terminal(field_names)
|
||||
|
||||
else:
|
||||
acceleration_fields = [f for f in field_names if 'acceleration' in f.lower()]
|
||||
orientation_fields = [f for f in field_names if 'orientation' in f.lower()]
|
||||
other_fields = [f for f in field_names if f not in acceleration_fields + orientation_fields]
|
||||
acceleration_fields: List[str] = [f for f in field_names if 'acceleration' in f.lower()]
|
||||
orientation_fields: List[str] = [f for f in field_names if 'orientation' in f.lower()]
|
||||
other_fields: List[str] = [f for f in field_names if f not in acceleration_fields + orientation_fields]
|
||||
|
||||
fig, axes = plt.subplots(3, 1, figsize=(14, 12), sharex=True)
|
||||
self.apply_dark_theme(fig, axes)
|
||||
|
||||
acceleration_colors = ['#FFFF00', '#00FFFF']
|
||||
orientation_colors = ['#FF00FF', '#00FF00', '#FFA500']
|
||||
other_colors = ['#52b788', '#f4a261', '#e76f51', '#2a9d8f']
|
||||
acceleration_colors: List[str] = ['#FFFF00', '#00FFFF']
|
||||
orientation_colors: List[str] = ['#FF00FF', '#00FF00', '#FFA500']
|
||||
other_colors: List[str] = ['#52b788', '#f4a261', '#e76f51', '#2a9d8f']
|
||||
|
||||
if acceleration_fields:
|
||||
for i, field in enumerate(acceleration_fields):
|
||||
@@ -375,17 +357,17 @@ class AirPodsTracker:
|
||||
plt.tight_layout()
|
||||
plt.show()
|
||||
|
||||
def _plot_fields_terminal(self, field_names):
|
||||
def _plot_fields_terminal(self, field_names: List[str]) -> None:
|
||||
"""Internal method for terminal-based plotting"""
|
||||
terminal_width = os.get_terminal_size().columns
|
||||
plot_width = min(terminal_width - 10, 120)
|
||||
plot_height = 15
|
||||
terminal_width: int = os.get_terminal_size().columns
|
||||
plot_width: int = min(terminal_width - 10, 120)
|
||||
plot_height: int = 15
|
||||
|
||||
acceleration_fields = [f for f in field_names if 'acceleration' in f.lower()]
|
||||
orientation_fields = [f for f in field_names if 'orientation' in f.lower()]
|
||||
other_fields = [f for f in field_names if f not in acceleration_fields + orientation_fields]
|
||||
acceleration_fields: List[str] = [f for f in field_names if 'acceleration' in f.lower()]
|
||||
orientation_fields: List[str] = [f for f in field_names if 'orientation' in f.lower()]
|
||||
other_fields: List[str] = [f for f in field_names if f not in acceleration_fields + orientation_fields]
|
||||
|
||||
def plot_group(fields, title):
|
||||
def plot_group(fields: List[str], title: str) -> None:
|
||||
if not fields:
|
||||
return
|
||||
|
||||
@@ -393,40 +375,39 @@ class AirPodsTracker:
|
||||
print("=" * len(title))
|
||||
|
||||
for field in fields:
|
||||
values = self.extract_field_values(field)
|
||||
values: List[float] = self.extract_field_values(field)
|
||||
if len(values) > plot_width:
|
||||
values = values[-plot_width:]
|
||||
|
||||
if title == "Acceleration Data":
|
||||
chart = acp.plot(values, {'height': plot_height})
|
||||
chart: str = acp.plot(values, {'height': plot_height})
|
||||
print(chart)
|
||||
else:
|
||||
chart = acp.plot(values, {'height': plot_height})
|
||||
chart: str = acp.plot(values, {'height': plot_height})
|
||||
print(chart)
|
||||
|
||||
print(f"Min: {min(values):.2f}, Max: {max(values):.2f}, " +
|
||||
f"Mean: {np.mean(values):.2f}")
|
||||
print(f"Min: {min(values):.2f}, Max: {max(values):.2f}, " + f"Mean: {np.mean(values):.2f}")
|
||||
print()
|
||||
|
||||
plot_group(acceleration_fields, "Acceleration Data")
|
||||
plot_group(orientation_fields, "Orientation Data")
|
||||
plot_group(other_fields, "Other Fields")
|
||||
|
||||
def create_braille_plot(self, values, width=80, height=20, y_label=True, fixed_y_min=None, fixed_y_max=None):
|
||||
canvas = drawille.Canvas()
|
||||
def create_braille_plot(self, values: List[float], width: int = 80, height: int = 20, y_label: bool = True, fixed_y_min: Optional[float] = None, fixed_y_max: Optional[float] = None) -> str:
|
||||
canvas: Canvas = Canvas()
|
||||
if fixed_y_min is None or fixed_y_max is None:
|
||||
local_min, local_max = min(values), max(values)
|
||||
else:
|
||||
local_min, local_max = fixed_y_min, fixed_y_max
|
||||
y_range = local_max - local_min or 1
|
||||
x_step = max(1, len(values) // width)
|
||||
y_range: float = local_max - local_min or 1
|
||||
x_step: int = max(1, len(values) // width)
|
||||
for i, v in enumerate(values[::x_step]):
|
||||
y = int(((v - local_min) / y_range) * (height * 2 - 1))
|
||||
y: int = int(((v - local_min) / y_range) * (height * 2 - 1))
|
||||
canvas.set(i, y)
|
||||
frame = canvas.frame()
|
||||
frame: str = canvas.frame()
|
||||
if y_label:
|
||||
lines = frame.split('\n')
|
||||
labeled_lines = []
|
||||
lines: List[str] = frame.split('\n')
|
||||
labeled_lines: List[str] = []
|
||||
for idx, line in enumerate(lines):
|
||||
if idx == 0:
|
||||
labeled_lines.append(f"{local_max:6.0f} {line}")
|
||||
@@ -437,17 +418,17 @@ class AirPodsTracker:
|
||||
frame = "\n".join(labeled_lines)
|
||||
return frame
|
||||
|
||||
def _start_live_plotting_terminal(self, record_data=False, duration=None):
|
||||
def _start_live_plotting_terminal(self, record_data: bool = False, duration: Optional[float] = None) -> None:
|
||||
import sys, select, tty, termios
|
||||
old_settings = termios.tcgetattr(sys.stdin)
|
||||
tty.setcbreak(sys.stdin.fileno())
|
||||
console = Console()
|
||||
term_width = console.width
|
||||
plot_width = round(min(term_width / 2 - 15, 120))
|
||||
ori_height = 10
|
||||
console: Console = Console()
|
||||
term_width: int = console.width
|
||||
plot_width: int = round(min(term_width / 2 - 15, 120))
|
||||
ori_height: int = 10
|
||||
|
||||
def make_compact_layout():
|
||||
layout = Layout()
|
||||
def make_compact_layout() -> Layout:
|
||||
layout: Layout = Layout()
|
||||
layout.split_column(
|
||||
Layout(name="header", size=3),
|
||||
Layout(name="main", ratio=1),
|
||||
@@ -466,7 +447,7 @@ class AirPodsTracker:
|
||||
)
|
||||
return layout
|
||||
|
||||
layout = make_compact_layout()
|
||||
layout: Layout = make_compact_layout()
|
||||
|
||||
try:
|
||||
import time
|
||||
@@ -479,76 +460,76 @@ class AirPodsTracker:
|
||||
logger.info("Paused" if self.paused else "Resumed")
|
||||
if self.paused:
|
||||
time.sleep(0.1)
|
||||
rec_str = " [red][REC][/red]" if record_data else ""
|
||||
left = "AirPods Head Tracking - v1.0.0"
|
||||
right = "Ctrl+C - Close | p - Pause" + rec_str
|
||||
status = "[bold red]Paused[/bold red]"
|
||||
header = list(" " * term_width)
|
||||
rec_str: str = " [red][REC][/red]" if record_data else ""
|
||||
left: str = "AirPods Head Tracking - v1.0.0"
|
||||
right: str = "Ctrl+C - Close | p - Pause" + rec_str
|
||||
status: str = "[bold red]Paused[/bold red]"
|
||||
header: List[str] = list(" " * term_width)
|
||||
header[0:len(left)] = list(left)
|
||||
header[term_width - len(right):] = list(right)
|
||||
start = (term_width - len(status)) // 2
|
||||
start: int = (term_width - len(status)) // 2
|
||||
header[start:start+len(status)] = list(status)
|
||||
header_text = "".join(header)
|
||||
header_text: str = "".join(header)
|
||||
layout["header"].update(Panel(header_text, style="bold white on black"))
|
||||
continue
|
||||
|
||||
with self.data_lock:
|
||||
if len(self.live_data) < 1:
|
||||
continue
|
||||
latest = self.live_data[-1]
|
||||
data = self.live_data[-plot_width:]
|
||||
latest: Dict[str, float] = self.live_data[-1]
|
||||
data: List[Dict[str, float]] = self.live_data[-plot_width:]
|
||||
|
||||
if not self.orientation_visualizer.calibration_complete:
|
||||
sample = [
|
||||
sample: List[float] = [
|
||||
latest.get('orientation 1', 0),
|
||||
latest.get('orientation 2', 0),
|
||||
latest.get('orientation 3', 0)
|
||||
]
|
||||
self.orientation_visualizer.add_calibration_sample(sample)
|
||||
time.sleep(0.05)
|
||||
rec_str = " [red][REC][/red]" if record_data else ""
|
||||
rec_str: str = " [red][REC][/red]" if record_data else ""
|
||||
|
||||
left = "AirPods Head Tracking - v1.0.0"
|
||||
status = "[bold yellow]Calibrating...[/bold yellow]"
|
||||
right = "Ctrl+C - Close | p - Pause"
|
||||
remaining = max(term_width - len(left) - len(right), 0)
|
||||
header_text = f"{left}{status.center(remaining)}{right}{rec_str}"
|
||||
left: str = "AirPods Head Tracking - v1.0.0"
|
||||
status: str = "[bold yellow]Calibrating...[/bold yellow]"
|
||||
right: str = "Ctrl+C - Close | p - Pause"
|
||||
remaining: int = max(term_width - len(left) - len(right), 0)
|
||||
header_text: str = f"{left}{status.center(remaining)}{right}{rec_str}"
|
||||
layout["header"].update(Panel(header_text, style="bold white on black"))
|
||||
live.refresh()
|
||||
continue
|
||||
|
||||
o1 = latest.get('orientation 1', 0)
|
||||
o2 = latest.get('orientation 2', 0)
|
||||
o3 = latest.get('orientation 3', 0)
|
||||
orientation = self.orientation_visualizer.calculate_orientation(o1, o2, o3)
|
||||
pitch = orientation['pitch']
|
||||
yaw = orientation['yaw']
|
||||
o1: float = latest.get('orientation 1', 0)
|
||||
o2: float = latest.get('orientation 2', 0)
|
||||
o3: float = latest.get('orientation 3', 0)
|
||||
orientation: Dict[str, float] = self.orientation_visualizer.calculate_orientation(o1, o2, o3)
|
||||
pitch: float = orientation['pitch']
|
||||
yaw: float = orientation['yaw']
|
||||
|
||||
h_accel = [p.get('Horizontal Acceleration', 0) for p in data]
|
||||
v_accel = [p.get('Vertical Acceleration', 0) for p in data]
|
||||
h_accel: List[float] = [p.get('Horizontal Acceleration', 0) for p in data]
|
||||
v_accel: List[float] = [p.get('Vertical Acceleration', 0) for p in data]
|
||||
if len(h_accel) > plot_width:
|
||||
h_accel = h_accel[-plot_width:]
|
||||
if len(v_accel) > plot_width:
|
||||
v_accel = v_accel[-plot_width:]
|
||||
global_min = min(min(v_accel), min(h_accel))
|
||||
global_max = max(max(v_accel), max(h_accel))
|
||||
config_acc = {'height': 20, 'min': global_min, 'max': global_max}
|
||||
vert_plot = acp.plot(v_accel, config_acc)
|
||||
horiz_plot = acp.plot(h_accel, config_acc)
|
||||
global_min: float = min(min(v_accel), min(h_accel))
|
||||
global_max: float = max(max(v_accel), max(h_accel))
|
||||
config_acc: Dict[str, float] = {'height': 20, 'min': global_min, 'max': global_max}
|
||||
vert_plot: str = acp.plot(v_accel, config_acc)
|
||||
horiz_plot: str = acp.plot(h_accel, config_acc)
|
||||
|
||||
rec_str = " [red][REC][/red]" if record_data else ""
|
||||
left = "AirPods Head Tracking - v1.0.0"
|
||||
right = "Ctrl+C - Close | p - Pause" + rec_str
|
||||
status = "[bold green]Live[/bold green]"
|
||||
header = list(" " * term_width)
|
||||
rec_str: str = " [red][REC][/red]" if record_data else ""
|
||||
left: str = "AirPods Head Tracking - v1.0.0"
|
||||
right: str = "Ctrl+C - Close | p - Pause" + rec_str
|
||||
status: str = "[bold green]Live[/bold green]"
|
||||
header: List[str] = list(" " * term_width)
|
||||
header[0:len(left)] = list(left)
|
||||
header[term_width - len(right):] = list(right)
|
||||
start = (term_width - len(status)) // 2
|
||||
start: int = (term_width - len(status)) // 2
|
||||
header[start:start+len(status)] = list(status)
|
||||
header_text = "".join(header)
|
||||
header_text: str = "".join(header)
|
||||
layout["header"].update(Panel(header_text, style="bold white on black"))
|
||||
|
||||
face_art = self.orientation_visualizer.create_face_art(pitch, yaw)
|
||||
face_art: str = self.orientation_visualizer.create_face_art(pitch, yaw)
|
||||
layout["accelerations"]["vertical"].update(Panel(
|
||||
"[bold yellow]Vertical Acceleration[/]\n" +
|
||||
vert_plot + "\n" +
|
||||
@@ -563,15 +544,15 @@ class AirPodsTracker:
|
||||
))
|
||||
layout["orientations"]["face"].update(Panel(face_art, title="[green]Orientation - Visualization[/]", style="green"))
|
||||
|
||||
o2_values = [p.get('orientation 2', 0) for p in data[-plot_width:]]
|
||||
o3_values = [p.get('orientation 3', 0) for p in data[-plot_width:]]
|
||||
o2_values = o2_values[:plot_width]
|
||||
o3_values = o3_values[:plot_width]
|
||||
common_min = min(min(o2_values), min(o3_values))
|
||||
common_max = max(max(o2_values), max(o3_values))
|
||||
config_ori = {'height': ori_height, 'min': common_min, 'max': common_max, 'format': "{:6.0f}"}
|
||||
chart_o2 = acp.plot(o2_values, config_ori)
|
||||
chart_o3 = acp.plot(o3_values, config_ori)
|
||||
o2_values: List[float] = [p.get('orientation 2', 0) for p in data[-plot_width:]]
|
||||
o3_values: List[float] = [p.get('orientation 3', 0) for p in data[-plot_width:]]
|
||||
o2_values: List[float] = o2_values[:plot_width]
|
||||
o3_values: List[float] = o3_values[:plot_width]
|
||||
common_min: float = min(min(o2_values), min(o3_values))
|
||||
common_max: float = max(max(o2_values), max(o3_values))
|
||||
config_ori: Dict[str, float] = {'height': ori_height, 'min': common_min, 'max': common_max, 'format': "{:6.0f}"}
|
||||
chart_o2: str = acp.plot(o2_values, config_ori)
|
||||
chart_o3: str = acp.plot(o3_values, config_ori)
|
||||
layout["orientations"]["raw"].update(Panel(
|
||||
"[bold yellow]Orientation 1:[/]\n" + chart_o2 + "\n" +
|
||||
f"Cur: {o2_values[-1]:6.1f} | Min: {min(o2_values):6.1f} | Max: {max(o2_values):6.1f}\n\n" +
|
||||
@@ -591,10 +572,10 @@ class AirPodsTracker:
|
||||
finally:
|
||||
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, old_settings)
|
||||
|
||||
def _start_live_plotting(self, record_data=False, duration=None):
|
||||
terminal_width = os.get_terminal_size().columns
|
||||
plot_width = min(terminal_width - 10, 80)
|
||||
plot_height = 10
|
||||
def _start_live_plotting(self, record_data: bool = False, duration: Optional[float] = None) -> None:
|
||||
terminal_width: int = os.get_terminal_size().columns
|
||||
plot_width: int = min(terminal_width - 10, 80)
|
||||
plot_height: int = 10
|
||||
|
||||
try:
|
||||
while True:
|
||||
@@ -605,13 +586,13 @@ class AirPodsTracker:
|
||||
time.sleep(0.1)
|
||||
continue
|
||||
|
||||
data = self.live_data[-plot_width:]
|
||||
data: List[Dict[str, float]] = self.live_data[-plot_width:]
|
||||
|
||||
acceleration_fields = [f for f in KEY_FIELDS.keys() if 'acceleration' in f.lower()]
|
||||
orientation_fields = [f for f in KEY_FIELDS.keys() if 'orientation' in f.lower()]
|
||||
other_fields = [f for f in KEY_FIELDS.keys() if f not in acceleration_fields + orientation_fields]
|
||||
acceleration_fields: List[str] = [f for f in KEY_FIELDS.keys() if 'acceleration' in f.lower()]
|
||||
orientation_fields: List[str] = [f for f in KEY_FIELDS.keys() if 'orientation' in f.lower()]
|
||||
other_fields: List[str] = [f for f in KEY_FIELDS.keys() if f not in acceleration_fields + orientation_fields]
|
||||
|
||||
def plot_group(fields, title):
|
||||
def plot_group(fields: List[str], title: str) -> None:
|
||||
if not fields:
|
||||
return
|
||||
|
||||
@@ -619,9 +600,9 @@ class AirPodsTracker:
|
||||
print("=" * len(title))
|
||||
|
||||
for field in fields:
|
||||
values = [packet.get(field, 0) for packet in data if field in packet]
|
||||
values: List[float] = [packet.get(field, 0) for packet in data if field in packet]
|
||||
if len(values) > 0:
|
||||
chart = acp.plot(values, {'height': plot_height})
|
||||
chart: str = acp.plot(values, {'height': plot_height})
|
||||
print(chart)
|
||||
print(f"Current: {values[-1]:.2f}, " +
|
||||
f"Min: {min(values):.2f}, Max: {max(values):.2f}")
|
||||
@@ -641,7 +622,7 @@ class AirPodsTracker:
|
||||
self.stop_tracking()
|
||||
self.live_plotting = False
|
||||
|
||||
def start_live_plotting(self, record_data=False, duration=None):
|
||||
def start_live_plotting(self, record_data: bool = False, duration: Optional[float] = None) -> None:
|
||||
if self.sock is None:
|
||||
if not self.connect():
|
||||
logger.error("Could not connect to AirPods. Live plotting aborted.")
|
||||
@@ -660,12 +641,12 @@ class AirPodsTracker:
|
||||
self._start_live_plotting_terminal(record_data, duration)
|
||||
else:
|
||||
from matplotlib.gridspec import GridSpec, GridSpecFromSubplotSpec
|
||||
fig = plt.figure(figsize=(14, 6))
|
||||
gs = GridSpec(1, 2, width_ratios=[1, 1])
|
||||
ax_accel = fig.add_subplot(gs[0])
|
||||
subgs = GridSpecFromSubplotSpec(2, 1, subplot_spec=gs[1], height_ratios=[2, 1])
|
||||
ax_head_top = fig.add_subplot(subgs[0], projection='3d')
|
||||
ax_ori = fig.add_subplot(subgs[1])
|
||||
fig: Figure = plt.figure(figsize=(14, 6))
|
||||
gs: GridSpec = GridSpec(1, 2, width_ratios=[1, 1])
|
||||
ax_accel: Axes = fig.add_subplot(gs[0])
|
||||
subgs: GridSpecFromSubplotSpec = GridSpecFromSubplotSpec(2, 1, subplot_spec=gs[1], height_ratios=[2, 1])
|
||||
ax_head_top: Axes = fig.add_subplot(subgs[0], projection='3d')
|
||||
ax_ori: Axes = fig.add_subplot(subgs[1])
|
||||
|
||||
ax_accel.set_title("Acceleration Data")
|
||||
ax_accel.set_xlabel("Packet Index")
|
||||
@@ -676,16 +657,16 @@ class AirPodsTracker:
|
||||
self.apply_dark_theme(fig, [ax_accel, ax_head_top, ax_ori])
|
||||
plt.ion()
|
||||
|
||||
def update_plot(_):
|
||||
def update_plot(_: int) -> None:
|
||||
with self.data_lock:
|
||||
data = self.live_data.copy()
|
||||
data: List[Dict[str, float]] = self.live_data.copy()
|
||||
if len(data) == 0:
|
||||
return
|
||||
|
||||
latest = data[-1]
|
||||
latest: Dict[str, float] = data[-1]
|
||||
|
||||
if not self.orientation_visualizer.calibration_complete:
|
||||
sample = [
|
||||
sample: List[float] = [
|
||||
latest.get('orientation 1', 0),
|
||||
latest.get('orientation 2', 0),
|
||||
latest.get('orientation 3', 0)
|
||||
@@ -696,9 +677,9 @@ class AirPodsTracker:
|
||||
fig.canvas.draw_idle()
|
||||
return
|
||||
|
||||
h_accel = [p.get('Horizontal Acceleration', 0) for p in data]
|
||||
v_accel = [p.get('Vertical Acceleration', 0) for p in data]
|
||||
x_vals = list(range(len(h_accel)))
|
||||
h_accel: List[float] = [p.get('Horizontal Acceleration', 0) for p in data]
|
||||
v_accel: List[float] = [p.get('Vertical Acceleration', 0) for p in data]
|
||||
x_vals: List[int] = list(range(len(h_accel)))
|
||||
ax_accel.cla()
|
||||
ax_accel.plot(x_vals, v_accel, label='Vertical Acceleration', color='#FFFF00', linewidth=2)
|
||||
ax_accel.plot(x_vals, h_accel, label='Horizontal Acceleration', color='#00FFFF', linewidth=2)
|
||||
@@ -711,13 +692,13 @@ class AirPodsTracker:
|
||||
ax_accel.xaxis.label.set_color('white')
|
||||
ax_accel.yaxis.label.set_color('white')
|
||||
|
||||
latest = data[-1]
|
||||
o1 = latest.get('orientation 1', 0)
|
||||
o2 = latest.get('orientation 2', 0)
|
||||
o3 = latest.get('orientation 3', 0)
|
||||
orientation = self.orientation_visualizer.calculate_orientation(o1, o2, o3)
|
||||
pitch = orientation['pitch']
|
||||
yaw = orientation['yaw']
|
||||
latest: Dict[str, float] = data[-1]
|
||||
o1: float = latest.get('orientation 1', 0)
|
||||
o2: float = latest.get('orientation 2', 0)
|
||||
o3: float = latest.get('orientation 3', 0)
|
||||
orientation: Dict[str, float] = self.orientation_visualizer.calculate_orientation(o1, o2, o3)
|
||||
pitch: float = orientation['pitch']
|
||||
yaw: float = orientation['yaw']
|
||||
|
||||
ax_head_top.cla()
|
||||
ax_head_top.set_title("Head Orientation")
|
||||
@@ -727,25 +708,25 @@ class AirPodsTracker:
|
||||
ax_head_top.set_facecolor('#2d2d2d')
|
||||
pitch_rad = np.radians(pitch)
|
||||
yaw_rad = np.radians(yaw)
|
||||
Rz = np.array([
|
||||
Rz: NDArray[Any] = np.array([
|
||||
[np.cos(yaw_rad), np.sin(yaw_rad), 0],
|
||||
[-np.sin(yaw_rad), np.cos(yaw_rad), 0],
|
||||
[0, 0, 1]
|
||||
])
|
||||
Ry = np.array([
|
||||
Ry: NDArray[Any] = np.array([
|
||||
[np.cos(pitch_rad), 0, np.sin(pitch_rad)],
|
||||
[0, 1, 0],
|
||||
[-np.sin(pitch_rad), 0, np.cos(pitch_rad)]
|
||||
])
|
||||
R = Rz @ Ry
|
||||
dir_vec = R @ np.array([1, 0, 0])
|
||||
R: NDArray[Any] = Rz @ Ry
|
||||
dir_vec: NDArray[Any] = R @ np.array([1, 0, 0])
|
||||
ax_head_top.quiver(0, 0, 0, dir_vec[0], dir_vec[1], dir_vec[2],
|
||||
color='r', length=0.8, linewidth=3)
|
||||
|
||||
ax_ori.cla()
|
||||
o2_values = [p.get('orientation 2', 0) for p in data]
|
||||
o3_values = [p.get('orientation 3', 0) for p in data]
|
||||
x_range = list(range(len(o2_values)))
|
||||
o2_values: List[float] = [p.get('orientation 2', 0) for p in data]
|
||||
o3_values: List[float] = [p.get('orientation 3', 0) for p in data]
|
||||
x_range: List[int] = list(range(len(o2_values)))
|
||||
ax_ori.plot(x_range, o2_values, label='Orientation 1', color='red', linewidth=2)
|
||||
ax_ori.plot(x_range, o3_values, label='Orientation 2', color='green', linewidth=2)
|
||||
ax_ori.set_facecolor('#2d2d2d')
|
||||
@@ -775,9 +756,9 @@ class AirPodsTracker:
|
||||
self.animation = None
|
||||
plt.ioff()
|
||||
|
||||
def interactive_mode(self):
|
||||
def interactive_mode(self) -> None:
|
||||
from prompt_toolkit import PromptSession
|
||||
session = PromptSession("> ")
|
||||
session: PromptSession = PromptSession("> ")
|
||||
logger.info("\nAirPods Head Tracking Analyzer")
|
||||
print("------------------------------")
|
||||
logger.info("Commands:")
|
||||
@@ -793,59 +774,61 @@ class AirPodsTracker:
|
||||
|
||||
while True:
|
||||
try:
|
||||
cmd_input = session.prompt("> ")
|
||||
cmd_parts = cmd_input.strip().split()
|
||||
cmd_input: str = session.prompt("> ")
|
||||
cmd_parts: List[str] = cmd_input.strip().split()
|
||||
if not cmd_parts:
|
||||
continue
|
||||
cmd = cmd_parts[0].lower()
|
||||
if cmd == "connect":
|
||||
self.connect()
|
||||
elif cmd == "start":
|
||||
duration = float(cmd_parts[1]) if len(cmd_parts) > 1 else None
|
||||
self.start_tracking(duration)
|
||||
elif cmd == "stop":
|
||||
self.stop_tracking()
|
||||
elif cmd == "load" and len(cmd_parts) > 1:
|
||||
self.load_log_file(cmd_parts[1])
|
||||
elif cmd == "plot":
|
||||
self.plot_fields()
|
||||
elif cmd == "live":
|
||||
duration = float(cmd_parts[1]) if len(cmd_parts) > 1 else None
|
||||
logger.info("Starting live plotting mode (without recording)%s.",
|
||||
f" for {duration} seconds" if duration else "")
|
||||
self.start_live_plotting(record_data=False, duration=duration)
|
||||
elif cmd == "liver":
|
||||
duration = float(cmd_parts[1]) if len(cmd_parts) > 1 else None
|
||||
logger.info("Starting live plotting mode WITH recording%s.",
|
||||
f" for {duration} seconds" if duration else "")
|
||||
self.start_live_plotting(record_data=True, duration=duration)
|
||||
elif cmd == "gestures":
|
||||
from gestures import GestureDetector
|
||||
if self.conn is not None:
|
||||
detector = GestureDetector(conn=self.conn)
|
||||
else:
|
||||
detector = GestureDetector()
|
||||
detector.start_detection()
|
||||
elif cmd == "quit":
|
||||
logger.info("Exiting.")
|
||||
if self.conn != None:
|
||||
self.conn.disconnect()
|
||||
break
|
||||
elif cmd == "help":
|
||||
logger.info("\nAirPods Head Tracking Analyzer")
|
||||
logger.info("------------------------------")
|
||||
logger.info("Commands:")
|
||||
logger.info(" connect - connect to your AirPods")
|
||||
logger.info(" start [seconds] - start recording head tracking data, optionally for specified duration")
|
||||
logger.info(" stop - stop recording")
|
||||
logger.info(" load <file> - load and parse a log file")
|
||||
logger.info(" plot - plot all sensor data fields")
|
||||
logger.info(" live [seconds] - start live plotting (without recording), optionally stop recording after seconds")
|
||||
logger.info(" liver [seconds] - start live plotting with recording, optionally stop recording after seconds")
|
||||
logger.info(" gestures - start gesture detection")
|
||||
logger.info(" quit - exit the program")
|
||||
else:
|
||||
logger.info("Unknown command. Type 'help' to see available commands.")
|
||||
match cmd:
|
||||
case "connect":
|
||||
self.connect()
|
||||
case "start":
|
||||
duration = float(cmd_parts[1]) if len(cmd_parts) > 1 else None
|
||||
self.start_tracking(duration)
|
||||
case "stop":
|
||||
self.stop_tracking()
|
||||
case "load":
|
||||
if len(cmd_parts) > 1:
|
||||
self.load_log_file(cmd_parts[1])
|
||||
case "plot":
|
||||
self.plot_fields()
|
||||
case "live":
|
||||
duration = float(cmd_parts[1]) if len(cmd_parts) > 1 else None
|
||||
logger.info("Starting live plotting mode (without recording)%s.",
|
||||
f" for {duration} seconds" if duration else "")
|
||||
self.start_live_plotting(record_data=False, duration=duration)
|
||||
case "liver":
|
||||
duration = float(cmd_parts[1]) if len(cmd_parts) > 1 else None
|
||||
logger.info("Starting live plotting mode WITH recording%s.",
|
||||
f" for {duration} seconds" if duration else "")
|
||||
self.start_live_plotting(record_data=True, duration=duration)
|
||||
case "gestures":
|
||||
from gestures import GestureDetector
|
||||
if self.conn is not None:
|
||||
detector: GestureDetector = GestureDetector(conn=self.conn)
|
||||
else:
|
||||
detector: GestureDetector = GestureDetector()
|
||||
detector.start_detection()
|
||||
case "quit":
|
||||
logger.info("Exiting.")
|
||||
if self.conn != None:
|
||||
self.conn.disconnect()
|
||||
break
|
||||
case "help":
|
||||
logger.info("\nAirPods Head Tracking Analyzer")
|
||||
logger.info("------------------------------")
|
||||
logger.info("Commands:")
|
||||
logger.info(" connect - connect to your AirPods")
|
||||
logger.info(" start [seconds] - start recording head tracking data, optionally for specified duration")
|
||||
logger.info(" stop - stop recording")
|
||||
logger.info(" load <file> - load and parse a log file")
|
||||
logger.info(" plot - plot all sensor data fields")
|
||||
logger.info(" live [seconds] - start live plotting (without recording), optionally stop recording after seconds")
|
||||
logger.info(" liver [seconds] - start live plotting with recording, optionally stop recording after seconds")
|
||||
logger.info(" gestures - start gesture detection")
|
||||
logger.info(" quit - exit the program")
|
||||
case _:
|
||||
logger.info("Unknown command. Type 'help' to see available commands.")
|
||||
except KeyboardInterrupt:
|
||||
logger.info("Use 'quit' to exit.")
|
||||
except EOFError:
|
||||
@@ -856,5 +839,5 @@ class AirPodsTracker:
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
tracker = AirPodsTracker()
|
||||
tracker.interactive_mode()
|
||||
tracker: AirPodsTracker = AirPodsTracker()
|
||||
tracker.interactive_mode()
|
||||
|
||||
@@ -4,13 +4,18 @@ project(linux VERSION 0.1 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Quick Widgets Bluetooth DBus)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Quick Widgets Bluetooth DBus LinguistTools)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PULSEAUDIO REQUIRED libpulse)
|
||||
|
||||
qt_standard_project_setup()
|
||||
|
||||
# Translation files
|
||||
set(TS_FILES
|
||||
translations/librepods_tr.ts
|
||||
)
|
||||
|
||||
qt_add_executable(librepods
|
||||
main.cpp
|
||||
logger.h
|
||||
@@ -83,3 +88,15 @@ install(TARGETS librepods
|
||||
)
|
||||
install(FILES assets/me.kavishdevar.librepods.desktop
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
install(FILES assets/librepods.png
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps")
|
||||
|
||||
# Translation support
|
||||
qt_add_translations(librepods
|
||||
TS_FILES ${TS_FILES}
|
||||
QM_FILES_OUTPUT_VARIABLE QM_FILES
|
||||
)
|
||||
|
||||
# Install translation files
|
||||
install(FILES ${QM_FILES}
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/librepods/translations")
|
||||
|
||||
@@ -81,7 +81,7 @@ ApplicationWindow {
|
||||
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: airPodsTrayApp.airpodsConnected ? "Connected" : "Disconnected"
|
||||
text: airPodsTrayApp.airpodsConnected ? qsTr("Connected") : qsTr("Disconnected")
|
||||
color: "white"
|
||||
font.pixelSize: 12
|
||||
font.weight: Font.Medium
|
||||
@@ -118,11 +118,19 @@ ApplicationWindow {
|
||||
batteryLevel: airPodsTrayApp.deviceInfo.battery.caseLevel
|
||||
isCharging: airPodsTrayApp.deviceInfo.battery.caseCharging
|
||||
}
|
||||
|
||||
PodColumn {
|
||||
visible: airPodsTrayApp.deviceInfo.battery.headsetAvailable
|
||||
inEar: true
|
||||
iconSource: "qrc:/icons/assets/" + airPodsTrayApp.deviceInfo.podIcon
|
||||
batteryLevel: airPodsTrayApp.deviceInfo.battery.headsetLevel
|
||||
isCharging: airPodsTrayApp.deviceInfo.battery.headsetCharging
|
||||
}
|
||||
}
|
||||
|
||||
SegmentedControl {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
model: ["Off", "Noise Cancellation", "Transparency", "Adaptive"]
|
||||
model: [qsTr("Off"), qsTr("Noise Cancellation"), qsTr("Transparency"), qsTr("Adaptive")]
|
||||
currentIndex: airPodsTrayApp.deviceInfo.noiseControlMode
|
||||
onCurrentIndexChanged: airPodsTrayApp.setNoiseControlModeInt(currentIndex)
|
||||
visible: airPodsTrayApp.airpodsConnected
|
||||
@@ -145,21 +153,21 @@ ApplicationWindow {
|
||||
onValueChanged: if (pressed) debounceTimer.restart()
|
||||
|
||||
Label {
|
||||
text: "Adaptive Noise Level: " + parent.value
|
||||
text: qsTr("Adaptive Noise Level: ") + parent.value
|
||||
anchors.top: parent.bottom
|
||||
}
|
||||
}
|
||||
|
||||
Switch {
|
||||
visible: airPodsTrayApp.airpodsConnected
|
||||
text: "Conversational Awareness"
|
||||
text: qsTr("Conversational Awareness")
|
||||
checked: airPodsTrayApp.deviceInfo.conversationalAwareness
|
||||
onCheckedChanged: airPodsTrayApp.setConversationalAwareness(checked)
|
||||
}
|
||||
|
||||
Switch {
|
||||
visible: airPodsTrayApp.airpodsConnected
|
||||
text: "Hearing Aid"
|
||||
text: qsTr("Hearing Aid")
|
||||
checked: airPodsTrayApp.deviceInfo.hearingAidEnabled
|
||||
onCheckedChanged: airPodsTrayApp.setHearingAidEnabled(checked)
|
||||
}
|
||||
@@ -181,7 +189,7 @@ ApplicationWindow {
|
||||
id: settingsPage
|
||||
Page {
|
||||
id: settingsPageItem
|
||||
title: "Settings"
|
||||
title: qsTr("Settings")
|
||||
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
@@ -192,7 +200,7 @@ ApplicationWindow {
|
||||
padding: 20
|
||||
|
||||
Label {
|
||||
text: "Settings"
|
||||
text: qsTr("Settings")
|
||||
font.pixelSize: 24
|
||||
// center the label
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
@@ -202,19 +210,19 @@ ApplicationWindow {
|
||||
spacing: 5 // Small gap between label and ComboBox
|
||||
|
||||
Label {
|
||||
text: "Pause Behavior When Removing AirPods:"
|
||||
text: qsTr("Pause Behavior When Removing AirPods:")
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
width: parent.width // Ensures full width
|
||||
model: ["One Removed", "Both Removed", "Never"]
|
||||
model: [qsTr("One Removed"), qsTr("Both Removed"), qsTr("Never")]
|
||||
currentIndex: airPodsTrayApp.earDetectionBehavior
|
||||
onActivated: airPodsTrayApp.earDetectionBehavior = currentIndex
|
||||
}
|
||||
}
|
||||
|
||||
Switch {
|
||||
text: "Cross-Device Connectivity with Android"
|
||||
text: qsTr("Cross-Device Connectivity with Android")
|
||||
checked: airPodsTrayApp.crossDeviceEnabled
|
||||
onCheckedChanged: {
|
||||
airPodsTrayApp.setCrossDeviceEnabled(checked)
|
||||
@@ -222,26 +230,26 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Switch {
|
||||
text: "Auto-Start on Login"
|
||||
text: qsTr("Auto-Start on Login")
|
||||
checked: airPodsTrayApp.autoStartManager.autoStartEnabled
|
||||
onCheckedChanged: airPodsTrayApp.autoStartManager.autoStartEnabled = checked
|
||||
}
|
||||
|
||||
Switch {
|
||||
text: "Enable System Notifications"
|
||||
text: qsTr("Enable System Notifications")
|
||||
checked: airPodsTrayApp.notificationsEnabled
|
||||
onCheckedChanged: airPodsTrayApp.notificationsEnabled = checked
|
||||
}
|
||||
|
||||
Switch {
|
||||
visible: airPodsTrayApp.airpodsConnected
|
||||
text: "One Bud ANC Mode"
|
||||
text: qsTr("One Bud ANC Mode")
|
||||
checked: airPodsTrayApp.deviceInfo.oneBudANCMode
|
||||
onCheckedChanged: airPodsTrayApp.deviceInfo.oneBudANCMode = checked
|
||||
|
||||
ToolTip {
|
||||
visible: parent.hovered
|
||||
text: "Enable ANC when using one AirPod\n(More noise reduction, but uses more battery)"
|
||||
text: qsTr("Enable ANC when using one AirPod\n(More noise reduction, but uses more battery)")
|
||||
delay: 500
|
||||
}
|
||||
}
|
||||
@@ -249,7 +257,7 @@ ApplicationWindow {
|
||||
Row {
|
||||
spacing: 5
|
||||
Label {
|
||||
text: "Bluetooth Retry Attempts:"
|
||||
text: qsTr("Bluetooth Retry Attempts:")
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
SpinBox {
|
||||
@@ -271,7 +279,7 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Rename"
|
||||
text: qsTr("Rename")
|
||||
onClicked: airPodsTrayApp.renameAirPods(newNameField.text)
|
||||
}
|
||||
}
|
||||
@@ -287,14 +295,14 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Button {
|
||||
text: "Change Phone MAC"
|
||||
text: qsTr("Change Phone MAC")
|
||||
onClicked: airPodsTrayApp.setPhoneMac(newPhoneMacField.text)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Button {
|
||||
text: "Show Magic Cloud Keys QR"
|
||||
text: qsTr("Show Magic Cloud Keys QR")
|
||||
onClicked: keysQrDialog.show()
|
||||
}
|
||||
|
||||
@@ -318,4 +326,4 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user