安卓快捷指令是Tasker。
創(chuàng)新互聯(lián)專注于崇明企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站設(shè)計(jì),商城網(wǎng)站定制開(kāi)發(fā)。崇明網(wǎng)站建設(shè)公司,為崇明等地區(qū)提供建站服務(wù)。全流程專業(yè)公司,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)
這個(gè)軟件可以理解為安卓客戶端的“快捷指令”+“自動(dòng)化執(zhí)行”,它可以解決你生活中的小難題,比如在工作的時(shí)候,手機(jī)突然來(lái)電,喧鬧的鈴聲充斥著辦公室,你不必要端起手機(jī)瘋狂地按下音量鍵,只需要搖一搖,迅速靜音,還有觸碰NFC標(biāo)簽就可以記錄睡眠時(shí)間等等。
這個(gè)軟件可以理解成配置文件激活任務(wù),任務(wù)引導(dǎo)場(chǎng)景和變量。
關(guān)閉NFC功能需要用adb給予tasker特殊權(quán)限,電腦上下載好ADB工具包,安裝。將手機(jī)連接電腦,進(jìn)入設(shè)置——關(guān)于——連續(xù)點(diǎn)擊版本號(hào),回退——開(kāi)發(fā)人員選項(xiàng)——USB調(diào)試,Win+R輸入cmd,運(yùn)行,輸入adbdevices,出現(xiàn)xxxxxattached就輸入adbshell,然后輸入pmgrantnet.dinglisch.android.taskermandroid.permission.WRITE_SECURE_SETTINGS,跳入下一行即可。
android安裝后快捷鍵移動(dòng)或刪除如下
1, 創(chuàng)建/*** 為程序創(chuàng)建桌面快捷方式*/private void addShortcut(){undefined// 給桌面發(fā)送一個(gè)廣播Intent shortcut = new Intent("com.android.launcher.action.INSTALL_SHORTCUT");// 設(shè)置屬性//快捷方式的名稱shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));shortcut.putExtra("duplicate", false);
//不允許重復(fù)創(chuàng)建//快捷方式的圖標(biāo)ShortcutIconResource iconRes = Intent.ShortcutIconResource.fromContext(this, R.drawable.icon);shortcut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconRes);
// 設(shè)置快捷方式執(zhí)行的操作//指定當(dāng)前的Activity為快捷方式啟動(dòng)的對(duì)象: 如 com.everest.video.VideoPlayer//注意: ComponentName的第二個(gè)參數(shù)必須加上點(diǎn)號(hào)(.),否則快捷方式無(wú)法啟動(dòng)相應(yīng)程序ComponentName comp = new ComponentName(this.getPackageName(), "."+this.getLocalClassName());shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, new Intent(Intent.ACTION_MAIN).setComponent(comp))。
安卓(Android)x86常用鍵盤快捷鍵: Alt-F1 = 進(jìn)入 console 模式 Alt-F7 = 回到 GUI 模式 Alt-F9 = 圖形界面 Alt-F10 = 畫(huà)面旋轉(zhuǎn) 180 度 Alt-F10 = 畫(huà)面旋轉(zhuǎn) 180 度 Alt-F11 = 畫(huà)面向左旋轉(zhuǎn) 90 度 Alt-F12 = 畫(huà)面向右旋轉(zhuǎn) 90 度 Ctrl-P = 開(kāi)啟Android設(shè)定畫(huà)面 "Windows 鍵"相當(dāng)于 Android 的 Home 按鈕。 "Esc" 相當(dāng)于 Android 的 Back 按鈕 F2 相當(dāng)于 Android 的 Menu 按鈕 F3 相當(dāng)于 Android 的 Search 按鈕 右邊的菜單鍵(win和ctrl中間的鍵) = Android菜單鍵 返回鍵:鼠標(biāo)右鍵/Esc鍵 menu鍵:鼠標(biāo)滾輪 關(guān)機(jī)鍵:End鍵/F4鍵(2.2是短按。2/3好像是長(zhǎng)按) 返回主界面:Home鍵/Windows鍵 中英文切換:Space+Shifta
在Android O原生桌面上,按照傳統(tǒng)創(chuàng)建快捷方式的形式,是不會(huì)產(chǎn)生快捷方式的。
傳統(tǒng)方式如下:
從Android 7.1(API 25)開(kāi)始,新增了ShortcutManager,可以對(duì)桌面久按應(yīng)用圖標(biāo)彈出的快捷方式進(jìn)行管理。
但是,Android 7.1上直接往桌面上添加快捷方式依然是使用上面說(shuō)到的這種舊方式,但是Android O上,Google應(yīng)該是想通過(guò)比較統(tǒng)一的接口來(lái)管理桌面快捷方式了,所以摒棄了這種形式,轉(zhuǎn)而使用ShortcutManager進(jìn)行管理。所以API 26上,ShortcutManager進(jìn)行管理。所以API 26上,ShortcutManager新增了對(duì)Pinned Shortcuts(固定快捷方式)的管理。
官文:
Apps can pin an existing shortcut (either static or dynamic) or an entirely new shortcut to a supported launcher programatically using requestPinShortcut(ShortcutInfo, IntentSender). You pass two arguments into this method:
A ShortcutInfo object – If the shortcut already exists, this object should contain only the shortcut’s ID. Otherwise, the new ShortcutInfo object must contain an ID, an intent, and a short label for the new shortcut.
A PendingIntent object – This intent represents the callback that your app receives if the shortcut is successfully pinned to the device’s launcher.
Note: If the user doesn’t allow the shortcut to be pinned to the launcher, the pinning process fails, and the Intent object that is passed into this PendingIntent object isn’t executed.
Note: Due to background execution limits introduced in Android O, it’s best to use a manifest-declared receiver to receive a callback.
Also, to prevent other apps from invoking the receiver, add the attribute assignment android:exported=”false” to the receiver’s manifest entry.
Note: As you add logic in your app to make requests to pin shortcuts, keep in mind that not all launchers support pinning of shortcuts. To determine whether your app can complete this process on a particular device, check the return value of isRequestPinShortcutSupported(). Based on this return value, you might decide to hide the option in your app that allows users to pin a shortcut.
Note: See also the support library APIs isRequestPinShortcutSupported(Context) and requestPinShortcut(Context, ShortcutInfoCompat, IntentSender), which works on Android versions lower than O by falling back to the deprecated private intent com.android.launcher.action.INSTALL_SHORTCUT.
譯:
應(yīng)用程序可以使用requestPinShortcut(ShortcutInfo,IntentSender)將現(xiàn)有的快捷方式(靜態(tài)或動(dòng)態(tài))或全新的快捷方式固定到支持的啟動(dòng)器。你通過(guò)這個(gè)方法的兩個(gè)參數(shù):
ShortcutInfo對(duì)象 - 如果快捷方式已存在,則該對(duì)象應(yīng)僅包含快捷方式的ID。否則,新的ShortcutInfo對(duì)象必須包含新快捷方式的ID,意圖和短標(biāo)簽。
PendingIntent對(duì)象 - 此意圖表示如果快捷方式成功固定到設(shè)備的啟動(dòng)器,您的應(yīng)用程序?qū)⑹盏交卣{(diào)。
注意:如果用戶不允許將快捷方式固定在啟動(dòng)器上,則固定進(jìn)程將失敗,并且未執(zhí)行傳入此PendingIntent對(duì)象的Intent對(duì)象。
注意:由于Android O中引入的后臺(tái)執(zhí)行限制,最好使用清單聲明的接收器來(lái)接收回調(diào)。
另外,為了防止其他應(yīng)用程序調(diào)用接收器,將屬性賦值android:exported =“false”添加到接收者的清單條目中。
注意:當(dāng)您在應(yīng)用程序中添加邏輯以引導(dǎo)快捷方式時(shí),請(qǐng)記住,并非所有啟動(dòng)器都支持固定快捷方式。 要確定您的應(yīng)用程序是否可以在特定設(shè)備上完成此過(guò)程,請(qǐng)檢查isRequestPinShortcutSupported()的返回值。 根據(jù)此返回值,您可以決定隱藏您應(yīng)用程序中允許用戶固定快捷方式的選項(xiàng)。
注意:另請(qǐng)參見(jiàn)支持庫(kù)API isRequestPinShortcutSupported(Context)和requestPinShortcut(Context,ShortcutInfoCompat,IntentSender),它可以在低于O的Android版本上運(yùn)行,因?yàn)樗鼈兓芈涞讲煌扑]使用的私有意圖com.android.launcher.action.INSTALL_SHORTCUT。
ShortcutManager類在API level 26上,增加了對(duì)isRequestPinShortcutSupported、requestPinShortcut、createShortcutResultIntent三個(gè)方法。說(shuō)明如下:
1.isRequestPinShortcutSupported
官文:
Return TRUE if the app is running on a device whose default launcher supports requestPinShortcut(ShortcutInfo, IntentSender).
The return value may change in subsequent calls if the user changes the default launcher app.
Note: See also the support library counterpart isRequestPinShortcutSupported(Context), which supports Android versions lower than O using the legacy private intent com.android.launcher.action.INSTALL_SHORTCUT.
譯:
如果默認(rèn)桌面支持requestPinShortcut(ShortcutInfo,IntentSender)方法,則返回TRUE。
如果用戶更改默認(rèn)啟動(dòng)程序應(yīng)用程序,返回值可能會(huì)在后續(xù)調(diào)用中更改。
注意:另請(qǐng)參見(jiàn)支持庫(kù)對(duì)應(yīng)的isRequestPinShortcutSupported(Context),在低于O的Android版本,它支持使用舊的私有意圖com.android.launcher.action.INSTALL_SHORTCUT。
2.requestPinShortcut
官文:
Request to create a pinned shortcut. The default launcher will receive this request and ask the user for approval. If the user approves it, the shortcut will be created, and resultIntent will be sent. If a request is denied by the user, however, no response will be sent to the caller.
Only apps with a foreground activity or a foreground service can call this method. Otherwise, it’ll throw IllegalStateException.
It’s up to the launcher to decide how to handle previous pending requests when the same package calls this API multiple times in a row. One possible strategy is to ignore any previous requests.
Note: See also the support library counterpart requestPinShortcut(Context, ShortcutInfoCompat, IntentSender), which supports Android versions lower than O using the legacy private intent com.android.launcher.action.INSTALL_SHORTCUT.
譯:
請(qǐng)求創(chuàng)建固定的快捷方式。默認(rèn)啟動(dòng)器將收到該請(qǐng)求,并要求用戶批準(zhǔn)。如果用戶批準(zhǔn),將創(chuàng)建快捷方式,并且將發(fā)送resultIntent。但是,如果請(qǐng)求被用戶拒絕,則不會(huì)向呼叫者發(fā)送任何響應(yīng)。
只有具有前臺(tái)活動(dòng)或前臺(tái)服務(wù)的應(yīng)用程序才能調(diào)用此方法。否則,它將拋出IllegalStateException。
當(dāng)同一個(gè)軟件包連續(xù)多次調(diào)用該API時(shí),由開(kāi)發(fā)人員決定如何處理以前的待處理請(qǐng)求。一個(gè)可能的策略是忽略任何先前的請(qǐng)求。
注意:另請(qǐng)參見(jiàn)支持庫(kù)對(duì)應(yīng)件requestPinShortcut(Context,ShortcutInfoCompat,IntentSender),在低于O的Android版本,它支持使用舊的私有意圖com.android.launcher.action.INSTALL_SHORTCUT。
3.createShortcutResultIntent
官文:
Returns an Intent which can be used by the default launcher to pin a shortcut containing the given ShortcutInfo. This method should be used by an Activity to set a result in response to ACTION_CREATE_SHORTCUT.
譯:
返回默認(rèn)啟動(dòng)器可以使用的Intent來(lái)固定包含給定的ShortcutInfo的快捷方式。 Activity應(yīng)該使用此方法來(lái)設(shè)置響應(yīng)ACTION_CREATE_SHORTCUT的結(jié)果。
根據(jù)彈窗提示可以看出,可以通過(guò)拖動(dòng)這個(gè)圖標(biāo)往桌面上添加快捷方式,可以通過(guò)點(diǎn)擊自動(dòng)添加按鍵,系統(tǒng)給你在桌面的默認(rèn)位置上添加。
添加后,桌面上會(huì)出現(xiàn)如圖所示的圖標(biāo):
回調(diào)用到的Receiver:
打印log發(fā)現(xiàn),onReceive如圖官方文檔所說(shuō),點(diǎn)擊彈框自動(dòng)添加按鍵后,會(huì)得到回調(diào)。但實(shí)踐發(fā)現(xiàn),如果桌面上已經(jīng)添加了圖標(biāo),當(dāng)再次調(diào)用requestPinShortcut進(jìn)行添加時(shí),onReceive會(huì)在調(diào)用requestPinShortcut的時(shí)候,直接被回調(diào),而且彈框也會(huì)彈出來(lái)。
在以上三個(gè)方法官方介紹中,官方提示我們,可以使用Android support庫(kù)的ShortcutManagerCompat進(jìn)行快捷方式的版本適配。于是,在build.gradle中添加依賴進(jìn)行嘗試:
若使用的vivo手機(jī),以下是截屏的方法:
一、非全面屏機(jī)型:同時(shí)按住HOME鍵+電源鍵即可截屏。
二、全面屏機(jī)型:以下幾種:
方法1:同時(shí)按住音量下鍵+電源鍵。
方法2:進(jìn)入設(shè)置--系統(tǒng)管理/快捷與輔助--超級(jí)截屏--手勢(shì)截屏/三指下滑截屏/三指上滑截屏,打開(kāi)開(kāi)關(guān)后,三指滑動(dòng)即可截屏。
(部分機(jī)型需進(jìn)入設(shè)置--截屏--快速截屏--開(kāi)啟三指上滑截屏)
方法3:進(jìn)入設(shè)置--快捷與輔助/更多設(shè)置--懸浮球中將「懸浮球」開(kāi)啟,然后在任意界面點(diǎn)擊懸浮球“截屏”快捷工具完成截屏。
方法4:Jovi語(yǔ)音助手截屏,喚醒Jovi語(yǔ)音助手后,說(shuō)出“截屏”,語(yǔ)音助手即會(huì)執(zhí)行截屏操作。
圖文鏈接:網(wǎng)頁(yè)鏈接
第一步:找到手機(jī)“設(shè)置”,點(diǎn)擊進(jìn)去。第二步:下滑找到“更多設(shè)置”,點(diǎn)擊進(jìn)去。第三步:找到“手勢(shì)及按鍵快捷方式”,點(diǎn)擊進(jìn)去即可設(shè)置相關(guān)快捷鍵。第四步:可設(shè)置相機(jī),截屏,語(yǔ)音助手,手電筒等快捷鍵。注意:手機(jī)關(guān)于設(shè)備等操作都可在“設(shè)置”中尋找。
新聞名稱:android快捷,android快捷菜單創(chuàng)建
URL分享:http://m.kartarina.com/article46/dseejhg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供營(yíng)銷型網(wǎng)站建設(shè)、品牌網(wǎng)站建設(shè)、用戶體驗(yàn)、定制開(kāi)發(fā)、靜態(tài)網(wǎng)站、搜索引擎優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)