Comments (6)
I just tested this. You are right, If I choose Paypal and then the Browser, a 404 page is shown. I am using the official links from PayPal's developer documentation, so not sure how to fix this. If anyone has an idea I am open for pull requests!
from donations.
String paypalLink = "";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(paypalLink));
intent.addCategory(Intent.CATEGORY_BROWSABLE);
// get default browser
Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse("http://"));
ResolveInfo resolveInfo = getPackageManager().resolveActivity(browser, PackageManager.MATCH_DEFAULT_ONLY);
if (resolveInfo != null) {
// set package to browser
intent.setPackage(resolveInfo.activityInfo.packageName);
}
startActivity(intent);
from donations.
I now force the intent chooser in d743327
from donations.
from donations.
I used to have a paypal option in my apps, reading the google support information they say that web cannot open a Paypal link a WebBrowser requesting for donations because can be used for tricking user to donate an amount they don't agree with. So, after some days trying I figured a way around.
Easy instead of launching Paypal Fragment to manage Paypal just command your app to open the phone default WebBrowser in your paypal.me link. I'll leave an example below.
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://paypal.me/juanjshb"));
startActivity(browserIntent);
Hope it help. It works for me
from donations.
Yes that's exactly how I'm doing:
String url = getActivity().getString(R.string.paypal_me_link);
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
Thanks :)
from donations.
Related Issues (20)
- .jar file HOT 1
- Add better Bitcoin support using Bitcoin Wallet API HOT 2
- Attempt to read from field 'java.lang.String org.sufficientlysecure.donations.google.util.Purchase.mItemType' on a null object reference HOT 2
- unmanaged vs managed in-app product HOT 3
- Genymotion emulator: NullPointerException on run HOT 1
- IllegalStateException on Google Play billing when started twice HOT 9
- How is it going? HOT 1
- Google Play Warning
- Translations
- force close/ reopen app HOT 1
- Multiple clicks on donate button cause crash HOT 1
- Strip the exclamation mark from buttons
- IABHelper not setup HOT 2
- Illegal state exception HOT 3
- String resource donations__description not breaking correctly
- Can we use this library and upload the app to playstore? HOT 1
- Outdated support library & targetSdk HOT 3
- Paypal fix or way around
- Not supported by Google anymore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from donations.