PAYTM SDK Installation and Setup for Android App

PAYTM SDK Installation and Setup for Android App

Paytm Integration in Android App: https://developer.paytm.com/docs/v1/android-sdk Server side integration https://github.com/Paytm-Payments Create a developer account here: https://developer.paytm.com/ Get api key from your account (There are Test api detail and production api detail) https://dashboard.paytm.com/next/apikeys Below is for during implementation……Android 1. Dependency dependencies { compile(‘com.paytm:pgplussdk:1.2.3’) { transitive = true; } } 2. Permissions 3. Service For Staging environment: PaytmPGService service = PaytmPGService.getStagingService(); For Production environment: PaytmPGService service = PaytmPGService.getProductionService(); 4. Order Note:- before call below code you have to call api to your…

Read More Read More

In-App Purchases – Android Developers

In-App Purchases – Android Developers

Use In-app Billing with AIDL / Google Play Billing 1) Create product and configure it in Developer account. Need to create a product here Non-sunscription or subscription https://medium.com/@KarthikPonnam/inapp-purchase-subscription-android-8fff52fa4d3b 2) Download demo for inapp purchase for Android Download link: https://drive.google.com/open?id=1-sqg2dBAC7PJTESsMjP1nq9vuyE_6w8m Note:- 1) Please test in signed apk. 2) change SKU key according to configure in the developer account

Utilities

Utilities

public class Utilities { public void showToast(Context context, String message) { Toast toast = Toast.makeText(context, message, Toast.LENGTH_LONG); View toastView = toast.getView(); // This’ll return the default View of the Toast. /* And now you can get the TextView of the default View of the Toast. */ TextView toastMessage = (TextView) toastView.findViewById(android.R.id.message); toastMessage.setTextSize(25); toastMessage.setTextColor(Color.WHITE); toastMessage.setGravity(Gravity.CENTER); toastMessage.setCompoundDrawablePadding(16); toastView.setBackgroundColor(Color.CYAN); toast.show(); } public void hideSoftKeyboard(Context mContext, View view) { if (view != null) { InputMethodManager inputMethodManager = (InputMethodManager) mContext.getSystemService(INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } } /**…

Read More Read More

View- Lifecycle

View- Lifecycle

How view placed or draw in parent layout or itself. https://stackoverflow.com/questions/13856180/usage-of-forcelayout-requestlayout-and-invalidate?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

Broadcast Receiver in Android (kotlin)

Broadcast Receiver in Android (kotlin)

//desing intentfilter name var intentfilterSetList = “set_list” Define variable lateinit var brSetList: BroadcastReceiver var ifSetList: IntentFilter = IntentFilter(AppConstant.intentfilterSetList) Declare brodcast in activity brSetList = object : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { // do your stuff } } // register broadcast in activity activity.registerReceiver(brSetList, ifSetList) // send broadcast from anywhere sendBroadcast(Intent(AppConstant.intentfilterSetList))