Skip to content

Commit

Permalink
dont exit on back and add flowpilot as home launcher setable
Browse files Browse the repository at this point in the history
  • Loading branch information
MankaranSingh committed May 2, 2023
1 parent 3e6b4e6 commit fb78a38
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
android:name="ai.flow.android.LoadingActivity"
android:theme="@style/Theme.AppCompat.Light"
android:screenOrientation="landscape"
android:exported="true">
android:exported="true"
android:noHistory = "true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.HOME"/>
</intent-filter>
</activity>
<activity
Expand Down
6 changes: 5 additions & 1 deletion android/src/main/java/ai.flow.android/AndroidLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ protected void onCreate(Bundle savedInstanceState) {
//}

params = ParamsInterface.getInstance();
boolean f3 = params.existsAndCompare("F3", true);

TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String dongleID = "";
Expand Down Expand Up @@ -207,5 +206,10 @@ private Boolean checkVersionMisMatch() {
@Override
public void exit() {
}

@Override
public void onBackPressed() {
return;
}
}

8 changes: 8 additions & 0 deletions android/src/main/java/ai.flow.android/LoadingActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public void run() {

Intent intent = new Intent(getApplicationContext(), AndroidLauncher.class);
startActivity(intent);

// destroy current activity
finish();
}
}).start();
}
Expand Down Expand Up @@ -165,4 +168,9 @@ protected void onStop() {
public void onDestroy() {
super.onDestroy();
}

@Override
public void onBackPressed() {
return;
}
}

0 comments on commit fb78a38

Please sign in to comment.