Tag Archives: android

Using the Xamarin WebView for programmatic display of HTML content

Xamarin Forms is a key framework for C# and .NET developers since it lets you target Android, iOS and to some extent Windows (UWP and therefore Windows 10 only) with maximum code reuse. I have a longstanding interest in embedded web browser controls and was glad to see that Xamarin Forms supports a capable WebView control. The WebView wraps Chrome on Android, Safari on iOS, and Edge on UWP.

I did a quick hands-on. In this example (running in the Android emulator on Hyper-V, of course), the HTML is generated programmatically and the CSS loaded from local storage. I also added some script to show the User Agent string that identifies the browser.

image

There are a few things needed to make this work. Some XAML to put the WebView on a page. Then to load content into the WebView you need an HTMLWebViewSource object. If you are loading external files, you must set the BaseUrl property of this object as well as the HTML itself. The BaseUrl tells the control where to look for files that have a relative address. This varies according to the target platform, so you use the Xamarin Forms Dependency Service to set it correctly for each platform.

In Visual Studio, you place the files you want to load in the appropriate folder for each platform. For Android, this is the Assets folder.

That is about all there is to it. As you can see from the above screenshot, I wrote very little code.

The WebView control can also display PDF documents. Finally, there is an EvaluateJavaScriptAsync method that lets you call JavaScript in a WebView and read the results from C#.

This JavaScript bridge is a workaround for the most obvious missing feature, that you cannot directly read the HTML content from the WebView. If this is a full programmatic solution and you generate all the HTML yourself, you can add JavaScript to do what you want. If the user is allowed to navigate anywhere on the web, you cannot easily grab the HTML; but this could be a good thing, in case the user entered a password or is viewing confidential data. You can grab the destination URL from the Navigating event and read it separately if necessary. But the intent of the control is to let you create rich applications that take advantage of the browser’s ability to render content, not to invade a user’s privacy by tracking their web browsing.

Configuring the Android emulator for Hyper-V

Great news that the Android emulator now supports Hyper-V, but how do you enable it?

Pretty simple. First, you have to be running at least Windows 10 1803 (April 2018 update). Then, go into Control Panel – Programs – Turn Windows Features on and off and enabled both Hyper-V and the Windows Hypervisor Platform:

image

Note: this is not the same as just enabling Hyper-V. The Windows Hypervisor Platform, or WHPX, is an API for Hyper-V. Read about it here.

Reboot if necessary and run the emulator.

image

TroubleshootIng? Try running the emulator from the command line.

emulator -list-avds

will list your AVDs.

emulator @avdname -qemu -enable-whpx

will run the AVD called avdname using WHPX (Windows Hypervisor Platform). If it fails, you may get a helpful error message.

Note: If you get a Qt library not found error, use the full path to the emulator executable. This should be the one in the emulator folder, not the one in the tools folder. The full command is:

[path-to-android-sdk]\emulator\emulator @[avdname] -qemu -enable-whpx

You can also use the emulator from Visual Studio, though you need Visual Studio 2017 version 15.8 Preview 1 or higher with the Xamarin tools installed. That said, I had some success with starting the Hyper-V emulator separately (use the command above), then using it with a Xamarin project in Visual Studio 15.7.5.

image

Hyper-V compatible Android emulator now available

An annoying issue for Android developers on Windows is that the official Android emulator uses Intel’s HAXM hypervisor platform, which is incompatible with Microsoft’s Hyper-V.

The pain of dual-boot just to run the Android emulator is coming to an end. Google has announced that the latest release of the Android Emulator will support Hyper-V on both AMD and Intel PCs. This a relief to Docker users, for example, since Docker now uses Hyper-V by default.

Google Product Manager Jamal Eason has made a rather confusing post, positioning the new feature as mainly for the benefit of developers with AMD processors. Intel HAXM does not work with AMD processors.”Thanks to on-going development by Intel, the fastest emulator performance on Windows is still with Intel HAXM,” says Eason, stating that HAXM remains the default on Intel PCs and is recommended.

However the new Hyper-V support works fine on Intel as well as AMD PCs. The official docs say:

Though we recommend using HAXM on Windows, it is possible to use Windows Hypervisor Platform (WHPX) with the emulator. Situations in which you should use WHPX with the emulator are the following:

  • You need to use Hyper-V at the same time.
  • You are using an AMD CPU.

The new feature is “thanks to a new Microsoft Windows Hypervisor Platform (WHPX) API and recent open-source contributions from Microsoft,” says Eason.

It is another case of Microsoft doing the hard work to make Windows a better platform for developers, even when they are targeting non-Windows platforms (as is increasingly the case).

Honor 10 AI smartphone launched in London, and here are my first impressions

The Honor 10 “AI” has been launched in London, and is on sale now either on contract with Three (exclusively), or unlocked from major retailers. Price is from £31 pay monthly (free handset), or SIM-free at £399.99.

image

Why would you buy an Honor 10? Mainly because it is a high-end phone at a competitive price, especially if photography is important to you. As far as I can tell, Honor (which is a brand of Huawei) offers the best value of any major smartphone brand.

How is the Honor brand differentiated from Huawei? When I first came across the brand, it was focused on a cost-conscious, fashion-conscious youth market, and direct selling rather than a big high street presence. It is a consumer brand whereas Huawei is business and consumer. At the London launch, the consumer focus is still evident, but I got the impression that the company is broadening its reach, and the deal with Three and sale through other major retailers shows that Honor does now want to be on the high street.

image

What follows is a quick first impression. At the launch, Honor made a big deal of the phone’s multi-layer glass body, which gives a 3D radiant effect as you view the rear of the phone. I quite like the design but in this respect it is not really all that different from the glass body of the (excellent) Honor 8, launched in 2016. I also wonder how often it will end up hidden by a case. The Honor 10 AI is supplied with a transparent gel case, and even this spoils the effect somewhat.

The display is great through, bright and high resolution. Reflectivity is a problem, but that is true of most phones. Notable is that by default there is a notch at the top around the front camera, but that you can disable this in settings. I think the notch (on this or any phone) is an ugly feature and was quick to disable it. Unfortunately screenshots do not show the notch so you will have to make do with my snaps from another phone:

With notch:

image

Without notch:

image

The camera specs are outstanding, with dual rear lens 24MP + 16MP, and 24MP front. At the launch at least half the presentation was devoted to the photography, and in particular the “AI” feature. The Honor 10 has an NPU (Neural Processing Unit), which is hardware acceleration for processes involved in image recognition. All smartphone cameras do a ton of work in software to optimize images, but the Honor 10 should be faster and use less power than most rivals thanks to the NPU. The AI works in several ways. If it recognises the photo as one of around 500 “scenarios”, it will optimize for that scenario. At a detail level, image recognition will segment a picture into objects it recognises, such as sky, buildings, people and so on, and optimize accordingly. For example, people get high priority, and especially the person who is the subject of a portrait. It will also segment the image of a person into hair, eyes, mouth and so on, for further optimisation.

What is optimisation? This is the key question. One of the AI effects is bokeh (blurring the background) which can be a nice way to make a portrait. On the other hand, if you take a picture of someone with the Niagara Falls in the background, do you really want it blurred to streaks of grey so that the picture might have been taken anywhere? It is a problem, and sometimes the AI will make your picture worse. I am reserving judgment on this, but will do another post on the subject after more hands-on.

Of course you can disable the AI, and in the Pro camera mode you can capture RAW images, so this is a strong mobile for photography even if you do not like the AI aspect. I have taken a few snaps and been impressed with the clarity and detail.

24MP for the front camera is exceptional so if selfies are your thing this is a good choice.

You have various options for unlocking the device: PIN, password, pattern swipe, fingerprint, proximity of Bluetooth device, or Face Unlock. The fingerprint reader is on the front, which is a negative for me as I prefer a rear fingerprint reader that lets you grab the device with one hand and instantly unlock. But you can do this anyway with Face Unlock, though Honor warns that this is the least secure option as it might work with a similar face (or possibly a picture). I found the Face Unlock effective, even with or without spectacles.

The fingerprint scanner is behind glass which Honor says helps if your finger is wet.

There are a few compromises. A single speaker means sound is OK but not great; it is fine through headphones or an external speaker though. No wireless charging.

Geekbench scores

image

image

PC Mark scores

image

So how much has performance improved since the Honor 8 in 2016? On PCMark, Work 2.0 performance was 5799 on the Honor 8, 7069 on the 10 (+21%). Geekbench 4 CPU scores go from 5556 multi-core on the 8 to 6636 on the 10 (+19.4%).  The GPU though is more substantially improved, 4728 on the 8 and 8585 on 10 (+81.5%). These figures take no account of the new NPU.

First impressions

I must confess to some disappointment that the only use Honor seems to have found for its NPU is photo enhancement, important though this is. It does not worry me much though. I will report back on the camera, but first impressions are good, and this strikes me as a strong contender as a high-end phone at a mid-range price. 128GB storage is generous.

Spec summary

OS: Android 8.1 “Oreo” with  EMUI (“Emotion UI”) 8.1 user interface

Screen: 5.84″ 19:9, 2280p x 1080p, 432 PPI, Removeable notch

Chipset: Kirin 970 8-core, 4x A73 @ 2.36 GHz, 4x A53 @ 1.84 GHz

Integrated GPU: ARM Mali-G72MP12 746 MHz

Integrated NPU (Neural Processing Unit): Hardware acceleration for machine learning/AI

RAM: 4GB

Storage: 128GB ROM.

Dual SIM: Yes (nano SIM)

NFC: Yes

Sensors: Gravity Sensor, Ambient Light Sensor, Proximity Sensor, Gyroscope, Compass, Fingerprint sensor, infrared sensor, Hall sensor, GPS

WiFi: 802.11 a/b/g/n/ac, 2.4GHz/5GHz

Bluetooth: 4.2

Connections: USB 2.0 Type-C, 3.5mm headphone socket

Frequency bands: 4G LTE TDD: B38/B40/B414G LTE FDD: B1/B3/B5/B7/B8/B19/B203G WCDMA: B1/B2/B5/B8/B6/B192G GSM: B2/B3/B5/B8

Size and weight: 149.6 mm x 71.2 mm  x 7.7 mm, 153g

Battery: 3,400 mAh,  50% charge in 25 minutes. No wireless charging.

Fingerprint sensor: Front, under glass

Face unlock: Yes

Rear camera: Rear: 24MP + 16MP Dual Lens Camera,F1.8 Aperture.

Front camera: 24MP

Nokia 8: a phone from the new Nokia brand that you might actually want

This morning I attended Nokia’s press breakfast here in Berlin, where the main product on show is the Nokia 8 smartphone. It is not quite a new launch – there was an event in London a couple of weeks ago – but it was my first look at HMD’s first flagship device.

image

HMD Global Oy was founded in May 2016 as a new company to exploit the Nokia smartphone brand. The company is “owned by Smart Connect LP, a private equity fund managed by Jean-Francois Baril, a former Nokia executive, as well as by HMD management,” according to the press release at the time. Based in Finland, the new company acquired the right to use the Nokia trademark on smartphones as well as “design rights relating to Microsoft’s Feature Phone Business” (what feature phone business, you may ask).

HMD made the decision to market a pure Google form of Android. I find it intriguing that a Nokia-branded smartphone was once powered by Symbian, then became a Windows device, and now has Google deeply embedded. The two companies are now “joined at the hip,” according to an HMD spokesperson this morning. Though it is a rather unequal relationship, with HMD having fewer than 500 employees and relying on outsourcing for much of its business.

A UK release of the Nokia 8, together with operator deals, will be announced on September 6th, I was told. The unsubsidised price might be around £600 (or Euros, the currencies being of nearly equal value in these Brexit days).

So why might you want one? Well, it is a decent phone, based on an 8-core Qualcomm Snapdragon 835 chipset, 2560 x 1440 display, 4GB RAM, 64GB storage, up to 256GB MicroSD, fingerprint reader and so on.

There are a couple of special features. The most obvious is that both front and rear 13MP cameras can be used simultaneously, enabling what Nokia inevitably calls “bothies”.

image

Is this a feature worth having? It is problematic, partly because taking good selfies is difficult without a selfie stick which most of the time you do not have with you, and partly because the view behind you is typically less interesting than the view you are trying to photograph.

I am not sure whether this matters though. It is a distinctive feature, and in a crowded market this is important.

I am more interested in another feature, called OZO audio. OZO is a professional cinema camera made by Nokia and the system in the phone is based on OZO surround sound algorithms. The phone has three microphones, and using OZO you can apparently capture a simulated surround effect even though the output is two-channel.

Although it seems counter-intuitive, I do believe in the possibilities of simulated surround sound; after all, we only have two ears. OZO works in conjunction with the phone’s video camera so you can capture more atmospheric audio. The demo was impressive but this is something I will need to try for myself before forming a judgement.

The other aspect of the Nokia 8 which is attractive is the company’s attitude towards Android modifications and bundled apps. Essentially, you get Android as designed by Google, plus Google apps and not much else. Operators will not be able to bundle additional apps, I was told (though I am not sure I believe it).

While I do not like the way Google constantly gathers data from users of its software, I do think that if you are going to run Android, you might was well run it as designed, rather than with additional and often substandard “enhancements”.

I hope to do a full review and will look carefully at the audio performance then.

Microsoft needs to fix its Android emulator

Microsoft wants Windows 10 to be an ideal developer operating system, with its Linux subsystem, and Visual Studio 2017 is notable for its strong cross-platform development tools.

There is an annoyance though. Google’s Android SDK includes an emulator for debugging mobile applications, but it requires hardware acceleration in the form of Intel’s HAXM (Hardware Accelerated Execution Manager). Otherwise you get an error as below:

image

Unfortunately this is incompatible with Hyper-V, the hypervisor built into Windows. You cannot fix this by stopping Hyper-V services; it is set when Windows boots.

Hyper-V is increasingly important for general Windows developers. It is not only useful for running up VMs on which to test stuff, but also for the official Docker tools and testing Windows containers.

The solution should be to use the Visual Studio Emulator for Android. This is based on Hyper-V so no problem.

Unfortunately it does not currently work very well. On one of my PCs it starts, but without internet connectivity, rendering it useless for many apps. On another PC it does not start at all.

image

I spent a bit of time trying to get it to work. The networking problem seems to be related to conflicts with other applications using Hyper-V. Specifically, the Visual Studio Emulator for Android uses two Hyper-V virtual network adapters, one connected to the Windows Phone Emulator Internal Switch, and the other connected to an external virtual switch. This second adapter gets its network settings using DHCP (there is no way to change this). The emulator app proxies internet connections from the internal to the external network.

The reference to Windows Phone comes about because this is essentially the Windows Phone emulator adapted to run Android.

In my Hyper-V setup I have another internal switch, called DockerNAT, used by the Docker tools, as well as a third internal switch which I’ve used for other things. In the emulator’s network settings I can actually see four Desktop Adapters (in addition to the primary “Emulator adapter”, of which only one has internet connectivity via my business network. I theorised that the emulator is attempting to proxy via the wrong adapter, and disabled the others in Control Panel – Network Connections. However it still does not connect.

Judging by posts like this and this, there may be some cocktail of settings in Hyper-V and in Control Panel that gets this working. Bear in mind though that I want everything else to work too.

I also note that Windows developer evangelist Scott Hanselman suggests setting up a dual boot arrangement so that you can boot with HAXM enabled when you want to develop on Android, and with Hyper-V otherwise – implying that there is no other easy fix.

This works, though it is a dreadful solution. Rebooting is not only time-consuming, but disruptive to the flow of your work, and having to reboot with special settings just to work on Android is painful.

It strikes me that this could be fixed with a bit of effort. If Microsoft is serious about persuading developers to use Windows 10, Visual Studio and Xamarin for cross-platform mobile apps, that would be a good idea.

How to get a Bitlocker recovery key on Android

Scenario: you are out and about with your laptop and phone. Laptop protected with Bitlocker encryption. You start up your laptop and it decides for no obvious reason to demand your Bitlocker key before booting up.

If your laptop is domain-joined, this key is normally stored in Active Directory. If is not domain-joined, it is normally stored in the OneDrive linked with your Microsoft account. These are options when the Bitlocker encryption was applied.

This laptop is not domain-joined and the key is in OneDrive. So I pick up my phone and find the link, which is here.

Android helpfully opened this link in the OneDrive app, but not to the location of the keys, just the home page. No idea how to find the recovery keys in there.

The solution I found was to copy the link and paste it directly into the browser. You might need to get a code sent to your phone if you have 2-factor authentication. I found I needed to check the box for “I log on frequently with this device” before it worked.

Then I could see the key in the Android web browser. Phew.

Sweetlabs Android App Services: what is it?

Margins on smartphones are thin, which is why we regularly hear commentary about how only Apple and Samsung are making any money from them. Vendors therefore look for other ways to monetize their business, though it is never easy, and there are plenty of examples of failed music stores and other premium services. Google can always make money, through Play Store revenue, ads served via Search, and monetizing the data it collects. But what of the smartphone vendors?

One obvious strategy is to pre-install applications, for which the app developer may pay. I say may because without inside knowledge its impossible to tell whether the Facebook app, for example, is pre-installed as a benefit to customers or because Facebook has paid something. Most users would probably install the Facebook app anyway; but fewer would install the Opera web browser, to take another example, so common sense says that if you find Opera pre-installed, it is more likely than Facebook to have paid for the privilege.

On Windows PCs, which also suffer from low margins, the pressure on manufacturers to make money from pre-installed applications has had a dire affect, significantly reducing the appeal of the product. At worst, you can pay good money for a PC, turn it on for the first time, and be greeted by a flurry of dialogs inviting you to install this or subscribe to that, along with warnings that your new purchase is “not protected”. Apple has never allowed this of course, which is one of the attractions of Macs. Another consequence was that Microsoft introduced its own brand of PC, Surface, and opened stores selling “signature” editions of PCs on which most of the foistware is absent.

The situation on Android should never be as bad. The operating system has a modern design, which means that applications are isolated and cannot cause as much damage as on Windows. If an application that you do not want is installed, it is easy to remove.

Even so, pre-installed apps on Android do introduce clutter and confusion, especially when combined with the constant requests for various types of permission which characterise the initial setup experience. I imagine that many users simply agree to everything, since the consequences of denying permission are rarely clear, and most want their new device to “just work.”

Sweetlabs is a company which specialises in monetizing app installs on Windows as well as Android. On Windows it is best known for the Pokki app store. Sweetlabs does not always present its brand overtly to users. Users are not its customers after all; its customers are app developers and smartphone vendors.

I reviewed a smartphone recently, and soon after switching on for the first time, I saw a notification inviting me to “Complete device setup” and to “Allow App Services to push messages to the n…” (I am still not sure what is the cut-off word):

If you tap this notification an app installer opens, presenting a small selection of apps categorised as either “Essentials” or “Entertainment”. You are meant to select the apps you want and then tap Finish to have those apps install, agreeing the terms and conditions as you do. Once you tap Finish, the notification disappears, though I noticed that the Sweetlabs service continues to run in the background:

image

My understanding is that the service continues to run because at some future date more apps may become available. The Sweetlabs site talks about promoting apps through “multiple customer-facing touchpoints, including white-label apps and widgets that integrate into the out-of-box experience and persist through the lifetime of the device.” This can include a Featured Apps widget on the home screen that recommends apps “over the lifetime of the device.”

Is this a good or bad thing? The answer is nuanced. I dislike the way the notification implies that these optional app install are part of device setup; it is not, it is a marketing app. You can get all these apps through the official Play Store and App Services is consuming unnecessary system resources.

On the other hand, if you accept that pre-installing apps is inevitable given the low margins in this business, the Sweetlabs approach has advantages. Instead of simply dumping a bunch of unwanted apps on your device, you can choose which ones you want, if any. Therefore the company promotes itself as a better approach, even presenting itself as a fix for crapware. My review device had pre-installed apps on it as well, though, so it is more a case of putting up with both.

From the perspective of app developers, any service that helps get your app noticed in a beyond-crowded market is a significant benefit. Sweetlabs also offers an app analytics service focused on who is installing your app.

I wrote this post because I did not find much information about App Services when I searched for it after seeing the notification on my review device. If you are wondering whether you need it on your device, the answer is no; it does nothing essential, it is a vehicle for promoting apps, and you can safely disable or remove it. I recommend installing apps from the Play Store instead, where you can see user reviews and other information. It is not really evil though; it may have reduced the price of your smartphone as well as providing app developers another way to get their products noticed.

Honor 8 smartphone first look

I’m just back from Paris and the European launch of the Honor 8 smartphone.

Honor is wholly owned by Huawei though the relationship between the two businesses is a tad opaque. I’ve been told that Honor is run as a separate business focusing on a young internet-oriented market, though there is shared technology (it would be crazy not to). The Honor 8 represents a significant strategy shift in that it is a relatively high-end phone, whereas previous devices have been mid-range or lower.

One of the first things you notice about the Honor 8 though is its similarity to the Huawei P9, launched in Europe in April 2016, is obvious. That is no bad thing, since the P9 is excellent and the Honor 8 cheaper,  but the business strategy is a bit of a puzzle. Honor says its phone is targeting a different market, and it is true that the shiny glass body of the Honor 8, in a pleasing blue shade on my review unit, is jauntier than the grey metallic finish of the P9. The P9 is also a fraction slimmer. Yet the devices are far more alike than different, and I would happily pull out the Honor 8 at a business meeting. The Honor 8 also benefits from a few extra features, like the rear smart key.

The P9 has the benefit of Leica branding and shared technology for its camera. An Honor/Huawei PR person told me that this is a software-only distinction and that if you look at the hardware sensors the two phones are very similar. Should photographers therefore get the P9? Possibly, though for a casual snapper like myself I have not noticed a big advantage. See below for some comparative snaps.

image
The Honor 8 (left) and the Huawei P9 (right).

To get a bit of context, the Honor 8 is being launched at €399 with 4GB RAM and 32 GB storage, or €449 with 4GB RAM and 64GB storage (inc VAT). That should equate to around £345 and £390 in the UK. The P9 was launched at £449 for 3GB RAM and 32GB storage, substantially more, though as ever real-world prices vary, and in practice a P9 today will likely cost only a little more than an Honor 8 if you shop around. The 8-core Kirin processor is the same, and the screen is the same resolution at 1920 x 1080. Both models also feature a dual-lens 12MP rear camera, 8MP front lens, and a rear fingerprint reader.

Out of the box

image

The Honor 8 immediately impressed me as a nicely packaged device. You get headset, charger, USB C cable, SIM removal tool, quick start guide (not much use but does have a diagram showing exactly where to insert dual Nano-SIMs and microSD card) and a couple of stickers for good measure. I am not a fan of the headset which lacks any ear-bud gels so it not secure or comfortable for me, but tastes vary.

The glass body is attractive though shiny and easy to smear. Honor can supply a simple transparent case – more a tray than a case – which will offer a little protection, but most users will want something more.

Switch on and there is the usual Android palaver and confusion over permissions. Here I did notice something I dislike. I got a notification saying I should “complete device setup” and “Allow App Services to push messages”:

image

Rather than tapping Allow, I tapped the notification and found an app installer and an invitation to “Choose the apps that come with your phone”. I tapped to see the EULA (End User License Agreement) and found it was a Sweetlabs app that “facilitates the recommendation, download and installation of third party apps.”

image

This is horrible; it is deceptive in that it is presented as part of system setup and performs no useful function since you can easily install apps from the Google Play store; at least one of the apps offered by Sweetlabs (Twitter) was actually already installed. My opinion of which apps are “Essential” differs from that of Sweetlabs:

image

I did not agree the Terms and Conditions. We have seen this kind of thing before, on Windows, and it is damaging to the user experience. History may repeat with Android.

Other than that, setup was straightforward.

Things to like

Fortunately, there is plenty to like. As on the P9, the fingerprint reader on the back is excellent; in fact, I like this feature so much that I sometimes absent mindedly tap the back of other phones and expect them to unlock for me. On the Honor 8 though, it is even better, since the fingerprint reader is also a “Smart key” which you can configure to open an app or take an action such as starting a voice recording or opening the camera. You can configure up to three shortcuts, for press, double press, press and hold.

image

Another neat feature, also not on the P9, is the Smart Controller. This is a universal infra-red controller app and it seems rather good. I pointed it at a Samsung TV and after trying a few functions it declared a “best match” and seems to work fine.

image 

The camera

The camera is a key selling point for the Honor 8. One lens is RGB, the other monochrome, auto-focus is better with two lenses, and the ISP (Image Signal Processor) takes advantage by recording extra detail. There is also a great feature called Wide Aperture which lets you adjust the focus after the event.

When the camera app is open you can swipe from the left to select a mode. There are 16 modes:

Photo
Pro Photo
Beauty
Video
Pro Video
Beauty Video
Good Food
Panorama
HDR (High Dynamic Range)
Night Shot
Light Painting
Time-lapse
Slow-Mo
Watermark
Audio note
Document Scan

After just one day with the device I have not tried all the modes, but did take a look at Pro Photo which gives you control over the metering mode, ISO sensitivity, shutter speed, exposure compensation, focus mode (automatic or manual), and white balance.

image

These same controls are on the P9 though with a slightly different UI and this causes me to wonder exactly what is the Leica contribution that is on the P9 but not the Honor 8. There are a few extra settings on the P9 if you swipe in from the right, including film mode, RAW mode and a Leica watermark option.

How is the camera in use? I took some snaps and was pleased with the results. I also tried taking a similar picture on the Honor 8 and the P9, and comparing the results:

image
A Paris landmark (P9 left, Honor 8 right)

You can’t tell much from the full view, especially since I’ve resized the images for this post, so here is a detail from the above:

image
Detail view (P9 left, Honor 8 right)

Much difference? Please do not draw conclusions from one snap but these support my impression that the Leica-enhanced P9 takes slightly sharper pictures than the Honor 8, but that a casual user would be happy with either.

Performance

The performance of the Honor 8 seems similar to that of the P9 which I reviewed here. The P9 features a Kirin 955 SoC versus the slightly older Kirin 950 in the Honor 8; the specs are similar. Both have 4 Cortex A72 cores, up to 2.5GHz in the Kirin 255 versus up to 2.3GHz in the Kirin 950. In each case, these are supplemented by 4 Cortex A53 cores at up to 1.8GHz and a quad-core Mali T880 MP4 GPU.

Geekbench 3, for example, reports 1703 single-core score and 6285 multi-core, one figure slightly worse, one slightly better than the P9. A run with PC mark came up with a Work Performance Score of 5799, below the P9 at 6387, with the difference mainly accounted for by a poor “Writing score”; other scores were slightly ahead of the P9, so something may be sub-optimal in the text handling and scrolling.

image

Conclusion

I do like this phone; it looks good, feels responsive, and comes with some distinctive features, including the superb fingerprint reader, dual lens rear camera, smart key and smart controller. It does not seem to me to be a young person’s phone particularly, and I can see some people choosing it over a P9 not only for its lower price but also for a couple of extra features. Photographers may slightly prefer the P9, which also has a fractionally slimmer body and a more elegant, understated appearance. In the general phone market, the Honor 8 is competitively priced and well featured; I expect it to do well.

How to run Android Studio on Windows without disabling Hyper-V

Update: This post is out of date; you may still be able to get it to work but there are stability issues with the emulator. Microsoft has announced a better solution, if you are on the latest Windows 10 April 2018 Update or later, and you can now use the official Android emulator with Hyper-V. See also my more recent post here.

Original post:

If you run Windows and use the Hyper-V hypervisor, which is used by Visual Studio as well as being handy for testing stuff in virtual machines, then you will encounter an annoyance if you go on to install Android Studio, Google’s official IDE for Android.

The problem is that Google’s Android emulator uses Intel’s HAXM (Hardware Accelerated Execution Manager) which uses the same CPU virtualization extensions as Hyper-V. This means it is incompatible. It is not only that you can’t run Hyper-V and HAXM simultaneously; the PC has to be configured at boot to use one or the other.

The solution (if you do not want to disable Hyper-V) is to use Microsoft’s Android emulator, which is a free download here.

image

In order to use this with Android Studio, you need to run the emulator first. Then, in Android Studio, go to Run – Edit Configurations and select Show Device Chooser Dialog under Deployment Target Options.

image

Now run your project, and select the VS Emulator, ignoring the invitation to “Turn off Hyper-V”:

image

Now you can debug your application in the Visual Studio Emulator – which is pretty good.

image