title: Android: Is it possible to use @string references in intent-filter?
body: <p>I am a beginner in Android and I have encountered the following problem.</p>
  
  <p>When I try to start a second activity from my main one like this</p>
  
  <pre><code>Intent intent = new Intent("com.myapp.secondActivity");
  intent.setAction("com.whatever");
  startActivity(intent);
  </code></pre>
  
  <p>while declaring this intent-filter in the second activity's section in AndroidManifest.xml</p>
  
  <pre><code>&lt;intent-filter&gt;
    &lt;action android:name="com.whatever"/&gt;
    &lt;category android:name="android.intent.category.DEFAULT" /&gt;
  &lt;/intent-filter&gt;
  </code></pre>
  
  <p>it works.</p>
  
  <p>However, if I try to put the string "com.whatever" in strings.xml and to use it from there, like this:</p>
  
  <pre><code>Intent intent = new Intent("com.myapp.secondActivity");
  intent.setAction(getString(R.string.secondActionIntent));
  startActivity(intent);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;intent-filter&gt;
    &lt;action android:name="@string/secondActionIntent"/&gt;
    &lt;category android:name="android.intent.category.DEFAULT" /&gt;
  &lt;/intent-filter&gt;
  </code></pre>
  
  <p>my program crashes with an exception:</p>
  
  <pre><code>android.content.ActivityNotFoundException: No Activity found to handle Intent {....}
  </code></pre>
  
  <p>Is this working as designed? Should I avoid any call to "@string" in AndroidManifest? And if yes, where can I find the documentation for it?</p>
  
  <p>The full log of the exception (the activity and Intent names are the original ones, not edited as above):</p>
  
  <pre><code>FATAL EXCEPTION: main
                                                                 Process: com.deni.dechirer, PID: 10564
                                                                 java.lang.IllegalStateException: Could not execute method for android:onClick
                                                                     at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:275)
                                                                     at android.view.View.performClick(View.java:4785)
                                                                     at android.view.View$PerformClick.run(View.java:19884)
                                                                     at android.os.Handler.handleCallback(Handler.java:739)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                     at android.os.Looper.loop(Looper.java:135)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5343)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
                                                                  Caused by: java.lang.reflect.InvocationTargetException
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                                     at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:270)
                                                                     at android.view.View.performClick(View.java:4785) 
                                                                     at android.view.View$PerformClick.run(View.java:19884) 
                                                                     at android.os.Handler.handleCallback(Handler.java:739) 
                                                                     at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                     at android.os.Looper.loop(Looper.java:135) 
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5343) 
                                                                     at java.lang.reflect.Method.invoke(Native Method) 
                                                                     at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) 
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) 
                                                                  Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.deni.dechirer.chargerPhotoBureau (has extras) }
                                                                     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1872)
                                                                     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1568)
                                                                     at android.app.Activity.startActivityForResult(Activity.java:3755)
                                                                     at android.app.Activity.startActivityForResult(Activity.java:3716)
                                                                     at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:784)
                                                                     at android.app.Activity.startActivity(Activity.java:4036)
                                                                     at android.app.Activity.startActivity(Activity.java:3998)
                                                                     at com.deni.dechirer.MainActivity.envoyerVersBureau(MainActivity.java:120)
                                                                     at com.deni.dechirer.MainActivity.prendrePhoto(MainActivity.java:100)
                                                                     at java.lang.reflect.Method.invoke(Native Method) 
                                                                     at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                     at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:270) 
                                                                     at android.view.View.performClick(View.java:4785) 
                                                                     at android.view.View$PerformClick.run(View.java:19884) 
                                                                     at android.os.Handler.handleCallback(Handler.java:739) 
                                                                     at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                     at android.os.Looper.loop(Looper.java:135) 
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5343) 
                                                                     at java.lang.reflect.Method.invoke(Native Method) 
                                                                     at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) 
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
  </code></pre>