File tree Expand file tree Collapse file tree
java/br/com/nullexcept/webappmanager/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<manifest xmlns : android =" http://schemas.android.com/apk/res/android"
33 xmlns : tools =" http://schemas.android.com/tools" >
4- <uses-permission
5- android : name =" com.android.launcher.permission.INSTALL_SHORTCUT" />
4+
5+ <uses-permission android : name =" com.android.launcher.permission.INSTALL_SHORTCUT" />
6+ <uses-permission android : name =" android.permission.INTERNET" />
67
78 <application
89 android : allowBackup =" true"
Original file line number Diff line number Diff line change 11package br .com .nullexcept .webappmanager .app ;
22
3+ import android .Manifest ;
34import android .content .Context ;
45import android .content .Intent ;
56import android .content .SharedPreferences ;
89import android .graphics .BitmapFactory ;
910import android .media .Image ;
1011import android .net .Uri ;
12+ import android .os .Build ;
1113import android .os .Bundle ;
1214import android .view .KeyEvent ;
1315import android .view .View ;
@@ -53,6 +55,12 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
5355 checkAndCreateDatabase ();
5456 super .onCreate (savedInstanceState );
5557 setContentView (R .layout .main_activity );
58+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ) {
59+ requestPermissions (new String []{
60+ Manifest .permission .INSTALL_SHORTCUT ,
61+ Manifest .permission .INTERNET
62+ },10 );
63+ }
5664 if (savedInstanceState == null ){
5765 loadList ();
5866 findViewById (R .id .create ).setOnClickListener ((vw )->{
You can’t perform that action at this time.
0 commit comments