question

prashant92 avatar image
prashant92 asked Lee Tickett commented

can i show my android app popup to clover app?

when payment process successfully from POS then i want to show a popup like Do you want to get cashback for this purchase?, if he click on "Yes", I want to perform some action from my android app.

Can i show my popup in clover pos after or before payment?
Please help.
Clover Android SDKWebhooks
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lee Tickett avatar image
Lee Tickett answered Lee Tickett commented
Absolutely. Register a broadcast receiver listening for com.clover.intent.action.PAYMENT_PROCESSED then go from there.
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

prashant92 avatar image prashant92 commented ·

So,
I can show my popup while payment processed.

0 Likes 0 ·
Lee Tickett avatar image Lee Tickett prashant92 commented ·

I have only ever launched my activity full screen, but I'm fairly sure it is possible yes.

And I have a number of apps firing after payment is processed, so this bit is certainly possible.

0 Likes 0 ·
Suraj Dubey avatar image
Suraj Dubey answered Lee Tickett commented
@Lee Tickett Can you please post your code for the broadcast receiver .I am trying to get the intent but stuck. Also, this will work in emulator right ?

this is my menifest file

<receiver android:name=".NotificationReceiver">
    <intent-filter>
<action android:name="com.clover.intent.action.PAYMENT_PROCESSED">
</action>
</intent-filter>

</receiver> This is my reciver class public class NotificationReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(Intents.ACTION_PAYMENT_PROCESSED)) { String orderId = intent.getStringExtra(Intents.EXTRA_CLOVER_ORDER_ID); Toast.makeText(context,orderId,Toast.LENGTH_LONG).show(); } }
7 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lee Tickett avatar image Lee Tickett commented ·

That looks spot on. And it should work in the emulator, yes. If you attach the debugger is your onReceive() code being hit?

0 Likes 0 ·
Lee Tickett avatar image Lee Tickett commented ·

Can you confirm you have your app's targetSdkVersion set to 25 or below?

0 Likes 0 ·
Suraj Dubey avatar image Suraj Dubey commented ·

let me check

0 Likes 0 ·
Suraj Dubey avatar image Suraj Dubey commented ·

Hey It worked... thanks man...but if it goes above 25 ..then how to implement that..Any solution...

0 Likes 0 ·
Lee Tickett avatar image Lee Tickett Suraj Dubey commented ·

You should have no need to go above 25. That is suitable for all existing Clover devices including the new Station and Mini.

0 Likes 0 ·
Suraj Dubey avatar image Suraj Dubey commented ·

Thanks @Lee Tickett.Now I haveclover mini device with me..How i can run my app in this device..Can i run directly as i do with mobile device..But here i dont have such port for this..Can u please suggest ..

0 Likes 0 ·
Lee Tickett avatar image Lee Tickett Suraj Dubey commented ·

could you accept the answer for this question and post a new question. maybe elaborate a little too, as i don't quite follow...

0 Likes 0 ·
Suraj Dubey avatar image
Suraj Dubey answered
@Lee Tickett
Please check this link..See the last comment. Please update soon
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Suraj Dubey avatar image
Suraj Dubey answered
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Suraj Dubey avatar image
Suraj Dubey answered
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Suraj Dubey avatar image
Suraj Dubey answered Lee Tickett commented
@Jeffrey Blattman Can you please also help me on this. I tries this example https://github.com/clover/android-examples/tree/master/pushnotificationexample
but not working.
I am using emulator Mini clover without google api and target sdk is 27 and compiled is 27 and min sdk is 17
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lee Tickett avatar image Lee Tickett commented ·

That is quite likely your problem. Make sure you set your targetSdkVersion to 25. Then give it another try.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community