title: Open link from notification sent from parse.com
body: <p>I have app which is connected with parse.com. I need to send a notification(message + url) and open it in my webview app. I use broadcast receiver to receive notification.
  My current version opens main page which is declared in MainActivity, but i want to open link sent in notification. </p>
  
  <p>This is my code:</p>
  
  <p>JSON:
  {
    "alert": "Nowy post!",
    "action": "<a href="http://google.com" rel="nofollow">http://google.com</a>"
  }</p>
  
  <p>part from MANIFEST:</p>
  
  <p>
              
                  
              
  </p>
  
  <p>public class MyCustomReceiver extends BroadcastReceiver {</p>
  
  <pre><code>@Override
  public void onReceive(Context context, Intent intent) {
  
  
      try {
            String action = intent.getAction();
            String channel = intent.getExtras().getString("com.parse.Channel");
            JSONObject json = new JSONObject(intent.getExtras().getString("com.parse.Data"));
  
            String url = json.getString("action");
            Intent i = new Intent(Intent.ACTION_VIEW);
            i.setData(Uri.parse(url));
            context.getApplicationContext().startActivity(i);
  
          } catch (JSONException e) {
            Log.d(TAG, "JSONException: " + e.getMessage());
          }
  
  }
  </code></pre>
  
  <p>}</p>