Sample Code Snippets - Android SDK | Zoho Creator Help

Sample code snippets

Note: Zoho Creator's Mobile SDK is currently a Beta feature. We do not recommend using it for apps in the production stage.

Java

Below are the code snippets that demonstrate how to use the different methods of Zoho Creator's SDK for Android:

To fetch the sections present in a Creator app

In the below snippet, Zylker_Orders is the target Creator application's link name:
  1. try {
  2. // your code goes here

  3.      ZCApplication firstApp = appList.get(0);
  4.      List<ZCSection> sections =
  5.      ZOHOCreatorUtil.getApplicationDetails(firstApp);
  6.  } catch (ZCException e) {
  7.          e.printStackTrace();
  8.          // Handle Error
  9.  }

To fetch a form's meta information

In the below snippet, Orders is the target form's link name:
  1. try {
  2.     ... // your code goes here
  3.     ZCSection firstSection = sections.get(0);
  4.     ZCComponent firstComponent =
  5.     firstSection.getComponents().get(0);
  6.     if(firstComponent.getType().equals(ZCComponentType.FORM)){
  7.         ZCForm form = FormUtil.getForm(firstComponent);
  8.     }
  9. } catch (ZCException e) {
  10.     e.printStackTrace();
  11.     // Handle Error
  12. }

To fetch a report's meta information

In the below snippet, All_Orders is the target report's report name:
  1. try {
  2.     ... // your code goes here
  3.     ZCSection firstSection = sections.get(0);
  4.     ZCComponent firstComponent =
  5.     firstSection.getComponents().get(0);
  6.     if(firstComponent.getType().equals(ZCComponentType.REPORT)){
  7.         ZCReport report = ReportUtil.getReport(firstComponent);
  8.     }
  9. } catch (ZCException e) {
  10.     e.printStackTrace();
  11.     // Handle Error
  12. } catch (CloneNotSupportedException e) {
  13.     e.printStackTrace();
  14. }

Kotlin

To fetch the sections present in a Creator app

In the below snippet, Zylker_Orders is the target Creator application's link name:
  1. try {
  2.     ... // your code goes here
  3.     val firstApp: ZCApplication = appList.get(0)
  4.     val sections: List = ZOHOCreatorUtil.getApplicationDetails(firstApp)
  5. } catch (e: ZCException) {
  6.     e.printStackTrace()
  7.     // Handle Error
  8. }

To fetch a form's meta information

In the below snippet, Orders is the target form's link name:
  1. try {
  2.     ... // your code goes here
  3.     val firstSection: ZCSection = sections.get(0)
  4.     val firstComponent = firstSection.components.get(0)
  5.     if (firstComponent.type == ZCComponentType.FORM) {
  6.         val form: ZCForm = FormUtil.getForm(firstComponent)
  7.     }
  8. } catch (e: ZCException) {
  9.     e.printStackTrace()
  10.     // Handle Error
  11. }

To fetch a report's meta information

In the below snippet, All_Orders is the target report's report name:
  1. try {
  2.     ... // your code goes here
  3.     val firstSection: ZCSection = sections.get(0)
  4.     val firstComponent = firstSection.components[0]
  5.     if (firstComponent.type == ZCComponentType.REPORT) {
  6.         val report = ReportUtil.getReport(firstComponent, 50)
  7.     }
  8. } catch (e: ZCException) {
  9.     e.printStackTrace()
  10.     // Handle Error
  11. } catch (e: CloneNotSupportedException) {
  12.     e.printStackTrace()
  13. }

      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 Links Workflow Automation Data Collection
                              Web Forms Enterprise Begin Data Collection
                              Interactive Forms Workplace Data Collection App
                              CRM Forms Customer Service Accessible Forms
                              Digital Forms Marketing Forms for Small Business
                              HTML Forms Education Forms for Enterprise
                              Contact Forms E-commerce Forms for any business
                              Lead Generation Forms Healthcare Forms for Startups
                              Wordpress Forms Customer onboarding Order Forms for Small Business
                              No Code Forms Construction RSVP tool for holidays
                              Free Forms Travel
                              Prefill Forms Non-Profit

                              Intake Forms Legal
                              Mobile App
                              Form Designer HR
                              Mobile Forms
                              Card Forms Food Offline Forms
                              Assign Forms Photography
                              Mobile Forms Features
                              Translate Forms Real Estate Kiosk in Mobile Forms
                              Electronic Forms Banking 
                              Notification Emails for Forms Alternatives Security & Compliance
                              Holiday Forms Google Forms alternative  GDPR
                              Form to PDF Jotform alternative HIPAA Forms
                              Email Forms
                              Encrypted Forms
                              Embeddable Forms
                              Secure Forms
                              Drag & drop form builder
                              WCAG

                                      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

                                                                                                                        • Sample code snippets

                                                                                                                          Below are code snippets that demonstrate how to use the different methods of Zoho Creator's SDK for iOS: To construct the FieldAccessPath To fetch a form object To fetch the choices from a field To submit a form To set a field's value To upload a ...
                                                                                                                        • Sample iOS Application for users

                                                                                                                          We have created an application using our Mobile SDK for your better understanding of the different methods and their usage. To install the app, you need to do the following: Prerequisites Creating the Zoho Creator application Registering your app ...
                                                                                                                        • Sample iOS Application for customers

                                                                                                                          Customers refer to people or entities who are external to your organization. For example, the vendors, retailers, logistics partners and customers that your organization does business with. By design, you'll have to create a customer portal to allow ...
                                                                                                                        • Understand snippets

                                                                                                                          Snippets are components that let you add short, custom codes to your page. Conventionally, snippets are stand-alone, re-usable code pieces that can add additional functionality. Types of snippets in a page: ZML snippet HTML snippet Embed For example, ...
                                                                                                                        • Understand HTML snippets

                                                                                                                          Snippets are stand-alone, re-usable code pieces that can add additional functionality. An HTML snippet is a small portion of source code in HTML. They can be used to build different elements (like a list view, different styled buttons, text display, ...
                                                                                                                          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