I am developing a ionic app which has functionality to set reminder in app. After one button click i want to open up list which contains native ringtones of msg for both android and ios. How can i get these sounds in a list and then play it in my local notification of reminder. Thanx in advance
You can look into Cordova plugins that will provide you an interface to load up the system ringtones.
A Cordova / Phonegap ringtone plugin for Android. Set an audio file as ringtone, notification tone or alarm tone.
This could be helpful : https://github.com/Hiraqui/cordova-plugin-ringtone
Related
I have a React web app and I want that the user click a button an open the camera if it's in mobile device, in order to select pictures from the gallery or take photos directly with the camera. With React Native is quit easy, but I need to do it in web, with browers.
I have test the npm library https://www.npmjs.com/package/react-webcam but that library display the webcam in the web, I want to open the mobile interface, any idea?
You cannot access native android libraries with reactJS(that's why we use React-Native or Android SDK), someone is still to create a library for this.
You can always ask the user to upload an image instead.
Code:
https://codesandbox.io/s/elated-shannon-5yg9x?file=/src/index.js
I'm developing an Android app using Ionic for music streaming, like a personal Spotify. I can easily play an audio file using Streaming Media plugin, but it seems that this plugin was made for video purposes, because it always brings the player to the front in fullscreen, so you can't navigate through the app while the music is playing, you also can't lock your screen or the playback is stopped.
Is there any way to stream music in the background? Like when I tap the song I want to play, it just starts playing without bringing in another screen? (like you can easily do in AndroidStudio with MediaPlayer). I've search it anywhere for the past week and I just can't find any solution.
I realized Background-Audio in my ionic2/3 Project with
cordova-plugin-media 3.0.1 "Media"
cordova-plugin-music-controls 2.1.4 "MusicControls"
and to workaround some issues on ios I need to add this plugin also
nl.kingsquare.cordova.background-audio 1.0.1 "background-audio"
I am developing the ionic project(with angular Js ) where I need to play live streaming videos and also mp4 videos for that I tried HTML5 video tag but it wont work on ios.(It is working in Android Mobile Application)
thanks
VLC cannot run as a web plugin on Android or iOS because those platforms don't support the concept of a web plugin. You need to use a native component. VLCKit and libvlc-for-android are known to run correctly in mixed application environments and we are aware of multiple clients interfacing the native ObjC or Java interfaces through a bridge from a JS context.
I had web application written in AngularJS which works in all desktop and mobile browsers like Chrome, Safari etc.
Is there a way to convert it into mobile app?
You can use the framework Ionic coupled with cordova
http://ionicframework.com/
https://cordova.apache.org/
Hope it helps.
Cordova can do the job. As you have already an app, just need to build it using cordova. If you want to start a new project from scratch, Ionic will be a great option. As it is providing the layout and mobile friendly components for our use.
Please follow the steps in : https://cordova.apache.org/
You can use phone gap. In phone gap there is also plugins available for the mobile phone events like shaking and etc.
With the free version you can not add plugins, you have to buy phone gap for that.
Just create package with pure HTML, CSS and java script (angular js) and build it on the phone gap then you can download sdk and then you can install it on android.
Phone Gap
On AdMob, there's no option for HTML5 apps anymore, and on AdSense, mobile apps (even those based on webview, explicitly mentioned) are banned.
How can I use Google advertising to monetize PhoneGap app (built with PhoneGap Build)?
AdMob plugin was not available in PhoneGap Build before, as the old policy did not allow binary files submitted.
But now, they made a great change to their policy (http://phonegap.com/blog/2014/12/09/phonegap-build-new-features/), and now allow you to use the plugins in Cordova plugin registry.
To use Admob plugin in your app, just configure it in your config.xml:
<gap:plugin name="com.google.cordova.admob" source="plugins.cordova.io" />
To display a banner Ad:
if(AdMob) AdMob.createBanner( {
adId:admobid.banner,
position:AdMob.AD_POSITION.BOTTOM_CENTER,
autoShow:true} );
To display a full screen Ad:
// preppare and load ad resource in background, e.g. at begining of game level
if(AdMob) AdMob.prepareInterstitial( {adId:admobid.interstitial, autoShow:false} );
// show the interstitial later, e.g. at end of game level
if(AdMob) AdMob.showInterstitial();
More detailed instructions and example code are documented at its github project homepage:
https://github.com/floatinghotpot/cordova-admob-pro
PhoneGap builds native apps, so you'll have to use the Native AdMob SDK. There are guides on the web on how to do AdMob native implementation. But if you're more into plugins, check out the AdMob plugin for Cordova (Android | iOS).