message

How to set my application as default to receive SMS

老子叫甜甜 提交于 2019-12-01 00:58:12
i'm developing an application to send and receive SMS. I want to add the option to set my application as default like Hangout of Google: Do you have an ideas? Thanks a lot. How to set your app as default messaging app? Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT); intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, YOUR_PACKAGE_NAME); How to check if your app is default messaging app? @TargetApi(Build.VERSION_CODES.KITKAT) public static boolean isDefaultSmsApp(Context context) { return context.getPackageName().equals(Telephony.Sms.getDefaultSmsPackage(context))

send R diagnostic messages to stdout instead stderr

烈酒焚心 提交于 2019-11-30 22:13:23
Looking for an options which let me to redirect R diagnostic messages (produces by message() ) to stdout , not stderr as it is by default. message manual states: The default handler sends the message to the stderr() connection. So the question is how can I change this default behavior? still leaving redirection of warning() and stop() intact. Already tried sink type='message' but it redirects all (messages, warnings, errors). If anyone is willing to test, this is sample script exec_test.R : print("using print") cat("using cat\n") message("using message") warning("using warning") stop("using

UIAlertView with 3 buttons hides message in landscape mode

独自空忆成欢 提交于 2019-11-30 21:48:38
My UIAlertView has a message and 3 buttons, my problem is the alert view display normally in portrait but it hides message in landscape mode as below screenshots. How to make the message appears? Thanks in advance. I too got same problem, But I solved this, with a small change. like add "\n\n" at the end of Title in the alertView This is not a correct solution. but this will rectify that problem some what. *Note : The Title and the Message should be of one line text. Thanks, Satya By merging the Title String into the Message String you can fit two lines of landscaped text. Localization wise,

Why does WCF wrap request/response types in another XML element, and how to prevent this?

依然范特西╮ 提交于 2019-11-30 21:44:58
I have a simple echo service where I've defined one operation method and a pair of types for request/response: [ServiceContract(Name = "EchoService", Namespace = "http://example.com/services", SessionMode = SessionMode.NotAllowed)] public interface IEchoService { [OperationContract(IsOneWay = false, Action = "http://example.com/services/EchoService/Echo", ReplyAction = "http://example.com/services/EchoService/EchoResponse")] EchoResponse Echo(EchoRequest value); } The data types: [Serializable] [DataContract(Namespace = "http://example.com/services/EchoService", Name = "EchoRequest")] public

PHP and Exchange Web Services : fetching the message body using php-ews

我怕爱的太早我们不能终老 提交于 2019-11-30 20:56:50
问题 I am having no luck fetching the message body of an email from an Exchange 2010 server using php-ews. This is my code : $ews = new ExchangeWebServices("hostname", "username","password",ExchangeWebServices::VERSION_2010); $request = new EWSType_FindItemType(); $itemProperties = new EWSType_ItemResponseShapeType(); $itemProperties->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES; $itemProperties->BodyType = EWSType_BodyTypeResponseType::BEST; $request->ItemShape = $itemProperties; /

Undefined response from content script in chrome extension

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 20:29:53
I can't get a response from my content script to show up in my popup.html. When this code runs and the find button is clicked, "Hello from response!" prints, but the variable response is printed as undefined. The ultimate goal is to get the current tab's DOM into my script file so that I can parse through it. I'm using a single time message to a content script to get the DOM, but it's not being returned and is showing up as undefined. I'm looking for any help possible. Thanks. popup.html: <!DOCTYPE html> <html> <body> <head> <script src="script.js"></script> </head> <form > Find: <input id=

How to stream a file download and display a JSF faces message?

不打扰是莪最后的温柔 提交于 2019-11-30 20:25:41
We are streaming a binary file to our users, following the procedure elaborated in the SO question How to provide a file download from a JSF backing bean? In general the workflow works as intended, but during the generation of the export file recoverable errors may occur and we want to display these as a warning to the user. The file itself shall still be generated in that case. So we want that export to continue and display faces messages. Just to put emphasis on this: Yes, there is something not OK with the data, but our users want the export to continue and receive that flawed file anyway.

INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed

只谈情不闲聊 提交于 2019-11-30 19:38:46
I created an user interface with a form to get information from user. When I submit the form, it prints the following warning in the server log: INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed. sourceId=j_idt7:j_idt11[severity=(ERROR 2), summary=(j_idt7:j_idt11: Validation Error: Value is not valid), detail=(j_idt7:j_idt11: Validation Error: Value is not valid)] I tried to solve it, however I didn't understand how. How is this problem caused and how can I solve it? BalusC As to the warning referring an undisplayed Validation Error: Value is not valid message,

How to set my application as default to receive SMS

﹥>﹥吖頭↗ 提交于 2019-11-30 19:02:07
问题 i'm developing an application to send and receive SMS. I want to add the option to set my application as default like Hangout of Google: Do you have an ideas? Thanks a lot. 回答1: How to set your app as default messaging app? Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT); intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, YOUR_PACKAGE_NAME); How to check if your app is default messaging app? @TargetApi(Build.VERSION_CODES.KITKAT) public static boolean

How do I output messages to the Visual Studio output window, from MSBuild?

久未见 提交于 2019-11-30 17:41:16
I have tried adding <Message> elements to tasks in a Visual Studio project file, in order to debug the build process. However, the elements have no effect on the text that is written to the Visual Studio output window. Is there a way to write messages to the Visual Studio output window, by adding markup to the project being built? Nikola Smiljanić This may help: Under Tools → Options → Projects and Solutions → Build and Run , there’s the MSBuild project build output verbosity combo box. This controls how much info you want to see in the Output window. Andres In your project properties → Build