-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from OriKerer/triple-tap-functionality
Triple tap functionality
- Loading branch information
Showing
46 changed files
with
160 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
## Airdots Double-Tap | ||
##### Adds the functionality to skip songs on double-tap with the "Xiaomi Airdots" (Will work with other earphones that activate personal assitant) | ||
##### Adds the functionality to skip songs on double-tap with the "Xiaomi Airdots" (Will work with other earphones that activate personal assistant) | ||
There are other apps with the same functionality (like MacroDroid) But they will keep running in the background. | ||
I personally didn't liked this. Therefore AirdotsDoubleTap app will only run while skipping the song. | ||
# | ||
### You can download the APK from the release sectione [here](https://github.com/OriKerer/AirdotsDoubleTap/releases) | ||
### You can download the APK from the release section [here](https://github.com/OriKerer/AirdotsDoubleTap/releases) | ||
# | ||
### How to use | ||
* Install the app | ||
* Double tap the airdots | ||
* The device will ask you with which app to complete the action | ||
* Select always with AirdotsDoubleTap | ||
|
||
### Play Previous song | ||
- Pouse the media with one tap | ||
- Once the media is poused double tap | ||
# | ||
#### Tested on: | ||
- Android 8.1 (Nexus 5x) | ||
- Android 9 | ||
- Android 10 (Galaxy s10e) | ||
- Android 11 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" package="com.orik.airdotsdoubletap"> | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="com.orik.airdotsdoubletap"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
tools:ignore="GoogleAppIndexingWarning" | ||
android:theme="@android:style/Theme.NoDisplay"> | ||
|
||
<activity | ||
android:name="com.orik.airdotsdoubletap.MainActivity" | ||
android:label="@string/app_name" | ||
android:launchMode="singleInstance" | ||
android:showOnLockScreen="true"> | ||
<intent-filter > | ||
<action android:name="android.intent.action.VOICE_COMMAND" /> | ||
android:allowBackup="true" | ||
android:icon="@mipmap/new_ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/new_ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@android:style/Theme.DeviceDefault" | ||
tools:ignore="GoogleAppIndexingWarning"> | ||
<activity android:name=".Settings"> | ||
<intent-filter> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
|
||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name" | ||
android:launchMode="singleInstance" | ||
android:theme="@android:style/Theme.NoDisplay" | ||
android:showOnLockScreen="true"> | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.VOICE_COMMAND" /> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.orik.airdotsdoubletap | ||
|
||
import android.app.Activity | ||
import android.os.Bundle | ||
import kotlinx.android.synthetic.main.activity_settings.* | ||
|
||
class Settings : Activity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_settings) | ||
val prefs = getSharedPreferences( | ||
this.applicationContext.packageName, MODE_PRIVATE | ||
) | ||
val editor = prefs.edit() | ||
R.id.swtchNoRewind | ||
swtchNoRewind.isChecked = prefs.getBoolean(getString(R.string.PREF_NO_REWIND), false) | ||
swtchNoRewind.setOnCheckedChangeListener { _, isChecked -> | ||
editor.putBoolean(getString(R.string.PREF_NO_REWIND), isChecked) | ||
editor.apply() | ||
} | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".MainActivity"> | ||
|
||
<TextView | ||
android:id="@+id/txtNoRewind" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="40dp" | ||
android:layout_marginTop="60dp" | ||
android:text="@string/settings_no_rewind" | ||
android:textColor="#FFFFFF" | ||
android:textSize="18sp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/textView2" | ||
android:layout_width="251dp" | ||
android:layout_height="62dp" | ||
android:layout_marginStart="40dp" | ||
android:layout_marginTop="12dp" | ||
android:text="@string/settings_no_rewind_desc" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/txtNoRewind" /> | ||
|
||
<Switch | ||
android:id="@+id/swtchNoRewind" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="15dp" | ||
android:layout_marginTop="96dp" | ||
android:layout_marginEnd="15dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.191" | ||
app:layout_constraintStart_toEndOf="@+id/textView2" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@color/new_ic_launcher_background"/> | ||
<foreground android:drawable="@mipmap/new_ic_launcher_foreground"/> | ||
</adaptive-icon> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@color/new_ic_launcher_background"/> | ||
<foreground android:drawable="@mipmap/new_ic_launcher_foreground"/> | ||
</adaptive-icon> |
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="ic_launcher_background">#3DDC84</color> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="new_ic_launcher_background">#3DDC84</color> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
<resources> | ||
<string name="app_name">AirdotsDoubleTap</string> | ||
<string name="app_name">Double-Tap</string> | ||
<string name="settings_no_rewind">No Rewind</string> | ||
<string name="settings_no_rewind_desc"> | ||
When \'triple\' tapping do not rewind and just skip to previous song (May help with some media players) | ||
</string> | ||
<string name="PREF_NO_REWIND">NO_REWIND</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.