Does anyone know how do i get the list of all the applications installed in phone that can run audio files in react-native? - react-native

I want to create a functionality in react-native app such that on pressing a particular button, it should get me to the "open with" window, and that window should fetch me the list of all the installed applications in the phone which can run audio files. How can i get such list?

On a Android system, that "Open with" screen pops up when:
The user have more than one application that can play that specific audio format(Because it's not every app that can run every audio format).
The user did not set-up a default app to open the audio format.
So, You should just use a library like rn-fetch-blob to open the file for you, like as follow:
RNFetchBlob.android.actionViewIntent(fileLocation, mimeType)
And android will take care of picking the right app for you.
In case this answer does not satisfy you, you can get a list of apps using react-native-android-installed-apps-unblocking, but there's no information about wich ones can run an audio file, and maybe IOS will have some restrictions about what can be done, so your best option is to let the system do that for you!

Related

chrome command line flag for auto sharing system sound

I am developing web automation of Zoom meeting (all the way from creation till joining and leaving thereon).
I have been able to complete the creation, joining and screen sharing automation.
I am using --auto-select-desktop-capture-source=MyTab flag to automatically share the desired tab. Up until here, its all working fine.
Where I am stuck is that the chrome tab gets shared without system sound.
I want to automatically share the screen/tab along with system sound / tab audio.
What is the appropriate chrome flag for sharing audio along with screen?

Save User Preferences in MobileFirst 7.1 Hybrid App

I have developed a Hybrid Mobile App using MobileFirst 7.1 and now I want to ask user about how they like the app. My app displays alert with 3 buttons which display "Not Now", "Rate It" and "Never". Depending upon the option they select, I want to save the user preferences locally in the devices(Android or iOS) so that according to the selected option I can control the alert. How can I achieve this?
Your use case is similar to this question, and the solution I would recommend is the same. Data that you want to save persistently on the client device (such as user preferences) could be saved in JSONStore documents. These are stored locally, and will persist across executions of the application.

Add more one button on Attach menu of Whatsapp

I've an idea to develop a modification to WhatsApp, for example now when I click attachment symbol it shows only 6 I want to add one more option to it. If it's possible let me know. I want to add more one button on Attach menu.
It is not clear what exactly you are asking.
You have an option to launch other applications from your app.
If you want to change the way a certain app looks, or behaves you have to write something similar to it for people to use, but you cannot change the original app (no one will let you)
Here you go! it's possible, as #Jef said in comments.
using documentation interaction controller.
https://www.whatsapp.com/faq/iphone/23559013
you need to work on how to hook into attachment menu.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDocumentInteractionController_class/
There is an assumption in your question that these other apps are put there by the whatsApp developers, or by a third party who was somehow able to modify their code. I suspect that what is happening is that they (whatsApp) simply export a document/file of a certain type (UTI) If your application supports that same UTI it should appear here. So there is six buttons for you, on your phone, but another user might see a different number, it depends entirely what they have installed on their device.
CONCEPTUAL.. if you double click on a file on your computer then the file browser (OS) opens that file with some application or other. Perhaps it is a .doc file and the OS pushes that file to word or pages. Or it may be a .psd file and it gets pushed to photoshop. How does this happen? The OS has a registry (database) of applications for each file type, applications sign up on this when they install/update. If you right click on a file you see an 'open in..' option that lists all your applications which can handle that file type, this is the menu that you are wanting to get onto (for whatsApp's file type) imho.
So you need to
1 ascertain what file type (UTI) WhatsApp is exporting
2 declare support for that file type in your application (this is the bit which will be platform specific solution) (iOS docs https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1 )
**edit/addition
3. add the code to actually handle the file when your app receives it. On iOs this is in the appDelegate in
-(void) application: openURL: sourceApplication:annotation:
If the Whatsapp people have published an API then thats where you want to look. Good luck

'Open In' functionality after downloading document?

I am developing an iOS app that allows users to download documents off a server. I have gotten this to work fine and they can even view the document. What I want, though, is for the document to have an 'Open In' action so, when a button is pressed, the user is able to select another application that allows you to look at PDF documents -- for example, the Kindle App. Is this possible?
Darn, I was wishing you were going to say "MacOS" because that would have made the answer a lot more fun (and do-able).
As far as I know, iOS still does not have an official SDK-legal way to have one app (your app) arbitrarily launch other app and specify an arbitrary document to open with it. This is part of the magic (?) of having to live within your own app sandbox.
On the Macintosh, this would be easy with Apple Events (among other things).

Screenshot into AIR application

Is there away to copy a screenshot directly into an Adobe Air (2) application?
Kinda like this: User presses the "print screen" button and the screenshot shows up in the app.
Also I'ld like to know if pasting via keyboard or right-click work for that?
I'm new too AIR.
Best, John
Yes, it can be done.
But no, not directly from Air, unless you wish to capture parts of your own AIR UI (which should be no problem as these are within the scope of the AIR Application)
To capture the whole screen you would need to use an ANE (Adobe Native Extension) which can be written
both for iOS and Android devices and used from within AIR via an API.
Introduction to ANE Development:http://help.adobe.com/en_US/air/extensions/air_extensions.pdf
The following post discusses on the way by which an Air ANE can capture a screenshot (which is technical and relevant for developing such an ANE for Android)
How Native Extension take screenshot on Android device?
Other then this you might try a workaround, that is, instructing the user to capture using his own device's capture combination, then simply ask them to select the file from the Gallery, if indeed this is your intention...?