Audio problems in nativescript app on iOS - nativescript

I have a nativescript-app that uses text-to-speech functionality (#nativescript-community/texttospeech).
This is working fine so far.
Now, I open a modal-view with the #nstudio/camera-plus plugin that enables the user to capture a photo.
After closing the camera-view, the audio of the text-to-speech is only half as loud as before.
Is the camera messing up the audio-settings? And if so, how can I avoid that?
Nativescript 8.1
texttospeech 3.0.3
camera-plus 4.0.3

Didn't find the cause for this, but at least a workaround.
I put this above every audio-related task:
AVAudioSession.sharedInstance().setCategoryWithOptionsError( AVAudioSessionCategoryPlayAndRecord, AVAudioSessionCategoryOptions.DefaultToSpeaker);
That sets the volume back to full.

Related

How to do a Flutter Firebase app for both Mobile and Desktop at the same time

I see many samples and videos on how to do firebase for mobile and they call this "multiplatform". However, I don't see much on the desktop. There is one video on firebase flutter Windows by using a web and it seems to work. However, I do not see any tutorials for both mobile and desktop. Firebase would be a great example on syncing between desktop and mobile. We have such an app in development right now. Desktop development is new, but I'm surprised how little there is.
There is a library called firebase_dart, but the documentation seems weak.
The package firedart with the video listed above works in both desktop (linux and android without much modification..
What needed to be modified?
I had difficulty with the button on the very top of the phone, so I
added a sized box.
I had difficulty with debugPrint or print so I
added a Text widget with the results (to string).
That also worked.
Although I would like to not use fluent_ui, it does work for both desktop and mobile. I'm not sure what to do with realtime db, but I think I can make the firedart work for user sync between mobile and desktop.
It would be better if I could get firebase_dart to work.
https://www.youtube.com/watch?v=Tw7L2NkhwPc

Display app icon on top of all window in android wear?

I am developing an wear app, i want the app icon to be display on top of window
above the watch face. I have tried using WindowManager but failed to get the
result.
WindowManager.LayoutParams params=new
WindowManager.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT);
params.gravity= Gravity.CENTER|Gravity.CENTER;
params.x=160;
params.y=160;
windowManager=(WindowManager)getSystemService(WINDOW_SERVICE);
windowManager.addView(mfloatview,params);
my question is it possible to add an floating app icon in android wear?
I'm not sure if this feature (Display app icon on top of all window) is available. But you can try checking the documentation - Watch Face Complications.
A complication is any feature in a watch face that displays more than hours and minutes. For example, a battery indicator is a complication. The Complications API is for both watch faces and data provider apps.
Just like this:
Since you are using Android Wear 2.0, Complication API will be available for use.
Hope this helps.
I tried this one and works for android wear also...
apply same concept to wear, it works
http://www.androidhive.info/2016/11/android-floating-widget-like-facebook-chat-head/

Deploying OSX App as an available device (camera)

I have an existing OSX app (Xcode 7, swift) that collects real time data (both textual and photos) from various local and internet (Json) sources to present in a user window.
I want to present the same data stream as an output stream that will appear as if it were just an OSX add-on camera (so that it can be selected as a camera source in other OSX programs).
Having trouble finding any framework documentation or examples for an app to act as a camera. Any help greatly appreciated.
Have you seen this project? https://github.com/rsodre/ofxFakam It seems the way to add a video recording source to OSX is to create and install a quicktime component. Unfortunately I don't know much more than that. On the plus side, it all happens in user space!

iOS app only plays sounds through headphones

The iPhone I'm using for development only outputs sounds through the headphones for all the apps I'm running from xcode. Other apps (like Youtube or iTunes) play sound just fine, and also building and testing the very same apps on a different device (an iPad) works perfectly. Running the apps in simulator also works as intended.
I'm using:
Xcode 6 (working in Swift 1.2)
AVFoundation library and AVAudioPlayer
iPhone 6 Plus (with iOS 8.4.1)
the phone is not in silent mode
Any tips or hints would be appreciated. Thanks
Sometimes the audio route can get a bit messed up.
You should listen to the audio route changes using the AVAudioSessionRouteChangeNotification
See HandlingAudioHardwareRouteChanges
You can also force the audio route if needed. Working with Audio Input and Output Routes
Oh, and also check the reason for the change to know why its happening on that app. AVAudioSessionRouteChangeReason

Recording Audio Stream in Background in Windows phone 7/8

I m developing an app which can record audio stream.
I want to know that is it possible to record that audio in background, i,e when the application is in deactivated mode?
I have already tried to do that in many different ways,but its not helping out.
Please suggest me some way to do such...
Thank you.
As mentioned in the comments, it's not possible to record in the background.
Your app must be running in the foreground for it to be able to record audio using the microphone. For an overview of all the audio recording options, please refer to this tutorial on the Nokia Developer Wiki.
Also, an app will not run when the phone is locked - it is suspended. So if your app was recording, it would stop when the phone is locked. You can change this behaviour with IdleDetectionMode.Disabled which means your app keeps running even though the phone is locked.
Haven't implemented it before, but classifying it as a VOIP app could be the way to go:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207046(v=vs.105).aspx

Resources