[Q] speech to call to number apps??? - Java for Android App Development

I want to create application that can call when some of voice pattern get recognize or way to recongnize spoken word or voice like eg:-when i speak "hello" then it recognize the hello word then it call to particular number mention.......
i have looked through lots of code but i counldn't find it

aruzmeister said:
I want to create application that can call when some of voice pattern get recognize or way to recongnize spoken word or voice like eg:-when i speak "hello" then it recognize the hello word then it call to particular number mention.......
i have looked through lots of code but i counldn't find it
Click to expand...
Click to collapse
You haven't looked hard enough. Start here:
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "en-US");
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass()
.getPackage().getName());
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Say something!");
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
int noOfMatches = 10;
intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, noOfMatches);
startActivityForResult(intent, XenoAmp.SPEECH_RECOG_RC);

Yes i have gone through code but i want to integrate process that when i speak hello or some word then suddenly the application trigger automatic message to particular number i have saved.I am really curious about these to learn from you i have gone through some of code present here please look on it...it's final year project plz help it
github.com/gmilette/Say-the-Magic-Word
zoo.cs.yale.edu/classes/cs434/cs434-2012-fall/code/eclipse-ws/com.example.android.apis.ApiDemos/src/com/example/android/apis/app/VoiceRecognition.java
i need your help i just beginner trying to learn android programmin how can i trigger the application to automate work.....
ssuukk said:
You haven't looked hard enough. Start here:
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "en-US");
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getClass()
.getPackage().getName());
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Say something!");
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
int noOfMatches = 10;
intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, noOfMatches);
startActivityForResult(intent, XenoAmp.SPEECH_RECOG_RC);
Click to expand...
Click to collapse

Related

Source code for GPRS measurement using ril.h?

Does anybody have an easy example using RILL to see GPRS band strength.
Thanks.
I include some code I developed for this. However the calibration for this is for XDA I. For XDA II this goes too high values.
If you want to have a hack, look at:
http://forum.xda-developers.com/viewtopic.php?p=11643&highlight=#11643
I had a quick look at the xda-developers ril API, and I think this now passes the max and min possible signal strength, so it would be accurate on any device. Maybe somebody else can confirm this.
Therefore, my function to return a percentage should be something like:
static double dValue;
dValue = (double)data->SignalQuality;
dValue -= dLo;
dValue /= (dHi - dLo);
dValue *= 100;
m_dwSigQuality = (DWORD)dValue;
Hope this is of some use, sorry it's not complete.
Ben.
I have seen the topic you say before I post this
The problem is that I don't know how to use the info. that comes with the post you say.
If you look at the work completed by the xda-developers, they provided a program which shows how RIL works. Their example, last time I looked, shows how to start RIL, and listened for incomming SMS messages. To start with, find this code and add the rill calls to your program.
Find the function called 'ResultCallback'. This is called by RIL when something happens which your program may want to know about. Add to this the code I posted, starting:
if (hrCmdID == m_dwSigQualityID) {
From your own program, you now call my function containing:
m_dwSigQualityID = RIL_GetSignalQuality(g_hRil);
If this works, this will return the percentage signal strength.
Although as I said, this works well on XDA I, but needs a re-calibration for XDA II and more recent work on RIL.
Ben.
It works!
If the GPRS is connected it returns 69%, but if GPRS is not connected it returns a GSM value.
Any idea of how to make an easy dll to use this value in other program?
Thanks.
Very glad it works! Sorry about the 69%. This is fixed with the XDA II.
As far as an easy .dll, I don't know. (Or a nice easy class) Somebody here does I am sure....
Ben
Can you please attach a working ResultCallback code for the signal stregth?
I get 603% on my XDA2...
I think i did something wrong.
Thanks, Patrick
Hi,
benclewett said:
If you look at the work completed by the xda-developers, they provided a program which shows how RIL works. Their example, last time I looked, shows how to start RIL, and listened for incomming SMS messages. To start with, find this code and add the rill calls to your program.
Click to expand...
Click to collapse
Can anyone tell me where this is please?
Also, does anyone have any code for returning gprs traffic usage? - I want to report the amount of data used in the current session and also in the current month.
Thanks!
--ian

Lock In WinCE

--------------------------------------------------------------------------------
Good Day.
I am programing on WinCE and now I have a problem. I am writing a program which must lock SmartFone device.
Can you suggestion how to solve this problem.(with event or with something else...)I found function SHDeviceLockandPromt and SHLock but they are not documented.I am waiting for yours answer.
Also, I see the LAP doc says that a LAP should also support the following optional entry points, any info on them?
LAPCancelVerifySequence
LAPDisplayCodeword
LAPDisplayPreWipe
LAPLockoutUser
thanks.
knut said:
--------------------------------------------------------------------------------
Good Day.
I am programing on WinCE and now I have a problem. I am writing a program which must lock SmartFone device.
Can you suggestion how to solve this problem.(with event or with something else...)I found function SHDeviceLockandPromt and SHLock but they are not documented.I am waiting for yours answer.
Also, I see the LAP doc says that a LAP should also support the following optional entry points, any info on them?
LAPCancelVerifySequence
LAPDisplayCodeword
LAPDisplayPreWipe
LAPLockoutUser
thanks.
Click to expand...
Click to collapse
Look here, maybe it will help you with your LAP plugin...
http://channel9.msdn.com/wiki/default.aspx/MobileDeveloper.CreatingALap
Cheers,
.Fred
Look here, maybe it will help you with your LAP plugin...
Click to expand...
Click to collapse
I already read this there are a exported function LAPLockoutUser and I can not understand this function realy lock the device or not
help me with this situation(lock).In documentation i found a function which lock device for a period of time but i want to lock device untill user input password.how i can solve this problem?
thanks.
Hi has someone documentaion how creat lap?
P.S step by step.
thank.
knut said:
help me with this situation(lock).In documentation i found a function which lock device for a period of time but i want to lock device untill user input password.how i can solve this problem?
thanks.
Click to expand...
Click to collapse
If you implemented a lap plugin, when the device starts, the plugin is loaded by the lass service and the VerifyUser function is called, there you have to launch a dialog box where the user will enter the password, if the password is correct, you should return true and if it is wrong you should return false.
If you answer false, the verifyuser function will be called again.
Cheers,
.Fred
If you implemented a lap plugin, when the device starts, the plugin is loaded by the lass service and the VerifyUser function is called, there you have to launch a dialog box where the user will enter the password, if the password is correct, you should return true and if it is wrong you should return false.
If you answer false, the verifyuser function will be called again.
Click to expand...
Click to collapse
The LAPLockoutUser() lock out the user.but it take a parameter
cSecondsToLockout
[in] Amount of time, in seconds, to block the user from continuing and when it spend its time it lock out automaticly.
Hi all.
Is there anybody who know how in WinCE(in device emulator) realise lock mechanism?or take me links where I can read about this.
P.S maybe it realise with lass -lap mechamizm,or with event
or something else.i am waiting for your answers.
thanks.
knut said:
Hi all.
Is there anybody who know how in WinCE(in device emulator) realise lock mechanism?or take me links where I can read about this.
P.S maybe it realise with lass -lap mechamizm,or with event
or something else.i am waiting for your answers.
thanks.
Click to expand...
Click to collapse
I already gave you a great article to read, here another one:
http://msdn.microsoft.com/library/d...-us/wcesecurity5/html/wce50grfCreatingLAP.asp
Cheers,
.Fred
ps.: here is the sample provided in PB 5.0, I've read somewhere that this sample has been adapted for AKU 2.0, but I never had the chance to find it.

How to access writing sms with another programm

Hello!!
First of all sorry for my bad english...
I'm trying to create a programm which writes a given text in a sms if i'm pushing somewhere on the touchscreen...
The programm should send the sms automatically to a given number.
My problem is how to access sms with another programm?!
Hope you understood just a little bit, if not please ask me!!
I need your help, because this programm is for university... (with Csharp)
thanks....
You mean, how do you write an SMS in code? Or actually access the SMS app indirectly?
What language? C#? .net or not net?
V
If I understand you correctly, this should work for you. Of course you will have to modify it a little so that it fits your personals needs:
Code:
private void Form1_Click(object sender, EventArgs e)
{
SmsMessage msg = new SmsMessage();
msg.Body = "Hello!";
msg.To.Add(new Recipient("Somebody", "+48123456789"));
msg.RequestDeliveryReport = true;
msg.Send();
}
PS. Have you at least used search option in WM SDK ?
Hey!!
First of all, thanks for your fast replies!!!
I have used search-function but didnt find anything...
My Programm should work like this:
U got three Buttons on the screen:
1. 10 min
2. 20 min
3. 30 min
If u click one of these buttons the programm should send a sms with the given text to a given number! By itself!!!
Thanks you VERY VERY VERY much, for your code, I'll try it this evening!!
Driftdriver

Is there any software which can do this?

Basically I am looking for some software which, on receipt of an SMS will initiate an outbound call to a number in the contact list on the phone.
something along the lines of :-
SMS received from 1-555-5555 containing the word CALLBACK and a password.
Phone then dials 1-555-4444 or any specific contact as defined in its config
it doesn't have to use the contact list but must be triggerable remotely.
Target device is a HTC Hermes. and possibly a StarTrk
The program doesn't need to be stealthy, it's to initiate the call with full permission from the owner but without intervention.
Partly it's for my grandfather, if I give him a Startrk then I want to be able to activate a call remotely if I get notified that he has triggered his medicalert system, so I can try to see if he is ok without him having to answer a call.
I googled, and found nothing, I'm hoping someone here can either write an app that can do what I need, or suggest a product that will enable me to do this.
Auto answer is too generic, I want it to be just for myself and not all callers, and the password is because there may be times I just want to send a generic SMS
Sounds like you are talking about an SMS Callback trigger, though I have never heard of a mobile based one.
I always seem to want the impossible or the unwritten maybe it's time one was written?
Crash Override said:
I always seem to want the impossible or the unwritten maybe it's time one was written?
Click to expand...
Click to collapse
just unwritten, it's not impossible
pretty easy actually
i'll try to throw some together this week if/when I have the time
try this
Just place it on the phone and edit the config.ini if needed default settings are:
trigger = CALLBACK
password = pass
I tested this on my TyTn2, and it seems to do what you wanted, the program will activate the speaker when calling (can be changed in the config.ini)
this way if your grandfather cannot reach the phone he still be able to talk..
But test it before use, I'm not sure how sensitive the mic of the phone is.
I do like the idea so I'll probably add some more functionality
- auto pickup on call from fixed number
- status
- call/sms log
Let me know what you think.
PS. this was created for a touch screen device not a smart phone...
also I can not be held responsible for damages, phone bills etc.
but that goes without saying ..right
-=edit=-
tested by sending an SMS to myself, the program then called my number, but when i tried with a friends phone it didn't work
let me know if it works for you (if you have 2 phones)
also make sure if the number you send it from is in your phonebook or not (could be the issue)
-=edit=-
that is the issue, working on it
Issue solved
now I need to figure out how to replace the attachment
I'll add it in a new post
I also believe SKSchema can do this in watch mode. Actually SKSchema can do lots of cool things in watch mode.
new version attached
-=edit=-
build a cab, also added apptodate support
is it just me or does it seem to autodial the number that sent the SMS?
one addition would be the facility to set the option that if number X sent the SMS then callback to number Y
example - if I am in the US I will have the number 1-555-1234 but my grandfather is in the UK - +44-555-5555
I run a voip line with a UK DID number such as +44-555-6666 so when the SMS is received from 1-555-1234 the return call goes to the +44-555-6666 instead of the US Cellphone (cost reasons lol, UK landline free, international call of any length = US national debt)
Here is a SMS Trigger I built, do not know if that satisfy you.
Check rk-SMSSwitch under my signature.
Crash Override said:
is it just me or does it seem to autodial the number that sent the SMS?
one addition would be the facility to set the option that if number X sent the SMS then callback to number Y
Click to expand...
Click to collapse
yes you are right, don't know how i could have overlooked that
I'll fix this in the next version
any other requests?
:-D
-=edit=-
Program updated, you should be able to run apptodate to get the new version
don't you love just that program
Mr_Gee said:
any other requests?
:-D
-=edit=-
Program updated, you should be able to run apptodate to get the new version
don't you love just that program
Click to expand...
Click to collapse
Will there be a Smartphone version of this app that I could run on my QTek 8500 (StrTrk) ?
Thanks
timwb said:
Will there be a Smartphone version of this app that I could run on my QTek 8500 (StrTrk) ?
Thanks
Click to expand...
Click to collapse
Sorry, i just noticed this reply
To be honest i wasn't planning on creating one, but i could give it a shot
the biggest problem is i don't have a Smartphone to test it on..
I'm sure you could probably find a few testers in the forums, there's quite a lot of people on here!
I'll obviously be willing to test anything you are able to come up with. I don't know where you are located mr gee but on ebay UK you can buy an old Orange spv c500 (HTC Typhoon)or c600 (HTC Tornado I think) really cheap now. There are also WM6 roms available for these devices on this site somewhere.
timwb said:
I'm sure you could probably find a few testers in the forums, there's quite a lot of people on here!
I'll obviously be willing to test anything you are able to come up with. I don't know where you are located mr gee but on ebay UK you can buy an old Orange spv c500 (HTC Typhoon)or c600 (HTC Tornado I think) really cheap now. There are also WM6 roms available for these devices on this site somewhere.
Click to expand...
Click to collapse
I already checked eBay, and there might be some good ones but I don't want to overpay
I'll keep it in mind
Attached is the same program but compiled for a smartphone, I'm not sure if it will work, I remembered I have an emulator for smartphone installed, but I received an error message when running the exe.., I think because the CF.NET wasn't installed..
let me know
I tried it on my QTek 8500. The exe ran but all I got was a window with a blue background and the words "SMS2Call v. 0.03" in black.
No buttons to press or anything, had to use Task Manager to exit it. Which id did without complaint. Thanks for trying, some work may be needed I think
timwb said:
I tried it on my QTek 8500. The exe ran but all I got was a window with a blue background and the words "SMS2Call v. 0.03" in black.
No buttons to press or anything, had to use Task Manager to exit it. Which id did without complaint. Thanks for trying, some work may be needed I think
Click to expand...
Click to collapse
Currently that is the program
Could you try to edit the ini file?
in case you have 2 phones, add the number from the 2nd phone in the file
save and run the program
send an sms from the 2nd phone with the passcode mentioned in the ini file
your 1st phone should call this number after the SMS receipt
I know the program doesn't look like much but i might fix this in the future
when i do i'll also look at the exit button.
the reason i didn't was because the application was for an older person,
this person could be playing around with the phone accidentally closing the program ...
I looked in the .ini file and then tried sending a text to the phone containing the words CALLBACK PASS. I tried this with/without a space, up and lower case, with the program in the background or on screen but it didn't do anything. Do I have to put a shortcut in the Startup folder or something? Or am I not formatting the text message properly? The sending phone number is in the contacts list if that makes a difference.
Any ideas?
Thanks
Could you just not set his phone to auto answer ? - that way you can call him any time.
timwb said:
I looked in the .ini file and then tried sending a text to the phone containing the words CALLBACK PASS. I tried this with/without a space, up and lower case, with the program in the background or on screen but it didn't do anything. Do I have to put a shortcut in the Startup folder or something? Or am I not formatting the text message properly? The sending phone number is in the contacts list if that makes a difference.
Any ideas?
Thanks
Click to expand...
Click to collapse
not really, assuming it works maybe it has to do with the formatting,
Callback should be in capitals and pass in lower letters.
when I tested this with my TYTN2 it worked the way it should.
also did you enter the default number ? e.g. the number that will be called?
PauloJ5 said:
Could you just not set his phone to auto answer ? - that way you can call him any time.
Click to expand...
Click to collapse
[sarcasm]
Gee why didn't I think of that...
[/sarcasm]
Seriously have you read the thread?
the topic starter didn't want it this way for several reasons...
Default number and closed flip
I didn't enter a default number because I want it to respond to any number that sends the text. I deleted the DefaultNumber line from the config and it worked, to a point. The phone I'm running it on is a Qtek 8500/HTC StrTrk, which for those who don't know, is a flip phone. My problem is this, if the phone is closed when the text is received the call is made but cut off immediately because the phone is set to hang up calls on closing. Nowhere can I find a setting to stop this from happening, anybody have any ideas?

Bluetooth Repair Please :)

For those out there cooking away - if there is anything you can do to cure the bluetooth bug, it would be great ... something which makes the phone start voice dialer based on a headset-button push WITH accepting the dial command over bluetooth (you know, something WM has had forever).
Thanks
jdmba said:
For those out there cooking away - if there is anything you can do to cure the bluetooth bug, it would be great ... something which makes the phone start voice dialer based on a headset-button push WITH accepting the dial command over bluetooth (you know, something WM has had forever).
Thanks
Click to expand...
Click to collapse
It's not a bug and it's not fixable unless you install froyo. For some reason google decided no one needed this feature until just now.
Umm
n0-0ne said:
It's not a bug and it's not fixable unless you install froyo. For some reason google decided no one needed this feature until just now.
Click to expand...
Click to collapse
You are correct, it is not called a bug, it is called a "known issue"
http://code.google.com/p/android/issues/detail?id=1181
http://code.google.com/p/android/issues/detail?id=1412
Anyway ... hopefully this "known issue" can get fixed ASAP by you skilled cookers
Its not a bug and support is in Android. Its just not finished in 2.1 and has been disabled. Call it a broken feature, but its not a bug.
That is funny because it has been listed as a problem on the android code website since 2008.
LOL...I enabled it on a Moto Droid rom. Trust me, its there, merely disabled.
Code:
/** The voice dialer 'works' but the user experience is poor. The voice
* recognizer has trouble dealing with the 8kHz SCO signal, and it still
* requires visual confirmation. Disable for cupcake.
*/
public static final boolean DISABLE_BT_VOICE_DIALING = false;
\frameworks\base\core\java\android\bluetooth\BluetoothHeadset.java is the file to edit.
Of course, it doesn't work so hot in 2.1.
Wow
WOW ... that's all I have to say ...
Hopefully will be fixed in FroYo

Categories

Resources