title: Preventing my activity from being called from other apps in AndroidManifest.xml
body: <p>I'm trying to prevent my app's activities from being called from other apps, by implementing the following in AndroidManifest.xml</p>
  
  <pre><code>&lt;permission
      android:protectionLevel="signature"
      android:name="com.my.app.ONLYME"/&gt;
  &lt;uses-permission android:name="com.my.app.ONLYME" /&gt;
  &lt;application ... &gt;
  &lt;activity android:name=".MyActivity"
          android:permission="com.my.app.ONLYME"
      /&gt;
  </code></pre>
  
  <p>I tried running this, and manually calling MyActivity with the following adb command:</p>
  
  <pre><code>am start -n "com.my.app/.MyActivity"
  </code></pre>
  
  <p>And it worked - MyActivity got called successfully. What am I doing wrong?</p>