How to Solve issues of Internet not working with Windows Phone 8 emulator.


If you are facing issues while connecting Internet with Windows Phone 8 emulator during deployment process and getting error message like “Windows Phone emulator was not able to connect to Windows Phone operating system. Phone didn’t respond to connect request” or on opening IE(Internet Explorer) of Windows Phone emulator, getting message “We can’t connect to search right now. Make sure airplane mode is turned off, or check your cellular data or Wi-Fi connection” even you system is connected with Internet connection. However when you deploy same Windows Phone application of Windows Phone device(developer unlocked), it works fine without any issues. I can understand this one is weird to consider that same application is behaving differently with same wi-fi connection. I experienced same feeling after upgrading from Visual Studio 2012 to Visual Studio 2013 IDE with Windows 8 OS to Windows 8.1 OS though it was working fine on Windows 8 With Visual Studio 2012. I have tried many tips & tricks available on many websites, blogs and even on MSDN website-[Troubleshooting the Windows Phone 8 Emulator] but I was unable to solve the issues. Finally after using some more steps I am able to connect Internet with Windows phone 8 emulator using WI-FI.

Possible Solution to solve Internet Issues with Windows Phone 8 emulator : 

Follow given steps –

Step 1- Move to “Control Panel\All Control Panel Items\Administrative Tools”, Here remove each and every Virtual Machines listen under.
Step 2 – Remove Hyper-V and then Restart the System.
Step 3 – After restarting, Install Hyper-V once again.
Step 4 – Open Visual Studio and Run any Windows Phone 8 app to start the emulator.
Step 5 – It will create again all needed Virtual Machines( you can notice from Hyper-V Manager tools)
Step 6 – While loading emulator, it will prompt for letting the emulator access the internet. say yes.
Step 7 – Let the emulator and your project fully load
Step 8 – Now you need to shutdown the emulator( by closing directly or use Shift + F5) and close the Visual Studio.
Step 9 – Now Open Network and Sharing Centre
Step 10 – Click change Adapter Settings (Listed on the left hand side)
Step 11 – Now you will see there – “Control Panel\Network and Internet\Network” Connections. some new adapter created by HyperV, they should be called “vEthernet(…)”
Step 12 – Here, You need to focus on the vEthernet( Virtual Switch) and vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)
Step 13 – Now right click on vEthernet( Virtual Switch) and click on the properties and navigate to the sharing tab.
Step 14 – Here, Choose Allow other Network users to connect and choose the vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) as the adapter and then save the changes and close Windows.
Step 15-  Now open the properties on vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)
Step 16 – Here, You need to disable Internet Protocol Version 6 and double click on Internet Protocol Version 4
Step 17 – Now, Use the following IP address: 169.254.169.177 Subnet mask:255.255.0.0
Step 18 – After entering IP address and Subnet mask. You need to click on advanced button, under the IP settings tab, and then assign an interface metric: 1
Step 19 – Now Open your Visual Studio and run the Windows Phone 8 project.
Step 20 – Open Internet by using Search button or Internet Explorer of emulator and check Internet access.(Make sure your Wi-fi is working properly)

In my case, It works fine and I’ve shared this tips among some guys and they all solved the issues of Internet with Windows Phone 8 emulator. Hope this might help you also.

Posted in CodeProject, Tips&Tricks, Windows Phone | Tagged , | Leave a comment

“Chanakya Neeti” – A Free Chanakya Neeti app for Windows Phone users to learn the lessons of life.


Here come my one more windows phone application in the windows phone store. This application is free for all windows phone users who love Chanakya and his quotes. This application is dedicated to all users who inspired from Chanakya thoughts. This is like a complete Chanakya Neeti book in your mobile.

About App –

Chanakya is the only personality who has been accepted as a genius both by Indian and Western scholars. Let’s know why ? The ideas in CHANAKYA NITI, will let you know. Chanakya Neeti is a blend of practical wisdom with spirituality. It will inspire as well as guide you to follow the path of truth.

Features of This app :
a) Around 250 quotes from all 17 Chapter of Chanakya Neeti in English as well as In Hindi Language.
b) Chanakya Hidden Story and His Biography
c) You can share quotes on social sites like Facebook.
d) You can message quotes to others.

Note – More quotes and Picture quotes coming soon in next version. Stay tuned.

Download App –
If you love Chanakya Quotes and owning a windows phone, then this is must having app for you to learn the lessons of life.
Get Free Chanakya Neeti App-[Download]
Recently Chanakya Neeti app get listed in New+Rising of book-reference as well as in All category from Indian Windows Phone Store Market.

Screenshots –

This slideshow requires JavaScript.

I hope you like and will enjoy this app.  Learn and Spread the Lessons Life. 🙂 

Posted in Download, General, Windows Phone, Windows Phone App | Tagged , , | 2 Comments

How to format texts of TextBlock using xaml in Windows Phone


Sometime you may want to write formatted text in your app to give more pleasant for eye of users or to get more attention from user, sometime you may also want to display text where first few part should be bold, colorful with big font size and rest part is normal.

As for example :

Hello World ! I am learning how to format texts 

Here, we can see a sentence is mixed with different format of texts. Some part is in Bold and Colorful, some part is normal and some part is bold with underline as shown in below pic.

RRK-wptextblock

from above figure, we can see that  “Hello World” is in Red Color, “I am learning” is in italic font and “How to format text” is in Bold with underline text style.

Code for format TextBlock

To show formatted text i.e. text having multiple styles or colors in a single line in your windows phone apps then we can easily do so with a TextBlock


    <TextBlock HorizontalAlignment="Left"  TextWrapping="Wrap" VerticalAlignment="Top" Width="480">
                    <Run Text="Hello World! " FontSize="18" Foreground="Red" FontWeight="Bold" ></Run>
                    <Run Text="I am learning " FontStyle="Italic" ></Run>
                    <Run Text="How to format text." FontWeight="Bold" TextDecorations="Underline"></Run>
            </TextBlock>

We can also change the font style of selected part of a line by using FontFamily property of TextBlock.


    <TextBlock HorizontalAlignment="Left"  TextWrapping="Wrap" VerticalAlignment="Top" Width="480">
                    <Run Text="Hello World! " FontFamily="Verdana"  FontSize="18" Foreground="Red" FontWeight="Bold" ></Run>
                    <Run Text="I am learning " FontFamily="Times New Roman" FontStyle="Italic" ></Run>
                    <Run Text="How to format text." FontFamily="Algerian" FontWeight="Bold" TextDecorations="Underline"></Run>
            </TextBlock>

Here is the output of above code.

rrk-wptextblock2

Posted in C#, CodeProject, Windows Phone, Windows Phone App | Tagged , , , , | Leave a comment

“Shirdi Sai Baba” – A Free Sai Baba app for Windows Phone users


Here come my new windows phone application in the windows phone store. This application is free for all windows phone users. This application is dedicated to devotees of Shirdi Sai baba. This is like Sai Baba temple in your phone.

About App –
Shirdi Sai Baba was an Indian guru, equally revered by Hindus and Muslims for his selfless works towards humankind as he went about preaching kindness, charity, inner peace and devotion to the almighty. He practiced rituals, both Hindu and Islamic in nature and coined the epigram “Sabke Malik Ek”, which his followers across the world chant religiously. His works, preachings and music continues to inspire millions of Indians despite their religion.
This app brings for you
a) Sai Baba all Aarti Collections in Hindi and English.
b) 10 best Sai bhajans ever composed,
c) 30 Sai pics, ( You can save it in your phone)
d) 11 Vachan of Sai Baba in Hindi and English ( With Audio )
e) Sai Story
f) Sai 108 Names
g) Shirdi Sai Baba Temple details.

Download App –
If you Love Sai Baba and owing a Windows Phone device then this one is must having app for you.
Get Free Shirdi Sai Baba WP APP 🙂

Recently this app get listed in Top Free Apps in book-reference category as well as makes place in new+rising category of all apps from Indian Windows Phone Store Market.

Screenshots –

This slideshow requires JavaScript.

I hope you like and will enjoy this app.  !! OM SAI RAM !!

Posted in Download, General, Windows Phone, Windows Phone App | Tagged , , , , , | 6 Comments

How to pass values between pages in Windows Phone 8 using PhoneApplicationService


It is obvious that if your application redirect(navigate) from one page to another page, you will frequently want to pass values between these pages. Lets consider a example where a user need to pass value of textbox from one page to another page, like when a user enter something in textbox of page2 and would like to see same entered(from page2) value in textbox of page1. We can pass information between pages in various ways but here in this article we are going to use PhoneApplicationService to pass values between pages in Windows Phone 8.

Using PhoneApplicationService to accomplish task of passing values between pages is not a cumbersome task. We should know what is PhoneApplicationService before learning what is the actual use of PhoneApplicationService to pass values between pages.

PhoneApplicationService –

The PhoneApplicationService is a class of Microsoft.Phone.Shell Namespace. The PhoneApplicationService class provides access to various conditions of the application’s lifetime. This includes management of the application’s idle behavior and management of the application’s state when it becomes active or inactive.
Read More : MSDN-PhoneApplicationService Class

Using PhoneApplicationSerivce States –

PhoneApplicationService.State Property state that it is used to Gets the dictionary used for passing an application’s state between invocations.

Each and every Windows Phone application containing PhoneApplicationService which defined in Microsoft.Phone.Shell. Every application has its one PhoneApplicationService defined in its App.xaml file of a Windows Phone project. We can use this service’s property called “State”. These “States” are all transient data which means they are available only for one instant of your application which means once you restart your application these states will be lost. Also we should not try to create a new PhoneApplicationService instead we must try to use the service from the current instant. Which can be retrieved using this code:

PhoneApplicationService.Current.State

Note – Windows Phone applications are deactivated when the user navigates to another application. When the user returns to the application, by using the Back button or by completing a Launcher or Chooser task, the application is reactivated. An application can store transient application state in the State dictionary in the handler for the Deactivated event. In the Activated event handler, an application can use the values stored in the State dictionary to transient application state. (Reference MSDN)

To Use PhoneApplicationSerivce States to pass information –

 protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
        {
            // Called when a page becomes the active page in a frame
            base.OnNavigatedFrom(e);
            // Text is param, you can define anything instead of Text but remember you need to further use same param.
            PhoneApplicationService.Current.State["Text"] = txtboxvalue.Text;
        }

to go back to first page

 NavigationService.GoBack();

Note – Page.OnNavigatedFrom method Invoked immediately after the Page is unloaded and is no longer the current source of a parent Frame.

To Use PhoneApplicationSerivce States to retrieve information –

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            if (PhoneApplicationService.Current.State.ContainsKey("Text"))
                txtvalue.Text = (string)PhoneApplicationService.Current.State["Text"];

        }

to navigate next page

  NavigationService.Navigate(new Uri("/Page2.xaml", UriKind.Relative));

Note – Page.OnNavigatedTo method Invoked when the Page is loaded and becomes the current source of a parent Frame.

How is PhoneApplicationService.Current.State remembered
The PhoneApplicationService class plays a major role in the tombstoning game, since it exposes the Launching, Deactivate, Activated, and Closing events that have the corresponding methods (which you already saw) in the App.xaml.cs file. The objects are serialized (using DataContractSerializer) and then kept in memory. This is different (and faster) compared to IsolatedStorage which saves the data to disk.

When you use give code and debug the application, the emulator windows will launch up and run application as shown in below pics –

rrk-passvalue1

Demo of passing value between pages

Download Source Code
Try source code to Learn more. Click Me!

Posted in C#, CodeProject, Windows Phone | Tagged , , , , | 2 Comments