cleanup Activity
This commit is contained in:
parent
6823e67e1a
commit
30c751bd0e
1 changed files with 12 additions and 25 deletions
|
@ -49,11 +49,13 @@ public class AppActivity extends Activity {
|
|||
// this removes the title bar (a ~1cm big strip at the top of the app showing its name
|
||||
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
// we create the webview (at least on the android 14 that is a webview that features avif + websockets etc....)
|
||||
// determin why the checking of this did not work
|
||||
// int PERMISSION_GRANTED=0;
|
||||
// if( checkSelfPermission( Manifest.permission.POST_NOTIFICATIONS) == PERMISSION_GRANTED)
|
||||
// {
|
||||
try {
|
||||
requestPermissions( new String[] {Manifest.permission.POST_NOTIFICATIONS},1);
|
||||
// }
|
||||
} catch (Exception e) { } ;
|
||||
WebView myWebView = new WebView(this);//activityContext);
|
||||
// MyJavascriptInterface myJavaScriptInterface = new MyJavascriptInterface(this,myWebView);
|
||||
// we create a webview (there is also setwebviewclient-vs-setwebchromeclient
|
||||
|
@ -63,11 +65,11 @@ public class AppActivity extends Activity {
|
|||
myWebView.setWebChromeClient(myWebChromeClient);
|
||||
|
||||
setupNotificationChannelShit();
|
||||
// bitmap = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888);
|
||||
|
||||
|
||||
// to setup settings
|
||||
WebSettings myWebSettings = myWebView.getSettings();
|
||||
// enable/disable debugging
|
||||
myWebView.setWebContentsDebuggingEnabled(true);
|
||||
myWebSettings.setBuiltInZoomControls(true);
|
||||
myWebSettings.setDisplayZoomControls(false);
|
||||
|
@ -86,29 +88,14 @@ public class AppActivity extends Activity {
|
|||
}
|
||||
|
||||
public void setupNotificationChannelShit(){
|
||||
NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
|
||||
// The id of the channel.
|
||||
String id = "my_channel_01";
|
||||
|
||||
|
||||
|
||||
int importance = NotificationManager.IMPORTANCE_LOW;
|
||||
|
||||
NotificationChannel mChannel = new NotificationChannel(id, "calender app channel",importance);
|
||||
|
||||
// Configure the notification channel.
|
||||
mChannel.setDescription("description");
|
||||
|
||||
mChannel.enableLights(true);
|
||||
// Sets the notification light color for notifications posted to this
|
||||
// channel, if the device supports this feature.
|
||||
mChannel.setLightColor(Color.RED);
|
||||
|
||||
mChannel.enableVibration(true);
|
||||
mChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});
|
||||
|
||||
mNotificationManager.createNotificationChannel(mChannel);
|
||||
NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
String id = "my_channel_01";
|
||||
int importance = NotificationManager.IMPORTANCE_LOW;
|
||||
NotificationChannel mChannel = new NotificationChannel(id, "calender app channel",importance);
|
||||
mChannel.setDescription("description");
|
||||
mChannel.enableVibration(true);
|
||||
mChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});
|
||||
mNotificationManager.createNotificationChannel(mChannel);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue