sharing zip file via Display.share

24 views
Skip to first unread message

workmob...@gmail.com

unread,
Apr 17, 2018, 12:17:55 PM4/17/18
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA  eclipse
Desktop OS
Simulator
Device iOS

I ma trying to share the zip file through share method of Display as below
if(Display.getInstance().isNativeShareSupported()) {
String out= FileSystemStorage.getInstance().getAppHomePath() + test +".zip";
Display.getInstance().share(out, FileSystemStorage.getInstance().getAppHomePath() + out, "application/zip");

}


by above code, the text file is sharing with the link but I want to share test.zip file. How to achieve this?  I have been trying from many days but still getting same thing.

Thanks for help

Shai Almog

unread,
Apr 18, 2018, 1:15:31 AM4/18/18
to CodenameOne Discussions
On which OS are you trying?
What are you seeing in the UI?
What are you seeing in the device console?

Workmobile Esay

unread,
Apr 18, 2018, 4:23:49 AM4/18/18
to codenameone...@googlegroups.com
Hi, 
I am trying this on iOS 11.2.6 in iPhone 7. I am trying to share though mail which dont give me file but its just path written as file:///var/mobile....../test.zip

But what I actually need is the test.zip folder to be shared.

Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/JoTctpSbegM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/767168c5-02a0-4308-ae42-ffe021d96037%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shai Almog

unread,
Apr 19, 2018, 12:38:13 AM4/19/18
to CodenameOne Discussions
Hi,
if you want email why aren't you using sendMessage? It will launch the OS native email software with the attachments.

Workmobile Esay

unread,
Apr 19, 2018, 3:48:02 AM4/19/18
to codenameone...@googlegroups.com
Hi
I did that and it works perfectly fine with email. I just wanted to use this method to share on different platform, so user can share on their chosen platform. But I am not able to do that. 

For sending attachment as email I used sent message and it works perfectly fine.

So, if u have any idea how i can achieve with share it will be helpful.

Thanks

On 19 April 2018 at 05:38, Shai Almog <shai....@gmail.com> wrote:
Hi,
if you want email why aren't you using sendMessage? It will launch the OS native email software with the attachments.

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/JoTctpSbegM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.

Shai Almog

unread,
Apr 20, 2018, 12:14:15 AM4/20/18
to CodenameOne Discussions
Hi,
I think email is a special case. I think share should work for things like dropbox etc.
Reply all
Reply to author
Forward
0 new messages