Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
/captures
.externalNativeBuild
.cxx
app/libs/com.lge.ivi.jar
app/libs/com.lge.ivi_191209.jar
10 changes: 10 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@

# App Manager
Allows you to map hardware keys to custom apps and manage apps. <br />

**Features:<br />**
* Map long press of hardware keys (except Settings) to any installed app.<br />
* Map back key event to an hardware button, doesn't require restored stock apps on 191209 software.<br />
Allows you to map hardware keys to custom apps and manage apps.

## Features:

* Map long press of hardware keys (except Settings) to any installed app.
* Map double press of hardware keys to any installed app.
* Map back key event to an hardware button, doesn't require restored stock apps on 191209 software.
* Map EV key, ONLY DOUBLE PRESS IS WORKING.
* Clear app cache
* Clear app data
* Force stop app
* Uninstall app
* Restart service when Android OOM kills it

**Long press settings (gearwheel) button to launch the app. Before launching it the first time push the settings button shortly and long press it afterwards. This is only required after installing the app for the first time.<br />**
Both long press and double press does not start the original application for that button just
the app you programmed. Except EV button, which I cannot stop starting original EV app first.

![Screenshot](doc/screenshot.png) <br />
**Long press settings (gearwheel) button to launch the app. Before launching it the first time push
the settings button shortly and long press it afterwards. This is only required after installing the
app for the first time.**

![Screenshot](doc/screenshot.png)
Checkbox for list item will show you if you have mapped a key already.

![Screenshot](doc/screenshot2.png) <br />
![Screenshot](doc/screenshot2.png)

If you like my work I'd be happy if you buy me a coffee. Thanks!<br />
If you like my work I'd be happy if you buy me a coffee. Thanks!
[![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RT8WTFDGMLFPG)

### Translations
* English
* Hungarian
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "g4rb4g3.at.ctsteststarter"
minSdkVersion 17
targetSdkVersion 17
versionCode 206
versionName "2.0.6"
versionCode 207
versionName "2.0.7"
}
buildTypes {
release {
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,33 @@

<receiver
android:name=".BroadcastsReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="com.lge.ivi.action.KEY_SETTINGS" />
</intent-filter>
</receiver>

<receiver
android:name=".ServiceRestartBroadcastReceiver"
android:enabled="true"
android:exported="true"
android:label="RestartServiceWhenStopped" />

<service
android:name=".KeyInterceptorService"
android:enabled="true"
android:exported="true" />

<receiver
android:name="EVButtonReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="2147483647">
<action android:name="com.lge.ivi.action.KEY_EV" />
</intent-filter>
</receiver>
</application>

</manifest>
5 changes: 5 additions & 0 deletions app/src/main/java/com/lge/ivi/server/ExtMediaService.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ public boolean removeFileInSd(String s) throws RemoteException {
throw new UnsupportedOperationException();
}

@Override
public boolean removeFileInUsb(String s) throws RemoteException {
throw new UnsupportedOperationException();
}

@Override
public boolean writeFileInSd(String s, String s1) throws RemoteException {
throw new UnsupportedOperationException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ public void onReceive(Context context, Intent intent) {
context.startService(new Intent(context, KeyInterceptorService.class));
}
}



22 changes: 22 additions & 0 deletions app/src/main/java/g4rb4g3/at/ctsteststarter/EVButtonReceiver.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package g4rb4g3.at.ctsteststarter;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.RemoteException;
import android.view.KeyEvent;


public class EVButtonReceiver extends BroadcastReceiver {
@Override
public void onReceive(final Context context, Intent intent) {
KeyInterceptorService service = KeyInterceptorService.self;
// Simulate keypress with an unknown code
try {
service.mKeyInterceptor.onKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyInterceptorService.KEYCODE_EV));
} catch (RemoteException e) {
e.printStackTrace();
}
abortBroadcast();
}
}
Loading