Is it possible to use MediaRecorder API in service??? - Nexus One Themes and Apps

I try to use MediaRecorder API in service instead of Activity.
Is it possible to use MediaRecoder API in background???
I want for the camera application to continue recording
when the other application is active.
I want for incoming call not to stop the recording.
If anybody has good idea, please let me know that....

Related

[Q] Share/Send recorded sound

hi,
i used an existing sound recorder and implmed, one by myselft.
There are some samples form MS, how to do sound recording too.
Now i want to send the recorded sound to another user's android phone.
Should be simple
- Send as email attachment
- Send via bluetooth
I did not find a program on the marketplace and trying to implent this by myself i found no example, how to do this. In this forum and on other resources, i read, that it currenty is not possible, to send email attachments programatically.
Is there really no way, to do such a simple task, as sending/sharing an audio file (after converting the recorded byte-array to .wav format) to another phone via email or bluetooth ?!
regards,
hannes
E-Mail attachment shouldnt be hard but WP7 does not support bluetooth file transport
Forget about bluetooth (until MS releases some kind of BT API). As for email attachment, you have a two options:
- implement smtp/exchange client by yourself;
- use (create) http "proxy" service on the external server (you sending audio data and additional parameters, and service forms the message with attachment).
Both ways a really not easy and expensive.
Send me a PM and I'll write something and upload it to the marketplace tonight.
MJCS said:
E-Mail attachment shouldnt be hard but WP7 does not support bluetooth file transport
Click to expand...
Click to collapse
The problem is: An email attachment in fact IS hard (impossible), without using some external service.
sensboston said:
- implement smtp/exchange client by yourself;
- use (create) http "proxy" service on the external server (you sending audio data and additional parameters, and service forms the message with attachment).
Both ways a really not easy and expensive.
Click to expand...
Click to collapse
Thank your for your response!
This is quiete the same, what i found out too. It is possible (i am a developer and i can host such a sevice on my domain) but that's not the way i like to do it.
I play in a band and recorded some demo with the phone and now want to send this recording to my band colleagues but it was not possible to do this.
This should be as simple as "open a bluetooth connection" + send.
On a windows phone, store it in the "media collection", on other phones, store it on a selectable location on the file system.
This is really anoying.
I like the platform and like developing for it but not beeing able to do such simple things...it's hard to argue, why WP is better than f.e. android.
MJCS said:
Send me a PM and I'll write something and upload it to the marketplace tonight.
Click to expand...
Click to collapse
I think, i don't get the point of your reply.
What do you want to write - a program, that does does recording audio + email it to other users?
I am searching for a solution, how to develop this by myself, not for a program on the marketplace.
regards,
hannes
HannesB said:
I think, i don't get the point of your reply.
What do you want to write - a program, that does does recording audio + email it to other users?
I am searching for a solution, how to develop this by myself, not for a program on the marketplace.
regards,
hannes
Click to expand...
Click to collapse
Oh...and I had already started programming it. Oh well. Basically do this:
Upload to SkyDrive using the API or...
Create a WCF Service that allows you to send a file stream
Have the files stream get written to the server as a GUID
Return link to file
Send link via e-mail
Have file expire after 24/hrs or something
hi,
thank you, for your response.
...and starting programming on it so fast.
(if you really started programming it - put it on marketplace, i am sure, many people would like souch a tool)
The "problem" with this approach (and email too) is:
- i need an internet connection to upload
- the people that want to download the file, need an internet connection
- there are still people, that don't have an internet flatrate for their phone or any internet connection (or have to use roming, if not at home) and jus say "..hey, you recorded it - send it to me via bluetooth".
Seem's, the steps you discribed, are the only option, to do it. The phone i used 5 year ago, could send pictures and audio recording via bluetooth and since the mango update is currently released and doest not contain an api for bluetooth access, i think it will not be released soon, if ever.
In another posting i read: "I take a picture with me and my friends and i can't send them over the bluetooth. They have cheap dumbphones and I have Omnia 7 and I'm embarrassed. Bluetooth filetransfer is essencial feature."
Ok, this is "offtopic" now, sorry but anyway thank you for your responses.
The steps you explained are possible for sure, but in my opinion a bit "much work", for simply sending some data != text.
HannesB, I agree with you, it's kinda annoying. But, probably, MS will open some new APIs in future (WP7 is based on WinCE so it's not such a big deal, code/drivers are already exists for that platform). Don't forget - WP7 platform is still too new.
I have an app called CopyCat. It will let you do recordings (and change the playback as well).
http://www.windowsphone.com/en-US/search?q=copycat
It will let you store to the Public folder of your DropBox account.
As previously mentioned, unfortunately there is no way to attach WAV files to an email currently.
Hope this can be of help.
Why are you guys complaining about a function that you can have with evernote you can record sound and save it on your evernote account over your windows phone

is there a way to know which API is calling an application?

Hi to all,
sorry for my poor english but this is not my first language.
I'm a Ph.D student and i'm trying to understant if something we are working on is feasible.
We are looking for a method to know in real time, directly on the phone, which API an application is calling.
For example, i wonna know in realtime if an application call an API to turn on the bluetooth or call the API to send an information (of any kind) through the bluetooth connection.
Any help would be really appreciated.
If you need further information just ask, maybe my explanation was a little bit too shallow.
Lierus said:
Hi to all,
sorry for my poor english but this is not my first language.
I'm a Ph.D student and i'm trying to understant if something we are working on is feasible.
We are looking for a method to know in real time, directly on the phone, which API an application is calling.
For example, i wonna know in realtime if an application call an API to turn on the bluetooth or call the API to send an information (of any kind) through the bluetooth connection.
Any help would be really appreciated.
If you need further information just ask, maybe my explanation was a little bit too shallow.
Click to expand...
Click to collapse
Hi Lierus,
no problem about the english, it is not my mother tongue too (I'm a PhD too)...
Did you take a look at "Intent"? http://developer.android.com/guide/components/intents-filters.html
It is the common way to both start a new activity in the same application and start an Activity/Service in another application that expose an API invokable by an Intent.
I do not know if this can help you or not? however if you give more info maybe I can give you a more precise answer.
Simone
Hi Simone, thanks for your answer.
I bet you're Italian .. I am too
Maybe i was too generic in my original question.
My final purpose is to know when a generic application (a third party application) uses some devices or, more generally, calls an API to use such devices. These calls that i want to monitor are the ones related to the manifest's permissions.
This action should be registered by the application i'm writing..
Example:
Application "Pippo" has the permission to use the Bluetooth (grant by the user during installation).
My application "Monitor" should know and register when Pippo really invokes the Bluetooth Api!
Thanks again
Marco
Lierus said:
Hi Simone, thanks for your answer.
I bet you're Italian .. I am too
Maybe i was too generic in my original question.
My final purpose is to know when a generic application (a third party application) uses some devices or, more generally, calls an API to use such devices. These calls that i want to monitor are the ones related to the manifest's permissions.
This action should be registered by the application i'm writing..
Example:
Application "Pippo" has the permission to use the Bluetooth (grant by the user during installation).
My application "Monitor" should know and register when Pippo really invokes the Bluetooth Api!
Thanks again
Marco
Click to expand...
Click to collapse
ok, I understood.
I think that if you want to build an app like a "monitor" you have to monitor the "Intent" that the apps use in the Android ecosystem to call both external API (third party application) or internal (e.g., start a new Activity). For example, we have a device with an app (named Pippo) that sends data over the bluetooth connection.
Basically, Pippo calls isEnabled() to check whether Bluetooth is currently enable:
Code:
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
the Monitor app should register an intent-filter on the "ACTION_REQUEST_ENABLE" action, so when the Pippo sends the intent, the Monitor receives the Intent and then forwards the Intent to the right app (like a man-in-the-middle).
what do you think?
p.s. take a look at this app https://play.google.com/store/apps/details?id=uk.co.ashtonbrsc.android.intentintercept
Best,
Simone
Yes this is a good starting point..
I will investigate this opportunity
i hope that i can discriminate and understand who invokes the intent (not just when it is invoked).
Thanks again.
Marco
Is it works?
Sent from my LegoIce™Galaxy_S4 using XDA Premium 4 mobile app
dhirajahuja432 said:
Is it works?
Sent from my LegoIce™Galaxy_S4 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
yes
try it yourself,
https://play.google.com/store/apps/details?id=uk.co.ashtonbrsc.android.intentintercept
the implementation of this app, is based on the idea explained above.
Simone

Q: Howto Record from microphone, process and then transmit uplinc in voicecall?

Hi All,
I have a small question regarding an app I would like to write. The idea is simple:
While in voice call I would like to intercept the audio recorded by the microphone, process it with some algorithms I already have (some DSP to make several kind of voice effects, e.g. robotic voice, mosquito voice and etc) and then forward it to the voice uplink so the other party would hear this processed voice signal and not the original.
Is this possible? Is there a ready API to access in-call microphone and send voice uplink or do I need to do some kind of low-level programming?
My target is Nexus 5 with Android 5.0 on it by I would like to make it as generic as possible. (I also have a vendor rooted chineese phone with Android 4.2 if voice access requires root previliges).
Thanks!
(And in case this isn't the right forum - I am sorry, I browsed through lots of forums here on XDA and this one seemed the most appropriate)
No replies at all? No one knows the answer?
No replies at all? No one knows the answer?

Javascript: alternative to Xmlhttprequest and Fecth

I have an Human Machine Interface from an European producer called Exor.
The device have an embedded version of Javascript which does not support Xmlhttprequest nor Fecth.
I wish to use these two functions to perform an API call.
If I try to use one of these two functions the system return an error "Can't find variables".
I am struggling in order to find a possible function (alternative to Xmlhttprequest or Fecth) to be able to allow the API call to work in Javascript.
Any idea which could be a function to be used?
Andrew

Hiding Android API Calls

I wanted to know that whether an app uses a specific Android API (e.g. that API can be getApkContentSigners()). So, is it possible that we can hide the Android API call without Reflections?
Because, if it is through reflections, then even the method which we will be invoking, we have to specify it as a string literal and store it in a variable. So, if we are decompiling the apk (through jadx-gui), we can still see the Android API call. Is there any other methodology, that can be used to hide the Android API calls?
Are commercial tools like dex-guard has the capability to hide the Android API calls, so that when we try to disassemble/decompile it, and we are doing a pattern-based search to find the API call, we won't be able to see it?
Thanks a lot for helping me

Categories

Resources