Question

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();  
Was it helpful?

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>  
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top