简体   繁体   English

使用codenameone从应用程序访问googledrive或icloud

[英]access googledrive or icloud from app using codenameone

I want to manually allow user to save the the data from app directly to google drive or iCloud. 我想手动允许用户将数据从应用程序直接保存到Google驱动器或iCloud。 Suppose, I have an image and when user clicks save button he need to get option to save to icloud or google drive anyone of these in the iOS device. 假设我有一个图像,当用户单击“保存”按钮时,他需要获取将这些设备中的任何一个保存到icloud或google驱动器的选项。 How can i achieve this in codenameone are there any plugin, api or library avaliable? 我该如何在codenameone中实现此功能?有没有可用的插件,API或库? As goggle provided google-api-services for android application. 由于goggle为android应用程序提供了google-api-services。 How I achieve this in iOS. 我如何在iOS中实现这一目标。 Thanks for your help. 谢谢你的帮助。

Doing this with an image should be easy. 使用图像执行此操作应该很容易。 Just use the share feature in Codename One: 只需使用Codename One中的共享功能即可:

// will return false on the simulator but work in iOS/Android
if(Display.getInstance().isNativeShareSupported()) {
     Display.getInstance().share("", fileSystemPathToImage, imageMimeType);
}

Suggestions of where to save should be based on the things available in your device eg Facebook, iCloud, Drive, Dropbox etc. 关于保存位置的建议应基于设备中可用的内容,例如Facebook,iCloud,云端硬盘,Dropbox等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM