Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
AndroidManifest.xml
を含めないでください<intent-filter>。そうすれば、アプリケーション内のコンポーネントからのみサービスにアクセスできるようになります。Intentそれと対話するには、明示的に使用します (例: new Intent(this, MyPrivateService.class))。
<intent-filter>
Intent
new Intent(this, MyPrivateService.class)
コモンズウェアが言ったように、それは素晴らしい答えです。また、次のようにメニフェストでも行うことができます:
android:exported="false"