androidapache-flexflash-builderalivepdf

PDF save Android phone with alivePdf (Flex)


I am using alive pdf for flex application pdf export, it is working fine on flash builder 4.6 but ı tried on android phone (HTC sensation xe) alive pdf not save to pdf file. I am waiting for help.

It is my pdf export source:

var f:File = File.applicationStorageDirectory.resolvePath('chart.pdf');
            var fs:FileStream = new FileStream();
            fs.open(f,FileMode.WRITE);
            fs.writeBytes(pdf.save(Method.LOCAL));
            trace('SAVE FILE: '+f.nativePath);
            fs.close();  

Solution

  • AFAIK You need to set WRITE_EXTERNAL_STORAGE permission to your applications XML descriptor file (yourAppName-app.xml)

    <android>  
     <manifestAdditions><![CDATA[  
      <manifest>  
           <!-- See the Adobe AIR documentation for more information about setting    Google Android permissions -->  
           ...  
         ...  
           <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>  
         ...  
         ...  
      </manifest>  
     ]]></manifestAdditions>  
    </android>