memo

カスタムNotification Layoutについて

NotificationにカスタムRemoteViewsをセット NotificationManagerに登録するオブジェクト・Notificationを次のようにすると、カスタムLayoutを表示することができます。 NotificationManager notificationManager = (NotificationManager)context.getSystemSe…

自アプリ以外のアプリをclearDefaultできません

自アプリに対してのみclearDefault可能 PackageManagerクラスのclearPackagePreferredActivities()で各Actionの「デフォルトでの起動」を解除できます。ただし、Developerサイトに以下の記載されている通り、自アプリに対してのみ使用可能です。"An applicat…

Settingsアプリのアプリケーション詳細画面を呼び出してみる

呼び出し方法 APIレベル9よりSettingsクラスに「ACTION_APPLICATION_DETAILS_SETTINGS」が追加されています。Developerサイトより Activity Action: Show screen of details about a particular application. In some cases, a matching Activity may not ex…

検索キーでアプリ起動したい

やりたいこと 検索キー長押しで特定のActivityを起動したい。 デフォルトは音声検索が起動しますが、自分はあまり必要としないので、別のアプリを起動したい。 実現方法 AndroidManifest.xmlにintent-filterを記載すれば起動可能。 <intent-filter> <action android:name="android.intent.action.SEARCH_LONG_PRESS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter>