Monday, April 1, 2019

https://ift.tt/2d4kg1q

Vodafone made the U.K.’s first mobile phone call in the 1980s and sent the world’s first text on Christmas Eve in 1992. The company switched on its 4G network in August 2013.

For the first few decades, Vodafone was the largest network in the U.K., but recently, the company has seen its subscriber base affected by increased competition from its main rivals — EE and O2 — which have pushed the red brand into third place.

In this Vodafone U.K. review, we’ll analyze the network including its coverage, plans and what lies ahead for the U.K. carrier.

Don’t miss: Picking the best U.K. carrier | Best Android phones you can buy in the U.K.

Network technology

Vodafone U.K. currently uses the following frequencies:

Frequency Protocol Class
900MHz GSM / GPRS / EDGE 2G
1800MHz GSM / GPRS / EDGE 2G
900MHz UMTS / HSDPA / HSPA+ / DC-HSPA+ 3G
2100MHz UMTS / HSDPA / HSPA+ / DC-HSPA+ 3G
800MHz LTE 4G
900MHz LTE 4G
1500MHz (SDL) LTE 4G
2600MHz (FDD) LTE 4G
2600 MHz (TDD) TD-LTE 4G

Vodafone’s network encompasses over 99 percent of the population and its 4G LTE network matches its chief rivals EE, O2, and Three by also covering 99 percent of the population.

4G LTE

Although Vodafone U.K. launched its 4G network nearly a year after EE in 2013, the carrier rapidly expanded its coverage, while also making promises over the quality of its LTE offering. The company has made 4G calling (VoLTE) available to a number of cities across the country on phones from Apple, Samsung, Huawei, and Sony.

Editor's Pick

Vodafone signed a network sharing agreement in 2009 with O2, through the Cornerstone project, to share their U.K. infrastructure. Unlike other projects however, the two networks share the structure the masts are located on, but not the antennae themselves.

The Cornerstone project is crucial to Vodafone’s LTE network in the U.K. as it means the carrier doesn’t have to bare the costs of deploying thousands of masts to improve its coverage. Alongside Cornerstone, Vodafone U.K. also repurposed its existing masts to improve 3G coverage (on the 900MHz frequency), while adding more capacity using the 800MHz (indoor coverage) and 2600MHz (long-range, high-speed outdoor coverage).

Like EE, Vodafone U.K. offers 4G LTE Advanced using carrier aggregation (also known as 4G+), and while EE was first to offer the service, Vodafone’s double speed network has been shown to offer faster real world speeds in some places, though EE’s 4G network seems to generally be considered faster.

5G

5G logo next to Samsung Galaxy S10 Plus phones - Vodafone UK network review

As with every U.K. carrier, Vodafone has big plans for 5G. The network won big at the 5G auction in 2018, grabbing 50MHz of 3.4GHz spectrum for 378,240,000 pounds — more than any other carrier. Vodafone is also continuing its relationship with O2 parent company Telefónica by agreeing to extend its network sharing partnership to 5G at joint radio sites for a faster national rollout.

Vodafone hopes to start rolling out 5G in H2 2019, but its main goal is to deliver 5G coverage to 1,000 cities by the end of 2020. The first batch of confirmed Vodafone 5G cities and towns are Birkenhead, Birmingham, Blackpool, Bournemouth, Bristol, Cardiff, Glasgow, Guildford, Liverpool, London, Manchester, Newbury, Portsmouth, Plymouth, Reading, Southampton, Stoke-on-Trent, Warrington, and Wolverhampton.

Read more: All you need to know about every 5G phone confirmed so far

The firm started testing its 5G technology around the Manchester area in late 2018. This has included turning on 5G as a public trial at Manchester Airport.

As for 5G phones, Vodafone will launch the Huawei Mate X foldable phone and is expected to stock the Samsung Galaxy S10 5G.

Vodafone U.K. plans and devices

Vodafone logo on a phone - Vodafone UK network review

Pay Monthly

Vodafone’s Pay Monthly (PAYM) handset plans are split across three tiers, all offering 4G as standard. Entry level contracts are found under the company’s Essentials plans, the Red Extra plan offers unlimited minutes and texts with large data allowances, and the Red Entertainment plan comes with unlimited minutes and texts, plenty of data, and a 24 month subscription to Amazon Prime Video, Spotify, Sky Sports, or NowTV included. All of the plans come with Vodafone Global Roaming, which allows you to use your allowances at no cost in 48 Roam-free destinations.

Vodafone U.K. currently offers a maximum of 100GB 4G data with its handsets and the Red Entertainment plan, or just 500MB with 500 minutes on the lowest cost Essentials plan. Monthly prices vary depending on the smartphone model you pick.

Vodafone was at one point the only network to offer 12-month handset contracts in the U.K., but these have been dropped in favour of more traditional 24-month options. If you’re interested in 12-month or 30-day contact options, you’ll have to check out Vodafone’s SIM only deals.

Phone brands

Vodafone store sign - Vodafone UK network review

Vodafone stocks a wide range of phones from a variety of manufacturers on Pay Monthly. Below is the full list of the major brands:

  • Samsung
  • Huawei
  • Apple
  • Google
  • Sony
  • Nokia
  • OnePlus
  • Motorola
  • Blackberry
  • Palm

The selection isn’t quite as great on Pay as you go as Vodafone doesn’t sell premium phones SIM-free. Instead, you’ll find cheaper handsets from Sony, Nokia, Doro, and Vodafone’s own branded phones.

Pay Monthly SIM Only

While most customers buy their phones as part of a contract, a small (but growing) subset of customers are buying handsets and contracts separately, as it will often work out significantly cheaper overall than buying the handset on contract.

For these customers, Vodafone U.K. offers SIM Only (SIMO) plans with either 30-day or 12-month commitments and if you go for the latter, you can upgrade to a handset after just three months (but you’ll need to honour the whole commitment if you want to leave Vodafone). All of Vodafone’s SIM packages come with Global Roaming too. As with the Pay Monthly plans, the 12 month Red Entertainment SIMO deals include subscriptions to Amazon Prime Video, Spotify, Sky Sports, or NowTV for the contract term.

Here’s Vodafone’s current SIMO pricing (subject to change, we’ve included the standard price and the current promotional price):

Plan Data Minutes Texts 12-month cost 30 day cost
Essentials 500MB 500 Unlimited £11/m £13/m
Essentials 1GB 1000 Unlimited £13/m £15/m
Red Extra 3GB Unlimited Unlimited £15/m £17/m
Red Extra 10GB Unlimited Unlimited £17/m £22/m
Red Entertainment (12 month) / Red Extra (30 day) 20GB Unlimited Unlimited £20/m £27/m
Red Entertainment (12 month) / Red Extra (30 day) 40GB Unlimited Unlimited £25/m £32/m
Red Entertainment (12 month) / Red Extra (30 day) 60GB Unlimited Unlimited £30/m £37/m
Red Entertainment 80GB Unlimited Unlimited £42/m N/A

Pay as You Go Plans

Just like every network, Vodafone U.K. offers 4G Pay As You Go (PAYG) plans too. The standard Pay As You Go 1 tariff costs 20p per minute, text, or 5 MB of data, and is capped at £1 per day.

Alternatively, Vodafone sells 30-day rolling Big Value Bundles, offering packages of data, minutes, and texts from as little as £5 per month. Any unspent data, minutes, or texts roll over into the next 30-day period. Customers can also collect reward points with these bundles, which can be spent on high street vouchers, accessories, or even put towards a new phone.

Here are Vodafone’s PAYG Big Value Bundle options:

Pack Cost Minutes Texts Data Duration Rewards/Benefits:
£5 150 250 100MB 30 days 100 Reward Points
£10 250 Unlimited 2GB 30 days 150 Reward Points
£20 1000 Unlimited 8GB 30 days 250 Reward Points
£30 3000 Unlimited 20GB 30 days 350 Reward Points

Mobile broadband

Vodafone offers a range of mobile broadband products like USB dongles, Mobile Wi-Fi routers, and data only SIMs.

The mobile broadband deals change fairly often but the 4G data SIMs are more consistent. Here are the data-only SIM plans at time of writing:

Data 12-month cost 30-day cost Global Roaming
2GB £11 £11 Yes
5GB £15 £15 Yes
15GB £20 £20 Yes
30GB £25 £25 Yes
50GB £30 £30 Yes

Vodafone’s main mobile broadband proposition is the GigaCube. The 4G hotspot can connect up to 20 devices and is designed for the home as a broadband replacement. Pricing starts at 35 pounds with data plans ranging from 60GB to 300GB on either 30-day or 18-month plans.

Tablets, accessories, and smart home

Vodafone logo - Vodafone UK network review

Vodafone carries variety of tablets on Pay Monthly plans or Pay as you go. Mostly you’ll find Apple iPads, but Vodafone does stock more affordable Android tablets from Samsung and Huawei.

The network also sells accessories such as cases, memory cards, screen protectors, chargers, headphones, and more. Vodafone also stocks the Apple Watch and its own V-SOS Band and V-Kids Watch wearables.

Finally, Vodafone has a smart home category called V by Vodafone. The V-Home bundles together smart home products from various manufacturers into a single package all supported by the V by Vodafone app. There are also V by Vodafone trackers for bags, pets, and cars.

Broadband, landline phones, and quad-play

The rise in demand for mobile services has meant mobile networks are beginning to challenge traditional fixed-service providers in a bid to become the sole “Quad-play” supplier for customers. The Quad-play market is becoming ever more competitive as mobile carriers branch out to also offer traditional fixed line services such as TV, Broadband and Landline (does anyone even use a landline anymore!?) to their existing customer base.

More U.K. content: Best phones under £500 in the U.K.

Vodafone currently offers two options for fiber broadband with a home phone line included. The Superfast 1 package costs 23 pounds per month (or 21 pounds for existing Vodafone Pay Monthly mobile customers) for unlimited usage, landline usage, and speeds averaging at 35Mbps. The Superfast 2 package offers the same package with average speeds of 63Mbps for 25 pounds per month (27 pounds for Vodafone Pay Monthly customers). A 60 pound fee applies for any new customer without an Openreach line.

Final thoughts

Vodafone logo from IFA 2018 - Vodafone UK network review

Vodafone’s dominance has waned considerably in the U.K. in recent years, most notably due to the rise of EE as the region’s biggest player.

The network has improved its U.K. offering — in terms of coverage quality and packages — and managed to slowly increase its market share once again. Vodafone is eying 5G is a huge opportunity and is in prime position to deliver next-gen data speeds thanks to its big win during the most recent spectrum auction.

Vodafone certainly has something to offer for everyone

Vodafone’s network is one of the best in the U.K. and more or less on par with EE. Vodafone is by no means perfect but the network has made massive improvements over the past few years.

Whether you’re based in the U.K., or travelling to the U.K. and need a local SIM, Vodafone has something for everyone.


Are you a current or former Vodafone U.K. customer? Let us know your opinion!

Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.

from Android Authority https://ift.tt/2Umourp

https://ift.tt/2d4kg1q

The mobile Phone BoothE by T-Mobile for April Fool's Day. T-Mobile

April Fool’s Day is upon us, meaning we all have to keep our guards up when reading the news until tomorrow. We’ve already covered Google’s gags, ranging from spoon bending in Gboard to Snake in Google Maps, but other tech companies have made some offbeat announcements of their own to mark the occasion.

In this article, we take a look at some of the best April Fool’s Day gags from major tech firms you’ll find online today.


dBrand sells AirPower skins

The dBrand AirPower skin for April Fool's Day.

Popular smartphone customization company dBrand refuses to be put off by recent news that Apple canceled its AirPower charging mat. To mark the cancellation and April Fool’s Day, the company has decided to “sell” AirPower skins anyway.

“Stick them on your coffee table to spark conversations around your irresponsible purchase decisions. Put them on your floor vents for affordable climate control. Better yet – cover up any wall outlet to instantly make it 100 percent wireless,” reads an entry on the dBrand website.

The company also notes that the skins can be customized, and are available for the appropriate price of $4.01.


Duolingo delivers pushy notifications

The team behind language learning app Duolingo has come up with a unique way to remind users to keep learning (h/t: CNET). Who needs push notifications when you’ve got the company’s gigantic owl mascot following you, right?

Yep, the mascot will silently appear at your location whenever you dismiss the standard notification sent by Duolingo. And you have three tiers to choose from on the website, namely Encouraging Duo, Disappointed Duo, and Passive Aggressive Duo. It’s unclear if disabling Duolingo’s access to your location reduces the chances of the mascot finding you.


Nokia 9 has X-Ray vision

The X-Ray sensor on the Nokia 9 PureView Twitter/Juho Sarvikas

The Nokia 9 PureView has plenty of cameras on its back, but did you know that the black sensor isn’t a 3D ToF camera but rather an X-Ray sensor? That’s according to a cheeky tweet by HMD Global’s chief product officer Juho Sarvikas.

HMD’s executive says the X-Ray functionality will be unlocked via a new Nokia X-Ray app on the Play Store. There’s no word yet on whether the camera supports bone-keh shots, though.


OnePlus announces an electric car

OnePlus is also jumping on the April 1 bandwagon, teasing an electric car dubbed the WarpCar. The YouTube video page also contains a link in the description to more information. So what should you expect from the WarpCar?

Read: Here are the best high-end smartphones that won’t break the bank

The Chinese brand claims it’s the fastest charging electric car (fully charged in 20 minutes), goes from zero to 60mph in three seconds, and has a 290-mile range. OnePlus also says the car can be unlocked with your OnePlus 6T.

OnePlus has collaborated with supercar maker McLaren for the OnePlus 6T McLaren Edition phone, but I highly doubt the partnership will go in the other direction. And knowing OnePlus, it’ll probably be a rebadged McLaren anyway.


Use your Exynos chip in a PC

The Exynos 9820 Extender. Samsung Exynos

Samsung’s Exynos 9820 chipset is nothing to scoff at, powering the U.S. Galaxy S10 series. But what if you could use that chip in a PC? Enter Samsung Semiconductor’s Extender, which allows you to plug the Exynos 9820 into your computer. Think of it like an SD card adapter for a microSD card.

“Simply slide the Exynos processor into the adapter and place it in the CPU socket of PC or laptop’s motherboard. That’s it. The Extender automatically adjusts the Exynos processor to be compatible with PC and laptop system,” reads an entry on Samsung’s Semiconductor website.

The Korean company says PCs can then take advantage of the neural processing unit, use the GPU to augment the existing graphics card’s capabilities, and even harness the Exynos chipset’s cellular modem. And if it still sounds like a load of hogwash to you, Samsung has a video for you.


T-Mobile re-purposes the phone booth

Ever tried taking a call on a busy street with honking traffic and loud pedestrians? It can be pretty distracting, so T-Mobile came up with Phone BoothE.

Phone BoothE is essentially a sound-proof phone booth, allowing you to take calls in a noisy area. The carrier says the booth unlocks with your phone, is free to use for T-Mobile customers, and lets you plug your device into a big screen.

“You know it’s real because we tacked an ‘E’ on the end of the name, wow!” says T-Mobile CEO John Legere in a video promoting the product, alluding to AT&T’s fake 5G network.

Editor's Pick

And if you want the convenience of a Phone BoothE wherever you go, the carrier is also offering a portable option (called Phone BoothE Mobile EditionE). The company acknowledges that it’s simply “a cardboard box with a hole in it.”

T-Mobile says the Phone BoothE will be available in select locations in New York City, Seattle, and Washington DC. But it also acknowledges that you could just use a normal phone booth anyway.


Spotted any more great April Fool’s Day announcements from tech companies? Let us know in the comments!



from Android Authority https://ift.tt/2UoCpNQ

https://ift.tt/2d4kg1q

The back of the Apple iPhone XS Max.

Apple’s iOS devices are among the world’s most powerful mobile gadgets, in large part due to the company’s chip design capabilities. But it looks like the firm may have lost one of the key people behind its silicon success.

Gerard Williams III, Apple’s senior director of platform architecture, has left the company after nine years at the Cupertino colossus, a source told CNET. Williams was reportedly in charge of every processor from the A7 in the iPhone 5s to the A12X seen in the latest iPad Pro line.

The A7 was the first 64-bit smartphone chip to feature in a commercial product and its arrival caught the Android world by surprise. Following its launch, there were suggestions that Qualcomm’s first 64-bit flagship chipset (the Snapdragon 810) had been stop-gap release in a rushed attempt to compete.

Editor's Pick

Apple has enjoyed a lengthy period of silicon supremacy since then, as it consistently out-performed chips by Android OEMs and chip makers in most benchmark tests. But it certainly looks like Qualcomm’s Snapdragon 855 processor has narrowed the gap to the current-gen, A12 chip.

Making mobile chipsets is a team effort, but it’s clear Williams’ direction had a major impact on Apple’s mobile hardware; whoever nabs him stands to make some big gains. Whether that’s Google, Huawei, MediaTek, Qualcomm, Samsung or someone else, we don’t know. Either way, here’s hoping that Apple’s loss is Android’s gain.

NEXT: Why Google Stadia could be game-on for Chrome OS tablets



from Android Authority https://ift.tt/2WwyLP6

https://ift.tt/2d4kg1q

The Android Q logo on a smartphone.

Android Q is finally available in developer preview, and it’s a pretty significant update. Between privacy-related tweaks and long-overdue features, it’s clear that Google has been very busy.

So what are the standout Android Q features worth knowing? We’ve got you covered with our round-up! Do note that we’re focusing on features that are either confirmed by Google or don’t require any extra tweaks to use. For a running list of Android Q features, including additions buried in developer settings, you can check out our hub right here.


A better sharing menu

android q fixed sharing menu

Many Android enthusiasts have criticized the platform’s sharing functionality for being slow and unintuitive. Fortunately, Google has overhauled this menu in Android Q.

The new sharing menu is meant to be much faster than the legacy menu, but it’s also supposed to do a better job of recommending contacts and apps for sharing. Time will tell whether Google indeed delivers on these goals, but third-party developers will also need to update their apps to take advantage of this tweak.


Quicker access to settings

android q connectivity settings in apps

It’s already super easy to toggle Wi-Fi, Bluetooth, and other connectivity options, but Google is making this process a little easier when you’re in apps. Enter the settings panel…

This new popup window can be summoned by apps in certain situations. Google gives the example of launching a browser when in airplane mode. The browser can now tell users to activate Wi-Fi, then automatically summon the settings panel.


A standard depth format

Honor 10 lite cameras

Android Q also brings a new depth format, dubbed (surprise) the Dynamic Depth Format, and it opens the door for depth-editing in loads of third-party apps.

Editor's Pick

“Starting in Android Q, apps can request a Dynamic Depth image which consists of a JPEG, XMP metadata related to depth related elements, and a depth and confidence map embedded in the same file on devices that advertise support,” reads an excerpt of the Android Developers Blog.

Google also confirmed that the new format will let third-party apps tweak depth data to create “specialized blurs and bokeh options.” Hopefully, third-party developers embrace this new, Google-pushed standard.


Previews for more OEMs

Tired of Pixel users having all the fun when it comes to Android previews? It seems like Google felt the same way, as it opened Android Pie previews to a few third-party devices too. And it looks like the initiative will expand when Android Q gets pushed out.

Android engineer Iliyan Malchev told the Android Developers Backstage Podcast that more manufacturers will support the Android Q beta program. The developer confirmed that the number of participating OEMs was bigger for the upcoming release, but didn’t give any more details.

The likes of HTC, Huawei, LG, Motorola and Samsung all missed out on Android P previews last year. So it stands to reason that at least one of these brands will jump aboard the bandwagon this time.

The news comes after a Google developer suggested to XDA last year that improvements to the GSI (generic system image) — a key component behind Project Treble — could result in more devices gaining access to Android previews. Additionally, the developer said there might be a way to test-drive the GSI (essentially a stock Android ROM) without flashing your phone.


A better files app

Google’s previous files app was a no-frills affair, and it didn’t even have a shortcut in the app drawer. Fortunately, the Android Q files app is a step above the previous version.

Not only does the new app have a shortcut, but it also offers a revised UI, a universal search bar at the top, and quick access to other apps. There’s still a chance Google could tweak this app before the final release, but it definitely looks more polished than the previous version.


Overhauled permissions

Menu of various Android app permissions

Android Q also has plenty of privacy-related tweaks, with roles being one of the biggest additions in this regard. With roles, the platform can now automatically grant specific permissions to an app based on its use-case. So a text messaging app would automatically gain the ability to send/receive texts, as well as access to your contacts.

Editor's Pick

The other roles noted on Google’s support website include a music player, web browser, launcher, phone dialler, and gallery. But the Mountain View company says these roles and privileges might not be available in the final version.

Another major change is a tweak affecting location permissions. Now, users have the option to either grant location access in general to an app, or only allowing access when the app is actively being used.


Wi-Fi sharing via QR codes

Android Q Wifi sharing via QR code

Xiaomi and Huawei smartphones have allowed users to share Wi-Fi credentials via QR codes for a long time now. So we’re glad to see Google adopt this trend with the new Android update.

The feature is easy to use, as you tap on your Wi-Fi connection, hit the share button, then authenticate with your phone’s password or a fingerprint. From here, you should see a QR code, and your friend can scan this code to gain access. Again, it’s nothing new for third-party brands, but we’re happy Google is catching up in this regard.


That’s it for our look at the top Android Q features! We’ll be updating the article as Google reveals more big changes for the platform. Are there any more features you’d like to see in stock Android?

NEXT: What a pro photographer can do with a cheap Android phone camera



from Android Authority https://ift.tt/2Tanyqi

https://ift.tt/2d4kg1q

Learn C# for Android Development

In this post, you will learn about C# programming for Android, as well as where it fits in in the grand scheme of Android development.

If you’re interested in becoming an Android developer, you may be under the impression that you need to learn one of two languages: Java or Kotlin. These are the two languages officially supported by Android Studio, and therefore the two languages many guides and tutorials focus on. Android development is much more flexible and varied than that, and there are plenty more ways to approach it. Many of these involve C#.

Read: I want to develop Android apps – which languages should I learn?

C# is the programming language you’ll use if you opt to build a game in Unity for instance – which also happens to be the most popular and widely used game engine in the Play Store. In general, it is useful to learn C# programming if you are at all interested in game development.

Programming Coding C# Keyboard Typiing

You should also learn C# programming if you want to use Xamarin. Xamarin is a tool that allows developers to build apps using Visual Studio that can easily be ported to both iOS and Android, perfect for cross platform projects.

So, with that said, there is definitely good reason to learn C# programming for Android. Let’s take a look at what you need to know.

A quick introduction – C# vs Java

C# is an object-oriented programming language that was developed by Microsoft around 2000, with the goal of being modern, simple, and flexible. Like Java (developed by Sun Microsystem in 1990), it originally evolved from C++, ensuring that there are a lot of similarities between the two. For example, both use the same “syntactic base,” meaning that they effectively use a lot of the same terminology and structure. There are a few minor differences, but if you are familiar with one language, then you should be able to understand a lot of the other without needing to have learned it specifically. For beginners though, many will find that it is slightly easier to learn C# programming.

Introduction to C# for Android

As object-oriented-languages, both C# and Java will describe objects through classes. This is a modular approach to programming, that allows snippets of code to be used over and over.

Where C# differs from Java though, is in its use of delegates, its approach to event listening, virtual vs final properties, implicit casting, and more.

The good news: you actually don’t need to know what most of this means when you first start to learn C#. The main takeaway is that the structure is just a little bit easier to learn in C# and tends to require less typing. This is especially true considering that when you learn Java for Android, you’ll also need to familiarize yourself with the many classes and APIs necessary to build Android apps. Thus, you might also learn C# programming as a stepping stone to Java.

Hello World! in C#

Tradition in the world of coding is that any time you learn a new language, you should create a simple program to display “Hello World!” on the screen. This basically ensures that you’re able to get the necessary tools up and running and to compile something simple. It’s like reading “testing, testing, 1, 2, 3” into a microphone!

Hello World C#

In this case, we’re going to use Visual Studio to create a console app. So once you’ve gone ahead and downloaded Visual Studio (it’s free), click:

File > New > Project

And then:

Visual C# > Windows Classic Desktop > Console App (.NET Framework)

This is how we build an app that will run in the Windows console.

With that done, the bare bones structure of your project will appear in the main window. You’ll be presented with code that looks like this:

namespace ConsoleApp3

{

    class Program

    {

        static void Main(string[] args)

        {

        }

    }

}

 

Now simply add two lines, like so:

namespace ConsoleApp3 {

    class Program

    {

        static void Main(string[] args)

        {

            Console.WriteLine("Hello World!");

            Console.ReadKey();

        }

    }

}

 

This is going to write “Hello World!” to the screen, and then await a key press. Once the user touches any key, the program will come to an end and will automatically exit.

Note that both these lines end with a semicolon. This is because any statement in C# must end with a semicolon, which communicates to C# that the line is finished (it’s the same in Java). The only exception is when the line is followed immediately by an open bracket, which we’ll explain in a moment.

Press the “Start” button at the top of the screen, and that should launch the app, allowing you to see this in practice.

Classes are pieces of code that describe objects, which are effectively pieces of data

So, what exactly is going on here?

Getting started with C#: methods and classes

To learn C# programming for Android, you need to understand classes and methods.

Classes are pieces of code that describe objects, which are effectively pieces of data. You don’t need to worry too much about this to start with: just know that the page of code you’re working with right now is called a “class” and that you can interact with other classes within your project. A project can have just one class, with all your code working from there, or it can have multiple.

Within each class, you will also have methods. These methods are snippets of code that you can refer to at any time from within that class – and sometimes from outside of it.

Visual Studio C# Code Programming

In this case, the class is called Program. This is defined right at the top by the line that reads: class Program. And if you open the “Solution Explorer” window on the right, you’ll be able to find Program.cs. The name of the class is always the same as the filename.

We then use a curly bracket to contain all the code that follows. Curly brackets tell us that everything that follows belongs together. Thus, until the bracket closes, all the following code is part of Program.

This is followed by our first method, define by the following line:

static void Main(string[] args)

This is then followed by more open brackets, meaning that the next bit of code is part of the “Main” method (which is still inside the Program class). And that’s where we’ve put our “Hello World” message.

“Static void” essentially tells us that this method does something self-contained (rather than manipulating data to be used by the broader program) and that it can’t be referenced by outside classes. The “string[] args” stuff allows us to pass information into the method to manipulate later. These are called “parameters” and  “arguments”. Again, you don’t need to worry about any of that just yet. Just know that “static void” followed by a word, brackets, and curly brackets, marks the start of a new method.

The next two lines are the ones we added: they get the console and then access its commands to write to the screen and wait for a key press.

Laptop programming C#

Finally, we close all our brackets: first the method, then the class, and then the “namespace” which is the name of the project the class belongs to (in this case “ConsoleApp3” – I have made previous test apps this way).

Confused? Don’t worry, it’s about to make more sense.

Using methods

So methods are bundles of code with names. To demonstrate why we use methods, it can be helpful to create a new one and put it to work as an example.

So, create a new method that lives within the Program class (so it needs to be within those curly brackets, but outside the curly brackets belonging to “Main”).

Call this “NewMethod”, and then put the two lines you just wrote inside here. This should look like so:

class Program

    {

        static void Main(string[] args)

        {

           

        }




        static void NewMethod()

        {

            Console.WriteLine("Hello World!");

            Console.ReadKey();

        }

    }

 

Now add a reference to NewMethod in your Main method, like so:

static void Main(string[] args)

        {ar

            NewMethod();

        }

This is going to then “call” the method you just created, essentially directing the program in that direction. Press Start and you’ll see the same thing happens as before. Except now if you wanted to, you could write “NewMethod();” as many times as you wanted and keep repeating the text without having to write lots of code.

Over the course of a huge program, being able to reference snippets of code like this becomes incredibly powerful. This is one of the most important things to understand when you try to learn C# programming for Android.

adam sinicki author developing android apps

We can create as many methods as we like this way and that way have a very neat and organized piece of code. At the same time, we can also reference methods that are “built in” to C# and any libraries we might use. “Main” is one example of a “built-in” method. This is the method that all programs will start with, and that C# understands it should execute first. If you don’t put anything in here, then nothing will happen!

The arguments that are included in the brackets in this case are therefore only needed because that is the way that Microsoft designed the Main method. We however were fine to leave our brackets empty.

Using variables

Now it’s time to actually do something a little bit interesting in our code. Specifically, let’s take a look at how you would use variables to make the program more dynamic. This is one of the most important things to understand if you want to learn C# programming.

A variable is basically a container for a piece of data. Cast your mind back to highschool math, and you might remember seeing things like this:

10 + x = 13
Find x

Here, “x” is a variable, and of course the value it represents is “3”.

This is also exactly how a variable works in programming. Except here, a variable can represent lots of different types of data: including text.

C sharp programming Android

To create a new variable, we first need to tell C# what type of data it is going to be used to contain.

So inside your NewMethod() method, first you will create your variable, and then you will assign it a value. Then we’re going to add it to our “WriteLine” command:

int number;

number = 10;

Console.WriteLine("Hello World! " + number);

We’ve used a type of variable called an “integer” which can be any whole number. In C#, we refer to these using “int”. However, we could just have easily used a “float” for instance, which is a “floating point variable” and allows us to use decimal places.

If you run this code, it should now write “Hello World! 10” to the screen. And of course, we could alter the value of “number” at any time in order to alter the message.

Because “number” is created within NewMethod(), we can’t access it from elsewhere in our code. But if we place it outside all of the methods, then it will become available globally. To do that, we need to make sure that the variable is also static however:

class Program

    {

        static int number = 10;

           

        static void Main(string[] args)

        {

            NewMethod();

        }




        static void NewMethod()

        {

            Console.WriteLine("Hello World! " + number);

            Console.ReadKey();

        }

    }

Finally, there is one more way we can pass this data around, and that would be to use it as an argument, thereby passing it into our method. This might look like so:

   static void Main(string[] args)

        {




            int number = 10;

            Console.WriteLine("Hi there, what's your name?");

            NewMethod(number);

           

        }




        static void NewMethod(int number)

        {

            Console.WriteLine("Hello World!" + number);

            Console.ReadKey();

        }

    }

Here, we are defining our NewMethod method as needing one argument, which should be an integer, and which will be referred to within the method as “number”. We do this by simply adding that information to the curly brackets. Then, when we call the method from anywhere else in the program, we need to “pass” that value within the brackets. You can create methods with multiple parameters, in which case you just separate the listed variables with commas.

There are different scenarios where using all these different strategies to juggle data will be appropriate. Good programming means finding the right one for the job!

Passing arguments and using strings

Try running this next piece of code and see what happens:

class Program

    {

           

        static void Main(string[] args)

        {

            Console.WriteLine("Hi there, what's your name?");

            NewMethod(Console.ReadLine());

        }




        static void NewMethod(String UserName)

        {

            Console.WriteLine("Hello " + UserName);

            Console.ReadKey();

        }

    }

You should find that you are prompted to enter your name, and that the Console then greats you by it. This simple piece of code contains a number of useful lessons.

First, we see an example of how to use a different type of variable, called a String. A String is a series of characters, which could be a name, or could be an entire story.

So, you could just as easily write UserName = “Adam”. But instead, we’re getting the string from the console with the statement: Console.ReadLine().

We could have written:

String User;

User = Console.ReadLine();

NewMethod(User);

But to keep our code as neat as possible, we’ve skipped those steps and placed the “ReadLine” directly within the brackets.

We then pass that string to our NewMethod, and we greet the user, using the method that you’re already familiar with.

A String is a series of characters, which could be a name, or could be an entire story.

Hopefully, you’re now beginning to understand a little bit about why C# is written the way it is, and how you can use things like variables and methods in order to create some flexible and powerful software.

But there’s one more important aspect you should know if you want to learn C# programming: flow control.

Learn C# flow control and build simple quizzes!

One of the reasons that we use variables when coding, is so that we can easily edit our programs subsequently. Another is so that you can get information from the user, or generate it randomly.

But perhaps the best reason to learn C# variables, is so that your programs can become dynamic: so that they can react differently depending on how they are used.

backend developer course

To that end, we need “flow control”, or “conditional statements”. These are really just fancy ways of saying that we’re going to execute code in more than one way, depending on the value of a variable.

And one of the most powerful ways to do that is with an “if” statement. In this example, let’s greet our main user differently than the others by looking out for their username.

static void NewMethod(String UserName)

        {

            Console.WriteLine("Hello" + UserName);

            if (UserName.Equals("Adam"))

            {

                Console.WriteLine("Welcome back sir");

            }

            Console.ReadKey();

              

        }

“If” statements work by testing the validity of a statement, which will go inside brackets. In this case, we’re asking whether the string UserName is the same as the string “Adam”. If that statement in the brackets is true – the two strings are the same – then the code in the following curly brackets will execute. If it’s not, then those lines will be skipped.

Likewise, we can compare integers and floats, and we can test to see if one is bigger than the other, etc. We can even use multiple different if statements inside one another like Russian dolls. We call these “nested ifs”.

Next time

There are many more strategies you can use for flow control – including things like switch statements. Hopefully though, you can already see how we might use these statements and techniques in order to start making some useful things. You could easily turn this code into a quiz already!

Unity development

Eventually C# with tools like Unity will allow you to build fully functional games!

But in order to really make impressive tools and games, there are a few more things we need to explore. So surprise! There is going to be a part two!

In the next lesson, you will discover how to create loops that iterate over time, as well as how to create new classes and interact with them. See you then!

Learn How To Develop Your Own Android App

Get Certified in Android App Development!  No Coding Experience Required.

Android Authority is proud to present the DGiT Academy: the most detailed and comprehensive course covering every aspect of Android app development, run by our own Gary Sims. Whether you are an absolute beginner with zero coding knowledge or a veteran programmer, this course will guide you through the process of building beautiful, functional Android apps and bring you up to speed on the latest features of Android and Android Studio.

The package includes over 6 hours of high quality videos and over 60 different lessons. Reams of in-depth glossaries and resources, highly detailed written tutorials and exclusive access to our private slack group where you can get help  directly from Gary and our other elite developers.

AA readers get an additional 60% off today. That's a savings of over $150. Claim your discount now using exclusive promo code: SIXTYOFF. This is your ticket to a lucrative future in Android App Development. What are you wating for?
Enroll Today


from Android Authority https://ift.tt/2I2DWlX

https://ift.tt/2d4kg1q

Google Japan brought spoon bending to Gboard. Google Japan

Google is well-known for joining in on the April Fool’s Day fun, with past gags including Google Maps for NES, Google Voice for Pets, and toilet-based internet connectivity.

The company has made at least four announcements today to mark the occasion, and there’s no mistaking most of them for the real deal. We take a look at all of these ridiculous reveals.


Snake in Google Maps

The splash screen in Google Maps Snake. Levels in Google Maps Snake. Google Maps Snake gameplay.

The first announcement is actually the only legitimate one on the list, as Google is allowing Maps users to play Snake on the service. To get started, you need to hit the hamburger menu button in the top-left, then choose Play Snake. From here, you’ll be able to play Snake in a variety of locales, namely Cairo, London, San Francisco, Sao Paulo, Sydney and Tokyo.

Google says Snake will be available in the Android and iOS app for roughly a week. If you’re like me and haven’t received the game just yet, then you can visit the Google Maps Snake website instead.


A screen cleaner in the Files app

The Files app was a long-overdue official file manager for Android devices, bringing other cool features too. Now, Google’s latest “feature” is a screen cleaner, which promises to literally clean your phone display.

Editor's Pick

Google says the feature works by using “geometric dirt models, combined with haptic micromovement pulses, to dislodge what’s stuck to your screen.” The company says that a thin magnetic field is then generated by the app to further protect the screen, complete with a “sweet scent.”

Obviously this is meant to be an April Fool’s joke, but I wouldn’t be surprised if more than a few people fall for it. After all, there are loads of apps on the Play Store that claim to bring fingerprint sensing to phones without a scanner…


Google Tulip

Ever wanted to speak to flowers? Well, the Mountain View company is offering just this with Google Tulip.

“Thanks to great advancements in artificial intelligence, Google Home is now able to understand tulips, allowing translation between Tulipish and dozens of human languages,” the company noted in a blog post.

The firm claims that tulips can now tell humans when they need more light, space, and water. Furthermore, the flowers are supposedly great listeners and give excellent advice in return.

Google says the feature is only available on April 1, and can be activated on your Google Home device by simply saying “hey Google, talk to my tulip.”


Spoon bending for Gboard

Is it the strangest gag on the list? I’m not sure, but Google Japan’s April Fool’s joke (h/t: 9to5Google) is certainly a weird entry. The company claims you can now bend a special, smart spoon to type Japanese characters in Gboard.

According to Google’s Japanese unit, the spoon is equipped with either micro-USB or Bluetooth 4.1, and has been bent 2019401 times (get it?). The division has created a Github project for the gag too, but warns that this isn’t an officially supported product.


That’s it for Google’s April Fool’s Day gags thus far, but what was your favorite announcement? Let us know in the comments!

NEXT: Is the Huawei P30 Pro camera worth the hype? See for yourself



from Android Authority https://ift.tt/2WAJ6K3

https://ift.tt/2d4kg1q

No matter what kind of business or side hustle you have, having a website helps you reach more people, build trust, and drive sales. For en...