private Intent getInteractivePostIntent(PlusClient plusClient) { // Create an interactive post with the "VIEW_ITEM" label. This will // create an enhanced share dialog when the post is shared on Google+. // When the user clicks on the deep link, ParseDeepLinkActivity will // immediately parse the deep link, and route to the appropriate resource. String action = "/?view=true"; Android.Net.Uri callToActionUrl = Android.Net.Uri.Parse(GetString(R.Strings.plus_example_deep_link_url) + action); String callToActionDeepLinkId = GetString(R.Strings.plus_example_deep_link_id) + action; // Create an interactive post builder. PlusShare.Builder builder = new PlusShare.Builder(this, plusClient); // Set call-to-action metadata. builder.AddCallToAction(LABEL_VIEW_ITEM, callToActionUrl, callToActionDeepLinkId); // Set the target url (for desktop use). builder.SetContentUrl(Android.Net.Uri.Parse(GetString(R.Strings.plus_example_deep_link_url))); // Set the target deep-link ID (for mobile use). builder.SetContentDeepLinkId(GetString(R.Strings.plus_example_deep_link_id), null, null, null); // Set the pre-filled message. builder.SetText(mEditSendText.GetText().ToString()); return(builder.GetIntent()); }
/** * Add a new item * * @param view * The view that originated the call */ public void AddItem(View view) { if (mClient == null) { return; } // Create a new item ToDoItem item = new ToDoItem(); item.SetText(mTextNewToDo.GetText().ToString()); item.SetComplete(false); // Insert the new item mToDoTable.Insert(item, new MyInsertTableOperationCallback(this)); mTextNewToDo.SetText(""); }