title: Android smali mod: replace intent
body: <p>I'm trying to modify an existing App.  Currently this is one action of this App which when chosen will bring out the Wireless &amp; Network setting page.  I used <code>APKTOOL</code> to get the <code>smali</code> and located the code:</p>
  
  <pre><code>.line 238
  new-instance p5, Landroid/content/Intent;
  
  const-string p7, "android.settings.WIRELESS_SETTINGS"
  
  .end local p7
  invoke-direct {p5, p7}, Landroid/content/Intent;-&gt;&lt;init&gt;(Ljava/lang/String;)V
  </code></pre>
  
  <p>I'm trying to make it instead of calling the setting page it would call my own app.  Unfortunately I couldn't disassemble the whole class, but I got the following </p>
  
  <pre><code>var10_10.bitmap = WidgetItem.loadFunctionIcon((Context)var1_1, (String)var8_8, (boolean)var6_6, (boolean)var7_7);
  var10_10.pendingIntent = PendingIntent.getActivity((Context)var1_1, (int)0, (Intent)new Intent("android.settings.WIRELESS_SETTINGS"), (int)134217728);
  var11_11 = true;
  </code></pre>
  
  <p>I tried to replace the smali code from </p>
  
  <pre><code>const-string p7, "android.settings.WIRELESS_SETTINGS"
  </code></pre>
  
  <p>to</p>
  
  <pre><code>const-string p7, "com.mycompany.myapp"
  </code></pre>
  
  <p>or</p>
  
  <pre><code>const-string p7, "com.mycompany.myapp@com.mycompany.myapp.MainActivity"
  </code></pre>
  
  <p>but both did not work.  What should I put there for it to call my app?</p>