Compare commits

...

5 Commits

Author SHA1 Message Date
Yuriy Liskov
b2d8ce5aab readme 2019-03-22 18:39:54 +02:00
Yuriy Liskov
7dfaac0683 gradle upd 2019-02-25 01:20:30 +02:00
Yuriy Liskov
cc3f605970 update readme 2018-11-29 22:47:17 +02:00
Yuriy Liskov
ac637c79f4 add telegram link 2018-11-29 22:37:01 +02:00
Yuriy Liskov
cb13108a11 fix: home activity not found: update 2 2018-09-18 00:37:14 +03:00
5 changed files with 97 additions and 50 deletions

View File

@@ -5,8 +5,8 @@
__LeanKeyKeyboard: Keyboard for Android-based set-top boxes and TVs:__ __LeanKeyKeyboard: Keyboard for Android-based set-top boxes and TVs:__
Visit Google Play page: * <a href="https://t.me/LeanKeyKeyboard">Telegram group</a>
* <a href="https://play.google.com/store/apps/details?id=org.liskovsoft.androidtv.rukeyboard" target="_blank">[APP] LeanKeyKeyboard</a> * <a href="https://play.google.com/store/apps/details?id=org.liskovsoft.androidtv.rukeyboard" target="_blank">Google Play page</a>
__NOTE: Google Play release is outdated. So I recommend to obtain new releases [here](https://github.com/yuliskov/LeanKeyKeyboard/releases).__ __NOTE: Google Play release is outdated. So I recommend to obtain new releases [here](https://github.com/yuliskov/LeanKeyKeyboard/releases).__
@@ -17,7 +17,9 @@ __NOTE: Google Play release is outdated. So I recommend to obtain new releases [
* Doesn't depend on Google Services. * Doesn't depend on Google Services.
* __No root required!__ * __No root required!__
__Switch to other language performed with 'world' button, menu key or long press on the space bar.__ __Tip: Switch to other language with language button or by long press on the space bar__
__Tip: Do long press on the language button to choose between available languages__
### Screenshots: ### Screenshots:
* __[Open screenshots](#screens)__ * __[Open screenshots](#screens)__
@@ -31,9 +33,15 @@ __Standard installation via ADB__
* <a href="https://github.com/yuliskov/LeanKeyKeyboard/releases" target="_blank">Download latest LeanKeyKeyboard APK</a> and sideload/install with adb: * <a href="https://github.com/yuliskov/LeanKeyKeyboard/releases" target="_blank">Download latest LeanKeyKeyboard APK</a> and sideload/install with adb:
* *adb install -r LeanKeyKeyboard.apk* * *adb install -r LeanKeyKeyboard.apk*
* Enjoy :) * Enjoy :)
### Donation:
If you want to support my developments you are welcome to buy me a cup of coffee :)
* [__Donation Alerts (RU)__](https://www.donationalerts.ru/r/firsthash)
* [__PrivatBank (UA)__](https://privatbank.ua/ru/sendmoney?payment=73ab18516e24ad365808eec66192e756879dde16)
* __BTC__: 1JAT5VVWarVBkpVbNDn8UA8HXNdrukuBSx
### Reviews / Articles: ### Reviews / Articles:
* Just google for "LeanKey Keyboard" * [__XDA Discussion__](https://forum.xda-developers.com/fire-tv/general/guide-change-screen-keyboard-to-leankey-t3527675)
### Changelog: ### Changelog:
* [Check releases page for changelog ..](https://github.com/yuliskov/LeanKeyKeyboard/releases) * [Check releases page for changelog ..](https://github.com/yuliskov/LeanKeyKeyboard/releases)
@@ -45,11 +53,6 @@ __Standard installation via ADB__
### Developer: ### Developer:
* __[yuliskov](https://github.com/yuliskov)__ (design & coding) * __[yuliskov](https://github.com/yuliskov)__ (design & coding)
### Donation:
If you want to support my developments you are welcome to buy me a cup of coffee :)
* [__PrivatBank (Ukraine)__](https://privatbank.ua/ru/sendmoney?payment=5fcdddf53e3d491d63fcb050e6e2e05f2f2678c2)
* __BTC__: 1JAT5VVWarVBkpVbNDn8UA8HXNdrukuBSx
### Screens: ### Screens:
![Screenshot of LeanKeyKeyboard](img/leankeykeyboard_screenshot_01.png "Screenshot of LeanKeyKeyboard") ![Screenshot of LeanKeyKeyboard](img/leankeykeyboard_screenshot_01.png "Screenshot of LeanKeyKeyboard")
![Screenshot of LeanKeyKeyboard](img/leankeykeyboard_screenshot_02.png "Screenshot of LeanKeyKeyboard") ![Screenshot of LeanKeyKeyboard](img/leankeykeyboard_screenshot_02.png "Screenshot of LeanKeyKeyboard")

View File

@@ -14,14 +14,14 @@ buildscript {
// https://stackoverflow.com/questions/20404476/how-to-define-common-android-properties-for-all-modules-using-gradle // https://stackoverflow.com/questions/20404476/how-to-define-common-android-properties-for-all-modules-using-gradle
// Gradle constants example: https://github.com/google/ExoPlayer // Gradle constants example: https://github.com/google/ExoPlayer
ext { ext {
compileSdkVersion = 26 compileSdkVersion = 28
buildToolsVersion = "26.0.2" buildToolsVersion = "28.0.3"
minSdkVersion = 14 minSdkVersion = 14
targetSdkVersion = 26 targetSdkVersion = 26
appCompatVersion = 'com.android.support:appcompat-v7:26.+' appCompatVersion = 'com.android.support:appcompat-v7:28.+'
espressoCoreVersion = 'com.android.support.test.espresso:espresso-core:2.2.2' espressoCoreVersion = 'com.android.support.test.espresso:espresso-core:2.2.2'
junitVersion = 'junit:junit:4.12' junitVersion = 'junit:junit:4.12'
supportVersion = 'com.android.support:support-v4:26.+' supportVersion = 'com.android.support:support-v4:28.+'
robolectricVersion = 'org.robolectric:robolectric:3.5.1' robolectricVersion = 'org.robolectric:robolectric:3.5.1'
crashlyticsVersion = 'com.crashlytics.sdk.android:crashlytics:2.8.0@aar' crashlyticsVersion = 'com.crashlytics.sdk.android:crashlytics:2.8.0@aar'
} }

View File

@@ -8,8 +8,8 @@ android {
applicationId "org.liskovsoft.leankeykeyboard.pro" applicationId "org.liskovsoft.leankeykeyboard.pro"
minSdkVersion project.properties.minSdkVersion minSdkVersion project.properties.minSdkVersion
targetSdkVersion project.properties.targetSdkVersion targetSdkVersion project.properties.targetSdkVersion
versionCode 79 versionCode 80
versionName "4.3.29" versionName "4.3.30"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

View File

@@ -11,6 +11,8 @@
<!-- "Languages & input" on old api --> <!-- "Languages & input" on old api -->
<meta-data android:name="package_alt" android:value="com.android.settings"/> <meta-data android:name="package_alt" android:value="com.android.settings"/>
<meta-data android:name="class_alt" android:value="com.android.settings.Settings$InputMethodAndLanguageSettingsActivity"/> <meta-data android:name="class_alt" android:value="com.android.settings.Settings$InputMethodAndLanguageSettingsActivity"/>
<!-- Last try (if above not found) -->
<meta-data android:name="intent" android:value="android.settings.INPUT_METHOD_SETTINGS"/>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>

View File

@@ -1,7 +1,3 @@
//
// Decompiled by Procyon v0.5.30
//
package com.liskovsoft.other; package com.liskovsoft.other;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
@@ -15,12 +11,25 @@ import android.content.pm.ActivityInfo;
import android.content.Intent; import android.content.Intent;
import android.app.Activity; import android.app.Activity;
import java.util.ArrayList;
import java.util.List;
public class GenericLaunchActivity extends Activity public class GenericLaunchActivity extends Activity
{ {
private boolean isSecondLaunch = false; private static final String META_PACKAGE_NAME = "package";
private static final String META_CLASS_NAME = "class";
private static final String META_PACKAGE_NAME_ALT = "package_alt";
private static final String META_CLASS_NAME_ALT = "class_alt";
private static final String META_INTENT_NAME = "intent";
private List<Intent> mIntents = new ArrayList<>();
protected void onCreate(final Bundle bundle) {
super.onCreate(bundle);
launchApp();
}
@SuppressLint("WrongConstant") @SuppressLint("WrongConstant")
private void addIntentFlags(final Intent intent) { private void addCommonIntentFlags(final Intent intent) {
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
} }
@@ -32,57 +41,90 @@ public class GenericLaunchActivity extends Activity
} }
catch (NameNotFoundException ex) { catch (NameNotFoundException ex) {
ex.printStackTrace(); ex.printStackTrace();
makeLongToast(ex.getLocalizedMessage(), 10); makeLongToast(ex.getLocalizedMessage());
return null; return null;
} }
} }
private void launchApp() { private void launchApp() {
final Intent intent = makeIntent(getCurrentActivityInfo()); makeIntentList();
addIntentFlags(intent); startIntents();
startIntent(intent);
finish(); finish();
} }
private Intent makeIntent(final ActivityInfo activityInfo) {
String metaPackage = isSecondLaunch ? "package_alt" : "package";
String metaClass = isSecondLaunch ? "class_alt" : "class";
final Bundle metaData = activityInfo.metaData; private void startIntents() {
final Intent intent = new Intent(); for (Intent intent : mIntents) {
if (metaData.getString("intent") != null) { boolean result = startIntent(intent);
intent.setAction(metaData.getString("intent")); if (result) { // run until first successful attempt
} else { break;
intent.setComponent(new ComponentName(metaData.getString(metaPackage), metaData.getString(metaClass))); }
} }
}
private void makeIntentList() {
final ActivityInfo activityInfo = getCurrentActivityInfo();
if (activityInfo == null) {
return;
}
final Bundle metaData = activityInfo.metaData;
String metaPackageName = metaData.getString(META_PACKAGE_NAME);
String metaClassName = metaData.getString(META_CLASS_NAME);
mIntents.add(createIntent(metaPackageName, metaClassName));
String metaPackageNameAlt = metaData.getString(META_PACKAGE_NAME_ALT);
String metaClassNameAlt = metaData.getString(META_CLASS_NAME_ALT);
mIntents.add(createIntent(metaPackageNameAlt, metaClassNameAlt));
String metaIntentName = metaData.getString(META_INTENT_NAME);
mIntents.add(createIntent(metaIntentName));
}
private Intent createIntent(String intentName) {
if (intentName == null) {
return null;
}
final Intent intent = new Intent();
intent.setAction(intentName);
addCommonIntentFlags(intent);
return intent; return intent;
} }
private Intent createIntent(String packageName, String className) {
if (packageName == null || className == null) {
return null;
}
final Intent intent = new Intent();
intent.setComponent(new ComponentName(packageName, className));
addCommonIntentFlags(intent);
return intent;
}
private void makeLongToast(final String s) {
makeLongToast(s, 10);
}
private void makeLongToast(final String s, int nums) { private void makeLongToast(final String s, int nums) {
int n; int n;
for (n = nums / 2, nums = 0; nums < n; ++nums) { for (n = nums / 2, nums = 0; nums < n; ++nums) {
Toast.makeText(this, s, Toast.LENGTH_LONG).show(); Toast.makeText(this, s, Toast.LENGTH_LONG).show();
} }
} }
private void startIntent(final Intent intent) { private boolean startIntent(final Intent intent) {
if (intent == null) {
return false;
}
try { try {
startActivity(intent); startActivity(intent);
} }
catch (ActivityNotFoundException ex) { catch (ActivityNotFoundException ex) {
if (!isSecondLaunch) { return false;
isSecondLaunch = true;
launchApp();
return;
}
ex.printStackTrace();
makeLongToast(ex.getLocalizedMessage(), 10);
} }
}
return true;
protected void onCreate(final Bundle bundle) {
super.onCreate(bundle);
launchApp();
} }
} }