CleverPush Developer Docs

CleverPush Developer Docs

  • SDK Docs
  • API Overview
  • API Reference

›Android SDK

JavaScript SDK

  • Setup
  • Methods

iOS SDK

  • Setup
  • Methods
  • Inbox View
  • Chat
  • Stories
  • Deep Links
  • Live Activities
  • Troubleshooting
  • Changelog

Android SDK

  • Setup
  • Methods
  • Notification Service Extension
  • Inbox View
  • Chat
  • Stories
  • Deep Links
  • Troubleshooting
  • Upgrading
  • Geo Fence Location Permission
  • Changelog

Capacitor SDK

  • Setup
  • Methods
  • Changelog

Cordova SDK

  • Setup
  • Methods
  • Changelog

React Native SDK

  • Setup
  • Methods
  • Changelog

Xamarin SDK

  • Setup
  • Methods
  • Changelog

Flutter SDK

  • Setup
  • Methods
  • Chat
  • Troubleshooting
  • Changelog

Geo Fence Location Permission

For geofencing, ACCESS_BACKGROUND_LOCATION permission is needed starting from Android 10 (API level 29).

This is because geofencing is a feature that typically requires app to receive location updates even when it is not in the foreground, which qualifies as background location access.

Add ACCESS_BACKGROUND_LOCATION to your AndroidManifest.xml:

<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

You can request location permission:

Java
Kotlin
import com.cleverpush.CleverPush;

public class MainActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
CleverPush.getInstance(this).requestLocationPermission();
}
}
import com.cleverpush.CleverPush;

class MainActivity:Activity() {
fun onCreate(savedInstanceState:Bundle) {
CleverPush.getInstance(this).requestLocationPermission()
}
}

If the device's API level is 29 or above, a dialog will appear after granting location permission. Clicking the Go to Settings button will open the app's settings screen. From there, please navigate to Permissions -> Location -> Allow all the time to enable geofence functionality.

← UpgradingChangelog →
SDKs
JavaScriptiOSAndroidCordovaCapacitorReact NativeXamarinFlutter
Community
TwitterFacebookGitHub
More
API ReferenceAPI OverviewBlogImprintPrivacy PolicyTerms of serviceGDPR
Copyright © 2025 CleverPush