5.1. CloudServices¶
Provides the function of SMCS service
Method
Name
Contents
It displays a view of the Star Micronics Cloud registration.
Checks whether the application is registered with the Star Micronics Cloud.
5.1.1. showRegistrationView¶
It displays a view of the Star Micronics Cloud registration.
Declaration
public synchronized static void showRegistrationView(FragmentManager fragmentManager, DialogInterface.OnDismissListener listener);
Parameter
Name Contents Type fragmentManager Fragment manager android.support.v4.app.FragmentManager listener Listener object android.content.DialogInterface.OnDismissListener Return value
None
Examples
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { super.onItemClick(parent, view, position, id); ... CloudServices.showRegistrationView(getChildFragmentManager(), new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { ... } }); ... }
Refer to AllReceiptsFragment.java.
5.1.2. isRegistered¶
Checks whether the application is registered with the Star Micronics Cloud.
Declaration
public synchronized static boolean isRegistered(Context context);
Parameter
Name Contents Type context context android.context.Contex Return value
Contents Type Resulttrue … Registeredfalse … Unregisteredboolean
Examples
private void updateList() { ... boolean isRegistered = CloudServices.isRegistered(getContext()); ... if (isRegistered) { ... } else { ... } ... }
Refer to AllReceiptsFragment.java.