Genuin Android SDK comprises features such as brand feed, communities, and groups.
Platform | Minimum SDK Version | Language | Supported Orientations | Supported Destinations |
---|---|---|---|---|
Android | 24 | Java/Kotlin | Portrait | Mobile |
1. Add repo details in project level gradle
2. Add dependency in app level gradle
3. Add permissions to AndroidManifest.xml
Mandatory Permissions
Following permissions are optional and can be added in AndroidManifest.xml
file as per feature requirements:
4. Initialize SDK
5. Load SDK in seperate activity
6. Load SDK in your custom activity
Put below code in activity_custom.xml
file
Put below code in CustomActivity.kt
file
adjustPan
for better performance 7. Load SDK with bottom navigation and fragment
Add below code in res/navigation/mobile_navigation.xml
Add below code in your activity
8. Want to override our default loader.
We are using lottie animation for our loader. You can put your custom lottie animation loader with the name loader_mix.json
in the res/raw
folder. Make sure you use the same name as provided.
<application>
tag, set android:allowBackup="false"
Need to declare in Google play console that your app is using Advertising ID
Steps:
1. Load Carousel Embed with XML
2. Load Carousel Embed Programmatically
To implement vertical carousel, you can use setScrollDirection(CarouselScrollDirection.VERTICAL)
and other configurations will be same as above.
(setActivity(activityContext))
in which you want the embed. To auto login in the SDK, you shall pass “YOUR_SSO_TOKEN”(setSSOToken("YOUR_SSO_TOKEN"))
in order to implement Embed with SSO in your app. To configure the EmbedParams
based on your need you can pass the below values.
embedId = The Embed Id that you want to load.
uniqueId = This is an optional parameter. This uniqueId is used when we need to display same embed in multiple/same screen. We need to provide uniqueId for the same embedId in multiple/same screen.
interactionDeepLink = This is an optional parameter. You can pass a deeplink URL in this parameter. If a deeplink URL is given then all the interaction/clicks in the full screen view will redirect to the deeplink URL given. If not passed then the regular flow will work. It should be a correct URL else user will not be redirected.
isDirectDeepLinkEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true then all the interaction/clicks in the full screen view will redirect to the specific video in white labelled app associated with video and also value of this parameter “interactionDeepLink” will be ignored. If not passed then the regular flow will work.
isDirectDeepLinkEnabled
parameter, you must have white labelled your domain first and also integrated the Handling deep link part in your main app in which you want to redirect this video to. Add user specific parameters (Optional)
a. name - This is an optional string parameter. Pass this parameter for signup/login
.
b. mobile - This is an optional string parameter. Pass this parameter for signup/login
.
c. email - This is an optional string parameter. Pass this parameter for signup/login
.
d. nickname - This is an optional string parameter. If nickname is available in genuin ecosystem it will be used, else genuin will generate of its own.
e. profile_image: This is an optional string parameter. Pass the profile_image
parameter if you want to show the profile image in the SDK.
Add contextual parameters (Optional)
a. page_context - This is an optional string parameter. Pass this parameter for ‘context
’, so that feed could load based on that context.
b. lat - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the latitude and context.
c. long - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the longitude and context.
Add design configurations (Optional)
a. interTileSpacing - spacing between the carousel’s view items. It’s default value is 8dp
b. carouselInset - edge insets for carousel’s view. It’s default value is top: 8dp, left: 16dp, bottom: 0dp, right: 16dp
c. scrollDirection - direction of carousel scroll. It’s default value is CarouselScrollDirection.HORIZONTAL
d. aspectRatio - define aspect ratio of carousel’s view items. It’s default value is CarouselTileAspectRatio.RATIO_9_16
e. tileCornerRadius - cornerRadius for the carousel’s view items. It’s default value is 8dp
3. Manage carousel videos auto-play
Put below code in activity_full_embed.xml
file
Put below code in FullEmbedActivity.kt
file
We need to pass below arguments in order to cofigure FullScreenEmbed
.
embedId = The Embed Id that you want to load.
uniqueId = This is an optional parameter. This uniqueId is used when we need to display same embed in multiple/same screen. We need to provide uniqueId for the same embedId in multiple/same screen.
interactionDeepLink = This is an optional parameter. You can pass a deeplink URL in this parameter. If a deeplink URL is given then all the interaction/clicks in the full screen view will redirect to the deeplink URL given. If not passed then the regular flow will work. It should be a correct URL else user will not be redirected.
isDirectDeepLinkEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true then all the interaction/clicks in the full screen view will redirect to the specific video in white labelled app associated with video and also value of this parameter “interactionDeepLink” will be ignored. If not passed then the regular flow will work.
isDirectDeepLinkEnabled
parameter, you must have white labelled your domain first and also integrated the Handling deep link part in your main app in which you want to redirect this video to. isShowProfileEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true and also if user is logged in than Profile picture will be visible in full screen view (right side top corner). On clicking the profile picture user will see the account settings and logout options.
ssoToken: This is an optional parameter. To auto login in the SDK, you shall pass “YOUR_SSO_TOKEN” in order to implement Embed with SSO in your app.
Add user specific parameters (Optional)
a. name - This is an optional string parameter. Pass this parameter for signup/login
.
b. mobile - This is an optional string parameter. Pass this parameter for signup/login
.
c. email - This is an optional string parameter. Pass this parameter for signup/login
.
d. nickname - This is an optional string parameter. If nickname is available in genuin ecosystem it will be used, else genuin will generate of its own.
e. profile_image: This is an optional string parameter. Pass the profile_image
parameter if you want to show the profile image in the SDK.
Add contextual parameters (Optional)
a. page_context - This is an optional string parameter. Pass this parameter for ‘context
’, so that feed could load based on that context.
b. lat - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the latitude and context.
c. long - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the longitude and context.
Put below code in activity_standard_wall_embed.xml
file
Put below code in StandardWallEmbedActivity.kt
file
We need to pass below arguments in order to cofigure StandardWallEmbed
.
embedId = The Embed Id that you want to load.
uniqueId = This is an optional parameter. This uniqueId is used when we need to display same embed in multiple/same screen. We need to provide uniqueId for the same embedId in multiple/same screen.
isShowProfileEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true and also if user is logged in than Profile picture will be visible in full screen view (right side top corner). On clicking the profile picture user will see the account settings and logout options.
isDirectDeepLinkEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true then all the interaction/clicks in the full screen view will redirect to the specific video in white labelled app associated with video and also value of this parameter “interactionDeepLink” will be ignored. If not passed then the regular flow will work.
isDirectDeepLinkEnabled
parameter, you must have white labelled your domain first and also integrated the Handling deep link part in your main app in which you want to redirect this video to. isShowProfileEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true and also if user is logged in than Profile picture will be visible in full screen view (right side top corner). On clicking the profile picture user will see the account settings and logout options.
ssoToken: This is an optional parameter. To auto login in the SDK, you shall pass “YOUR_SSO_TOKEN” in order to implement Embed with SSO in your app.
Add user specific parameters (Optional)
a. name - This is an optional string parameter. Pass this parameter for signup/login
.
b. mobile - This is an optional string parameter. Pass this parameter for signup/login
.
c. email - This is an optional string parameter. Pass this parameter for signup/login
.
d. nickname - This is an optional string parameter. If nickname is available in genuin ecosystem it will be used, else genuin will generate of its own.
e. profile_image: This is an optional string parameter. Pass the profile_image
parameter if you want to show the profile image in the SDK.
Add contextual parameters (Optional)
a. page_context - This is an optional string parameter. Pass this parameter for ‘context
’, so that feed could load based on that context.
b. lat - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the latitude and context.
c. long - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the longitude and context.
To Auto Login in the SDK, You need to call below method, whenever user is log in to your application.
Below are the optional parameters you can add with the function:
Add user specific parameters (Optional)
signup/login
’.signup/login
.signup/login
.profile_image
parameter if you want to show the profile image in the SDK.If you want to handle login process as per your requirement then follow the below steps:
Whenever user logs out from your application call the below method.
Prerequisite:
Make sure you have white labelled your community by following these steps.
Follow the steps given in the below URL to integrate deeplink in your app https://developer.android.com/studio/write/app-link-indexing
assetlinks.json
file should look like belowassetlinks.json
file on the white labeled domain at https://YOUR_WHITE-LABELLED_DOMAIN/.well-known/assetlinks.json
To Handle Our Deep Link In Your App
You can call the below method immediately after receiving deeplink or you can wait until your app’s home screen is loaded.
Prerequisite:
Create an app in your firebase using these steps
Download the google-services.json
file and add it into your app.
Integrate firebase into your app by following these steps
Get firebase token and register it with Genuin SDK
Handle foreground notifications (When your app is in foreground)
GenuinSDK.willHandleForegroundNotification(data: Map<String, String>)
function will check whether GenuinSDK will handle the given notification or not when app is in foreground. Handle notifications while app is running in background or closed
GenuinSDK.willHandleNotification(intent: Intent)
function will check whether GenuinSDK will handle the given notification or not. Integrate iOS SDK in Your ecosystem.
Integrate Web SDK in your ecosystem.
Integrate React Native SDK in your ecosystem.
If you need any assistance or have any questions, feel free to email us at support@begenuin.com.
Genuin Android SDK comprises features such as brand feed, communities, and groups.
Platform | Minimum SDK Version | Language | Supported Orientations | Supported Destinations |
---|---|---|---|---|
Android | 24 | Java/Kotlin | Portrait | Mobile |
1. Add repo details in project level gradle
2. Add dependency in app level gradle
3. Add permissions to AndroidManifest.xml
Mandatory Permissions
Following permissions are optional and can be added in AndroidManifest.xml
file as per feature requirements:
4. Initialize SDK
5. Load SDK in seperate activity
6. Load SDK in your custom activity
Put below code in activity_custom.xml
file
Put below code in CustomActivity.kt
file
adjustPan
for better performance 7. Load SDK with bottom navigation and fragment
Add below code in res/navigation/mobile_navigation.xml
Add below code in your activity
8. Want to override our default loader.
We are using lottie animation for our loader. You can put your custom lottie animation loader with the name loader_mix.json
in the res/raw
folder. Make sure you use the same name as provided.
<application>
tag, set android:allowBackup="false"
Need to declare in Google play console that your app is using Advertising ID
Steps:
1. Load Carousel Embed with XML
2. Load Carousel Embed Programmatically
To implement vertical carousel, you can use setScrollDirection(CarouselScrollDirection.VERTICAL)
and other configurations will be same as above.
(setActivity(activityContext))
in which you want the embed. To auto login in the SDK, you shall pass “YOUR_SSO_TOKEN”(setSSOToken("YOUR_SSO_TOKEN"))
in order to implement Embed with SSO in your app. To configure the EmbedParams
based on your need you can pass the below values.
embedId = The Embed Id that you want to load.
uniqueId = This is an optional parameter. This uniqueId is used when we need to display same embed in multiple/same screen. We need to provide uniqueId for the same embedId in multiple/same screen.
interactionDeepLink = This is an optional parameter. You can pass a deeplink URL in this parameter. If a deeplink URL is given then all the interaction/clicks in the full screen view will redirect to the deeplink URL given. If not passed then the regular flow will work. It should be a correct URL else user will not be redirected.
isDirectDeepLinkEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true then all the interaction/clicks in the full screen view will redirect to the specific video in white labelled app associated with video and also value of this parameter “interactionDeepLink” will be ignored. If not passed then the regular flow will work.
isDirectDeepLinkEnabled
parameter, you must have white labelled your domain first and also integrated the Handling deep link part in your main app in which you want to redirect this video to. Add user specific parameters (Optional)
a. name - This is an optional string parameter. Pass this parameter for signup/login
.
b. mobile - This is an optional string parameter. Pass this parameter for signup/login
.
c. email - This is an optional string parameter. Pass this parameter for signup/login
.
d. nickname - This is an optional string parameter. If nickname is available in genuin ecosystem it will be used, else genuin will generate of its own.
e. profile_image: This is an optional string parameter. Pass the profile_image
parameter if you want to show the profile image in the SDK.
Add contextual parameters (Optional)
a. page_context - This is an optional string parameter. Pass this parameter for ‘context
’, so that feed could load based on that context.
b. lat - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the latitude and context.
c. long - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the longitude and context.
Add design configurations (Optional)
a. interTileSpacing - spacing between the carousel’s view items. It’s default value is 8dp
b. carouselInset - edge insets for carousel’s view. It’s default value is top: 8dp, left: 16dp, bottom: 0dp, right: 16dp
c. scrollDirection - direction of carousel scroll. It’s default value is CarouselScrollDirection.HORIZONTAL
d. aspectRatio - define aspect ratio of carousel’s view items. It’s default value is CarouselTileAspectRatio.RATIO_9_16
e. tileCornerRadius - cornerRadius for the carousel’s view items. It’s default value is 8dp
3. Manage carousel videos auto-play
Put below code in activity_full_embed.xml
file
Put below code in FullEmbedActivity.kt
file
We need to pass below arguments in order to cofigure FullScreenEmbed
.
embedId = The Embed Id that you want to load.
uniqueId = This is an optional parameter. This uniqueId is used when we need to display same embed in multiple/same screen. We need to provide uniqueId for the same embedId in multiple/same screen.
interactionDeepLink = This is an optional parameter. You can pass a deeplink URL in this parameter. If a deeplink URL is given then all the interaction/clicks in the full screen view will redirect to the deeplink URL given. If not passed then the regular flow will work. It should be a correct URL else user will not be redirected.
isDirectDeepLinkEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true then all the interaction/clicks in the full screen view will redirect to the specific video in white labelled app associated with video and also value of this parameter “interactionDeepLink” will be ignored. If not passed then the regular flow will work.
isDirectDeepLinkEnabled
parameter, you must have white labelled your domain first and also integrated the Handling deep link part in your main app in which you want to redirect this video to. isShowProfileEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true and also if user is logged in than Profile picture will be visible in full screen view (right side top corner). On clicking the profile picture user will see the account settings and logout options.
ssoToken: This is an optional parameter. To auto login in the SDK, you shall pass “YOUR_SSO_TOKEN” in order to implement Embed with SSO in your app.
Add user specific parameters (Optional)
a. name - This is an optional string parameter. Pass this parameter for signup/login
.
b. mobile - This is an optional string parameter. Pass this parameter for signup/login
.
c. email - This is an optional string parameter. Pass this parameter for signup/login
.
d. nickname - This is an optional string parameter. If nickname is available in genuin ecosystem it will be used, else genuin will generate of its own.
e. profile_image: This is an optional string parameter. Pass the profile_image
parameter if you want to show the profile image in the SDK.
Add contextual parameters (Optional)
a. page_context - This is an optional string parameter. Pass this parameter for ‘context
’, so that feed could load based on that context.
b. lat - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the latitude and context.
c. long - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the longitude and context.
Put below code in activity_standard_wall_embed.xml
file
Put below code in StandardWallEmbedActivity.kt
file
We need to pass below arguments in order to cofigure StandardWallEmbed
.
embedId = The Embed Id that you want to load.
uniqueId = This is an optional parameter. This uniqueId is used when we need to display same embed in multiple/same screen. We need to provide uniqueId for the same embedId in multiple/same screen.
isShowProfileEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true and also if user is logged in than Profile picture will be visible in full screen view (right side top corner). On clicking the profile picture user will see the account settings and logout options.
isDirectDeepLinkEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true then all the interaction/clicks in the full screen view will redirect to the specific video in white labelled app associated with video and also value of this parameter “interactionDeepLink” will be ignored. If not passed then the regular flow will work.
isDirectDeepLinkEnabled
parameter, you must have white labelled your domain first and also integrated the Handling deep link part in your main app in which you want to redirect this video to. isShowProfileEnabled = This is an optional boolean parameter. Default value is false. If this parameter is true and also if user is logged in than Profile picture will be visible in full screen view (right side top corner). On clicking the profile picture user will see the account settings and logout options.
ssoToken: This is an optional parameter. To auto login in the SDK, you shall pass “YOUR_SSO_TOKEN” in order to implement Embed with SSO in your app.
Add user specific parameters (Optional)
a. name - This is an optional string parameter. Pass this parameter for signup/login
.
b. mobile - This is an optional string parameter. Pass this parameter for signup/login
.
c. email - This is an optional string parameter. Pass this parameter for signup/login
.
d. nickname - This is an optional string parameter. If nickname is available in genuin ecosystem it will be used, else genuin will generate of its own.
e. profile_image: This is an optional string parameter. Pass the profile_image
parameter if you want to show the profile image in the SDK.
Add contextual parameters (Optional)
a. page_context - This is an optional string parameter. Pass this parameter for ‘context
’, so that feed could load based on that context.
b. lat - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the latitude and context.
c. long - This is an optional float parameter. Pass this parameter in geo
so that the feed could load based on the longitude and context.
To Auto Login in the SDK, You need to call below method, whenever user is log in to your application.
Below are the optional parameters you can add with the function:
Add user specific parameters (Optional)
signup/login
’.signup/login
.signup/login
.profile_image
parameter if you want to show the profile image in the SDK.If you want to handle login process as per your requirement then follow the below steps:
Whenever user logs out from your application call the below method.
Prerequisite:
Make sure you have white labelled your community by following these steps.
Follow the steps given in the below URL to integrate deeplink in your app https://developer.android.com/studio/write/app-link-indexing
assetlinks.json
file should look like belowassetlinks.json
file on the white labeled domain at https://YOUR_WHITE-LABELLED_DOMAIN/.well-known/assetlinks.json
To Handle Our Deep Link In Your App
You can call the below method immediately after receiving deeplink or you can wait until your app’s home screen is loaded.
Prerequisite:
Create an app in your firebase using these steps
Download the google-services.json
file and add it into your app.
Integrate firebase into your app by following these steps
Get firebase token and register it with Genuin SDK
Handle foreground notifications (When your app is in foreground)
GenuinSDK.willHandleForegroundNotification(data: Map<String, String>)
function will check whether GenuinSDK will handle the given notification or not when app is in foreground. Handle notifications while app is running in background or closed
GenuinSDK.willHandleNotification(intent: Intent)
function will check whether GenuinSDK will handle the given notification or not. Integrate iOS SDK in Your ecosystem.
Integrate Web SDK in your ecosystem.
Integrate React Native SDK in your ecosystem.
If you need any assistance or have any questions, feel free to email us at support@begenuin.com.