Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)
Answered

inAppBrowser and "done" Button

I want to build an app where a list with links to SAP documents from the contentserver is displayed. When clicking an item in the list, the inAppBrowser should open and display the document. Then the inAppBrowser should be closed and the app should return to the list page.

Unfortunately I can not get the inAppBrowser to strat with the "done" button. So I have no way of closing the new window other than zhe device back button. I use

window.open(url, '_self','location=yes');

 

It seems that my window.open behaves like the normal statement from JS but not like the inAppBrowser.

 What am I missing here ? Any help is highly appreciated.


Best Answer

Hi Marcus


The InAppBrowser should work with Window.open, but depending on Phonegap version for enabling the inAppBrowser plugin. In NAD 2.12 SP03 we have the new plugin support for Phonegap. It might be that you missing the InAppBrowser plugin checked in our Export.


Is this a problem on Android and viewing PDF or other document type ?


Answer

Hi Marcus


The InAppBrowser should work with Window.open, but depending on Phonegap version for enabling the inAppBrowser plugin. In NAD 2.12 SP03 we have the new plugin support for Phonegap. It might be that you missing the InAppBrowser plugin checked in our Export.


Is this a problem on Android and viewing PDF or other document type ?

Hi Ole,


Is the app NADUI5_HCM_PAYROLL which is called from NADUI5_HCM using InAppBrowser?  If so, i exported NADUI5_HCM to Phonegap with the InAppBrowser option checked.  But when selecting on the Payslip, nothing happens.  Everything works well from within NAD.  By the way, I am testing on Android device.  Do I have to modify anything in the config.xml or index.html? Or do I have to manually include any libraries?


Thanks.

Hi Marcus


Yes we are using the InAppBrowser, but it will not work on Android. The best way to solve the PDF issue on Android is to use PDF.js


You can try it here:

http://ides.neptune-software.com/neptune/pdfview2.html?sap-sessioncmd=open&sap-client=800


If you would like to implement this, please let me know and we can help you out.


Regards

Ole Andre

This works all fine now with phonegap 3.3.0.

HI Marcus


Great to hear. We have also from NAD 2.20 SP02 also included the PDFViewer as a default plugin to our UI5 framework.


Regards

Ole Andre

Login or Signup to post a comment