# setUserConsent

Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/wwan_premium_set_user_consent.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/wwan_premium_set_user_consent.html)

Indicates if the application has obtained end user consent about crowdsourcing,
        which is a mandatory requirement to be able to use the network positioning APIs.

                setUserConsent()Copy to clipboard

## Parameters

| **Parameter** | **API type** | **Data type** | **Description** |
| --- | --- | --- | --- |
| consentAccepted | Java | boolean | Indicates whether user consent is accepted or<br>                                    rejected. |
| consentAccepted | Native | bool | Indicates whether user consent is accepted or<br>                                    rejected. |
| ret | Native | wwan\_premium\_LocationStatus& | On success this is the actual return value from the API.<br><br><br>                                <br>See [LocationStatus](https://docs.qualcomm.com/doc/80-PK177-134/topic/wwan_premium_location_status.html). |
|  |  |  |  |

## Returns

| Return | API type | Data type | Description |
| --- | --- | --- | --- |
| response | Java | LocationStatus | [LocationStatus](https://docs.qualcomm.com/doc/80-PK177-134/topic/wwan_premium_location_status.html) |
| response | Native | qesdk\_transaction\_status | See [QESDK transaction status for Native APIs](https://docs.qualcomm.com/doc/80-PK177-134/topic/native_qesdk_class.html) for usage details. Use qesdk\_transaction\_status to confirm API call invocation. If successful, use the `ret` value for the actual API return value object. |
|  |  |  |  |

**Parent Topic:** [WWAN premium subsystem APIs](https://docs.qualcomm.com/doc/80-PK177-134/topic/wwan_premium_subsystem_apis.html)

Last Published: Nov 14, 2024

[Previous Topic
removePassiveNetworkLocationUpdates](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/wwan_premium_remove_passive_network_location_updates.md) [Next Topic
WWAN premium subsystem callback interfaces](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/wwan_premium_subsystem_callback_interfaces.md)