Show a pdf in a Flex mobile app

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Show a pdf in a Flex mobile app

Angelo Lazzari
Hi all,
I'm developing a flex mobile app with apache flex 4.9.

Using alivePDF swc the app creates a pdf file and next step is to show that pdf in the same mobile app.

I found a lot of sites/blog that speak about stagewebview and navigatetourl...etc etc but nothing seems to work properly.

Can you suggest me a sure method to open the pdf for ios and android devices?

Thank you very much and congratulation to everyone is working on apache flex project.

Bye,
Angelo

Sent from my 
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

OmPrakash Muppirala
>
> I found a lot of sites/blog that speak about stagewebview and
> navigatetourl...etc etc but nothing seems to work properly.


Can you explain why this dint work?  StageWebview should theoretically
work.

Thanks,
Om
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Oliver Wiemer
In reply to this post by Angelo Lazzari
Hello Angelo,

i generate the pdf send it to the server and load it in a web view.
This ist the best way for me.

best regards
Olli


Am 07.02.13 20:11 schrieb "Angelo Lazzari" unter
<[hidden email]>:

>Hi all,
>I'm developing a flex mobile app with apache flex 4.9.
>
>Using alivePDF swc the app creates a pdf file and next step is to show
>that pdf in the same mobile app.
>
>I found a lot of sites/blog that speak about stagewebview and
>navigatetourl...etc etc but nothing seems to work properly.
>
>Can you suggest me a sure method to open the pdf for ios and android
>devices?
>
>Thank you very much and congratulation to everyone is working on apache
>flex project.
>
>Bye,
>Angelo
>
>Sent from my ?



Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Angelo Lazzari
In reply to this post by OmPrakash Muppirala
Hi Om,
i've created a simple Flex Mobile Project with the attached mxml.

When i run it con the AIR simulator i obtain an

Error #2044: Unhandled error:. text=PDFError

That's the way i do it? Where i'm doing wrong?

thanks,
Angelo


On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
>
> I found a lot of sites/blog that speak about stagewebview and
> navigatetourl...etc etc but nothing seems to work properly.


Can you explain why this dint work?  StageWebview should theoretically
work.

Thanks,
Om



--
Angelo Lazzari
mobile: 0039 347 0090 452
mail: [hidden email]


----------------------------
Verificate la corrispondenza del destinatario; in caso contrario vogliate notificare ciò al mittente e, consci della responsabilita'per l'uso indebito, cancellare il messaggio e sue copie / Verify the correspondence of the addressee; otherwise, notify that to the sender and, conscious of the responsibility for the undue use, destroy the message and its copies.
----------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

OmPrakash Muppirala
The attachment didnt come through.  Can you put it up somewhere else and
post the link here?

Thanks,
Om

On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <[hidden email]>wrote:

> Hi Om,
> i've created a simple Flex Mobile Project with the attached mxml.
>
> When i run it con the AIR simulator i obtain an
>
> Error #2044: Unhandled error:. text=PDFError
> That's the way i do it? Where i'm doing wrong?
>
> thanks,
> Angelo
>
>
> On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
>
>> >
>> > I found a lot of sites/blog that speak about stagewebview and
>> > navigatetourl...etc etc but nothing seems to work properly.
>>
>>
>> Can you explain why this dint work?  StageWebview should theoretically
>> work.
>>
>> Thanks,
>> Om
>>
>
>
>
> --
> Angelo Lazzari
> mobile: 0039 347 0090 452
> mail: [hidden email]
>
>
> ----------------------------
> Verificate la corrispondenza del destinatario; in caso contrario vogliate
> notificare ciò al mittente e, consci della responsabilita'per l'uso
> indebito, cancellare il messaggio e sue copie / Verify the correspondence
> of the addressee; otherwise, notify that to the sender and, conscious of
> the responsibility for the undue use, destroy the message and its copies.
> ----------------------------
>
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

OmPrakash Muppirala
For what its worth, Error #2044 usually occurs because of a an invalid
server side path

Explanation here: [1]

Are you sure you are calling the pdf with the correct url?

Thanks,
Om

[1]
http://www.judahfrangipane.com/blog/2007/01/01/error-2044-unhandled-ioerrorevent-texterror-2038-file-io-error/

On Thu, Feb 7, 2013 at 11:27 AM, Om <[hidden email]> wrote:

> The attachment didnt come through.  Can you put it up somewhere else and
> post the link here?
>
> Thanks,
> Om
>
>
> On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <[hidden email]>wrote:
>
>> Hi Om,
>> i've created a simple Flex Mobile Project with the attached mxml.
>>
>> When i run it con the AIR simulator i obtain an
>>
>> Error #2044: Unhandled error:. text=PDFError
>> That's the way i do it? Where i'm doing wrong?
>>
>> thanks,
>> Angelo
>>
>>
>> On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
>>
>>> >
>>> > I found a lot of sites/blog that speak about stagewebview and
>>> > navigatetourl...etc etc but nothing seems to work properly.
>>>
>>>
>>> Can you explain why this dint work?  StageWebview should theoretically
>>> work.
>>>
>>> Thanks,
>>> Om
>>>
>>
>>
>>
>> --
>> Angelo Lazzari
>> mobile: 0039 347 0090 452
>> mail: [hidden email]
>>
>>
>> ----------------------------
>> Verificate la corrispondenza del destinatario; in caso contrario vogliate
>> notificare ciò al mittente e, consci della responsabilita'per l'uso
>> indebito, cancellare il messaggio e sue copie / Verify the correspondence
>> of the addressee; otherwise, notify that to the sender and, conscious of
>> the responsibility for the undue use, destroy the message and its copies.
>> ----------------------------
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Angelo Lazzari
In reply to this post by OmPrakash Muppirala
I'm sorry.

here it is

http://pastelink.me/dl/41027d

Thx
Angelo


On Thu, Feb 7, 2013 at 8:27 PM, Om <[hidden email]> wrote:

> The attachment didnt come through.  Can you put it up somewhere else and
> post the link here?
>
> Thanks,
> Om
>
> On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <[hidden email]
> >wrote:
>
> > Hi Om,
> > i've created a simple Flex Mobile Project with the attached mxml.
> >
> > When i run it con the AIR simulator i obtain an
> >
> > Error #2044: Unhandled error:. text=PDFError
> > That's the way i do it? Where i'm doing wrong?
> >
> > thanks,
> > Angelo
> >
> >
> > On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
> >
> >> >
> >> > I found a lot of sites/blog that speak about stagewebview and
> >> > navigatetourl...etc etc but nothing seems to work properly.
> >>
> >>
> >> Can you explain why this dint work?  StageWebview should theoretically
> >> work.
> >>
> >> Thanks,
> >> Om
> >>
> >
> >
> >
> > --
> > Angelo Lazzari
> > mobile: 0039 347 0090 452
> > mail: [hidden email]
> >
> >
> > ----------------------------
> > Verificate la corrispondenza del destinatario; in caso contrario vogliate
> > notificare ciò al mittente e, consci della responsabilita'per l'uso
> > indebito, cancellare il messaggio e sue copie / Verify the correspondence
> > of the addressee; otherwise, notify that to the sender and, conscious of
> > the responsibility for the undue use, destroy the message and its copies.
> > ----------------------------
> >
>



--
Angelo Lazzari
mobile: 0039 347 0090 452
mail: [hidden email]


----------------------------
Verificate la corrispondenza del destinatario; in caso contrario vogliate
notificare ciò al mittente e, consci della responsabilita'per l'uso
indebito, cancellare il messaggio e sue copie / Verify the correspondence
of the addressee; otherwise, notify that to the sender and, conscious of
the responsibility for the undue use, destroy the message and its copies.
----------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Subscriptions
In reply to this post by Angelo Lazzari
Have you tried
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html#openWithDefaultApplication()


On 07/02/2013 19:11, Angelo Lazzari wrote:

> Hi all,
> I'm developing a flex mobile app with apache flex 4.9.
>
> Using alivePDF swc the app creates a pdf file and next step is to show that pdf in the same mobile app.
>
> I found a lot of sites/blog that speak about stagewebview and navigatetourl...etc etc but nothing seems to work properly.
>
> Can you suggest me a sure method to open the pdf for ios and android devices?
>
> Thank you very much and congratulation to everyone is working on apache flex project.
>
> Bye,
> Angelo
>
> Sent from my 

Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

tpokrajcic
In reply to this post by Angelo Lazzari
On iOS you can just use StageWebView to open PDF docs. Should work
without problems and there are many code examples around.

Android is more complicated because it doesn't support viewing PDF in a
browser in general. Therefore StageWebView can't open it either.
There is only one solution to open PDF from AIR app and one workaround
(actually, both are workarounds).

1) Download PDF from a remote location and store it locally. Then use
some ANE to open it in a default viewer.
There are several native extensions around that can be used for this.

2) Convert PDF to HTML and images on the server side and open it in a
StageWebView
This is more complicated solution and depends on what you can do on server.
Some people use trick with Google docs and use it for converting PDF to
HTML.
This is an example:
http://docs.google.com/viewer?url=www.education.gov.yk.ca/pdf/pdf-test.pdf
However, if you have some confidential or private docs I wouldn't
recommend using Google docs hack.

I guess it's not what you wanted to hear, but hope it will save you some
research time...
Cheers,

Tomislav

On 7.2.2013. 20:11, Angelo Lazzari wrote:

> Hi all,
> I'm developing a flex mobile app with apache flex 4.9.
>
> Using alivePDF swc the app creates a pdf file and next step is to show that pdf in the same mobile app.
>
> I found a lot of sites/blog that speak about stagewebview and navigatetourl...etc etc but nothing seems to work properly.
>
> Can you suggest me a sure method to open the pdf for ios and android devices?
>
> Thank you very much and congratulation to everyone is working on apache flex project.
>
> Bye,
> Angelo
>
> Sent from my 


Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

OmPrakash Muppirala
In reply to this post by Angelo Lazzari
It looks like you are writing the pdf to:

File.userDirectory.resolvePath("testPageAngelo.pdf");

But trying to load it from:

File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")

This might be causing the error.

Thanks,
Om

On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <[hidden email]>wrote:

> I'm sorry.
>
> here it is
>
> http://pastelink.me/dl/41027d
>
> Thx
> Angelo
>
>
> On Thu, Feb 7, 2013 at 8:27 PM, Om <[hidden email]> wrote:
>
> > The attachment didnt come through.  Can you put it up somewhere else and
> > post the link here?
> >
> > Thanks,
> > Om
> >
> > On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <
> [hidden email]
> > >wrote:
> >
> > > Hi Om,
> > > i've created a simple Flex Mobile Project with the attached mxml.
> > >
> > > When i run it con the AIR simulator i obtain an
> > >
> > > Error #2044: Unhandled error:. text=PDFError
> > > That's the way i do it? Where i'm doing wrong?
> > >
> > > thanks,
> > > Angelo
> > >
> > >
> > > On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
> > >
> > >> >
> > >> > I found a lot of sites/blog that speak about stagewebview and
> > >> > navigatetourl...etc etc but nothing seems to work properly.
> > >>
> > >>
> > >> Can you explain why this dint work?  StageWebview should theoretically
> > >> work.
> > >>
> > >> Thanks,
> > >> Om
> > >>
> > >
> > >
> > >
> > > --
> > > Angelo Lazzari
> > > mobile: 0039 347 0090 452
> > > mail: [hidden email]
> > >
> > >
> > > ----------------------------
> > > Verificate la corrispondenza del destinatario; in caso contrario
> vogliate
> > > notificare ciò al mittente e, consci della responsabilita'per l'uso
> > > indebito, cancellare il messaggio e sue copie / Verify the
> correspondence
> > > of the addressee; otherwise, notify that to the sender and, conscious
> of
> > > the responsibility for the undue use, destroy the message and its
> copies.
> > > ----------------------------
> > >
> >
>
>
>
> --
> Angelo Lazzari
> mobile: 0039 347 0090 452
> mail: [hidden email]
>
>
> ----------------------------
> Verificate la corrispondenza del destinatario; in caso contrario vogliate
> notificare ciò al mittente e, consci della responsabilita'per l'uso
> indebito, cancellare il messaggio e sue copie / Verify the correspondence
> of the addressee; otherwise, notify that to the sender and, conscious of
> the responsibility for the undue use, destroy the message and its copies.
> ----------------------------
>
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Angelo Lazzari
I tried to write/read from the same place (applicationStorageDirectory
or userDirectory) but the error that come up is nearly the same:

Error #2044: Unhandled ErrorEvent:. text=Load error.
However, i'll look up in internet tring to follow your advices!

Thanks to everyone!
Angelo

On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]> wrote:

> It looks like you are writing the pdf to:
>
> File.userDirectory.resolvePath("testPageAngelo.pdf");
>
> But trying to load it from:
>
> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
>
> This might be causing the error.
>
> Thanks,
> Om
>
> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <[hidden email]
> >wrote:
>
> > I'm sorry.
> >
> > here it is
> >
> > http://pastelink.me/dl/41027d
> >
> > Thx
> > Angelo
> >
> >
> > On Thu, Feb 7, 2013 at 8:27 PM, Om <[hidden email]> wrote:
> >
> > > The attachment didnt come through.  Can you put it up somewhere else
> and
> > > post the link here?
> > >
> > > Thanks,
> > > Om
> > >
> > > On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <
> > [hidden email]
> > > >wrote:
> > >
> > > > Hi Om,
> > > > i've created a simple Flex Mobile Project with the attached mxml.
> > > >
> > > > When i run it con the AIR simulator i obtain an
> > > >
> > > > Error #2044: Unhandled error:. text=PDFError
> > > > That's the way i do it? Where i'm doing wrong?
> > > >
> > > > thanks,
> > > > Angelo
> > > >
> > > >
> > > > On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
> > > >
> > > >> >
> > > >> > I found a lot of sites/blog that speak about stagewebview and
> > > >> > navigatetourl...etc etc but nothing seems to work properly.
> > > >>
> > > >>
> > > >> Can you explain why this dint work?  StageWebview should
> theoretically
> > > >> work.
> > > >>
> > > >> Thanks,
> > > >> Om
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Angelo Lazzari
> > > > mobile: 0039 347 0090 452
> > > > mail: [hidden email]
> > > >
> > > >
> > > > ----------------------------
> > > > Verificate la corrispondenza del destinatario; in caso contrario
> > vogliate
> > > > notificare ciò al mittente e, consci della responsabilita'per l'uso
> > > > indebito, cancellare il messaggio e sue copie / Verify the
> > correspondence
> > > > of the addressee; otherwise, notify that to the sender and, conscious
> > of
> > > > the responsibility for the undue use, destroy the message and its
> > copies.
> > > > ----------------------------
> > > >
> > >
> >
> >
> >
> > --
> > Angelo Lazzari
> > mobile: 0039 347 0090 452
> > mail: [hidden email]
> >
> >
> > ----------------------------
> > Verificate la corrispondenza del destinatario; in caso contrario vogliate
> > notificare ciò al mittente e, consci della responsabilita'per l'uso
> > indebito, cancellare il messaggio e sue copie / Verify the correspondence
> > of the addressee; otherwise, notify that to the sender and, conscious of
> > the responsibility for the undue use, destroy the message and its copies.
> > ----------------------------
> >
>



--
Angelo Lazzari
mobile: 0039 347 0090 452
mail: [hidden email]


----------------------------
Verificate la corrispondenza del destinatario; in caso contrario vogliate
notificare ciò al mittente e, consci della responsabilita'per l'uso
indebito, cancellare il messaggio e sue copie / Verify the correspondence
of the addressee; otherwise, notify that to the sender and, conscious of
the responsibility for the undue use, destroy the message and its copies.
----------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Jonathan Campos
As stated previously, on iOS the PDF will show in a stagewebview.

On Android this doesn't work.... but I have an ANE that will do what you
need:
https://github.com/jonbcampos/unitedmindset-ane-repo

My logic for apps has been:
if !support > goto stagewebview and display
if supported > open with ane

enjoy


On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <[hidden email]>wrote:

> I tried to write/read from the same place (applicationStorageDirectory
> or userDirectory) but the error that come up is nearly the same:
>
> Error #2044: Unhandled ErrorEvent:. text=Load error.
> However, i'll look up in internet tring to follow your advices!
>
> Thanks to everyone!
> Angelo
>
> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]> wrote:
>
> > It looks like you are writing the pdf to:
> >
> > File.userDirectory.resolvePath("testPageAngelo.pdf");
> >
> > But trying to load it from:
> >
> > File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
> >
> > This might be causing the error.
> >
> > Thanks,
> > Om
> >
> > On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
> [hidden email]
> > >wrote:
> >
> > > I'm sorry.
> > >
> > > here it is
> > >
> > > http://pastelink.me/dl/41027d
> > >
> > > Thx
> > > Angelo
> > >
> > >
> > > On Thu, Feb 7, 2013 at 8:27 PM, Om <[hidden email]> wrote:
> > >
> > > > The attachment didnt come through.  Can you put it up somewhere else
> > and
> > > > post the link here?
> > > >
> > > > Thanks,
> > > > Om
> > > >
> > > > On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <
> > > [hidden email]
> > > > >wrote:
> > > >
> > > > > Hi Om,
> > > > > i've created a simple Flex Mobile Project with the attached mxml.
> > > > >
> > > > > When i run it con the AIR simulator i obtain an
> > > > >
> > > > > Error #2044: Unhandled error:. text=PDFError
> > > > > That's the way i do it? Where i'm doing wrong?
> > > > >
> > > > > thanks,
> > > > > Angelo
> > > > >
> > > > >
> > > > > On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
> > > > >
> > > > >> >
> > > > >> > I found a lot of sites/blog that speak about stagewebview and
> > > > >> > navigatetourl...etc etc but nothing seems to work properly.
> > > > >>
> > > > >>
> > > > >> Can you explain why this dint work?  StageWebview should
> > theoretically
> > > > >> work.
> > > > >>
> > > > >> Thanks,
> > > > >> Om
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Angelo Lazzari
> > > > > mobile: 0039 347 0090 452
> > > > > mail: [hidden email]
> > > > >
> > > > >
> > > > > ----------------------------
> > > > > Verificate la corrispondenza del destinatario; in caso contrario
> > > vogliate
> > > > > notificare ciò al mittente e, consci della responsabilita'per l'uso
> > > > > indebito, cancellare il messaggio e sue copie / Verify the
> > > correspondence
> > > > > of the addressee; otherwise, notify that to the sender and,
> conscious
> > > of
> > > > > the responsibility for the undue use, destroy the message and its
> > > copies.
> > > > > ----------------------------
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Angelo Lazzari
> > > mobile: 0039 347 0090 452
> > > mail: [hidden email]
> > >
> > >
> > > ----------------------------
> > > Verificate la corrispondenza del destinatario; in caso contrario
> vogliate
> > > notificare ciò al mittente e, consci della responsabilita'per l'uso
> > > indebito, cancellare il messaggio e sue copie / Verify the
> correspondence
> > > of the addressee; otherwise, notify that to the sender and, conscious
> of
> > > the responsibility for the undue use, destroy the message and its
> copies.
> > > ----------------------------
> > >
> >
>
>
>
> --
> Angelo Lazzari
> mobile: 0039 347 0090 452
> mail: [hidden email]
>
>
> ----------------------------
> Verificate la corrispondenza del destinatario; in caso contrario vogliate
> notificare ciò al mittente e, consci della responsabilita'per l'uso
> indebito, cancellare il messaggio e sue copie / Verify the correspondence
> of the addressee; otherwise, notify that to the sender and, conscious of
> the responsibility for the undue use, destroy the message and its copies.
> ----------------------------
>



--
Jonathan Campos
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Angelo Lazzari
Thank you very much!!I will!

Angelo

Sent from my 

On Feb 8, 2013, at 0:59, Jonathan Campos <[hidden email]> wrote:

> As stated previously, on iOS the PDF will show in a stagewebview.
>
> On Android this doesn't work.... but I have an ANE that will do what you
> need:
> https://github.com/jonbcampos/unitedmindset-ane-repo
>
> My logic for apps has been:
> if !support > goto stagewebview and display
> if supported > open with ane
>
> enjoy
>
>
> On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <[hidden email]>wrote:
>
>> I tried to write/read from the same place (applicationStorageDirectory
>> or userDirectory) but the error that come up is nearly the same:
>>
>> Error #2044: Unhandled ErrorEvent:. text=Load error.
>> However, i'll look up in internet tring to follow your advices!
>>
>> Thanks to everyone!
>> Angelo
>>
>> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]> wrote:
>>
>>> It looks like you are writing the pdf to:
>>>
>>> File.userDirectory.resolvePath("testPageAngelo.pdf");
>>>
>>> But trying to load it from:
>>>
>>> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
>>>
>>> This might be causing the error.
>>>
>>> Thanks,
>>> Om
>>>
>>> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
>> [hidden email]
>>>> wrote:
>>>
>>>> I'm sorry.
>>>>
>>>> here it is
>>>>
>>>> http://pastelink.me/dl/41027d
>>>>
>>>> Thx
>>>> Angelo
>>>>
>>>>
>>>> On Thu, Feb 7, 2013 at 8:27 PM, Om <[hidden email]> wrote:
>>>>
>>>>> The attachment didnt come through.  Can you put it up somewhere else
>>> and
>>>>> post the link here?
>>>>>
>>>>> Thanks,
>>>>> Om
>>>>>
>>>>> On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <
>>>> [hidden email]
>>>>>> wrote:
>>>>>
>>>>>> Hi Om,
>>>>>> i've created a simple Flex Mobile Project with the attached mxml.
>>>>>>
>>>>>> When i run it con the AIR simulator i obtain an
>>>>>>
>>>>>> Error #2044: Unhandled error:. text=PDFError
>>>>>> That's the way i do it? Where i'm doing wrong?
>>>>>>
>>>>>> thanks,
>>>>>> Angelo
>>>>>>
>>>>>>
>>>>>> On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
>>>>>>
>>>>>>>>
>>>>>>>> I found a lot of sites/blog that speak about stagewebview and
>>>>>>>> navigatetourl...etc etc but nothing seems to work properly.
>>>>>>>
>>>>>>>
>>>>>>> Can you explain why this dint work?  StageWebview should
>>> theoretically
>>>>>>> work.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Om
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Angelo Lazzari
>>>>>> mobile: 0039 347 0090 452
>>>>>> mail: [hidden email]
>>>>>>
>>>>>>
>>>>>> ----------------------------
>>>>>> Verificate la corrispondenza del destinatario; in caso contrario
>>>> vogliate
>>>>>> notificare ciò al mittente e, consci della responsabilita'per l'uso
>>>>>> indebito, cancellare il messaggio e sue copie / Verify the
>>>> correspondence
>>>>>> of the addressee; otherwise, notify that to the sender and,
>> conscious
>>>> of
>>>>>> the responsibility for the undue use, destroy the message and its
>>>> copies.
>>>>>> ----------------------------
>>>>
>>>>
>>>>
>>>> --
>>>> Angelo Lazzari
>>>> mobile: 0039 347 0090 452
>>>> mail: [hidden email]
>>>>
>>>>
>>>> ----------------------------
>>>> Verificate la corrispondenza del destinatario; in caso contrario
>> vogliate
>>>> notificare ciò al mittente e, consci della responsabilita'per l'uso
>>>> indebito, cancellare il messaggio e sue copie / Verify the
>> correspondence
>>>> of the addressee; otherwise, notify that to the sender and, conscious
>> of
>>>> the responsibility for the undue use, destroy the message and its
>> copies.
>>>> ----------------------------
>>
>>
>>
>> --
>> Angelo Lazzari
>> mobile: 0039 347 0090 452
>> mail: [hidden email]
>>
>>
>> ----------------------------
>> Verificate la corrispondenza del destinatario; in caso contrario vogliate
>> notificare ciò al mittente e, consci della responsabilita'per l'uso
>> indebito, cancellare il messaggio e sue copie / Verify the correspondence
>> of the addressee; otherwise, notify that to the sender and, conscious of
>> the responsibility for the undue use, destroy the message and its copies.
>> ----------------------------
>
>
>
> --
> Jonathan Campos

Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Philippe Bossu
Hello,
I am working on the same kind of project.

We succeeded opening in IOS with StagedWebView and in Mac/PC with
file.openWithDefaultApplication.

Under Android, we tried with the ANE mentioned by J. Campos but we are
facing some issues:

   - When running under android it says it does not find the file:
      - Looking at code , can the launched activity find file in Flex
      LocalStorage ?
      - So I wonder if StageWebView approach could not be facing this issue
   - We are not able to package IOS application as it says ANE is missing


Any ideas ?
Thanks.

On Fri, Feb 8, 2013 at 7:36 AM, Angelo Lazzari <[hidden email]>wrote:

> Thank you very much!!I will!
>
> Angelo
>
> Sent from my 
>
> On Feb 8, 2013, at 0:59, Jonathan Campos <[hidden email]> wrote:
>
> > As stated previously, on iOS the PDF will show in a stagewebview.
> >
> > On Android this doesn't work.... but I have an ANE that will do what you
> > need:
> > https://github.com/jonbcampos/unitedmindset-ane-repo
> >
> > My logic for apps has been:
> > if !support > goto stagewebview and display
> > if supported > open with ane
> >
> > enjoy
> >
> >
> > On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <[hidden email]
> >wrote:
> >
> >> I tried to write/read from the same place (applicationStorageDirectory
> >> or userDirectory) but the error that come up is nearly the same:
> >>
> >> Error #2044: Unhandled ErrorEvent:. text=Load error.
> >> However, i'll look up in internet tring to follow your advices!
> >>
> >> Thanks to everyone!
> >> Angelo
> >>
> >> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]> wrote:
> >>
> >>> It looks like you are writing the pdf to:
> >>>
> >>> File.userDirectory.resolvePath("testPageAngelo.pdf");
> >>>
> >>> But trying to load it from:
> >>>
> >>> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
> >>>
> >>> This might be causing the error.
> >>>
> >>> Thanks,
> >>> Om
> >>>
> >>> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
> >> [hidden email]
> >>>> wrote:
> >>>
> >>>> I'm sorry.
> >>>>
> >>>> here it is
> >>>>
> >>>> http://pastelink.me/dl/41027d
> >>>>
> >>>> Thx
> >>>> Angelo
> >>>>
> >>>>
> >>>> On Thu, Feb 7, 2013 at 8:27 PM, Om <[hidden email]> wrote:
> >>>>
> >>>>> The attachment didnt come through.  Can you put it up somewhere else
> >>> and
> >>>>> post the link here?
> >>>>>
> >>>>> Thanks,
> >>>>> Om
> >>>>>
> >>>>> On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <
> >>>> [hidden email]
> >>>>>> wrote:
> >>>>>
> >>>>>> Hi Om,
> >>>>>> i've created a simple Flex Mobile Project with the attached mxml.
> >>>>>>
> >>>>>> When i run it con the AIR simulator i obtain an
> >>>>>>
> >>>>>> Error #2044: Unhandled error:. text=PDFError
> >>>>>> That's the way i do it? Where i'm doing wrong?
> >>>>>>
> >>>>>> thanks,
> >>>>>> Angelo
> >>>>>>
> >>>>>>
> >>>>>> On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
> >>>>>>
> >>>>>>>>
> >>>>>>>> I found a lot of sites/blog that speak about stagewebview and
> >>>>>>>> navigatetourl...etc etc but nothing seems to work properly.
> >>>>>>>
> >>>>>>>
> >>>>>>> Can you explain why this dint work?  StageWebview should
> >>> theoretically
> >>>>>>> work.
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>> Om
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Angelo Lazzari
> >>>>>> mobile: 0039 347 0090 452
> >>>>>> mail: [hidden email]
> >>>>>>
> >>>>>>
> >>>>>> ----------------------------
> >>>>>> Verificate la corrispondenza del destinatario; in caso contrario
> >>>> vogliate
> >>>>>> notificare ciò al mittente e, consci della responsabilita'per l'uso
> >>>>>> indebito, cancellare il messaggio e sue copie / Verify the
> >>>> correspondence
> >>>>>> of the addressee; otherwise, notify that to the sender and,
> >> conscious
> >>>> of
> >>>>>> the responsibility for the undue use, destroy the message and its
> >>>> copies.
> >>>>>> ----------------------------
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Angelo Lazzari
> >>>> mobile: 0039 347 0090 452
> >>>> mail: [hidden email]
> >>>>
> >>>>
> >>>> ----------------------------
> >>>> Verificate la corrispondenza del destinatario; in caso contrario
> >> vogliate
> >>>> notificare ciò al mittente e, consci della responsabilita'per l'uso
> >>>> indebito, cancellare il messaggio e sue copie / Verify the
> >> correspondence
> >>>> of the addressee; otherwise, notify that to the sender and, conscious
> >> of
> >>>> the responsibility for the undue use, destroy the message and its
> >> copies.
> >>>> ----------------------------
> >>
> >>
> >>
> >> --
> >> Angelo Lazzari
> >> mobile: 0039 347 0090 452
> >> mail: [hidden email]
> >>
> >>
> >> ----------------------------
> >> Verificate la corrispondenza del destinatario; in caso contrario
> vogliate
> >> notificare ciò al mittente e, consci della responsabilita'per l'uso
> >> indebito, cancellare il messaggio e sue copie / Verify the
> correspondence
> >> of the addressee; otherwise, notify that to the sender and, conscious of
> >> the responsibility for the undue use, destroy the message and its
> copies.
> >> ----------------------------
> >
> >
> >
> > --
> > Jonathan Campos
>
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Jonathan Campos
- due to permissions and whatnot I found that the document had to be in a
more public area. Copy it over to File.documentsPath and then whatever
subpath you may want

- make sure that the application is included with the packaging process.
You may need to go into properties>packaging>ios>native extensions and add
it.

I run on a MAC so that may make a slight difference in the packaging
process.

J


On Fri, Feb 8, 2013 at 12:14 PM, Philippe Bossu <[hidden email]> wrote:

> Hello,
> I am working on the same kind of project.
>
> We succeeded opening in IOS with StagedWebView and in Mac/PC with
> file.openWithDefaultApplication.
>
> Under Android, we tried with the ANE mentioned by J. Campos but we are
> facing some issues:
>
>    - When running under android it says it does not find the file:
>       - Looking at code , can the launched activity find file in Flex
>       LocalStorage ?
>       - So I wonder if StageWebView approach could not be facing this issue
>    - We are not able to package IOS application as it says ANE is missing
>
>
> Any ideas ?
> Thanks.
>
> On Fri, Feb 8, 2013 at 7:36 AM, Angelo Lazzari <[hidden email]
> >wrote:
>
> > Thank you very much!!I will!
> >
> > Angelo
> >
> > Sent from my 
> >
> > On Feb 8, 2013, at 0:59, Jonathan Campos <[hidden email]> wrote:
> >
> > > As stated previously, on iOS the PDF will show in a stagewebview.
> > >
> > > On Android this doesn't work.... but I have an ANE that will do what
> you
> > > need:
> > > https://github.com/jonbcampos/unitedmindset-ane-repo
> > >
> > > My logic for apps has been:
> > > if !support > goto stagewebview and display
> > > if supported > open with ane
> > >
> > > enjoy
> > >
> > >
> > > On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <
> [hidden email]
> > >wrote:
> > >
> > >> I tried to write/read from the same place (applicationStorageDirectory
> > >> or userDirectory) but the error that come up is nearly the same:
> > >>
> > >> Error #2044: Unhandled ErrorEvent:. text=Load error.
> > >> However, i'll look up in internet tring to follow your advices!
> > >>
> > >> Thanks to everyone!
> > >> Angelo
> > >>
> > >> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]> wrote:
> > >>
> > >>> It looks like you are writing the pdf to:
> > >>>
> > >>> File.userDirectory.resolvePath("testPageAngelo.pdf");
> > >>>
> > >>> But trying to load it from:
> > >>>
> > >>> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
> > >>>
> > >>> This might be causing the error.
> > >>>
> > >>> Thanks,
> > >>> Om
> > >>>
> > >>> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
> > >> [hidden email]
> > >>>> wrote:
> > >>>
> > >>>> I'm sorry.
> > >>>>
> > >>>> here it is
> > >>>>
> > >>>> http://pastelink.me/dl/41027d
> > >>>>
> > >>>> Thx
> > >>>> Angelo
> > >>>>
> > >>>>
> > >>>> On Thu, Feb 7, 2013 at 8:27 PM, Om <[hidden email]> wrote:
> > >>>>
> > >>>>> The attachment didnt come through.  Can you put it up somewhere
> else
> > >>> and
> > >>>>> post the link here?
> > >>>>>
> > >>>>> Thanks,
> > >>>>> Om
> > >>>>>
> > >>>>> On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <
> > >>>> [hidden email]
> > >>>>>> wrote:
> > >>>>>
> > >>>>>> Hi Om,
> > >>>>>> i've created a simple Flex Mobile Project with the attached mxml.
> > >>>>>>
> > >>>>>> When i run it con the AIR simulator i obtain an
> > >>>>>>
> > >>>>>> Error #2044: Unhandled error:. text=PDFError
> > >>>>>> That's the way i do it? Where i'm doing wrong?
> > >>>>>>
> > >>>>>> thanks,
> > >>>>>> Angelo
> > >>>>>>
> > >>>>>>
> > >>>>>> On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
> > >>>>>>
> > >>>>>>>>
> > >>>>>>>> I found a lot of sites/blog that speak about stagewebview and
> > >>>>>>>> navigatetourl...etc etc but nothing seems to work properly.
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> Can you explain why this dint work?  StageWebview should
> > >>> theoretically
> > >>>>>>> work.
> > >>>>>>>
> > >>>>>>> Thanks,
> > >>>>>>> Om
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> --
> > >>>>>> Angelo Lazzari
> > >>>>>> mobile: 0039 347 0090 452
> > >>>>>> mail: [hidden email]
> > >>>>>>
> > >>>>>>
> > >>>>>> ----------------------------
> > >>>>>> Verificate la corrispondenza del destinatario; in caso contrario
> > >>>> vogliate
> > >>>>>> notificare ciò al mittente e, consci della responsabilita'per
> l'uso
> > >>>>>> indebito, cancellare il messaggio e sue copie / Verify the
> > >>>> correspondence
> > >>>>>> of the addressee; otherwise, notify that to the sender and,
> > >> conscious
> > >>>> of
> > >>>>>> the responsibility for the undue use, destroy the message and its
> > >>>> copies.
> > >>>>>> ----------------------------
> > >>>>
> > >>>>
> > >>>>
> > >>>> --
> > >>>> Angelo Lazzari
> > >>>> mobile: 0039 347 0090 452
> > >>>> mail: [hidden email]
> > >>>>
> > >>>>
> > >>>> ----------------------------
> > >>>> Verificate la corrispondenza del destinatario; in caso contrario
> > >> vogliate
> > >>>> notificare ciò al mittente e, consci della responsabilita'per l'uso
> > >>>> indebito, cancellare il messaggio e sue copie / Verify the
> > >> correspondence
> > >>>> of the addressee; otherwise, notify that to the sender and,
> conscious
> > >> of
> > >>>> the responsibility for the undue use, destroy the message and its
> > >> copies.
> > >>>> ----------------------------
> > >>
> > >>
> > >>
> > >> --
> > >> Angelo Lazzari
> > >> mobile: 0039 347 0090 452
> > >> mail: [hidden email]
> > >>
> > >>
> > >> ----------------------------
> > >> Verificate la corrispondenza del destinatario; in caso contrario
> > vogliate
> > >> notificare ciò al mittente e, consci della responsabilita'per l'uso
> > >> indebito, cancellare il messaggio e sue copie / Verify the
> > correspondence
> > >> of the addressee; otherwise, notify that to the sender and, conscious
> of
> > >> the responsibility for the undue use, destroy the message and its
> > copies.
> > >> ----------------------------
> > >
> > >
> > >
> > > --
> > > Jonathan Campos
> >
>



--
Jonathan Campos
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Jonathan Campos
by the example the applicationStorageDirectory also works (I forget
sometimes)

https://github.com/jonbcampos/unitedmindset-ane-repo/blob/master/OpenDocument/OpenDocumentApp/src/OpenDocumentApp.mxml


On Fri, Feb 8, 2013 at 1:07 PM, Jonathan Campos <[hidden email]>wrote:

> - due to permissions and whatnot I found that the document had to be in a
> more public area. Copy it over to File.documentsPath and then whatever
> subpath you may want
>
> - make sure that the application is included with the packaging process.
> You may need to go into properties>packaging>ios>native extensions and add
> it.
>
> I run on a MAC so that may make a slight difference in the packaging
> process.
>
> J
>
>
> On Fri, Feb 8, 2013 at 12:14 PM, Philippe Bossu <[hidden email]> wrote:
>
>> Hello,
>> I am working on the same kind of project.
>>
>> We succeeded opening in IOS with StagedWebView and in Mac/PC with
>> file.openWithDefaultApplication.
>>
>> Under Android, we tried with the ANE mentioned by J. Campos but we are
>> facing some issues:
>>
>>    - When running under android it says it does not find the file:
>>       - Looking at code , can the launched activity find file in Flex
>>       LocalStorage ?
>>       - So I wonder if StageWebView approach could not be facing this
>> issue
>>    - We are not able to package IOS application as it says ANE is missing
>>
>>
>> Any ideas ?
>> Thanks.
>>
>> On Fri, Feb 8, 2013 at 7:36 AM, Angelo Lazzari <[hidden email]
>> >wrote:
>>
>> > Thank you very much!!I will!
>> >
>> > Angelo
>> >
>> > Sent from my 
>> >
>> > On Feb 8, 2013, at 0:59, Jonathan Campos <[hidden email]> wrote:
>> >
>> > > As stated previously, on iOS the PDF will show in a stagewebview.
>> > >
>> > > On Android this doesn't work.... but I have an ANE that will do what
>> you
>> > > need:
>> > > https://github.com/jonbcampos/unitedmindset-ane-repo
>> > >
>> > > My logic for apps has been:
>> > > if !support > goto stagewebview and display
>> > > if supported > open with ane
>> > >
>> > > enjoy
>> > >
>> > >
>> > > On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <
>> [hidden email]
>> > >wrote:
>> > >
>> > >> I tried to write/read from the same place
>> (applicationStorageDirectory
>> > >> or userDirectory) but the error that come up is nearly the same:
>> > >>
>> > >> Error #2044: Unhandled ErrorEvent:. text=Load error.
>> > >> However, i'll look up in internet tring to follow your advices!
>> > >>
>> > >> Thanks to everyone!
>> > >> Angelo
>> > >>
>> > >> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]> wrote:
>> > >>
>> > >>> It looks like you are writing the pdf to:
>> > >>>
>> > >>> File.userDirectory.resolvePath("testPageAngelo.pdf");
>> > >>>
>> > >>> But trying to load it from:
>> > >>>
>> > >>> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
>> > >>>
>> > >>> This might be causing the error.
>> > >>>
>> > >>> Thanks,
>> > >>> Om
>> > >>>
>> > >>> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
>> > >> [hidden email]
>> > >>>> wrote:
>> > >>>
>> > >>>> I'm sorry.
>> > >>>>
>> > >>>> here it is
>> > >>>>
>> > >>>> http://pastelink.me/dl/41027d
>> > >>>>
>> > >>>> Thx
>> > >>>> Angelo
>> > >>>>
>> > >>>>
>> > >>>> On Thu, Feb 7, 2013 at 8:27 PM, Om <[hidden email]> wrote:
>> > >>>>
>> > >>>>> The attachment didnt come through.  Can you put it up somewhere
>> else
>> > >>> and
>> > >>>>> post the link here?
>> > >>>>>
>> > >>>>> Thanks,
>> > >>>>> Om
>> > >>>>>
>> > >>>>> On Thu, Feb 7, 2013 at 11:23 AM, Angelo Lazzari <
>> > >>>> [hidden email]
>> > >>>>>> wrote:
>> > >>>>>
>> > >>>>>> Hi Om,
>> > >>>>>> i've created a simple Flex Mobile Project with the attached mxml.
>> > >>>>>>
>> > >>>>>> When i run it con the AIR simulator i obtain an
>> > >>>>>>
>> > >>>>>> Error #2044: Unhandled error:. text=PDFError
>> > >>>>>> That's the way i do it? Where i'm doing wrong?
>> > >>>>>>
>> > >>>>>> thanks,
>> > >>>>>> Angelo
>> > >>>>>>
>> > >>>>>>
>> > >>>>>> On Thu, Feb 7, 2013 at 8:14 PM, Om <[hidden email]> wrote:
>> > >>>>>>
>> > >>>>>>>>
>> > >>>>>>>> I found a lot of sites/blog that speak about stagewebview and
>> > >>>>>>>> navigatetourl...etc etc but nothing seems to work properly.
>> > >>>>>>>
>> > >>>>>>>
>> > >>>>>>> Can you explain why this dint work?  StageWebview should
>> > >>> theoretically
>> > >>>>>>> work.
>> > >>>>>>>
>> > >>>>>>> Thanks,
>> > >>>>>>> Om
>> > >>>>>>
>> > >>>>>>
>> > >>>>>>
>> > >>>>>> --
>> > >>>>>> Angelo Lazzari
>> > >>>>>> mobile: 0039 347 0090 452
>> > >>>>>> mail: [hidden email]
>> > >>>>>>
>> > >>>>>>
>> > >>>>>> ----------------------------
>> > >>>>>> Verificate la corrispondenza del destinatario; in caso contrario
>> > >>>> vogliate
>> > >>>>>> notificare ciò al mittente e, consci della responsabilita'per
>> l'uso
>> > >>>>>> indebito, cancellare il messaggio e sue copie / Verify the
>> > >>>> correspondence
>> > >>>>>> of the addressee; otherwise, notify that to the sender and,
>> > >> conscious
>> > >>>> of
>> > >>>>>> the responsibility for the undue use, destroy the message and its
>> > >>>> copies.
>> > >>>>>> ----------------------------
>> > >>>>
>> > >>>>
>> > >>>>
>> > >>>> --
>> > >>>> Angelo Lazzari
>> > >>>> mobile: 0039 347 0090 452
>> > >>>> mail: [hidden email]
>> > >>>>
>> > >>>>
>> > >>>> ----------------------------
>> > >>>> Verificate la corrispondenza del destinatario; in caso contrario
>> > >> vogliate
>> > >>>> notificare ciò al mittente e, consci della responsabilita'per l'uso
>> > >>>> indebito, cancellare il messaggio e sue copie / Verify the
>> > >> correspondence
>> > >>>> of the addressee; otherwise, notify that to the sender and,
>> conscious
>> > >> of
>> > >>>> the responsibility for the undue use, destroy the message and its
>> > >> copies.
>> > >>>> ----------------------------
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Angelo Lazzari
>> > >> mobile: 0039 347 0090 452
>> > >> mail: [hidden email]
>> > >>
>> > >>
>> > >> ----------------------------
>> > >> Verificate la corrispondenza del destinatario; in caso contrario
>> > vogliate
>> > >> notificare ciò al mittente e, consci della responsabilita'per l'uso
>> > >> indebito, cancellare il messaggio e sue copie / Verify the
>> > correspondence
>> > >> of the addressee; otherwise, notify that to the sender and,
>> conscious of
>> > >> the responsibility for the undue use, destroy the message and its
>> > copies.
>> > >> ----------------------------
>> > >
>> > >
>> > >
>> > > --
>> > > Jonathan Campos
>> >
>>
>
>
>
> --
> Jonathan Campos
>



--
Jonathan Campos
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Philippe Bossu
So you confirm that the code works from applicationStorage ?
I thought called application needed to have access to the file to read.

We will try again and give feedback.

Many thanks for you reactivity and help.

Regards


On Friday, February 8, 2013, Jonathan Campos wrote:

> by the example the applicationStorageDirectory also works (I forget
> sometimes)
>
>
> https://github.com/jonbcampos/unitedmindset-ane-repo/blob/master/OpenDocument/OpenDocumentApp/src/OpenDocumentApp.mxml
>
>
> On Fri, Feb 8, 2013 at 1:07 PM, Jonathan Campos <[hidden email]
> >wrote:
>
> > - due to permissions and whatnot I found that the document had to be in a
> > more public area. Copy it over to File.documentsPath and then whatever
> > subpath you may want
> >
> > - make sure that the application is included with the packaging process.
> > You may need to go into properties>packaging>ios>native extensions and
> add
> > it.
> >
> > I run on a MAC so that may make a slight difference in the packaging
> > process.
> >
> > J
> >
> >
> > On Fri, Feb 8, 2013 at 12:14 PM, Philippe Bossu <[hidden email]>
> wrote:
> >
> >> Hello,
> >> I am working on the same kind of project.
> >>
> >> We succeeded opening in IOS with StagedWebView and in Mac/PC with
> >> file.openWithDefaultApplication.
> >>
> >> Under Android, we tried with the ANE mentioned by J. Campos but we are
> >> facing some issues:
> >>
> >>    - When running under android it says it does not find the file:
> >>       - Looking at code , can the launched activity find file in Flex
> >>       LocalStorage ?
> >>       - So I wonder if StageWebView approach could not be facing this
> >> issue
> >>    - We are not able to package IOS application as it says ANE is
> missing
> >>
> >>
> >> Any ideas ?
> >> Thanks.
> >>
> >> On Fri, Feb 8, 2013 at 7:36 AM, Angelo Lazzari <
> [hidden email]
> >> >wrote:
> >>
> >> > Thank you very much!!I will!
> >> >
> >> > Angelo
> >> >
> >> > Sent from my 
> >> >
> >> > On Feb 8, 2013, at 0:59, Jonathan Campos <[hidden email]>
> wrote:
> >> >
> >> > > As stated previously, on iOS the PDF will show in a stagewebview.
> >> > >
> >> > > On Android this doesn't work.... but I have an ANE that will do what
> >> you
> >> > > need:
> >> > > https://github.com/jonbcampos/unitedmindset-ane-repo
> >> > >
> >> > > My logic for apps has been:
> >> > > if !support > goto stagewebview and display
> >> > > if supported > open with ane
> >> > >
> >> > > enjoy
> >> > >
> >> > >
> >> > > On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <
> >> [hidden email]
> >> > >wrote:
> >> > >
> >> > >> I tried to write/read from the same place
> >> (applicationStorageDirectory
> >> > >> or userDirectory) but the error that come up is nearly the same:
> >> > >>
> >> > >> Error #2044: Unhandled ErrorEvent:. text=Load error.
> >> > >> However, i'll look up in internet tring to follow your advices!
> >> > >>
> >> > >> Thanks to everyone!
> >> > >> Angelo
> >> > >>
> >> > >> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]> wrote:
> >> > >>
> >> > >>> It looks like you are writing the pdf to:
> >> > >>>
> >> > >>> File.userDirectory.resolvePath("testPageAngelo.pdf");
> >> > >>>
> >> > >>> But trying to load it from:
> >> > >>>
> >> > >>> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
> >> > >>>
> >> > >>> This might be causing the error.
> >> > >>>
> >> > >>> Thanks,
> >> > >>> Om
> >> > >>>
> >> > >>> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
> >> > >> [hidden email]
> >> > >>>> wrote:
> >> > >>>
> >> > >>>> I'm sorry.
> >> > >--
> Jonathan Campos
>
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Philippe Bossu
Shouldn't code call:

intent.addFlag(Intent.FLAG_GRANT_READ_URI_PERMISSION<http://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION>
);

I thought that app sandboxing didn't allow one application to access local
storage of another one.

Thanks

On Fri, Feb 8, 2013 at 9:53 PM, Philippe Bossu <[hidden email]> wrote:

> So you confirm that the code works from applicationStorage ?
> I thought called application needed to have access to the file to read.
>
> We will try again and give feedback.
>
> Many thanks for you reactivity and help.
>
> Regards
>
>
> On Friday, February 8, 2013, Jonathan Campos wrote:
>
>> by the example the applicationStorageDirectory also works (I forget
>> sometimes)
>>
>>
>> https://github.com/jonbcampos/unitedmindset-ane-repo/blob/master/OpenDocument/OpenDocumentApp/src/OpenDocumentApp.mxml
>>
>>
>> On Fri, Feb 8, 2013 at 1:07 PM, Jonathan Campos <[hidden email]
>> >wrote:
>>
>> > - due to permissions and whatnot I found that the document had to be in
>> a
>> > more public area. Copy it over to File.documentsPath and then whatever
>> > subpath you may want
>> >
>> > - make sure that the application is included with the packaging process.
>> > You may need to go into properties>packaging>ios>native extensions and
>> add
>> > it.
>> >
>> > I run on a MAC so that may make a slight difference in the packaging
>> > process.
>> >
>> > J
>> >
>> >
>> > On Fri, Feb 8, 2013 at 12:14 PM, Philippe Bossu <[hidden email]>
>> wrote:
>> >
>> >> Hello,
>> >> I am working on the same kind of project.
>> >>
>> >> We succeeded opening in IOS with StagedWebView and in Mac/PC with
>> >> file.openWithDefaultApplication.
>> >>
>> >> Under Android, we tried with the ANE mentioned by J. Campos but we are
>> >> facing some issues:
>> >>
>> >>    - When running under android it says it does not find the file:
>> >>       - Looking at code , can the launched activity find file in Flex
>> >>       LocalStorage ?
>> >>       - So I wonder if StageWebView approach could not be facing this
>> >> issue
>> >>    - We are not able to package IOS application as it says ANE is
>> missing
>> >>
>> >>
>> >> Any ideas ?
>> >> Thanks.
>> >>
>> >> On Fri, Feb 8, 2013 at 7:36 AM, Angelo Lazzari <
>> [hidden email]
>> >> >wrote:
>> >>
>> >> > Thank you very much!!I will!
>> >> >
>> >> > Angelo
>> >> >
>> >> > Sent from my 
>> >> >
>> >> > On Feb 8, 2013, at 0:59, Jonathan Campos <[hidden email]>
>> wrote:
>> >> >
>> >> > > As stated previously, on iOS the PDF will show in a stagewebview.
>> >> > >
>> >> > > On Android this doesn't work.... but I have an ANE that will do
>> what
>> >> you
>> >> > > need:
>> >> > > https://github.com/jonbcampos/unitedmindset-ane-repo
>> >> > >
>> >> > > My logic for apps has been:
>> >> > > if !support > goto stagewebview and display
>> >> > > if supported > open with ane
>> >> > >
>> >> > > enjoy
>> >> > >
>> >> > >
>> >> > > On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <
>> >> [hidden email]
>> >> > >wrote:
>> >> > >
>> >> > >> I tried to write/read from the same place
>> >> (applicationStorageDirectory
>> >> > >> or userDirectory) but the error that come up is nearly the same:
>> >> > >>
>> >> > >> Error #2044: Unhandled ErrorEvent:. text=Load error.
>> >> > >> However, i'll look up in internet tring to follow your advices!
>> >> > >>
>> >> > >> Thanks to everyone!
>> >> > >> Angelo
>> >> > >>
>> >> > >> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]> wrote:
>> >> > >>
>> >> > >>> It looks like you are writing the pdf to:
>> >> > >>>
>> >> > >>> File.userDirectory.resolvePath("testPageAngelo.pdf");
>> >> > >>>
>> >> > >>> But trying to load it from:
>> >> > >>>
>> >> > >>>
>> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
>> >> > >>>
>> >> > >>> This might be causing the error.
>> >> > >>>
>> >> > >>> Thanks,
>> >> > >>> Om
>> >> > >>>
>> >> > >>> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
>> >> > >> [hidden email]
>> >> > >>>> wrote:
>> >> > >>>
>> >> > >>>> I'm sorry.
>> >> > >--
>> Jonathan Campos
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Jonathan Campos
the code is all available on github. you could make that change. the
current implementation just provides access to it's own pdf's not cross
application.


On Fri, Feb 8, 2013 at 3:06 PM, Philippe Bossu <[hidden email]> wrote:

> Shouldn't code call:
>
> intent.addFlag(Intent.FLAG_GRANT_READ_URI_PERMISSION<
> http://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION
> >
> );
>
> I thought that app sandboxing didn't allow one application to access local
> storage of another one.
>
> Thanks
>
> On Fri, Feb 8, 2013 at 9:53 PM, Philippe Bossu <[hidden email]> wrote:
>
> > So you confirm that the code works from applicationStorage ?
> > I thought called application needed to have access to the file to read.
> >
> > We will try again and give feedback.
> >
> > Many thanks for you reactivity and help.
> >
> > Regards
> >
> >
> > On Friday, February 8, 2013, Jonathan Campos wrote:
> >
> >> by the example the applicationStorageDirectory also works (I forget
> >> sometimes)
> >>
> >>
> >>
> https://github.com/jonbcampos/unitedmindset-ane-repo/blob/master/OpenDocument/OpenDocumentApp/src/OpenDocumentApp.mxml
> >>
> >>
> >> On Fri, Feb 8, 2013 at 1:07 PM, Jonathan Campos <[hidden email]
> >> >wrote:
> >>
> >> > - due to permissions and whatnot I found that the document had to be
> in
> >> a
> >> > more public area. Copy it over to File.documentsPath and then whatever
> >> > subpath you may want
> >> >
> >> > - make sure that the application is included with the packaging
> process.
> >> > You may need to go into properties>packaging>ios>native extensions and
> >> add
> >> > it.
> >> >
> >> > I run on a MAC so that may make a slight difference in the packaging
> >> > process.
> >> >
> >> > J
> >> >
> >> >
> >> > On Fri, Feb 8, 2013 at 12:14 PM, Philippe Bossu <[hidden email]>
> >> wrote:
> >> >
> >> >> Hello,
> >> >> I am working on the same kind of project.
> >> >>
> >> >> We succeeded opening in IOS with StagedWebView and in Mac/PC with
> >> >> file.openWithDefaultApplication.
> >> >>
> >> >> Under Android, we tried with the ANE mentioned by J. Campos but we
> are
> >> >> facing some issues:
> >> >>
> >> >>    - When running under android it says it does not find the file:
> >> >>       - Looking at code , can the launched activity find file in Flex
> >> >>       LocalStorage ?
> >> >>       - So I wonder if StageWebView approach could not be facing this
> >> >> issue
> >> >>    - We are not able to package IOS application as it says ANE is
> >> missing
> >> >>
> >> >>
> >> >> Any ideas ?
> >> >> Thanks.
> >> >>
> >> >> On Fri, Feb 8, 2013 at 7:36 AM, Angelo Lazzari <
> >> [hidden email]
> >> >> >wrote:
> >> >>
> >> >> > Thank you very much!!I will!
> >> >> >
> >> >> > Angelo
> >> >> >
> >> >> > Sent from my 
> >> >> >
> >> >> > On Feb 8, 2013, at 0:59, Jonathan Campos <[hidden email]>
> >> wrote:
> >> >> >
> >> >> > > As stated previously, on iOS the PDF will show in a stagewebview.
> >> >> > >
> >> >> > > On Android this doesn't work.... but I have an ANE that will do
> >> what
> >> >> you
> >> >> > > need:
> >> >> > > https://github.com/jonbcampos/unitedmindset-ane-repo
> >> >> > >
> >> >> > > My logic for apps has been:
> >> >> > > if !support > goto stagewebview and display
> >> >> > > if supported > open with ane
> >> >> > >
> >> >> > > enjoy
> >> >> > >
> >> >> > >
> >> >> > > On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <
> >> >> [hidden email]
> >> >> > >wrote:
> >> >> > >
> >> >> > >> I tried to write/read from the same place
> >> >> (applicationStorageDirectory
> >> >> > >> or userDirectory) but the error that come up is nearly the same:
> >> >> > >>
> >> >> > >> Error #2044: Unhandled ErrorEvent:. text=Load error.
> >> >> > >> However, i'll look up in internet tring to follow your advices!
> >> >> > >>
> >> >> > >> Thanks to everyone!
> >> >> > >> Angelo
> >> >> > >>
> >> >> > >> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]>
> wrote:
> >> >> > >>
> >> >> > >>> It looks like you are writing the pdf to:
> >> >> > >>>
> >> >> > >>> File.userDirectory.resolvePath("testPageAngelo.pdf");
> >> >> > >>>
> >> >> > >>> But trying to load it from:
> >> >> > >>>
> >> >> > >>>
> >> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
> >> >> > >>>
> >> >> > >>> This might be causing the error.
> >> >> > >>>
> >> >> > >>> Thanks,
> >> >> > >>> Om
> >> >> > >>>
> >> >> > >>> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
> >> >> > >> [hidden email]
> >> >> > >>>> wrote:
> >> >> > >>>
> >> >> > >>>> I'm sorry.
> >> >> > >--
> >> Jonathan Campos
> >>
> >
>



--
Jonathan Campos
Reply | Threaded
Open this post in threaded view
|

Re: Show a pdf in a Flex mobile app

Philippe Bossu
Hello,
Just to give you feedback.

Copying document to  file.documentsDirectory and then calling ANE with the
new path works.
But using localStorage with ANE fails with Activity not finding file to
open.
And it fails even with setting :
intent.addFlag(Intent.FLAG_GRANT_READ_URI_PERMISSION)

This is strange to me.
Any other feedback is welcome.

Regards

On Fri, Feb 8, 2013 at 11:11 PM, Jonathan Campos <[hidden email]>wrote:

> the code is all available on github. you could make that change. the
> current implementation just provides access to it's own pdf's not cross
> application.
>
>
> On Fri, Feb 8, 2013 at 3:06 PM, Philippe Bossu <[hidden email]> wrote:
>
> > Shouldn't code call:
> >
> > intent.addFlag(Intent.FLAG_GRANT_READ_URI_PERMISSION<
> >
> http://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION
> > >
> > );
> >
> > I thought that app sandboxing didn't allow one application to access
> local
> > storage of another one.
> >
> > Thanks
> >
> > On Fri, Feb 8, 2013 at 9:53 PM, Philippe Bossu <[hidden email]> wrote:
> >
> > > So you confirm that the code works from applicationStorage ?
> > > I thought called application needed to have access to the file to read.
> > >
> > > We will try again and give feedback.
> > >
> > > Many thanks for you reactivity and help.
> > >
> > > Regards
> > >
> > >
> > > On Friday, February 8, 2013, Jonathan Campos wrote:
> > >
> > >> by the example the applicationStorageDirectory also works (I forget
> > >> sometimes)
> > >>
> > >>
> > >>
> >
> https://github.com/jonbcampos/unitedmindset-ane-repo/blob/master/OpenDocument/OpenDocumentApp/src/OpenDocumentApp.mxml
> > >>
> > >>
> > >> On Fri, Feb 8, 2013 at 1:07 PM, Jonathan Campos <[hidden email]
> > >> >wrote:
> > >>
> > >> > - due to permissions and whatnot I found that the document had to be
> > in
> > >> a
> > >> > more public area. Copy it over to File.documentsPath and then
> whatever
> > >> > subpath you may want
> > >> >
> > >> > - make sure that the application is included with the packaging
> > process.
> > >> > You may need to go into properties>packaging>ios>native extensions
> and
> > >> add
> > >> > it.
> > >> >
> > >> > I run on a MAC so that may make a slight difference in the packaging
> > >> > process.
> > >> >
> > >> > J
> > >> >
> > >> >
> > >> > On Fri, Feb 8, 2013 at 12:14 PM, Philippe Bossu <[hidden email]>
> > >> wrote:
> > >> >
> > >> >> Hello,
> > >> >> I am working on the same kind of project.
> > >> >>
> > >> >> We succeeded opening in IOS with StagedWebView and in Mac/PC with
> > >> >> file.openWithDefaultApplication.
> > >> >>
> > >> >> Under Android, we tried with the ANE mentioned by J. Campos but we
> > are
> > >> >> facing some issues:
> > >> >>
> > >> >>    - When running under android it says it does not find the file:
> > >> >>       - Looking at code , can the launched activity find file in
> Flex
> > >> >>       LocalStorage ?
> > >> >>       - So I wonder if StageWebView approach could not be facing
> this
> > >> >> issue
> > >> >>    - We are not able to package IOS application as it says ANE is
> > >> missing
> > >> >>
> > >> >>
> > >> >> Any ideas ?
> > >> >> Thanks.
> > >> >>
> > >> >> On Fri, Feb 8, 2013 at 7:36 AM, Angelo Lazzari <
> > >> [hidden email]
> > >> >> >wrote:
> > >> >>
> > >> >> > Thank you very much!!I will!
> > >> >> >
> > >> >> > Angelo
> > >> >> >
> > >> >> > Sent from my 
> > >> >> >
> > >> >> > On Feb 8, 2013, at 0:59, Jonathan Campos <[hidden email]>
> > >> wrote:
> > >> >> >
> > >> >> > > As stated previously, on iOS the PDF will show in a
> stagewebview.
> > >> >> > >
> > >> >> > > On Android this doesn't work.... but I have an ANE that will do
> > >> what
> > >> >> you
> > >> >> > > need:
> > >> >> > > https://github.com/jonbcampos/unitedmindset-ane-repo
> > >> >> > >
> > >> >> > > My logic for apps has been:
> > >> >> > > if !support > goto stagewebview and display
> > >> >> > > if supported > open with ane
> > >> >> > >
> > >> >> > > enjoy
> > >> >> > >
> > >> >> > >
> > >> >> > > On Thu, Feb 7, 2013 at 1:53 PM, Angelo Lazzari <
> > >> >> [hidden email]
> > >> >> > >wrote:
> > >> >> > >
> > >> >> > >> I tried to write/read from the same place
> > >> >> (applicationStorageDirectory
> > >> >> > >> or userDirectory) but the error that come up is nearly the
> same:
> > >> >> > >>
> > >> >> > >> Error #2044: Unhandled ErrorEvent:. text=Load error.
> > >> >> > >> However, i'll look up in internet tring to follow your
> advices!
> > >> >> > >>
> > >> >> > >> Thanks to everyone!
> > >> >> > >> Angelo
> > >> >> > >>
> > >> >> > >> On Thu, Feb 7, 2013 at 8:47 PM, Om <[hidden email]>
> > wrote:
> > >> >> > >>
> > >> >> > >>> It looks like you are writing the pdf to:
> > >> >> > >>>
> > >> >> > >>> File.userDirectory.resolvePath("testPageAngelo.pdf");
> > >> >> > >>>
> > >> >> > >>> But trying to load it from:
> > >> >> > >>>
> > >> >> > >>>
> > >> File.applicationStorageDirectory.resolvePath("testPageAngelo.pdf")
> > >> >> > >>>
> > >> >> > >>> This might be causing the error.
> > >> >> > >>>
> > >> >> > >>> Thanks,
> > >> >> > >>> Om
> > >> >> > >>>
> > >> >> > >>> On Thu, Feb 7, 2013 at 11:33 AM, Angelo Lazzari <
> > >> >> > >> [hidden email]
> > >> >> > >>>> wrote:
> > >> >> > >>>
> > >> >> > >>>> I'm sorry.
> > >> >> > >--
> > >> Jonathan Campos
> > >>
> > >
> >
>
>
>
> --
> Jonathan Campos
>
12