However, when I use the sale app again it just skips my intent to launch my app and takes me to the receipt options page. The broadcast is received and the intent is called but nothing happens.
This gets called: I/Timeline: Timeline: Activity_launch_request id:com.example.myapp time:49747893
but continues as it nothing was there.
If I open my app on the device and close it, and try doing a sale, it works again.
Here is some code:
my broadcast receive.
@Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); Log.d("INTENT","intent registered"); if (action.equals(Intents.ACTION_PAYMENT_PROCESSED)) { String orderId = intent.getStringExtra(Intents.EXTRA_CLOVER_ORDER_ID); String tender = intent.getStringExtra(Intents.EXTRA_CLOVER_TENDER_LABEL_KEY); String payment_uuid = intent.getStringExtra(Intents.EXTRA_CLOVER_PAYMENT_ID); Log.d("INTENT",orderId); Log.d("INTENT",tender); Log.d("INTENT",payment_uuid); Bundle b = new Bundle(); b.putString("Order_Id",orderId); b.putString("Tender",tender); b.putString("Payment_Id",payment_uuid); Intent i = new Intent(context,QuestionActivity.class); i.putExtras(b); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); context.startActivity(i); } }part of the manifest.
... <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="Rate Me" android:theme="@style/AppTheme" android:taskAffinity=""> <activity android:name="com.example.myapp.MainActivity" android:theme="@style/AppFullScreenTheme" android:taskAffinity=""> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="com.example.myapp.QuestionActivity" android:theme="@style/AppFullScreenTheme" android:taskAffinity=""> </activity>
I've tried looking up other android related issues and I've tried lots of solutions but nothing has worked.
Any help would be appreciated.