How to Set Up the Judopay SDK with Android Studio

Download the judo Android SDK., Download and install Android Studio., Begin a new project in Android Studio., , Confirm that the ‘build.gradle’ file is in your SDK library., Create the build.gradle files., , Add dependencies to your new project...

21 Steps 2 min read Advanced

Step-by-Step Guide

  1. Step 1: Download the judo Android SDK.

    Unzip it once downloaded.

    Simply go to ‘Your apps’ in the Developer toolbar, as shown below.
  2. Step 2: Download and install Android Studio.

    For necessary files and installation instructions visit http://developer.android.com/sdk/installing/studio.html , Create an application and package name.

    Set the ‘minimum required SDK’ to Android
    4.0 ICS.

    All remaining settings can be left as default, or feel free to modify as per your preferences. ,, Open the judo Android SDK directory.

    If ‘build.gradle’ is present, skip to Step
    5.

    If it is NOT, generate it manually by following these steps:
    Download and install Android developer tools.

    The files and instructions for installation can be found here.

    Open Eclipse, one of the Android developer tools.

    Move the Judo library into Eclipse Click ‘File’ from the toolbar Click ‘Import’ Click ‘Existing Android Code Into Workspace’ Click next, choose your Judo library location from your unzipped SDK files and click ‘Finish’. , Choose ‘File’ from the toolbar.

    Click ‘Export’ Click ‘Generate Gradle build files’ Click next, choose your judo library location from your unzipped SDK files and click ‘Finish’ ,, After you have created the build.gradle files, open a new project in Android Studio and add the dependencies.

    Make a new directory in Android Studio called ‘libs’ under the root project folder. ,, For this, use Windows Explorer so as to drag the folder directly into Android Studio. ,,,,,, Open the judo SDK folder JudoExample\src\com\judopay\android\example, and copy all files except ‘StartActivity.java’ into your JudoPayExample folder, found within the Android Studio package folder. ,,, Right-click the ‘layout’ directory and paste it to JudoPayExample\res\layout. ,, For instance, we used “MainActivity.class”.

    SettingsActivity Payment Confirm Activity Receipt Confirm Activity ,, You have fully integrated the JudoPay SDK and your Android payment gateway is ready to accept mobile payments.
  3. Step 3: Begin a new project in Android Studio.

  4. Step 4: Confirm that the ‘build.gradle’ file is in your SDK library.

  5. Step 5: Create the build.gradle files.

  6. Step 6: Add dependencies to your new project.

  7. Step 7: Access the unzipped SDK files and copy the ‘JudoLibrary’ folder to your new ‘libs’ folder.

  8. Step 8: From Android Studio

  9. Step 9: open 'settings.gradle' and 'build.gradle'

  10. Step 10: found in the JudoPayExample folder.

  11. Step 11: Add the below lines of code to the dependencies on build.gradle

  12. Step 12: making sure that ‘JudoPayExample’ shows the module name used in project creation:

  13. Step 13: Plug the following line into ‘settings.gradle’: ':JudoPayExample:libs:JudoLibrary' Be sure that ‘JudoPayExample’ shows the module name used in project creation.

  14. Step 14: Integrate the judo UI.

  15. Step 15: Access the Android manifest from your package explorer and below the default tag

  16. Step 16: plug in the following

  17. Step 17: using the unique package name in place of ‘judopay’:

  18. Step 18: Copy "fragment_container.xml" from JudoAndroidSDK\JudoExample\res\layout.

  19. Step 19: Swap all instances of “StartActivity.class” with the name selected when the project was created

  20. Step 20: or to any process that needs to occur after the following activities.

  21. Step 21: Well done!

Detailed Guide

Unzip it once downloaded.

Simply go to ‘Your apps’ in the Developer toolbar, as shown below.

For necessary files and installation instructions visit http://developer.android.com/sdk/installing/studio.html , Create an application and package name.

Set the ‘minimum required SDK’ to Android
4.0 ICS.

All remaining settings can be left as default, or feel free to modify as per your preferences. ,, Open the judo Android SDK directory.

If ‘build.gradle’ is present, skip to Step
5.

If it is NOT, generate it manually by following these steps:
Download and install Android developer tools.

The files and instructions for installation can be found here.

Open Eclipse, one of the Android developer tools.

Move the Judo library into Eclipse Click ‘File’ from the toolbar Click ‘Import’ Click ‘Existing Android Code Into Workspace’ Click next, choose your Judo library location from your unzipped SDK files and click ‘Finish’. , Choose ‘File’ from the toolbar.

Click ‘Export’ Click ‘Generate Gradle build files’ Click next, choose your judo library location from your unzipped SDK files and click ‘Finish’ ,, After you have created the build.gradle files, open a new project in Android Studio and add the dependencies.

Make a new directory in Android Studio called ‘libs’ under the root project folder. ,, For this, use Windows Explorer so as to drag the folder directly into Android Studio. ,,,,,, Open the judo SDK folder JudoExample\src\com\judopay\android\example, and copy all files except ‘StartActivity.java’ into your JudoPayExample folder, found within the Android Studio package folder. ,,, Right-click the ‘layout’ directory and paste it to JudoPayExample\res\layout. ,, For instance, we used “MainActivity.class”.

SettingsActivity Payment Confirm Activity Receipt Confirm Activity ,, You have fully integrated the JudoPay SDK and your Android payment gateway is ready to accept mobile payments.

About the Author

D

Diane Howard

Committed to making home improvement accessible and understandable for everyone.

52 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: