question

shortkut-dev avatar image
shortkut-dev asked Jeffrey Blattman commented

How to rename a tender and delete the tender for merchant when Merchant Uninstalls the app?

We are building an app would like help on the following two things.

  1. We want to change the name of the tender we have already created, how do we do that?

  2. How can we delete the tender when the merchant uninstall the app?

thanks

2 comments
10 |2000 characters needed characters left characters exceeded

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

We had a similar issue and as far as we could find out - this is not possible. Hopefully soon

0 Likes 0 ·

Why are so many unanswered questions closed? Can you at least comment a reason why you are closing and refusing to answer these?

0 Likes 0 ·

1 Answer

· Write an Answer
Jeffrey Blattman avatar image
Jeffrey Blattman answered Jeffrey Blattman commented
Here's something you can try... we recently add an uninstall hook where you can run some code when your app is uninstalled. The documentation does not appear to be in the released SDK but here it is:

/**
 * An intent service intent that indicates the target app will be uninstalled in the
 * next 5 seconds. After 5 seconds any processes associated with the app are killed and the app is
 * uninstalled. The service started by this intent must be an intent service.
 * <p/>
 * Apps can use this time to perform any required cleanup actions. For example, remove any
 * inventory items your app created that do not make sense without your app
 * or order types created that are specific to your app. This intent should not trigger
 * anything that is visible to or require any interaction with the user. Preferably
 * all work is completed synchronously within the bounds of the
 * {@link android.app.IntentService}'s
 * {@link android.app.IntentService#onHandleIntent(Intent)} method.
 * <p/>
 * Note that this is a service intent, not a broadcast intent. It must be
 * received by an (intent) service, not a broadcast receiver.
 * <pre>
 * {@code
 * <service
 *     android:name=".MyCleanupService"
 *     android:exported="true">
 *   <intent-filter>
 *     <action android:name="com.clover.intent.action._APP_PRE_UNINSTALL"/>
 *   </intent-filter>
 * </service>
 * }
 * </pre>
 */
public static final String ACTION_APP_PRE_UNINSTALL = "com.clover.intent.action.APP_PRE_UNINSTALL";
So you could add this, and then use TenderConnector.deleteTender() from your cleanup service.

2 comments
10 |2000 characters needed characters left characters exceeded

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

Hi Jeffrey, thank you for your reply. Unfortunately, TenderConnector.deleteTender() does not work from the SDK if the Tender was not made to be "editable", and v1 Tenders cannot be updated to be made "editable".

So this currently does not work using either the SDK or API that I've seen.

https://community.clover.com/questions/214/cannot-delete-a-tender.html
0 Likes 0 ·

If you haven't been contacted, can you email appmarketbusiness@clover.com? I passed on your predicament.

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