Using SECRET_CODE from android.provider.Telephony in secure

2023-05-16

http://blog.udinic.com/2013/05/17/create-a-secret-doorway-to-your-app

Check this link out.

Here is a sample piece of code. In your manifest, declare your receiver and with a secret code for example: 111222

Then create the receiver:

public class DiagnoserReceiver extends BroadcastReceiver {

public void onReceive(Context context, Intent intent) {
    if ("android.provider.Telephony.SECRET_CODE".equals(intent.getAction())) {
        //Do your increment here
    }
}

}
I suppose if you want multiple numbers, you can add the variants of codes that your app will listen for:

EDIT: You can try this SO post I found

only to match the beginning of host. The rules are these:

Put * as the first character of the host.
Write the rest of of the host until the end.
android:host=“site.com"
android:pathPattern=".

android:scheme=“http” />
It will catch links of:

www.site.com
site.com
mail.site.com
So you should be able to wildcard the font of the

In theory it should work for 0034 ... 9934

**CAUTION: **
Anyone can decompile your app and see the codes in the manifest file. So whatever you do, make sure it is secured. IE. If you open an activity from the receiver, make sure the activity asks for a password first.

OR
Another way to be more safe is to register the broadcast receiver in your MainApplication class in onCreate - add intentFilters to your liking, this way your codes are not exposed in the android manifest file but it will not work if your app is completely closed or swiped away. Simply open the app, (wait for the broadcast receiver to register), minimise it, type in your code, and voila.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Using SECRET_CODE from android.provider.Telephony in secure 的相关文章

  • Android 主机意图过滤器通配符

    是否可以在 android host 属性上使用通配符 就像是 android host site com android pathPattern android pathPrefix m android scheme http gt Or
  • Android KeyBoard.Key 禁用图标 预览特殊键?

    我通过实现 KeyboardView OnKeyboardActionListener 接口来自定义自己的软键盘 按下按键时 将显示预览弹出窗口 我的问题是如何禁用 SHIFT 和 DELETE 等特殊键的预览弹出窗口 我尝试将 andro
  • 是否可以使用最新的 APP_PLATFORM,同时仍保持向后兼容性?

    这是我的 Application mk APP ABI armeabi v7a APP PLATFORM android 16 APP OPTIM release APP STL gnustl static APP CPPFLAGS std
  • 检索子值 -firebase-

    System out println ref child email protected cdn cgi l email protection child email 我正在尝试获取 child 的值 但我始终获取该值的 URL 当我尝试使
  • 如何将 EditText 传递给另一个活动?

    Intent intent new Intent this Name class intent putExtra key et getText toString startActivity intent Intent intent getI
  • 在 WebView 中完成 AdBlock

    我即将在我的 Android 应用程序中推出 WebView AdBlocking 我想知道这是否会有效地阻止广告 或者在 Webview 本身内是否还有更多工作要做 我尚未修改 基本上我有一个存储在 Android 资产中的主机文件 其中
  • Android - 当不在栏顶部时推送通知空白

    我在使用 Android 推送通知时遇到一个小问题 如果有 3 个通知 并且只有其中一个显示标题和消息 位于酒吧顶部的那个 如果有人知道可能是什么问题 请告诉我 请参阅此链接上的图像 这就是我接收通知的方式http postimg org
  • Android-工具栏中的SearchView

    我只想在我的应用程序中添加 searchview 但我不想搜索任何东西 只是我想要用户输入的查询 到目前为止 我尝试了这段代码 但是当我运行我的应用程序时它崩溃了 Update 我尝试了这个 但即使我的应用程序崩溃了 main menu x
  • 没有调用addToBackStack,片段仍然添加到backstack,为什么?

    我正在制作我的片段更换器助手类 但我遇到了一些问题 我称之为FragmentChanger 它有一个fragmentContainer 这是一个ViewGroup 其中包含我想展示的所有片段 我已经做了我自己的replace Fragmen
  • Android Web Intent 问题

    G day 免责声明 我不是 Android 开发人员 我正在对我所描述的问题进行质量检查 我用来描述这个问题的技术术语可能是错误的 我正在测试一个 Android 应用程序 该应用程序在其清单中描述它可以使用 type 的地址处理 Web
  • Google 移动广告和 Kindle Fire

    我最近用 Google 移动广告替换了 AdMob 库 对此我有一个疑问 广告会出现在 Amazon Kindle Fire 设备上吗 我问这个是因为我知道 Google 移动广告依赖于 Google Play 服务 所以我有点困惑 Goo
  • Android 改变 ImageView / Bitmap 的颜色

    我需要找到一种方法来改变 Android 中位图的颜色 我需要在我的应用程序中平滑地替换 更改椭圆形图像的颜色 具体取决于int价值 我需要类似的东西myValue 5比改变我的图像的颜色RED and if myValue 322将颜色更
  • 如何在android中的操作栏中创建Edittext?

    我们可以在操作栏中使用编辑文本吗 在阅读了 Google 中的大量资源后 我找不到如何在操作栏中创建编辑文本 谁能告诉我该怎么做 您可以设置自定义View为了ActionBar像这样 getActionBar setCustomView R
  • 如何在Android Compose中使用otf类型字体文件?

    我正在学习使用 Android Jetpack Compose 现在我有一个正则 otf字体文件在资产 字体 我想在文本中使用它 java lang RuntimeException Font asset not found commonu
  • 如何从 Facebook 邀请好友到 Android 应用程序? - 给出错误

    我正在开发一个 Android 应用程序 我正在努力将 邀请朋友 功能添加到我的应用程序中 它转到我的AppLinkUrl成功但显示错误 我的清单代码如下
  • 如何获取android手机型号、版本、sdk详细信息?

    如何获取android手机型号 版本 sdk详细信息 首先 看看 android sdk 页面上的这些 Build 类 http developer android com reference android os Build html h
  • 检测 ListView(或 ScrollView)内的滚动位置

    我正在构建一个聊天室应用程序 其中每 X 秒就会轮询一次新事件 每次发生这种情况时 此代码都会使用新数据更新 RoomAdapter ArrayAdapter 的自定义子类 并将其滚动到底部 RoomAdapter adapter Room
  • 如何在Android中解析xml类型的HTTPResponse

    我有一个 Android 应用程序 我使用 POST 方法来获取响应 这是我的代码 HttpResponse httpResponse httpclient execute httppost HttpEntity resEntity htt
  • 在状态栏下方显示DialogFragment内容

    我试图显示高度和宽度均具有 match parent 的 DialogFragment 但碰巧在顶部 DialogFragment 显示在 StatusBar 下方 DialogFragment 正在应用一些默认值来填充底部 右侧 左侧和顶
  • 如何以编程方式创建活动转换?

    我想以编程方式创建一个动画 以从触摸屏点启动具有缩放效果的活动 接下来我模拟缩放输入效果

随机推荐