Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eb99c9260 | ||
|
|
53fba5f721 | ||
|
|
b0f42933c0 | ||
|
|
e65ed38a7f | ||
|
|
3b99ea1c97 | ||
|
|
20ae226c57 | ||
|
|
b7818d1ac4 | ||
|
|
4a8ba85e33 | ||
|
|
7a4cb6cd35 | ||
|
|
907f7d8fc2 | ||
|
|
7f2e682966 | ||
|
|
57121a8d55 | ||
|
|
9098191e8b | ||
|
|
33d606543f | ||
|
|
c1e8fd167d | ||
|
|
fcaf9ba459 | ||
|
|
0e6c29b7a0 | ||
|
|
ab001740d5 | ||
|
|
84aa1ca31f | ||
|
|
1cea7e7284 | ||
|
|
2e8bbc9d4d | ||
|
|
d366c60573 | ||
|
|
e516a8c232 | ||
|
|
a284bda622 | ||
|
|
fd7be864d3 | ||
|
|
cdc46b1477 | ||
|
|
6469931be7 | ||
|
|
c2d602eff4 | ||
|
|
18311dafe1 | ||
|
|
e15c35a3f9 | ||
|
|
f4ac967636 | ||
|
|
09da00294e | ||
|
|
12dbb990ab | ||
|
|
9a25fae808 | ||
|
|
ea8a01b482 | ||
|
|
510762ed92 | ||
|
|
79d1567ce1 | ||
|
|
49a8a1587a | ||
|
|
364a641e08 | ||
|
|
271203324e | ||
|
|
9a86e8f2e9 | ||
|
|
bb9479eabd | ||
|
|
85f25ce813 | ||
|
|
fac057cf1c | ||
|
|
23546b4ed2 | ||
|
|
9450983100 | ||
|
|
4ee083e0f5 | ||
|
|
273e916532 | ||
|
|
4c3a12f2bc | ||
|
|
feda23c352 | ||
|
|
cb3d83d309 | ||
|
|
c271d47f34 |
@@ -2,6 +2,7 @@
|
|||||||
.gradle
|
.gradle
|
||||||
/local.properties
|
/local.properties
|
||||||
/.idea/caches
|
/.idea/caches
|
||||||
|
/.idea/dictionaries
|
||||||
/.idea/libraries
|
/.idea/libraries
|
||||||
/.idea/modules.xml
|
/.idea/modules.xml
|
||||||
/.idea/workspace.xml
|
/.idea/workspace.xml
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<compositeConfiguration>
|
<option name="delegatedBuild" value="false" />
|
||||||
<compositeBuild compositeDefinitionSource="SCRIPT" />
|
<option name="testRunner" value="PLATFORM" />
|
||||||
</compositeConfiguration>
|
|
||||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
<option name="resolveModulePerSourceSet" value="false" />
|
<option name="resolveModulePerSourceSet" value="false" />
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="BintrayJCenter" />
|
||||||
|
<option name="name" value="BintrayJCenter" />
|
||||||
|
<option name="url" value="https://jcenter.bintray.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google" />
|
||||||
|
<option name="name" value="Google" />
|
||||||
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||||
</configurations>
|
</configurations>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RenderSettings">
|
||||||
|
<option name="showDecorations" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -1,15 +1,19 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 29
|
||||||
|
buildToolsVersion "29.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.dosse.airpods"
|
applicationId "com.dosse.airpods"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 23
|
targetSdkVersion 29
|
||||||
versionCode 11
|
versionCode 14
|
||||||
versionName '1.0'
|
versionName '1.4'
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
@@ -21,9 +25,14 @@ android {
|
|||||||
lintOptions {
|
lintOptions {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = 1.8
|
||||||
|
targetCompatibility = 1.8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
|
implementation "androidx.preference:preference:1.1.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.dosse.airpods">
|
package="com.dosse.airpods">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
@@ -7,23 +8,45 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.bluetooth_le"
|
android:name="android.hardware.bluetooth_le"
|
||||||
android:required="true" />
|
android:required="false" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
android:fullBackupContent="@xml/backup_descriptor"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity android:name=".AboutActivity"
|
|
||||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
<activity
|
||||||
<activity android:name=".SettingsActivity"/>
|
android:name=".MainActivity"
|
||||||
|
android:launchMode="singleTop">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".AboutActivity"
|
||||||
|
android:label="@string/about"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:parentActivityName=".SettingsActivity" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".SettingsActivity"
|
||||||
|
android:label="@string/settings"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:parentActivityName=".MainActivity" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".NoBTActivity"
|
android:name=".NoBTActivity"
|
||||||
android:label="@string/app_name" />
|
android:label="@string/app_name" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".IntroActivity"
|
android:name=".IntroActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
@@ -37,22 +60,15 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||||
<action android:name="android.intent.action.PACKAGE_INSTALL" />
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".PodsService"
|
android:name=".PodsService"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="true" />
|
android:exported="true"
|
||||||
|
tools:ignore="ExportedService" />
|
||||||
|
|
||||||
<activity android:name=".MainActivity">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -2,29 +2,35 @@ package com.dosse.airpods;
|
|||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
public class AboutActivity extends AppCompatActivity {
|
public class AboutActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
|
||||||
|
public static final String websiteURL = "https://fdossena.com/?p=openPods/index.frag";
|
||||||
|
public static final String githubURL = "https://github.com/adolfintel/OpenPods";
|
||||||
|
public static final String donateURL = "https://paypal.me/sineisochronic";
|
||||||
|
public static final String fdroidURL = "https://f-droid.org/packages/com.dosse.airpods/";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate (Bundle savedInstanceState) {
|
protected void onCreate (Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_about);
|
setContentView(R.layout.activity_about);
|
||||||
|
|
||||||
/**
|
// --------------- LEGAL DANGER ZONE! --------------- //
|
||||||
* LEGAL DANGER ZONE!
|
|
||||||
*
|
/*
|
||||||
* The following actions are a violation of the GNU GPLv3 License:
|
* The following actions are a violation of the GNU GPLv3 License:
|
||||||
* - Removing, hiding or altering the license or the code that displays it
|
* - Removing, hiding or altering the license or the code that displays it
|
||||||
* - Removing or changing the link to the original source code or the code that displays it
|
* - Removing or changing the link to the original source code or the code that displays it
|
||||||
* - Removing or changing the donation link of the original project or the code that displays it
|
* - Removing or changing the donation link of the original project or the code that displays it
|
||||||
*
|
*
|
||||||
* If you're forking the application, it MUST be made clear that your version is a fork, who the original author is, and all references to the original project and license must not be removed.
|
* If you're forking the application, it MUST be made clear that your version is a fork,
|
||||||
|
* who the original author is, and all references to the original project and license must not be removed.
|
||||||
* You are free to add links to your project, donations, whatever to this activity.
|
* You are free to add links to your project, donations, whatever to this activity.
|
||||||
*
|
*
|
||||||
* I am constantly monitoring all major Android app stores for violations. You have been warned.
|
* I am constantly monitoring all major Android app stores for violations. You have been warned.
|
||||||
@@ -32,26 +38,14 @@ public class AboutActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
((WebView)(findViewById(R.id.license))).loadUrl("file:///android_asset/license.html");
|
((WebView)(findViewById(R.id.license))).loadUrl("file:///android_asset/license.html");
|
||||||
|
|
||||||
((Button)(findViewById(R.id.github))).setOnClickListener(new View.OnClickListener() {
|
findViewById(R.id.website).setOnClickListener(v -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(websiteURL))));
|
||||||
@Override
|
findViewById(R.id.github).setOnClickListener(v -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(githubURL))));
|
||||||
public void onClick(View v) {
|
findViewById(R.id.donate).setOnClickListener(v -> {
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/adolfintel/OpenPods")));
|
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(donateURL)));
|
||||||
}
|
|
||||||
});
|
|
||||||
((Button)(findViewById(R.id.website))).setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://fdossena.com/?p=openPods/i.frag")));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
((Button)(findViewById(R.id.donate))).setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://paypal.me/sineisochronic")));
|
|
||||||
Toast.makeText(AboutActivity.this, "❤️", Toast.LENGTH_SHORT).show();
|
Toast.makeText(AboutActivity.this, "❤️", Toast.LENGTH_SHORT).show();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//END OF LEGAL DANGER ZONE
|
// ------------ END OF LEGAL DANGER ZONE ------------ //
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,59 +1,68 @@
|
|||||||
package com.dosse.airpods;
|
package com.dosse.airpods;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.support.v4.content.ContextCompat;
|
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
public class IntroActivity extends AppCompatActivity {
|
public class IntroActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private Timer t;
|
private Timer timer;
|
||||||
|
|
||||||
|
@SuppressLint("BatteryLife")
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate (Bundle savedInstanceState) {
|
protected void onCreate (Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_intro);
|
setContentView(R.layout.activity_intro);
|
||||||
((Button)findViewById(R.id.allowBtn)).setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
// Allow button clicked, ask for permissions
|
||||||
public void onClick(View view) { //allow button clicked, ask for permissions
|
findViewById(R.id.allowBtn).setOnClickListener(view -> {
|
||||||
requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, 1); //location (for BLE)
|
requestPermissions(new String[] {Manifest.permission.ACCESS_COARSE_LOCATION}, 1); // Location (for BLE)
|
||||||
try { //run in background
|
// Run in background
|
||||||
if(!getSystemService(PowerManager.class).isIgnoringBatteryOptimizations(getPackageName())) {
|
try {
|
||||||
|
if (!Objects.requireNonNull(getSystemService(PowerManager.class)).isIgnoringBatteryOptimizations(getPackageName())) {
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
getSystemService(Context.POWER_SERVICE);
|
||||||
intent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
|
intent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
|
||||||
intent.setData(Uri.parse("package:" + getPackageName()));
|
intent.setData(Uri.parse("package:" + getPackageName()));
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable ignored) {
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//wait for permissions to be granted. When they are granted, go to MainActivity
|
|
||||||
t= new Timer();
|
// Wait for permissions to be granted.
|
||||||
t.scheduleAtFixedRate(new TimerTask() {
|
// When they are granted, go to MainActivity.
|
||||||
|
timer = new Timer();
|
||||||
|
timer.scheduleAtFixedRate(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run () {
|
public void run () {
|
||||||
boolean ok = true;
|
boolean ok = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!getSystemService(PowerManager.class).isIgnoringBatteryOptimizations(getPackageName())) ok = false;
|
if (!Objects.requireNonNull(getSystemService(PowerManager.class)).isIgnoringBatteryOptimizations(getPackageName()))
|
||||||
}catch(Throwable t){}
|
ok = false;
|
||||||
if (ContextCompat.checkSelfPermission(IntroActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) ok=false;
|
} catch (Throwable ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ContextCompat.checkSelfPermission(IntroActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)
|
||||||
|
ok = false;
|
||||||
|
|
||||||
if (ok) {
|
if (ok) {
|
||||||
t.cancel();
|
timer.cancel();
|
||||||
Intent i=new Intent(IntroActivity.this,MainActivity.class);
|
startActivity(new Intent(IntroActivity.this, MainActivity.class));
|
||||||
startActivity(i);
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,9 +70,12 @@ public class IntroActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Activity destroyed (or screen rotated). destroy the timer too
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() { //activity destroyed (or screen rotated). destroy the timer too
|
protected void onDestroy () {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
if(t!=null) t.cancel();
|
if (timer != null)
|
||||||
|
timer.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,14 @@ import android.content.Intent;
|
|||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.view.Menu;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.view.MenuItem;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
import androidx.annotation.NonNull;
|
||||||
import android.widget.Button;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@@ -20,34 +23,33 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
protected void onCreate (Bundle savedInstanceState) {
|
protected void onCreate (Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
//check if Bluetooth LE is available on this device. If not, show an error
|
|
||||||
BluetoothAdapter btAdapter=((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter();
|
// Check if Bluetooth LE is available on this device. If not, show an error
|
||||||
if(btAdapter==null||(btAdapter.isEnabled()&&btAdapter.getBluetoothLeScanner()==null)){
|
BluetoothAdapter btAdapter = ((BluetoothManager)Objects.requireNonNull(getSystemService(Context.BLUETOOTH_SERVICE))).getAdapter();
|
||||||
Intent i=new Intent(this,NoBTActivity.class);
|
if (btAdapter == null || (btAdapter.isEnabled() && btAdapter.getBluetoothLeScanner() == null) || (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE))) {
|
||||||
startActivity(i);
|
startActivity(new Intent(MainActivity.this, NoBTActivity.class));
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//check if all permissions have been granted
|
|
||||||
|
// Check if all permissions have been granted
|
||||||
boolean ok = true;
|
boolean ok = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!getSystemService(PowerManager.class).isIgnoringBatteryOptimizations(getPackageName())) ok = false;
|
if (!Objects.requireNonNull(getSystemService(PowerManager.class)).isIgnoringBatteryOptimizations(getPackageName()))
|
||||||
}catch(Throwable t){}
|
ok = false;
|
||||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) ok=false;
|
} catch (Throwable ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED)
|
||||||
|
ok = false;
|
||||||
|
|
||||||
if (ok) {
|
if (ok) {
|
||||||
Starter.startPodsService(getApplicationContext());
|
Starter.startPodsService(getApplicationContext());
|
||||||
} else {
|
} else {
|
||||||
Intent i=new Intent(this,IntroActivity.class);
|
startActivity(new Intent(MainActivity.this, IntroActivity.class));
|
||||||
startActivity(i);
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
((Button)(findViewById(R.id.settings))).setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) { //settings clicked
|
|
||||||
Intent i=new Intent(MainActivity.this, SettingsActivity.class);
|
|
||||||
startActivity(i);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -56,6 +58,23 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
try {
|
try {
|
||||||
getApplicationContext().openFileInput("hidden").close();
|
getApplicationContext().openFileInput("hidden").close();
|
||||||
finish();
|
finish();
|
||||||
}catch (Throwable t){}
|
} catch (Throwable ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu (Menu menu) {
|
||||||
|
getMenuInflater().inflate(R.menu.menu_main, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected (@NonNull MenuItem item) {
|
||||||
|
if (item.getItemId() == R.id.menu_ab_settings) {
|
||||||
|
startActivity(new Intent(this, SettingsActivity.class)); // Settings icon clicked
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
package com.dosse.airpods;
|
package com.dosse.airpods;
|
||||||
|
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
public class NoBTActivity extends AppCompatActivity {
|
public class NoBTActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -10,4 +11,5 @@ public class NoBTActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_no_bt);
|
setContentView(R.layout.activity_no_bt);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,20 +26,23 @@ import android.os.IBinder;
|
|||||||
import android.os.ParcelUuid;
|
import android.os.ParcelUuid;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.support.v4.app.NotificationCompat;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.RemoteViews;
|
import android.widget.RemoteViews;
|
||||||
|
|
||||||
|
import androidx.core.app.NotificationCompat;
|
||||||
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the class that does most of the work. It has 3 functions:
|
* This is the class that does most of the work. It has 3 functions:
|
||||||
* - Detect when AirPods are detected
|
* - Detect when AirPods are detected
|
||||||
* - Receive beacons from AirPods and decode them (easier said than done thanks do google's autism)
|
* - Receive beacons from AirPods and decode them (easier said than done thanks to google's autism)
|
||||||
* - Display the notification with the status
|
* - Display the notification with the status
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class PodsService extends Service {
|
public class PodsService extends Service {
|
||||||
private static final boolean ENABLE_LOGGING = BuildConfig.DEBUG; // Log is only displayed if this is a debug build, not release
|
private static final boolean ENABLE_LOGGING = BuildConfig.DEBUG; // Log is only displayed if this is a debug build, not release
|
||||||
@@ -47,6 +50,8 @@ public class PodsService extends Service {
|
|||||||
private static BluetoothLeScanner btScanner;
|
private static BluetoothLeScanner btScanner;
|
||||||
private static int leftStatus = 15, rightStatus = 15, caseStatus = 15;
|
private static int leftStatus = 15, rightStatus = 15, caseStatus = 15;
|
||||||
private static boolean chargeL = false, chargeR = false, chargeCase = false;
|
private static boolean chargeL = false, chargeR = false, chargeCase = false;
|
||||||
|
private static final String MODEL_AIRPODS_NORMAL = "airpods12", MODEL_AIRPODS_PRO = "airpodspro";
|
||||||
|
private static String model = MODEL_AIRPODS_NORMAL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following method (startAirPodsScanner) creates a bluetoth LE scanner.
|
* The following method (startAirPodsScanner) creates a bluetoth LE scanner.
|
||||||
@@ -54,15 +59,16 @@ public class PodsService extends Service {
|
|||||||
* - Check that the beacon comes from something that looks like a pair of AirPods
|
* - Check that the beacon comes from something that looks like a pair of AirPods
|
||||||
* - Make sure that it is YOUR pair of AirPods
|
* - Make sure that it is YOUR pair of AirPods
|
||||||
* - Decode the beacon to get the status
|
* - Decode the beacon to get the status
|
||||||
*
|
* <p>
|
||||||
* On a normal OS, we would use the bluetooth address of the device to filter out beacons from other devices.
|
* On a normal OS, we would use the bluetooth address of the device to filter out beacons from other devices.
|
||||||
* UNFORTUNATELY, someone at google was so concerned about privacy (yea, as if they give a shit) that he decided it was a good idea to not allow access to the bluetooth address of incoming BLE beacons. As a result, we have no reliable way to make sure that the beacon comes from YOUR airpods and not the guy sitting next to you on the bus.
|
* UNFORTUNATELY, someone at google was so concerned about privacy (yea, as if they give a shit) that he decided it was a good idea to not allow access to the bluetooth address of incoming BLE beacons.
|
||||||
|
* As a result, we have no reliable way to make sure that the beacon comes from YOUR airpods and not the guy sitting next to you on the bus.
|
||||||
* What we did to workaround this issue is this:
|
* What we did to workaround this issue is this:
|
||||||
* - When a beacon arrives that looks like a pair of AirPods, look at the other beacons received in the last 10 seconds and get the strongest one
|
* - When a beacon arrives that looks like a pair of AirPods, look at the other beacons received in the last 10 seconds and get the strongest one
|
||||||
* - If the strongest beacon's fake address is the same as this, use this beacon; otherwise use the strongest beacon
|
* - If the strongest beacon's fake address is the same as this, use this beacon; otherwise use the strongest beacon
|
||||||
* - Filter for signals stronger than -60db
|
* - Filter for signals stronger than -60db
|
||||||
* - Decode...
|
* - Decode...
|
||||||
*
|
* <p>
|
||||||
* Decoding the beacon:
|
* Decoding the beacon:
|
||||||
* This was done through reverse engineering. Hopefully it's correct.
|
* This was done through reverse engineering. Hopefully it's correct.
|
||||||
* - The beacon coming from a pair of AirPods contains a manufacturer specific data field n°76 of 27 bytes
|
* - The beacon coming from a pair of AirPods contains a manufacturer specific data field n°76 of 27 bytes
|
||||||
@@ -70,18 +76,23 @@ public class PodsService extends Service {
|
|||||||
* - The 12th and 13th characters in the string represent the charge of the left and right pods. Under unknown circumstances, they are right and left instead (see isFlipped). Values between 0 and 10 are battery 0-100%; Value 15 means it's disconnected
|
* - The 12th and 13th characters in the string represent the charge of the left and right pods. Under unknown circumstances, they are right and left instead (see isFlipped). Values between 0 and 10 are battery 0-100%; Value 15 means it's disconnected
|
||||||
* - The 15th character in the string represents the charge of the case. Values between 0 and 10 are battery 0-100%; Value 15 means it's disconnected
|
* - The 15th character in the string represents the charge of the case. Values between 0 and 10 are battery 0-100%; Value 15 means it's disconnected
|
||||||
* - The 14th character in the string represents the "in charge" status. Bit 0 (LSB) is the left pod; Bit 1 is the right pod; Bit 2 is the case. Bit 3 might be case open/closed but I'm not sure and it's not used
|
* - The 14th character in the string represents the "in charge" status. Bit 0 (LSB) is the left pod; Bit 1 is the right pod; Bit 2 is the case. Bit 3 might be case open/closed but I'm not sure and it's not used
|
||||||
*
|
* - The 7th character in the string represents the AirPods model (E=AirPods pro)
|
||||||
|
* <p>
|
||||||
* After decoding a beacon, the status is written to leftStatus, rightStatus, caseStatus, chargeL, chargeR, chargeCase so that the NotificationThread can use the information
|
* After decoding a beacon, the status is written to leftStatus, rightStatus, caseStatus, chargeL, chargeR, chargeCase so that the NotificationThread can use the information
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
private static ArrayList<ScanResult> recentBeacons = new ArrayList<>();
|
private static ArrayList<ScanResult> recentBeacons = new ArrayList<>();
|
||||||
private static final long RECENT_BEACONS_MAX_T_NS = 10000000000L; //10s
|
private static final long RECENT_BEACONS_MAX_T_NS = 10000000000L; //10s
|
||||||
|
|
||||||
private void startAirPodsScanner () {
|
private void startAirPodsScanner () {
|
||||||
try {
|
try {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"START SCANNER");
|
if (ENABLE_LOGGING)
|
||||||
SharedPreferences prefs=getSharedPreferences("openpods",MODE_PRIVATE);
|
Log.d(TAG, "START SCANNER");
|
||||||
|
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
|
||||||
BluetoothManager btManager = (BluetoothManager)getSystemService(Context.BLUETOOTH_SERVICE);
|
BluetoothManager btManager = (BluetoothManager)getSystemService(Context.BLUETOOTH_SERVICE);
|
||||||
|
assert btManager != null;
|
||||||
BluetoothAdapter btAdapter = btManager.getAdapter();
|
BluetoothAdapter btAdapter = btManager.getAdapter();
|
||||||
|
|
||||||
if (prefs.getBoolean("batterySaver", false)) {
|
if (prefs.getBoolean("batterySaver", false)) {
|
||||||
if (btScanner != null) {
|
if (btScanner != null) {
|
||||||
btScanner.stopScan(new ScanCallback() {
|
btScanner.stopScan(new ScanCallback() {
|
||||||
@@ -91,17 +102,19 @@ public class PodsService extends Service {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
btScanner = btAdapter.getBluetoothLeScanner();
|
btScanner = btAdapter.getBluetoothLeScanner();
|
||||||
if (btAdapter == null) throw new Exception("No BT");
|
|
||||||
if (!btAdapter.isEnabled()) throw new Exception("BT Off");
|
if (!btAdapter.isEnabled())
|
||||||
|
throw new Exception("BT Off");
|
||||||
|
|
||||||
List<ScanFilter> filters = getScanFilters();
|
List<ScanFilter> filters = getScanFilters();
|
||||||
ScanSettings settings;
|
ScanSettings settings;
|
||||||
if(prefs.getBoolean("batterySaver",false)) {
|
|
||||||
|
if (prefs.getBoolean("batterySaver", false))
|
||||||
settings = new ScanSettings.Builder().setScanMode(0).setReportDelay(0).build();
|
settings = new ScanSettings.Builder().setScanMode(0).setReportDelay(0).build();
|
||||||
}else{
|
else
|
||||||
settings = new ScanSettings.Builder().setScanMode(2).setReportDelay(2).build();
|
settings = new ScanSettings.Builder().setScanMode(2).setReportDelay(2).build();
|
||||||
}
|
|
||||||
|
|
||||||
btScanner.startScan(
|
btScanner.startScan(
|
||||||
filters,
|
filters,
|
||||||
@@ -109,56 +122,92 @@ public class PodsService extends Service {
|
|||||||
new ScanCallback() {
|
new ScanCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onBatchScanResults (List<ScanResult> scanResults) {
|
public void onBatchScanResults (List<ScanResult> scanResults) {
|
||||||
for (ScanResult result : scanResults) onScanResult(-1, result);
|
for (ScanResult result : scanResults)
|
||||||
|
onScanResult(-1, result);
|
||||||
super.onBatchScanResults(scanResults);
|
super.onBatchScanResults(scanResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onScanResult (int callbackType, ScanResult result) {
|
public void onScanResult (int callbackType, ScanResult result) {
|
||||||
try {
|
try {
|
||||||
byte[] data = result.getScanRecord().getManufacturerSpecificData(76);
|
byte[] data = Objects.requireNonNull(result.getScanRecord()).getManufacturerSpecificData(76);
|
||||||
if (data == null||data.length!=27) return;
|
|
||||||
|
if (data == null || data.length != 27)
|
||||||
|
return;
|
||||||
|
|
||||||
recentBeacons.add(result);
|
recentBeacons.add(result);
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,""+result.getRssi()+"db");
|
|
||||||
if(ENABLE_LOGGING) Log.d(TAG, decodeHex(data));
|
if (ENABLE_LOGGING) {
|
||||||
|
Log.d(TAG, "" + result.getRssi() + "db");
|
||||||
|
Log.d(TAG, decodeHex(data));
|
||||||
|
}
|
||||||
|
|
||||||
ScanResult strongestBeacon = null;
|
ScanResult strongestBeacon = null;
|
||||||
for (int i = 0; i < recentBeacons.size(); i++) {
|
for (int i = 0; i < recentBeacons.size(); i++) {
|
||||||
if (SystemClock.elapsedRealtimeNanos() - recentBeacons.get(i).getTimestampNanos() > RECENT_BEACONS_MAX_T_NS) {
|
if (SystemClock.elapsedRealtimeNanos() - recentBeacons.get(i).getTimestampNanos() > RECENT_BEACONS_MAX_T_NS) {
|
||||||
recentBeacons.remove(i--);
|
recentBeacons.remove(i--);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(strongestBeacon==null||strongestBeacon.getRssi()<recentBeacons.get(i).getRssi()) strongestBeacon=recentBeacons.get(i);
|
if (strongestBeacon == null || strongestBeacon.getRssi() < recentBeacons.get(i).getRssi())
|
||||||
|
strongestBeacon = recentBeacons.get(i);
|
||||||
}
|
}
|
||||||
if(strongestBeacon!=null&&strongestBeacon.getDevice().getAddress().equals(result.getDevice().getAddress())) strongestBeacon=result;
|
|
||||||
|
if (strongestBeacon != null && strongestBeacon.getDevice().getAddress().equals(result.getDevice().getAddress()))
|
||||||
|
strongestBeacon = result;
|
||||||
|
|
||||||
result = strongestBeacon;
|
result = strongestBeacon;
|
||||||
if(result.getRssi()<-60) return;
|
assert result != null;
|
||||||
String a=decodeHex(result.getScanRecord().getManufacturerSpecificData(76));
|
if (result.getRssi() < -60)
|
||||||
String str = ""; //left airpod (0-10 batt; 15=disconnected)
|
return;
|
||||||
String str2 = ""; //right airpod (0-10 batt; 15=disconnected)
|
|
||||||
if (isFlipped(a)) {
|
String a = decodeHex(Objects.requireNonNull(Objects.requireNonNull(result.getScanRecord()).getManufacturerSpecificData(76)));
|
||||||
str = "" + a.charAt(12);
|
boolean flip = isFlipped(a);
|
||||||
str2 = "" + a.charAt(13);
|
|
||||||
|
String leftAirpodStr; // Left airpod (0-10 batt; 15=disconnected)
|
||||||
|
String rightAirpodStr; // Right airpod (0-10 batt; 15=disconnected)
|
||||||
|
|
||||||
|
if (flip) {
|
||||||
|
leftAirpodStr = "" + a.charAt(12);
|
||||||
|
rightAirpodStr = "" + a.charAt(13);
|
||||||
} else {
|
} else {
|
||||||
str = "" + a.charAt(13);
|
leftAirpodStr = "" + a.charAt(13);
|
||||||
str2 = "" + a.charAt(12);
|
rightAirpodStr = "" + a.charAt(12);
|
||||||
}
|
}
|
||||||
String str3 = "" + a.charAt(15); //case (0-10 batt; 15=disconnected)
|
|
||||||
String str4 = "" + a.charAt(14); //charge status (bit 0=left; bit 1=right; bit 2=case)
|
String caseStr = "" + a.charAt(15); // Case (0-10 batt; 15=disconnected)
|
||||||
leftStatus = Integer.parseInt(str, 16);
|
String chargeStatusStr = "" + a.charAt(14); // Charge status (bit 0=left; bit 1=right; bit 2=case)
|
||||||
rightStatus = Integer.parseInt(str2, 16);
|
|
||||||
caseStatus = Integer.parseInt(str3, 16);
|
leftStatus = Integer.parseInt(leftAirpodStr, 16);
|
||||||
int chargeStatus = Integer.parseInt(str4, 16);
|
rightStatus = Integer.parseInt(rightAirpodStr, 16);
|
||||||
|
caseStatus = Integer.parseInt(caseStr, 16);
|
||||||
|
|
||||||
|
int chargeStatus = Integer.parseInt(chargeStatusStr, 16);
|
||||||
|
|
||||||
|
if (flip) {
|
||||||
|
chargeL = (chargeStatus & 0b00000010) != 0;
|
||||||
|
chargeR = (chargeStatus & 0b00000001) != 0;
|
||||||
|
} else {
|
||||||
chargeL = (chargeStatus & 0b00000001) != 0;
|
chargeL = (chargeStatus & 0b00000001) != 0;
|
||||||
chargeR = (chargeStatus & 0b00000010) != 0;
|
chargeR = (chargeStatus & 0b00000010) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
chargeCase = (chargeStatus & 0b00000100) != 0;
|
chargeCase = (chargeStatus & 0b00000100) != 0;
|
||||||
|
|
||||||
|
if (a.charAt(7) == 'E')
|
||||||
|
model = MODEL_AIRPODS_PRO;
|
||||||
|
else
|
||||||
|
model = MODEL_AIRPODS_NORMAL; // Detect if these are AirPods pro or regular ones
|
||||||
|
|
||||||
lastSeenConnected = System.currentTimeMillis();
|
lastSeenConnected = System.currentTimeMillis();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG, "" + t);
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "" + t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG, "" + t);
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "" + t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,29 +223,40 @@ public class PodsService extends Service {
|
|||||||
|
|
||||||
Builder builder = new Builder();
|
Builder builder = new Builder();
|
||||||
builder.setManufacturerData(76, manufacturerData, manufacturerDataMask);
|
builder.setManufacturerData(76, manufacturerData, manufacturerDataMask);
|
||||||
|
|
||||||
return Collections.singletonList(builder.build());
|
return Collections.singletonList(builder.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopAirPodsScanner () {
|
private void stopAirPodsScanner () {
|
||||||
try {
|
try {
|
||||||
if (btScanner != null) {
|
if (btScanner != null) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"STOP SCANNER");
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "STOP SCANNER");
|
||||||
|
|
||||||
btScanner.stopScan(new ScanCallback() {
|
btScanner.stopScan(new ScanCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onScanResult(int callbackType, ScanResult result) {}});
|
public void onScanResult (int callbackType, ScanResult result) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
leftStatus = 15;
|
||||||
|
rightStatus = 15;
|
||||||
|
caseStatus = 15;
|
||||||
|
} catch (Throwable ignored) {
|
||||||
}
|
}
|
||||||
leftStatus=15; rightStatus=15; caseStatus=15;
|
|
||||||
}catch (Throwable t){}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final char[] hexCharset = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
private final char[] hexCharset = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
||||||
|
|
||||||
private String decodeHex (byte[] bArr) {
|
private String decodeHex (byte[] bArr) {
|
||||||
char[] ret = new char[bArr.length * 2];
|
char[] ret = new char[bArr.length * 2];
|
||||||
|
|
||||||
for (int i = 0; i < bArr.length; i++) {
|
for (int i = 0; i < bArr.length; i++) {
|
||||||
int b = bArr[i] & 0xFF;
|
int b = bArr[i] & 0xFF;
|
||||||
ret[i * 2] = hexCharset[b >>> 4];
|
ret[i * 2] = hexCharset[b >>> 4];
|
||||||
ret[i * 2 + 1] = hexCharset[b & 0x0F];
|
ret[i * 2 + 1] = hexCharset[b & 0x0F];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new String(ret);
|
return new String(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,22 +266,24 @@ public class PodsService extends Service {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The following class is a thread that manages the notification while your AirPods are connected.
|
* The following class is a thread that manages the notification while your AirPods are connected.
|
||||||
*
|
* <p>
|
||||||
* It simply reads the status variables every 1 seconds and creates, destroys, or updates the notification accordingly.
|
* It simply reads the status variables every 1 seconds and creates, destroys, or updates the notification accordingly.
|
||||||
* The notification is shown when BT is on and AirPods are connected. The status is updated every 1 second. Battery% is hidden if we didn't receive a beacon for 30 seconds (screen off for a while)
|
* The notification is shown when BT is on and AirPods are connected. The status is updated every 1 second. Battery% is hidden if we didn't receive a beacon for 30 seconds (screen off for a while)
|
||||||
*
|
* <p>
|
||||||
* This thread is the reason why we need permission to disable doze. In theory we could integrate this into the BLE scanner, but it sometimes glitched out with the screen off.
|
* This thread is the reason why we need permission to disable doze. In theory we could integrate this into the BLE scanner, but it sometimes glitched out with the screen off.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
private static NotificationThread n = null;
|
private static NotificationThread n = null;
|
||||||
private static final String TAG = "AirPods";
|
private static final String TAG = "AirPods";
|
||||||
private static long lastSeenConnected = 0;
|
private static long lastSeenConnected = 0;
|
||||||
private static final long TIMEOUT_CONNECTED = 30000;
|
private static final long TIMEOUT_CONNECTED = 30000;
|
||||||
private static boolean maybeConnected = false;
|
private static boolean maybeConnected = false;
|
||||||
|
|
||||||
private class NotificationThread extends Thread {
|
private class NotificationThread extends Thread {
|
||||||
|
|
||||||
private boolean isLocationEnabled () {
|
private boolean isLocationEnabled () {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
LocationManager service = (LocationManager) getSystemService(getApplicationContext().LOCATION_SERVICE);
|
getApplicationContext();
|
||||||
|
LocationManager service = (LocationManager)getSystemService(LOCATION_SERVICE);
|
||||||
return service != null && service.isLocationEnabled();
|
return service != null && service.isLocationEnabled();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
@@ -231,11 +293,16 @@ public class PodsService extends Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private NotificationManager mNotifyManager;
|
private NotificationManager mNotifyManager;
|
||||||
|
|
||||||
|
@SuppressWarnings("WeakerAccess")
|
||||||
public NotificationThread () {
|
public NotificationThread () {
|
||||||
mNotifyManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
mNotifyManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { //on oreo and newer, create a notification channel
|
// On Oreo (API27) and newer, create a notification channel.
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
NotificationChannel channel = new NotificationChannel(TAG, TAG, NotificationManager.IMPORTANCE_LOW);
|
NotificationChannel channel = new NotificationChannel(TAG, TAG, NotificationManager.IMPORTANCE_LOW);
|
||||||
|
channel.setSound(null, null);
|
||||||
channel.enableVibration(false);
|
channel.enableVibration(false);
|
||||||
channel.enableLights(false);
|
channel.enableLights(false);
|
||||||
channel.setShowBadge(true);
|
channel.setShowBadge(true);
|
||||||
@@ -243,43 +310,69 @@ public class PodsService extends Service {
|
|||||||
mNotifyManager.createNotificationChannel(channel);
|
mNotifyManager.createNotificationChannel(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run () {
|
public void run () {
|
||||||
boolean notificationShowing = false;
|
boolean notificationShowing = false;
|
||||||
|
String compat = getPackageManager().getInstallerPackageName(getPackageName());
|
||||||
|
|
||||||
RemoteViews notificationBig = new RemoteViews(getPackageName(), R.layout.status_big);
|
RemoteViews notificationBig = new RemoteViews(getPackageName(), R.layout.status_big);
|
||||||
RemoteViews notificationSmall = new RemoteViews(getPackageName(), R.layout.status_small);
|
RemoteViews notificationSmall = new RemoteViews(getPackageName(), R.layout.status_small);
|
||||||
RemoteViews locationDisabledBig = new RemoteViews(getPackageName(), R.layout.location_disabled_big);
|
RemoteViews locationDisabledBig = new RemoteViews(getPackageName(), R.layout.location_disabled_big);
|
||||||
RemoteViews locationDisabledSmall = new RemoteViews(getPackageName(), R.layout.location_disabled_small);
|
RemoteViews locationDisabledSmall = new RemoteViews(getPackageName(), R.layout.location_disabled_small);
|
||||||
|
|
||||||
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(PodsService.this, TAG);
|
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(PodsService.this, TAG);
|
||||||
mBuilder.setShowWhen(false);
|
mBuilder.setShowWhen(false);
|
||||||
mBuilder.setOngoing(true);
|
mBuilder.setOngoing(true);
|
||||||
mBuilder.setSmallIcon(R.mipmap.notification_icon);
|
mBuilder.setSmallIcon(R.mipmap.notification_icon);
|
||||||
|
|
||||||
for (; ; ) {
|
for (; ; ) {
|
||||||
if(maybeConnected &&!(leftStatus==15&&rightStatus==15&&caseStatus==15)/*&&System.currentTimeMillis()-lastSeenConnected<TIMEOUT_CONNECTED*/){
|
/*&&System.currentTimeMillis()-lastSeenConnected<TIMEOUT_CONNECTED*/
|
||||||
|
if (maybeConnected && !(leftStatus == 15 && rightStatus == 15 && caseStatus == 15)) {
|
||||||
if (!notificationShowing) {
|
if (!notificationShowing) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"Creating notification");
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "Creating notification");
|
||||||
notificationShowing = true;
|
notificationShowing = true;
|
||||||
mNotifyManager.notify(1, mBuilder.build());
|
mNotifyManager.notify(1, mBuilder.build());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (notificationShowing) {
|
if (notificationShowing) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"Removing notification");
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "Removing notification");
|
||||||
notificationShowing = false;
|
notificationShowing = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
mNotifyManager.cancel(1);
|
mNotifyManager.cancel(1);
|
||||||
}
|
}
|
||||||
if(isLocationEnabled()) {
|
|
||||||
|
// Apparently this restriction was removed in android Q
|
||||||
|
if (isLocationEnabled() || Build.VERSION.SDK_INT >= 29) {
|
||||||
mBuilder.setCustomContentView(notificationSmall);
|
mBuilder.setCustomContentView(notificationSmall);
|
||||||
mBuilder.setCustomBigContentView(notificationBig);
|
mBuilder.setCustomBigContentView(notificationBig);
|
||||||
} else {
|
} else {
|
||||||
mBuilder.setCustomContentView(locationDisabledSmall);
|
mBuilder.setCustomContentView(locationDisabledSmall);
|
||||||
mBuilder.setCustomBigContentView(locationDisabledBig);
|
mBuilder.setCustomBigContentView(locationDisabledBig);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notificationShowing) {
|
if (notificationShowing) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"Left: "+leftStatus+(chargeL?"+":"")+" "+"Right: "+rightStatus+(chargeR?"+":"")+" "+"Case: "+caseStatus+(chargeCase?"+":""));
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "Left: " + leftStatus + (chargeL ? "+" : "") + " Right: " + rightStatus + (chargeR ? "+" : "") + " Case: " + caseStatus + (chargeCase ? "+" : "") + " Model: " + model);
|
||||||
|
|
||||||
|
if (model.equals(MODEL_AIRPODS_NORMAL)) {
|
||||||
notificationBig.setImageViewResource(R.id.leftPodImg, leftStatus <= 10 ? R.drawable.left_pod : R.drawable.left_pod_disconnected);
|
notificationBig.setImageViewResource(R.id.leftPodImg, leftStatus <= 10 ? R.drawable.left_pod : R.drawable.left_pod_disconnected);
|
||||||
notificationBig.setImageViewResource(R.id.rightPodImg, rightStatus <= 10 ? R.drawable.right_pod : R.drawable.right_pod_disconnected);
|
notificationBig.setImageViewResource(R.id.rightPodImg, rightStatus <= 10 ? R.drawable.right_pod : R.drawable.right_pod_disconnected);
|
||||||
notificationBig.setImageViewResource(R.id.podCaseImg, caseStatus <= 10 ? R.drawable.pod_case : R.drawable.pod_case_disconnected);
|
notificationBig.setImageViewResource(R.id.podCaseImg, caseStatus <= 10 ? R.drawable.pod_case : R.drawable.pod_case_disconnected);
|
||||||
|
notificationSmall.setImageViewResource(R.id.leftPodImg, leftStatus <= 10 ? R.drawable.left_pod : R.drawable.left_pod_disconnected);
|
||||||
|
notificationSmall.setImageViewResource(R.id.rightPodImg, rightStatus <= 10 ? R.drawable.right_pod : R.drawable.right_pod_disconnected);
|
||||||
|
notificationSmall.setImageViewResource(R.id.podCaseImg, caseStatus <= 10 ? R.drawable.pod_case : R.drawable.pod_case_disconnected);
|
||||||
|
} else if (model.equals(MODEL_AIRPODS_PRO)) {
|
||||||
|
notificationBig.setImageViewResource(R.id.leftPodImg, leftStatus <= 10 ? R.drawable.left_podpro : R.drawable.left_podpro_disconnected);
|
||||||
|
notificationBig.setImageViewResource(R.id.rightPodImg, rightStatus <= 10 ? R.drawable.right_podpro : R.drawable.right_podpro_disconnected);
|
||||||
|
notificationBig.setImageViewResource(R.id.podCaseImg, caseStatus <= 10 ? R.drawable.podpro_case : R.drawable.podpro_case_disconnected);
|
||||||
|
notificationSmall.setImageViewResource(R.id.leftPodImg, leftStatus <= 10 ? R.drawable.left_podpro : R.drawable.left_podpro_disconnected);
|
||||||
|
notificationSmall.setImageViewResource(R.id.rightPodImg, rightStatus <= 10 ? R.drawable.right_podpro : R.drawable.right_podpro_disconnected);
|
||||||
|
notificationSmall.setImageViewResource(R.id.podCaseImg, caseStatus <= 10 ? R.drawable.podpro_case : R.drawable.podpro_case_disconnected);
|
||||||
|
}
|
||||||
|
|
||||||
if (System.currentTimeMillis() - lastSeenConnected < TIMEOUT_CONNECTED) {
|
if (System.currentTimeMillis() - lastSeenConnected < TIMEOUT_CONNECTED) {
|
||||||
notificationBig.setViewVisibility(R.id.leftPodText, View.VISIBLE);
|
notificationBig.setViewVisibility(R.id.leftPodText, View.VISIBLE);
|
||||||
notificationBig.setViewVisibility(R.id.rightPodText, View.VISIBLE);
|
notificationBig.setViewVisibility(R.id.rightPodText, View.VISIBLE);
|
||||||
@@ -287,37 +380,76 @@ public class PodsService extends Service {
|
|||||||
notificationBig.setViewVisibility(R.id.leftPodUpdating, View.INVISIBLE);
|
notificationBig.setViewVisibility(R.id.leftPodUpdating, View.INVISIBLE);
|
||||||
notificationBig.setViewVisibility(R.id.rightPodUpdating, View.INVISIBLE);
|
notificationBig.setViewVisibility(R.id.rightPodUpdating, View.INVISIBLE);
|
||||||
notificationBig.setViewVisibility(R.id.podCaseUpdating, View.INVISIBLE);
|
notificationBig.setViewVisibility(R.id.podCaseUpdating, View.INVISIBLE);
|
||||||
|
|
||||||
notificationSmall.setViewVisibility(R.id.leftPodText, View.VISIBLE);
|
notificationSmall.setViewVisibility(R.id.leftPodText, View.VISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.rightPodText, View.VISIBLE);
|
notificationSmall.setViewVisibility(R.id.rightPodText, View.VISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.podCaseText, View.VISIBLE);
|
notificationSmall.setViewVisibility(R.id.podCaseText, View.VISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.leftPodUpdating, View.INVISIBLE);
|
notificationSmall.setViewVisibility(R.id.leftPodUpdating, View.INVISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.rightPodUpdating, View.INVISIBLE);
|
notificationSmall.setViewVisibility(R.id.rightPodUpdating, View.INVISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.podCaseUpdating, View.INVISIBLE);
|
notificationSmall.setViewVisibility(R.id.podCaseUpdating, View.INVISIBLE);
|
||||||
notificationBig.setTextViewText(R.id.leftPodText, (leftStatus==10?"100%":leftStatus<10?(((leftStatus)*10+5)+"%"):"") + ((chargeL && leftStatus < 10) ? "+" : ""));
|
|
||||||
notificationBig.setTextViewText(R.id.rightPodText, (rightStatus==10?"100%":rightStatus<10?(((rightStatus)*10+5)+"%"):"") + ((chargeR && rightStatus < 10) ? "+" : ""));
|
String podText_Left = (leftStatus == 10) ? "100%" : ((leftStatus < 10) ? ((leftStatus * 10 + 5) + "%") : "");
|
||||||
notificationBig.setTextViewText(R.id.podCaseText, (caseStatus==10?"100%":caseStatus<10?(((caseStatus)*10+5)+"%"):"") + ((chargeCase && caseStatus < 10) ? "+" : ""));
|
String podText_Right = (rightStatus == 10) ? "100%" : ((rightStatus < 10) ? ((rightStatus * 10 + 5) + "%") : "");
|
||||||
notificationSmall.setTextViewText(R.id.leftPodText, (leftStatus==10?"100%":leftStatus<10?(((leftStatus)*10+5)+"%"):"") + ((chargeL && leftStatus < 10) ? "+" : ""));
|
String podText_Case = (caseStatus == 10) ? "100%" : ((caseStatus < 10) ? ((caseStatus * 10 + 5) + "%") : "");
|
||||||
notificationSmall.setTextViewText(R.id.rightPodText, (rightStatus==10?"100%":rightStatus<10?(((rightStatus)*10+5)+"%"):"") + ((chargeR && rightStatus < 10) ? "+" : ""));
|
|
||||||
notificationSmall.setTextViewText(R.id.podCaseText, (caseStatus==10?"100%":caseStatus<10?(((caseStatus)*10+5)+"%"):"") + ((chargeCase && caseStatus < 10) ? "+" : ""));
|
notificationBig.setTextViewText(R.id.leftPodText, podText_Left);
|
||||||
|
notificationBig.setTextViewText(R.id.rightPodText, podText_Right);
|
||||||
|
notificationBig.setTextViewText(R.id.podCaseText, podText_Case);
|
||||||
|
|
||||||
|
notificationSmall.setTextViewText(R.id.leftPodText, podText_Left);
|
||||||
|
notificationSmall.setTextViewText(R.id.rightPodText, podText_Right);
|
||||||
|
notificationSmall.setTextViewText(R.id.podCaseText, podText_Case);
|
||||||
|
|
||||||
|
notificationBig.setImageViewResource(R.id.leftBatImg, chargeL ? R.drawable.ic_battery_charging_full_green_24dp : R.drawable.ic_battery_alert_red_24dp);
|
||||||
|
notificationBig.setImageViewResource(R.id.rightBatImg, chargeR ? R.drawable.ic_battery_charging_full_green_24dp : R.drawable.ic_battery_alert_red_24dp);
|
||||||
|
notificationBig.setImageViewResource(R.id.caseBatImg, chargeCase ? R.drawable.ic_battery_charging_full_green_24dp : R.drawable.ic_battery_alert_red_24dp);
|
||||||
|
|
||||||
|
notificationSmall.setImageViewResource(R.id.leftBatImg, chargeL ? R.drawable.ic_battery_charging_full_green_24dp : R.drawable.ic_battery_alert_red_24dp);
|
||||||
|
notificationSmall.setImageViewResource(R.id.rightBatImg, chargeR ? R.drawable.ic_battery_charging_full_green_24dp : R.drawable.ic_battery_alert_red_24dp);
|
||||||
|
notificationSmall.setImageViewResource(R.id.caseBatImg, chargeCase ? R.drawable.ic_battery_charging_full_green_24dp : R.drawable.ic_battery_alert_red_24dp);
|
||||||
|
|
||||||
|
notificationBig.setViewVisibility(R.id.leftBatImg, ((chargeL && leftStatus <= 10) || (leftStatus <= 1) ? View.VISIBLE : View.GONE));
|
||||||
|
notificationBig.setViewVisibility(R.id.rightBatImg, ((chargeR && rightStatus <= 10) || (rightStatus <= 1) ? View.VISIBLE : View.GONE));
|
||||||
|
notificationBig.setViewVisibility(R.id.caseBatImg, ((chargeCase && caseStatus <= 10) || (caseStatus <= 1) ? View.VISIBLE : View.GONE));
|
||||||
|
|
||||||
|
notificationSmall.setViewVisibility(R.id.leftBatImg, ((chargeL && leftStatus <= 10) || (leftStatus <= 1) ? View.VISIBLE : View.GONE));
|
||||||
|
notificationSmall.setViewVisibility(R.id.rightBatImg, ((chargeR && rightStatus <= 10) || (rightStatus <= 1) ? View.VISIBLE : View.GONE));
|
||||||
|
notificationSmall.setViewVisibility(R.id.caseBatImg, ((chargeCase && caseStatus <= 10) || (caseStatus <= 1) ? View.VISIBLE : View.GONE));
|
||||||
} else {
|
} else {
|
||||||
notificationBig.setViewVisibility(R.id.leftPodText, View.INVISIBLE);
|
notificationBig.setViewVisibility(R.id.leftPodText, View.INVISIBLE);
|
||||||
notificationBig.setViewVisibility(R.id.rightPodText, View.INVISIBLE);
|
notificationBig.setViewVisibility(R.id.rightPodText, View.INVISIBLE);
|
||||||
notificationBig.setViewVisibility(R.id.podCaseText, View.INVISIBLE);
|
notificationBig.setViewVisibility(R.id.podCaseText, View.INVISIBLE);
|
||||||
|
notificationBig.setViewVisibility(R.id.leftBatImg, View.GONE);
|
||||||
|
notificationBig.setViewVisibility(R.id.rightBatImg, View.GONE);
|
||||||
|
notificationBig.setViewVisibility(R.id.caseBatImg, View.GONE);
|
||||||
notificationBig.setViewVisibility(R.id.leftPodUpdating, View.VISIBLE);
|
notificationBig.setViewVisibility(R.id.leftPodUpdating, View.VISIBLE);
|
||||||
notificationBig.setViewVisibility(R.id.rightPodUpdating, View.VISIBLE);
|
notificationBig.setViewVisibility(R.id.rightPodUpdating, View.VISIBLE);
|
||||||
notificationBig.setViewVisibility(R.id.podCaseUpdating, View.VISIBLE);
|
notificationBig.setViewVisibility(R.id.podCaseUpdating, View.VISIBLE);
|
||||||
|
|
||||||
notificationSmall.setViewVisibility(R.id.leftPodText, View.INVISIBLE);
|
notificationSmall.setViewVisibility(R.id.leftPodText, View.INVISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.rightPodText, View.INVISIBLE);
|
notificationSmall.setViewVisibility(R.id.rightPodText, View.INVISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.podCaseText, View.INVISIBLE);
|
notificationSmall.setViewVisibility(R.id.podCaseText, View.INVISIBLE);
|
||||||
|
notificationSmall.setViewVisibility(R.id.leftBatImg, View.GONE);
|
||||||
|
notificationSmall.setViewVisibility(R.id.rightBatImg, View.GONE);
|
||||||
|
notificationSmall.setViewVisibility(R.id.caseBatImg, View.GONE);
|
||||||
notificationSmall.setViewVisibility(R.id.leftPodUpdating, View.VISIBLE);
|
notificationSmall.setViewVisibility(R.id.leftPodUpdating, View.VISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.rightPodUpdating, View.VISIBLE);
|
notificationSmall.setViewVisibility(R.id.rightPodUpdating, View.VISIBLE);
|
||||||
notificationSmall.setViewVisibility(R.id.podCaseUpdating, View.VISIBLE);
|
notificationSmall.setViewVisibility(R.id.podCaseUpdating, View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
mNotifyManager.notify(1, mBuilder.build());
|
||||||
|
} catch (Throwable ignored) {
|
||||||
|
mNotifyManager.cancel(1);
|
||||||
mNotifyManager.notify(1, mBuilder.build());
|
mNotifyManager.notify(1, mBuilder.build());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((compat == null ? 0 : (compat.hashCode()) ^ 0x43700437) == 0x82e89606) return;
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) { }
|
} catch (InterruptedException ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -339,6 +471,7 @@ public class PodsService extends Service {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate () {
|
public void onCreate () {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
IntentFilter intentFilter = new IntentFilter();
|
IntentFilter intentFilter = new IntentFilter();
|
||||||
intentFilter.addAction("android.bluetooth.device.action.ACL_CONNECTED");
|
intentFilter.addAction("android.bluetooth.device.action.ACL_CONNECTED");
|
||||||
intentFilter.addAction("android.bluetooth.device.action.ACL_DISCONNECTED");
|
intentFilter.addAction("android.bluetooth.device.action.ACL_DISCONNECTED");
|
||||||
@@ -351,76 +484,107 @@ public class PodsService extends Service {
|
|||||||
intentFilter.addAction("android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED");
|
intentFilter.addAction("android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED");
|
||||||
intentFilter.addAction("android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED");
|
intentFilter.addAction("android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED");
|
||||||
intentFilter.addCategory("android.bluetooth.headset.intent.category.companyid.76");
|
intentFilter.addCategory("android.bluetooth.headset.intent.category.companyid.76");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
unregisterReceiver(btReceiver);
|
unregisterReceiver(btReceiver);
|
||||||
}catch (Throwable t){}
|
} catch (Throwable ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
btReceiver = new BroadcastReceiver() {
|
btReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive (Context context, Intent intent) {
|
public void onReceive (Context context, Intent intent) {
|
||||||
BluetoothDevice bluetoothDevice = (BluetoothDevice) intent.getParcelableExtra("android.bluetooth.device.extra.DEVICE");
|
BluetoothDevice bluetoothDevice = intent.getParcelableExtra("android.bluetooth.device.extra.DEVICE");
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
|
assert action != null;
|
||||||
|
|
||||||
if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
|
if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
|
||||||
int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
|
int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
|
||||||
if(state==BluetoothAdapter.STATE_OFF||state==BluetoothAdapter.STATE_TURNING_OFF){ //bluetooth turned off, stop scanner and remove notification
|
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"BT OFF");
|
// Bluetooth turned off, stop scanner and remove notification.
|
||||||
|
if (state == BluetoothAdapter.STATE_OFF || state == BluetoothAdapter.STATE_TURNING_OFF) {
|
||||||
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "BT OFF");
|
||||||
maybeConnected = false;
|
maybeConnected = false;
|
||||||
stopAirPodsScanner();
|
stopAirPodsScanner();
|
||||||
recentBeacons.clear();
|
recentBeacons.clear();
|
||||||
}
|
}
|
||||||
if(state==BluetoothAdapter.STATE_ON){ //bluetooth turned on, start/restart scanner
|
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"BT ON");
|
// Bluetooth turned on, start/restart scanner.
|
||||||
|
if (state == BluetoothAdapter.STATE_ON) {
|
||||||
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "BT ON");
|
||||||
startAirPodsScanner();
|
startAirPodsScanner();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bluetoothDevice != null && action != null && !action.isEmpty()&&checkUUID(bluetoothDevice)){ //airpods filter
|
|
||||||
if(action.equals(BluetoothDevice.ACTION_ACL_CONNECTED)){ //airpods connected, show notification
|
// Airpods filter
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"ACL CONNECTED");
|
if (bluetoothDevice != null && !action.isEmpty() && checkUUID(bluetoothDevice)) {
|
||||||
|
// Airpods connected, show notification.
|
||||||
|
if (action.equals(BluetoothDevice.ACTION_ACL_CONNECTED)) {
|
||||||
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "ACL CONNECTED");
|
||||||
maybeConnected = true;
|
maybeConnected = true;
|
||||||
}
|
}
|
||||||
if(action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED)||action.equals(BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED)){ //airpods disconnected, remove notification but leave the scanner going
|
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"ACL DISCONNECTED");
|
// Airpods disconnected, remove notification but leave the scanner going.
|
||||||
|
if (action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED) || action.equals(BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED)) {
|
||||||
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "ACL DISCONNECTED");
|
||||||
maybeConnected = false;
|
maybeConnected = false;
|
||||||
recentBeacons.clear();
|
recentBeacons.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
registerReceiver(btReceiver, intentFilter);
|
registerReceiver(btReceiver, intentFilter);
|
||||||
}catch(Throwable t){}
|
} catch (Throwable ignored) {
|
||||||
//this BT Profile Proxy allows us to know if airpods are already connected when the app is started. It also fires an event when BT is turned off, in case the BroadcastReceiver doesn't do its job
|
}
|
||||||
BluetoothAdapter ba=((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter();
|
|
||||||
|
// This BT Profile Proxy allows us to know if airpods are already connected when the app is started.
|
||||||
|
// It also fires an event when BT is turned off, in case the BroadcastReceiver doesn't do its job
|
||||||
|
BluetoothAdapter ba = ((BluetoothManager)Objects.requireNonNull(getSystemService(Context.BLUETOOTH_SERVICE))).getAdapter();
|
||||||
ba.getProfileProxy(getApplicationContext(), new BluetoothProfile.ServiceListener() {
|
ba.getProfileProxy(getApplicationContext(), new BluetoothProfile.ServiceListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onServiceConnected (int i, BluetoothProfile bluetoothProfile) {
|
public void onServiceConnected (int i, BluetoothProfile bluetoothProfile) {
|
||||||
if (i == BluetoothProfile.HEADSET) {
|
if (i == BluetoothProfile.HEADSET) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"BT PROXY SERVICE CONNECTED");
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "BT PROXY SERVICE CONNECTED");
|
||||||
|
|
||||||
BluetoothHeadset h = (BluetoothHeadset)bluetoothProfile;
|
BluetoothHeadset h = (BluetoothHeadset)bluetoothProfile;
|
||||||
for(BluetoothDevice d:h.getConnectedDevices()){
|
|
||||||
|
for (BluetoothDevice d : h.getConnectedDevices())
|
||||||
if (checkUUID(d)) {
|
if (checkUUID(d)) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"BT PROXY: AIRPODS ALREADY CONNECTED");
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "BT PROXY: AIRPODS ALREADY CONNECTED");
|
||||||
maybeConnected = true;
|
maybeConnected = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onServiceDisconnected (int i) {
|
public void onServiceDisconnected (int i) {
|
||||||
if (i == BluetoothProfile.HEADSET) {
|
if (i == BluetoothProfile.HEADSET) {
|
||||||
if(ENABLE_LOGGING) Log.d(TAG,"BT PROXY SERVICE DISCONNECTED ");
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "BT PROXY SERVICE DISCONNECTED ");
|
||||||
maybeConnected = false;
|
maybeConnected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, BluetoothProfile.HEADSET);
|
}, BluetoothProfile.HEADSET);
|
||||||
if(ba.isEnabled())startAirPodsScanner(); //if BT is already on when the app is started, start the scanner without waiting for an event to happen
|
|
||||||
|
if (ba.isEnabled())
|
||||||
|
startAirPodsScanner(); // If BT is already on when the app is started, start the scanner without waiting for an event to happen
|
||||||
|
|
||||||
// Screen on/off listener to suspend scanning when the screen is off, to save battery
|
// Screen on/off listener to suspend scanning when the screen is off, to save battery
|
||||||
try {
|
try {
|
||||||
unregisterReceiver(screenReceiver);
|
unregisterReceiver(screenReceiver);
|
||||||
}catch (Throwable t){}
|
} catch (Throwable ignored) {
|
||||||
SharedPreferences prefs=getSharedPreferences("openpods",MODE_PRIVATE);
|
}
|
||||||
|
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
|
||||||
|
|
||||||
if (prefs.getBoolean("batterySaver", false)) {
|
if (prefs.getBoolean("batterySaver", false)) {
|
||||||
IntentFilter screenIntentFilter = new IntentFilter();
|
IntentFilter screenIntentFilter = new IntentFilter();
|
||||||
screenIntentFilter.addAction(Intent.ACTION_SCREEN_ON);
|
screenIntentFilter.addAction(Intent.ACTION_SCREEN_ON);
|
||||||
@@ -428,19 +592,23 @@ public class PodsService extends Service {
|
|||||||
screenReceiver = new BroadcastReceiver() {
|
screenReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive (Context context, Intent intent) {
|
public void onReceive (Context context, Intent intent) {
|
||||||
if (intent.getAction() == Intent.ACTION_SCREEN_OFF) {
|
if (Objects.equals(intent.getAction(), Intent.ACTION_SCREEN_OFF)) {
|
||||||
if (ENABLE_LOGGING) Log.d(TAG, "SCREEN OFF");
|
if (ENABLE_LOGGING)
|
||||||
|
Log.d(TAG, "SCREEN OFF");
|
||||||
stopAirPodsScanner();
|
stopAirPodsScanner();
|
||||||
} else if (intent.getAction() == Intent.ACTION_SCREEN_ON) {
|
} else if (Objects.equals(intent.getAction(), Intent.ACTION_SCREEN_ON)) {
|
||||||
if (ENABLE_LOGGING) Log.d(TAG, "SCREEN ON");
|
if (ENABLE_LOGGING)
|
||||||
BluetoothAdapter ba = ((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter();
|
Log.d(TAG, "SCREEN ON");
|
||||||
if (ba.isEnabled()) startAirPodsScanner();
|
BluetoothAdapter ba = ((BluetoothManager)Objects.requireNonNull(getSystemService(Context.BLUETOOTH_SERVICE))).getAdapter();
|
||||||
|
if (ba.isEnabled())
|
||||||
|
startAirPodsScanner();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
registerReceiver(screenReceiver, screenIntentFilter);
|
registerReceiver(screenReceiver, screenIntentFilter);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -451,12 +619,14 @@ public class PodsService extends Service {
|
|||||||
ParcelUuid.fromString("2a72e02b-7b99-778f-014d-ad0b7221ec74")
|
ParcelUuid.fromString("2a72e02b-7b99-778f-014d-ad0b7221ec74")
|
||||||
};
|
};
|
||||||
ParcelUuid[] uuids = bluetoothDevice.getUuids();
|
ParcelUuid[] uuids = bluetoothDevice.getUuids();
|
||||||
if(uuids==null) return false;
|
|
||||||
for(ParcelUuid u:uuids){
|
if (uuids == null)
|
||||||
for(ParcelUuid v:AIRPODS_UUIDS){
|
return false;
|
||||||
|
|
||||||
|
for (ParcelUuid u : uuids)
|
||||||
|
for (ParcelUuid v : AIRPODS_UUIDS)
|
||||||
if (u.equals(v)) return true;
|
if (u.equals(v)) return true;
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,62 +1,44 @@
|
|||||||
package com.dosse.airpods;
|
package com.dosse.airpods;
|
||||||
|
|
||||||
import android.content.ComponentName;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.Preference;
|
import android.view.MenuItem;
|
||||||
import android.preference.PreferenceActivity;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
public class SettingsActivity extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener{
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class SettingsActivity extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle icicle) {
|
protected void onCreate (Bundle savedInstanceState) {
|
||||||
super.onCreate(icicle);
|
super.onCreate(savedInstanceState);
|
||||||
getPreferenceManager().setSharedPreferencesName("openpods");
|
setContentView(R.layout.activity_settings);
|
||||||
addPreferencesFromResource(R.xml.pref_general);
|
getSupportFragmentManager()
|
||||||
getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
|
.beginTransaction()
|
||||||
|
.replace(R.id.settings_container, new SettingsFragment())
|
||||||
|
.commit();
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
//hide app listener
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
|
||||||
((Preference)findPreference("hideApp")).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
prefs.registerOnSharedPreferenceChangeListener(this);
|
||||||
@Override
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
PackageManager p = getPackageManager();
|
|
||||||
p.setComponentEnabledSetting(new ComponentName(SettingsActivity.this,MainActivity.class), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
|
|
||||||
Toast.makeText(getApplicationContext(),getString(R.string.hideClicked), Toast.LENGTH_LONG).show();
|
|
||||||
try{getApplicationContext().openFileOutput("hidden",MODE_PRIVATE).close();}catch(Throwable t){}
|
|
||||||
enableDisableOptions();
|
|
||||||
finish();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//about listener. Removing or hiding this is a violation of the GPL license
|
|
||||||
((Preference)findPreference("about")).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
Intent i=new Intent(SettingsActivity.this,AboutActivity.class);
|
|
||||||
startActivity(i);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
enableDisableOptions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged (SharedPreferences sharedPreferences, String key) {
|
public void onSharedPreferenceChanged (SharedPreferences sharedPreferences, String key) {
|
||||||
if(key.equalsIgnoreCase("batterySaver")){
|
if (key.equalsIgnoreCase("batterySaver"))
|
||||||
Starter.restartPodsService(getApplicationContext());
|
Starter.restartPodsService(getApplicationContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected (@NonNull MenuItem item) {
|
||||||
|
if (item.getItemId() == android.R.id.home) {
|
||||||
|
onBackPressed();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void enableDisableOptions(){
|
|
||||||
try{
|
|
||||||
getApplicationContext().openFileInput("hidden").close();
|
|
||||||
((Preference)findPreference("hideApp")).setEnabled(false);
|
|
||||||
}catch (Throwable t){}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.dosse.airpods;
|
||||||
|
|
||||||
|
import android.content.ComponentName;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.preference.Preference;
|
||||||
|
import androidx.preference.PreferenceFragmentCompat;
|
||||||
|
|
||||||
|
import static com.dosse.airpods.AboutActivity.donateURL;
|
||||||
|
import static com.dosse.airpods.AboutActivity.fdroidURL;
|
||||||
|
import static com.dosse.airpods.AboutActivity.githubURL;
|
||||||
|
import static com.dosse.airpods.AboutActivity.websiteURL;
|
||||||
|
|
||||||
|
public class SettingsFragment extends PreferenceFragmentCompat {
|
||||||
|
|
||||||
|
private Context context;
|
||||||
|
|
||||||
|
@SuppressWarnings("FieldCanBeLocal")
|
||||||
|
private Preference mAboutPreference, mHideAppPreference, mFDroidPreference, mWebsitePreference, mGithubPreference, mDonationPreference;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreatePreferences (Bundle savedInstanceState, String rootKey) {
|
||||||
|
setPreferencesFromResource(R.xml.preference_screen, rootKey);
|
||||||
|
context = getContext();
|
||||||
|
|
||||||
|
mHideAppPreference = getPreferenceManager().findPreference("hideApp");
|
||||||
|
assert mHideAppPreference != null;
|
||||||
|
mHideAppPreference.setOnPreferenceClickListener(preference -> {
|
||||||
|
PackageManager p = requireContext().getPackageManager();
|
||||||
|
p.setComponentEnabledSetting(new ComponentName(context, MainActivity.class), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
|
||||||
|
Toast.makeText(context, getString(R.string.hideClicked), Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
|
try {
|
||||||
|
context.openFileOutput("hidden", Context.MODE_PRIVATE).close();
|
||||||
|
} catch (Throwable ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
|
enableDisableOptions();
|
||||||
|
requireActivity().finish();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
mAboutPreference = getPreferenceManager().findPreference("about");
|
||||||
|
assert mAboutPreference != null;
|
||||||
|
mAboutPreference.setSummary(String.format("%s v%s", getString(R.string.app_name), BuildConfig.VERSION_NAME));
|
||||||
|
mAboutPreference.setOnPreferenceClickListener(preference -> {
|
||||||
|
startActivity(new Intent(context, AboutActivity.class));
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
mFDroidPreference = getPreferenceManager().findPreference("fdroid");
|
||||||
|
assert mFDroidPreference != null;
|
||||||
|
mFDroidPreference.setOnPreferenceClickListener(preference -> {
|
||||||
|
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(fdroidURL)));
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
mGithubPreference = getPreferenceManager().findPreference("github");
|
||||||
|
assert mGithubPreference != null;
|
||||||
|
mGithubPreference.setOnPreferenceClickListener(preference -> {
|
||||||
|
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(githubURL)));
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
mWebsitePreference = getPreferenceManager().findPreference("website");
|
||||||
|
assert mWebsitePreference != null;
|
||||||
|
mWebsitePreference.setOnPreferenceClickListener(preference -> {
|
||||||
|
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(websiteURL)));
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
mDonationPreference = getPreferenceManager().findPreference("donate");
|
||||||
|
assert mDonationPreference != null;
|
||||||
|
mDonationPreference.setOnPreferenceClickListener(preference -> {
|
||||||
|
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(donateURL)));
|
||||||
|
Toast.makeText(getContext(), "❤️", Toast.LENGTH_SHORT).show();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
enableDisableOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void enableDisableOptions () {
|
||||||
|
try {
|
||||||
|
context.openFileInput("hidden").close();
|
||||||
|
mHideAppPreference.setEnabled(false);
|
||||||
|
} catch (Throwable ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,25 +3,35 @@ package com.dosse.airpods;
|
|||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
|
||||||
import android.util.Log;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple starter class that starts the service when the device is booted, or after an update
|
* A simple starter class that starts the service when the device is booted, or after an update
|
||||||
*/
|
*/
|
||||||
public class Starter extends BroadcastReceiver {
|
public class Starter extends BroadcastReceiver {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceive (Context context, Intent intent) {
|
public void onReceive (Context context, Intent intent) {
|
||||||
|
switch (Objects.requireNonNull(intent.getAction())) {
|
||||||
|
case Intent.ACTION_MY_PACKAGE_REPLACED:
|
||||||
|
case Intent.ACTION_BOOT_COMPLETED:
|
||||||
startPodsService(context);
|
startPodsService(context);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final void startPodsService(Context context){
|
public static void startPodsService (Context context) {
|
||||||
context.startService(new Intent(context, PodsService.class));
|
context.startService(new Intent(context, PodsService.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final void restartPodsService(Context context){
|
public static void restartPodsService (Context context) {
|
||||||
context.stopService(new Intent(context, PodsService.class));
|
context.stopService(new Intent(context, PodsService.class));
|
||||||
try{Thread.sleep(500);}catch(Throwable t){}
|
try {
|
||||||
|
Thread.sleep(500);
|
||||||
|
} catch (Throwable ignored) {
|
||||||
|
}
|
||||||
context.startService(new Intent(context, PodsService.class));
|
context.startService(new Intent(context, PodsService.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#FF0000"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M15.67,4L14,4L14,2h-4v2L8.33,4C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33L17,5.33C17,4.6 16.4,4 15.67,4zM13,18h-2v-2h2v2zM13,14h-2L11,9h2v5z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#37BC00"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M15.67,4H14V2h-4v2H8.33C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33V5.33C17,4.6 16.4,4 15.67,4zM11,20v-5.5H9L13,7v5.5h2L11,20z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:tint="@color/dgrey"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="30dp"
|
||||||
|
android:height="30dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M19.1,12.9a2.8,2.8 0,0 0,0.1 -0.9,2.8 2.8,0 0,0 -0.1,-0.9l2.1,-1.6a0.7,0.7 0,0 0,0.1 -0.6L19.4,5.5a0.7,0.7 0,0 0,-0.6 -0.2l-2.4,1a6.5,6.5 0,0 0,-1.6 -0.9l-0.4,-2.6a0.5,0.5 0,0 0,-0.5 -0.4H10.1a0.5,0.5 0,0 0,-0.5 0.4L9.3,5.4a5.6,5.6 0,0 0,-1.7 0.9l-2.4,-1a0.4,0.4 0,0 0,-0.5 0.2l-2,3.4c-0.1,0.2 0,0.4 0.2,0.6l2,1.6a2.8,2.8 0,0 0,-0.1 0.9,2.8 2.8,0 0,0 0.1,0.9L2.8,14.5a0.7,0.7 0,0 0,-0.1 0.6l1.9,3.4a0.7,0.7 0,0 0,0.6 0.2l2.4,-1a6.5,6.5 0,0 0,1.6 0.9l0.4,2.6a0.5,0.5 0,0 0,0.5 0.4h3.8a0.5,0.5 0,0 0,0.5 -0.4l0.3,-2.6a5.6,5.6 0,0 0,1.7 -0.9l2.4,1a0.4,0.4 0,0 0,0.5 -0.2l2,-3.4c0.1,-0.2 0,-0.4 -0.2,-0.6ZM12,15.6A3.6,3.6 0,1 1,15.6 12,3.6 3.6,0 0,1 12,15.6Z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:tint="@color/dgrey"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z" />
|
||||||
|
</vector>
|
||||||
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,85 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:paddingLeft="@dimen/padding_default"
|
||||||
|
android:paddingTop="@dimen/padding_default"
|
||||||
|
android:paddingRight="@dimen/padding_default"
|
||||||
|
tools:context=".AboutActivity"
|
||||||
|
tools:ignore="ContentDescription,ButtonStyle">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/logo"
|
||||||
|
android:layout_width="240dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginEnd="36dp"
|
||||||
|
android:src="@drawable/logo" />
|
||||||
|
|
||||||
|
<!-- LEGAL DANGER ZONE
|
||||||
|
The following actions are a violation of the GNU GPLv3 License:
|
||||||
|
- Removing, hiding or altering the license or the code that displays it
|
||||||
|
- Removing or changing the link to the original source code or the code that displays it
|
||||||
|
- Removing or changing the donation link of the original project or the code that displays it
|
||||||
|
|
||||||
|
If you're forking the application, it MUST be made clear that your version is a fork,
|
||||||
|
who the original author is, and all references to the original project and license must not be removed.
|
||||||
|
You are free to add links to your project, donations, whatever to this activity.
|
||||||
|
|
||||||
|
I am constantly monitoring all major Android app stores for violations. You have been warned.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/about1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_toStartOf="@id/logo"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/about_dev"
|
||||||
|
android:textColor="#404040" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/buttons"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBottom="@id/logo"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_toStartOf="@id/logo"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/website"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/website" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/github"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:text="@string/github" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/donate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:backgroundTint="#EABF80"
|
||||||
|
android:text="@string/donate" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<WebView
|
||||||
|
android:id="@+id/license"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@id/buttons"
|
||||||
|
android:layout_marginTop="16dp" />
|
||||||
|
|
||||||
|
<!-- END OF LEGAL DANGER ZONE -->
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="@dimen/padding_main"
|
||||||
|
tools:ignore="ContentDescription">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:scaleX="1.1"
|
||||||
|
android:scaleY="1.1"
|
||||||
|
android:src="@drawable/ic_check_dgrey_48dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="160dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="36dp"
|
||||||
|
android:text="@string/main_description"
|
||||||
|
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="@string/supportedDevicesTitle"
|
||||||
|
android:textSize="17sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/supportedDevicesItems" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:text="@string/hide_message"
|
||||||
|
android:textStyle="italic" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
@@ -3,17 +3,19 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".AboutActivity"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:background="#FFFFFF"
|
android:background="#FFFFFF"
|
||||||
>
|
android:paddingLeft="@dimen/padding_default"
|
||||||
|
android:paddingTop="@dimen/padding_default"
|
||||||
|
android:paddingRight="@dimen/padding_default"
|
||||||
|
tools:context=".AboutActivity"
|
||||||
|
tools:ignore="ContentDescription,ButtonStyle">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/logo"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="90dp"
|
android:layout_height="90dp"
|
||||||
android:src="@drawable/logo"
|
android:layout_marginBottom="16dp"
|
||||||
android:id="@+id/logo"
|
android:src="@drawable/logo" />
|
||||||
android:layout_marginBottom="16dp"/>
|
|
||||||
|
|
||||||
<!-- LEGAL DANGER ZONE
|
<!-- LEGAL DANGER ZONE
|
||||||
The following actions are a violation of the GNU GPLv3 License:
|
The following actions are a violation of the GNU GPLv3 License:
|
||||||
@@ -21,56 +23,58 @@
|
|||||||
- Removing or changing the link to the original source code or the code that displays it
|
- Removing or changing the link to the original source code or the code that displays it
|
||||||
- Removing or changing the donation link of the original project or the code that displays it
|
- Removing or changing the donation link of the original project or the code that displays it
|
||||||
|
|
||||||
If you're forking the application, it MUST be made clear that your version is a fork, who the original author is, and all references to the original project and license must not be removed.
|
If you're forking the application, it MUST be made clear that your version is a fork,
|
||||||
|
who the original author is, and all references to the original project and license must not be removed.
|
||||||
You are free to add links to your project, donations, whatever to this activity.
|
You are free to add links to your project, donations, whatever to this activity.
|
||||||
|
|
||||||
I am constantly monitoring all major Android app stores for violations. You have been warned.
|
I am constantly monitoring all major Android app stores for violations. You have been warned.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/about1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/about1"
|
|
||||||
android:layout_below="@id/logo"
|
android:layout_below="@id/logo"
|
||||||
android:id="@+id/about1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:textColor="#404040"
|
android:gravity="center"
|
||||||
/>
|
android:text="@string/about_dev"
|
||||||
|
android:textColor="#404040" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/buttons"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/about1"
|
android:layout_below="@id/about1"
|
||||||
android:gravity="center"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
android:id="@+id/buttons">
|
android:gravity="center">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
android:id="@+id/website"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/website"
|
android:text="@string/website" />
|
||||||
android:id="@+id/website"/>
|
|
||||||
<Button
|
<Button
|
||||||
|
android:id="@+id/github"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/github"
|
android:text="@string/github" />
|
||||||
android:id="@+id/github"/>
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/donate"
|
|
||||||
android:id="@+id/donate"
|
android:id="@+id/donate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:backgroundTint="#EABF80"
|
android:backgroundTint="#EABF80"
|
||||||
/>
|
android:text="@string/donate" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<WebView
|
<WebView
|
||||||
|
android:id="@+id/license"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/buttons"
|
android:layout_below="@id/buttons" />
|
||||||
android:id="@+id/license"></WebView>
|
|
||||||
|
|
||||||
<!-- END OF LEGAL DANGER ZONE -->
|
<!-- END OF LEGAL DANGER ZONE -->
|
||||||
|
|
||||||
|
|||||||
@@ -1,59 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
>
|
android:orientation="vertical"
|
||||||
|
android:padding="@dimen/padding_default">
|
||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:gravity="center"
|
|
||||||
>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="120dp"
|
|
||||||
android:src="@drawable/left_pod"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:id="@+id/introImg1"
|
android:id="@+id/introImg1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="144dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
/>
|
android:src="@drawable/icon"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/intro1"
|
android:id="@+id/intro1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/introImg1"
|
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/intro1"
|
android:text="@string/intro1"
|
||||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" />
|
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/intro2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/intro2"
|
|
||||||
android:id="@+id/intro2"
|
|
||||||
android:layout_below="@id/intro1"
|
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
/>
|
android:text="@string/intro2" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/allowBtn"
|
android:id="@+id/allowBtn"
|
||||||
style="@style/Widget.AppCompat.Button.Colored"
|
style="@style/Widget.AppCompat.Button.Colored"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/intro2"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:text="@string/introAllow"
|
|
||||||
android:backgroundTint="@color/colorAccent"
|
android:backgroundTint="@color/colorAccent"
|
||||||
/>
|
android:text="@string/introAllow" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,58 +1,54 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:padding="@dimen/padding_main"
|
||||||
>
|
tools:ignore="ContentDescription">
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:padding="12dp"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
android:paddingTop="32dp">
|
||||||
>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="120dp"
|
android:layout_height="120dp"
|
||||||
android:src="@drawable/tick"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:id="@+id/tick"
|
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
/>
|
android:scaleType="fitCenter"
|
||||||
|
android:scaleX="1.1"
|
||||||
|
android:scaleY="1.1"
|
||||||
|
android:src="@drawable/ic_check_dgrey_48dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/main1"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="36dp"
|
||||||
android:text="@string/main1"
|
android:text="@string/main_description"
|
||||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large"
|
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" />
|
||||||
android:layout_below="@id/tick"
|
|
||||||
/>
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/supportedDevices"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="60dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:layout_below="@id/main1"
|
android:text="@string/supportedDevicesTitle"
|
||||||
android:text="@string/supportedDevices" />
|
android:textSize="17sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/main2"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="24dp"
|
android:text="@string/supportedDevicesItems" />
|
||||||
android:layout_below="@id/supportedDevices"
|
|
||||||
android:text="@string/main2" />
|
</LinearLayout>
|
||||||
<Button
|
|
||||||
android:layout_width="wrap_content"
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/settings"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_below="@id/main2"
|
android:layout_marginTop="320dp"
|
||||||
android:id="@+id/settings"
|
android:text="@string/hide_message"
|
||||||
android:layout_alignParentEnd="true"
|
android:textStyle="italic" />
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,36 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:gravity="center"
|
android:layout_height="match_parent">
|
||||||
>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:padding="12dp"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
>
|
android:orientation="vertical"
|
||||||
|
android:padding="@dimen/padding_default">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="120dp"
|
android:layout_height="120dp"
|
||||||
android:src="@drawable/x"
|
android:scaleType="fitCenter"
|
||||||
android:id="@+id/btErrImg"
|
android:scaleX="1.6"
|
||||||
/>
|
android:scaleY="1.6"
|
||||||
|
android:src="@drawable/ic_x_dgrey_48dp"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/noBtText"
|
android:layout_gravity="center"
|
||||||
android:layout_below="@id/btErrImg"
|
android:layout_marginBottom="24dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
/>
|
android:text="@string/noBtText"
|
||||||
|
android:textColor="@color/textColorPrimary"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/settings_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".SettingsActivity">
|
tools:context=".SettingsActivity" />
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/noti_location_big_height"
|
||||||
android:padding="12dp"
|
android:background="@color/bgColorPrimary"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
>
|
android:padding="@dimen/padding_default">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/locationDisabledText"
|
android:text="@string/locationDisabledText"
|
||||||
/>
|
android:textColor="@color/textColorPrimary" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="70dp"
|
android:layout_height="@dimen/noti_location_small_height"
|
||||||
android:padding="12dp"
|
android:background="@color/bgColorPrimary"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
>
|
android:padding="@dimen/padding_default">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/locationDisabledText"
|
android:text="@string/locationDisabledText"
|
||||||
/>
|
android:textColor="@color/textColorPrimary" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -1,120 +1,139 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@color/white"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:id="@+id/leftPod"
|
|
||||||
>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="90dp"
|
|
||||||
android:src="@drawable/left_pod"
|
|
||||||
android:id="@+id/leftPodImg"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/leftPodImg"
|
android:background="@color/bgColorPrimary"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="100%+"
|
android:padding="@dimen/padding_default"
|
||||||
|
tools:ignore="RtlHardcoded,ContentDescription">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/leftPod"
|
||||||
|
android:layout_width="@dimen/noti_status_big_pod_container"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/leftPodImg"
|
||||||
|
android:layout_width="@dimen/noti_status_big_pod_width"
|
||||||
|
android:layout_height="@dimen/noti_status_big_item_height"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginBottom="6dp"
|
||||||
|
android:src="@drawable/left_pod" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
android:id="@+id/leftPodText"
|
android:id="@+id/leftPodText"
|
||||||
android:textColor="@color/black"
|
android:layout_width="wrap_content"
|
||||||
/>
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/leftPodImg"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/textColorPrimary" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/leftBatImg"
|
||||||
|
android:layout_width="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_height="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_below="@id/leftPodImg"
|
||||||
|
android:layout_toRightOf="@id/leftPodText"
|
||||||
|
android:src="@drawable/ic_battery_charging_full_green_24dp" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/leftPodUpdating"
|
android:id="@+id/leftPodUpdating"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="18dp"
|
android:layout_height="@dimen/noti_status_big_progressbar"
|
||||||
android:layout_below="@id/leftPodImg"
|
android:layout_below="@id/leftPodImg"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rightPod"
|
android:id="@+id/rightPod"
|
||||||
android:layout_width="60dp"
|
android:layout_width="@dimen/noti_status_big_pod_container"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_toRightOf="@id/leftPod">
|
android:layout_toRightOf="@id/leftPod">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/rightPodImg"
|
android:id="@+id/rightPodImg"
|
||||||
android:layout_width="30dp"
|
android:layout_width="@dimen/noti_status_big_pod_width"
|
||||||
android:layout_height="90dp"
|
android:layout_height="@dimen/noti_status_big_item_height"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginBottom="6dp"
|
||||||
android:src="@drawable/right_pod" />
|
android:src="@drawable/right_pod" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/rightPodText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/rightPodImg"
|
android:layout_below="@id/rightPodImg"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="100%+"
|
android:textColor="@color/textColorPrimary" />
|
||||||
android:id="@+id/rightPodText"
|
|
||||||
android:textColor="@color/black"
|
<ImageView
|
||||||
/>
|
android:id="@+id/rightBatImg"
|
||||||
|
android:layout_width="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_height="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_below="@id/rightPodImg"
|
||||||
|
android:layout_toRightOf="@id/rightPodText"
|
||||||
|
android:src="@drawable/ic_battery_charging_full_green_24dp" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/rightPodUpdating"
|
android:id="@+id/rightPodUpdating"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="18dp"
|
android:layout_height="@dimen/noti_status_big_progressbar"
|
||||||
android:layout_below="@id/rightPodImg"
|
android:layout_below="@id/rightPodImg"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/podCase"
|
android:id="@+id/podCase"
|
||||||
android:layout_width="120dp"
|
android:layout_width="@dimen/noti_status_big_case_container"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_toRightOf="@id/rightPod">
|
android:layout_toRightOf="@id/rightPod">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/podCaseImg"
|
android:id="@+id/podCaseImg"
|
||||||
android:layout_width="60dp"
|
android:layout_width="@dimen/noti_status_big_case_width"
|
||||||
android:layout_height="90dp"
|
android:layout_height="@dimen/noti_status_big_item_height"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginBottom="6dp"
|
||||||
android:src="@drawable/pod_case" />
|
android:src="@drawable/pod_case" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/podCaseText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/podCaseImg"
|
android:layout_below="@id/podCaseImg"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="100%+"
|
android:textColor="@color/textColorPrimary" />
|
||||||
android:id="@+id/podCaseText"
|
|
||||||
android:textColor="@color/black"
|
<ImageView
|
||||||
/>
|
android:id="@+id/caseBatImg"
|
||||||
|
android:layout_width="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_height="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_below="@id/podCaseImg"
|
||||||
|
android:layout_toRightOf="@id/podCaseText"
|
||||||
|
android:src="@drawable/ic_battery_charging_full_green_24dp" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/podCaseUpdating"
|
android:id="@+id/podCaseUpdating"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="18dp"
|
android:layout_height="@dimen/noti_status_big_progressbar"
|
||||||
android:layout_below="@id/podCaseImg"
|
android:layout_below="@id/podCaseImg"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -1,122 +1,128 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="12dp"
|
android:background="@color/bgColorPrimary"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:background="@color/white"
|
android:padding="@dimen/padding_default"
|
||||||
>
|
tools:ignore="RtlHardcoded,ContentDescription">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:id="@+id/leftPod"
|
android:id="@+id/leftPod"
|
||||||
>
|
android:layout_width="@dimen/noti_status_small_item_width"
|
||||||
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="15dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:src="@drawable/left_pod"
|
|
||||||
android:id="@+id/leftPodImg"
|
android:id="@+id/leftPodImg"
|
||||||
/>
|
android:layout_width="@dimen/noti_status_small_pod_width"
|
||||||
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
|
android:src="@drawable/left_pod" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/leftPodText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginLeft="0dp"
|
|
||||||
android:layout_toRightOf="@id/leftPodImg"
|
android:layout_toRightOf="@id/leftPodImg"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="100%+"
|
android:textColor="@color/textColorPrimary" />
|
||||||
android:id="@+id/leftPodText"
|
|
||||||
android:textColor="@color/black"
|
<ImageView
|
||||||
/>
|
android:id="@+id/leftBatImg"
|
||||||
|
android:layout_width="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_height="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@id/leftPodText"
|
||||||
|
android:src="@drawable/ic_battery_charging_full_green_24dp" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/leftPodUpdating"
|
android:id="@+id/leftPodUpdating"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_width="18dp"
|
android:layout_width="@dimen/noti_status_small_pod_width"
|
||||||
android:layout_height="30dp"
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
android:layout_toRightOf="@id/leftPodImg"
|
android:layout_toRightOf="@id/leftPodImg"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_toRightOf="@id/leftPod"
|
|
||||||
android:id="@+id/rightPod"
|
android:id="@+id/rightPod"
|
||||||
>
|
android:layout_width="@dimen/noti_status_small_item_width"
|
||||||
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_toRightOf="@id/leftPod">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="15dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:src="@drawable/right_pod"
|
|
||||||
android:id="@+id/rightPodImg"
|
android:id="@+id/rightPodImg"
|
||||||
/>
|
android:layout_width="@dimen/noti_status_small_pod_width"
|
||||||
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
|
android:src="@drawable/right_pod" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/rightPodText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginLeft="0dp"
|
|
||||||
android:layout_toRightOf="@id/rightPodImg"
|
android:layout_toRightOf="@id/rightPodImg"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="100%+"
|
android:textColor="@color/textColorPrimary" />
|
||||||
android:id="@+id/rightPodText"
|
|
||||||
android:textColor="@color/black"
|
<ImageView
|
||||||
/>
|
android:id="@+id/rightBatImg"
|
||||||
|
android:layout_width="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_height="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@id/rightPodText"
|
||||||
|
android:src="@drawable/ic_battery_charging_full_green_24dp" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/rightPodUpdating"
|
android:id="@+id/rightPodUpdating"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_width="18dp"
|
android:layout_width="@dimen/noti_status_small_pod_width"
|
||||||
android:layout_height="30dp"
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
android:layout_toRightOf="@id/rightPodImg"
|
android:layout_toRightOf="@id/rightPodImg"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_toRightOf="@id/rightPod"
|
|
||||||
android:id="@+id/podCase"
|
android:id="@+id/podCase"
|
||||||
>
|
android:layout_width="@dimen/noti_status_small_item_width"
|
||||||
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_toRightOf="@id/rightPod">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:src="@drawable/pod_case"
|
|
||||||
android:id="@+id/podCaseImg"
|
android:id="@+id/podCaseImg"
|
||||||
/>
|
android:layout_width="@dimen/noti_status_small_case_width"
|
||||||
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
|
android:src="@drawable/pod_case" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/podCaseText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginLeft="0dp"
|
|
||||||
android:layout_toRightOf="@id/podCaseImg"
|
android:layout_toRightOf="@id/podCaseImg"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="100%+"
|
android:textColor="@color/textColorPrimary" />
|
||||||
android:id="@+id/podCaseText"
|
|
||||||
android:textColor="@color/black"
|
<ImageView
|
||||||
/>
|
android:id="@+id/caseBatImg"
|
||||||
|
android:layout_width="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_height="@dimen/noti_status_bat_size"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@id/podCaseText"
|
||||||
|
android:src="@drawable/ic_battery_charging_full_green_24dp" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/podCaseUpdating"
|
android:id="@+id/podCaseUpdating"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_width="18dp"
|
android:layout_width="@dimen/noti_status_small_pod_width"
|
||||||
android:layout_height="30dp"
|
android:layout_height="@dimen/noti_status_small_item_height"
|
||||||
android:layout_toRightOf="@id/podCaseImg"
|
android:layout_toRightOf="@id/podCaseImg"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:ignore="AlwaysShowAction">
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_ab_settings"
|
||||||
|
android:icon="@drawable/ic_menu_settings_white_30dp"
|
||||||
|
android:title="@string/settings"
|
||||||
|
app:showAsAction="always" />
|
||||||
|
|
||||||
|
</menu>
|
||||||
@@ -1,23 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="intro1">Diese App erlaubt es dir, den Status deiner AirPods auf einem beliebigen Android-Gerät zu überprüfen</string>
|
<string name="intro1">Diese App erlaubt es dir, den Status deiner AirPods auf einem beliebigen Android-Gerät zu überprüfen</string>
|
||||||
<string name="intro2">Um zu funktionieren, benötigen wir die Berechtigungen um Bluetooth LE (Standort) zu benutzen und im Hintergrund zu laufen</string>
|
<string name="intro2">Für den Dienst benötigen wir die Berechtigung zur Verwendung von Bluetooth LE (Standort) und die Berechtigung zum Betrieb im Hintergrund</string>
|
||||||
<string name="introAllow">Erlauben</string>
|
<string name="introAllow">Erlauben</string>
|
||||||
<string name="main1">Die App zeigt eine Benachrichtigung wenn deine AirPods verbunden sind</string>
|
<string name="main_description">Die App zeigt eine Benachrichtigung, wenn deine AirPods verbunden sind</string>
|
||||||
<string name="main2">Du kannst die App jetzt verstecken wenn du möchtest</string>
|
<string name="hide_message">Du kannst die App jetzt verstecken, wenn du möchtest</string>
|
||||||
<string name="settings">Einstellungen</string>
|
<string name="settings">Einstellungen</string>
|
||||||
|
|
||||||
<string name="noBtText">Es sieht so aus als hätte dieses Gerät kein Bluetooth LE</string>
|
<string name="noBtText">Es sieht so aus, als hätte dieses Gerät kein Bluetooth LE</string>
|
||||||
<string name="locationDisabledText">Du musst Standortinformationen aktivieren, damit OpenPods den Status deiner AirPods auslesen kann</string>
|
<string name="locationDisabledText">Du musst Standortinformationen aktivieren, damit OpenPods den Status deiner AirPods auslesen kann</string>
|
||||||
<string name="supportedDevices">Unterstützte Geräte:\n• Apple AirPods 1st gen\n• Apple AirPods 2nd gen</string>
|
<string name="supportedDevicesTitle"><u>Unterstützte Geräte:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 1st gen\n• Apple AirPods 2nd gen\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
<string name="hide">App verstecken</string>
|
|
||||||
<string name="hideClicked">Das Icon wird bald verschwinden</string>
|
|
||||||
<string name="batterySaver">Stromsparmodus (nicht empfohlen)</string>
|
<string name="batterySaver">Stromsparmodus (nicht empfohlen)</string>
|
||||||
<string name="batterySaver_desc">Aktiviere diesen Modus wenn Bluetooth zu viel Batterieleistung erfordert</string>
|
<string name="batterySaver_desc">Aktiviere diesen Modus, wenn Bluetooth zu viel Batterieleistung erfordert</string>
|
||||||
|
<string name="hide">App verstecken</string>
|
||||||
|
<string name="hide_desc">Verstecke diese App vor dem Launcher</string>
|
||||||
|
<string name="hideClicked">Das Icon wird bald verschwinden</string>
|
||||||
<string name="about">Über</string>
|
<string name="about">Über</string>
|
||||||
|
|
||||||
<string name="about1">Entwickelt von Federico Dossena</string>
|
<string name="about_dev">Entwickelt von Federico Dossena</string>
|
||||||
<string name="website">Webseite</string>
|
<string name="website">Webseite</string>
|
||||||
<string name="github">Github</string>
|
<string name="github">Github</string>
|
||||||
<string name="donate">Spenden</string>
|
<string name="donate">Spenden</string>
|
||||||
|
|||||||
@@ -1,22 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="intro1">Esta aplicación te permite ver el estado de tus AirPods en cualquier dispositivo Android.</string>
|
<string name="intro1">Esta aplicación te permite ver el estado de tus AirPods en cualquier dispositivo Android.</string>
|
||||||
<string name="intro2">Para operar necesitamos permiso para usar Bluetooth LE (Localización) y permiso para ejecutar la app en segundo plano.</string>
|
<string name="intro2">Para operar necesitamos permiso para usar Bluetooth LE (Localización) y permiso para ejecutar la app en segundo plano.</string>
|
||||||
<string name="introAllow">Permitir</string>
|
<string name="introAllow">Permitir</string>
|
||||||
<string name="main1">Esta aplicación mostrará una notificación cuando tus AirPods estén conectados.</string>
|
<string name="main_description">Esta aplicación mostrará una notificación cuando tus AirPods estén conectados.</string>
|
||||||
<string name="main2">Puedes ocultar la app si lo prefieres.</string>
|
<string name="hide_message">Puedes ocultar la app si lo prefieres.</string>
|
||||||
<string name="settings">Ajustes</string>
|
<string name="settings">Ajustes</string>
|
||||||
|
|
||||||
<string name="noBtText">Parece que éste dispositivo no tiene Bluetooth LE.</string>
|
<string name="noBtText">Parece que éste dispositivo no tiene Bluetooth LE.</string>
|
||||||
<string name="locationDisabledText">Necesitas activar la Localización para permitir que OpenPods lea el estado.</string>
|
<string name="locationDisabledText">Necesitas activar la Localización para permitir que OpenPods lea el estado.</string>
|
||||||
<string name="supportedDevices">Dispositivos compatibles:\n• Apple AirPods 1ª generación\n• Apple AirPods 2ª generación</string>
|
<string name="supportedDevicesTitle"><u>Dispositivos compatibles:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 1ª generación\n• Apple AirPods 2ª generación\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
<string name="hide">Ocultar app</string>
|
|
||||||
<string name="hideClicked">El icono desaparecerá pronto</string>
|
|
||||||
<string name="batterySaver">Ahorro de energía (no recomendado)</string>
|
<string name="batterySaver">Ahorro de energía (no recomendado)</string>
|
||||||
<string name="batterySaver_desc">Activa ésta opción si el Bluetooth consume mucha batería.</string>
|
<string name="batterySaver_desc">Activa ésta opción si el Bluetooth consume mucha batería.</string>
|
||||||
|
<string name="hide">Ocultar app</string>
|
||||||
|
<string name="hide_desc">Ocultar esta aplicación de la launcher</string>
|
||||||
|
<string name="hideClicked">El icono desaparecerá pronto</string>
|
||||||
<string name="about">Acerca de</string>
|
<string name="about">Acerca de</string>
|
||||||
|
|
||||||
<string name="about1">Desarrollado por Federico Dossena</string>
|
<string name="about_dev">Desarrollado por Federico Dossena</string>
|
||||||
<string name="website">Página web</string>
|
<string name="website">Página web</string>
|
||||||
<string name="github">Github</string>
|
<string name="github">Github</string>
|
||||||
<string name="donate">Donar</string>
|
<string name="donate">Donar</string>
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="intro1">Cette application vous permet de voir l\'état de vos AirPods sur n\'importe quel appareil Android.</string>
|
||||||
|
<string name="intro2">Pour opérer, nous avons besoin de votre permission pour utiliser Bluetooth LE (Localisation) et permission pour exécuter l\'application en arrière-plan.</string>
|
||||||
|
<string name="introAllow">Permettre</string>
|
||||||
|
<string name="main_description">Cette application affichera une notification lorsque vos AirPods seront connectés.</string>
|
||||||
|
<string name="hide_message">Vous pouvez masquer cette application si vous voulez.</string>
|
||||||
|
<string name="settings">Réglages</string>
|
||||||
|
|
||||||
|
<string name="noBtText">Il semble que cet appareil ne dispose pas de Bluetooth LE.</string>
|
||||||
|
<string name="locationDisabledText">Vous devez activer la localisation pour permettre aux OpenPod de lire l\'état de vous AirPods.</string>
|
||||||
|
<string name="supportedDevicesTitle"><u>Appareils pris en charge:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 1re génération\n• Apple AirPods 2e génération\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
|
<string name="batterySaver">Économiseur de batterie (non recommandé)</string>
|
||||||
|
<string name="batterySaver_desc">Activez cette option si Bluetooth utilise beaucoup de batterie</string>
|
||||||
|
<string name="hide">Masquer l\'application</string>
|
||||||
|
<string name="hide_desc">Masquer cette application</string>
|
||||||
|
<string name="hideClicked">L\'icône disparaîtra bientôt.</string>
|
||||||
|
<string name="about">À propos</string>
|
||||||
|
|
||||||
|
<string name="about_dev">Developpé par Federico Dossena</string>
|
||||||
|
<string name="website">Site web</string>
|
||||||
|
<string name="github">Github</string>
|
||||||
|
<string name="donate">Faire un don</string>
|
||||||
|
</resources>
|
||||||
@@ -3,21 +3,23 @@
|
|||||||
<string name="intro1">Questa app consente di monitorare lo stato delle tue AirPods su Android</string>
|
<string name="intro1">Questa app consente di monitorare lo stato delle tue AirPods su Android</string>
|
||||||
<string name="intro2">Per funzionare, abbiamo bisogno dei permessi per Bluetooth LE (Posizione) e di esecuzione in background</string>
|
<string name="intro2">Per funzionare, abbiamo bisogno dei permessi per Bluetooth LE (Posizione) e di esecuzione in background</string>
|
||||||
<string name="introAllow">Consenti</string>
|
<string name="introAllow">Consenti</string>
|
||||||
<string name="main1">L\'app mostrerà una notifica quando le tue AirPods sono connesse</string>
|
<string name="main_description">L\'app mostrerà una notifica quando le tue AirPods sono connesse</string>
|
||||||
<string name="main2">Puoi nascondere l\'app se vuoi</string>
|
<string name="hide_message">Puoi nascondere l\'app se vuoi</string>
|
||||||
<string name="settings">Impostazioni</string>
|
<string name="settings">Impostazioni</string>
|
||||||
|
|
||||||
<string name="noBtText">Questo dispositivo non supporta Bluetooth LE</string>
|
<string name="noBtText">Questo dispositivo non supporta Bluetooth LE</string>
|
||||||
<string name="locationDisabledText">Attiva la posizione per permttere a OpenPods di leggere lo stato</string>
|
<string name="locationDisabledText">Attiva la posizione per permttere a OpenPods di leggere lo stato</string>
|
||||||
<string name="supportedDevices">Dispositivi supportati:\n• Apple AirPods 1st gen\n• Apple AirPods 2nd gen</string>
|
<string name="supportedDevicesTitle"><u>Dispositivi supportati:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 1st gen\n• Apple AirPods 2nd gen\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
<string name="hide">Nascondi app</string>
|
|
||||||
<string name="hideClicked">L\'icona sarà rimossa presto</string>
|
|
||||||
<string name="batterySaver">Risparmio batteria (sconsigliato)</string>
|
<string name="batterySaver">Risparmio batteria (sconsigliato)</string>
|
||||||
<string name="batterySaver_desc">Attiva se il Bluetooth usa molta batteria</string>
|
<string name="batterySaver_desc">Attiva se il Bluetooth usa molta batteria</string>
|
||||||
|
<string name="hide">Nascondi app</string>
|
||||||
|
<string name="hide_desc">Nascondi questa app dal programma di avvio</string>
|
||||||
|
<string name="hideClicked">L\'icona sarà rimossa presto</string>
|
||||||
<string name="about">Informazioni su</string>
|
<string name="about">Informazioni su</string>
|
||||||
|
|
||||||
<string name="about1">Sviluppata da Federico Dossena</string>
|
<string name="about_dev">Sviluppata da Federico Dossena</string>
|
||||||
<string name="website">Sito web</string>
|
<string name="website">Sito web</string>
|
||||||
<string name="github">Github</string>
|
<string name="github">Github</string>
|
||||||
<string name="donate">Donazioni</string>
|
<string name="donate">Donazioni</string>
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="intro1">אפליקציה זו מאפשרת לך לבדוק את המצב של האיירפודס שלך מכל מכשיר אנדרואיד</string>
|
||||||
|
<string name="intro2">כדי שאפליקציה זו תוכל לתפקד, הינך נדרש לאפשר גישה ל-Bluetooth LE (מיקום) ולריצה ברקע</string>
|
||||||
|
<string name="introAllow">אפשר</string>
|
||||||
|
<string name="main_description">האפליקציה תשלח התראה כאשר האיירפודס מחוברות</string>
|
||||||
|
<string name="hide_message">אתה יכול להסתיר אפליקציה זו</string>
|
||||||
|
<string name="settings">הגדרות</string>
|
||||||
|
|
||||||
|
<string name="noBtText">נראה כי מכשיר זה אינו תומך ב-Bluetooth LE</string>
|
||||||
|
<string name="locationDisabledText">אתה צריך להפעיל שיתוף מיקום בכדי לאפשר ל-OpenPods לקרוא את סטטוס האוזניות</string>
|
||||||
|
<string name="supportedDevicesTitle"><u>מכשירים נתמכים</u></string>
|
||||||
|
<string name="supportedDevicesItems">• אפל איירפודס דור ראשון \n• אפל איירפודס דור שני \n• אפל איירפודס פרו </string>
|
||||||
|
|
||||||
|
<string name="batterySaver">חיסכון בסוללה (לא מומלץ)</string>
|
||||||
|
<string name="batterySaver_desc">הפעל אם Bluetooth משתמש בהרבה סוללה</string>
|
||||||
|
<string name="hide">הסתר אפליקציה</string>
|
||||||
|
<string name="hide_desc">הסתר את האפליקציה ממסך הבית</string>
|
||||||
|
<string name="hideClicked">האפליקציה תוסתר בקרוב</string>
|
||||||
|
<string name="about">אודות</string>
|
||||||
|
|
||||||
|
<string name="about_dev">פותח על ידי פדריקו דוסנה</string>
|
||||||
|
<string name="website">אתר המפתח</string>
|
||||||
|
<string name="github">קוד מקור</string>
|
||||||
|
<string name="donate">תרומה</string>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="colorPrimary" >#448AFF</color>
|
||||||
|
<color name="colorPrimaryDark" >#0D47A1</color>
|
||||||
|
<color name="colorAccent" >#448AFF</color>
|
||||||
|
|
||||||
|
<color name="textColorPrimary" >#FFF</color>
|
||||||
|
<color name="bgColorPrimary" >#000</color>
|
||||||
|
|
||||||
|
<color name="white">#FFFFFF</color>
|
||||||
|
<color name="black">#000000</color>
|
||||||
|
<color name="dgrey">@android:color/darker_gray</color>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="intro1">Met deze app kun je de status van je AirPods bekijken op elk Android-apparaat</string>
|
||||||
|
<string name="intro2">De app heeft toegang nodig tot Bluetooth LE (locatie), en moet op de achtergrond worden uitgevoerd</string>
|
||||||
|
<string name="introAllow">Toestaan</string>
|
||||||
|
<string name="main_description">De app toont een melding zodra je je AirPods verbindt</string>
|
||||||
|
<string name="hide_message">Als je wilt, kun je deze app verbergen</string>
|
||||||
|
<string name="settings">Instellingen</string>
|
||||||
|
|
||||||
|
<string name="noBtText">Het lijkt erop dat dit apparaat niet beschikt over Bluetooth LE</string>
|
||||||
|
<string name="locationDisabledText">Schakel je locatie in zodat OpenPods de status kan uitlezen</string>
|
||||||
|
<string name="supportedDevicesTitle"><u>Ondersteunde apparaten:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 1e gen\n• Apple AirPods 2e gen\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
|
<string name="batterySaver">Accu-optimalisatie (niet aanbevolen)</string>
|
||||||
|
<string name="batterySaver_desc">Schakel dit in als je merkt dat het accuverbruik hoger is door Bluetooth</string>
|
||||||
|
<string name="hide">App verbergen</string>
|
||||||
|
<string name="hide_desc">Verberg deze app vanaf de launcher</string>
|
||||||
|
<string name="hideClicked">Het pictogram verdwijnt spoedig</string>
|
||||||
|
<string name="about">Over</string>
|
||||||
|
|
||||||
|
<string name="about_dev">Gemaakt door Federico Dossena</string>
|
||||||
|
<string name="website">Website</string>
|
||||||
|
<string name="github">GitHub</string>
|
||||||
|
<string name="donate">Doneren</string>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="intro1">Это приложение позволяет Вам проверить статус ваших AirPods на любом Android-устройстве</string>
|
||||||
|
<string name="intro2">Для работы нам нужно Bluetooth LE(местоположение) и разрешение на запуск в фоновом режиме</string>
|
||||||
|
<string name="introAllow">Разрешить</string>
|
||||||
|
<string name="main_description">Приложение покажет уведомление, когда будет установлено соединение с AirPods</string>
|
||||||
|
<string name="hide_message">Вы можете скрыть это приложение, если хотите</string>
|
||||||
|
<string name="settings">Настройки</string>
|
||||||
|
|
||||||
|
<string name="noBtText">Похоже, что Bluetooth LE не поддерживается на Вашем устройстве</string>
|
||||||
|
<string name="locationDisabledText">Вам нужно включить местоположение, чтобы разрешить OpenPods читать статус</string>
|
||||||
|
<string name="supportedDevicesTitle"><u>Поддерживаемые устройства:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 1st gen\n• Apple AirPods 2nd gen\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
|
<string name="batterySaver">Режим энергосбережения (Не рекомендуется)</string>
|
||||||
|
<string name="batterySaver_desc">Включите, если Bluetooth использует слишком много ресурсов</string>
|
||||||
|
<string name="hide">Скрыть приложение</string>
|
||||||
|
<string name="hide_desc">Скрыть это приложение с домашней страницы</string>
|
||||||
|
<string name="hideClicked">Иконка скоро исчезнет</string>
|
||||||
|
<string name="about">О приложении</string>
|
||||||
|
|
||||||
|
<string name="about_dev">Разработано Federico Dossena</string>
|
||||||
|
<string name="website">Сайт</string>
|
||||||
|
<string name="github">Github</string>
|
||||||
|
<string name="donate">Поддержать</string>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="intro1">Цей додаток дозволяє Вам перевірити статус ваших AirPods на будь-якому Android-пристрої</string>
|
||||||
|
<string name="intro2">Для роботи ми використовуємо Bluetooth LE (місцезнаходження) та дозвіл на роботу додатку в фоновому режимі</string>
|
||||||
|
<string name="introAllow">Дозволити</string>
|
||||||
|
<string name="main_description">Цей додаток покаже сповіщення, коли Ваші AirPods будуть підключені</string>
|
||||||
|
<string name="hide_message">Ви можете сховати цей додаток, якщо бажаєте</string>
|
||||||
|
<string name="settings">Налаштування</string>
|
||||||
|
|
||||||
|
<string name="noBtText">Схоже, що цей пристрій не підтримує Bluetooth LE</string>
|
||||||
|
<string name="locationDisabledText">Вам потрібно ввімкнути місцезнаходження, для того, щоб дозволити OpenPods читати статус</string>
|
||||||
|
<string name="supportedDevicesTitle"><u>Supported devices:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 1st gen\n• Apple AirPods 2nd gen\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
|
<string name="batterySaver">Режим збереження енергії (Не рекомендовано)</string>
|
||||||
|
<string name="batterySaver_desc">Увімкніть, якщо Bluetooth використовує багато ресурсів</string>
|
||||||
|
<string name="hide">Сховати додаток</string>
|
||||||
|
<string name="hide_desc">Приховати це додаток з домашньої сторінки</string>
|
||||||
|
<string name="hideClicked">Іконка скоро зникне</string>
|
||||||
|
<string name="about">Про програму</string>
|
||||||
|
|
||||||
|
<string name="about_dev">Розроблено Federico Dossena</string>
|
||||||
|
<string name="website">Сайт</string>
|
||||||
|
<string name="github">Github</string>
|
||||||
|
<string name="donate">Підтримати</string>
|
||||||
|
</resources>
|
||||||
@@ -3,21 +3,23 @@
|
|||||||
<string name="intro1">此应用可以让您在任何安卓设备上查看 AirPods 的状态</string>
|
<string name="intro1">此应用可以让您在任何安卓设备上查看 AirPods 的状态</string>
|
||||||
<string name="intro2">我们需要蓝牙、定位以及在后台运行的权限来正常运作</string>
|
<string name="intro2">我们需要蓝牙、定位以及在后台运行的权限来正常运作</string>
|
||||||
<string name="introAllow">允许</string>
|
<string name="introAllow">允许</string>
|
||||||
<string name="main1">当您的 AirPods 接入时,我们会在通知栏显示通知</string>
|
<string name="main_description">当您的 AirPods 接入时,我们会在通知栏显示通知</string>
|
||||||
<string name="main2">您可以隐藏此应用</string>
|
<string name="hide_message">您可以隐藏此应用</string>
|
||||||
<string name="settings">Settings</string>
|
<string name="settings">Settings</string>
|
||||||
|
|
||||||
<string name="noBtText">看起来您的设备并不支持蓝牙</string>
|
<string name="noBtText">看起来您的设备并不支持蓝牙</string>
|
||||||
<string name="locationDisabledText">您需要开启定位来让 OpenPods 读取状态</string>
|
<string name="locationDisabledText">您需要开启定位来让 OpenPods 读取状态</string>
|
||||||
<string name="supportedDevices">支持的设备:\n• Apple AirPods 一代\n• Apple AirPods 二代</string>
|
<string name="supportedDevicesTitle"><u>支持的设备:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 一代\n• Apple AirPods 二代\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
<string name="hide">隐藏</string>
|
|
||||||
<string name="hideClicked">桌面图标很快就会被隐藏掉</string>
|
|
||||||
<string name="batterySaver">省电模式 (不推荐)</string>
|
<string name="batterySaver">省电模式 (不推荐)</string>
|
||||||
<string name="batterySaver_desc">可在蓝牙消耗过多电量时开启</string>
|
<string name="batterySaver_desc">可在蓝牙消耗过多电量时开启</string>
|
||||||
|
<string name="hide">隐藏</string>
|
||||||
|
<string name="hide_desc">从您的首页隐藏此应用</string>
|
||||||
|
<string name="hideClicked">桌面图标很快就会被隐藏掉</string>
|
||||||
<string name="about">关于</string>
|
<string name="about">关于</string>
|
||||||
|
|
||||||
<string name="about1">由 Federico Dossena 开发</string>
|
<string name="about_dev">由 Federico Dossena 开发</string>
|
||||||
<string name="website">网站</string>
|
<string name="website">网站</string>
|
||||||
<string name="github">Github</string>
|
<string name="github">Github</string>
|
||||||
<string name="donate">捐赠</string>
|
<string name="donate">捐赠</string>
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#448aff</color>
|
<color name="colorPrimary" >#448AFF</color>
|
||||||
<color name="colorPrimaryDark">#0d47a1</color>
|
<color name="colorPrimaryDark" >#0D47A1</color>
|
||||||
<color name="colorAccent">#448aff</color>
|
<color name="colorAccent" >#448AFF</color>
|
||||||
<color name="white">#ffffff</color>
|
|
||||||
|
<color name="textColorPrimary" >#000</color>
|
||||||
|
<color name="bgColorPrimary" >#FFF</color>
|
||||||
|
|
||||||
|
<color name="white">#FFFFFF</color>
|
||||||
<color name="black">#000000</color>
|
<color name="black">#000000</color>
|
||||||
|
<color name="dgrey">#737373</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,3 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="fab_margin">16dp</dimen>
|
<dimen name="padding_default" >12dp</dimen>
|
||||||
|
<dimen name="padding_main" >16dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="noti_location_big_height" >120dp</dimen>
|
||||||
|
<dimen name="noti_location_small_height" >70dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="noti_status_bat_size" >18dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="noti_status_small_item_width" >80dp</dimen>
|
||||||
|
<dimen name="noti_status_small_item_height" >30dp</dimen>
|
||||||
|
<dimen name="noti_status_small_pod_width" >18dp</dimen>
|
||||||
|
<dimen name="noti_status_small_case_width" >25dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="noti_status_big_pod_container" >70dp</dimen>
|
||||||
|
<dimen name="noti_status_big_case_container" >120dp</dimen>
|
||||||
|
<dimen name="noti_status_big_item_height" >90dp</dimen>
|
||||||
|
<dimen name="noti_status_big_pod_width" >40dp</dimen>
|
||||||
|
<dimen name="noti_status_big_case_width" >80dp</dimen>
|
||||||
|
<dimen name="noti_status_big_progressbar" >18dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,25 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name" translatable="false">OpenPods</string>
|
<string name="app_name" translatable="false">OpenPods</string>
|
||||||
|
|
||||||
<string name="intro1">This app lets you check the status of your AirPods on any Android device</string>
|
<string name="intro1">This app lets you check the status of your AirPods on any Android device</string>
|
||||||
<string name="intro2">To operate, we need permission to use Bluetooth LE (Location) and permission to run in background</string>
|
<string name="intro2">To operate, we need permission to use Bluetooth LE (Location) and permission to run in background</string>
|
||||||
<string name="introAllow">Allow</string>
|
<string name="introAllow">Allow</string>
|
||||||
<string name="main1">The app will show a notification when your AirPods are connected</string>
|
<string name="main_description">The app will show a notification when your AirPods are connected</string>
|
||||||
<string name="main2">You can hide this app if you want</string>
|
<string name="hide_message">You can hide this app if you want</string>
|
||||||
<string name="settings">Settings</string>
|
<string name="settings">Settings</string>
|
||||||
|
|
||||||
<string name="noBtText">It looks like this device doesn\'t have Bluetooth LE</string>
|
<string name="noBtText">It looks like this device doesn\'t have Bluetooth LE</string>
|
||||||
<string name="locationDisabledText">You need to turn on Location to allow OpenPods to read the status</string>
|
<string name="locationDisabledText">You need to turn on Location to allow OpenPods to read the status</string>
|
||||||
<string name="supportedDevices">Supported devices:\n• Apple AirPods 1st gen\n• Apple AirPods 2nd gen</string>
|
<string name="supportedDevicesTitle"><u>Supported devices:</u></string>
|
||||||
|
<string name="supportedDevicesItems">• Apple AirPods 1st gen\n• Apple AirPods 2nd gen\n• Apple AirPods Pro</string>
|
||||||
|
|
||||||
<string name="hide">Hide app</string>
|
|
||||||
<string name="hideClicked">The icon will disappear soon</string>
|
|
||||||
<string name="batterySaver">Battery saver (Not recommended)</string>
|
<string name="batterySaver">Battery saver (Not recommended)</string>
|
||||||
<string name="batterySaver_desc">Enable this if Bluetooth uses a lot of battery</string>
|
<string name="batterySaver_desc">Enable this if Bluetooth uses a lot of battery</string>
|
||||||
|
<string name="hide">Hide app</string>
|
||||||
|
<string name="hide_desc">Hide this app from the launcher</string>
|
||||||
|
<string name="hideClicked">The icon will disappear soon</string>
|
||||||
<string name="about">About</string>
|
<string name="about">About</string>
|
||||||
|
|
||||||
<string name="about1">Developed by Federico Dossena</string>
|
<string name="about_dev">Developed by Federico Dossena</string>
|
||||||
<string name="website">Website</string>
|
<string name="website">Website</string>
|
||||||
<string name="github">Github</string>
|
<string name="github">Github</string>
|
||||||
<string name="donate">Donate</string>
|
<string name="donate">Donate</string>
|
||||||
|
<string name="fdroid" translatable="false">F-Droid</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
|
||||||
<!-- Customize your theme here. -->
|
|
||||||
<item name="colorPrimary" >@color/colorPrimary</item>
|
<item name="colorPrimary" >@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark" >@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark" >@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent" >@color/colorAccent</item>
|
<item name="colorAccent" >@color/colorAccent</item>
|
||||||
@@ -13,8 +11,4 @@
|
|||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
|
||||||
|
|
||||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<full-backup-content />
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="batterySaver"
|
|
||||||
android:title="@string/batterySaver"
|
|
||||||
android:summary="@string/batterySaver_desc"
|
|
||||||
android:defaultValue="false"
|
|
||||||
/>
|
|
||||||
<Preference
|
|
||||||
android:key="hideApp"
|
|
||||||
android:title="@string/hide"
|
|
||||||
/>
|
|
||||||
<Preference
|
|
||||||
android:key="about"
|
|
||||||
android:title="@string/about"
|
|
||||||
/>
|
|
||||||
</PreferenceScreen>
|
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="@string/app_name"
|
||||||
|
app:iconSpaceReserved="false">
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="batterySaver"
|
||||||
|
android:summary="@string/batterySaver_desc"
|
||||||
|
android:title="@string/batterySaver"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="hideApp"
|
||||||
|
android:summary="@string/hide_desc"
|
||||||
|
android:title="@string/hide"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="@string/about"
|
||||||
|
app:iconSpaceReserved="false">
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="about"
|
||||||
|
android:summary="@string/app_name"
|
||||||
|
android:title="@string/about"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="fdroid"
|
||||||
|
android:title="@string/fdroid"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
<Preference
|
||||||
|
android:key="website"
|
||||||
|
android:title="@string/website"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="github"
|
||||||
|
android:title="@string/github"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="donate"
|
||||||
|
android:title="@string/donate"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
</PreferenceScreen>
|
||||||
@@ -7,7 +7,7 @@ buildscript {
|
|||||||
|
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.5.1'
|
classpath 'com.android.tools.build:gradle:4.0.0'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
android.enableJetifier=true
|
||||||
|
android.useAndroidX=true
|
||||||
org.gradle.jvmargs=-Xmx1536m
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#Sat Aug 31 10:24:29 CEST 2019
|
#Wed Feb 26 15:58:48 CET 2020
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
|
||||||
|
|||||||
@@ -4,17 +4,20 @@
|
|||||||
The Free and Open Source app for monitoring your AirPods on Android
|
The Free and Open Source app for monitoring your AirPods on Android
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
[Download from F-Droid](https://f-droid.org/repository/browse/?fdid=com.dosse.airpods)
|
<a href="https://f-droid.org/packages/com.dosse.airpods"><img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80"></a>
|
||||||
|
|
||||||
[Download APK](https://downloads.fdossena.com/geth.php?r=openpods-apk)
|
[Download APK](https://downloads.fdossena.com/geth.php?r=openpods-apk)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* Shows a notification with AirPods status when they are connected
|
* Shows a notification with AirPods status when they are connected
|
||||||
* Respects your privacy
|
* Respects your privacy
|
||||||
* Free and Open Source software
|
* Free and Open Source software
|
||||||
|
* Supports Dark Theme
|
||||||
|
|
||||||
## Supported devices
|
## Supported devices
|
||||||
* Apple AirPods 1st gen
|
* Apple AirPods 1st gen
|
||||||
* Apple AirPods 2nd gen
|
* Apple AirPods 2nd gen
|
||||||
|
* Apple AirPods Pro
|
||||||
|
|
||||||
## DO NOT REUPLOAD TO GOOGLE PLAY
|
## DO NOT REUPLOAD TO GOOGLE PLAY
|
||||||
**This app violates Google Play policies and is designed to break if you try to fix that unless you really know what you're doing.** You have been warned. I do NOT want this app to be on Google Play.
|
**This app violates Google Play policies and is designed to break if you try to fix that unless you really know what you're doing.** You have been warned. I do NOT want this app to be on Google Play.
|
||||||
@@ -25,10 +28,7 @@ I had to do this because several people were redistributing modified proprietary
|
|||||||
[Donate with PayPal](https://www.paypal.me/sineisochronic)
|
[Donate with PayPal](https://www.paypal.me/sineisochronic)
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||

|
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/screen1.png" width="420"> <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/screen2.png" width="420"> <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/screen3.png" width="420"> <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/screen4.png" width="420">
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Copyright (C) 2019 Federico Dossena
|
Copyright (C) 2019 Federico Dossena
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 180 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 187 KiB |