一、这是一篇关于如何将自定义的 homescreen 设定为Android的默认主页,而不需要用户选择的讨论贴,原文如下:
Another additional info: If you want that your homescreen is always
the default and that the system doesn't ask to choose between different
home screens simply put it that way: XML:
<intent-filter priority="1">
<action name="android.intent.action.MAIN"></action>
<category name="android.intent.category.HOME"></category>
<category name="android.intent.category.DEFAULT"></category><
category name="android.intent.category.MONKEY"></category>
</intent-filter>
The difference to the XML above is android:priority="1". It seems
that the default home screen has priority 0 and therefore setting the
priority of your home screen to 1 is sufficient to force the usage of
your home screen.
二、
其实,对于Ophone跟Android来说有许许多多的不一样,比如说联网方式,还比如一些UI的细节实现等
下边的是我收集到得跟Android略有不同的获取CellId跟IMEI的代码:
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
GsmCellLocation location = (GsmCellLocation) tm.getCellLocation();
int cellid = location .getCid();
String imei = tm.getDeviceId();
注:别忘加权限啊
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
这样就成了,呵呵
分享到:
相关推荐
Android APP开发过程中处理,home键点击事件,监听点击home键,做具体处理
1、在系统变量新建ANDROID_HOME 并配置值,2、在path配置新增%ANDROID_HOME%和%ANDROID_HOME%\tools值
此类为安卓源码 ,包括长按home键,电源键,back 键,音量键,等
homescreen.py
此代码来自于https://github.com/shaobin0604/Android-HomeKey-Locker。目测有效文件存在于HomeLockerLib和HomeLockerSample文件夹。
Android 捕获home键
homescreen example
拦截Home键。 按下Home键时停留在当前Activity; 亲测有效;
Android 监听Home键、锁屏、解屏处理方法,都有注释。使用简介: (1)、将内部类(广播类)作为MyBroadcastReceiver类的成员变量,方便activity使用 (2)、对外接口类(如:ScreenStateListener)作为...
ANDROID_SDK_HOME设置
Android Home配置应用源码实例,文件说明: ApplicationInfo:代表台发射的应用。提出申请的名称(或标题),意图和图标。 ApplicationsStackLayout:一个专门为宗旨布局主屏幕 Home:注册各种意图接收器。...
Android-HomeKey-Locker Utility to disable HOME KEY in Android Activity. As there are a lot questions about "how to disable home button in android?" on Stack Overflow, such as how to disable home ...
Android Home 源码;Android Home 源码;Android Home 源码;Android Home 源码;Android Home 源码
斑马提供的EHS是一个斑马Android设备的锁屏软件,中文说明书和APK。
Android系统中实现捕获Home键的功能
NULL 博文链接:https://aking86.iteye.com/blog/1317186
Android安卓隐藏任务栏及增加Home属性,包含源代码修改,setSystemUiVisibility
List of Sample Apps The list below provides a ...An example of creating interactive widgets for display on the Android home screen. Wiktionary (Simplified) A simple Android home screen widgets example.
androidHome环境变量配置,HarmonyOS arkUI-X 环境配置
Android 屏蔽home,菜单,返回键 解锁,加锁