MediaDevices.getUserMedia() on IOS, android native app by ionic? - ionic-framework

I've made voicecalling/videocalling/screensharing app for browser by webRTC/node.js/socket.io
And making PWA application for mobile users by ionic now.
Then, I can get user's (video and so on) track using MediaDevices.getUserMedia() on basic browser app and pwa
But unable to get on IOS, android native app created by ionic.
Maybe, I guess this is since MediaDevices is webAPI, and ionic is not supposed to translate for that. But I'm not sure, I have really limited knowledge about this.
does someone know there is possible way? Or simply it is impossible with ionic?
Thank you very much

Related

Ionic capacitor hybrid mobile application

I want to create a hybrid mobile app using ionic capacitor. When user logs in the app should open the main angular app in a hidden webview to initialize the angular app. The webview should be hidden for this time. After this when a user clicks on any links in mobile app, it should open in the webview and this time the webview should be displayed. The webview should open in the app container and not in the browser window (like InApp browser). Please help me if anybody have explored this kind of solutions.
My existing app is built using Xamarin and its built on the above concept.
I have tried the InApp browser but it does not give a good impression to the end user expecting a complete mobile app.
What you want to do is more or less possible if I've understood you well. I've done it in my job. We have a ionic app, but then there are some native screens developed natively for Android (with Java) and iOS (with Swift). With ionic you can call native code from Javascript. For that you need to make your own local Capacitor plugin: https://capacitorjs.com/docs/plugins/creating-plugins
In a plugin, the ionic Javascript function will trigger a native function (Java/Kotlin for Android - Swift/ObjectiveC for iOS). Once there, you can freely create native screens (Android = Activity, iOS = Storyboard/Controller) and then launch your native screens in the app. In our project most of the app is ionic, but we developed our own native screens such as a PDF Viewer, a Web browser, a QR scanner, etc.
But an app is not like a website, an app is a stack of screens. Which means that everytime you access a new screen, it's added to the top of the stack and the user can go back to the previous one. So, ionic will launch first. Inmediately after starting the app (or whenever you want) you can move the user to a native (android/ios) screen. However, if the user presses the native android back button, he will come back to ionic. If you want to prevent that, you need to code that behavior yourself (google android prevent back button). Likewise, you "can't" make the user go from the native screen to ionic, you can bring him back to ionic by navigating back programmatically.
Perhaps you can also change the launch activity to use a different one, and then later launch the ionic activity with native code. But I haven't done this myself and it could break ionic, so I can't advice you through this path.
I hope my answer helps, but I'm not sure I understood what you want to accomplish.

is it possible to make an application for video calls in Ionic?

I need to write an application with video chats (1:1), and i know Angular. There are tons of SDKs for Angular(or web) to handle video calls(like e.g. twilio.com, agora.io?). But my client need mobile app. It's possible to write native app in Ionic with video calls support? However, do I have to use something more professional like flutter to achieve this?
Is there any ready SDK to handle this in Ionic?
I am looking, I am looking for and I cannot find anything. And I have to make quick decisions in part.
Please help me :)
Yes.
You can use the camera and the microphone with Ionic (in native or pwa mode).
Ionic fully supports Angular and Angular components.
I recommend you the use of notifications like Google FCM to notify the caller.
You can trigger an action directly from the notification (app in background or in app which is not the same).

Desktop Application with Ionic framework

is there anyone who will help me about ionic framework.
I want to know that can we develop desktop and mobile application both with single codebase in ionic framework.
I want to know that can we develop desktop and mobile application both with single codebase in ionic framework.
Yes, this is exactly the purpose of Ionic.
Check out what is Ionic.
Yes, however you will find a few Ionic components do not provide an ideal user experience on the desktop. For example, ion-datetime should probably work as a dialog on a large screen, instead uses a mobile and touch only friendly slide-up UI with selection characteristics that make number choice with a mouse quite difficult.
Give Electron a try, on youtube search with: Ionic Framework with Electron for building Desktop Application.

Does Ionic compile the Code to Native?

I've searched some times here but could't find an Answer to this.
Does someone know this and can explain how Ionic handles it?
Does Ionic compile the Code to Native? NO
Ionic is for developing Hybrid apps.
What are Hybrid apps?
Hybrid apps are essentially websites embedded in a mobile app through
what we call a webview. They are developed using HTML5, CSS, and
Javascript, and execute the same code regardless of the platform in
which they run. They can, with tools like PhoneGap and Cordova, use
the native features of a device, like GPS or camera.
What are Native apps?
Native apps are developed in the language required by the platform it
targets, Objective-C or Swift for iOS, Java for Android, etc. The code
written is not shared across platforms and their behavior varies. They
have direct access to all features offered by the platform without any
restriction.
Here is a nice article about it.
Cordova converts the project into a native which has only ONE Page, that is a WebView (WKV WEB View in iOS, etc). And all of the ionic code is run on that webview. Basically an ionic/cordova app is a website which looks like an app!

Access mobile device camera from a grails application using jquery mobile

I have a grails application using jquery mobile. I am hoping to find some way to access the camera on the devices. I thought about using flash to grab the webcam but that obviously wont work on Apple devices.
Does anyone know of a way to do it and keep it all browser based? I am hoping that there is a plugin somewhere or maybe html5 has some magic in there that supports it.
I have researched this quite a bit (although about six months ago) and there is no API in the Mobile Safari browser for accessing a device's camera.
You have to have a native application for this type of functionality. For instance PhoneGap lets you use a device's camera: http://docs.phonegap.com/en/1.4.1/phonegap_media_capture_capture.md.html#Capture