This is iPhone 8

iPhone8-Introduction

The hardware that allows the iPhone 8's rumored facial recognition capability could consist of a "revolutionary" new camera system for its front-facing camera.

iPhone8-Camera

iPhone8-OLED

iPhone8-Security

iPhone8-Colors

The report follows related rumors of Apple augmenting or ditching its Touch ID fingerprint scanner in favor of iris or facial recognition technology, fueled by its acquisition of Israeli facial recognition startup RealFace. Samsung's Galaxy Note 7 -- yep, that Galaxy Note 7 -- was among the first phones to come equipped with an iris scanner.

99.6 percent of new smartphones run Android or iOS

google-pixel-phone-shootout

The latest smartphone figures from Gartner are out, and they paint an extremely familiar picture. Between them, Android and iOS accounted for 99.6 percent of all smartphone sales in the fourth quarter of 2016. This duopoly has been the norm for a while now (in the second quarter of 2015 this figure was 96.8 percent), but it’s always impressive — and slightly terrifying — to see how Google and Apple continue to wring the last decimal point drops of market share from global smartphone users.

Of the 432 million smartphones sold in the last quarter, 352 million ran Android (81.7 percent) and 77 million ran iOS (17.9 percent), but what happened to the other players? Well, in the same quarter, Windows Phone managed to round up 0.3 percent of the market, while BlackBerry was reduced to a rounding error. The once-great firm sold just over 200,000 units, amounting to 0.0 percent market share.

Screen_Shot_2017_02_16_at_10.48.25_AM

Happy 15th Birthday .NET!

Happy-Birthday-Microsoft-DotNet

Today marks the 15th anniversary since .NET debuted to the world. On February 13th, 2002, the first version of .NET was released as part of Visual Studio.NET. It seems just like yesterday when Microsoft was building its “Next Generation Windows Services” and unleashed a new level of productivity with Visual Studio.NET.

Since the beginning, the .NET platform has allowed developers to quickly build and deploy robust applications, starting with Windows desktop and web server applications in 2002. You got an entire managed framework for building distributed Windows applications, ASP.NET was introduced as the next generation Active Server Pages for web-based development, and a new language, C# (pronounced “see sharp” :-)) came to be.

Over the years, .NET and it’s ecosystem has grown and expanded to meet the needs of all kinds of developers and platforms. As the technology landscape has changed, so has .NET. You can build anything with .NET including cross-platform web apps, cloud services, mobile device apps, games and so much more. We have a vibrant open-source community where you can participate in the direction of .NET.

Xamarin.Forms (Android): Workaround For Splash Screen With Logo

What is the quickest way to add a splash screen to your Android project in Xamarin?

  1. Create a new folder under the Android project folder "Resources" with the name "Values".
  2. In that folder add a new "Styles.xml" file. Add -> New Item, then XML File. Make sure after creating this file to have the property "Build Action" set to the default value: "AndroidResource". In this file we will create a new theme "Theme.Splash" that set the background of our Splash with our logo.
  3. Edit the file to be as follows:
    <?xml version="1.0" encoding="utf-8" ?>
    <resources>
      <style name="Theme.Splash" parent="android:Theme">
        <item name="android:windowBackground">@drawable/myLogo</item>
        <item name="android:windowNoTitle">true</item>
      </style>
    </resources>
  4. Add a Splash Activity to the Android Project using Add -> New Item, then Activity. Let's name it SplashActivity.
  5. Change the attributes of the activity to set the theme attribute to "@styles/Theme.Splash", MainLauncher attribute to "True", and NoHistory also to "True". The Theme attribute is responsible for the style of the activity, the MainLauncher is responsible for making this activity the first activity to show and NoHistory is responsible for preventing navigation back to this activity. The activity attributes should look like the following:
    [Activity(Theme = "@style/Theme.Splash", 
              MainLauncher = true, 
              NoHistory = true)]
  6. Add the following code to the "OnCreate" method in Splash activity immediately after the comments // Create your application here:
    // Simulate a long loading process on app
    System.Threading.Thread.Sleep(10000);
    StartActivity(typeof(MainActivity));

    The first line simulates a long-loading process.
    The second line Start our MainActivity where our application will run main tasks after the Splash is shown.

  7. Just before running the application, we need to ensure that the MainLancher attribute of the MainActivity is set to false:
    [Activity(Label = "HandyApp.Droid", Icon = "@drawable/icon", 
              MainLauncher = false, 
              ConfigurationChanges = ConfigChanges.ScreenSize | 
                                     ConfigChanges.Orientation)]
  8. And let's run the application.

Do you want to logo in the center of your screen?

  1. In Styles.xml, remove the entire line where the "windowBackground" attribute and value are. Instead insert the following line specifying that the background is of White color:
    <item name="android:colorBackground">@android:color/white</item> 
  2. In the Resources folder, create a new folder "layout". Here we will add our layout for the SplashActivity.
  3. In the layout folder, add a new Android Layout: Add->New Item...->Android Layout. let's call it "SplashLayout.xaml".
  4. Edit the source of SplashLayout to match the following markup:
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:minHeight="25px"
        android:minWidth="25px"
        android:gravity="center"
        android:background="#6d6763">
        <ImageView
            android:src="@drawable/myLogo"
            android:layout_height="fill_parent"
            android:layout_width="wrap_content"
            android:layout_gravity="center"
            android:id="@+id/imageView1" />
    </LinearLayout>
    Here we have an ImageView in the center with source (src) of your logo in the drawable folder.
  5. In SplashActivity.cs, edit the "OnCreate" method to match the following code:
    [Activity(Theme = "@style/Theme.Splash", 
              MainLauncher = true, NoHistory = true)]
    public class SplashActivity : Activity {
        protected override void OnCreate(Bundle savedInstanceState) {
            base.OnCreate(savedInstanceState);
    
            SetContentView(Resource.Layout.SplashLayout);
            System.Threading.ThreadPool
                            .QueueUserWorkItem(o => LoadActivity());
        }
    }
    In this code, we set the content view of the SplashActivity to our SplashLayout.xaml and then we queue the MainActivity in the ThreadPool object using the LoadActivity method that we will write in the next step.
  6. Add a new method to the SplashActivity class called "LoadActivity":
    private void LoadActivity()     {
        // Simulate a long pause
        System.Threading.Thread.Sleep(5000);
        RunOnUiThread(() => StartActivity(typeof(MainActivity)));
    }  
    Note how we shifted the sleep period to this method.
  7. Run the application

Visual Studio 2017 is coming on March 7

VisualStudio2017LaunchEvent

Join us at 8:00 AM PST on March 7 for a two-day online event celebrating the launch of our latest version as well as 20 years of Visual Studio. Watch the live stream featuring Julia Liuson, Brian Harry, Miguel de Icaza, and Scott Hanselman as they share the newest innovations in Visual Studio, .NET, Xamarin, Azure, and more. After the keynote, Microsoft engineers will lead interactive technical demo sessions to help you get the most out of Visual Studio 2017 and the rest of our tools and platform.

On March 8, we’ll help you get productive even faster by hosting a full day of live interactive trainings. Don’t forget to click Save the Date above and sign up for email reminders!

Whether you are new to our tools or have been with us since the beginning, we’d love to hear and share your Visual Studio story. Share a photo of memorabilia or a short video clip of your story with Visual Studio on Instagram or post your story on Twitter and Facebook using #MyVSstory. Check out Julia’s launch event announcement for more details.

C# IL Viewer for Visual Studio Code using Roslyn side project

For the past couple of weeks I've been working on an IL (Intermediate Language) Viewer for Visual Studio Code. As someone that develops on a Mac, I spend a lot of time doing C# in VS Code or JetBrains' Rider editor - however neither of them have the ability to view the IL generated (I know JetBrains are working on this for Rider) so I set out to fix this problem as a side project.

As someone that's never written a Visual Studio Code extension before it was a bit of an abmitious first extension, but enjoyable none the less.

Today I released the first version of the IL Viewer (0.0.1) to the Visual Studio Code Marketplace so it's available to download and try via the link below:

Download IL Viewer for Visual Studio Code

Download C# IL Viewer for Visual Studio Code or install it directly within Visual Studio Code by launching Quick Open (CMD+P for Mac or CTRL+P for Windows) and pasting in the follow command and press enter.

ext install vscodeilviewer

The source code is all up on GitHub so feel free to take a look, but be warned - it's a little messy right now as it was hacked together to get it working.

il_viewer_animated

For more information you can visit this link.

Global Resources problem in Xamarin projects

Today I spent a lot of time to understand why my style doesn’t work.

<Application xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
             x:Class="myProject.App">
    <Application.Resources>
        <ResourceDictionary>
            <Style x:Key="WarmGreyLine" TargetType="BoxView">
                <Setter Property="HeightRequest" Value="1" />
                <Setter Property="HorizontalOptions" Value="Fill" />
                <Setter Property="Color" Value="#EEE9E5" />
                <Setter Property="Margin" Value="0,10,0,10" />
            </Style>
        </ResourceDictionary>
    </Application.Resources>
</Application>

I followed a video about it on Xamarin University. Everything was the same. They say you can copy your style from a ContentPage.Resources and page in the Application.Resources section

    <ContentPage.Resources>
        <ResourceDictionary>
            <Style x:Key="WarmGreyLine" TargetType="BoxView">
                <Setter Property="HeightRequest" Value="1" />
                <Setter Property="HorizontalOptions" Value="Fill" />
                <Setter Property="Color" Value="#EEE9E5" />
                <Setter Property="Margin" Value="0,10,0,10" />
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>

The XAML is correct but if you execute the code you receive an error like:

Inner Exception: Position 38:14. StaticResource not found for key WarmGreyLine Message: Exception has been thrown by the target of an invocation.

The Solution

The is a little thing in the video they forgot to say!

In the App.xaml.cs you have to call InitializeComponent();

namespace myInventories
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
        }
    }
} 

Happy coding!

Microsoft's new adaptive shell will help Windows 10 scale across PC, Mobile, and Xbox

The Windows Shell is essentially the Windows environment we all know and love. In layman's terms, it gives us access to system elements and objects necessary for running applications, and houses features such as the Taskbar, Start Menu, Desktop and more. Currently, the Windows Shell is different depending on the version of Windows 10 you're using. For example, Mobile is using a different Windows Shell than desktop; but Microsoft is working to change and streamline that.

windows-10-logo-intro

Microsoft is building an "adaptive shell" into Windows 10 that'll work across PCs and tablets, phones, HoloLens, and even Xbox. As it currently stands, the Windows Shell isn't a true universal element of Windows, unlike the OneCore subsystem and Universal Windows Apps. PCs and tablets share the same shell thanks to Continuum, but Mobile, HoloLens and Xbox have their own individual shells that are updated and maintained separately.

Over the next few Windows 10 releases however, Microsoft will be bringing each of these device categories under one Windows Shell, making for a true universal Windows 10 experience no matter what device you're using. Internally referred to as "Composable Shell" or "CSHELL", this new Windows Shell will be able to scale in real-time between all types of devices, similarly to how Continuum currently works between desktop mode and tablet mode, only this time it'll scale across Xbox and Mobile as well.

For our more techy readers, the Composable Shell is essentially a shell modularized into sub-components. The system can transition between each component if it is required, making for a much more flexible experience on devices like 2-in-1's or something that has multiple form-factors.

Microsoft’s Channel 9 introduces .Game, a new series focused on game development using .NET

Game-Host-Development-1031x580

Microsoft has introduced a new show to its Channel 9 video platform aimed at teaching and showing off Microsoft’s products and services. The new show is called .Game and aims to teach people how to develop games using .NET.

In this new series, viewers will be able to watch along and discover how game development works and how to do it themselves. The first episode of the show is already available and focuses on the basics with Unity, a popular game engine.

The above video introduces the .Game show. Stacey Haffner explains that the show will provide tips and tricks, as well as access to files on Github to make use of, in addition to resources and other tutorials that people may find helpful when it comes to game development.

Announcing Microsoft ASP.NET WebHooks V1

WebHooks provide a simple pub/sub model for wiring together Web APIs and services with your code. A WebHook can be used to get notified when a file has changed in Dropbox, a code change has been committed to GitHub, a payment has been initiated in PayPal, a card has been created in Trello, and much more — the possibilities are endless! When subscribing, you provide a callback URI where you want to be notified. When an event occurs, an HTTP POST request is sent to your callback URI with information about what happened so that your Web app can act accordingly. WebHooks happen without polling and with no need to hold open a network connection while waiting for notifications.

Receiving WebHooks

Dealing with WebHooks depends on who the sender is. Sometimes there are additional steps registering a WebHook verifying that the subscriber is really listening. Often the security model varies quite a bit. Some WebHooks provide a push-to-pull model where the HTTP POST request only contains a reference to the event information which is then to be retrieved independently.

The purpose of Microsoft ASP.NET WebHooks is to make it both simpler and more consistent to wire up your API without spending a lot of time figuring out how to handle any WebHook variant:

WebHoks-Receiving

A WebHook handler is where you process the incoming WebHook. Here is a sample handler illustrating the basic model. No registration is necessary – it will automatically get picked up and called:

public class MyHandler : WebHookHandler
{
    // The ExecuteAsync method is where to process the WebHook data regardless of receiver
    public override Task ExecuteAsync(string receiver, WebHookHandlerContext context)
    {
        // Get the event type          
        string action = context.Actions.First();
 
        // Extract the WebHook data as JSON or any other type as you wish
        JObject data = context.GetDataOrDefault();
 
        return Task.FromResult(true);
    }
}

Finally, we want to ensure that we only receive HTTP requests from the intended party. Most WebHook providers use a shared secret which is created as part of subscribing for events. The receiver uses this shared secret to validate that the request comes from the intended party. It can be provided by setting an application setting in the Web.config file, or better yet, configured through the Azure portal or even retrieved from Azure Key Vault.

For more information about receiving WebHooks and lots of samples, please see these resources:

More detail on Microsoft Blog.

Advertsing

125X125_06

Planet Xamarin

Planet Xamarin

Calendar

<<  November 2017  >>
MonTueWedThuFriSatSun
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Month List