前提
android studioでjava言語を利用したアプリを作っています。
実現したいこと
アプリの使用中、ユーザーが画面に触れる直前に他のアプリなどからのユーザーの予期しない通知が出現して、誤操作となる現象を防ぎたいです。
アプリが使用している画面にの領域に、ニュース速報などのプッシュ通知を被せることを防ぐには、どのような方法が、ありますでしょうか。
現状のAndroidManifest.xmlは、下記の通りです。
XML
1 2<?xml version="1.0" encoding="utf-8"?> 3<manifest xmlns:android="http://schemas.android.com/apk/res/android" 4 xmlns:tools="http://schemas.android.com/tools"> 5 6 <application 7 android:allowBackup="true" 8 android:dataExtractionRules="@xml/data_extraction_rules" 9 android:fullBackupContent="@xml/backup_rules" 10 android:icon="@mipmap/ic_launcher" 11 android:label="@string/app_name" 12 android:roundIcon="@mipmap/ic_launcher_round" 13 android:supportsRtl="true" 14 android:theme="@style/Theme.MyApplication" 15 16 tools:targetApi="31"> 17 <activity 18 android:name=".MainActivity" 19 android:exported="true" 20 android:screenOrientation="portrait" 21 22 > 23 <intent-filter> 24 <action android:name="android.intent.action.MAIN" /> 25 <category android:name="android.intent.category.LAUNCHER" /> 26 </intent-filter> 27 </activity> 28 </application> 29</manifest> 30
補足情報(FW/ツールのバージョンなど)
開発ツール
Android Studio Dolphin | 2021.3.1使用
SDKは、
compileSdk 32
minSdk 31
targetSdk 31
以上
お忙しいところ、恐縮ですが、よろしくお願い致します。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/10/16 07:04