Skip to main content

Requirements

Installation

Note: Currently minimum SDK version is 24 but if you want to use our SDK in version below 24, use the below code snippet in the App level manifest file.
Include the respective begenuin modules used as shown above.
Warning: If you use the above code then possible it may lead to the functionality failure in some cases.
1. Add repo details in project level gradle
2. Add dependency in app level gradle a. For core SDK
b. For UI SDK
c. For Camera SDK
d. For AI SDK
Note: All modules must use a consistent version format — 2.1.2. Dependency Hierarchy The modules follow a linear dependency structure, where each subsequent module depends on the ones before it in the chain:
Module Usage Guidelines
  1. core - Can be used independently. This is the foundational module required by all others.
  2. ui - Depends on core. Must include core when using ui.
  3. camera - Depends on both core and ui. Must include both when integrating camera.
  4. ai - Depends on camera, ui, and core. All three must be included when using ai.
Ensure you maintain the correct order and include all required dependencies when integrating any module beyond core. 3. Add permissions to AndroidManifest.xml Mandatory Permissions
Following permissions are optional and can be added in AndroidManifest.xml file as per feature requirements: a. Permissions for UI SDK
  • To allow user to add their Contacts as Members in Communities and Groups:
  • To allow user to receive Push Notifications:
b. Permissions for Camera SDK
  • To allow user to Create Video Content, Camera and Mic permissions are needed:
  • To allow user to Upload Content from their gallery
c. Permissions for AI SDK
  • To allow creation of AI Powered Communities based on the User Location:
4. Initialize SDK
5. 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.
Note: In AndroidManifest.xml, in the <application> tag, set android:allowBackup="false"

Monetization

  • To enable the Monetization add the below code:
Need to declare in Google play console that your app is using Advertising IDSteps:
  • Log in to your Google Play Console.
  • Select the app you are working on.
  • Go to Policy and programs > App content.
  • Find the Advertising ID section and click on Manage.
  • Select “yes” that your app is using Advertising ID
  • After answering the questions, submit your declaration.

Embed in Kotlin

Note: Make sure you have followed the First 3 installation steps in order to implement the Carousel Embed

Embed

Refer to Carousel View in mobile.
1. Load Carousel Embed with XML
Note: Carousel Container height must be fixed or match_parent. It can not be wrap_content else carousel embed will not appear.
2. Load Carousel Embed Programmatically
Note: Carousel Container height must be fixed or match_parent. It can not be wrap_content else carousel embed will not appear.
Note: To initialise the Embed you need to add your activity context (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.
  1. embedId = The Embed Id that you want to load.
  2. 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.
  3. 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.
  4. 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.
Note: For using 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.
  1. 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.
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. tileCornerRadius - cornerRadius for the carousel’s view items. It’s default value is 8dp 3. Manage carousel videos auto-play
4. Load embed feed asynchronously: In order to load embed feeds asynchronously, instead of calling load(), use loadAsync with a callback (as shown). This callback will be triggered once the process of fetching data is complete, along with a boolean flag indicating whether the operation was successful and non-empty feed was retrieved.

Full Screen Embed

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.
  1. embedId = The Embed Id that you want to load.
  2. 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.
  3. 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.
  4. 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.
Note: For using 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.
  1. 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.
  2. 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.

Standard Wall Embed

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.
  1. embedId = The Embed Id that you want to load.
  2. 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.
  3. 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.
  4. 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.
Note: For using 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.
  1. 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.
  2. 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.

Embed in Compose

Note: Make sure you have followed the First 3 installation steps in order to implement the Carousel Embed
Refer to Carousel View in mobile.
Note: Carousel Container height must be fixed or match_parent. It can not be wrap_content else carousel embed will not appear.
Example Usage
Note: 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.
  1. embedId = The Embed Id that you want to load.
  2. 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.
  3. 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.
  4. 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.
Note: For using 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.
  1. 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.
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. tileCornerRadius - cornerRadius for the carousel’s view items. It’s default value is 8dp

Standard Wall Embed

To load standardwall the parent activity must be FragmentActivity
Example usage
We need to pass below arguments in order to cofigure StandardWallEmbed.
  1. embedId = The Embed Id that you want to load.
  2. 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.
  3. 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.
  4. 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.
Note: For using 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.
  1. 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.
  2. 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.

Placement

1. Load Placement with XML
Note: Placement Container height must be fixed or match_parent. It can not be wrap_content else placement will not appear.
2. Load Placement Programmatically
Note: Placement Container height must be fixed or match_parent. It can not be wrap_content else placement will not appear.
Note: To initialise the Placement you need to add your activity context (setActivity(activityContext)) in which you want the placement. To auto login in the SDK, you shall pass “YOUR_SSO_TOKEN”(setSSOToken("YOUR_SSO_TOKEN")) in order to implement Placement with SSO in your app.
To configure the PlacementParams based on your need you can pass the below values.
  1. placementId = The Placement Id that you want to load.
  2. styleId = The Style Id that you want to load.
  3. uniqueId = This is an optional parameter. This uniqueId is used when we need to display same placement in multiple/same screen. We need to provide uniqueId for the same placementId in multiple/same screen.
  4. 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.
  5. 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.
Note: For using 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. Inset - edge insets for placement’s view. It’s default value is top: 8dp, left: 16dp, bottom: 0dp, right: 16dp c. tileCornerRadius - cornerRadius for the carousel’s view items. It’s default value is 8dp 3. Manage carousel videos auto-play
4. Load placement feed asynchronously: In order to load placement feeds asynchronously, instead of calling load(), use loadAsync with a callback (as shown). This callback will be triggered once the process of fetching data is complete, along with a boolean flag indicating whether the operation was successful and non-empty feed was retrieved.

Handle Login : via AutoLogin Approach

To Auto Login in the SDK, You need to call below method, whenever user is log in to your application.
Note: You don’t need to call the below method if you have implemented the Embed/Placement With SSO already.

Optional Parameters

Below are the optional parameters you can add with the function:
Add user specific parameters (Optional)
  1. name - This is an optional string parameter. Pass this parameter for ‘signup/login’.
  2. mobile - This is an optional string parameter. Pass this parameter for signup/login.
  3. email - This is an optional string parameter. Pass this parameter for signup/login.
  4. 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.
  5. profile_image: This is an optional string parameter. Pass the profile_image parameter if you want to show the profile image in the SDK.

Optional Callback

Custom Login

If you want to handle login process as per your requirement then follow the below steps:

Handle Logout : via AutoLogin Approach

Whenever user logs out from your application call the below method.

Optional Callback

Note: Make sure you have followed the First 3 installation steps in order to handle the deep link.
Prerequisite:
  1. Make sure you have white labelled your community by following these steps.
  2. Follow the steps given in the below URL to integrate deeplink in your app https://developer.android.com/studio/write/app-link-indexing
Note : Here host will be your “YOUR_WHITE-LABELLED_DOMAIN”
  1. After completing deeplink setup, your assetlinks.json file should look like below
  1. Host assetlinks.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.
Note: Need to call this function everytime your app receives any deeplink. This method will handle deeplink if it is our’s otherwise it will ignore that.

Optional LinkOutInterceptor

If you want to intercept Linkout clicks, you can implement LinkOutInterceptor as below:

Handling Push Notifications

Note: Make sure you have followed the First 3 installation steps in order to handle the push notifications.
Prerequisite:
  1. Create an app in your firebase using these steps
  2. Download the google-services.json file and add it into your app.
  3. 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)
Note: 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
  • Whenever user clicks on notifications, you will get the notification payload in your launcher activity.
Note: GenuinSDK.willHandleNotification(intent: Intent) function will check whether GenuinSDK will handle the given notification or not.

What’s next?

iOS SDK

Integrate iOS SDK in Your ecosystem.

Web SDK

Integrate Web SDK in your ecosystem.

React Native SDK

Integrate React Native SDK in your ecosystem.

Support

If you need any assistance or have any questions, feel free to email us at support@begenuin.com.