I have below code to download an image:
anexoDownload(id){
window.open(this.global.UrlGlobal + '/api/v1/cadastros/despesa/download-anexo/' + id, '_self');
}
However when run on the device it opens the browser and downloads. This behaviour is only on the device. How to do this download without opening it in the browser?
Related
To debug a Mobile Application developed using Ionic 5 and Capacitor 2, I use:
ionic cap run android -l –external
Once the app is loaded in the device, I use Google Chrome and open:
chrome://inspect/#devices
Under my listed device, I open the WebView by clicking Inspect link.
This opens the Chrome DevTools window. I then enable the screencast. And then try to use the Select an Element option (Ctrl + Shift + C) to select the HTML element in the Elements pane.
This particular element selection feature has stopped working suddenly. I tried to reinstall chrome completely but it still did not fix. Any help is appreciated.
I am using flutter to write a simple app, everything works fine on Android, iOS, and Chrome. (I've also tested on Firefox & Brave Browser, all's well).
However, on Safari (Mac & iOS), the flutter app gets stuck on the index.html file and does not load the PWA.
The error from the console on Safari Inspect
How can I know what the anonymous function in js_helper is, or what main.dart.js:57063 refers to?
Is there any way of building for web without minifying?
Has anybody encountered a scenario where everything works on all platforms except Safari?
Flutter Doctor
Log from console when running on local server
debug for safari is not supported yet
but for anyone with the same problem you could solve it by running the app on release mode
flutter run -d chrome --release
after that open with the same port on safari and everything should be fine
You won't be able to debug it directly on Safari, but if you just want to test your app in safari with localHost, you can use these steps :
Enable 'developer' menu in Safari from settings of Safari :
Then check on 'Disable Cross-Origin restrictions"
Now after running release version of web app in chrome, use same app's address in Safari, you will be able to test it. Ex. http://localhost:51155/
to run in release mode : flutter run -d chrome --release
Hope this helps!
I am struggling to make HTTP native or HttpClient get to work for my app.
If I run ionic serve -c I get HttpClient working good on my browser at localhost:8100 and in Ionic Dev App. If I build for Android though, HttpClient fails thus I decided to give HTTP Native a try.
Then I don't understand how I could get some console log if that native plugin is not supported from Ionic Dev App (here says), neither I can see on my browser cause of Cordova is not present.
Is there a way to log on a device to debug HTTP Native?
You should debug your application connect your phone to your laptop and
Open your Google Chrome Browser
Go to Inspect (Ctrl + Shift +I)
Go To More Tools enter image description here
Open Remote devices and inspect your device
For more information click here
Thanks
You wont see native http calls log to the browser since they are called native from the device and never are called from the browser, but if you are debugging while connected to xcode, the xcode debugging output should give some information about your native HTTP calls success and failure.
Following #vd_virani answer, here is a quick link to inspect a device from Chrome
chrome://inspect/#devices
Plug your device via USB, then copy & paste this link in your Chrome address bar like a website.
So I'm reading in this link and it says we can use chrome for remote debugging an app which seeems great but they don't explain how to do it. When I click in the link they provide which has some android documentation, I just see java code. As a non java-developer I wonder how can I use remote debugger in chrome for ionic framework?
To access remote debugging of a webview on your phone, plug your phone into your pc and go to chrome. then type: chrome://inspect into the url bar. open your app on your phone and it should show your device on the inspect dashboard.
I made a webapp that uses a manifest file to work offline.
The files are "text/cache-manifest" (due to a .htaccess file, HTML5 Boiler Plate) and in the console of Google Chrome I check all files are loaded properly.
When i test my application without Internet in a PC or an ipad (iOS5) (both Safari and desktop icon) all works fine. When I start my application on a iphone (iOS 6) from Safari web browser without internet all seems to work fine, but when you start the webapp clicking on desktop I recieved the message I can't open the application without Internet.
I tried with the names "cache.manifest" and "manifest.appcache" for the manifest file.
Anyone can point me to the right direction? Thanks!