question

bloyal avatar image
bloyal asked David Marginian Deactivated commented

How to get current subscription using Clover SDK

I need to access the subscription within my app. I know that there is a function on the App class to getCurrentSubscription but I'm not sure how to create an instance of the app with the proper data. Creating a new App instance with new App() just creates an empty instance that returns a null subscription. Where can I get the data to pass into the App constructor so that the data will be populated.

Clover Android SDK
10 |2000

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

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented
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.

bloyal avatar image bloyal commented ·

When I make the getApp call with the AppsConnector I get the following exception:

java.lang.IllegalThreadStateException: service invoked on main thread

Based on the documentation you sent it seems that the call should simply return the app... is there a special way that I make that call?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ bloyal commented ·
Yes, don't make it on the main/ui thread.
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