快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

android快捷,android快捷菜单创建

安卓手机快捷指令

安卓快捷指令是Tasker。

创新互联专注于崇明企业网站建设,响应式网站设计,商城网站定制开发。崇明网站建设公司,为崇明等地区提供建站服务。全流程专业公司,专业设计,全程项目跟踪,创新互联专业和态度为您提供的服务

这个软件可以理解为安卓客户端的“快捷指令”+“自动化执行”,它可以解决你生活中的小难题,比如在工作的时候,手机突然来电,喧闹的铃声充斥着办公室,你不必要端起手机疯狂地按下音量键,只需要摇一摇,迅速静音,还有触碰NFC标签就可以记录睡眠时间等等。

这个软件可以理解成配置文件激活任务,任务引导场景和变量。

关闭NFC功能需要用adb给予tasker特殊权限,电脑上下载好ADB工具包,安装。将手机连接电脑,进入设置——关于——连续点击版本号,回退——开发人员选项——USB调试,Win+R输入cmd,运行,输入adbdevices,出现xxxxxattached就输入adbshell,然后输入pmgrantnet.dinglisch.android.taskermandroid.permission.WRITE_SECURE_SETTINGS,跳入下一行即可。

android安装后快捷键移动或删除

android安装后快捷键移动或删除如下

1, 创建/*** 为程序创建桌面快捷方式*/private void addShortcut(){undefined// 给桌面发送一个广播Intent shortcut = new Intent("com.android.launcher.action.INSTALL_SHORTCUT");// 设置属性//快捷方式的名称shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));shortcut.putExtra("duplicate", false);

//不允许重复创建//快捷方式的图标ShortcutIconResource iconRes = Intent.ShortcutIconResource.fromContext(this, R.drawable.icon);shortcut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconRes);

// 设置快捷方式执行的操作//指定当前的Activity为快捷方式启动的对象: 如 com.everest.video.VideoPlayer//注意: ComponentName的第二个参数必须加上点号(.),否则快捷方式无法启动相应程序ComponentName comp = new ComponentName(this.getPackageName(), "."+this.getLocalClassName());shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, new Intent(Intent.ACTION_MAIN).setComponent(comp))。

Android 键盘快捷键有哪些

安卓(Android)x86常用键盘快捷键: Alt-F1 = 进入 console 模式 Alt-F7 = 回到 GUI 模式 Alt-F9 = 图形界面 Alt-F10 = 画面旋转 180 度 Alt-F10 = 画面旋转 180 度 Alt-F11 = 画面向左旋转 90 度 Alt-F12 = 画面向右旋转 90 度 Ctrl-P = 开启Android设定画面 "Windows 键"相当于 Android 的 Home 按钮。 "Esc" 相当于 Android 的 Back 按钮 F2 相当于 Android 的 Menu 按钮 F3 相当于 Android 的 Search 按钮 右边的菜单键(win和ctrl中间的键) = Android菜单键 返回键:鼠标右键/Esc键 menu键:鼠标滚轮 关机键:End键/F4键(2.2是短按。2/3好像是长按) 返回主界面:Home键/Windows键 中英文切换:Space+Shifta

Android创建桌面快捷方式(兼容Android 8.0)

在Android O原生桌面上,按照传统创建快捷方式的形式,是不会产生快捷方式的。

传统方式如下:

从Android 7.1(API 25)开始,新增了ShortcutManager,可以对桌面久按应用图标弹出的快捷方式进行管理。

但是,Android 7.1上直接往桌面上添加快捷方式依然是使用上面说到的这种旧方式,但是Android O上,Google应该是想通过比较统一的接口来管理桌面快捷方式了,所以摒弃了这种形式,转而使用ShortcutManager进行管理。所以API 26上,ShortcutManager进行管理。所以API 26上,ShortcutManager新增了对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.

译:

应用程序可以使用requestPinShortcut(ShortcutInfo,IntentSender)将现有的快捷方式(静态或动态)或全新的快捷方式固定到支持的启动器。你通过这个方法的两个参数:

ShortcutInfo对象 - 如果快捷方式已存在,则该对象应仅包含快捷方式的ID。否则,新的ShortcutInfo对象必须包含新快捷方式的ID,意图和短标签。

PendingIntent对象 - 此意图表示如果快捷方式成功固定到设备的启动器,您的应用程序将收到回调。

注意:如果用户不允许将快捷方式固定在启动器上,则固定进程将失败,并且未执行传入此PendingIntent对象的Intent对象。

注意:由于Android O中引入的后台执行限制,最好使用清单声明的接收器来接收回调。

另外,为了防止其他应用程序调用接收器,将属性赋值android:exported =“false”添加到接收者的清单条目中。

注意:当您在应用程序中添加逻辑以引导快捷方式时,请记住,并非所有启动器都支持固定快捷方式。 要确定您的应用程序是否可以在特定设备上完成此过程,请检查isRequestPinShortcutSupported()的返回值。 根据此返回值,您可以决定隐藏您应用程序中允许用户固定快捷方式的选项。

注意:另请参见支持库API isRequestPinShortcutSupported(Context)和requestPinShortcut(Context,ShortcutInfoCompat,IntentSender),它可以在低于O的Android版本上运行,因为它们回落到不推荐使用的私有意图com.android.launcher.action.INSTALL_SHORTCUT。

ShortcutManager类在API level 26上,增加了对isRequestPinShortcutSupported、requestPinShortcut、createShortcutResultIntent三个方法。说明如下:

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.

译:

如果默认桌面支持requestPinShortcut(ShortcutInfo,IntentSender)方法,则返回TRUE。

如果用户更改默认启动程序应用程序,返回值可能会在后续调用中更改。

注意:另请参见支持库对应的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.

译:

请求创建固定的快捷方式。默认启动器将收到该请求,并要求用户批准。如果用户批准,将创建快捷方式,并且将发送resultIntent。但是,如果请求被用户拒绝,则不会向呼叫者发送任何响应。

只有具有前台活动或前台服务的应用程序才能调用此方法。否则,它将抛出IllegalStateException。

当同一个软件包连续多次调用该API时,由开发人员决定如何处理以前的待处理请求。一个可能的策略是忽略任何先前的请求。

注意:另请参见支持库对应件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.

译:

返回默认启动器可以使用的Intent来固定包含给定的ShortcutInfo的快捷方式。 Activity应该使用此方法来设置响应ACTION_CREATE_SHORTCUT的结果。

根据弹窗提示可以看出,可以通过拖动这个图标往桌面上添加快捷方式,可以通过点击自动添加按键,系统给你在桌面的默认位置上添加。

添加后,桌面上会出现如图所示的图标:

回调用到的Receiver:

打印log发现,onReceive如图官方文档所说,点击弹框自动添加按键后,会得到回调。但实践发现,如果桌面上已经添加了图标,当再次调用requestPinShortcut进行添加时,onReceive会在调用requestPinShortcut的时候,直接被回调,而且弹框也会弹出来。

在以上三个方法官方介绍中,官方提示我们,可以使用Android support库的ShortcutManagerCompat进行快捷方式的版本适配。于是,在build.gradle中添加依赖进行尝试:

安卓手机怎样怎样截屏快捷键

若使用的vivo手机,以下是截屏的方法:

一、非全面屏机型:同时按住HOME键+电源键即可截屏。

二、全面屏机型:以下几种:

方法1:同时按住音量下键+电源键。

方法2:进入设置--系统管理/快捷与辅助--超级截屏--手势截屏/三指下滑截屏/三指上滑截屏,打开开关后,三指滑动即可截屏。

(部分机型需进入设置--截屏--快速截屏--开启三指上滑截屏)

方法3:进入设置--快捷与辅助/更多设置--悬浮球中将「悬浮球」开启,然后在任意界面点击悬浮球“截屏”快捷工具完成截屏。

方法4:Jovi语音助手截屏,唤醒Jovi语音助手后,说出“截屏”,语音助手即会执行截屏操作。

图文链接:网页链接

安卓快捷键怎么设置

第一步:找到手机“设置”,点击进去。第二步:下滑找到“更多设置”,点击进去。第三步:找到“手势及按键快捷方式”,点击进去即可设置相关快捷键。第四步:可设置相机,截屏,语音助手,手电筒等快捷键。注意:手机关于设备等操作都可在“设置”中寻找。


网站栏目:android快捷,android快捷菜单创建
本文地址:http://6mz.cn/article/dseejhg.html

其他资讯