isAvailable()

Use this function to determine whether AppReviewService functionality is available.

Syntax 

1import { getAppReviewService } from 'lightning/mobileCapabilities';
2isAvailable(): Boolean

Parameters 

None

Returns 

Returns true when used on a supported device and false otherwise.

Usage 

Use this function to disable or hide app review-related features on platforms where app review services aren’t supported. For example:

1handleBeginClick(event) {
2  const myAppReviewService = getAppReviewService();
3  if(myAppReviewService.isAvailable()) {
4    // Perform app review related operations
5  }
6  else {
7    // AppReviewService not available
8    // Handle with message, error, beep, and so on
9  }
10}

See Also

Release Preview

This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.