Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ As of version 1.3 you are able to control your device using voice. You can say y

### *In order to use the voice control feature, you have to define a "start activity" action with below parameters and bind it with desired keys sequence:*

> Class name: android.microntek.f1x.mtcdtools.service.dispatching.activities.VoiceDispatchActivity
> Class name: com.microntek.f1x.mtcdtools.service.dispatching.activities.VoiceDispatchActivity

> Intent package: android.microntek.f1x.mtcdtools
> Intent package: com.microntek.f1x.mtcdtools

> Flags: 813760516

Expand All @@ -96,9 +96,9 @@ Due to Lollipop limitations, it is possible that triggering of the voice dispatc

### *Enable MtcdTools voice control:*

> Class name: android.microntek.f1x.mtcdtools.service.dispatching.activities.VoiceDispatchActivity
> Class name: com.microntek.f1x.mtcdtools.service.dispatching.activities.VoiceDispatchActivity

> Intent package: android.microntek.f1x.mtcdtools
> Intent package: com.microntek.f1x.mtcdtools

> Flags: 813760516

Expand Down
27 changes: 13 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
compileSdkVersion 29
buildToolsVersion '29.0.3'

defaultConfig {
applicationId "android.microntek.f1x.mtcdtools"
minSdkVersion 19
targetSdkVersion 25
applicationId "com.microntek.f1x.mtcdtools"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.9"
}
Expand All @@ -20,13 +20,12 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
testCompile 'org.json:json:20140107'
testCompile "org.powermock:powermock-module-junit4:1.6.4"
testCompile "org.powermock:powermock-module-junit4-rule:1.6.4"
testCompile "org.powermock:powermock-api-mockito:1.6.4"
testCompile "org.powermock:powermock-classloading-xstream:1.6.4"
testCompile "org.robolectric:robolectric:3.2.2"
compile 'com.android.support:appcompat-v7:25.1.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
testImplementation 'org.json:json:20140107'
testImplementation "org.powermock:powermock-module-junit4:1.6.4"
testImplementation "org.powermock:powermock-module-junit4-rule:1.6.4"
testImplementation "org.powermock:powermock-api-mockito:1.6.4"
testImplementation "org.powermock:powermock-classloading-xstream:1.6.4"
testImplementation "org.robolectric:robolectric:3.2.2"
}
45 changes: 24 additions & 21 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,54 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.microntek.f1x.mtcdtools">
package="com.microntek.f1x.mtcdtools">

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="android.microntek.f1x.mtcdtools.activities.MainActivity">
<activity android:name="com.microntek.f1x.mtcdtools.activities.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<service android:name="android.microntek.f1x.mtcdtools.service.MtcdService" />
<service android:name="com.microntek.f1x.mtcdtools.service.MtcdService" />

<receiver android:name="android.microntek.f1x.mtcdtools.service.BootCompletedBroadcastReceiver">
<receiver android:name="com.microntek.f1x.mtcdtools.service.BootCompletedBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.SCREEN_ON" />
</intent-filter>
</receiver>

<activity android:name="android.microntek.f1x.mtcdtools.activities.named.objects.actions.CreateActionActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.input.BindingActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.named.objects.ActionsListActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.named.objects.actions.KeyActionActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.named.objects.actions.LaunchActionActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.named.objects.actions.StartIntentActionActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.named.objects.actions.BroadcastIntentActionActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.managing.ManageBindingsActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.input.ObtainKeysSequenceActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.managing.ManageNamedObjectsActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.named.objects.ActionsSequenceActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.named.objects.ModeListActivity" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.managing.ManageAutorunActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.named.objects.actions.CreateActionActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.input.BindingActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.named.objects.ActionsListActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.named.objects.actions.KeyActionActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.named.objects.actions.LaunchActionActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.named.objects.actions.StartIntentActionActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.named.objects.actions.BroadcastIntentActionActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.managing.ManageBindingsActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.input.ObtainKeysSequenceActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.managing.ManageNamedObjectsActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.named.objects.ActionsSequenceActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.named.objects.ModeListActivity" />
<activity android:name="com.microntek.f1x.mtcdtools.activities.managing.ManageAutorunActivity" />
<activity
android:name="android.microntek.f1x.mtcdtools.service.dispatching.activities.ActionsListDispatchActivity"
android:name="com.microntek.f1x.mtcdtools.service.dispatching.activities.ActionsListDispatchActivity"
android:launchMode="singleInstance"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity android:name="android.microntek.f1x.mtcdtools.activities.SettingsActivity"/>
<activity android:name="android.microntek.f1x.mtcdtools.service.dispatching.activities.VoiceDispatchActivity"
<activity android:name="com.microntek.f1x.mtcdtools.activities.SettingsActivity" />
<activity
android:name="com.microntek.f1x.mtcdtools.service.dispatching.activities.VoiceDispatchActivity"
android:launchMode="singleTask"
android:screenOrientation="landscape"
android:theme="@style/AlertDialogTheme"/>
android:theme="@style/AlertDialogTheme" />
</application>

</manifest>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package android.microntek;
package com.microntek;

import android.microntek.ICarManageCallback.Stub;
import android.os.Bundle;
import android.os.RemoteException;

public class CarManageCallback extends Stub {
public class CarManageCallback extends ICarManageCallback.Stub {
public void onStatusChanged(String type, Bundle bundle) throws RemoteException {
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package android.microntek;
package com.microntek;

import android.microntek.ICarService.Stub;
import com.microntek.ICarService.Stub;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
Expand Down Expand Up @@ -43,7 +45,7 @@ public CarManager() {

private static IBinder getCarService() {
try {
Class localClass = Class.forName("android.os.ServiceManager");
@SuppressLint("PrivateApi") Class localClass = Class.forName("android.os.ServiceManager");
Method getService = localClass.getMethod("getService", new Class[] {String.class});

if(getService != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package android.microntek;
package com.microntek;

import android.os.Binder;
import android.os.Bundle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package android.microntek;
package com.microntek;

import android.os.Binder;
import android.os.IBinder;
Expand Down Expand Up @@ -456,12 +456,12 @@ public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws
return true;
case TRANSACTION_registerCallback /*15*/:
data.enforceInterface(DESCRIPTOR);
registerCallback(android.microntek.ICarManageCallback.Stub.asInterface(data.readStrongBinder()));
registerCallback(ICarManageCallback.Stub.asInterface(data.readStrongBinder()));
reply.writeNoException();
return true;
case TRANSACTION_unregisterCallback /*16*/:
data.enforceInterface(DESCRIPTOR);
unregisterCallback(android.microntek.ICarManageCallback.Stub.asInterface(data.readStrongBinder()));
unregisterCallback(ICarManageCallback.Stub.asInterface(data.readStrongBinder()));
reply.writeNoException();
return true;
case TRANSACTION_setParameters /*17*/:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package android.microntek;
package com.microntek;

public class IRTable {
public static final int IR_AB = 363;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package android.microntek;
package com.microntek;

public class MTCData {
public static final int MAX_BALANCE = 28;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package android.microntek.f1x.mtcdtools.activities;
package com.microntek.f1x.mtcdtools.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import android.microntek.f1x.mtcdtools.R;
import android.microntek.f1x.mtcdtools.utils.StartActivityButtonClickListener;
import android.microntek.f1x.mtcdtools.activities.input.BindingActivity;
import android.microntek.f1x.mtcdtools.activities.named.objects.actions.CreateActionActivity;
import android.microntek.f1x.mtcdtools.activities.managing.ManageAutorunActivity;
import android.microntek.f1x.mtcdtools.activities.managing.ManageBindingsActivity;
import android.microntek.f1x.mtcdtools.activities.managing.ManageNamedObjectsActivity;
import android.microntek.f1x.mtcdtools.activities.named.objects.ActionsListActivity;
import android.microntek.f1x.mtcdtools.activities.named.objects.ActionsSequenceActivity;
import android.microntek.f1x.mtcdtools.activities.named.objects.ModeListActivity;
import android.microntek.f1x.mtcdtools.service.MtcdService;
import com.microntek.f1x.mtcdtools.R;
import com.microntek.f1x.mtcdtools.utils.StartActivityButtonClickListener;
import com.microntek.f1x.mtcdtools.activities.input.BindingActivity;
import com.microntek.f1x.mtcdtools.activities.named.objects.actions.CreateActionActivity;
import com.microntek.f1x.mtcdtools.activities.managing.ManageAutorunActivity;
import com.microntek.f1x.mtcdtools.activities.managing.ManageBindingsActivity;
import com.microntek.f1x.mtcdtools.activities.managing.ManageNamedObjectsActivity;
import com.microntek.f1x.mtcdtools.activities.named.objects.ActionsListActivity;
import com.microntek.f1x.mtcdtools.activities.named.objects.ActionsSequenceActivity;
import com.microntek.f1x.mtcdtools.activities.named.objects.ModeListActivity;
import com.microntek.f1x.mtcdtools.service.MtcdService;

public class MainActivity extends Activity {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package android.microntek.f1x.mtcdtools.activities;
package com.microntek.f1x.mtcdtools.activities;

import android.os.Bundle;
import android.view.View;
Expand All @@ -8,8 +8,8 @@
import android.widget.TabHost;
import android.widget.TextView;

import android.microntek.f1x.mtcdtools.R;
import android.microntek.f1x.mtcdtools.service.ServiceActivity;
import com.microntek.f1x.mtcdtools.R;
import com.microntek.f1x.mtcdtools.service.ServiceActivity;

import java.util.Locale;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package android.microntek.f1x.mtcdtools.activities.input;
package com.microntek.f1x.mtcdtools.activities.input;

import android.content.Intent;
import android.os.Bundle;
Expand All @@ -9,14 +9,14 @@
import android.widget.Switch;
import android.widget.Toast;

import android.microntek.f1x.mtcdtools.R;
import android.microntek.f1x.mtcdtools.service.ServiceActivity;
import android.microntek.f1x.mtcdtools.adapters.KeysSequenceArrayAdapter;
import android.microntek.f1x.mtcdtools.adapters.NamedObjectIdsArrayAdapter;
import android.microntek.f1x.mtcdtools.service.input.KeysSequenceBinding;
import android.microntek.f1x.mtcdtools.utils.KeysSequenceConverter;
import android.microntek.f1x.mtcdtools.named.NamedObjectId;
import android.microntek.f1x.mtcdtools.service.storage.exceptions.DuplicatedEntryException;
import com.microntek.f1x.mtcdtools.R;
import com.microntek.f1x.mtcdtools.service.ServiceActivity;
import com.microntek.f1x.mtcdtools.adapters.KeysSequenceArrayAdapter;
import com.microntek.f1x.mtcdtools.adapters.NamedObjectIdsArrayAdapter;
import com.microntek.f1x.mtcdtools.service.input.KeysSequenceBinding;
import com.microntek.f1x.mtcdtools.utils.KeysSequenceConverter;
import com.microntek.f1x.mtcdtools.named.NamedObjectId;
import com.microntek.f1x.mtcdtools.service.storage.exceptions.DuplicatedEntryException;

import org.json.JSONArray;
import org.json.JSONException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package android.microntek.f1x.mtcdtools.activities.input;
package com.microntek.f1x.mtcdtools.activities.input;

import android.content.Intent;
import android.os.Bundle;
Expand All @@ -7,9 +7,9 @@
import android.widget.Button;
import android.widget.ListView;

import android.microntek.f1x.mtcdtools.R;
import android.microntek.f1x.mtcdtools.service.ServiceActivity;
import android.microntek.f1x.mtcdtools.service.input.KeysSequenceListener;
import com.microntek.f1x.mtcdtools.R;
import com.microntek.f1x.mtcdtools.service.ServiceActivity;
import com.microntek.f1x.mtcdtools.service.input.KeysSequenceListener;

import java.util.List;

Expand All @@ -35,7 +35,7 @@ public void onClick(View view) {
saveButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int keysSequence[] = new int[mPressedKeysArrayAdapter.getCount()];
int[] keysSequence = new int[mPressedKeysArrayAdapter.getCount()];

for(int i = 0; i < mPressedKeysArrayAdapter.getCount(); ++i) {
keysSequence[i] = mPressedKeysArrayAdapter.getItem(i);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package android.microntek.f1x.mtcdtools.activities.managing;
package com.microntek.f1x.mtcdtools.activities.managing;

import android.os.Bundle;
import android.view.View;
Expand All @@ -8,15 +8,15 @@
import android.widget.Spinner;
import android.widget.Toast;

import android.microntek.f1x.mtcdtools.R;
import android.microntek.f1x.mtcdtools.service.ServiceActivity;
import android.microntek.f1x.mtcdtools.adapters.NamedObjectIdsArrayAdapter;
import android.microntek.f1x.mtcdtools.named.objects.containers.ActionsSequence;
import android.microntek.f1x.mtcdtools.named.NamedObjectId;
import android.microntek.f1x.mtcdtools.named.objects.actions.BroadcastIntentAction;
import android.microntek.f1x.mtcdtools.named.objects.actions.KeyAction;
import android.microntek.f1x.mtcdtools.named.objects.actions.LaunchAction;
import android.microntek.f1x.mtcdtools.named.objects.actions.StartIntentAction;
import com.microntek.f1x.mtcdtools.R;
import com.microntek.f1x.mtcdtools.service.ServiceActivity;
import com.microntek.f1x.mtcdtools.adapters.NamedObjectIdsArrayAdapter;
import com.microntek.f1x.mtcdtools.named.objects.containers.ActionsSequence;
import com.microntek.f1x.mtcdtools.named.NamedObjectId;
import com.microntek.f1x.mtcdtools.named.objects.actions.BroadcastIntentAction;
import com.microntek.f1x.mtcdtools.named.objects.actions.KeyAction;
import com.microntek.f1x.mtcdtools.named.objects.actions.LaunchAction;
import com.microntek.f1x.mtcdtools.named.objects.actions.StartIntentAction;

import org.json.JSONException;

Expand Down
Loading