Sharing an image with a link in WP8 - windows-phone-8

I want to be able to share the screenshot of the app along with a link. I already know how to grab a screenshot and share it using ShareMediaTask. The problem is that ShareMediaTask does not allow the app to attach a link with the image. I want share target to get a link too. e.g, sharing an image and a link/text to facebook app. If someone knows how to do that just with fb/twitter, that'll also help.

Did you try using the Windows.ApplicationModel.DataTransfer class in order to share links?
Reference: How to share a link
Or else you could go for the ShareLinkTask in order to achieve this:
ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "Code Samples";
shareLinkTask.LinkUri = new Uri("http://code.msdn.com/wpapps", UriKind.Absolute);
shareLinkTask.Message = "Here are some great code samples for Windows Phone.";
shareLinkTask.Show();
Reference: How to use the share link task!

Related

Can Sikuli be used for web testing?

I was working with Sikuli for desktop application like notepad,
but want to know like can I open new tab in browser using Sikuli?
Yes, using Sikuli you can also automate browser. Take images of required web elements (Open new tab button in your case) and stimulate click action using Sikuli APIs.
Yes, you can use Sikuli for web testing.
In this code example, you can use sikuli app to: open browser --> New tab --> Give a like on a webpage (UTAD in this case):
click("mozilla_icon.png")
click("nova_aba.png")
click("endereco.png")
paste("www.utad.pt")
type(Key.ENTER)
wait(8)
click("like_btt.png")
wait(5)
Images of sikuli code:
yes you can use sikuli for performing open tab first take the image of new tab control like in case of FF https://drive.google.com/file/d/0B09BIsDTY_AuZFpMWko1U3BFc0E/view?usp=sharing .Save this image on you local machine. But make sure that image which is used for reference is visible on screen.Call the function mentioned below by and give it Absolute path to above mentioned image.
//provide absolute path in img
public void click_Image(String img)
{
s = new DesktopScreenRegion();
target = new ImageTarget(new File(img));
r = s.find(target);
// Create a mouse object
mouse = new DesktopMouse();
// Use the mouse object to click on the center of the target region
mouse.click(r.getCenter());
}

Launch a phonecall with windowsPhone

I add a page Support in my WindowsPhone Application.
I would like when the user click on Support to launch a phone call.
Do you know how is it possible, i don't find related documentation on it.
[UPDATE]
I try to add this and display in a texblock. doesn't work.
On Android : making a phonecall using a browser application
[UPDATE]
I found http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394025(v=vs.105).aspx and it works correctly enjoy :)
[Update]
It's a task action as send a mail http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394025(v=vs.105).aspx this link is really good
Best regards,
Alexandre
One solution is to add a PhoneCallTask:
PhoneCallTask callTask = new PhoneCallTask();
callTask.PhoneNumber = "999999";
callTask.DisplayName = "Support";
callTask.Show();
Remember to enable ID_CAP_PHONEDIALER in your WMAppManifest.xml

as3 show privacy panel without tabs

we are working on an application that use a microphone.
We would like to show the the privacy settings panel, but without the tab microphone, camera etc, just the basic privacy panel.
Here the picture to make everything clearer:
SETTINGS WITH TAB
http://www.creativewave.it/settings_tabs.jpg
SETTINGS WITHOUT TAB
http://www.creativewave.it/settings_notabs.jpg
We know the if we use
mic:Microphone = Microphone.getMicrophone();
mic.setLoopBack(true)
we can have it.
The problem is that in this way the user hear his voice when speaks at the microphone,
and it's horrible for our application.
And if we use:
Security.showSettings(SecurityPanel.PRIVACY);
we get the privacy panel, but with the tabs.
Is there anyway to have SETTINGS WITHOUT TAB panel but WITHOUT using setLoopBack(true)?
Alternatively, is there a real way to use setLoopback(true) but without having the echo of the own voice? we did try A LOT of things for that but really without success.
thanks a lot.
Paolo
Try setting the volume of the mic to 0 using soundTransform & later increase it...
var st:SoundTransform = mic.soundTransform;
st.volume = 0;
mic.soundTransform = st;
Try muting the global audio right before calling Microphone.getMicrophone() Then turn the volume back up after the privacy box has been dismissed.
I think if you use Security.showSettings("2"); you will get what you want

Chrome open address in tab

I am trying to create a simple adult filter to get my feet wet in Chrome extension building.
Basically, I have a block list and a redirect list, everything works great and the correct parts fire when the user enters one of block list's domains, and now i want to redirect to google when that happens, so I used this code (that I got after searching Google) :
if (blocked) {
up = new Object();
up.url = chrome.extension.getURL("http://www.google.com");
chrome.tabs.update(tab.id, up);
but that seems to be code only to open files locally.
How do I open the URL instead?
Thanks!
Since "http://www.google.com" is not an extension resource, just use:
up.url = "http://www.google.com";

How to submit HTML and receive a bitmap?

I have an app that allows a user to use JQuery and Javascript to add images and position them in a div dynamically.
I would like to be able to submit the div with all the HTML to a WebService and receive back an image so we have a bitmap of the result of the end user's work.
I would prefer a solution in .Net as this is what I am most familiar with but am open to pretty much anything?
I would like to be able to submit the div with all the HTML to a WebService and receive back an image
Try http://browsershots.org!
Browsershots makes screenshots of your web design in different operating systems and browsers. It is a free open-source online web application providing developers a convenient way to test their website's browser compatibility in one place.
How about this. You load the html into a webbrowser control and then use the DrawToBitmap method. It doesn't show up on intellisense and this is probably not the best solution, but it works. Observe the DocumentCompleted event and add the following code:
private void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
var bmp = new Bitmap(100, 100);
var rect = new Rectangle(webBrowser.Location.X, webBrowser.Location.Y, webBrowser.Width, webBrowser.Height);
webBrowser.DrawToBitmap(bmp, rect);
bmp.Save("test.jpg", ImageFormat.Jpeg);
}
You'll probably want to change the width and height of that bitmap object (do it in some smart way or something). Hope this helps.
EDIT: I see now that you are using a webservice for this, hence this solution probably won't work. I'll leave it here just for information's sake.
I was not able to figure out how to do this by submitting the html and receiving an image but I was able to create and ASHX handler that returns a png file based on this blog post
which was good enough for my scenario.
He uses CutyCapt to take a screen shot of an existing web page, write the image to a folder on the webserver and return it.