個人知識點總結

2021-07-10 07:22:02 字數 2085 閱讀 1177

#解除安裝#

1.解除安裝

viewholder.iv_antivirusitem_clear.setonclicklistener(new onclicklistener()

});2.監聽解除安裝廣播事件

1.建立監聽解除安裝的廣播接受者

private class uninstallreceiver extends broadcastreceiver

}2.**註冊監聽解除安裝的廣播接受者

//**註冊乙個監聽解除安裝應用的廣播接受者

uninstallreceiver = new uninstallreceiver();

//設定過濾條件

intentfilter filter = new intentfilter();

filter.setpriority(1000);

filter.addaction(intent.action_package_removed);//設定接受解除安裝應用的廣播接受者

//設定接受廣播事件的data

filter.adddatascheme("package");//引數:解除安裝頁面中過濾條件的data

registerreceiver(uninstallreceiver, filter);

3.在廣播接受者的onreceive方法中進行介面更新操作

@override

public void onreceive(context context, intent intent) else

}4.在ondestory方法中登出廣播接受者

@override

protected void ondestroy()

#快捷方式#

android:name="com.android.launcher.permission.install_shortcut"

android:permissiongroup="android.permission-group.system_tools"

android:protectionlevel="normal"

android:label="@string/permlab_install_shortcut"

android:description="@string/permdesc_install_shortcut" />

自定義許可權:就是給某個元件使用的許可權

android允許建立多個快捷方式

建立操作

/*** 建立快捷方式

*/private void shorcut()

}許可權:

#log的管理工具#

目的:就是為在應用開啟完畢,上線的時候,將log全部遮蔽掉

public class logutil }}

#bug收集#

測試 -> 上線 -> bug收集(收集使用者使用時程式出現的bug,當程式崩潰的時候,將崩潰的資訊儲存到檔案中,當使用者再次開啟手機的時候,通過傳送將檔案傳送給伺服器)'

2.清單檔案使用

3.bug收集

@override

public void oncreate()

//異常的監聽

private class myuncaughtexceptionhandler implements uncaughtexceptionhandler catch (filenotfoundexception e)

//殺死我們自己的應用,自殺

//mypid() : 獲取我們自己的pid

//killprocess :殺死程序

//閃退

android.os.process.killprocess(android.os.process.mypid());}}

#混淆#

目的:防止別人反編譯應用程式檢視我們的**,增加閱讀的難度

proguard-android.txt : 設定混淆的操作

1.將sdk\tools\proguard\proguard-android.txt拷貝到工程的根目錄下

2.修改project.properties檔案

proguard.config=proguard-android.txt:proguard-project.txt**放開

個人知識點總結

1.url headers 引數確定 url 如果目標 是靜態的網頁,那就直接確定是他 遇到 ajax 非同步載入 需要通過 network 中 xhr 來通過抓包獲取資料 headers 這個不多說了 2.關於請求方式 我用的最多的 還是 get 請求 還有乙個沒有怎麼學到post 就pass 常...

知識點總結

1,迴圈中的中斷 continue 跳出此次迴圈,繼續for迴圈 break 跳出當前for迴圈 return 跳出當前方法 2,字串的操作 componentseparatedbystring stringbyreplacingoccurencesofstring withstring iskin...

知識點總結

oncreate onstrat onresume onpause onstop onrestart ondestroy standard 啟動activity都會產生乙個新的activity 預設模式 singletop 啟動activity允許多個,但不允許重疊 singletask 只允許有乙...