lunedì 12 maggio 2014

Great news for developers


Microsoft released Visual Studio Update 2 RTM:
download the web installer
download the offline installer (iso image)
check the full log

The official Windows Phone 8.1 beta for Sqlite extension is out:
download Sqlite extension

Want more?
Telerik gives a free license for Windows Phone and Windows 8 controls:
claim your license

Now it's time to develop Windows Phone 8.1 applications and universal apps :)

[EDIT 15 may]:
A special offer also from Syncfusion:
get wp controls for only 1$

venerdì 14 marzo 2014

Windows Phone 8 Development Succinctly - Free ebook


I'm so glad to announce the new free ebook from Syncfusion:

Windows Phone 8 Development Succinctly

This ebook is written by my friend Matteo Pagani and you can download 243 pages in PDF or Kindle format.

Before starting, please remember: if you are a beginner in development, this ebook is not for you. You need to know the basic concepts of the C# programming.

This book covers all the features of Windows Phone so it's also a good read if you are new in wp development.

Main chapters:

  1. Introduction: 
  2. The User Interface: Basic XAML Concepts
  3. Core Concepts
  4. Data Access: Storage
  5. Data Access: Network
  6. Integrating with the Hardware
  7. Integrating with the Operating System
  8. Multimedia Applications
  9. Live Apps: Tiles, Notifications, and Multitasking
  10. Distributing the Application: Localization, the Windows Phone Store, and In-App Purchases

Pro
  • free! :)
  • easy and fast to read
  • all development cycle
  • a lot of samples and tips
  • Kindle format
  • finally an ebook that explains all storage approaches

Meanwhile you can download the Syncfusion wp controls (now at special price) to make more fast your development. Hurry up! ;)


domenica 2 marzo 2014

Windows Phone 8 - WriteableBitmap and app resume


When I upgraded my WP7 projects to Windows Phone 8, I discovered a strange behavior.

I usually update the tiles in the Application_Deactivated and Application_Closing event, but in wp8 the app crashes while it resumes.
The tiles were created in the storage, so all works good.

The problem seems related to the WriteableBitmap.Render method. I don't know why it blocks the UI thread!

If you have the same behavior, you can use a workaround:

In the App.xaml.cs add the Navigating event in the InitializePhoneApplication method
RootFrame.Navigating += RootFrame_Navigating;

Use the app://external/ string to know when you are exiting from the application
void RootFrame_Navigating(object sender, NavigatingCancelEventArgs e)
{
 if(e.Uri.OriginalString=="app://external/")
 {
  // update my custom tiles
 }
}

lunedì 13 gennaio 2014

WPDev Fusion - A new wp community


After the great success of Windows Phone Week from last october, a new evolution is born:
WPDev Fusion the Windows Phone community with the best MVPs in the world.


If you like mobile development or Windows Phone, this is the event for you!

The first event is scheduled on 22nd january. It is free and online:
https://wpdevfusion.eventday.com/

The sessions are:
I'm very curious to attend the session of the "queen" Ginny :)

[UPDATE]
Recording, slides and samples

sabato 4 gennaio 2014

Windows Phone 8 - Folders and files


Windows Phone 8 introduced the ApplicationData class to easily work with IsolatedStorage and async/await keywords.

In Windows Phone currently it is possible to use only LocalFolder because RoamingStorage and TemporaryStorage throw the NotSupportedException.

However, all the operations can be done with a few lines.

How to use folders

Create folder

StorageFolder folder = await ApplicationData.Current.LocalFolder.CreateFolderAsync("myFolder", CreationCollisionOption.ReplaceExisting);


Read folder

var folder = await ApplicationData.Current.LocalFolder.GetFolderAsync("myFolder");


Check if folder exists

StorageFolder folder;
try
{
    folder = await ApplicationData.Current.LocalFolder.GetFolderAsync("myFolder");
    MessageBox.Show(folder.Name);
}
catch (FileNotFoundException ex)
{
    MessageBox.Show("Folder not found");
}


Read all folders

var folders = await ApplicationData.Current.LocalFolder.GetFoldersAsync();
foreach (var folder in folders)
    MessageBox.Show(folder.Name);


Rename folder

var folder = await ApplicationData.Current.LocalFolder.GetFolderAsync("myFolder");
await folder.RenameAsync("myRenamedFolder");


Delete folder

var folder = await ApplicationData.Current.LocalFolder.GetFolderAsync("myFolder");
await folder.DeleteAsync(StorageDeleteOption.PermanentDelete);


How to use files

Create file

var file = await ApplicationData.Current.LocalFolder.CreateFileAsync("myFile.txt", CreationCollisionOption.ReplaceExisting);


Read all files

var files = await ApplicationData.Current.LocalFolder.GetFilesAsync();
foreach (var file in files)
    MessageBox.Show(file.Name);


Check if file exists

StorageFile file;
try
{
    file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.txt");
    MessageBox.Show(file.Name);
}
catch (FileNotFoundException ex)
{
    MessageBox.Show("file not found");
}

Write file

var file = await ApplicationData.Current.LocalFolder.CreateFileAsync("myFile.txt", CreationCollisionOption.ReplaceExisting);
var stream = await file.OpenAsync(FileAccessMode.ReadWrite);
using (var writer = new DataWriter(stream.GetOutputStreamAt(0)))
{
    writer.WriteString("Hello");
    await writer.StoreAsync();
    await writer.FlushAsync();
}


Read file

var file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.txt");
var stream = await file.OpenAsync(FileAccessMode.Read);
 
using (var reader = new DataReader(stream.GetInputStreamAt(0)))
{
    var bytes = await reader.LoadAsync((uint)stream.Size);
    var s = reader.ReadString(bytes);
    MessageBox.Show(s);
}


Rename file

var file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.txt");
await file.RenameAsync("myFileRenamed.txt");


Delete file

var file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.txt");
await file.DeleteAsync(StorageDeleteOption.PermanentDelete);


Copy file

var file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.txt");
var folder = await ApplicationData.Current.LocalFolder.GetFolderAsync("myFolder");
await file.CopyAsync(folder);


Move file

var file = await ApplicationData.Current.LocalFolder.GetFileAsync("myFile.txt");
var folder = await ApplicationData.Current.LocalFolder.GetFolderAsync("myFolder");
await file.MoveAsync(folder);

The sample project

You can download the sample project here.


The original post is in the Microsoft TechNet Wiki

Mokapp 2013 - Thanks


Yes, we are in 2014.. and I'm really sorry for delay..

I want to thank all those who attended the Mokapp 2013 event.
A great day with great people.

Thanks to our sponsors and speakers.
And a special thanks to Syncfusion who gave free licenses to the new Windows Phone developers.


Demo and slides are online:
  • iOS7 - Multitasking e Dynamics - Daniele Galiotto - slide & demo
  • WP8 - Storage - Tiziano Cacioppolini - slide & demo
  • Android - Sviluppare con MVVM - Lorenzo Maiorfi - slide & demo
  • iOS7 - iBeacons e le novità di BLE - Francesco Novelli - slide & demo
  • WP8 - Imaging, applicazioni fotografiche - Fabrizio Bernabei - slide & demo
  • iOS7 WP8 Android - Side-by-side, sviluppo crossplatform - demo
See you at the next event! :D

 
 





 

 

sabato 30 novembre 2013

XMAS TIME - Get a Lumia 925 for free


Do you want a Lumia 925 for Christmas?
Thanks to DVLUP you can get it easy :)

Check the new xmas challenge!
You just need to create 3 new applications for Windows Phone 8 and 3 new apps for Windows 8.
When you reach 4 apps (2 wp8 + 2 win8) you get 800XP to spend in rewards.

You don't have the DVLUP account?  Just register from this link.

The submission ends the 24th december.
And if you register to dvlup from my link, I can get 500xp too.
Merry Xmas :D