yashsingh1/xdaforums huggingface dataset:
[Windows Phone 7 Software Development] levfr:
[Q] Problems with client certification authentication on WP7 !!!!!

Hello,

I am writing https client application for WP7. Our server requests client certification authentication.

I found the following code:

X509Certificate Cert = X509Certificate.CreateFromCertFile("C:\\mycert.cer");

HttpWebRequest Request = (HttpWebRequest)WebRequest.Create("https://Server");

//Add my certificate to https request

Request.ClientCertificates.Add(Cert);

But in the WP7 I can't find property ClientCertificates in class HttpWebRequest.

I would appreciate if someone could advice me how I can implement client certification authentication on WP7

Thanks in advance
[Windows Phone 7 Software Development] levfr:
[Q] Problems with server certificate verification on WP7 !!!!!

Hello,

I am writing https client application for WP7, and first of all I would like to get detail information about server certificate.

I found the following code:

HttpWebRequest Request = (HttpWebRequest)WebRequest.Create("https://Server");

Request.Method = "Get";

// allows for validation of SSL conversations

ServicePointManager.ServerCertificateValidationCallback += new

RemoteCertificateValidationCallback(ValidateRemoteCertificate);

...

//Callback function is :

private static bool ValidateRemoteCertificate(

object sender,

X509Certificate certificate,

X509Chain chain,

SslPolicyErrors policyErrors)

It’s exactly what I need BUT this functionality doesn’t exist in WP7 ( esapcialy ServicePointManager)

I would appreciate if someone could advice me how I can get server certificate information during secession with the server.

Thanks in advance
[Windows Phone 7 Software Development] egzthunder1:
Threads merged. Please don't open two threads if your issues are that similar. Thanks.
[Windows Phone 7 Software Development] mkamonster:
The development model of WP7 is largely based on Silverlight 3. Silverlight 3 doesn't support this, sadly.
[Windows Phone 7 Software Development] mkamonster:
Can you write in a few sentenses what you do in your code?

How do you determine the current tuning of a string? By reading frequency?
[Windows Phone 7 Software Development] walshieau:
Sorry mate but its a complete re-work. If you've done any .NET development using C# and you've used P/Invokes you are again out of luck.

Its a complete managed code environment.
[Windows Phone 7 Software Development] SonicFlare:
My answer would be to wait :)

Wait until MS will open native app support (or for xda to find a way to it) and from there see, what you need to change in you app to be able to use it on WP7.

As this still is Windows, I assume, it's like migration app from XP to Vista (in many case, just recompile and fix deprecated API).
[Windows Phone 7 Software Development] walshieau:
Its not as simple, there is currently no way to run unmanaged code in Windows Phone 7. There is NO ARMv7 SDK released by MSFT to allow you to compile your app to run natively on the device.
[Windows Phone 7 Software Development] gadlakha:
[Q] PHCanvas replacement in WP7

Hi,

I had changed the default dialer layout for WM6.5 using the PHCanvas.

WP7 documents say that they had replaced PHCanvas with something called as Phone Call & Dialer Extensibility.

What is the equivallent API call for PHExtInitialize in WP7?

Can I find an example somewhere which could help me figure out the change and how this needs to be done in WP7?

Any help would be appreciated.

Regards,

Gautam Adlakha.
[Windows Phone 7 Software Development] Einlander:
I havent tried it in the emulator but here is a .net cf tutorial from msdn

http://msdn.microsoft.com/en-us/library/aa446483.aspx
[Windows Phone 7 Software Development] :
[Q] XAML arguments for Click event

I have the following XAML:

<Button Name="btnJeans" Click="btnJeans_Click" Padding="-1" >
<StackPanel Orientation="Horizontal" Margin="0,0,0,17" Name="jeansItem">
<!--Replace rectangle with image-->
<Image Height="119" Width="82" Source="{Binding Image}" Margin="12,0,9,0"/>
<StackPanel Width="311">
<TextBlock Text="{Binding Name}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
<TextBlock Text="{Binding Price}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
</StackPanel>
</Button>

However, btnJeans_Click needs to pass "{Binding Name}" as an argument.

How would I do this?
[Windows Phone 7 Software Development] dairyface:
Ive not tried it with your code, but if you put x:Name="aname" inside your XAML you can reference that specific object in code, ie:

<Button Name="btnJeans" Click="btnJeans_Click" Padding="-1" >
<StackPanel Orientation="Horizontal" Margin="0,0,0,17" Name="jeansItem">
<!--Replace rectangle with image-->
<Image Height="119" Width="82" Source="{Binding Image}" Margin="12,0,9,0"/>
<StackPanel Width="311">
<TextBlock x:Name="aname" Text="{Binding Name}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
<TextBlock Text="{Binding Price}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
</StackPanel>
</Button>

Then in your code you should be able to lookup aname.BindingSource
[Windows Phone 7 Software Development] GrahamWager:
[Q] Accessing Bound Data

Having a strange occurence at the moment in an app being developed... Bear with me because this is a bit complicated!

I have a class, let's say named "CustomClass" with various properties one of which is an ID in the format LNNN where L is a letter and N is a number.

A large number of these is created in a List<> and is bound to a ListBox.

The DataTemplate for this ListBox contains some TextBlocks and a UserControl (let's say named ColorCodedID) with a property ItemID bound to the CustomClass.ID. The ColorCodedID class displays the ID in a TextBlock which works perfectly.

What I needed to do was to have the UserControl change it's background colour based on the letter at the start of the ID.

To try to accomplish this, I've used the Loaded event of the CustomClass taking the value from the TextBlock.Text property. For the first few items this works perfectly, however after scrolling down a few pages, these values get mixed up and so often the wrong colour background is displayed.

I added another TextBlock to the control to display the value returned by TextBlock.Text to try to debug and it shows values from other items which are different to the values displayed by the bound TextBlock! I also added an event to the MouseUp event to display using a MessageBox the current value of TextBlock.Text and this always shows the correct value.

I have a couple of questions -

1. How is this even possible? They're completely separate objects and so surely shouldn't be able to access values from each other!

2. Any suggestions how I can get around this? I can't find any events for if the bound data changes or any other event to use which might fix this.

Thanks in advance!
[Windows Phone 7 Software Development] DaveShaw:
You might need to use a ValueConverter class (lots of examples on MSDN / StackOverflow) to convert your String Value to a Color and apply it your property binding.

The LNNNValueConvter class can just convert the L to a Color.

e.g. (All typed by hand - you might have a few syntax errors ;)

public class LNNNValueConvter : IValueConverter
{
private static Color ConvertLToColor(String l)
{
switch(l)
case "R":
return Color.Red;
//More here
case "B":
default:
return Color.Black;
}

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
retrun
ConvertLToColor(value.Substring(0,1));
}
//ConvertBack Omitted.
}
[Windows Phone 7 Software Development] GrahamWager:
Thanks DaveShaw!

Worked brilliantly, hadn't even considered using a converter for this.

Really really appreciate it, was driving me nuts! :D
[Windows Phone 7 Software Development] DaveShaw:
No probs :).

Glad to answer a Technical Question (first time in a while ;))
[Windows Phone 7 Software Development] GEN3RIC:
Add in ICommand as attached properties, then use Command in place of Click. CommandParameter is a dependency property so you can bind it to {Binding Path=Name}.

Or if that's overkill, see if you can get the data through the sender or EventArgs.
[Windows Phone 7 Software Development] mukeshkb4u:
[Q] networking access

How can we communicate with PC in WP7?

Is there any api or sample anywhere.
[Windows Phone 7 Software Development] athompson:
You can't open a socket, Microsoft has severely restricted networking. You can call web services, though. http://lmgtfy.com/?q=windows+phone+7+web+service :)
[Windows Phone 7 Software Development] AcerExtensa:
WP7 Camera API

Hi!

I was thinking about to create WP7 App for QrCode reading & processing.

But have not found any possibility to get preview from phone camera in my app... M$ devs says what where is no Camera API at the moment.... But how do the LG done that on Omnia 7??? take a look -> youtube.com/watch?v=TxuOx1LFkfQ

Any idea???
[Windows Phone 7 Software Development] emigrating:
OEM's (such as LG) has access to more than other third-party developers.
[Windows Phone 7 Software Development] Robby Light:
[Q] Adding Items to XML

Hey Guys!

I really get desperate on my current problem.

I have an XML-File looking like this:

<?xml version="1.0" encoding="utf-8" ?>
<Appointments>
<Appointment>
<Name>Something</Name>
<Contact>Max Sample</Contact>
<Date>20110606</Date>
</Appointment>
<Appointment>
<Name>Money</Name>
<Contact>Someone</Contact>
<Date>20110113</Date>
</Appointment>
</Appointments>

Now I want to add a new item to this list and I really don't know / understand how.

I read nearly every XML-Manual in the web, but I seem to be too stupid for them, so please don't post links to any tutorials. :S

You are my last hope!

How to add this Item?:

string newname = "TestName";
string newcontact = "TestPerson";
string newdate = "20101224"

I tried it like this, but I doesn't work...

// Add new Item
var items = XElement.Load("LentItems.xml");
var newItem = new XElement("Appointment",
new XElement("Name", newperson),
new XElement("Contact", newcontact),
new XElement("Date", newdate)
);
items.Add(newItem);

IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication();

IsolatedStorageFileStream location = new IsolatedStorageFileStream("LentItems.xml", FileMode.Open, FileAccess.ReadWrite, storage);
System.IO.StreamWriter file = new System.IO.StreamWriter(location);
items.Save(file);

I get the following exception when I try to create the IsolatedStorageFileStream location:

Operation not permitted on IsolatedStorageFileStream.

Can anybody help me here?

You would save my week!

Thanks a lot and best greets

Robby
[Windows Phone 7 Software Development] enjoythemusic:
Have a Samsung Focus and there is already a free QR Code reader in the APP store. Already DL'ed it and it works.
[Windows Phone 7 Software Development] dayyanj:
I think I had a similar problem before.

Try reading the xml file, closing the file, updating the XML then overwriting the xml file with your changes.

I think because you have the file LentItems.xml loaded, you cannot save over it.
[Windows Phone 7 Software Development] Robby Light:
Ah, okay, thank you.

Now I know at least, what the problem is.

Unfortunately I am very new in the C# corner.

Do you think you cold write the needed code here? It would be very very nice!

Or anybody else?

Thank you very much!
[Windows Phone 7 Software Development] dayyanj:
This is how I did it,

public static void writeProgressToFile(string ID, int BIT)
{
var store = IsolatedStorageFile.GetUserStoreForApplication();
// Check that the file exists if not create it
if (!(store.FileExists("memory.xml"))) { CreateFile(); }

StreamReader sr = new StreamReader(store.OpenFile("memory.xml", FileMode.Open, FileAccess.Read));
XDocument data = XDocument.Parse(sr.ReadToEnd());

sr.Close();
// Update the element if it exist or create it if it doesn't

XElement xElement = data.Descendants("Progress").Where(c => c.Element("ID").Value.Equals(ID.ToString())).FirstOrDefault();
if (xElement != null)
{
xElement.SetElementValue("BIT", BIT);
}

else
{
// Add new
XElement newProgress = new XElement("Progress", new XElement("ID", ID.ToString()), new XElement("BIT", BIT));
XElement rootNode = data.Root;

rootNode.Add(newProgress);
}

using (StreamWriter sw = new StreamWriter(store.OpenFile("memory.xml", FileMode.Open, FileAccess.Write)))
{
sw.Write(data.ToString());
sw.Close();
}

}

You will note that I read the xml file into a XDocument object "data" then closed the streamReader. The XML is still contained in the XDocument object.

Believe me, I know the pains you are going through, This took me days to crack, and no one seemed to want to help.

I hope this helps you!
[Windows Phone 7 Software Development] Robby Light:
Mh, that doesn't really work for me. I just whant to add 1 new Element to the root of my XML file. That couldn't be that heavy, right?

Does anyone has another really simple code sample for me?
[Galaxy S I9000 Q&A, Help & Troubleshooting] McBain_666:
Hi all, I had applied z4root and oclf on froyo JPO. I had to do a wipe and a format of the internal sd, (i did not remove oclf or root before).

After wipe I found I had already root, and now oclf says I have already a lagfix, once it said size of xxx.ps (don't remember the name) less than 5k, now it says that /data size is different than ext2 data (i just installed ext2)

I am quite sure I don't have any, also because with lagfix I usually score 1800+ on quadrant, now 980..could the problem be that I restored oclf and z4root apps with titanium? How can I wipe only their data?

TL;DR

Oclf says I have a lagfix but I don't,

How can I fix it?
[Galaxy S I9000 Q&A, Help & Troubleshooting] McBain_666:
Self reply, it needed a "restore boot animation", from oclf app.

Hopefully other users will find the answer in this post, since I did not find it before. Thanks to ryanza.
[Galaxy S I9000 Q&A, Help & Troubleshooting] Jaypeebee:
Thanks.

Just what I was looking for :)
[Epic 4G General] jsutin.maggiolo:
yeah I am pretty sure I bricked my epic, I can't get it to boot it just goes to a screen that show a cell phone and a pc with a triangle and an exlamation mark inbetween them, I can boot into download and would flash with odin but neither of my computers will not recognize the "epic", just says unknown device i the device manager of my pc's, also if I plug in the usb while it's off it will boot into clockwork recovery and I can install a recovey but as soon as I reboot it it goes back to the phone, computer, and triagle with the exlamation mark screen... Anyone have an ideas of what to do ? ? ?
[Epic 4G General] JettMartinez:
You should have "bricked" in quotes, not Epic. :-D

If you can get into download mode, then it's not truly bricked. I went through the same panic first time trying to use Odin. It is really flaky, just keep trying. Keep rebooting the phone and the computers. Try different versions of Odin, try different USB ports, try different USB cables. Uninstall and reinstall the Samsung drivers, stand on one foot while patting your head and clicking start. Any damn random variable you can think of. Just when you're about to bounce your Epic off the wall, it will magically work. I think Odin is fueled by tears and frustration.
[Epic 4G General] shabbypenguin:
Bricked - it means that your device is as useful as a brick. there is nothing you can do with it save for making various youtube videos about breaking said device...

if your intrested in seeing a a true brick looks like delted the flash and off your psp (3k and pspgo) or install a lower foreign version of the wii system menu on a brand new wii. better yet download a bio flashing utility (doesnt matter which one preferably the one FOR your computer) and halfway thru unplug the computer.. then you may understand what a brick is.

this is nothing personal but honestly after teh whole dk05 leak your probably the 15th person ive read that posted something along the lines of "ZOMG i bricked my phone it turns on and stuff and theres guides on how to fix it but itz brickeddd!!"
[Epic 4G General] austin420:
i like "paratheticals" when they arent really "required". i think its "funny".
[Epic 4G General] plapczyn:
Well put. Not bricked. Did you install the samsung drivers? Please read the the section on rooting and recovery....

http://xdaforums.com/showthread.php?t=798067

....followed by the ODIN thread

http://xdaforums.com/showthread.php?t=773032
[Epic 4G General] panthar:
Those are not "paratheticals". They are "quotes". (this is parenthetical) :p
[Epic 4G General] austin420:
"nice"

(:D)
[Epic 4G General] leatherneck6017:
Sounds like you didn't have the sammy drivers installed.
[Epic 4G General] epicjt:
I was trying to put 2.2 on my epic and crashed

I was trying to put 2.2 on my epic the entire device went blank and will not turn on or show that it is being charged. would you consider that completely bricked?
[Epic 4G General] raylusk:
Try a battery pull. Worked for me.
[Epic 4G General] fury15:
if it boots into recovery and download there is a way to save it... if you cannot get to either of those then your Fu*ked lol... like it was said before follow the links in the wiki and they will guide you... it just seems like your having a driver issue, try a different cord, worked for me when i had the same issue. the one that came with the phone sucks for connecting to pc, find a shorter cord and it should work
[Galaxy Tab Q&A, Help & Troubleshooting] LuffarJoh:
Hi,

I wonder if someone could make a wireshark dump when checking for new firmware in Kies?

I would like to knowv how the xml-post looks like.

Thanks in advance.
[Galaxy Tab Q&A, Help & Troubleshooting] LuffarJoh:
OK, no answer this far. bummer.

Maybe it helps if I told you why I need it.

I have made an app to Galaxy S that checks for new firmwares from Samsung. No more need to use Kies in other words!

My intention is to get this app working on a Tab, but I dont have one myself and can therefor not try this myself.

The app can be found here if someone would like to try it and give me a response of how its working.
[Galaxy Tab Q&A, Help & Troubleshooting] daniel.weck:
I can't use Kies (USB driver/connection problems), so here is some related info instead:

I purchased my Galaxy Tab from PC-World/Currys (Dixons) in the UK.

The default firmware was as such (dial *#1234#):

PDA: P1000XWJJ3

PHONE: P1000XXJID

CSC: P1000CPWJJ3

I could be wrong, but it seems that CPW stands for CarPhoneWarehouse, which is one of the main retailers for unlocked (not network-dependent) Tabs.

Since then I have made several flash upgrades using the samfirmware.com ROMs (see history below).

According to the Twitter stream (see other post below), the latest CPW is this massive 500MB one:

Model: GT-P1000 | Code: CPW | Version: P1000XWJJ8/P1000CPWJJ6/P1000XXJK6 | Date: 23.11.2010 16:19 | Size: 552,33 MB | ID: 455876767

Broken down:

PDA: P1000XWJJ8

PHONE: P1000XXJK6

CSC: P1000CPWJJ6

After full partition with JJ4 (dial *#*#44336#*#*):

PDA: P1000XWJJ4

PHONE: P1000XXJID

CSC: P1000SERJJ2

BUILD TIME: 16/10/2010 20:35:06 KST

Change List: 639474

After PDA update (no repartitioning) with JJ7 (dial *#*#44336#*#*):

PDA: P1000XWJJ7

PHONE: P1000XXJJ6

CSC: P1000OXXJJ3

BUILD TIME: 30/10/2010 01:54:38 KST

Change List: 669843

After PDA update (no repartitioning) with JK1 (dial *#*#44336#*#*):

PDA: P1000XXJK1

PHONE: P1000XXJK1

CSC: P1000OXAJK1

BUILD TIME: 01/11/2010 20:10:05 KST

Change List: 589527

After PDA update (no repartitioning) with JK5 (dial *#*#44336#*#*):

PDA: P1000XXJK5

PHONE: P1000XXJK5

CSC: P1000OXAJK5

BUILD TIME: 10/11/2010 14:22:22 KST

Change List: 688590

I'm now on JK5, but I have yet to find a combination of codes that returns anything meaningful using your app.

I had to hack the /system/build.prop in order for some apps to be available in the Market, by replacing XXJK5 by XWJJ3 in "ro.build.fingerprint".

PS: http://www.coderun.com/ide/ + http://files.zajec.net/kies.updates.php.txt

Credits to: http://xdaforums.com/showthread.php?t=825351&page=4

;)
[Galaxy Tab Q&A, Help & Troubleshooting] LuffarJoh:
Thanks alot for your information. I'm not able to deal with it right now, but will be back in a few days!
[Galaxy Tab Q&A, Help & Troubleshooting] LuffarJoh:
One note, just because SamsungFUSNews says that a new firmware is released doesent mean that the fus-server will announce it. The output you get with this app is the same as you would get if you used Kies. In other words, it only shows official releases.
[Galaxy Tab Q&A, Help & Troubleshooting] daniel.weck:
The CheckFUS app is updated :)
[Galaxy Tab Q&A, Help & Troubleshooting] eskasi:
Got my Tab from Malaysia (although I am no longer there)

PDA: P1000DXJK2

Phone: P1000DXJJ2

CSC: P1000OLBJJ2

How do I use this app? What do I put under product code? I looked at the table and it looks like I can use XSE or SMA? I have no idea. I also do not have the box with me. How do I know what Product code to use? Could someone please help me? Kies is a piece of garbage and its such a pain that there is no OTA firmware update!
[Galaxy Tab Q&A, Help & Troubleshooting] LuffarJoh:
You should put XME , which I belive is for Malaysia, in product code and the rest of the info you posted in the correct fields. This will check for firmwares released to the Malaysian version of Tab.

For you convenience I have added the info to the presets!
[Galaxy Tab Q&A, Help & Troubleshooting] eskasi:
DUde, You are awesome. Thanks for the confirmation and for the preset! Cheers! :D
[Galaxy Tab Q&A, Help & Troubleshooting] LuffarJoh:
No problems. Let me know if theres something else :-)

If you like it, pls give it a rate at the market or maybe a small donation ;-)
[Galaxy Tab Q&A, Help & Troubleshooting] Sanjithml:
Firmware needed

Kindly guide me to download the firmware for the following firmware..

Model: GT-P1000 | Code: INU | Version: P1000DDJK3/P1000ODDJJ1/P1000DDJJ1 | Date: 23.11.2010 21:13 | Size: 215,8 MB | ID: 185064554

Thank You
[Desire HD General] mekz77:
Hi XDA,

I've received my DHD yesterday and not impressed at all by now.

The camcorder records @ only 21 frames per second on 720p.

Is that quite the common for the DHD? I thought 30fps were usual!?!

Is there any fix for that low FPS? AND also some regular camera improvements?

fat32 and 32kb formated! both sd class2 and class6.

Best Regards

Wowa Trader
[Desire HD General] genocida:
In the settings, try to set the Brightness to -2 to get few more fps
[Desire HD General] tolis626:
Although there is probably something wrong in your case,cause every video I've seen from the DHD is very fluid,you could try to set ISO to the maximum value(I think 800) when in photo mode(option does not appear in video mode).Else,you could lower the resolution(800x480 is juuuuust fine,believe me).

Bear in mind that there could be something wrong with your phone.I certainly hope that's not the case though! :)

With kind regards

Apostolis
[Desire HD General] Fame123:
hi

I just was testing desire the hd camcorder. I recorded a video for approx 3 mins.

Whilst playing the video, it has lags and stutters which i know is not normal. Previous hd2 ran smoothly and it never had this problem. HD2 was 5MP and desire HD has 8MP, but I dont think the camera quality is as good as the hd2.

Is there a way to fix this frame skipping/lagging issue?

Has anyone else had this problem, can any1 shed any light on this?

Thanks in advance.
[Desire HD General] tolis626:
The HD2 records video at 800x480,while the Desire HD at 1280x720.If you do the math it's 384000 vs 921600 pixels,which is 2.4 times as many pixels.Try recording at 800x480.Its quality is as good on the phone's screen.
[Desire HD General] Fame123:
Hi tolis626

Thanks for the reply. Yes I did the maths, hence was concerned about the rec quality. Now I will try 800x480 and see how the quality is now.

What about the video stuttering/lagging when played?

Many Thank again :-)