0

I`m trying to load a excel file from a webservice using NgCordova In App Browser. The webservice returns a Stream and I set the return content type to "application/vnd.ms-excel" It seems to work when I use Chrome and Ripple but nothing happens when running from iOS or Android.

What am I doing wrong?

How can I make it work?

This is the piece of code to make the call to webservice:

var string = 'http://10.1.25.56/Triacao.WAP/SVCTriacaoMobile.svc/DownloadPlanilhaTreino?param1=test.xls';

                            $cordovaInAppBrowser
                                .open(string, '_blank')
                                .then(function (event) {
                                    // success
                                }, function (event) {
                                    // error
                                });
thiago
  • 377
  • 5
  • 20
  • android can't open xls files with inAppBrowser, but that should work on iOS – jcesarmobile Dec 22 '14 at 15:15
  • Also make sure that you reach to your server with that address at is a little bit different case when you emulate it on your computer. You can check the reaching for example from logs of your server. – Roope Hakulinen Dec 22 '14 at 15:22
  • workaraund for android you mean? try with _system instead of _self, that should launch an intent to open apps installed that supports xls files – jcesarmobile Dec 22 '14 at 15:36
  • this is cordova. there is no intent – thiago Dec 22 '14 at 16:43
  • Ok guys, I made it work on iOS using inApp Browser but on Android and WP8 I get a blank/white screen. Any solution for this? – thiago Dec 22 '14 at 17:42
  • yes, even using cordova there are intents. try with _system instead of _blank, that should launch an intent on android – jcesarmobile Dec 22 '14 at 22:23

0 Answers0