Browse Source

Tryna force Android notification (channel) to S T F U

Wazakindjes 1 year ago
parent
commit
29920eeca3

BIN
app/rem0t0.apk


+ 1 - 1
app/src/.idea/misc.xml

@@ -29,7 +29,7 @@
       </value>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/build/classes" />
   </component>
   <component name="ProjectType">

+ 1 - 1
app/src/app_rem0t0/src/main/AndroidManifest.xml

@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 	xmlns:tools="http://schemas.android.com/tools"
 	package="com.jemoeder.lief.rem0t0"
-	android:versionName="1.0.1">
+	android:versionName="1.0.2">
 
 	<!-- Need an internet connection to work 0bv lol -->
 	<uses-permission android:name="android.permission.INTERNET" />

+ 12 - 1
app/src/app_rem0t0/src/main/java/com/jemoeder/lief/rem0t0/MainActivity.java

@@ -173,10 +173,21 @@ public class MainActivity extends AppCompatActivity {
 		notifBuilder.setShowWhen(false);
 		notifBuilder.setContent(new RemoteViews(getPackageName(), R.layout.muhnotification));
 		notifBuilder.setBadgeIconType(NotificationCompat.BADGE_ICON_NONE);
+		notifBuilder.setPriority(NotificationCompat.PRIORITY_HIGH);
+		notifBuilder.setLights(0, 0, 0);
+		notifBuilder.setSound(null);
 
 		if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-			NotificationChannel notifChannel = new NotificationChannel(muhchanActive, muhchanActive, NotificationManager.IMPORTANCE_DEFAULT);
+			if(!wrapass.muhprefs.getBoolean("deleted_notifchan_20191209", false)) {
+				wrapass.notifMan.deleteNotificationChannel(muhchanActive);
+				wrapass.muhprefs_ed.putBoolean("deleted_notifchan_20191209", true).apply();
+			}
+
+			NotificationChannel notifChannel = new NotificationChannel(muhchanActive, muhchanActive, NotificationManager.IMPORTANCE_HIGH);
 			notifChannel.setShowBadge(false);
+			notifChannel.setLightColor(0);
+			notifChannel.setSound(null, null);
+			notifChannel.setBypassDnd(true);
 			wrapass.notifMan.createNotificationChannel(notifChannel);
 			notifBuilder.setChannelId(muhchanActive);
 		}

+ 2 - 2
app/src/app_rem0t0/version.properties

@@ -1,2 +1,2 @@
-#Thu Nov 14 15:19:02 CET 2019
-VERSION_CODE=310
+#Mon Dec 09 18:18:38 CET 2019
+VERSION_CODE=314