LightBlog

vendredi 4 novembre 2016

Note 7 will be banned from all mobile networks in New Zealand

Samsung Galaxy Note 7 (Notetaking)-21 (leaning against wall with s pen front colorfy app)

Samsung's Note 7 fiasco just won't seem to end. The device, which was killed off by the company due to the risk of malfunction and fire, wiped out Samsung's mobile profit in Q3. And even though the South Korean giant has issued a recall on all devices, some people are still not ready to part with their phablet.

That's why in New Zealand, Samsung and its telecom partners decided to take a different approach. On November 18th, all Galaxy Note 7 devices that are still in use around the country will be disconnected from all mobile networks. This means that they won't be able to make or receive calls, send texts, and connect online using mobile data. They will, however, still be able to access the internet with a Wi-Fi connection.

According to Stuff.co.nz, the decision to ban the Note 7 from mobile networks was actually made by local carriers, with "Samsung's agreement."

According to Geoff Thorn, the chief executive of the Telecommunications Forum in New Zealand, most Galaxy Note 7 devices have already been exchanged. But there are still a few hundreds of them "in the wild." He also stated that there have been numerous attempts made by all providers to contact owners and ask them to bring the phones in for replacement or refund. But it seems not all of these attempts were successful.

LG V20 vs Samsung Galaxy Note7 Quick Look-2See also: Returning your Galaxy Note 7? Here are some other great Android phones you should check out124

The big question now is, will Samsung and carriers use the same strategy in other countries? Based on the fact that not all users have exchanged their Galaxy Note 7 device, there must be quite a few of them still in use across the globe. Samsung has not released an official statement on this subject, but when it does, we'll be sure to let you know.



from Android Authority http://ift.tt/2fjrw91
via IFTTT

Leaked Moto M press images confirm design and specs

motorola-moto-m-press22

The Moto M has been leaked so many times that you might as well consider it announced at this point. We've already seen reports of the price, specs, release date and some pictures of it in the wild – now we've got what appears to be official press photos of the "rumored" handset.

The images arrive from Nowhereelse.fr and, though a source isn't provided, it looks legit and corroborates much of what had previously been speculated about the handset.

The Moto M is expected to arrive with a metal unibody design, 5.5-inch 1080p display, a 2.2 GHz octa-core MediaTek Helio P15 processor, 4 GB of RAM, 32 GB of internal storage, a 16 MP main camera, 8 MP front-facing camera and a 3,050 mAh battery.

The Moto M also features USB Type-C, microSD card support up to 128 GB and a fingerprint scanner, which is housed on the back as opposed to the bottom center position of other recent Moto devices.

Running Android Marshmallow out of the box, the Moto M goes on sale in China on November 8 and it's expected to cost 1999 Yuan, or around $295. Details of a wider release aren't yet known.

It might not be a game-changer, but it looks like another solid mid-range effort from Lenovo. Let us know your thoughts on it in the comments below.



from Android Authority http://ift.tt/2foy30T
via IFTTT

WhatsApp testing out Snapchat-like “Status” feature

whatsapp-status-1FirstPost

Facebook, the company which also owns Instagram and WhatsApp, has found itself under public scrutiny over the last few months. The biggest social network in the world decided to straight up copy the features of its main competitor, Snapchat. It did so by introducing Instagram Stories, a direct Snapchat Stories competitor and then by testing "Messenger Day" within its messaging app, which works in a similar fashion.

Now, the company is at it again. WhatsApp is testing out a new "Status" tab (via WABetaInfo and FirstPost), that allows you to share images and videos to your contact list for a limited period of time. You also have the option to scribble on images and videos with the help of the pencil tool, as well as to adding emoji and text. Sounds familiar? If you're a Snapchat user, it should, as its Snaps feature basically works the same way.

The new feature seems to replace the Contacts tab in WhatsApp's top navigation menu.

whatsapp-status-2WABetaInfo

The new Status bar is currently available on WhatsApp's latest beta version (2.16.336), though it's hidden from regular users. To use it, you have to do a search in the Settings menu, but please keep in mind that in order to test it out for yourself, you will need a rooted Android (or a jailbroken iOS device).

As already stated, the feature is currently being tested, and once WhatsApp gets enough feedback to implement a few improvements, it will probably roll it out to users across the world. When exactly will that happen is anyone's guess, but hopefully, it will be available soon. As always, we'll keep you posted when we hear more.

Let us know your thoughts! Do you like this feature?



from Android Authority http://ift.tt/2flXguw
via IFTTT

What’s new in EMUI 5?

huawei-mate-9-emui-boot-screen

Huawei has unveiled its new Mate 9 flagship smartphone and while there's a lot to like about it, it is also the first handset to run the company's new EMUI 5 interface. Back at IFA, Huawei teased to us that EMUI 5 would be its most refreshed interface ever and with the Mate 9 now official, let's take a look at what's new (and what's the same) in EMUI 5.

Launch breakdown:

A refreshed interface?

Without doubt, EMUI has proven to be a very polarizing interface, with Huawei often adding its own flourishes to Android that many users weren't overly keen on. In EMUI 5, this is mostly no longer the case and while it looks visually similar to previous versions, there are some fundamental differences.

The biggest of these is the presence of an app drawer and while it's disabled by default, enabling it is as simple as flipping a switch in the settings menu. With that being said, even the default homescreen (where all the apps are present in a similar way to the iPhone) seems more polished than on previous devices and there is definitely less lag than previous versions as well.

huawei-mate-9-emui-5-home-screen-app-drawer

Of course, there are parts of the interface that are similar to previous iterations and a customisable homescreen including transitions and settings is still present. Yet, all of Huawei's apps seem to have undergone the same ideological transformation, with a focus on nature and the azure with white and blue interfaces interspersed with gentle, organic animations. Unlike previous years where the animations would be overly apparent, they have been tweaked in EMUI 5 to only show when time is not of the essence; for example, a cute lockscreen animation might look good at first but after you unlock your phone 20 times in a day, it'll quickly grow irritating.

EMUI 5 also brings a new miss-touch feature that is somewhat indicative of things to come from the Chinese OEM. Huawei's message is clear; sometimes a touch on your screen isn't necessarily intentional and the miss-touch feature seems to mostly be able to distinguish real interactions from accidental taps. The curved nature of the Porsche Design Mate 9 is definitely likely to be a key factor behind developing this and from first impressions with the regular Mate 9 at least, it seems to be a well thought-out feature that does what it says on the tin.

huawei-mate-9-emui-5-app-drawer

Nougat, Nougat, Nougat

Based on Android Nougat, EMUI 5 also brings a lot of the native Android features relatively untouched, with multi-window, quick app switching and Google Now on tap all present. Multi-window has been 'tweaked' with the addition of Knock Knock support allowing you to swipe across the screen using your finger to launch multi-window, but like the rest of the Knock Knock feature set, this isn't the most reliable way to do so.

Alongside this, Huawei has also kept the quick settings shortcuts from Nougat, essentially allowing you to access any of the deeper menus behind the quick settings by pressing and holding. This is one of their key examples of where they've used the features present in core Android natively – rather than re-engineer them – to deliver on their philosophy of a simplified interface where you can accomplish over 50% of core tasks in 2 clicks and 92% within 3 clicks.

huawei-mate-9-emui-5-split-screen-quick-settings

Under the hood changes

Visually there's not a lot different but EMUI 5 does bring with it several changes under the hood that Huawei hopes will allow it to transcend being merely an Android interface. Using on-device machine learning, EMUI 5 monitors resource usage in a bid to ensure the out-of-the-box fast experience continues regardless of how much you've used your phone.

The algorithm learns from the way you use your phone (in this case, the Mate 9) in a bid to ensure there's always enough of the right hardware resources for each app you want to use. It achieves this using a combination of smart CPU management based on most recently used apps, storage defragmentation – Huawei has replaced the native Android file system with F2FS which has a much smaller fail rate – memory compression and GPU acceleration thanks to native Vulkan support.

huawei-mate-9-emui-5-settings-menu-navigation

What else can we say about EMUI 5?

Through several sessions in China, one thing became apparent and it's that EMUI 5 is the first interface from Huawei where the company's various divisions have actually liaised together. In previous years, the interface was developed mostly in China and then rolled out to other markets with little concern for local preferences but this seems to be a thing of the past.

This year's EMUI has had input from teams across the globe, including teams at design and research centres in San Francisco, London, India, Paris and Moscow. Furthermore, Huawei's implementation of an interface goes beyond the visual elements of Android with roughly 1000 people dedicated to Linux-based development and a global workforce where roughly 10% have some understanding of kernel levels.

For those wondering, EMUI 5 will be coming to other devices with the update planned for the Mate 8, P9 and P9 Plus early next year followed by the honor 8 and other Honor branded devices in Q2 2017. Hardware limitations aside – such as a dual lens camera etc – most devices getting EMUI 5 should get the full feature set and for those not set to get the update, there will be an updated version of EMUI 4.1 that will bring some of these changes. The P8 and P8 Lite are likely to be two devices that aren't updated to EMUI 5 but instead get a tweaked version of EMUI 4.1, with some of the functionality from the latest version.

huawei-mate-9-emui-5-floating-navigation-app-twin

EMUI 5 – our initial verdict

Huawei has gone to great lengths to explain that while they do use Android as a reference point, they have found areas they believe that need to be improved on and this philosophy is one of the less obvious changes. In previous years, we've seen the company attempt to redesign (and redefine even) what Android is with its interface but, whether it's working with Google on the Nexus 6P last year, or understanding what customers want, EMUI 5 seems to be a break away from this tradition.

Instead, Huawei seems to have taken the core Android experience and merely tweaked elements (while also adding its own flourishes) while also adding its own design flourishes. The result is an experience that although visually similar to previous versions, marks a big shift for the company. The chances of a Huawei handset running stock Android may be minimal but the direction that EMUI is headed in suggests that maybe, the call for this is a thing of the past.

We'll have a full review of the Huawei Mate 9 in the coming days so stay tuned on more from Huawei's latest flagship and its new-yet-same User Interface. In the meantime, what do you think of EMUI 5? Let us know your views in the comments below!



from Android Authority http://ift.tt/2eGt9wf
via IFTTT

How to create a widget for your Android app

create-an-android-app-widget-feature-imageAndroid app widgets may look pretty simple – essentially, they're just small windows that users embed in an App Widget Host, typically their device's homescreen – but your average application widget has a lot to offer.

For users, widgets help them make the most of all that homescreen real estate that would otherwise go to waste. And for developers, creating a widget to accompany your latest Android app is a way of delivering a better user experience (and if you want those 5 star reviews then you should seize any opportunity to deliver a better user experience) plus a well-designed app widget is a useful tool for keeping your app at the forefront of the user's mind.

Every time the user passes through their homescreen, your widget has an opportunity to catch their interest by presenting them with a snippet of your app's most important content – ideally tempting them into launching your app.
In this article, I'm going to show you how to create an effective app widget for your latest Android project. I'll be covering all the essentials of creating a basic widget, before sharing some best practices that can help ensure your widget will have no problem securing itself a permanent spot on the user's homescreen.

Planning your widget

So, you're sold on the idea of creating an Android app widget, but the first step is deciding what kind of widget you're going to build.

If you're struggling for inspiration, then it can help to look at what other Android developers are doing. When you look at all the Android widgets that are currently out there, they can generally be divided into the following categories:

  • Information widgets. Display important information related to your app. Some examples include clock and weather widgets, and widgets that notify the user about new emails or SMS messages.
  • Collection widgets. These vertically-scrolling widgets display multiple elements from the same group, such as a collection of headlines from a news app, or a series of photos from a gallery app.
  • Control widgets. These widgets give users the ability to trigger an app's most important features from the comfort of their homescreen – kind of like a remote control. A control widget can help your app feel more like an integral part of the user's device, rather than an add-on that the user opens, plays around with for a while, and then closes. A widget that allows the user to play, pause and skip tracks in a music application is one example of a control widget.
  • Hybrid widgets. Can't choose between the different categories? Many widgets combine elements from two or more categories – case in point, the music widget from our previous bullet point. Assuming this widget displays some information about the currently-selected track, then this is an example of a control widget that borrows elements from the information widget category. If you do decide to mix and match, then it's recommended that you target one category first and then add elements from other categories as and when required.
android-widget-hybrid-music-widget-example

An example of an information widget (above) and a hybrid widget (below) that combines elements of a control widget and an information widget.

What are the essential components of an Android widget?

To create a widget, you'll need the following classes and XML files:

  • An AppWidgetProviderInfo file. An XML file containing important information about your widget, such as its minimum width and height, its layout resource file, how often it should be updated, and whether it uses a configuration Activity.
  • An AppWidgetProvider class implementation. This is where you'll define the methods that you'll use to programmatically interact with your widget.
  • An XML layout resource file. Your widget's initial layout.
  • An App Widget configuration Activity. If you want the user to be able to modify your widget, then you'll need to create a configuration Activity. This Activity will launch automatically when the user creates an instance of your widget.

There's no set rules about the order you should create these files and classes in, but I find that it helps to have a clear idea of how your widget will look, before you start worrying about how it'll function, so I'm going to start by creating my widget's layout.

Creating your widget's layout

You define your widget's layout in the same way you define the layout for any Activity: create an XML layout resource file and add all the UI elements you want to use.

The only major difference is that widget layouts are based on RemoteViews, so you can only use layouts and views that RemoteViews supports.

Specifically, when you're creating your widget's layout you can use the following layout classes only:

  • FrameLayout
  • GridLayout
  • LinearLayout
  • RelativeLayout

And you can use the following widget classes only:

  • AdapterViewFlipper
  • AnalogClock
  • Button
  • Chronometer
  • GridView
  • ImageButton
  • ImageView
  • ListView
  • ProgressBar
  • StackView
  • TextView
  • ViewFlipper

Any layout you create should look good and function correctly across a wide range of different screens, however when it comes to widget layouts you have some extra motivation for ensuring you layout is as flexible as possible:

  • Users typically place widgets on their homescreens, and although all Android homescreens are divided into a grid, the exact number of cells, spacing and sizing will vary between devices. Your widget needs to be flexible enough to handle all the different homescreen grids it may encounter.
  • Users expect to be able to resize widgets horizontally and vertically, so your widget should meet these expectations unless it has a very good reason not to. This means your layout needs to be able to cope with however the user chooses to resize your widget.

Creating a flexible widget layout follows many of the best practices you'll be familiar with from building other Android layouts, but in particular you should:

  • Provide alternate versions of all your layout's resources. These alternatives should be optimized for a range of different screen configurations. The Android system will then select the best version of each resource to use at runtime, based on the current device.
  • Create a density-independent layout. Make sure you specify all layout dimensions using density-independent pixels (dpi) and use flexible units of measure, such as "wrap_content" and "match_parent," rather than absolute units.
  • Test! Make sure you test your widget across a range of screen configurations by creating multiple Android Virtual Devices (AVDs). If you do discover issues with a particular screen configuration, then you may want to create an alternate layout that's optimized for this particular screen. You should also check that your layout can handle being flipped between portrait and landscape mode, and that it continues to look good and function correctly regardless of how the user resizes it. If you do encounter issues once your widget has been shrunk past a certain size, then you can specify a minimum size for your widget – something I'll be covering when we create our AppWidgetProviderInfo file.

Create an AppWidgetProviderInfo file

The next step is creating a AppWidgetProviderInfo XML file and defining all the qualities you want your widget to have.

Create a res/xml directory (if your project doesn't contain one already) and then create a new XML layout inside this directory.

android-app-widget-create-xml-directory

This is going to be our AppWidgetProviderInfo file, so open it and set its root element to <appwidget-provider>. You can now specify all the qualifies your widget should possess – here's a few examples:

  <appwidget-provider xmlns:android="http://ift.tt/nIICcg"  // Your widget's default width and height     android:minWidth="50dp"     android:minHeight="50dp"    // How often your widget should be updated, in milliseconds    android:updatePeriodMillis="90000000"    // The XML file containing the widget's layout     android:initialLayout="@layout/appwidget"    // Whether the user can resize your widget horizontally, vertically, or both (horizontal|vertical). If you don't  // want your widget to be resizable, then you can set this attribute to "none"     android:resizeMode="horizontal|vertical"    // Even if you follow all the best practices for designing a flexible layout, if a user keeps shrinking your  // widget indefinitely then at some point it's going to become unusable. Prevent the user from pushing your  // layout to its breaking point, by assigning it a minimum height and width     android:minResizeHeight="30dp"     android:minResizeWidth="30dp"    // Specify whether your widget can be displayed on the homescreen, (home_screen), the lockscreen (keyguard)  // or both - although only devices running Android 4.0 and lower support lockscreen widgets. Lockscreen  // widgets aren't particularly private, so if you do give the user the option of placing your widget on their  // lockscreen then just make sure your widget doesn't feature any sensitive or potentially embarrassing  // information!     android:widgetCategory="home_screen">  </appwidget-provider>  

Create Your AppWidgetProvider class

The AppWidgetProvider class is where you'll define the methods that will be called during the widget's lifecycle, for example whenever a widget is deleted, enabled or disabled. This class is also where you'll create the code that'll ultimately be responsible for updating your widget.

Create a new Java class that extends the AppWidgetProvider class and override its update methods. In my example, I'm going to be using MyAppWidgetProvider.

  public class MyAppWidgetProvider extends AppWidgetProvider {  ...  ...  
// Retrieve the widget's layout// RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.activity_main); // Tell the AppWidgetManager to perform an update on this application widget// appWidgetManager.updateAppWidget(currentWidgetId,views);

You'll then need to declare the AppWidgetProvider class in your project's Manifest:

  //Specify your AppWidgetProviderInfo XML file//  <receiver android:name="MyAppWidgetProvider" >  // Specify that the AppWidgetProvider accepts ACTION_APPWIDGET_UPDATE, which is the broadcast that's sent whenever  // a new instance of this widget is instantiated and also whenever a widget requests an update. Both of these  // are events that the AppWidgetProvider class needs to be able to respond to     <intent-filter>         <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />     </intent-filter>  <meta-data android:name="android.appwidget.provider"  // Point the Manifest in the direction of the AppWidgetProviderInfo XML file you created earlier //       android:resource="@xml/myappwidgetprovider" />  </receiver>  

Creating an app widget configuration Activity

Do you want the user to be able to customize your widget? These customizations could be visual tweaks, such as changing the widget's colour, or functional changes such as specifying how often the widget should be updated.

Whatever the specifics, if you want to create a customizable widget then you'll need to create a configuration Activity, and set this Activity to launch automatically when the user creates a new instance of your application widget.

To add a configuration Activity to your project, create a new Java class (I'm going to use ConfigurationWidget). Then, when you declare this Activity in your Manifest make sure you specify that it accepts the ACTION_APPWIDGET_CONFIGURE intent.

  <activity android:name=".ConfigurationWidget">     <intent-filter>         <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>     </intent-filter>  </activity>  

You'll also need to declare this Activity in your project's AppWidgetProviderInfo using the android:configure attribute, so hop back to this file and add the following:

     android:configure="com.example.android.ConfigurationWidget"  

Although the main body of your configuration Activity will vary depending on how the user can edit your widget, there's a few common features you should add to any configuration Activity, in order to ensure it functions correctly.

Firstly, if the user exits the Activity without completing the configuration process, then you should notify the widget host and tell it not to add the widget to the user's homescreen:

  @Override  public void onCreate(Bundle savedInstanceState) {  super.onCreate(savedInstanceState);  setResult(RESULT_CANCELED);  

Normally, when the user adds a widget to their homescreen, performing the initial setup is the onUpdate method's responsibility. However, as soon as you create a configuration Activity, this setup becomes the responsibility of the configuration Activity. This means your configuration Activity will need to request an update from the AppWidgetManager:

  //Find the App Widget ID from the Intent that launched this Activity//    Intent intent = getIntent();  Bundle extras = intent.getExtras();  if (extras != null) {     mAppWidgetId = extras.getInt(             AppWidgetManager.EXTRA_APPWIDGET_ID,             AppWidgetManager.INVALID_APPWIDGET_ID);  }    // If you receive an intent without the appropriate ID, then the system should kill this Activity//  if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {      finish();  }  

Once you've completed this setup, you can fill this class with all the options your users should be presented with when they create an instance of your widget. Just don't get carried away – setting up a widget shouldn't feel like a monumental task, so limit yourself to 2-3 configuration options.

Once you've written your configuration code, there's a few final tasks you'll need to complete. Firstly, you'll need to get an instance of the AppWidgetManager by calling getInstance(Context):

  AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);  

Then, you'll need to update the app widget with a RemoteViews layout by calling updateAppWidget(int, RemoteViews):

  RemoteViews views = new RemoteViews(context.getPackageName(),  R.layout.example_appwidget);  appWidgetManager.updateAppWidget(mAppWidgetId, views);  

Finally, create the return Intent, set it with the Activity result, and finish your configuration Activity:

  Intent resultValue = new Intent();  resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);  setResult(RESULT_OK, resultValue);  finish();  

App Widget Best Practices

Now you know the basics of creating a functioning application widget, let's look at ways to build on these foundations by covering some best practices.

Include margins for earlier versions of Android

An application widget that extends to the edges of the user's screen or presses flush against other widgets runs the risk of making the user's homescreen look messy or cluttered. You can make sure your widget always has some breathing space, by including margins.

On Android 4.0 and higher, the system automatically adds padding between the widget frame and the widget's bounding box, so you only need to add margins manually when your app is installed on devices running anything earlier than Ice Cream Sandwich. You definitely don't want to add margins across the board, as your manual margins combined with those automatic margins can seriously add up on devices running Android 4.0 and higher, creating an awkward amount of empty space around your widget.

The solution is to create two dimens.xml files that specify different margins, depending on the device your app is installed on:

  • res/values-v14/dimens.xml. In this file, define the 0dp of padding that should be added to the margins that Android 4.0 creates by default.
      <dimen name="widgetmargin">0dp</dimen>  
  •  res/values/dimens.xml. This is where you'll define your widget's custom margins that should be used on devices running anything earlier than Android 4.0.
      <dimen name="widgetmargin">10dp</dimen>  

android-widget-create-alternate-dimens-files

Then, you just need to reference "widgetmargin" in your widget's layout and the system will select the appropriate widgetmargin value to use at runtime:

      android:padding="@dimen/widgetmargin"  

Don't update too often

Up now, we've focused on one method of updating your widget: using the updatePeriodMillis attribute to specify an update interval. Once this interval has elapsed, the app widget framework will request an update, and if the device happens to be asleep at the time then it'll wake up in order to perform this update.

Waking the user's device every now and again generally isn't a huge problem, but if your widget requires frequent updates then this can result in a noticeable drain on the device's battery. And battery-hogging apps rarely get good reviews on Google play! For the sake of preserving the device's battery life, you should update your widget as infrequently as you can possibly can without compromising the user experience.

If your widget does have a valid reason for requiring frequent updates, then you should avoid using updatePeriodMillis and opt for an alternative, more battery-friendly way of updating your widget.

One option, is to perform updates based on an alarm that only gets delivered if the device is awake. If the device is asleep, then the update will be delayed until the device wakes up, which means your widget's updates won't have such a negative impact on the user's battery.

To use this technique in your project, you'll need to use the AlarmManager system service to create an alarm and set it to the type AlarmManager.RTC. You can then specify how often you want your widget to update, in milliseconds, for example:

  alarmManager.setRepeating(AlarmManager.RTC, calendar.getTimeInMillis(), 1000 , ClockIntent(context));  

Even after you've written this code, your project's updatePeriodMillis attribute can override your alarm and wake the device anyway. To make sure this doesn't happen, find this attribute in your project and set it to android:updatePeriodMillis="0″

Since alarms are delivered as intents, you'll need to configure your app to listen for this intent type, so open your project's Manifest and add a new intent-filter beneath the existing  APPWIDGET_UPDATE filter. For example:

  <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<intent-filter>
<action android:name="com.jessicathornsby.myapplicationwidget.WIDGET_UPDATE" /> </intent-filter>

With this bit of setup out of the way, you're free to update your AppWidgetProvider class with the code that specifies how often you want to send this intent, and how your widget should handle these intents when they arrive.

Provide a preview image

You add a new widget to your homescreen by launching your device's widget picker, browsing the available options, and then selecting the one you like the look of. When you're browsing this widget picker, you may have noticed that many apps display a preview image of how their widget will look once it's properly configured and setup on your homescreen.
create-an-android-app-widget

A well-designed preview image is a good way of encouraging the user to choose your widget over the competition, so it's well worth taking the time to create a preview image. If your project doesn't feature a dedicated preview image, then the system will use your app's launcher icon instead, which doesn't quite have the same effect.

Create the image you want to use and add it to your project's 'drawable' folder. Then, open your AppWidgetProviderInfo file and point it in the direction of this new drawable resource, using the android:previewImage attribute:

  <appwidget-provider xmlns:android="http://ift.tt/nIICcg"  ...   android:previewImage="@drawable/preview">  </appwidget-provider>  

Wrapping Up

In this article, we looked at how to create all the necessary classes and files you'll need to develop an Android app widget, including an optional configuration Activity that will allow users to tweak your widget's settings. I also shared some best practices that can help you put those finishing touches to your widget. You can find an app widget outline, complete with all the code covered in this article, on GitHub.

Are you going to develop a widget to accompany your next Android app project? Let us know in the comments below!



from Android Authority http://ift.tt/2fj6Xw1
via IFTTT

Huawei wants to overtake Apple within the next two years

Huawei P9 launch event

Richard Yu, CEO of Huawei's consumer business group, has said that he wants Huawei to be the second biggest smartphone manufacturer in the next two years.

Speaking to Reuters, Yu said: "We are going to take them (Apple) step-by-step, innovation-by-innovation," adding, "there will be more opportunities. Artificial intelligence, virtual reality, augmented reality."

Huawei is currently the third biggest smartphone manufacturer behind Apple and front-runner Samsung. According to data from research company IDC, Huawei shipped 33.6 million smartphones in Q3 2016, giving it a 9.3% market share. Apple shipped 45.5 million and holds a 12.5% market share, while Samsung shipped 72.5 million units, with a 20% overall market share. Earlier this year, Yu said that he believed Huawei could be the number one manufacturer within five years.

huawei-mate-9-hands-on-aa4See also: Huawei Mate 9 versus the competition30

With Samsung canceling its major phablet of the year, the Galaxy Note 7, and the lukewarm response to Apple's iPhone 7 and iPhone 7 Plus contributing to a -5% drop in Apple's smartphone shipments compared to Q3 last year, Huawei could take advantage of competitor's shortfall to secure some new followers. Huawei unveiled its latest smartphone, the Huawei Mate 9 in Munich yesterday, alongside a Porsche designed variant of the same device.

For an in-depth look at 2016's smartphone landscape by the numbers, head to the article at the link. Do you think Huawei will pull ahead of Apple in the next two years? Give us your thoughts in the comments.



from Android Authority http://ift.tt/2e83aS9
via IFTTT

The action-packed NeoNinja game is now available in the Play Store

neoninja

All you gamers out there, especially ones that love action-packed games, are in luck. Kyy Games, a Finnland-based developer, has released a cool new game called NeoNinja.

You'll take on the role of a cybernetically enhanced ninja, whose mission is to kill the security forces she encounters along the way. Use tapping and swiping to get around, and finish off your opponents by slashing them up close with a single deadly sword hit. Played in dark, neon-lit interiors, the game has 20 different levels. To complete one, you have to kill every single member of the security forces. Your performance is graded based on the time of completion, and if you're fast enough to achieve a »Gold time«, you'll be awarded a deadly shuriken. The additional weapon will come in handy, as is it allows you to take out your opponents from afar, which will drastically improve your survival chances and get you to the next level faster and easier.

neoninja

The game is already available for download from the Google Play Store and is free of charge. It does, however, offer in-app purchases and contains advertisements. In addition, it also includes a leaderboard, which will appeal to the more competitive gamers.

So what do you think about the game? Will you be trying it out, or do you prefer sports or racing games?

Download from the Play Store


from Android Authority http://ift.tt/2ekHk9m
via IFTTT