LoginSignup
0
1

More than 1 year has passed since last update.

UnityアプリにAndroidのシステム権限を持たせる方法

Posted at

概要

Unityで作成したAndroidアプリにサイレントインストール機能やアンインストール機能をはじめとした、「システム権限がないと実行できない機能」を使いたい時があると思います。こちらの設定方法について解説します。

設定方法

AndroidManifest.xmlの先頭に以下のコードを入力してください。

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.system">

利用する端末、目的等では別途追記する項目があるかと思います。

android:sharedUserId="android.uid.system"

こちらのコードを先頭に追記するだけで、システム権限を要する処理をAndroid上で行える様になります。

以上で設定完了となります。
また、Android端末にインストールするには署名を行う必要があります。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1