0

I would like to create a charity application where if the users were to press the 'Donate' button, their browser would open up a link to a 3rd-party crowdfunding website where they would donate some amount for that project (or choose to exit the app or whatever!). How do I get to know what amount they have donated (or not!) from the browser so that this data can be used for that member's stats, etc.

Asimo96
  • 25
  • 4

1 Answers1

0

Yes it is possible. You can use webView

 Button button = (Button) findViewById(R.id.b);
 button.setOnClickListener(new View.OnClickLister()
 @overide
 public void onClick(View v) {
WebView mWebView=(WebView)_findViewById(R.id.webView);
mWebview .loadUrl("url for third party app");
        setContentView(mWebview );
});

or you can use intent

Button button = (Button) findViewById(R.id.b);
 button.setOnClickListener(new View.OnClickLister()
 @overide
 public void onClick(View v) {
WString url = "http://www.example.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
});
Zeeshan Shabbir
  • 6,704
  • 4
  • 38
  • 74