domenica 21 aprile 2013

Windows Phone 7.8 - Gmail Sync: contacts and calendar

After January 30 2013, Google dropped Exchange ActiveSync support.
Now if you add a Google account in Windows Phone 7.8, you can sync only emails.
But if I want to sync my Google Contacts and Calendars...??

Just follow this steps:
- Go in Settings >>> Email + Accounts.
- Add an account.
- Choose Outlook (Outlook.com, Exchange, Office 365).
- Write you Google email, password and press Sign In button.

Fill the new page with this informations:
- Account: your Google email
- Domain: google
- Server: m.google.com

Et voilà, you done! :)



martedì 19 marzo 2013

Vote myMoneyBook and win a Lumia 920


Microsoft is running a campaign called Windows Phone Next App Star, and guess what? Over 9,000 apps entered the competition, and my app myMoneyBook is one of 64 finalists!

Starting today, March 19, my app is in a head-to-head battle with another finalist. If my app gets the most votes, it keeps moving forward, and I keep winning more prizes.  If my app wins the whole thing, myMoneyBook will be Windows Phone Next App Star and will be featured in an upcoming Windows Phone television ad!

Even better, every time people like you participate in the campaign and vote, they are entered to win a brand new Lumia 920 Windows Phone! Microsoft is giving away one Lumia 920 every day throughout the contest, and every vote is an entry.
Will you please help me become Windows Phone Next App Star?


Please note:
you may have to vote several times before reaching the voting opportunity for my app. There are 32 first round match-ups, just look for a picture of me and my app myMoneyBook.




martedì 19 febbraio 2013

PeriodicTask bug in Windows Phone 8


After almost two months, WPDev Team has confirmed a bug for PeriodicTask in Windows Phone 8:

PeriodicTask fails to trigger if there is no network connectivity in WP8 (enable Airplane mode,  or disable both cellular and wifi.

Here my discussion: http://social.msdn.microsoft.com/Forums/en-US/wpdevelop/thread/216a9f3d-9284-4d1e-ac2a-83f2d13e361c


mercoledì 6 febbraio 2013

Easy SQL CE on Windows Phone

In Windows Phone is very simple to add and use SQL CE database.
What you need? Nothing... it's built in the Windows Phone Runtime.

Let's start...

If not exists, add the reference System.Data.Linq in your project.

Create the class to map the entity to the table:
[Table(Name="Utenti")]
public class Utente
{
    [Column(IsPrimaryKey = true, IsDbGenerated = true)]
    public int Id { get; set; }

    [Column(CanBeNull = false)]
    public string Name { get; set; }
}
You can see the attributes for the table and columns: table name, primary key, etc..

Now add a class for DataContext with the reference to the table Utenti. The DataContext wraps all operations you can do with database:
public class MyDataContext: DataContext
{
    public const string ConnectionString = "isostore:/mydatabase.sdf";

    public Table<Utente> Utenti { get; set; }

    public MyDataContext(string connectionString)
        : base(connectionString)
    {
        this.Utenti = this.GetTable<Utente>();
    }
}
ConnectionString has the special path to locate the database file in the isolated storage.

The classes for SQL CE are ready.
The last thing is create the physical .sdf file when the application start.
private void Application_Launching(object sender, LaunchingEventArgs e)
{    
    using (var context = new MyDataContext(MyDataContext.ConnectionString))
    {
        if (!context.DatabaseExists())
            context.CreateDatabase();
    }
}

And now enjoy with your LinqToSql queries!
using (var context = new MyDataContext(MyDataContext.ConnectionString))
{
    var utenti = context.Utenti.OrderByDescending(u => u.Name).ToList();
}

Remember the "using" statement, because you need to dispose your DataContext to prevent high memory usage. The cost to create a new istance is very small.

NOTE: if you want to build an application for Windows 8/RT, maybe SQL CE is not your way. Why? Unfortunately Windows 8/RT don't support it. In this case you can use SQLITE.

venerdì 18 gennaio 2013

Windows Phone 8 - Theme Colors (HEX - RGB)

Do you want to know the HEX or the RGB of Windows Phone 8 theme colors? Here the table. Just copy/paste the code below:

Lime: #A4C400 Green: #60A917 Emerald: #008A00 Teal: #00ABA9 Cyan: #1BA1E2
Cobalt: #0050EF Indigo: #6A00FF Violet: #AA00FF Pink: #F472D0 Magenta: #D80073
Crimson: #A20025 Red: #E51400 Orange: #FA6800 Amber: #F0A30A Yellow: #E3C800
Brown: #825A2C Olive: #6D8764 Steel: #647687 Mauve: #76608A Taupe: #87794E


Complete list with RGB:
  • Lime: #A4C400; RGB(164, 196, 0)
  • Green: #60A917; RGB(96, 169, 23)
  • Emerald: #008A00; RGB(0, 138, 0)
  • Teal: #00ABA9; RGB(0, 171, 169)
  • Cyan: #1BA1E2; RGB(27, 161, 226)
  • Cobalt: #0050EF; RGB(0, 80, 239)
  • Indigo: #6A00FF; RGB(106, 0, 255)
  • Violet: #AA00FF; RGB(170, 0, 255)
  • Pink: #F472D0; RGB(244, 114, 208)
  • Magenta: #D80073; RGB(216, 0, 115)
  • Crimson: #A20025; RGB(162, 0, 37)
  • Red: #E51400; RGB(229, 20, 0)
  • Orange: #FA6800; RGB(250, 104, 0)
  • Amber: #F0A30A; RGB(240, 163, 10)
  • Yellow: #E3C800; RGB(227, 200, 0)
  • Brown: #825A2C; RGB(130, 90, 44)
  • Olive: #6D8764; RGB(109, 135, 100)
  • Steel: #647687; RGB(100, 118, 135)
  • Mauve: #76608A; RGB(118, 96, 138)
  • Taupe: #87794E; RGB(135, 121, 78)

lunedì 24 dicembre 2012

myBattery for Windows Phone

MyBattery" is out, and it's free for some days!

Do you want to see your battery level in the live tile or in the lock screen?
NOW YOU CAN.. with the best app for this category!
Just pin the tile and check your battery level.


Features:
  • Modern UI with animations.
  • Battery percentage.
  • Remaining charge time.
  • Charts: from daily to all history.
  • Swap chart color.
  • Choose your images: colored or not.
  • Notifications in the Lock screen.

Windows Phone API limitations:
  • The live tile and the lock screen can be updated approximately every 30 minutes.
  • The live tile and the lock screen can show percentage from 0 to 99.
  • The notification icon in the lock screen can't change.



Check the marketplace now: Download myBattery


QRCode

domenica 2 dicembre 2012

Windows Phone - Battery API

One of the new additions with the Windows Phone SDK 8.0, is the ability to query the battery charge.

Here the simple code:
Battery battery = Battery.GetDefault();
var percentage = battery.RemainingChargePercent;
var remainingTime = battery.RemainingDischargeTime;

And the event:
battery.RemainingChargePercentChanged += (s, args) =>
{
 // your code here
};

Enjoy!