Set the demo's client ID inside of demo locals
If you plan to make commits, be sure to ignore the file after you pull so you don't accidentally commit a client ID.
To prevent commits of sensitive data, tell git to ignore future changes to some files, including:
Run ./scripts/ignore-files.sh -y
, which will tell git to ignore the files above.
To see how to stop ignoring files or to list ignored files, see ignore-files.sh
Add environment variables to your shell config file (~/.zshrc
, ~/.bashrc
, so on)
export UPSTREAM_ANDROID_STAGE_URL=""
export UPSTREAM_ANDROID_STAGE_VPN_URL=""
export UPSTREAM_ANDROID_LOCAL_URL=""
There is one activity that can be run for PayPalMessages:
- XmlActivity
- Uses traditional XML Layouts
To run the activity:
- Open your run configurations
- If you don't have any run configurations, create one
- Under the General tab of the configuration, modify Launch Options
- Set Launch to Specified Activity
- Set Activity to the above activity
- com.paypal.messages demo.XmlActivity
For ease of debugging, it is suggested to set Logcat to clear and show automatically.
To set that up:
- Open your run configurations
- Select the run configuration to modify
- Under the Miscellaneous tab of the configuration, modify Logcat
- Check Show logcat automatically
- Check Clear log before launch
If you get the below error during your build attempt, please follow these instructions to fix it.
ERROR: JAVA_HOME is set to an invalid directory:
- Click File and then Project Structure
- Click Gradle Settings
- In Gradle Settings, note the file path to the Gradle JDK
- Open your shell's Run Commands file (
.zshrc
,.bashrc
, etc) - Add a line to export
JAVA_HOME
and set its value to the path from step 3
export JAVA_HOME='/Applications/Android Studio.app/Contents/jbr/Contents/Home'
Or if it matches this path, you can run this command to add it your .zshrc
echo 'export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"' >> ~/.zshrc
This what a modal URL should look like.
https://www.paypal.com/credit-presentment/lander/modal?client_id=CLIENT_ID&integration_type=NATIVE_ANDROID&features=native-modal