Unable to open a pdf using foxit reader app from command line using am

0

I have installed termux in my android phone.

I have Foxit-pdf-reader installed in my Android phone

I want to open a pdf file using Foxit pdf reader from termux commandline

I tried to open the app using the below command in Termux and it successfull opens the Foxit pdf reader

$ am start --user 0 -n com.foxit.mobile.pdf.lite/com.fuxin.app.frame.AppActivity
Starting: Intent { cmp=com.foxit.mobile.pdf.lite/com.fuxin.app.frame.AppActivity }

Now i close the app and try to provide the Pdf file location My pdf is located at : /data/data/com.termux/files/home/storage/downloads/test_termux.pdf

$ am start --user 0 -n com.foxit.mobile.pdf.lite/com.fuxin.app.frame.AppActivity -d "file:///data/data/com.termux/files/home/storage/downloads/test_termux.pdf"
Starting: Intent { dat=/data/data/com.termux/files/home/storage/downloads/test_termux.pdf cmp=com.foxit.mobile.pdf.lite/com.fuxin.app.frame.AppActivity }

It opens the app as it was previouslt opened. But does not open the corresponding file.

Also tried

$ am start --user 0 -a android.intent.action.VIEW -d "file:///sdcard/downloads/test_termux.pdf"
Starting: Intent { act=android.intent.action.VIEW dat=file:///sdcard/downloads/test_termux.pdf }

This shows the various pdf viewers but not the foxit.

Also I tried

$ am start --user 0 -a android.intent.action.VIEW -d "file:///sdcard/downloads/test_termux.pdf" com.foxit.mobile.pdf.lite
Starting: Intent { act=android.intent.action.VIEW dat=file:///sdcard/downloads/test_termux.pdf pkg=com.foxit.mobile.pdf.lite }
Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=file:///sdcard/downloads/test_termux.pdf flg=0x10000000 pkg=com.foxit.mobile.pdf.lite }

this does not work

So how to open a particular pdf using the com.foxit.mobile.pdf.lite app. It opens when i click on any pdf from whatsapp or filemanager with foxit-pdf-reader. So it should be possible using command line also

android
termux
asked on Stack Overflow Nov 18, 2019 by Santhosh Yedidi • edited Nov 18, 2019 by Santhosh Yedidi

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0