项目作者: groupdocs-viewer-cloud

项目描述 :
Android module to communicate with GroupDocs.Viewer REST API. View or render Word, Excel, PowerPoint, CAD, Visio, PDF, OpenDocument, email & image formats.
高级语言: Java
项目地址: git://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-android.git
创建时间: 2019-07-23T13:12:55Z
项目社区:https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-android

开源协议:MIT License

下载


GroupDocs.Viewer Cloud SDK for Android

This repository contains GroupDocs.Viewer Cloud SDK for Android source code. This SDK allows you to work with GroupDocs.Viewer Cloud REST APIs in your Android applications on Java language.

Installation

Add Internet permission in the AndroidManifest.xml. Example:

  1. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="<package name>">
  2. <uses-permission android:name="android.permission.INTERNET" ></uses-permission>
  3. ...

Add following repository and dependency to your android module’s build.gradle
after “apply plugin: ‘com.android.application’” section:

  1. repositories {
  2. maven {
  3. url "https://repository.groupdocs.cloud/repo/"
  4. }
  5. }
  6. ...
  7. dependencies {
  8. ...
  9. implementation 'com.groupdocs:groupdocs-viewer-cloud-android:25.3'
  10. }

Getting Started

Please follow the installation instruction and use the following Java code:

  1. import com.groupdocs.cloud.viewer.client.*;
  2. import com.groupdocs.cloud.viewer.model.*;
  3. import com.groupdocs.cloud.viewer.api.InfoApi;
  4. public class ApiExample {
  5. public static void getSupportedFormats() {
  6. //TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
  7. String appSid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
  8. String appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  9. Configuration configuration = new Configuration(appSid, appKey);
  10. InfoApi infoApi = new InfoApi(configuration);
  11. try {
  12. FormatsResult response = infoApi.getSupportedFileFormats();
  13. for (Format format : response.getFormats()) {
  14. System.out.println(format.getFileFormat());
  15. }
  16. } catch (ApiException e) {
  17. System.err.println("Failed to get supported file formats");
  18. e.printStackTrace();
  19. }
  20. }
  21. }

Licensing

All GroupDocs.Viewer Cloud SDKs are licensed under MIT License.

Resources

Contact Us

Your feedback is very important to us. Please feel free to contact us using our Support Forums.