January, 2013

  • DaveDev

    Microsoft DevRadio: Using AppMobi to Build Windows 8 & Windows Phone Apps

    • 0 Comments

    Via Davedev.net

    DevRadio:

    clip_image002I recently had the pleasure of interviewing appMobi Developer Evangelist Andrew Smith on DevRadio.  We chatted about how web developers can now easily build apps for Windows 8 and Windows Phone.  If you’re an HTML5 or JavaScript developer looking to get your apps into multiple platforms, you don’t want to miss this episode! Sign Up for a FREE appMobi account here.

    Watch the Episode on Channel 9 here.

    Next Steps:
    Step #1 – Download the Tools for Windows 8 App Development
    Step #2 – Download Visual Studio Express for Windows 8
    Step #3 – Start building your own Apps for Windows 8

    Subscribe to our podcast via iTunes or RSS

    If you're interested in learning more about the products or solutions discussed in this episode, click on any of the below links for free, in-depth information:

    Websites:

    Blogs & Articles:

    Videos:

    Virtual Labs:

    Download

    -Dave

  • DaveDev

    Announcing the Windows Phone Development JumpStart

    • 0 Comments

    Windows Phone 8 Apps
     

    Register

    clip_image008

    Location

    clip_image007

    Date

    clip_image007[1]

    clip_image008[1]

    Cambridge, MA

    clip_image007[2]

    2/8

    clip_image007[3]

    clip_image008[2]

    Tampa, FL

    clip_image007[4]

    2/15

    clip_image007[5]

    clip_image008[3]

    Ft. Lauderdale, FL

    clip_image007[6]

    2/25

    clip_image007[7]

    clip_image008[4]

    New York, NY

    clip_image007[8]

    2/27

    clip_image007[9]

    clip_image008[5]

    Chevy Chase, MD

    clip_image007[10]

    3/7

    clip_image007[11]

    clip_image008[6]

    Alpharetta, GA

    clip_image007[12]

    3/8

    FREE EVENT
    Seating is limited, so register today.

     

     

     

     

     

    clip_image015

     

    WHAT IS A JUMPSTART?

    These FREE events are targeted at jumpstarting your knowledge on a particular topic. At the end of a JumpStart you should have an idea of what you are going to try and accomplish and how you are going to get there. This JumpStart targets Windows Phone 8 SDK. The content is structured for all dev types, whether they are students just starting out or seasoned developers we are there to help. For the seasoned Android, Symbian, Web OS or iOS, we'll share tips and tricks and all-around Windows Phone development know-how.

    AGENDA
    9:00am - Lap Around Windows Phone 8
    10:30am - Break
    10:45am - Designing For WP8
    12:00pm - Lunch
    12:45pm - More Than An App
    1:45pm - Sensors
    2:45pm - Break
    3:00pm - Sync and Auth
    4:00pm - What's next? Contest, local initiatives, and more as a wrap up….

    CAMP REQUIREMENTS
    Download the latest Windows Phone SDK to ensure you have the most up to date developer tools. On the day of the event, bring your laptop computer and identification.
    In the meantime, don't forget to check out the Windows Phone Dev Center where you can register to submit your app into the Windows Phone Marketplace, learn about application features, understand common tasks for Apps and much more.                    

    NOTE: This event is brought to you by Microsoft and is free of charge. However, attendees are responsible for booking and paying for their own travel, parking and accommodation.

    For more information or to register, click here
    OR CALL 1-877-MSEVENT                  

           

           

     

  • DaveDev

    Windows 8 Game Kit updated with Windows Store Share Contract

    • 0 Comments

    Windows Store Share Contract

    I had some requests for an example of the Windows Store Contract in the Kit.  I created simple function that will allow the player to share out their score with other Windows apps at any time.  The purpose here is a quick and easy example you can add to your own games. 

    What code was updated?

    Inside default.js we add a new variable to handle the title of our message.

    //Share Text
    var SHARE_TITLE = "Check out my Space Cadet score!";

    Next, we create a reference to the DataTransferManager  and listen for its datarequested event.  MSDN describes the DataTransferManager as follows:

    The DataTransferManager class is a static class that you use to initiate sharing operations. To use the class, first call the GetForCurrentView method. This method returns the DataTransferManager object that is specific to the active window. Next, you need to add an event listener for the datarequested event to the object. This event is fired when a sharing operation starts—typically when the user taps the Share charm, although it is also fired if your app starts a share operation programmatically.

    The DataTransferManager class includes a ShowShareUI method, which you can use to programmatically start a share operation. In general, we recommend against using this method. Users expect to initiate share operations by using the Share charm—when you launch the operation programmatically, you can create an inconsistent user experience. We include the method because there are a few scenarios in which the user might not recognize opportunities to share. A good example is when the user achieves a high score in a game.

    We are going to follow the guidelines and only create a package for the DataTransferManager when the player using our game requests it.  The code to create an instance of the DataTransferManager and listen to the event looks like this:

    //Share Contract
    var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
    dataTransferManager.addEventListener("datarequested", shareScore);

     

    Finally, we will implement the shareScore function that will handle the datarequested event.  It is important to point out that since we don’t actually create the package until we handle the event we can share out different types of data from our game depending on what screen we are in.  For demonstration purposes I am using just the one listener but you should feel free to create different ones in your different game pages.

    We then fill out the properties of the request object to use text.  The text will be a combination of our player’s name, their current level and their current score.

    //Share Contract for High Score
    function shareScore(e) {
        var request = e.request;
        var playername = document.getElementById("txtPlayerName");
     
        request.data.properties.title = SHARE_TITLE;
        request.data.setText('"' + playername.innerHTML + '" has reached ' + txtLevel.innerHTML + ' with ' + txtScore.innerHTML + '!');
     
    }

     

    Sharing out the score

    When we run the game we simply hit Windows-H (share) or go over to the Charms (Windows-C) and select Share.  At this point the DataTransferManager will send our game the event, we will fill out a request package with text and then the DataTransferManager will list all of the Windows Store apps that have registered to handle a Share for Text.

    If I select the Mail app on my own PC and you can see the title has been correctly filled out along with my player name, score and level.

     

    Share - Mail

    My PC also has a Windows Store Twitter app, MetroTwit, that has registered to handle Sharing of text.  I am able to easily tweet out my score here as well.

    Share - Twitter

    That’s it!  With just a few lines of code your game is now the source of a Share Contract allowing players to share our their scores with the world (and making your game a lot more appealing in the process).

    Where to download the code

    The main Codeplex release has been updated with the changes.  You can grab the latest release Win8GameKit-Jan2013 or simply browse the Source Code for the changes.

     

    Win8GameKit-Codeplex

    The GitHub Win8GameKit repository has also been updated if you prefer to follow the project there.

     

    Win8GameKit-Github

Page 1 of 1 (3 items)