Friday, May 17, 2013

V-Place 1.5 is available on Windows Phone Store

V-Place 1.5 is available on Windows Phone Store. Here are new features, improvements and bug fixes in this release:

  • Share to Twitter directly from the app
  • Support Vietnamese
  • Fixed cannot retrieve place information in some regions
  • A lot of improvements and bug fixes

Sunday, May 12, 2013

Critical error in V-Place 1.1

I've just found a critical error in V-Place 1.1 which relates with how the app retrieves place information. The problem only happens with devices were set up with some specified regions (Vietnam is an example). But it doesn't effect to others (US, UK and Singapore are just a few examples). I will push version 1.5 and hope that it as soon as possible. Very sorry for inconvenient.

Saturday, May 11, 2013

V-Place 1.1 was available on store

A few days ago I released V-Place 1.1. In this version I did some small changes to make the app works better. Here are they:

  • Enable saving and sharing pictures without location services
  • Minor improvements and bug fixes

I will continue the incremental change to keep the app better and more polite.

The upcoming 1.5 will come with new features and a lot of improvements and bug fixes. I expect it to come in next 10 days. Stay tuned, more information will come soon :-)

Saturday, May 4, 2013

Comparison between V-Place, PhotoPlace Pro and Ciel

Note: Click the picture for larger view.

Monday, April 29, 2013

V-Place 1.0 is available on Windows Phone Store

It took about one month for development, beta testing, submission and fixing bug, now V-Place 1.0 is available on Windows Phone Store.

In this version, you can:

  • Take/open pictures
  • Add effects
  • Save pictures to device
  • Share pictures to Facebook

You can get V-Place 1.0 using the link or QR code below

One bug I found out after releasing: The app shows a message which mentions that application location service setting is disabled even it is enable by default. It will be fixed soon.

If you can't wait for new version, there is a workaround. You only need to open settings from start page via settings menu item, then navigate back to start page.

What's next?

  • 1.1 will come with bug fixes and improvement.
  • 1.5 will come later with new features.

Monday, April 22, 2013

Some tips in using Windows Phone 8 emulator

Cannot connect to Internet from emulator
Run this command from Command Prompt

    "C:\Program Files (x86)\Microsoft XDE\8.0\XdeCleanup.exe"
It will remove all virtual network cards and they will be re-created when you start the emulator.

Start emulator without Visual Studio
Run this command from Command Prompt

    "C:\Program Files (x86)\Microsoft XDE\8.0\XDE.exe"
    /vhd "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.vhd" 
    /video "720x1280" 
    /memsize 1024 
    /language 409 
    /creatediffdisk "%Temp%\dd.720x1280.1024.vhd" 
    /fastShutdown

Wednesday, January 23, 2013

Thủ thuật download Windows Phone 7.8 SDK để cài đặt offline

Hôm nay, Microsoft đã giới thiệu Windows Phone 7.8 SDK để dọn đường cho việc đưa ra phiên bản Windows Phone 7.8 với một số cải thiện về mặt giao diện và tính năng cho người dùng dự định bắt đầu từ 31/1. Tuy nhiên hiện tại Microsoft mới chỉ đưa ra bộ cài đặt Windows Phone 7.8 SDK qua web. Bạn có thể tải nó tại đây với yêu cầu là máy tính của bạn đã được cài đặt sẵn Windows Phone SDK 7.1 hoặc 8.0.

Vậy làm sao chúng ta có thể tải bộ cài đặt này về để có thể cài đặt offline và dành cho các lần cài đặt sau. Rất đơn giản, bạn chỉ cần chạy lệnh "WPExpress78_update.exe /layout" ở cửa sổ Command Prompt:

Bộ cài đặt sẽ hỏi bạn thư mục bạn muốn tải nó về. Chọn thư mục và click nút Download

Việc tiếp theo là chờ đợi.

Sau khi tải xong, bộ cài đặt offline này chiếm khoảng 5,45 GB ổ cứng và bạn chỉ cần chạy file WPExpress78_update.exe nằm bên trong thư mục download để cài đặt.

Wednesday, January 2, 2013

Khởi đầu với Windows Phone 8

Như các bạn đã biết, ngày 30 tháng 10 vừa qua, Microsoft đã chính thức giới thiệu Windows Phone 8 (WP8) cùng các thiết bị đầu tiên được cài đặt sẵn hệ điều hành này đến từ Nokia, HTC và Samsung. Đồng thời với việc giới thiệu này, Microsoft cũng đưa ra bản SDK (Software Development Kit) cho các nhà phát triển để họ triển khai, phát triển các ứng dụng cho WP8.

Những điểm nổi bật trong SDK của WP8 là hỗ trợ lập trình bằng C++, hỗ trợ nhiều độ phân giải màn hình, sử dụng dịch vụ map của Nokia,… Để biết chi tiết hơn những điểm mới trong SDK cho WP8, bạn có thể tìm hiểu tại đây.

Trong bài viết này, tôi muốn giới thiệu tới các bạn những yêu cầu tối thiểu để cài đặt WP8 SDK và sau đó ta sẽ cùng cài đặt và sử dụng nó để viết một ứng dụng WP8 cơ bản.

Cấu hình tối thiểu để cài đặt WP8 SDK như sau:

  • Hệ điều hành:
    • Windows 8 64-bit (x64)
  • Phần cứng:
    • 6,5 GB chỗ trống trên ở cứng
    • 4 GB RAM
    • 64-bit (x64) CPU

Ngoài ra để có thể chạy được WP 8 emulator, bạn cần có:

  • Windows 8 Pro hoặc Windows 8 Enterprise
  • CPU có hỗ trợ SLAT (Second Level Address Translation). Để kiểm tra xem CPU của bạn có hỗ trợ SLAT hay không, bạn tham khảo bài viết này.

Chú ý: Mặc dù máy của bạn có thể không chạy được WP8 emulator (như máy tính ở nhà của tôi với CPU Intel Q9550) điều đó không có nghĩa là bạn không thể phát triển các ứng dụng cho WP8. Bạn vẫn có thể phát triển chúng bình thường, tuy nhiên để chạy thử, bạn phải deploy chúng lên thiết bị WP8 thật. Điều này gây cho bạn đôi chút phiền toái nhưng việc deploy và test ứng dụng của bạn trên thiết bị WP8 dù bạn có thể hay không thể sử dụng WP8 emulator là việc nên làm.

Bước đầu tiên của việc cài đặt WP8 SDK là tải nó về từ trang web của Microsoft. Bạn có 2 lựa chọn tải WP8 SDK:

  • Phiên bản cài qua Internet tải tại đây
  • Phiên bản ISO để cài offline tải tại đây

Tôi chọn phiên bản ISO để sau này nếu cần có thể cài đặt lại.

Sau khi tải xong file ISO cho bộ cài đặt WP8 SDK, bạn nhấn nút phải chuột trên file ISO rồi chọn Mount, Windows 8 sẽ "mount" file ISO thành một ổ đĩa ảo. Bạn hãy mở ổ đĩa ảo đó trong explorer rồi nhấn đúp file WPexpress_full.exe để bắt đầu quá trình cài đặt.

Quá trình cài đặt WP8 SDK cũng tương tự như bất cứ quá trình cài đặt ứng dụng Windows nào khác. Trước tiên bạn sẽ phải chấp nhận các điều khoản về license bằng cách đánh dấu vào ô "I agree to the License terms and conditions" rồi sau đó nhấn nút INSTALL.

Tiếp đó bạn chỉ việc ngồi chờ đợi. Nếu không có bất cứ trục trặc gì xảy ra, bộ cài đặt sẽ thông báo tiến trình cài đặt hoàn thành như dưới đây.

Chú ý: Trong trường hợp máy tính của bạn đã được cài đặt sẵn Visual Studio 2012 (VS2012) từ phiên bản Professional trở lên, SDK tool sẽ được tích hợp vào Visutal Studio. Trong trường hợp máy tính của bạn không có một trong các phiên bản trên, Visual Studio 2012 Express for Windows Phone sẽ được cài đặt.

Vậy là bạn đã có thể bắt đầu việc phát triển ứng dụng cho WP8. Và ngay sau đây chúng ta sẽ cùng bắt tay vào viết một ứng dụng WP8 đơn giản. Tôi sử dụng VS2012 Ultimate nên giao diện có thể sẽ có đôi chút khác biệt trong trường hợp bạn dùng VS2012 Express for Windows Phone.

Đầu tiên là tạo project. Bạn hãy mở VS2012 và chọn File, New sau đó chọn Project. Bạn mở rộng mục Templates, Visual C# rồi chọn Windows Phone. Với ví dụ này, chúng ta sẽ sử dụng Windows Phone App template. Hãy chọn nó, nhập tên cho dự án và chọn lưu tại thư mục mà ban mong muốn.

Sau khi nhấn OK, VS2012 sẽ hiển thị hộp thoại yêu cầu chọn hệ điều hành. Bạn hãy chọn "Windows Phone OS 8.0" rồi nhấn OK.

VS2012 sẽ tạo project cho bạn và hiển thị MainPage.xaml

Bạn hãy tìm đoạn code sau



Sau đó thay "MY APPLICATION" thành "HELLO WORLD" và "page name" thành "hello page"



Để deploy ứng dụng trên emulator hay thiết bị thật, bạn chọn mục tương ứng như trong hình sau rồi nhấn F5.

Ứng dụng sẽ được deploy lên emulator hoặc thiết bị rồi thực thi như trong hình sau.

Chúc mừng bạn, vậy là chúng ta đã hoàn thành ứng dụng WP8 đầu tiên.

Tôi sẽ trở lại với các bài viết về lập trình WP8 nữa. Mong các bạn đón đọc.

Thursday, September 20, 2012

Baby Learns to Write beta is finished

Today I finished beta version of Baby Learns to Write. You can check out the function and how it looks in this screencast.



In the upcoming version, I will address
  • Advanced navigation
  • More "candy" UI
  • Save the drawing to image

Monday, September 17, 2012

Simple navigation implementation in my first Windows 8 app - Part 2

As in previous post, I described how to implement simple navigation in Baby Learns to Write. Even it worked as expected, but I don't like the implementation when it's not pure MVVM, I still need to add code to code behind file to make the app works. In this post, I will address it.

First, I will update the commands.
    public abstract class MoveCommand : ICommand
    {
        protected readonly MainPageViewModel ViewModel;

        protected MoveCommand(MainPageViewModel viewModel)
        {
            ViewModel = viewModel;
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public abstract void Execute(object parameter);

        public event EventHandler CanExecuteChanged;
    }

    public class MoveNextCommand : MoveCommand
    {
        public MoveNextCommand(MainPageViewModel viewModel) : base(viewModel)
        {
        }

        public override void Execute(object parameter)
        {
            ViewModel.MoveNext();
        }
    }

    public class MovePreviousCommand : MoveCommand
    {
        public MovePreviousCommand(MainPageViewModel viewModel) : base(viewModel)
        {
        }

        public override void Execute(object parameter)
        {
            ViewModel.MovePrevious();
        }
    }
The most important thing is CanExecute() always return true, and I removed RaiseCanExecuteChanged() as I don't need it anymore.

Then I update the view model
public class MainPageViewModel : INotifyPropertyChanged
    {
        private readonly List _numbers;
        private int _currentIndex;

        public int Number
        {
            get { return _numbers[_currentIndex]; }
        }

        public ICommand MovePreviousCommand { get; private set; }
        public ICommand MoveNextCommand { get; private set; }

        public MainPageViewModel()
        {
            _numbers = new List {1, 2, 3};

            _currentIndex = 0;

            MovePreviousCommand = new MovePreviousCommand(this);
            MoveNextCommand = new MoveNextCommand(this);
        }

        public bool CanMovePrevious
        {
            get { return _currentIndex > 0; }
        }

        public bool CanMoveNext
        {
            get { return _currentIndex < _numbers.Count - 1; }
        }

        public void MovePrevious()
        {
            if (CanMovePrevious)
            {
                _currentIndex--;

                PropertyChanged(this, new PropertyChangedEventArgs("Number"));
                PropertyChanged(this, new PropertyChangedEventArgs("CanMovePrevious"));
                PropertyChanged(this, new PropertyChangedEventArgs("CanMoveNext"));
            }
        }

        public void MoveNext()
        {
            if (CanMoveNext)
            {
                _currentIndex++;

                PropertyChanged(this, new PropertyChangedEventArgs("Number"));
                PropertyChanged(this, new PropertyChangedEventArgs("CanMovePrevious"));
                PropertyChanged(this, new PropertyChangedEventArgs("CanMoveNext"));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }
    }
In additional raising the PropterChanged event for Number property, I also raise for CanMovePrevious and CanMoveNext property. These properties are used to bind to the XAML as below
    
        
The last thing I need to do is removing all redundant code from code behind file.
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            DataContext = new MainPageViewModel();
        }

        /// 
        /// Invoked when this page is about to be displayed in a Frame.
        /// 
        /// Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }
    }
Now the app is written with pure MVVM.

You can grab the source code from here.