0

I have a document file stored in my application's data folder, which is a kind of private folder to the application. It is a .doc file. I have doc viewer application installed in the device. Now, how can I open the file with the Action_view intent. As the viewer application can't access file stored in my application data folder, it is throwing an error saying file can't be accessed. I have no interest to copy the file to phone public folders like sdcard. Is there anyway to open that doc file. Any clue on embeded apk in android.

Thanks & regards,

Suman

4

1 に答える 1

0

これを直接行うことはできません。ファイルを一時的にSDカード(外部ストレージ)にコピーするか、権限を一時的に に設定してWORLD_READABLEください。Android には埋め込み APK はありませんが、ビューアがライブラリとして利用できる場合は、それをアプリに含めることができます。もちろん、アクセス許可を一時的に変更することの問題は、ユーザーが閲覧を終了したときに実際に通知を受け取らないことです。

サード パーティのアプリケーションで表示する必要があるのに、なぜプライベート ファイルなのかという疑問が生じます。それがデバイスのユーザー向けである場合、それを隠してもあまり意味がありません...

于 2012-12-18T06:02:56.047 に答える