1
Instrumentation m_Instrumentation = new Instrumentation();
m_Instrumentation.sendPointerSync(MotionEvent.obtain(
SystemClock.uptimeMillis()+555,
SystemClock.uptimeMillis()+600,
MotionEvent.ACTION_UP,500,1000, 0));
私はAndroid Studioを使用してTeamViewerのアナログを開発しようとしたかったのです。アプリケーションのUIが表示されている間、このコードは、正常に動作アプリがバックグラウンドにある間、私はsendPointerSyncメソッドを使用したい、それは私にメッセージを与える:署名Android Studioプロジェクトapkとして許可を使用するINJECT_EVENTS
java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
私は許可を追加、それはメッセージを表示します。
Permissions with the protection level signature or signatureOrSystem are only granted to system apps. If an app is a regular non-system app, it will never be able to use these permissions.
どのようにシステムアプリケーションとしてアプリケーションに署名できますか?