---
updatedAt: 2025-11-12T18:02:49.000Z
agentTools:
  projectIndex: https://developer.blueshift.com/llms.txt
---

# FAQ & troubleshooting for Android SDK

FAQ and troubleshooting guide for integration, messaging, event tracking, and debugging.

This page answers common questions about integrating and using the Blueshift Android SDK.

## Setup and initialization

### Where do I add the SDK initialization code?

Add SDK initialization in your `Application` class's `onCreate()` method. See <Anchor label="SDK setup" target="_blank" href="https://developer.blueshift.com/docs/set-up-blueshift-android-sdk#/">SDK setup</Anchor> for complete instructions.

### What permissions does the SDK require?

Required permissions:

* `INTERNET` - For API communication
* `ACCESS_NETWORK_STATE` - To check network availability
* `POST_NOTIFICATIONS` - For push notifications (Android 13+)

### How do I get my API key?

Sign in to the Blueshift dashboard and navigate to Account Settings → API Keys.

***

## Push notifications

### Push notifications aren't being received. What should I check?

1. Verify `google-services.json` is in your `app/` directory
2. Check if the FCM token is generated (look for "FCM Token" in Logcat)
3. Confirm notification permissions are granted (Android 13+)
4. Test with a direct FCM token send from Push Studio

See <Anchor label="Push notifications → Test" target="_blank" href="https://developer.blueshift.com/docs/push-notifications-android-sdk-1#/test-push-notifications">Push notifications → Test</Anchor> for details.

### Do I need to request notification permissions?

Yes, for Android 13 (API level 33) and above. The SDK provides `requestPushNotificationPermission()` to handle this. See [Push notifications → Request permissions](link-to-push-permissions).

### Will notifications work if the app is closed?

Yes, if FCM is appropriately configured. Push notifications are delivered by the system even when your app is not running.

***

## In-app messages

### In-app messages aren't showing. What should I check?

1. Verify the activity is registered: `registerForInAppMessages(activity)`
2. Check that the trigger event fired (look for the event in Logcat)
3. Confirm the device ID matches the test send
4. Check that the campaign is active and targeting your user

### How do I show in-app messages on specific screens only?

Call `registerForInAppMessages(activity)` only in activities where you want messages to appear. Call `unregisterForInAppMessages(activity)` when leaving those screens.

***

## Mobile inbox

### How do I check the number of unread messages in the inbox?

Use `BlueshiftInboxManager.getUnreadMessagesCount()`. See <Anchor label="Mobile inbox → Get unread count" target="_blank" href="https://developer.blueshift.com/docs/mobile-inbox-android#/get-unread-message-count">Mobile inbox → Get unread count</Anchor> for code examples.

### Inbox is empty even after sending test messages. Why?

1. Verify `isInboxEnabled = true` in your Configuration
2. Check that the device ID matches the test send
3. Confirm the message was sent with "Deliver to inbox" enabled
4. Wait a few minutes for sync to complete

***

## Universal links

### Universal links open in the browser instead of the app. Why?

This happens when Android hasn't verified domain ownership. Common causes:

1. `assetlinks.json` file is not accessible at `https://your-domain/.well-known/assetlinks.json`
2. Domain verification hasn't completed yet (try reinstalling the app)
3. Intent filter missing `android:autoVerify="true"`

See <Anchor label="Universal links → Troubleshooting" target="_blank" href="https://developer.blueshift.com/docs/blueshift-universal-links-android#/troubleshooting">Universal links → Troubleshooting</Anchor>.

### How do I test universal links locally?

Use a custom scheme for local testing:

```bash
adb shell am start -a android.intent.action.VIEW -d "yourappname://test"

```

See <Anchor label="Universal links → Test" target="_blank" href="https://developer.blueshift.com/docs/blueshift-universal-links-android#/testing-universal-links">Universal links → Test</Anchor> for complete testing steps.

***

## Event tracking

### How do I verify events are being sent?

1. Check Logcat for event logs:

```bash
adb logcat | grep "Blueshift"

```

2. Go to Blueshift dashboard → Users → Search by device ID.
3. Check the user's activity timeline

See <Anchor label="Testing SDK → Event tracking" target="_blank" href="https://developer.blueshift.com/docs/testing-the-android-sdk#/event-tracking">Testing SDK → Event tracking</Anchor>.

### Where do I find my device ID?

The device ID is logged when the app starts. Check Logcat:

```bash
adb logcat | grep "Device ID"

```

***

## Debugging

### How do I enable debug logging?

Add this to your SDK configuration:

```kotlin
BlueshiftLogger.setLogLevel(BlueshiftLogger.VERBOSE)

```

See <Anchor label="SDK setup → Enable logging" target="_blank" href="https://developer.blueshift.com/docs/verify-the-sdk-installation#/1-enable-debug-logging">SDK setup → Enable logging</Anchor>.

### How do I view SDK logs?

Use Logcat with the Blueshift tag:

```bash
adb logcat | grep "Blueshift"

```

Or use the Logcat window in Android Studio and filter by "Blueshift".

***

## Live content

### Live content returns null. Why?

A `null` response means no content is available. This happens when:

1. The slot doesn't exist in the dashboard
2. No active campaign is targeting the slot
3. The campaign is not targeting the current user
4. User identity (email/customer ID) is not set

Ensure user identity is set using `identifyUser()` before fetching live content.

***

## General troubleshooting

### The app crashes after adding the SDK. What should I check?

1. Verify all dependencies are added correctly in `build.gradle`
2. Check ProGuard rules if using code obfuscation
3. Look for error messages in Logcat
4. Ensure `Application` class is registered in `AndroidManifest.xml`

### How do I contact support?

For issues not covered here, contact <Anchor label="Blueshift Support" target="_blank" href="mailto:support@getblueshift.com">Blueshift Support</Anchor>.

***

## Reference documentation

* <Anchor label="Blueshift Help Center" target="_blank" href="https://help.blueshift.com/hc/en-us">Blueshift Help Center</Anchor>
* <Anchor label="Android Developer Documentation" target="_blank" href="https://developer.android.com/">Android Developer Documentation</Anchor>
* <Anchor label="Firebase Cloud Messaging" target="_blank" href="https://firebase.google.com/docs/cloud-messaging/android/client">Firebase Cloud Messaging</Anchor>