Test Push¶
Sending test pushes is the final step in getting set up with Flurry Push:
Upload your credentials in Flurry Admin > Apps
Send yourself a test push to verify your set up
Once you’ve integrated the latest Flurry SDK and uploaded your credentials, it’s time to send yourself a test push.
To send a test push, visit the Marketing tab. Select the app you want to test and then click the “+Create Push Campaign” button. Follow the steps to set up the campaign until you get to the final step labeled “Review your campaign.”
On the right-side of the page, the live preview of your Push campaign shows an approximation of the push as it would appear upon receipt on a user’s device.
On Android, you have the option to send a test push to either
the device Advertising ID or
the device Push token
On iOS, you may send to either
the IDFA,
the IDFV or
the device Push token
If the Send button is grayed out, it will become active as soon as you cut and paste the ID.
Note
If the send button does not become active, that indicates that you haven’t yet uploaded your push credentials. In order to send push notifications through Flurry Push, including test pushes, you must first upload your credentials in Admin > Apps.
If there is a green success message, great! Look for the test push notification on the device you selected. When your push arrives, review the display and click on it to open to confirm this works correctly. If you included a deep link, make sure the deep link is opened when you click on the notification. (If you have deep link errors, please review the Flurry onboarding documentation to verify your deep link implementation conforms to Flurry’s guidance.)
If there is an error message, look for the error key in the red error message. Then use the test push troubleshooting documentation to diagnose and fix the issue.
Device IDs - iOS¶
On iOS, you can send to either the “IDFA/IDFV” or Push Token. Note that the IDFA and IDFV are interchangeable for test push purposes. You can enter either and we’ll send to the push token associated with the ID if we have it.
IDFA¶
Getting the IDFA is straightforward on most iPhones. Go to your phone’s Settings, then look for an option called Privacy. Next click on Advertising. Here you should be able to find the ID For Advertisers (IDFA).
You can also use the following code to get the IDFA.
Another option is to find an app from the iPhone app store which can provide the IDFA for your phone.
IDFV¶
Connect the iPhone to a computer.
Check Console logs for iOS devices using Xcode. (Run Xcode and navigate to Windows > Devices > “Your iOS device”. )
Click the triangle in the bottom left hand corner of the device window in Xcode to show console logs.
Open the app.
Search for the ids.idfv parameter in the console log.
Push Token¶
On iOS, you can use the following to get the device token:
You may also use Xcode as follows:
Open Xcode’s “Devices” (Windows > Devices > “Your iOS device”)
Highlight your device name on the left, and go to the Console tab.
Open the app you wish to retrieve the Device Token for
Look for “handleReceivedPublicToken” or “Device token updated to” followed by an alphanumeric string
Device IDs - Android¶
On Android, you can send to either the “Advertising ID” or Push Token.
Advertising ID¶
Retrieving the Advertising ID from an Android phone will vary by device and Android version. To get the Advertising ID from a Pixel phone, follow these steps:
Go to Settings
Tap “Google / Services & Preferences”
Click on “Ads”
Push Token¶
To get the Android push token, follow the steps provided by Firebase.
To retrieve the current token, call FirebaseInstanceId.getInstance().getToken()
.
The onTokenRefreshcallback fires whenever a new token is generated, so calling getToken in its context ensures that you are accessing a current, available registration token. Make sure you have added the service to your manifest, then call getToken in the context of onTokenRefresh, and log the value as shown:
@Override
public void onTokenRefresh() {
// Get updated InstanceID token.
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
Log.d(TAG, "Refreshed token: " + refreshedToken);
// If you want to send messages to this application instance or
// manage this apps subscriptions on the server side, send the
// Instance ID token to your app server.
sendRegistrationToServer(refreshedToken);
}
Push environment - iOS¶
On iOS, you may generate and upload a Production and/or a Development Certificate in order to authorize Flurry to send push notifications to your users. Flurry automatically sends push notifications through the proper APNs endpoint based on these rules:
- For test push:
Make sure your app bundle id matches the one on the .p12 certificate
Flurry will deliver to push tokens associated with the device ID/token you provide when sending the test push.
If you input a sandbox token for test push, Flurry will send through the sandbox APNs endpoint.
If you input a production token for test push, Flurry will send the push through the production endpoint.
If you input an IDFA/IDFV, Flurry will retrieve the push token associated with the IDFA/ODFA and send the push through the environment associated with that token.
Note the credential/environment logic for campaigns:
If you only provide a valid Production Cert, Flurry will deliver your campaigns through the APNs Production endpoint to devices which have production push tokens.
If you only provide a valid Development Cert, Flurry will deliver your campaigns through the APNs Sandbox endpoint to devices which have sandbox push tokens.
If you provide both a Development Cert and a Production Cert, Flurry will smartly deliver notifications based on the environment of the push tokens we have for the specified app.
Tip
If you successfully send a test push through test push functionality but don’t receive a message from a campaign, double check the Flurry API key of the app you are testing against the Flurry API key of the app you selected for the campaign.