Note: I am not an app developer and if what I am about to say doesn't make sense, please guide me.
I have developed a cross-platform (Windows and Android) app using .NET MAUI Blazor. Previously, I used TableToExcel.js library to save files in a Blazor WASM app.
I am using the same code and library in my current MAUI Blazor app.
The problem is that it worked fine for the Windows app but doesn't do anything on Android.
function exportReportToExcel(id, fileName, columns = null) {
fileName += ".xlsx";
let table = document.getElementById(id);
TableToExcel.convert(table, {
name: fileName,
sheet: {
name: 'Sheet 1'
}
});
}
I am calling this method using JSInterop and it downloads a file in Windows but not on Android.
Confession: before trying this I have an idea that it won't work as the browser and (desktop or android) apps are completely different, but I thought to give it a try when I first tried it on the windows app and it worked so I was hoping that it might work on android as well but unfortunately.
Note: if I publish the same code as blazor WASM same code works, but not working for MAUI android app.
Related
I have developed an application using Angular 7 with Responsive Web Design(RWD). I have converted this application into an Android APK that runs the app inside a webview. However, I have found Some of features of Native app ( like Opening Camera,Open file browser) in android App not working.
What extra effort would be needed to convert an RWD to webview Android App?
Javascript nor code running inside a webview by their nature, do not have access to a device's hardware. You will need to access the OS's native code to be able to use them.
The easiest approach I would recommend is using a hybrid app platform such as cordova.
I am developing an app with Cordova + Webassembly.
The customer needs the app to work on Windows and Android.
I am using Visual Studio 2017 + TACO.
The webassembly is generated from C/C++ code using emscripten and is working all fine on Edge and Chrome. It is also working on an Android device (Chrome)
The Cordova app running on Windows is working perfectly.
Now my problem is on Android. The Cordova app on Android log this error:
Fetch API cannot load file:///android_asset/www/script/myApp.wasm. URL scheme "file" is not supported.
I can't find anywhere if Cordova supports WebAssembly on Android. My understanding is Android is using a WebView component and should rely on Google Chrome (my Webassembly is working fine on Chrome on Android).
Is there an option somewhere to add a mime-type for cordova on android?
Thanks in advance for any help.
There is another option using the XMLHttpRequest object like showed at https://studiolacosanostra.github.io/2020/02/23/How-to-run-rust-wasm-on-cordova/.
Of course, you don't need to overwriting the fetch function like they do there, but you certainly can use the idea to create your own function.
As you can see in the console, "URL scheme must be “http” or “https” for CORS request.".
Is it possible, with AIR app, to automatically open the phone app on IOS when the user clicks on the number ?
I've managed to do so with Android :
phoneNumber.addEventListener(MouseEvent.CLICK, phoneClick, false, 0, true);
function phoneClick(event:MouseEvent):void
{
navigateToURL(new URLRequest("tel:255050"));
}
But it's not working on IOS.
Thank you for your help,
Yes. We can do it using the Native Extension. You have to develop the Native Extension for your application and AIR Application will pass the request to the Native Extension and Native Extension will be execute it.
Native Extension is nothing but Native Application development which will be provide OS Level request execution from AIR Application.
Please refer given below link to get How Native Application will open another application: Click Here For Native Application Help
I am new to PhoneGap and Mobile Application Development. I want to create an application using PhoneGap so that I can get Android, iOS, BlackBerry versions of the same app.
I have installed PhoneGap in my windows 7 Desktop using tutorials given in https://www.youtube.com/watch?v=nqFpfrUrMM4
I have some questions regrading PhoneGap:
Can we create multiple pages(HTML Files) or we only have index.html single file?
Can we use jQuery UI plugins, Mobile jQuery UI and other iQuery plugins? Will PhoneGap cloud service be able to convert to mobile app?
I have created Hello World example and uploaded zip file to PhoneGap and it converted to Android, Windows app but for iOS app it shows error certificate(P12) and provisioning file. I have windows 7, how can I get that legally? (My friend has Mac book. I can use it)
I want to launch app to Play market and iTunes but I have no idea what I need to do after uploading zip to phonegap.
I will really appreciate if you can provide me with the suggestions, steps that I need to take or links that would ease whole process.
Thanks!
You can make multi-page apps with PG. All of my apps are.
You can use those plugins. If they work on a regular web site, they'll work in PhoneGap. PhoneGap Build should be able to package all the scripts as one app, as long as the content is within their guidelines.
You need a Mac to get it. This page gives a lot of directions: http://centuryware.wordpress.com/2014/10/30/how-to-create-and-test-ios-apps-on-phonegap-build/
You'll need to sign up for a Developer account at https://developer.apple.com/devcenter/ios/index.action to upload an app there, and a Google Play account at http://developer.android.com/index.html to upload to that store. Once you sign up, read their docs. It can get pretty involved on the Apple side.
I used AppsGeyser to create the Android version of my web app.
I'd like the web app to show an Android button linking to the app on Googleplay, but not show it on the web-app version.
I'm unsure how to do this, since Appsgeyer needs to use my web app to build the Android app.
Is there HTML or other code I can use to check if this is the Android or web app, and display accordingly?
Thanks for your time and help.
Check UserAgent in javascript. Here's a solution of how to detect mobile browsers.
It can be shortened to something like
if (navigator.userAgent.match(/Android/i)) {
showButton();
}