ポップアップウィンドウのようなカスタム画面で組み込みアプリを開く必要があるアプリケーションに取り組んでいますが、組み込みアプリを呼び出すと、画面サイズをカスタマイズする必要があるときに画面サイズがフルスクリーンになります。組み込みのアプリは、ブラウザや pdfreader のようなものです。
これが私のコードです:-
String strurl = "/sdcard/download/28889.pdf";
File file = new File(strurl);
if (file.exists()) {
Uri path = Uri.fromFile(file);
// Log.e("path of the file",path.toString());
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivity(intent);
}
catch (ActivityNotFoundException e) {
Toast.makeText(getApplicationContext(),
"No Application Available to View PDF",
Toast.LENGTH_SHORT).show();
}
これにより、アプリで新しいウィンドウが開きますが、このpdfreaderを表示して表示する必要があるポップアップのようなウィンドウが必要です。