Is it possible to get the audio coming from a different application? I'd like to perform app specific-modifications to the audio coming from other running applications. After a lot of searching, I still can't seem to find any examples or proof that you may be able to.
Related
My goal is to develop an Android app to record telephone call audio (incoming and outgoing calls). Not VoIP, not SIP, not anything else.
IMPORTANT: I will not create an app that relies on workarounds, rooting devices and/or hack it in any way, shape or form.
Surely enough, I also expect to sell this app on Google Play store. In other words: all by the book.
As far as I learned from the documentation (https://developer.android.com), the way to capture phone call audio is by using MediaRecorder with audioSource set to VOICE_CALL. This audio source requires permission "android.permission.CAPTURE_AUDIO_OUTPUT", which in turn is "reserved for use by system components and is not available to third-party applications.".
On the other hand, I also did my research in forums like this. Unfortunately and recpectfully, all of the "solutions" were, in fact, workarounds. Other than that I have found some people stating that the lack of API support was deliberately by design and that kind of app functionality is forbidden by Google. Though, no official references were provided to support those claims.
At this point, looks like it can't be done.
Before giving up, I would like to ask the following:
If It's really by design and forbidden to record phone calls, could you point out where, exactly, in some official documentation and/or some reliable source (like... android team, for instance) that explicitly validates those claims?
Kind regards,
Juan Soria
I am developing a hybrid mobile application (using Ionic 2) that allows users to overlay audio on a video. Essentially, the video and audio track are able to play at the same time. The challenge is getting this behavior with Google Cast functionality – I want the user to be able to Cast the video as well as the separate audio overlay to their Cast device.
I’ve decided to develop a custom Cordova plug-in (starting with Android) that implements the Google Cast API natively for the following reasons: Google Cast Web API depends on the Chrome browser so our hybrid app running in Cordova’s WebView won’t work, and the most up-to-date Cordova plugin that I have seen A) doesn’t implement this audio overlay functionality and B) appears to be abandoned since Sept 2015.
That’s the background, now the question.
How I understand it so far, generally the Cast API works by sending the Receiver Application a URI, and the Receiver Application takes care of fetching this resource either from a server or from the Sender app’s resources. This poses a problem for me: my application utilizes two resources simultaneously.
I saw here that MediaInfo can represent a grouping of MediaTracks, which could be audio, video, text…etc. Am I able to have multiple MediaTracks active at the same time? Should I be exploring custom implementations in a Custom Receiver App to enable multiple active MediaTracks?
Should I look into demuxing the mp4, mixing the audio streams and muxing into a separate, temporary mp4 file, and handing the URI of this temp mp4 off to the Cast Device?
I’m in the research phase right now, but will be implementing and testing various solutions over the next few weeks. What other creative solutions can anyone think of? Has anyone done this before? And lastly, can anyone say for certain that this cannot be done?
Any help/advice is appreciated.
Cast SDK on the receiver doesn't support more than one active media element, so even if you write a custom receiver and include two media elements, one for video and one for audio, only one can be active at a time, so that is not going to work. If you can mix them into one mp4, then that is going to be the best approach and can work with Default or Styled receivers as well (hence no need to write a custom one).
I know this is not programming question but i really want to know what internet protocol is used by google play store, as of know i am thinking they are using HTTPS but i am not sure about whether they used it for searching or downloading, i searched but not find satisfactory answer.
I also how i will protocol used by different apps installed in android.
I tried to find different protocol used by different application and i sort of find about some apps like Whatsapp, FB etc but i need to find about mostly used protocol.
This information is need for my literature survey for my research.
I would ask this kind of question on http://android.stackexchange.com more than here. If you want to find it out directly, use Wireshark or Charles (OS X). With one of these tool, you'll be able to see all out outcoming and incoming connections of your android device (and then able to study the different protocols).
But the standard in the industry is definitely HTTPS and all the companies, even the small startups use HTTPS.
What opportunities are there for regular app developers (with that I mean, you're not a million dollar content producing company or distribution channel provider, but a regular, small app development company) to secure video/audio content for the app from being saved/distributed.
I mention the 'regular developer', because I had seen in the Android core code that Sony had added some code portions into it, in the DRM packages. Let's assume we're not that powerful to talk to Google to include such in their core code.
Are there any real secure ways to protect video/audio (as part of an app) on Android.
Assumptions (correct me if I'm wrong):
devices could be rooted by the users, need to be aware of that
detection whether a device is rooted or not (within an app) is not really possible on Android, as a super user can basically fake any state of the device.
we cannot modify any hardware or the user's system (meaning: we don't bundle our app product with a device, the app should be available as a 'regular' app on the App Market for download)
the media files/stream could be locally on the device or come remotely from a server, both is ok
I have researched this topic quite a bit, googled a lot, went through (hopefully) all related questions here on SO, I have talked to one DRM provider (which is really hard to get in touch with as a small company or freelance developer, or at least to get some real relevant information, technical docs and details).
I looked into DRM as one approach, but "security-by-obscurity" does not seem to be a very good way. Besides, I haven't found any information or real solutions/APIs for regular developers.
Public-key encryption was another idea, but where to store the private key really safely? Furthermore, I assume that in such case, the entire media framework & player would need to be rewritten, in order to pass a secure video stream to the player. Or am I mistaken?
I would like to get some opinions from other experienced developers in the field, as it's really hard to find information about media content protection for Android anywhere.
Update:
In the context of my question, I found this Question and it's update interesting: Streaming to the Android MediaPlayer
Are there any real secure ways to protect video/audio (as part of an app) on Android.
If by "secure", you mean "fullproof", then no. See Analog hole.
detection whether a device is rooted or not (within an app) is not really possible on Android
Nor is it possible anywhere. the laws of the universe make it impossible to detect such a thing, (okay, maybe you could exploit quantum physics for this, but even then I'm not sure) you can only add code to detect known techniques, all of which are trivial to bypass.
Public-key encryption was another idea, but where to store the private key really safely?
There is nowhere to store it safely. Think about it, you want to encrypt content and give the user the key to decrypt it (so he can watch it), but you don't want him to be able to decrypt it (so he can't copy it). This is a contradiction.
The most you can do is encrypt your stream to prevent the user from being able to just intercept it and use it. Then obfuscate the code that decodes/plays the stream. Though by implementing that you risk introducing more bugs (and worse performance), making the legitimate user's experience worse. If decide not to roll your own obfuscation, and use some automatic obfuscater product already available by some big company, it will already be generically cracked, and it will be extremely easy for someone who hardly knows what he's doing to crack your product in a small amount of time. As long as your product becomes remotely popular, one person is going to crack it and upload all the videos to torrent, then everyone will be able to pirate your product without doing any work.
I don't think there is a solution to protect media content in apps from being ripped off. DRM is of course not suitable for regular developer. I don't see also why public key can help.
For my question, time is more important than perfection. I need any advice you can quickly give me about embedding a video in a mobile website which is targeted for Android devices. Since I have only very little time for research (for the first research, only today, but of course the implementation will follow later), I need any advice you can give to me, no matter how vague or imperfect it may be.
Here is the scenario:
A video must be embedded in a mobile website, using HTML.
Only Android clients are relevant, because iPhones and non-Android devices will be directed to another URL.
Preferably, the video should be integrated into the rest of the web page. In case an external player needs to be opened, it would be preferable if that player has a "return to web page" button of some kind that will return the user to the web page.
The customer is aware that this will not work perfectly on all devices, but we want to find a solution that works well at least on the more modern devices.
If you have any experience regarding this field, please let me know of it. Here are some areas that might be helpful:
HTML code that you have found to be working
Encoding specifics regarding the video (e.g. which codecs to use or not to use)
Other StackOverflow questions regarding this topic which I have overseen in my haste (sorry about that, time is sparse for me right now)
Since I can only choose one of the replies to be the answer, my choice for that has to be very arbitrary.
So far, I have found these two other StackOverflow questions, which cover parts of this topic:
What video format will play on all Android devices?
Embed video and play on android
What about embedding flash? Not all android devices have it but the ones have it should be able to play properly encoded mp4 video
For video encoding check http://developer.android.com/guide/appendix/media-formats.html