ActivityNotFoundException invoking an inner-class activity
<p>I have a non-Activity class (let's call it "NonActivity") that needs to post a message and get user feedback.   I have a message activity (MsgActivity) class to do this.    But only Activity classes can call <em>startActivityForResult()</em> so I made an inner helper class in NoActivity:</p>

<pre><code>  // just to provide an Activity to launch MsgActivity
  class ActivityMsgClass extends Activity  {

        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);

            Intent iMA = new Intent(this, MsgActivity.class);
            iMA.putExtra("MsgText", mParams[0]);
       ...blah blah ...
            iMA.putExtra("ButtonCode", iBtns);
            startActivityForResult(iMA,3);          
        }     
  }
</code></pre>

<p>My Activity class is declared in the Manifest thusly:  </p>

<pre><code>&lt;activity android:name="ActivityMsgClass"
          android:configChanges="orientation"
          android:screenOrientation="portrait"
          android:launchMode="singleInstance"&gt;&lt;/activity&gt;
</code></pre>

<p>But when I try to invoke it . . . </p>

<pre><code>                Intent i = new Intent(ctx, ActivityMsgClass.class);
                i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                ctx.startActivity(i);
</code></pre>

<p>... I get an ActivityNotFound exception.  I've also tried it without the FLAG_ACTIVITY_NEW_TASK, and I've also tried qualifying the name in the manifest, e.g., </p>

<pre><code>&lt;activity android:name=".NoActivity.ActivityMsgClass"
</code></pre>

<p>. . . to no avail.   What am I doing wrong?</p>

<p>Thanks in advance.</p>
