LightBlog

jeudi 13 octobre 2016

OnePlus launches e-commerce store for Indian customers

OnePlus-2-vs-OnePlus-3-1

Today, OnePlus has launched a new online retail store dedicated to Indian consumers. The new site can be found over at oneplusstore.in, where customers can pick up a range of genuine OnePlus accessories for its range of handsets. However, smartphone sales are still being handled through Amazon India, for now.

By opening its own online store front in the country, OnePlus aims to keep atop of supply and wants to ensure that customers can buy accessories and merchandise in confidence that produces have come from an official source. Currently, the web store features a small selection of StyleSwap Bundles for the company's most recent handsets, a range of Dash charging accessories, earphones, and protective cases in different styles and sizes.

"With the new platform, our users will find it easier to purchase genuine OnePlus products and fan merchandise, right from the comfort of their homes. The e-commerce platform marks yet another major milestone in our India journey and reiterates our long term commitment towards the Indian market and our fan community here. " – Vikas Agarwal, General Manager OnePlus India

To get the store off the ground, OnePlus is also throwing some exclusive merchandise and deals up on its new e-commerce store, which will only be available to existing customers. To find the deals, customers simply have to register their smartphone's IMEI number on the website, by clicking here, and then continue browsing.

Who's doing some shopping today?

Show Press Release

OnePlus sets up shop in India, online!

Launches its exclusive e-commerce platform for Indian fans and enthusiasts

Bangalore/India, October 13, 2016: OnePlus, a global mobile technology startup with presence in over 35 countries, today announced the launch of its very own, exclusive e-commerce website in India – http://oneplusstore.in. After creating a niche for itself in the premium smartphone segment, OnePlus is all set to offer a personalised shopping experience to its fan community by launching an exclusive online brand store for its Indian users.

The online store will improve the availability as well as make it easier for its fans to purchase genuine OnePlus products. To make it more rewarding for early supporters, OnePlus is also bringing its latest range of exclusive merchandise and is offering limited-time offers for existing users. To avail these offers, users just have to register the IMEI details of their smartphones on the portal and get shopping.

Commenting on the launch, Vikas Agarwal, General Manager – India, OnePlus said, "We are very excited to bring the globally acclaimed OnePlus shopping experience to our fans in India. With the new platform, our users will find it easier to purchase genuine OnePlus products and fan merchandise, right from the comfort of their homes. The e-commerce platform marks yet another major milestone in our India journey and reiterates our long term commitment towards the Indian market and our fan community here. "

OnePlus has always focused on providing the best services to the OnePlus community by opening several service centers and tying up with brands having similar synergies. OnePlus has active social media handles that make it easier for fans to reach out to OnePlus with their feedback.



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

How to return a Galaxy Note 7 bought second-hand

samsung galaxy note 7 review aa (16 of 20)

Samsung and several carriers and retailers in the US started exchanging potentially dangerous Galaxy Note 7 units earlier this week. The move followed the Korean phone maker's decision to halt the Note 7 production after its battery fiasco went beyond Samsung's control. But what about those who've purchased a second-hand or used Note 7? Well, worry no more, Samsung isn't leaving you out in the cold.

LG V20 vs Samsung Galaxy Note7 Quick Look-2Don't miss: Returning your Galaxy Note 7? Here are some other great Android phones you should check out96

Even though it was only released last month, the flagship has been out long enough that it's hard to rule out the possibility of second-hand Galaxy Note 7s floating around. So if you've bought a used Note 7, chances are that you can't go back to the original owner and have your phone swapped for a replacement handset. Fortunately, there's a straightforward way for you to return your device direct to Samsung.

In a press statement, Samsung advises customers to contact the company directly:

Any customer who bought a Note 7 [used] should contact us directly at 1-844-365-6197 to exchange their device. We are working as quickly as possible to make the service experience for our customers as quick and smooth as possible and we are grateful to our Note 7 customers for their patience during this time.

The same policy that Samsung implemented during the recall process in September applies here. Also, you can swap out your second-hand Galaxy Note 7 for a Galaxy S7 or Galaxy S7 Edge even without an official receipt of sale or warranty. However, be sure to power down the handset before returning it to Samsung.

samsung galaxy note 7 review aa (5 of 20)See also: Samsung Galaxy Note 7 review (updated)119

Have any of you purchased a second-hand Galaxy Note 7? If so, give Samsung a call now and get your replacement phone. If you've done this already, let us know in the comments how the process went.



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

AndroidN-ify brings Google Assistant to Marshmallow devices

Google Assistant Functions 2

Thanks to the magic of AndroidN-ify, Xposed and one Max Rumpf, it's now possible to use Google Assistant with Android Marshmallow devices.

Google Assistant was unveiled alongside Google Allo earlier in the year and it takes the Google Now technology to the next level, with a 'conversational' interface allowing for multiple follow-up questions and a deeper level of interactivity. It's available now on the Google Pixel but, disappointingly, Google recently confirmed that it would be exclusive to Pixel devices, at least for the time being. 

That was until Mr Rumpf started messing with the Google app code. After making some changes and implementing it into the AndroidN-ify Xposed module, Google Assistant is now fully functional on Android Marshmallow devices, albeit with a few bugs.

Google Allo Google AssistantSee also: Google Assistant: The top features you should know24

Xposed is a tool for root users which allows them to customize the system and UI. The framework allows different modules to be installed to change the Android experience, modules like AndroidN-ify, which is being developed to bring Android Nougat features to Lollipop and Marshmallow.

Xposed is powerful but user-friendly. However, it does require a custom recovery and a rooted phone, which is still a barrier for many users. If you do want to give this a try, head to the AndroidN-ify GitHub page



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

How to create an SMS app part one – sending and receiving messages

P1000210

Remember when phones were just phones? While you might use your Android device for pretty much anything but sending and receiving text messages most of the time (even to the point of preferring WhatsApp and other tools for written communication); SMS is still technically one of your phone's primary uses at heart. And with that in mind, this is still a fundamental skill for us to learn as developers.

In this two-part tutorial, we will look at how you can go about creating a basic app that will send and receive SMS content, as well as how to retrieve messages from the inbox and navigate Android's new permissions system. In part two we'll explore how to work with background services and categorize our messages…

Note: You can get the full source code from GitHub here and I highly recommend looking through it as you read. This is a slightly more complicated project and so it will help to have it there in front of you while you read.

The basics

Like the last tutorial (how to build an image gallery app), I will be jumping into this assuming that you have a basic familiarity with Android Studio and Java. If that is not the case, then I invite you to check out this post on getting started with Android development and this post on creating a very basic Android app. And also check out Gary's Java tutorial here. With that out of the way, let's get down to business!

First, we're going to create a new project using an empty activity as our starting point. Once that's ready, head over to the activity_main.xml and use the design view to drag and drop your UI. This will utilize three elements: a ListView for showing our messages, an EditText for editing new ones and a send button for sending them. Space these out nicely and maybe add a splash of color. I will leave that in your capable hands.

hint 2

So that you can follow along in the code, I gave these the ids: messages, input and send.

Next, we're going to need to add some things to our Android Manifest, so that our app has permission to get and send messages:

  <uses-permission android:name="android.permission.READ_SMS" />  <uses-permission android:name="android.permission.SEND_SMS" />  <uses-permission android:name="android.permission.RECEIVE_SMS" />  

Ah, if only it were that easy though…

Fun with permissions

What's great news for Android users is that Android 6 comes with some new rules for permissions. Specifically, apps that could potentially be harmful to your privacy now also need to request permission at runtime, meaning that users will be shown a dialog asking if they indeed want to allow apps to do things like accessing their SMS messages.

Screenshot_20161012-011425-16x9-720p

While extra security is good news for users, it's a royal pain for developers as it means we now need to go through extra steps to access basic functionality. Specifically, we need to bring up our runtime permission request. To do this, we're going to need to make two new methods:

  private static final int READ_SMS_PERMISSIONS_REQUEST = 1;    public void getPermissionToReadSMS() {          if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_SMS)                  != PackageManager.PERMISSION_GRANTED) {              if (shouldShowRequestPermissionRationale(                      Manifest.permission.READ_SMS)) {                  Toast.makeText(this, "Please allow permission!", Toast.LENGTH_SHORT).show();              }              requestPermissions(new String[]{Manifest.permission.READ_SMS},                      READ_SMS_PERMISSIONS_REQUEST);          }      }    @Override  public void onRequestPermissionsResult(int requestCode,                                         @NonNull String permissions[],                                         @NonNull int[] grantResults) {      // Make sure it's our original READ_CONTACTS request      if (requestCode == READ_SMS_PERMISSIONS_REQUEST) {          if (grantResults.length == 1 &&                  grantResults[0] == PackageManager.PERMISSION_GRANTED) {              Toast.makeText(this, "Read SMS permission granted", Toast.LENGTH_SHORT).show();              refreshSmsInbox();          } else {                   Toast.makeText(this, "Read SMS permission denied", Toast.LENGTH_SHORT).show();                  }            } else {              super.onRequestPermissionsResult(requestCode, permissions, grantResults);          }      }  

What's happening here, is that we're checking to see whether the permission is granted already and if it's not, we're checking whether we need to explain the situation to the user. If so, then we're displaying a toast message and either way, we're then actually doing the asking.

permission

We handle the response via onRequestPermissionResult. Our toast message confirms the answer and if it is positive, we're then using our next new method, refreshSmsInbox. We only want to launch this once we're sure that our permission has been granted, otherwise it will end in tears. The good news is that older versions of Android don't need these hijinks but if you want to future-proof your app, you're going to need to give this a go.

Note: Remember to import classes as you need them! If code appears in red, select it and press ALT+ENTER to find the option.

Displaying messages

Our onCreate is going to look like so:

  public class MainActivity extends AppCompatActivity {        ArrayList<String> smsMessagesList = new ArrayList<>();      ListView messages;      ArrayAdapter arrayAdapter;      private static final int READ_SMS_PERMISSIONS_REQUEST = 1;        @Override      protected void onCreate(Bundle savedInstanceState) {          super.onCreate(savedInstanceState);          setContentView(R.layout.activity_main);          messages = (ListView) findViewById(R.id.messages);          input = (EditText) findViewById(R.id.input);          arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, smsMessagesList);          messages.setAdapter(arrayAdapter);          if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_SMS)                  != PackageManager.PERMISSION_GRANTED) {             getPermissionToReadSMS();          } else {             refreshSmsInbox();     }  }  

This is initializing an ArrayAdapter, finding our messages ListView and setting the latter to display the former. In short, it means that messages is going to display arrayAdapter – which we're going to use to make our inbox messages presentable.

Screenshot_20161012-012957-16x9-1080p

So all that's left is to actually get those messages. That's why we're grabbing permission right when the app launches and then if that all goes smoothly, heading over to refreshSmsInbox. And if the user has previously run the app, then we'll be able to see that the permission is already granted and skip that stage. Once we get to refershSmsInbox, it looks like so:

  public void refreshSmsInbox() {      ContentResolver contentResolver = getContentResolver();      Cursor smsInboxCursor = contentResolver.query(Uri.parse("content://sms/inbox"), null, null, null, null);      int indexBody = smsInboxCursor.getColumnIndex("body");      int indexAddress = smsInboxCursor.getColumnIndex("address");      if (indexBody < 0 || !smsInboxCursor.moveToFirst()) return;      arrayAdapter.clear();      do {          String str = "SMS From: " + smsInboxCursor.getString(indexAddress) +                     "\n" + smsInboxCursor.getString(indexBody) + "\n";          arrayAdapter.add(str);      } while (smsInboxCursor.moveToNext());  }  

This time it is relatively simple: we're using the Uri to get messages from the inbox and we're grabbing the body and address. We're using the cursor to go through each message, combining those two elements into a string (over two lines – '\n' means new line) and then populating the ListView with them. This now gives us a list of literally all our messages, which isn't exactly conventional for a messaging app… but hey ho!

Sending messages

Sending messages is thankfully going to be even simpler and partly this is because permissions in Android are organized as groups. If you request permission for one thing in the group, then you automatically gain permission for all actions in that group (which does present some security issues, actually). In this case, because we asked for permission to view our user's messages, that means we don't need to ask for permission again in order to send them!

Screenshot_20161012-012939-16x9-720p

Thus, we can use a simple onClick on our button and then send our messages:

  EditText input;  SmsManager smsManager = SmsManager.getDefault();    public void onSendClick(View view) {       if (ContextCompat.checkSelfPermission(this, Manifest.permission.SEND_SMS)                                != PackageManager.PERMISSION_GRANTED) {         getPermissionToReadSMS();     } else {         smsManager.sendTextMessage("YOUR PHONE NUMBER HERE", null, input.getText().toString(), null, null);         Toast.makeText(this, "Message sent!", Toast.LENGTH_SHORT).show();     }  }  

I recommend adding your own number for now. This bit really is that simple, which makes a nice change!

Intercepting messages

It wouldn't be a very good SMS app if you had to refresh it every time you got a new message though! And that's why we need to be able to intercept incoming messages too. To do this, we first need to add a bit of code at the start of our MainActivity.java. This will help us to communicate between classes and should look as follows:

  public static MainActivity instance() {      return inst;  }    @Override  public void onStart() {      super.onStart();      inst = this;  }  

Now we need to create a new Java Class, called SmsBroadcastReceiver. This is going to contain the following code:

  public class SmsBroadcastReceiver extends BroadcastReceiver {        public static final String SMS_BUNDLE = "pdus";        public void onReceive(Context context, Intent intent) {          Bundle intentExtras = intent.getExtras();                if (intentExtras != null) {              Object[] sms = (Object[]) intentExtras.get(SMS_BUNDLE);              String smsMessageStr = "";              for (int i = 0; i < sms.length; ++i) {                  String format = intentExtras.getString("format");                  SmsMessage smsMessage = SmsMessage.createFromPdu((byte[]) sms[i], format);                    String smsBody = smsMessage.getMessageBody().toString();                  String address = smsMessage.getOriginatingAddress();                    smsMessageStr += "SMS From: " + address + "\n";                  smsMessageStr += smsBody + "\n";              }                MainActivity inst = MainActivity.instance();              inst.updateInbox(smsMessageStr);          }      }  }  

This will spring into action whenever a new SMS is received (as long as the app is open) and will then look at the data that's coming in and arrange it into a useful string made up of who the message is from and the actual content. just like before.

P1000211

And finally, you need to add this to your manifest, inside the application tag but outside the activity tag.

  <receiver android:name=".SmsBroadcastReceiver" android:exported="true" >      <intent-filter android:priority="999" >          <action android:name="android.provider.Telephony.SMS_RECEIVED" />      </intent-filter>  </receiver>  

As you used your own number to send the SMS, you'll find that any messages you send should automatically appear in your ListView, confirming that this has all worked just nicely. Or not. That is definitely also possible…

Next time: making this into a useful app

You now have a fairly functional SMS app, that will allow you to view all the messages on your phone and send new messages to yourself. Super useful…

Next time, we'll look at turning this basic building block into something we can actually use. To do that we will need to setup the app so that it is constantly on the lookout for new messages, so that it doesn't have to be open to work. We'll explore how to use background services to that end.

We'll also be tidying up the UI, categorizing messages by sender and letting the user decide who the recipients for their messages should be. Maybe we'll add some contact icons as well, rather than just having a wall of text.

P1000213

By doing all this, we will hopefully be able to build a fully functional messaging app just like the one that came pre-loaded on your phone. From there, you can head off and give it your own flare. But why stop there? Why not veer off the beaten path and try something completely different? How about building a tool for organizing your SMS messages? Or for backing them up? What about a private one-to-one messaging service that deletes the messages immediately as you send them to a single person in your inbox? There are loads of options, so get inventive!

For now, hopefully this has given you an introduction to some basic concepts that you can bring to your next project, whether that's an SMS app or something else entirely. Next time, we'll expand those concepts into something fully functional. See you then!



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

mercredi 12 octobre 2016

Crap! I’m Broke! is essentially a millennial simulator (UPDATE: now available!)

Update, October 12 – Ready to survive the harsh reality of living with scarce resources? Crap! I'm broke: Out of Pocket is now available from the Google Play Store. It is not a free game, though. You will have to pay $1.99 for it. Go get it!
Download Crap! I'm Broke: Out of Pocket

Original, Octover 5 – A new game is heading to the Google Play Store next week going by the name of "Crap! I'm Broke!" It's a tongue-in-cheek life management simulator in which resources are scarce, rewards are doled out in disproportionately scarce amounts, and everything can fall apart at a moment's notice. And yet somehow, you're having a good time laughing at the futility of your own situation all along. It's basically the general millennial experience distilled in mobile game form.

What makes Crap! I'm Broke! entertaining rather than frustrating is the pervasive sense of ironic humor matched with a jazzy soundtrack and minimalist graphics. Shoved out into the "real world" with not much to go on, it falls to you to find a job no matter how little it pays, be it fry cook or human statue. Stay on the prowl for "Help Wanted" signs while grinding through your day job for lackluster pay and fending off your bills and trying to eat enough food to stay alive.

Never Alone best platform games for androidSee also: 15 best platform games for Android

Your bills bar and hunger meter are constantly decreasing, so you have to keep your wits about you to keep going. Do good enough, and you might even get "Employee of the Month," which unlocks a new set of challenges and potential bonuses.

All of the games possible jobs come with intriguing little mini games to get you through their respective work days. The game's "karma" system is surprisingly complex, and short term disadvantageous decisions made for the greater good can come back later as a boon.

What's particularly refreshing about Crap! I'm Broke! – in addition to it being delightful social satire – is that it's a whole game that you get for forking over $1.99. There are no in-app purchases, ads, or additional content to pay for. In a world besieged by the Free-to-Play model, this is a pretty nice change of pace.

Stay on the lookout for Crap! I'm Broke! This will probably be one you won't want to miss. The game will arrive in the Google Play Store on Tuesday, October 11th. Let us know what you think about the premise in the comments below!

Fallout Shelter best simulation games for AndroidNext: Best simulation games for Android40


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

Google Photos will rotate awkward sideways pictures for you

Screen Shot 2016-10-12 at 20.56.45Google

Google is always looking to improve Google Photos – a cloud-based app that lets you store unlimited images and videos (for free if 16 megapixels). With the latest update, Google Photos will bring you more meaningful throwbacks, more action-packed animations, and suggested rotations for awkward sideways photos.

best cloud storage apps for androidSee also: 10 best cloud storage services and apps for Android of 201622

I love using Google Photos – I take lots of photos with my Galaxy S7 edge, and I rarely film super high quality videos. That means Google will let me store all my images and videos on its cloud-based app for free. And it even lets me free up my device storage by automatically deleting stored media. The app also has some nifty features like "Rediscover Your Memories" – kind of like Facebook's "On This Day" throwback feature – and "Animation," where it takes your photos and creates a GIF-like file for you.

Well, with the latest update, Google Photos is getting a lot smarter. The app will now recognize faces that appear frequently in your recent photos and videos and try to bring back memories with those people in them. For instance, if it sees a lot of recent photos with you and your boyfriend, it will bring back old photos of you two together when you were awkward teenagers in a budding relationship.

Google Photos is getting a lot smarter. The app will now recognize faces that appear frequently in your recent photos and videos and try to bring back memories with those people in them.

It will also give you highlights of your favorite people: if it notices that you've been taking lots of pictures of your baby, it will aggregate the best photos of your baby and show them to you as recent highlights. In terms of its "Animation" feature, Google now looks at your videos as well – especially action-packed videos – and creates the best short animations for you to share.

The feature that I'm most excited about is, however, the suggested rotation feature. I hate it when my phone takes photos in the wrong orientation, and it happens more than you think. It's kind of a hassle to go into edit mode and rotate them individually. Google Photos now suggests rotations for those annoying sideways photos – all you have to do is review the suggested photos and then click one button, and the app does everything for you!

Are you a fan of Google Photos? What features would you like to see in the future? Let us know by leaving a comment down below!



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

Samsung Galaxy S7 owners are getting reminders their phone is not being recalled

samsung galaxy s7 review aa (4 of 20)

Samsung Galaxy S7 owners are reportedly getting direct notifications on their phones reminding them that the devices are not under the same worldwide recall program that is currently underway for the Galaxy Note 7.

The report comes from TechnoBuffalo, which states that one of its staff members saw the following message appear on his Galaxy S7:

galaxy-s7-no-recall-message

The message clearly is meant to inform Galaxy S7 owners, and also perhaps to reassure them that their phone is most likely not going to explode on them like a number of Note 7 smartphones have over the past month. Samsung might think that some Galaxy S7 owners could confuse their phone for the Note 7 because both have a "7" in their branding, even though the Galaxy S7 was first released several months ahead of the Note 7.

Samsung Galaxy Note 7 (Notetaking)-15See also: Guide for returning Samsung Galaxy Note 7 in the USA14

Samsung certainly doesn't want Galaxy S7 owners to return or exchange their phones for something else out of sheer confusion. The company has already cut back its profit forecast for the third quarter of 2016 from 7.8 trillion won (about $7.0 billion)  down to 5.2 trillion won ($4.6 billion) due to the Note 7 recall. Some financial analysts are predicting the revenue loss for Samsung could be as high as $17 billion. Those predictions could get even worse if S7 owners think their phones could blow up as well.

If you own a Galaxy S7, or perhaps a Galaxy S7 edge, have you seen these new push notification messages from Samsung? If so, do you think this is overkill on its part or is Samsung just trying to hold onto its current customers?



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