How to send dtmf tones using BlackBerry API? - blackberry

I have tried to use
PhoneArguments phoneArgs = new PhoneArguments(PhoneArguments.ARG_CALL, num);
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, phoneArgs);
PhoneCall call = Phone.getActiveCall();
call.sendDTMFTones(tones);
but it doesnt work.
Can anyone point me to a working code snippet for sending DTMF?
regards
Tom

Did you try sending them one at a time? Are you checking the return value of sendDTMFTones() ?
PhoneCall pc = new PhoneCall();
boolean added = pc.sendDTMFTone(7);

Related

Is there an example to change a CC26xx channel using contiki after initialization?

I've found the function for setting the channel of cc2240, but nothing for cc2650. Can anyone help me with an example of implementation?
You need to call the function set_value() of the Contiki radio API:
int channel = 11;
NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, channel);

SetError on TextInputLayout not available

I am trying to show validation messages on TextInputLayouts. I should be able to just do this (as with native android):
TextInputLayout til = (TextInputLayout) findViewById(R.id.text_input_layout);
til.setErrorEnabled(true);
til.setError("You need to enter a name");
But it seems like setError method is not available for xamarin? For EditText the setError is available, but don't want that. e.g:
TextInputLayout txtI_password = FindViewById<TextInputLayout>(Resource.Id.input_layout_password);
txtI_password. ?????
Using:
using Android.Support.Design.Widget;
In C#, property setters are accessed directly, not through a function.
til.ErrorEnabled = true;
til.Error = "You need to enter a name"

Trying to connect to Ticket Printer using VB6 Winsock

I am trying to send data from a VB6 program to a ticket printer Via TCP/IP. The only VB6 way I have found to try and do this is using the WinSock Control.
I use the following code to connect
WinSock.Protocol = sckTCPProtocol
WinSock.RemoteHost = txtIPAddress.Text
WinSock.RemotePort = txtPort.Text
WinSock.Connect
And then try and send the data as follows
WinSock.SendData ("<F8>" & txtPrint.Text & "<p>")
Everytime I try and do this, it fails because the Winsock.State is 6 (Connecting). This just stays at connecting and never connects or fails. I am able to connect to the printer using this IP/Port combo outside of VB6. Is there anything I may be doing wrong? Can the WinSock control do this?
In a .net program provided, this seems to be accomplished by doing the following:
CONNECT
client = new TcpClient(ip_address, 9100);
s = client.GetStream(); //s is System.Net.Sockets.NetworkStream
s.ReadTimeout = 500; //attempt to read for up to 0.5 seconds
sr = new StreamReader(s); //create read stream
sw = new StreamWriter(s); //create write stream
sb = new BinaryWriter(s); //create binary stream
sw.AutoFlush = true; //set write stream to flush data when < full buffer
SEND:
sw.WriteLine(command);
Thank you.
You are missing up concepts. I remember this from 15 years ago.
Winsock is for work with a protocol. You must know the printer protocol. Is not just sample text.

Trying to stream using eventsource through nginx/fastcgi

I am trying to set up an event stream using MVC.NET, Nginx and Fastcgi. The streaming works fine for me using xsp4, but I have not been able to get it to work through Nginx and Fastcgi. My goal is to open an EventSource stream and to downstream data to my website.
I have tried adding the 'ngx_http_upstream_keepalive' module - http://wiki.nginx.org/HttpUpstreamKeepaliveModule - which is funny because there is "Note - this This will not work with HTTP upstreams" in the module description. But wait, isn't that the name of the module? Anyways, maybe I'm confused here. I have also tried adding 'proxy_buffering off' to my nginx.conf, which also hasn't helped.
I understand this should be fairly easy to do, but I am at a loss. Is there some property I can add to my nginx.conf to make this work? Or is there something to add to the Response in .NET?
Please help me StackOverflow!
Based on what I have read here:
http://wiki.nginx.org/X-accel
you need to turn off X-Accel-Buffering. Here is some example code:
public ActionResult Stream(string id)
{
Response.ContentType = "text/event-stream";
Response.Buffer = false;
Response.BufferOutput = false;
Response.Headers["X-Accel-Buffering"] = "no";
return View();
}
Hopefully the code above fixes your problem.

invoking a call fom BB code

I need to invoke a call from code how can i do it ?
I tried Phone arguements but it did not worked ?
PhoneArguments phoneArgs;
phoneArgs = new PhoneArguments(PhoneArguments.ARG_CALL,
lbl_Phone_value.getText());
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, phoneArgs);

Resources