The document provides steps to integrate Mixpanel in your android application. Mixpanel provides efficient dashboard for mobile analytics and to send push notification and in app messages
2.
The document provides steps to integrate Android with Mixpanel integration.
The integration process requires following steps ‐
1. Instructions
2. Create New Project
3. Dashboard Setup
4. Configuration of Project
5. Android Code Setup
6. Custom Notification
7. Send Image with Push Notification
8. Further Information
BrainBox Network. Copyright@2015. All rights reserved
3.
INSTRUCTIONS
➔ Please Follow these instructions:
➔ Create Google Account
➔ Open below given Url:
https://console.developers.google.com
➔ Click on “Select Project” dropdown.
BrainBox Network. Copyright@2015. All rights reserved
4.
CREATE NEW PROJECT
➔ Give name of new project in the “Project” field.
➔ Click on “Enable and Manage API” button.
➔ Enable these services by “Google Cloud Messaging”
➔ Click on “Credentials tag” (In the left side or below of overview)
➔ Click on “Create Credentials”
➔ Select “API key”
➔ Then select android key
➔ Select “+Add Package name and fingerprint”
➔ Enter your “Package name”
➔ Enter your “SHA‐1 Key”
1. Open CMD from your system Java bin directory
For Ex:“C:Program Files (x86)Javajdk1.6.0bin”
2. Run following command in CMD
3. Keytool ‐list ‐v ‐keystore
"C:UsersAdmin.androiddebug.keystore"(Mention your system path
till “debug.keystore” file)
4. ‐alias androiddebugkey ‐storepass android ‐keypass android
5. Hence SHA‐1 KEY will shown in output
6. After fill all information Select Create & Save android key in somewhere.
BrainBox Network. Copyright@2015. All rights reserved
5.
➔ Again Click on “Create Credentials”
➔ Select “API key”
➔ Then select Server key
➔ Then click Create Button
BrainBox Network. Copyright@2015. All rights reserved
6.
➔ Open below link on browser
https://developers.google.com/mobile/add
➔ Pick a platform (Android / IOS)
➔ Select your App name
➔ Write your “Package name” in android package name box
➔ Select “CONTINUE TO Choose and configure service”
➔ Adding services which you wants
➔ For push notification enable cloud messaging
➔ Select continue to generate configuration files
BrainBox Network. Copyright@2015. All rights reserved
7.
➔ Click on “Download google‐services.json”
➔ After downloading, copy the google‐services.json to the app/ or mobile/module directory in
your Android project
BrainBox Network. Copyright@2015. All rights reserved
9.
CONFIGURATION OF PROJECT
➔ Click on Settings Icon, showing in the left bottom corner.
➔ Save Project Token, for use it further
BrainBox Network. Copyright@2015. All rights reserved
10.
➔ Click on Notifications Icon
➔ Paste your Android GCM Service key
➔ Click on “Save Changes”
➔ Now click on “Close”
BrainBox Network. Copyright@2015. All rights reserved
11.
ANDROID CODE SETUP
➔ Add dependencies to App/build.gradle:
Compile 'com.google.android.gms:play‐services:8.4.0'
Compile 'com.mixpanel.android:mixpanel‐android:4.8.0'
BrainBox Network. Copyright@2015. All rights reserved
21.
}
SEND IMAGE WITH PUSH NOTIFICATION FROM MIXPANEL
DASHBOARD
➔ Create Push Notification in Mixpanel
➔ Set Audience
➔ Set your Push Notification
➔ Set Custom data (Extra data)
➔ For Image send Image_key
For Eg: Image_key ‐> “12345”) and
Image_url ‐> “http://tineye.com/images/widgets/mona.jpg”
➔ In Custom data ‐> In Json form‐>Send
BrainBox Network. Copyright@2015. All rights reserved
23.
Thank You So Very Much
For queries please write on ashish@mobifly.in
Developed By
Mohit Saini
Android Developer ‐ Mobifly
mobifly.in
BrainBox Network. Copyright@2015. All rights reserved