Initialization of Android Full Stack SDK

Initialization of Android Full Stack SDK

After installing the PageSense Android Full Stack SDK, the next step is to initialize it with your project configuration. Initialization connects your app to PageSense and loads the Full Stack project settings required to run experiments.

In Android, this initialization is performed asynchronously. Once initialization is complete, you will receive a PageSenseClient instance that is used for all experiment-related operations.

What this allows you to do  

After successful initialization:

  • Your app fetches the latest Full Stack project settings from PageSense

  • Experiments, variations, and audience rules become available

  • The SDK is ready to activate experiments and track goals

  • Your app stays aligned with the configuration defined in PageSense

Details required for initialization  

To initialize the SDK, you need the following details from your PageSense account:

  • Account ID – Your PageSense account identifier (including the hosted region)

  • SDK Key – The SDK key generated for the selected environment

  • Project Name – The name of the project in PageSense

These values are available in the Environment settings of your Full Stack project.

Initializing the SDK  

Use the PageSenseClientBuilder to create and initialize the SDK client. The initialization process retrieves project settings from PageSense and returns the initialized PageSenseClient through a callback.


JAVA

  1. import com.zoho.pagesense.android.abtesting.PageSenseClient;
  2. import com.zoho.pagesense.android.abtesting.PageSenseClientBuilder;
  3. import com.zoho.pagesense.android.network.ProjectSettingsCallBack;PageSenseClientBuilder.createNewPageSenseClient(
  4. sdkAccountIdForDC,
  5. sdkKey,
  6. projectName,
  7. new ProjectSettingsCallBack() {
  8. @Override
  9. public void onFailure(@NotNull String message, @Nullable Integer code)
  10. {
  11. // TODO: Handle failure (log the error, retry, etc.)
  12. }
  13. @Override
  14. public void onSuccess(PageSenseClient client) {
  15. // You will get the initialised PageSenseClient here
  16. pageSenseClient = client;
  17. }
  18. }
  19. );
KOTLIN
  1. import com.zoho.pagesense.android.abtesting.PageSenseClient
  2. import com.zoho.pagesense.android.abtesting.PageSenseClientBuilder
  3. import com.zoho.pagesense.android.network.ProjectSettingsCallBack
  4. PageSenseClientBuilder.createNewPageSenseClient(
  5. sdkAccountIdForDC,
  6. sdkKey,
  7. projectName,
  8. object : ProjectSettingsCallBack {
  9. override fun onFailure(message: String, code: Int?) {
  10. // TODO: Handle failure (log the error, retry, etc.)
  11. }
  12. override fun onSuccess(client: PageSenseClient) {
  13. // You will get the initialised PageSenseClient here
  14. pageSenseClient = client
  15. }
  16. }
  17. )

What happens after initialization  

Once the SDK is initialized:

  • The PageSenseClient can be used to activate experiments

  • Users can be evaluated and assigned variations

  • Goal conversions can be tracked

  • SDK behavior can be customized if required

 

 

 


      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              TypeformWCAG

                                All-in-one knowledge management and training platform for your employees and customers.


                                            Create. Review. Publish.

                                            Write, edit, collaborate on, and publish documents to different content management platforms.

                                            Get Started Now




                                                              You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                  Manage your brands on social media


                                                                    • Desk Community Learning Series


                                                                    • Digest


                                                                    • Functions


                                                                    • Meetups


                                                                    • Kbase


                                                                    • Resources


                                                                    • Glossary


                                                                    • Desk Marketplace


                                                                    • MVP Corner


                                                                    • Word of the Day


                                                                    • Ask the Experts


                                                                      Zoho Sheet Resources

                                                                       

                                                                          Zoho Forms Resources


                                                                            Secure your business
                                                                            communication with Zoho Mail


                                                                            Mail on the move with
                                                                            Zoho Mail mobile application

                                                                              Stay on top of your schedule
                                                                              at all times


                                                                              Carry your calendar with you
                                                                              Anytime, anywhere




                                                                                    Zoho Sign Resources

                                                                                      Sign, Paperless!

                                                                                      Sign and send business documents on the go!

                                                                                      Get Started Now




                                                                                              Zoho TeamInbox Resources





                                                                                                        Zoho DataPrep Demo

                                                                                                        Get a personalized demo or POC

                                                                                                        REGISTER NOW


                                                                                                          Design. Discuss. Deliver.

                                                                                                          Create visually engaging stories with Zoho Show.

                                                                                                          Get Started Now








                                                                                                                              • Related Articles

                                                                                                                              • Activate Experiment

                                                                                                                                The Activate Experiment step evaluates whether a user qualifies for a Full Stack A/B test and assigns a variation accordingly. This is the point where your application decides which experience a user should see. The experiment activation logic runs ...
                                                                                                                              • Installation of Android SDK

                                                                                                                                The PageSense Android Full Stack SDK lets you run server-side A/B tests and track experiment outcomes directly from your Android application. Once installed, your app can participate in Full Stack experiments and start collecting core analytics data. ...
                                                                                                                              • SDK Customization

                                                                                                                                The PageSense Android Full Stack SDK provides customization options that allow you to control how the SDK behaves inside your application. These options help you balance freshness of experiment configuration, logging verbosity, and operational ...
                                                                                                                              • Initialization of PHP SDK

                                                                                                                                The PageSenseClient class is the main interface provided by the PageSense PHP SDK to run Full Stack A/B Testing experiments for the users. Before serving variations or tracking goals, the client must be initialized with your project’s configuration, ...
                                                                                                                              • Track Goal

                                                                                                                                The Track Goal API is used to record conversion events for a Full Stack A/B test experiment. A goal represents a meaningful action completed by a user, such as a signup, purchase, or feature usage. Goal tracking helps PageSense measure experiment ...
                                                                                                                                Wherever you are is as good as
                                                                                                                                your workplace

                                                                                                                                  Resources

                                                                                                                                  Videos

                                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                  eBooks

                                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                  Webinars

                                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                  CRM Tips

                                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                                    Zoho Show Resources