Tag Archives: android

Android: a lack of software to take advantage of high-end mobiles?

I’ve got an pre-release version of Oppo’s Find X2 smartphone for review. It’s a great device and with an outstanding camera. I reviewed it for The Register here.

image

In preparing the review I asked a few people what they would like in a high-end android mobile. Things like an excellent display, fast performance, strong camera and plenty of storage all get mentioned, but then I see people spending most of their time on social media and wonder if even mid-range mobiles are perfectly good enough for the average user. 5G has huge potential (and the Find X2 is a 5G device), but coverage is limited, you will pay the operator quite a bit more, and arguably it needs to reach a tipping point where enough people have it that we can design new applications to take advantage; until then, it’s nice to have faster internet but not game-changing.

Notably missing from our Find X2 press briefing was any demonstration along the lines of “you should see the amazing performance on application x”, where application x is something familiar rather than a benchmark. Gaming is one area where faster hardware does make a difference, having said which, Android and iOS still tend to be the home for casual games and a mobile platform can never compete with the monster GPUs you can plug into a desktop or even a gaming laptop. Unless you stream the games, and shift the need for intensive compute power into the cloud.

Local storage? Handy for a video library to play on a train or flight, or for audiophiles to store huge files full of arguably inaudible data, but for most of us cloud storage makes a local storage less important once it is enough. What is enough? Probably less than the 512GB on the Find X2. It is nice to have, say for capturing 4K video without anxiety, but a lot of people simply do not need to think about how much storage they have once it is beyond 128GB or so.

Photography remains a key feature and one where local compute power does make a big difference – since mobile cameras are as much about digital processing as about optics. I would argue though that one of the reasons vendors have got carried away with multiple lenses and amazing capabilities in mobile cameras is that it remains an area where useful improvements are attainable – perhaps beyond the importance of these improvements to most users. As with gaming, there is a problem in that actual cameras will always be preferable to the camera in a smartphone, for the best results, though the great thing about smartphones is that they are always in your pocket.

The question then: could there be another wave of software that will make the hardware on a modern high-end smartphone more desirable?

Another way of putting is is that it is software, not hardware, that will radically improve smartphones, which explains the lack of excitement around today’s big releases.

Location Services: GPS-only no longer protects your privacy on Android 9 “Pie”, Huawei / Honor 10

I have an Honor 10 AI phone (among others) and this recently upgraded itself to Android 9 “Pie”. It is always good to be on the latest Android; but I noticed a change in something I care about (though acknowledging that for most people it is not top of mind).

Specifically, I am averse to sharing my location more than is necessary, especially with large organizations that want to track me for advertising and marketing purposes (hello Google!). Therefore I normally set Android Location Services to GPS-only. This means you do not have to agree to send your location data to Google in the dialog that appears when you turn on what Google calls “High Accuracy” location services. Here is what the setting looks like in Android 7:

image

I have found that Google Maps works badly on GPS-only, but other mapping apps like HERE WeGo work fine.

However, following the upgrade to Android 9 on the Honor 10 AI, my use of HERE WeGo was blocked.

image

This is coercive, in that mapping is a core function of a smartphone. And it is unnecessary, since I know for sure that this app works fine without the Wi-Fi scanning and Google data collection referenced in the dialog.

I agreed the setting but noticed another curious thing. When you switch on location services, you also make a new agreement with Huawei:

image

This is confusing. Is location services provided by Google, or Huawei?

Note also that I have little confidence in the promise that no “personal information” will be collected. The intention may be there, but history suggests that it is often pretty easy to identify the person from so-called non-personal information. It is better not to send the data at all if you care about privacy.

Huawei’s only suggestion if you do not agree is not to use location services. Or throw your device in the bin.

Having agreed all this data collection, note that you can still turn off wi-fi scanning and Bluetooth scanning in the advanced settings of Google location services. Is this respected though by Huawei? It is hard to tell.

Finally, note that Google now strongly encourages developers to use the Google Play location API rather than the Android location API.

image

This all seems like bad news if, like me, you want to minimize the location data that you share.

Fixing OneDrive Camera upload on Android

A feature of Microsoft’s OneDrive cloud storage is that you can set it to upload photos from your smartphone automatically. It is a handy feature, in part as a backup in case the you lose your mobile, and in part because it lets you easily get to them on your PC or Mac, for editing, printing or sharing.

This feature used to work reliably on Windows Phone but I have not found it so good on Android. Photos never seem to upload in the background, but only when you open the OneDrive app and tap Photos. Even then, it seems to stop uploading from time to time, as if everything is up to date when it is not.

The fix that I have found is to open OneDrive settings by tapping the Me icon (not a particularly intuitive place to find settings, but never mind).

image

Then I turn Camera upload off. Go back to Photos. Go back to settings and turn Camera upload on again. It always kicks it back into life.

image

It is worth noting of course that Google Photos also has this feature and it is likely to be enabled, unless you specifically took care not to enable it. And  cloud storage of photos on Google is free if you choose “High quality” for upload size. If you choose “Original” for upload size, you get 15GB free photo storage.

This being the case, why bother with OneDrive camera upload? A few reasons I can think of:

1. The Windows 10 Photos app integrates with OneDrive, showing previews of your images without downloading them and letting you download on demand.

2. You might have more space on OneDrive, especially if you use OneDrive for Business, which is now in beta

3. In a business context, automatic upload to OneDrive for Business has great potential. Think surveyors, engineers, medicine, anyone who does site visits for work

4. For consumers, it probably does not make sense to spread your stuff across both a Microsoft account and a Google account. If you have picked Microsoft, maybe because you use Windows or because you would rather trust Microsoft than Google with your personal data, then you would want your photos to be in OneDrive rather than Google Photos.

It is therefore unfortunate that in my experience it does now work right. I am not sure if this is just a bug in the app, or something to do with Android. In the end though, it is just another niggly thing that pushes Android users away from Microsoft and towards Google services.

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.