Reminder Launch But can not open the Page in its URL - windows-phone-7

The reminder has been created with URl as below.
Problem :
To test the reminder, I have to close the app. When this reminder is launched on Home Screen which covers with a Wallpaper , the URL in the notification reminder dialogbox which ontop of the wallpaper can not be clicked or no action when press.
would appreciate help on this problem
Thanks
String strReminderNameId = System.Guid.NewGuid().ToString();
string queryString = "";
queryString = "?ReminderId=" + strReminderNameId;
Uri navigationUri = new Uri("/Testing.xaml" + queryString, UriKind.Relative);
RecurrenceInterval recurrence = RecurrenceInterval.None;
recurrence = RecurrenceInterval.Daily;
Reminder reminder = new Reminder(strReminderNameId);
reminder.Title = "Testing";
reminder.Content = "Testing 123";
reminder.BeginTime = beginTime;
reminder.ExpirationTime = expirationTime;
reminder.RecurrenceType = recurrence;
reminder.NavigationUri = navigationUri;
ScheduledActionService.Add(reminder);

It's a normal behavior. When some notification coming and screen is locked - phone is wake up and show you what's happed but you couldn't click on notification to perform provided action.

Related

How the bot's cards containg qnaid and context behave like QnA test?

In the test in QnA portal like the below screenshot, those buttons are created by the follow-up prompts from QnA, and when click those buttons, the next Http request contains all the prompts information like text and qnaid. Those the next response will be the answer of the specific qnaid.
But in the Bot -qnamaker-prompting Sampleenter link description here, when click the button, the Http request just contain the text as questions, thus the QnA will not get the answer bind with the qnaid. The answer may will not bind with qnaid and just context.
enter image description here
So anyone have ideas on how to create a bot like QnA test?
Generally, this is how you can get the same returned results generated from the getAnswers() API call as you get from QnA.
First, pass the current context into getAnswers() (which contains the user's message: "help", "Where did trees come from", "Why is the sky blue?", etc.) and then map the result to a variable:
const stepResults = turnContext.context;
let qnaResults = await this.qnaMaker.getAnswers(stepResults);
After validating a response is returned, you can pass the result text into an activity:
await innerDc.prompt('ConfirmPrompt', qnaResults[0].context.prompts[0].displayText);
Logging the above qnaResults[0].context.prompts shows the returned prompt values align with request payload seen in devtools:
With regards to the sample you linked, the prompt value is the returned QnAPrompts[] results (i.e. the follow-up prompt). If a prompt is present in the overall QnA results, it is parsed and displayed as a button. The displayText is coming from that prompt.
public static Activity GetHeroCard(string cardTitle, QnAPrompts[] prompts)
{
var chatActivity = Activity.CreateMessageActivity();
var buttons = new List<CardAction>();
var sortedPrompts = prompts.OrderBy(r => r.DisplayOrder);
foreach (var prompt in sortedPrompts)
{
buttons.Add(
new CardAction()
{
Value = prompt.DisplayText,
Type = ActionTypes.ImBack,
Title = prompt.DisplayText,
});
}
var plCard = new HeroCard()
{
Title = cardTitle,
Subtitle = string.Empty,
Buttons = buttons
};
var attachment = plCard.ToAttachment();
chatActivity.Attachments.Add(attachment);
return (Activity)chatActivity;
}
Hope of help!

Local notifications using ACR notifications plugin in xamarin

I am creating a bunch of notifications using ARC notification plugin for xamarin and all of them are sent immediately after I open the app despite the fact that I am setting the date and time at least one day away from the current date. My question is, how can I set up the Notification model so that I am receiving the notification at the specified date/time?
var notif = new Notification(){
Id = count++,
Date = item.PostDate.Date,
Title = item.Type.Equals(DayType.Duminica)
? item.Title
: $"{item.Title} {Helpers.GetCurrentDateOldFormat(item.PostDate.AddDays(-13))}",
Message = item.Content,
When = App.Settings.NotificationTime // new TimeSpan(08, 00, 00)
};
Try this, It will help you.
Send a scheduled notification:
App.Settings.NotificationTime = TimeSpan.FromDays(50);
var id = await CrossNotifications.Current.Send(
item.Type.Equals(DayType.Duminica) ? item.Title : $"{item.Title} {Helpers.GetCurrentDateOldFormat(item.PostDate.AddDays(-13))}",
item.Content,
when = App.Settings.NotificationTime);
For more information click here.

Event Added Through API not visible in Google Calendar

We are adding an Event through the Calendar API
Event ev = new Event();
ev.Summary = "ILINK TEST - IGNORE";
ev.Start = new EventDateTime();
ev.Start.DateTime = DateTime.Now.AddMonths(-3);
ev.End = new EventDateTime();
ev.End.DateTime = ev.Start.DateTime;
ev.Attendees = new List<EventAttendee>();
EventAttendee ea = new EventAttendee();
ea.Email = "example#example.com";
ev.Attendees.Add(ea);
Event evv = service.Events.Insert(ev, "example#example.com").Execute();
When we try and view the Event in the users calendar it is not visible. However we can retrieve the Event directly by Id
EventsResource.GetRequest gr = new EventsResource.GetRequest(service, "example#example.com", "43ha9dpv15h5oj2jv853g4vljk");
gr.AlwaysIncludeEmail = true;
Event evv = gr.Execute();
When we remove the attendee entry for the Owner "example#example.com" the Event becomes visible in the Calendar
evv.Attendees.Remove(ea);
So what we are seeing is that when the Owner of the Event is an attendee then it is not visible in Their Google Calendar.
I have checked the ACL Rules and the following entry exists
ETag "\"00000000000000000000\""
Id "user:example.example.com"
Kind "calendar#aclRule"
Role "owner"
Thanks to #luc,
The issue here is that the user does indeed have in their Calendar settings the following setting = 'No, only show invitations to which I have responded'
In my example the EventAttendee is added but their ResponseStatus is 'actionNeeded' - hence it is not visible in the calendar despite the owner being the user.
If in my code, I set the ResponseStatus of the EventAttendee to 'accepted' then it becomes visible in the users calendar. Correct code needs to be:
Event ev = new Event();
ev.Summary = "ILINK TEST - IGNORE";
ev.Start = new EventDateTime();
ev.Start.DateTime = DateTime.Now.AddMonths(-3);
ev.End = new EventDateTime();
ev.End.DateTime = ev.Start.DateTime;
ev.Attendees = new List<EventAttendee>();
EventAttendee ea = new EventAttendee();
ea.Email = "example#example.com";
ea.ResponseStatus = "accepted";
ev.Attendees.Add(ea);
Event evv = service.Events.Insert(ev, "example#example.com").Execute();

Paypal IPN status is always invalid?

Am getting Invalid response from IPN, some people mentioned like return url and notification url shouldn't be same but i changed in that way also even am getting same result.
Here is my code for making payment,payment is working fine.
Paypal paypal = new Paypal();
paypal.cmd = "_xclick";
paypal.business = ConfigurationManager.AppSettings["BusinessAccountKey"];
bool useSandbox = Convert.ToBoolean(ConfigurationManager.AppSettings["UseSandbox"]);
paypal.cancel_return = "http://www.patronalerts.com/";
//paypal.#return = ConfigurationManager.AppSettings["ReturnURL"];
paypal.#return = "http://www.patronalerts.com/";
paypal.notify_url = ConfigurationManager.AppSettings["NotifyURL"];
paypal.currency_code = ConfigurationManager.AppSettings["CurrencyCode"];
paypal.item_name = "Test Product";
paypal.amount = "10";
url = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd="+paypal.cmd +"&business="+ paypal.business+"&no_shipping=&return="+paypal.#return+"&cancel_return="+paypal.cancel_return+"&currency_code="+paypal.currency_code+"&item_name="+ paypal.item_name+"&amount="+ paypal.amount;
But the problem with below code or configuration in paypal account i can't guess. most probably with paypal configuration because every one using this code.
string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
byte[] param = Request.BinaryRead(System.Web.HttpContext.Current.Request.ContentLength);
string strRequest = Encoding.ASCII.GetString(param);
string strResponse_copy = strRequest; //Save a copy of the initial info sent by PayPal
strRequest += "&cmd=_notify-validate";
req.ContentLength = strRequest.Length;
StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
streamOut.Write(strRequest);
streamOut.Close();
StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
string strResponse = streamIn.ReadToEnd();
streamIn.Close();
if (strResponse == "VERIFIED")
{
NameValueCollection these_argies = HttpUtility.ParseQueryString(strResponse_copy);
string user_email = these_argies["payer_email"];
string pay_stat = these_argies["payment_status"];
if (pay_stat.Equals("Completed"))
{
ViewBag.Result = "Kishore Suceess";
}
}
else if (strResponse == "INVALID")
{
ViewBag.Result = "invalids";
}
else
{
ViewBag.Result = "Ipn data for manual investigation";
}
If any body help me out would be appriciated.
An “INVALID” message is due to the following reasons:
- Check that your are posting your response to the correct URL, which is https://www.sandbox.paypal.com/cgi-bin/webscr or https://www.paypal.com/cgi-bin/webscr, depending on whether you are testing in the Sandbox or you are live, respectively.
- Verify that your response to the test IPN message contains exactly the same variables and values as the test message and that they are in the same order as in the test message. Finally, verify that the original variables are preceded by a cmd=_notify-validate variable.
- Ensure that you are encoding your response string and are using the same character encoding as used by the test IPN message. (for example, I can see that he is using letters with umlaut and other symbols like “/”, etc).
With regard to the last point, the merchant can try to change the encoding language in use in his PayPal account, following the steps below:
Login on you PayPal account
Click on Profile
Click on “My Selling Preferences” tab
Click on “PayPal Button Language Encoding” (at the end of the page)
Click on "Other Options"
Select from the drop down menu: UTF-8
Choose the same charset also for the second option, which is related to IPN
Click “Save”
If the issue persists, we recommend to review the script in use, PayPal has some IPN code samples available at: https://github.com/paypal/ipn-code-samples
For additional information I include the link: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNTesting/#id091GFE00WY4

Google apps script UI how to insert message into VerticalPanel()?

I'm trying to write this simple UI which should show a message with two parameters (name, email2send). But, when I run it, I get only this:
The content of the variable msg is not shown in the pannel, only the pannel title. What is the right way to do this?
// Show confirmation
function showMSG(name, email2Send) { // for ease of use I give the urls as parameters but you could define these urls in the function as well
var app = UiApp.createApplication().setHeight(60).setWidth(200);
app.setTitle("Msg send with sucess!");
var msg = "You request to " + email2Send + " a response from " + name;
app.add(app.createVerticalPanel().setTag(msg));
var doc = SpreadsheetApp.getActive();
doc.show(app);
}
THANKS in advance for any help!
The TAG of a widget is not visible, its purpose is actually to store string data in a way that is not visible.
To show a text use a label or an html widget.
example in your code :
function showMSG(name, email2Send) { // for ease of use I give the urls as parameters but you could define these urls in the function as well
var app = UiApp.createApplication().setHeight(60).setWidth(200);
app.setTitle("Msg send with sucess!");
var msg = "You request to " + email2Send + " a response from " + name;
app.add(app.createVerticalPanel().add(app.createLabel(msg)));
var doc = SpreadsheetApp.getActive();
doc.show(app);
}

Resources