This section is meant for people who have existing android native/hybrid (Cordova) apps and would like to integrate Ezetap PoS solution through a native android SDK implementation.
- Ezetap Native Android SDK
- Ezetap Cordova SDK
If you have an Deploy-able Android Native Application this API will help you integrate Ezetap Services to your App. To integrate this API, you need to have a good grasp of Android app development, building APKs etc. The Ezetap integration part involves setting up a project, importing a library and then actual coding with just a few lines of code.
- Android development environment
- Android phone that can connect to internet
- This documentation
- Ezetap app key or login credentials to Ezetap service
- Ezetap device to test
There is a sample Android App inside the sample folder of the repository. You can use this project as a reference to integrate Ezetap SDK.
- Import the project as an Android Project in Eclipse IDE.
- Clean & Build the project.
- Run the EzeNativeSampleActivity on your Smartphone.
- EzeNativeSampleActivity.java will be your point of reference for Native Android SDK integration
Note- The errors you may face while importing the project will most likely be for Android version mismatch which EclipseIDE would normally resolve itself. Changing the Android version or restarting the Eclipse can help u solve this problem
- You can find EzeAPI jar file in the releases folder of this repository, Add the jar file in libs folder of your Native Android Project.
- In the manifest file of your project add the permission WRITE_EXTERNAL_STORAGE, which looks like this-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />- In the manifest file of your Android Project add a new Activity, which looks like this-
<activity android:name="com.eze.api.EzeAPIActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />- If you intend to support Android Nougat API Level 24 & above, follow the below 2 steps -
- Add the below provider in your project's manifest file inside application tag & replace your application ID in the place of . Your app ID/package name can be found in your app's manifest file under package tag or in the applicationId tag of your gradle file.
<provider
android:name="com.ezetap.sdk.EzetapFileProvider"
android:authorities="<Your application ID>.EzetapFileProvider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
- Create a file with name provider_paths.xml in your Project > res > xml > folder and paste the below code-
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android" >
<files-path name="ezetap-download" />
<external-path name="ezetap-download" />
</paths>- IMPORTANT- If your project's targetSdkVersion is higher or equal to 23(Android 6.0 Marshmallow) please add Android support library v4 to your Android project from here. The Android support libraries are not required if your project's targetSdkVersion is lesser than 23.
- Good to go, please refer Ezetap API Portal for API usage
Note- The EzeAPIActivity has to be configured with the same attributes as given above.
If you have an Deploy-able Android Hybrid Application built on Cordova platform, this API will help you integrate Ezetap Services to your App. To integrate this API, you need to know how Cordova works & how to configure Cordova Plugin for Android. Ezetap provides a Cordova plugin which is embedded in the SDK which does all the hard work, all you need to do is to configure our plugin to your Android Cordova Project and write simple code snippet to invoke our Plugin.
- Android development environment
- Cordova development setup
- Android phone that can connect to internet
- This documentation
- Ezetap app key or login credentials to Ezetap service
- Ezetap device to test
There is a sample Android App inside the sample folder of the repository. You can use this project as a reference to integrate Ezetap SDK.
- Import the project as an Android Project in Eclipse IDE.
- Clean & Build the project.
- Run the EzeCordovaSampleActivity on your Smartphone.
- Ezehelper.js will be your point of reference for Cordova Android SDK integration.
Note- The errors you may face while importing the project will most likely be for Android version mismatch which EclipseIDE would normally resolve itself. Changing the Android version or restarting the Eclipse can help u solve this problem.
- You can find the documentation on how to create a Cordova plugin for Android here.
Note Refer Ezetap Cordova Integration.pdf for Android Nougat support changes which are highlighted in orange.