Posts Tagged ‘android’

Finally… my bourbon, whiskey, tequila, mezcal, wine, whatever you want to drink + taste + collect app… Liq… is now available for both mobile platforms. What an adventure!

But first, download today:

If you have feedback, or want new features, report them here: https://liq.feedbear.com/boards/feature-requests-bugs

And now on to the app review trials…

The App Request

Originally, Liq was a website – https://liq.live. It was the easiest place to start, and start figuring out what people want. Plus, any updates I push would be immediately available to everyone. No waiting on app updates, supporting older versions, writing an API and more advanced caching infrastructure… And no app store reviews to get through, which can be troublesome in some cases.

But my users have spoken! “We want an app!” So I got to work a couple months ago and started building. Thankfully, most of the code was reusable. I found out quickly, the mobile app was the way to go. I could guarantee the experience. I could code for phones vs. tablets. And I could make it insanely simple to have such a useful tasting + collection tool anywhere users went.

Once it was done and tested – thanks Club Marzipan! – I was ready to submit. I’ve done this countless times. Every time, you cross your fingers… Let the story begin.

The iOS Story

Usually, Apple App Review is the tough part. Who knows what unknown rule you might break when submitting your first app release. Once you’re past that, the untrusting eyes are mostly off you. But still… you have to get over that first hurdle.

My initial submission was rejected. Apple found a bug I had never tested for, and they rightfully rejected the app. But not only did they reject it for the bug, they rejected it saying it’s nothing better than a website and I should add native features.

Well, that wasn’t fair, but I could see their point. Because of the bug, you couldn’t use the app. So, you wouldn’t see any of the features. I thanked them for reporting the bug, and that I disagreed about the “native” part. When working properly, Liq uses many native features. Native camera. Native photo access. Native sharing. Plus it’s, well, a native compiled app. Basically, every native feature Facebook uses except Location and Video, neither of which I need. Apple wrote back it doesn’t matter, but I ignored that – I told them “you’ll see in my next upload.”

I fixed the bug – again, thanks Apple, that was a good catch! – and re-uploaded. They came back about a day later with a new rejection reason. The bug was resolved, so that issue was removed, as was the “native” issue – phew! – that would have been an unnecessary rewrite. This time they pointed out I had no way to request account deletion. Fair point. I got to work.

I had the accout deletion fixed within a few hours. I tested the heck out of it. It worked great. I resubmitted and hoped for the best.

Two days later is was approved. w00t!

I did have some additional fixes. I let the original version get out there – it was only going to be out for a day – while I fixed some more bugs and tightened things up. Apple Reviews go much faster when you already a published verison of the app. I submitted the update and it was reviewed and approved the same day. Boom, proof.

Now, on to Android…

The Android Story

Usually, Google Play – the Android store – submission is a slam dunk. Google appears to use AI and another automated code-analysis system. I recall it being named something like The Bouncer. I don’t recall the exact name – it’s been a long time and I imagine things have changed. Anyway, given Apple’s issues were largely just Apple requirements, I figured I’d be reviewed within a day. You never know though!

I started to worry when the review had taken more than 2 days. A status of In Review for more than a few hours is uncommon. I was concerned. Alas, the rejection email came in. And it wasn’t what I expected:

First, I don’t know what “all parts of the metadata” means. I think it’s telling me my provided app screenshots and what’s in the app don’t match its description. Specifically, “track your bottles” and “see what you’ve tasted.” Let’s look at their screenshot:

So that’s their “proof” my app is misleading. But what’s this? Their screenshots show exactly what my app description details. Tastings and Collection. It’s all right there.

I’m guessing this is just a case of AI making a mistake judging my app. I don’t blame Google – they probably get a lot of submissions, and have minimal resources to look at them. Remember all those layoffs?

I submitted an appeal. They said it would take 2 days.

I received an email saying it might take longer than 2 days. OK, let’s be patient.

One week later, I finally received a notice that my appeal was accepted. All I had to do – though it wasn’t entirely clear in the email – was resubmit my app. I did that and started to wait.

Two days later, it still was In Review. “Oh, no…” I was thinking to myself… Not this again… Don’t reject me again, AI.

Thankfully, a few days after, my app was finally approved. Wow, unexpected. But I’m happy 😀🎉

Enjoy my app!

A friend with a hearing aid was having issues after upgrading to a new Android phone. He could pair the device with his phone, but couldn’t make or receive phone calls. What the heck – he used the app, and nothing worked like before! I worked on it for about an hour, and finally figured it out… What a terrible experience for him, so I hope this helps others. It boils down to the hearing aid requiring two different Bluetooth connections to make things work. This is very common with headphones, actually.

For those interested in the root of the issue: You have to set up the Bluetooth Classic connection before the Bluetooth Low Energy – a.k.a. BLE – connection. If you set them up in the opposite order, the hearing aids stop advertising Bluetooth Classic and you’re stuck with being frustrated. It’s probably a firmware issue Phonak needs to address. Unfortunately, that requires taking the device to a service center – not an optimal solution for those needing hearing aids.

This article assumes you already have the Phonak app installed on the new phone.

Step 1 – Unpair the Hearing Aids From The Previous Device

Make sure your hearing aids are no longer paired to the old device. In the Phonak app, choose Forget Device. I’m not sure of the actual verbiage, as I’m writing this without having the app handy. Then, under Bluetooth Settings in Android, tap the widget wheel next to all the Phonak entries, and choose Forget Device or Unpair Device.

Step 2 – Factory Reset the Hearing Aids

Make sure the hearing aids are off. You can do this by holding the power button on each bud until the light turns red and letting go. Once they’re off, count 5 seconds. Now, on each bud, hold the power button until the orange light turns on and then off – don’t let go until it turns OFF. Then, power down the ear bud again.

Step 3 – Power On the Hearing Aids

Now that they’re reset, power them on again. You can do this by holding the power button until the green light flashes, then letting go.

Step 4 – Pair Bluetooth Classic

Do *not* launch the app first. Go to Bluetooth settings on your phone, then Scan for devices, and choose the Phonak device that has a headphone icon next to it. You’ll see a couple icon types – but you need the one entry that has the headphone icon. This indicates the “Bluetooth Classic” connection, if you’re interested in such technical details. Accept the pairing request prompts that will show up after you tap to pair. If prompted to make/receive phone calls with the device, confirm you want to do so.

Step 5 – Pair Bluetooth LE

Now that you’ve paired Bluetooth Classic, launch the Phonak app and run through its setup process.

Step 6 – Done!

You should be good to go. I hope this helps those of you frustrated by such a crazy experience.

So I recently ran into an issue where Microsoft AppCenter wouldn’t build my Android APK… It would find the source, build successfully, then fail to find the resulting APK.

If you’re running into this issue, try the following:

This is based on @johnclarete’s idea, which I had to modify due to it relying on Flutter’s config.

  1. Modify the build.gradle file in your Application folder as follows:

Find the android { part of the file and paste in the buildTypes part:

android {
    compileSdkVersion 30

    buildTypes {
        appcenter {
            applicationVariants.all { variant ->
                variant.outputs.all {
                    def currentFile = new File(outputFileName)
                    def filename = currentFile.getName()
                    outputFileName = "../../../../../Application/Application/build/outputs/apk/${filename}"
                }
            }
        }
    }
  1. In AppCenter, you should now have an “appcenter” Build Variant option.
image
  1. Disable Build Android App Bundle.

That worked for me. I hope this helps others.

A friend reached out today and asked “Hey, I need my splash screen to be themed based on whether Dark Mode is selected on the Android device.” I had never done that before, so I was curious how it should be done.

Dark Mode is new to Android 10, a.k.a. Android Q. Not as tasty, but hey, gotta ship something. It has a range of benefits, such as lower energy consumption, looking cool, and frustrating developers without budget for theme-aware apps.

It turns out, after some sleuthing, it’s relatively straightforward.

First, this article assumes you’re following the “splash screen as a theme” approach, which you can learn more about here. The example is for Xamarin.Forms, but the same approach applies to regular Android development.

Basically, you have a “splashscreen” style, and you set it as your app’s theme in the Android manifest. Then, you “swap” to the real theme in MainActivity. For example, what I use in an app, located in resources/values/styles.xml:

  <!-- Splash screen style -->   <style name="splashscreen" parent="Theme.AppCompat.DayNight">     <item name="android:windowBackground">@drawable/splash</item>     <item name="android:windowNoTitle">true</item>     <item name="android:windowIsTranslucent">false</item>     <item name="android:windowIsFloating">false</item>     <item name="android:backgroundDimEnabled">true</item>   </style>

Note my drawable. I want a different drawable for my dark vs. light (normal) theme. Here’s what is different:

  • The parent is now Theme.AppCompat.DayNight
  • I’ve added a different set of drawable folders for the Dark theme images. These are the same folder names, with -night appended to the end:

different drawable-night folders

In this example, I haven’t yet added the other folder variations, but you get the point.

The theme swap code in MainActivity is as follows:

protected override void OnCreate(Bundle savedInstanceState)
{     TabLayoutResource = Resource.Layout.Tabbar;     ToolbarResource = Resource.Layout.Toolbar;     // Swap back to the normal app theme. We used Splash so we didn't have to create a special activity.      // Cute hack, and better approach.     // Idea from URL: https://xamarinhelp.com/creating-splash-screen-xamarin-forms/     Window.RequestFeature(WindowFeatures.ActionBar);     SetTheme(Resource.Style.MainTheme);

That’s all there is to it. If Dark mode is enabled, the splash.png from the -night folder will be used, otherwise the normal image will takes its rightful place.

If you have any questions, please hit me up in the comments.

Special thanks to this StackOverflow article for the –night hint.

More info on Android Dark Theme can be found here.

I recently started in the Fishers Youth Mentoring Initiative, and my mentee is a young man in junior high who really likes lizards. He showed me photos of them on his iPad, photos of his pet lizard, and informed me of many lizard facts. He’s also a talented sketch artist – showcasing many drawings of Pokemon, lizards and more. Oh, yeah, he’s also into computers and loves his iPad.

Part of the mentoring program is to help with school, being there as they adjust to growing up, and both respecting and encouraging their interests.

It just so happens that he had a science project coming up. He wasn’t sure what to write about. His pet lizard recently had an attitude shift, and he figured it was because it wasn’t getting as much food week over week. Changing that, he realized its attitude changed. So, he wanted to cover that somehow.

Seeing his interest in lizards, drawing, and computers I asked if we could combine them. I suggested we build an app, a “Reptile Tracker,” that would help us track reptiles, teach others about them, and show them drawings he did. He loved the idea.

Planning

We only get to meet for 30 minutes each week. So, I gave him some homework. Next time we meet, “show me what the app would look like.” He gleefully agreed.

One week later, he proudly showed me his vision for the app:

Reptile Tracker

I said “Very cool.” I’m now convinced “he’s in” on the project, and taking it seriously.

I was also surprised to learn that my expectations of “show me what it would look like” were different from what I received from someone both much younger than I and with a different world view. To him, software may simply be visualized as an icon. In my world, it’s mockups and napkin sketches. It definitely made me think about others’ perceptions!

True to software engineer and sort-of project manager form, I explained our next step was to figure out what the app would do. So, here’s our plan:

  1. Identify if there are reptiles in the photo.
  2. Tell them if it’s safe to pick it up, if it’s venomous, and so forth.
  3. Get one point for every reptile found. We’ll only support Lizards, Snakes, and Turtles in the first version.

Alright, time for the next assignment. My homework was to figure out how to do it. His homework was to draw up the Lizard, Snake, and Turtle that will be shown in the app.

Challenge accepted!

I quickly determined a couple key design and development points:

  • The icon he drew is great, but looks like a drawing on the screen. I think I’ll need to ask him to draw them on my Surface Book, so they have the right look. Looks like an opportunity for him to try Fresh Paint on my Surface Book.
  • Azure Cognitive Services, specifically their Computer Vision solution (API), will work for this task. I found a great article on the Xamarin blog by Mike James. I had to update it a bit for this article, as the calls and packages are a bit different two years later, but it definitely pointed me in the right direction.

Writing the Code

The weekend came, and I finally had time. I had been thinking about the app the remainder of the week. I woke up early Saturday and drew up a sketch of the tracking page, then went back to sleep. Later, when it was time to start the day, I headed over to Starbucks…

20181105_083756

I broke out my shiny new MacBook Pro and spun up Visual Studio Mac. Xamarin Forms was the perfect candidate for this project – cross platform, baby! I started a new Tabbed Page project, brought over some code for taking photos with the Xam.Plugin.Media plugin and resizing them, and the beta Xamarin.Essentials plugin for eventual geolocation and settings support. Hey, it’s only the first week Smile

Side Note: Normally I would use my Surface Book. This was a chance for me to seriously play with MFractor for the first time. Yay, even more learning this weekend!

Now that I had the basics in there, I created the interface for the Image Recognition Service. I wanted to be able to swap it out later if Azure didn’t cut it, so Dependency Service to the rescue! Here’s the interface:

using System.IO;
using System.Threading.Tasks;
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models;
 
namespace ReptileTracker.Services
{
     public interface IImageRecognitionService
     {
         string ApiKey { get; set; }
         Task<ImageAnalysis> AnalyzeImage(Stream imageStream);
     }
}

Now it was time to check out Mike’s article. It made sense, and was close to what I wanted. However, the packages he referenced were for Microsoft’s Project Oxford. In 2018, those capabilities have been rolled into Azure as Azure Cognitive Services. Once I found the updated NuGet package – Microsoft.Azure.CognitiveServices.Vision.ComputerVision – and made some code tweaks, I ended up with working code.

A few developer notes for those playing with Azure Cognitive Services:

  • Hold on to that API key, you’ll need it
  • Pay close attention to the Endpoint on the Overview page – you must provide it, otherwise you’ll get a 403 Forbidden

image

And here’s the implementation. Note the implementation must have a parameter-less constructor, otherwise Dependency Service won’t resolve it.

using Microsoft.Azure.CognitiveServices.Vision.ComputerVision;
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using ReptileTracker.Services;
using Xamarin.Forms;
 
[assembly: Dependency(typeof(ImageRecognitionService))]
namespace ReptileTracker.Services
{
    public class ImageRecognitionService : IImageRecognitionService
    {
        /// <summary>
        /// The Azure Cognitive Services Computer Vision API key.
        /// </summary>
        public string ApiKey { get; set; }
 
        /// <summary>
        /// Parameterless constructor so Dependency Service can create an instance.
        /// </summary>
        public ImageRecognitionService()
        {
 
        }
 
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReptileTracker.Services.ImageRecognitionService"/> class.
        /// </summary>
        /// <param name="apiKey">API key.</param>
        public ImageRecognitionService(string apiKey)
        {
 
            ApiKey = apiKey;
        }
 
        /// <summary>
        /// Analyzes the image.
        /// </summary>
        /// <returns>The image.</returns>
        /// <param name="imageStream">Image stream.</param>
        public async Task<ImageAnalysis> AnalyzeImage(Stream imageStream)
        {
            const string funcName = nameof(AnalyzeImage);
 
            if (string.IsNullOrWhiteSpace(ApiKey))
            {
                throw new ArgumentException("API Key must be provided.");
            }
 
            var features = new List<VisualFeatureTypes> {
                VisualFeatureTypes.Categories,
                VisualFeatureTypes.Description,
                VisualFeatureTypes.Faces,
                VisualFeatureTypes.ImageType,
                VisualFeatureTypes.Tags
            };
 
            var credentials = new ApiKeyServiceClientCredentials(ApiKey);
            var handler = new System.Net.Http.DelegatingHandler[] { };
            using (var visionClient = new ComputerVisionClient(credentials, handler))
            {
                try
                {
                    imageStream.Position = 0;
                    visionClient.Endpoint = "https://eastus.api.cognitive.microsoft.com/";
                    var result = await visionClient.AnalyzeImageInStreamAsync(imageStream, features);
                    return result;
                }
                catch (Exception ex)
                {
                    Debug.WriteLine($"{funcName}: {ex.GetBaseException().Message}");
                    return null;
                }
            }
        }
 
    }
}

And here’s how I referenced it from my content page:

pleaseWait.IsVisible = true;
pleaseWait.IsRunning = true;
var imageRecognizer = DependencyService.Get<IImageRecognitionService>();
imageRecognizer.ApiKey = AppSettings.ApiKey_Azure_ImageRecognitionService;
var details = await imageRecognizer.AnalyzeImage(new MemoryStream(ReptilePhotoBytes));
pleaseWait.IsRunning = false;
pleaseWait.IsVisible = false;

var tagsReturned = details?.Tags != null 
                   && details?.Description?.Captions != null 
                   && details.Tags.Any() 
                   && details.Description.Captions.Any();

lblTags.IsVisible = true; 
lblDescription.IsVisible = true; 

// Determine if reptiles were found. 
var reptilesToDetect = AppResources.DetectionTags.Split(','); 
var reptilesFound = details.Tags.Any(t => reptilesToDetect.Contains(t.Name.ToLower()));  

// Show animations and graphics to make things look cool, even though we already have plenty of info. 
await RotateImageAndShowSuccess(reptilesFound, "lizard", details, imgLizard);
await RotateImageAndShowSuccess(reptilesFound, "turtle", details, imgTurtle);
await RotateImageAndShowSuccess(reptilesFound, "snake", details, imgSnake);
await RotateImageAndShowSuccess(reptilesFound, "question", details, imgQuestion);

That worked like a champ, with a few gotchas:

  • I would receive a 400 Bad Request if I sent an image that was too large. 1024 x 768 worked, but 2000 x 2000 didn’t. The documentation says the image must be less than 4MB, and at least 50×50.
  • That API endpoint must be initialized. Examples don’t always make this clear. There’s no constructor that takes an endpoint address, so it’s easy to miss.
  • It can take a moment for recognition to occur. Make sure you’re using async/await so you don’t block the UI Thread!

Prettying It Up

Before I get into the results, I wanted to point out I spent significant time prettying things up. I added animations, different font sizes, better icons from The Noun Project, and more. While the image recognizer only took about an hour, the UX took a lot more. Funny how that works.

Mixed Results

So I was getting results. I added a few labels to my view to see what was coming back. Some of them were funny, others were accurate. The tags were expected, but the captions were fascinating. The captions describe the scene as the Computer Vision API sees it. I spent most of the day taking photos and seeing what was returned. Some examples:

  • My barista, Matt, was “a smiling woman working in a store”
  • My mom was “a smiling man” – she was not amused

Most of the time, as long as the subjects were clear, the scene recognition was correct:

Screenshot_20181105-080807

Or close to correct, in this shot with a turtle at Petsmart:

tmp_1541385064684

Sometimes, though, nothing useful would be returned:

Screenshot_20181105-080727

I would have thought it would have found “White Castle”. I wonder if it won’t show brand names for some reason? They do have an OCR endpoint, so maybe that would be useful in another use case.

Sometimes, even though I thought an image would “obviously” be recognized, it wasn’t:

Screenshot_20181105-081207

I’ll need to read more about how to improve accuracy, if and whether that’s even an option.

Good thing I implemented it with an interface! I could try Google’s computer vision services next.

Next Steps

We’re not done with the app yet – this week, we will discuss how to handle the scoring. I’ll post updates as we work on it. Here’s a link to the iOS beta.

Some things I’d like to try:

  • Highlight the tags in the image, by drawing over the image. I’d make this a toggle.
  • Clean up the UI to toggle “developer details”. It’s cool to show those now, but it doesn’t necessarily help the target user. I’ll ask my mentee what he thinks.

Please let me know if you have any questions by leaving a comment!

Want to learn more about Xamarin? I suggest Microsoft’s totally awesome Xamarin University. All the classes you need to get started are free.

Update 2018-11-06:

  • The tags are in two different locations – Tags and Description.Tags. Two different sets of tags are in there, so I’m now combining those lists and getting better results.
  • I found I could get color details. I’ve updated the accent color surrounding the photo. Just a nice design touch.

I ran into this issue today when debugging on Android, so posting what took an hour to figure out 🙂 This is for when you’re getting a null reference exception when attempting to scan. I was following the instructions here, and then, well, it wouldn’t work 🙂

Rather than using the Dependency Resolver, you’ll need to pass in the Application Context from Android. So, in the App, create a static reference to the IQrCodeScanner,, as follows:

	public partial class App : Application
	{
 
	    public static IQrCodeScanningService QrCodeScanningService;

Then, populate that static instance from the Android app, as follows:

App.QrCodeScanningService = new QrCodeScanningService(this);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());

Obviously you’ll also need a matching constructor, like so:

public class QrCodeScanningService : IQrCodeScanningService
{
    private readonly Context _context;
 
    public QrCodeScanningService(Context context)
    {
        _context = context;
    }

This solved the problem like magic for me. I hope it helps you, too!

P.S. Make sure you have the CAMERA permission. I’ve also read you may also need the FLASHLIGHT permission, although I’m not entirely sure that’s required.

As part of my .NET 301 Advanced class at the fantastic Eleven Fifty Academy, I teach Xamarin development. It’s sometimes tough, as every student has a different machine. Some have PCs, others have Macs running Parallels or Bootcamp. Some – many – have Intel processors, while others have AMD. I try to recommend students come to the class with Intel processors, due to the accelerated Android emulator benefit Intel’s HAXM – Hardware Acceleration Manager – provides. This blog entry is a running list of how I’ve solved getting the emulator running on so many machines. I hope the list helps you, too.

This list will be updated from time to time, as I find new bypasses. At this time, the list is targeted primarily for machines with an Intel processor. Those with AMD and Windows are likely stuck with the ARM emulators. Umm, sorry. I welcome solutions, there, too, please!

Last updated: December 4, 2017

Make sure you’re building from a path that’s ultimate length is less than 248 characters.

That odd Windows problem of long file paths bites us again here. Many new developers tend to build under c:\users\username\documents\Visual Studio 2017\projectname. Add to that the name of the project, and all its subfolders, and the eventual DLLs and executable are out of reach of various processes.

I suggest in this case you have a folder such as c:\dev\ and build your projects under there. That’s solved many launch and compile issues.

Use the x86 emulators.

If you have an Intel processor, then use the x86 and x64 based emulators instead of ARM. They’re considerably faster, as long as you have a) an Intel processor with virtualization abilities, which I believe all or most modern Intel processors do, and b) Intel’s HAXM installed.

Make sure VTI-X / Hardware Virtualization is enabled.

Intel’s HAXM – which you can download here – won’t run if the processor’s virtualization is disabled. You need to tackle this in the BIOS. That varies per machine. Many devices seem to chip with the feature disabled. Enabling it will enable HAXM to work.

Uninstall the Mobile Development with .NET Workload using the Visual Studio Installer, and reinstall.

Yes, I’m suggesting Uninstall + Reinstall. This has worked well in the class. Go to Start, then Visual Studio Installer, and uncheck the box. Restart afterwards. Then reinstall, and restart.

Mobile Development Workload Screenshot

Use the Xamarin Android SDK Manager.

The Xamarin team has built a much better Android SDK Manager than Google’s. It’s easy to install HAXM, update Build Tools and Platforms, and so forth. Use it instead and dealing with tool version conflicts may be a thing of the past.

Make sure you’re using the latest version of Visual Studio.

Bugs are fixed all the time, especially with Xamarin. Make sure you’re running the latest bits and your problems may be solved.

Experiment with Hyper-V Enabled and Disabled.

I’ve generally had issues with virtualization when Hyper-V is enabled. If you’re having trouble with it enabled, try with it disabled.

To enable/disable Hyper-V, go to Start, then type Windows Features. Choose Turn Windows Features On or Off. When the selection list comes up, toggle the Hyper-V feature accordingly.

Note: You may need to disable Windows Device Guard before you can disable Hyper-V. Thanks to Matt Soucoup for this tip.

Use a real device.

As a mobile developer, you should never trust the emulators to reflect the real thing. If you can’t get the emulators to work, and even if you can, you have the option of picking up an Android phone or tablet for cheap. Get one and test with it. If you’re not clear on how to set up Developer Mode on Android devices, it’s pretty simple. Check out Google’s article on the subject.

Try Xamarin’s HAXM and emulator troubleshooting guide.

The Xamarin folks have a guide, too.

If all else fails, use the ARM processors.

This is your last resort. If you don’t have an Intel processor, or a real device available, use the ARM processors. They’re insanely slow. I’ve heard there’s an x86 emulator from AMD, yet it’s supposedly only available for Linux. Not sure why that decision was made, but moving on… 🙂

Have another solution?

Have a suggestion, solution, or feature I’ve left out? Let me know and I’ll update!

 

Want to learn all about Xamarin and how you can use it, while not spending most of your time watching code scroll by in a video? I figured there was room for an explainer without being a close-captioner for a code tutorial. Enjoy my latest video!

https://www.youtube.com/edit?video_id=AhvofyQCrhw

From the description, along with links:

Have you been considering Xamarin for your cross-platform mobile app? This presentation will help.

In this non-code-heavy presentation, we’ll discuss:

* What is Xamarin
* Development Environment Gotchas
* Creating a Sample To Do List App without writing any code
* Reviewing a real Xamarin app that’s “in the wild”
* Review native, platform-specific integrations
* Discuss gotchas when using Xamarin, and mobile apps in general
* Answer audience questions

Why not code-heavy? Because there are many examples you can follow online. This presentation will provide valuable information you can consider while reviewing the myriad of tutorials available to you with a simple Bing or Google search, or visiting Pluralsight, Microsoft Virtual Academy, or Xamarin University.

If you have any feedback, please leave in the comments, or ask me on Twitter: @Auri

Here are the links relevant for this presentation:

Slides: https://1drv.ms/p/s!AmKBMqPeeM_1-Zd7Y…

Indy.Code Slides with Cost and Performance Figures: https://1drv.ms/p/s!AmKBMqPeeM_1-JZR4…
(you can find the Indy.Code() presentation on my YouTube channel)

Google Xamarin vs. Native iOS with Swift/Objective C vs. Android with Java Performance Article: https://medium.com/@harrycheung/mobil…

Example code for push notifications, OAuth Twitter/Facebook/Google authentication, and more: https://github.com/codemillmatt/confe…

Link to Microsoft Dev Essentials for $30/month free Azure credit and free Xamarin training: https://aka.ms/devessentials

Microsoft Virtual Academy Multi-Threading Series: https://mva.microsoft.com/en-us/train…

 

I’m continuing my resolution to record as many of my programming and technical presentations as possible. I recently spoke at the inaugural Indy.Code() conference. It was excellent, with an incredible speaker line-up. I hope they, too, post some of their presentations online!

Watch the Video on YouTube

From the synopsis:

Should you write your app “native” or use a “cross-platform” solution like React Native, Xamarin, or NativeScript? The new wave of native-cross-compiling solutions provide significant cost savings, code reuse opportunities, and lower technical debt. Does wholly native, per platform development, still play a role in future mobile development? Let’s discuss together.

In this presentation, we’ll discuss:

  • The growth of native, hybrid, and cross-platform mobile development solutions
  • Cost analysis of multiple native and cross-platform apps
  • Considerations for each native and cross-platform solution
  • Lessons learned

Slides are available here: https://t.co/5iLhEoEfen

If you have any questions, I’m happy to answer them! Please email me or ask on Twitter.

 

Alright, I found a Moto 360 and I’m enjoying it. The following is not my review. It is a list of bugs Motorola and Google need to fix on this device and across Android Wear. Note this is only what I’ve noticed after one day. I’ll post more as I explore.

  • When you take the phone out of the box, it doesn’t turn on or has a low battery. That’s understandable. What’s not alright is no prompt about the battery level or what to do. It’s simply “Connect your device to Android Wear,” or something to that effect. That’s very un-user-friendly. Where were the UX guys with the setup process?
  • Only one watch face shows the date. $250 and no date? Seriously?
    • Update, thanks to Rich DeMuro: Drag down slightly to see the date.
  • When asking the watch to make a call to a contact with more than one number, it asks "Which One?" However, it doesn’t give you a list. Saying "the first one" works, but I don’t know what I selected until it dials.
  • There’s no confirmation request when sending a text… it just sends it.
  • It sometimes stops listening or lists your options when listening.
  • It sometimes starts listening when it shouldn’t.
  • Carrier messaging apps break the ability to reply to texts. I had to disable Verizon Messaging entirely.
  • Facebook support for displaying the new comments would be nice, like the email display feature.
  • There’s no battery level meter anywhere on the device, or at least that’s obvious.
    • Update, thanks to Rich DeMuro: Drag down slightly from the top to see battery level.
  • The Android Wear app doesn’t show battery level, but Moto Connect does. Weird?
  • Sometimes Google search results take precedence over actions. For example, saying "play ebay by weird al" brings up YouTube results. However, "play technologic by daft punk" plays the song. It’s hit or miss.
  • So far, adding a calendar entry hasn’t worked.
  • There needs to be a notification center to control which notifications are sent to the phone. Yes, you can do it via the App Manager, but it’s horrible.
  • The accelerometer doesn’t always sense the wrist has been moved to a viewing angle.
  • When driving, the accelerometer appears to trigger the display to turn on *a lot*. It’s not good when driving kills your battery.
  • A speaker would be helpful for prompts.

Added 9/15 afternoon:

  • The Motorola Feedback website doesn’t list the Moto360 as a product. So, how do I register it or get support?
  • The device occasionally says its Offline when the phone is only three feet away. I’m thinking this is a bug in the Google Now integration and not an actual communications issue.
  • Asking the device "What is the battery level" always causes the phone to report it’s offline

Added 9/17:

  • Saying “Call <insert name here> on cell” doesn’t work most of the time, but saying the same “on mobile” is generally reliable.
  • Calling “Send text to <insert name here>” sometimes asks “Which one?” but only shows the phone numbers. I wasn’t sure if I was sending to the right person because the name wasn’t listed.
  • Most of the time, when the screen turns on when moving even the slightest, the watch starts listening, even if I don’t say “Ok, Google”. It’s very annoying.
  • It would be nice if “Ok, Google” could be changed to something else. I feel like I’m advertising Google every time I use my watch.
  • The pedometer seems inaccurate, rendering phantom steps as far as I can tell. The inaccuracy extends to the heart rate monitor. After a long workout, the monitor said I was at 74 bpm, then 90. I took my own pulse, and it was quite off the mark.

Added 9/30:

  • The latest build, 4.4W.1 KGW42R, has greatly improved battery life. On an average day of use, unplugging the watch at around 7am, I was still at 20% at roughly 9:45pm. Great job, Motorola!
  • Even with Messaging as the default app, I have no option to Reply to texts when the notification appears. This may be due to HTC overriding some default app, but I’m unsure.

A few tips:

To launch apps, go to the Google screen, then go to Start… and you can select an app.

You can say the following things and it’s really cool:

  • Call <person’s name> on mobile
  • Play the song <song name>
  • Play the song <song name> by <artist name>
  • What is the current stock price of <company name>