I'm new to Clover Android development (and pretty new to Android development in general)
I'm trying to run a simple custom activity, but it keeps return the following error:
{"success":false,"result":"CANCEL","reason":"Custom activity cancelled by transition to remote-pay activity","action":"***.MainActivity"}Here's my MainActivity.java:
package ***; //import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.clover.cfp.activity.CloverCFPActivity; public class MainActivity extends CloverCFPActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } protected void onMessage(String message) { try { sendMessage(message); } catch(Exception e) { } } }And manifest:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="***"> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name="***.MainActivity" android:launchMode="singleTop" android:noHistory="true" android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <action android:name="com.clover.cfp.examples.BasicExample"/> <category android:name="com.clover.cfp.ACTIVITY"/> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
remote-pay-cloud JS call:
var request = new clover.remotepay.CustomActivityRequest() request.setAction("***.MainActivity"); request.setPayload("ggggggggg"); request.setNonBlocking(false); cloverConnector.startCustomActivity(request);