Thứ Ba, 20 tháng 9, 2016

HELPING YOU SURVIVE WITHOUT THE INTERNET BY SOME BEST OFFLINE APPS


Although mobile data and Wi-Fi are easier to come by than ever, there are still times (on holiday, the end of the month) when you're in the e-dark and in need of an app that works offline. In other cases, it might be a matter of privacy. On Android there are loads of great apps that function just as well offline as on. These are the best offline Android apps, now updated with our favorite offline note-taking app.

1. Best offline weather app: AccuWeather
There is no such thing as a truly offline weather app. Like the other apps on our list, you need to use AccuWeather online at some point. 
However, AccuWeather wins our favor for this list because it provides an accurate 15-day forecast, which means that even if you are without internet for two weeks, you should still have some indication of whether you need a sombrero or a ski mask for your trip outside.
What's more, it does so in an intuitive package which takes just seconds to get to grips with.

2. Best offline eBook reader app: Amazon Kindle
eBook reader apps make excellent offline apps because they can keep you occupied for hours without needing to reconnect to the internet. Kindle is one of the best, not just because it gives you quick access to thousands of digital books, but also because it comes with all of the options you need for an excellent reading experience.
Buy a book (or pick up a free one), download it to your device, and then you can happily read it without ever connecting it to the internet again. Google Play Books is a similar alternative, but the occasional syncing problems I've experienced means it's my second choice.

3. Best offline travel app: TripAdvisor Hotels Flights
TripAdvisor is the rightful king of travel apps. Supported by a thriving community, it offers reviews, photos and feedback from fellow travellers, then ranks attractions and activities based on what those people say.
TripAdvisor used to have dedicated City Guides which could be downloaded externally, but now all of this functionality is baked into the one app, including offline access to reviews, maps and photos of more than 300 cities.
If you’re travelling, you shouldn’t be without TripAdvisor Hotels Flights.

4. Best offline documents app: Google Drive
No, we haven't gone mad. Despite Google Drive being one of the leading cloud storage services in the world (i.e. storing all your files online), it also lets you download files and documents to your device. You can then work on these files offline, and they sync straight back up into the cloud when you get internet again.
To do this, tap the 'i' or Options icon of a file in Google Drive, then tap the switch next to Keep on Device. You can do this to as many files as you like, and Google Drive will let you work on them away from the cloud.

5. Best offline app for saving things for later: Pocket
Pocket is one of the most popular offline reading apps on the Play Store. You can use it to download articles, videos, and other content you find online to your device, then read it offline later. You simply click on the share button on the article you want to save and select Pocket to read it later.
It has a beautifully designed interface and is a great way to make sure you don't miss out on content that you didn't manage to finish reading or watching the first time round.

6. Best offline dictionary app: Offline Dictionaries
If you're in a foreign country and don't speak the language, it's crucial that you have a means of communicating with locals. Offline Dictionaries is a free Android app that sets itself apart from the others thanks to its large database of synonyms and support for more than 50 languages.
Upon launching the app, you download all the languages you'll want to refer to, then refer to the app freely without having to worry about internet connectivity.

7. Best offline translation app: Google Translate
Google Translate is one of the easiest-to-use and most effective translators out there. You can speak or type into Google Translate to get things translated into more than 90 languages.
These key features are available offline, so long as you download the languages you're looking to translate between. You can save your translations as well, so you can refer back to them later.

8. Best offline map app: Google Maps
Using the old version of Google Maps offline was a little awkward, but since its most recent update, this functionality is better than ever. It's easy to download a by visiting the Offline areas tab in the settings menu. From there you can download full city maps, including Google's excellent navigation system, for use without internet.
The best part of all, any maps downloaded in your offline areas will be automatically removed after 30 days, so there's no need to worry about unused apps taking up storage space unnecessarily. 

9. Best offline music app: Spotify
Not only does the Spotify app give you access to millions of tracks, but you can set it to sync your playlists in the background, meaning all your music is automatically available when you’re offline. What’s more, it’s easy to assign all of that music to a microSD card if you don’t want it taking up space in your phone’s internal storage.
The premium subscription to Spotify will cost you US$9.99 per month, but it's one of the coolest services around. There's nothing better than saving a couple of albums to your device while using the airport cafe Wi-Fi just before a flight.

10. Best offline podcast app: Pocket Casts
You may associate podcasts with online streaming, but you can also download all your favorite podcasts, giving you endless hours of listening pleasure. Pocket Casts is one of the best apps for doing this, letting you search for hundreds of thousands of podcasts across the internet, then downloading them to your device.
Pocket Casts allows you to automate downloads from your subscriptions so that, once you've decided what you want to be listening to, episodes will be downloaded in the background whenever you have access to Wi-Fi (or mobile data, if you're OK with that). 
Developer ShiftyJelly is clearly very smart – it's created an efficient, intuitive app which does everything you could ask for.

11. Best offline note-taking app
The closest you can get to a trusty pen-and-paper duo on Android is a good offline note-taking app. There are plenty out there; indeed, we have a dedicated best note-taking apps list, but my personal favorite is Monospace. It's a wonderful, minimalist tool that offers very basic functionality at a very high level. There are text-formatting options like bold and italics, but otherwise it's very bareboned.
Check out to read some news about game of thrones and online games for kids

Thứ Bảy, 17 tháng 9, 2016

ABOUT SAMSUNG GEAR 360


HIGHS
Works seamlessly with S7/S7 Edge, Gear VR
Captures good-quality 360-degree photos, videos
Bright f/2 lens
Solid, water-resistant construction
Easy to use

LOWS
Only works with select Samsung phones
Misaligned stitching
Hefty, awkwardly round

Samsung is a leader in virtual reality. It’s already on its second version of the Gear VR headset – viewing goggles that let you experience immersive 360-degree content with select Samsung phones.

Previously, we could only consume VR content, but a new crop of 360-degree cameras allow anyone to become content creators. And the latest option comes from, of course, Samsung. Gear VR owners won’t just get to watch content, they can now film it, too.

The Gear 360 ($350, available August 19) camera is the third piece of the Galaxy VR trifecta – the phone plays content, the headset lets you view it, and, now, the camera lets you create it. Samsung has engineered a solid camera that works really well with the Gear VR and Galaxy Note 7/Galaxy S7/S7 Edge series – so well that it’s almost seamless. But in perfecting this synergy, Samsung has made the Gear 360 useless if you aren’t a Galaxy 7 owner.

Design, specs, and features
Nothing about the Gear 360 has changed since our hands-on time during Mobile World Congress. The round camera is roughly the size of a billiard ball, and, at 5.4 ounces, weighs the same too. In our first-impression, we thought the camera would be easy to carry, and while that remains mostly the case, it does have a bit of heft. It is an ounce heavier than Ricoh’s Theta S and twice the weight of LG’s 360 Cam.

The camera looks like a large eyeball that our hands-on reviewer deemed cute. The camera isn’t a perfect sphere, due to the covers over the two lenses that protrude out slightly – similar to any small camera with fish-eye lenses. Each fish-eye lens can independently shoot a 195-degree wide-angle field-of-view (like an action cam), or a 360-degree image when the two are used simultaneously. Each lens has a bright f/2.0 aperture, which in theory would give it better low-light performance; in comparison, the Theta S lenses also have an f/2.0 aperture, while the 360 Cam’s have an even brighter f/1.8.



It’s hard to differentiate, but the lenses are actually designated as front and rear. The front lens is the one that’s adjacent to the small status LCD that shows mode (video, photo, video loop, and time-lapse) remaining storage capacity, battery life, and Bluetooth on/off. On both sides of the front lens are two pinhole microphones; near the rear lens are a speaker and an NFC tag. At the top is the shutter butter. On one side you’ll find the Bluetooth/Menu and Power/Back buttons, and on the other side is a compartment for the removable battery (1,350mAh), Micro SD card slot (support for up to 128GB), and Micro USB port. While the battery has a small capacity, you can easily swap it out for a fresh one, which you can’t do with LG and Ricoh’s cameras.

Compared to the Theta S and 360 Cam, which opt for slim profiles that make them easy to hold, the Gear 360 went for a bulbous design, which is why Samsung includes a mini tripod that screws into the bottom of the camera. With the legs folded, it doubles as a grip. You can hold the camera with your fingers or set it on a surface. However, during testing we found we preferred using larger handheld tripods (we used the Manfrotto Pixi and the PolarPro Trippler) that provide a firmer grip. If you’re shooting a room for, say, real-estate purposes, you may want to use a full tripod, as keeping it stationary will help it capture sharper photos, while allowing you to place the camera much higher above ground. Still, a tripod is a nice inclusion.

Inside the camera are two 15-megapixel 1/2.3-inch CMOS sensors capable of recording a 360-degree video with an almost-4K resolution of 3,840 x 1,920 pixels at 30 frames per second (fps); in single camera mode the Gear 360 shoots video at 2,560 x 1,440. Spherical still photos are taken at 30 megapixels (7,776 x 3,888) when in dual-camera mode, but 5 megapixels (3,072 x 1,728) in single-camera mode.

The Gear 360 is constructed well. A benefit is that it carries an IP5 rating for dust and water resistance. No, it’s not waterproof (i.e., don’t swim with it), but a light splash of water from the pool or rain shouldn’t hurt it.

Comfortable, but awkward
The form-factor makes it difficult to place inside clothing pockets. Even if you manage to shove it into a coat pocket, the weight is just heavy enough to drag it down. Unlike the 360-degree cameras from Ricoh and LG, you really need to carry the Gear 360 in a case or bag.

Like competing cameras, the Gear 360 is designed to be easy to use, and can operate independently. Simply turn on the camera by holding down the power button for a second, cycle through the modes by pressing the menu button, press the shutter button, and you’re on your way to shooting 360-degree videos, photos, time-lapses, or looping videos (it can overwrite older videos when memory card become full). You can also make basic adjustments in the Settings menu, like viewing the battery status or changing from dual camera to single camera, video and photo size, and time-lapse interval and countdown timer.
Check out to read some news about game of thrones and online games for kids

Thứ Sáu, 9 tháng 9, 2016

Get your apps ready to doze in Android


Have you ever put your Android smartphone or tablet to one side, only to come back to it a few hours later and discover that it’s burnt through way more battery power than you were expecting?

By default, Android devices receive information updates constantly – emails, social media messages, notifications from apps, syncing with your Google account and so on. So even if you don’t interact with a device for an extended period of time, when you do eventually pick your smartphone or tablet up you’ll find that it’s bang up to date. However, there’s a point where this convenience isn’t worth the battery drain – no-one enjoys waking up in the morning to find their smartphone is now on 10% of battery because it spent the past 8 hours performing background work, while you were fast asleep.

Android 6.0 and higher attempts to strike a perfect balance between ensuring your smartphone or tablet is always relatively up to date (even if you haven’t interacted with it for a while) without burning through unnecessary amounts of battery.

This new feature is known as Doze mode, and in this article we’re going to look at how to update your apps, to make sure they place nicely with this new feature.
What is Doze Mode?
In the pre-Doze world, Android apps pretty much had free reign to perform whatever work they wanted in the background. While this was good for developers, who could create apps safe in the knowledge that said apps would be able to perform tasks whenever they needed (even if it meant waking an inactive smartphone or tablet) it wasn’t such good news for the end-user who found themselves constantly needing to recharge their device.

Enter Doze.

When a device is unplugged, stationary, and the screen turned off, Doze mode will eventually kick in and put the the device into a sleep state – hence the name Doze, as the device is essentially taking a power nap.


When a device is in Doze mode the system applies a range of battery-saving restrictions to all the apps on that device, as well as the device in general. For the duration of Doze mode, your app won’t be able to access the network, run sync adapters, fire standard alarms, run scheduled jobs, or acquire wakelocks. Think of Doze as an automatic flight mode – and we all know how much longer our battery lasts in flight mode!

As soon as a device no longer meets Doze’s list of criteria (for example the user moves the device or connects a charger) the system will exit Doze and all apps can resume normal activity.

If an app does try to perform tasks during Doze mode, the system will group all these tasks and batch execute them as soon as the device exits Doze, or during a scheduledmaintenance window.

Maintenance Windows

Imagine you put your Android smartphone or tablet down and don’t touch it at all for a few hours (it’s a stretch, I know). That device will eventually enter Doze mode, and from that point onwards it’s pretty much in a state of suspended animation. When you do finally pick the device up again, all of your apps are at least a few hours out of date – not exactly a great user experience!

To ensure that Doze’s battery savings don’t come at the cost of the user experience, Android exits Doze for regularly scheduled maintenance windows. A device will resume normal operations during these windows, giving your app a chance to run all its deferred activities. At the end of each maintenance window, the device will re-enter Doze. When a device first enters Doze, these maintenance windows occur pretty frequently, although they do occur less frequently the longer a device is in Doze mode.

And this was pretty much all your needed to know about Doze mode and its maintenance windows – until Android 7.0 came along and added the disclaimer that a device didn’t necessarily have to be stationary, in order to Doze.

Doze on the Go
When you think about it, an Android smartphone or tablet is rarely stationary. Your Android device probably spends a good chunk of its time in your pocket or bag, where it’s going to get jostled around so much that it’s unlikely to doze at all.

That’s why Android 7.0 introduced ‘Doze on the go,’ a new tier of Doze mode that applies a subset of the regular, ‘deep-Doze’ restrictions when the device is running on battery power and the screen is turned off, but Doze is still detecting movement. This lightweight version of Doze ensures that users can benefit from Doze’s battery saving features, even when they’re on the go (hence the name!)

If a device’s conditions change while it’s dozing, that device may move between these two versions of Doze. So, if a device in Doze-light mode remains stationary for an extended period of time, then that device may sink into deep-Doze. At the other end of the scale, if a device in deep-Doze mode detects movement, but the screen remains off and the device is still unplugged, then it’ll enter Doze-light mode, rather than exiting Doze completely.

The good news is that the recommended best practices are the same regardless of how deeply a device is dozing, so we can cover optimizing your app for both tiers of Doze, in one fell swoop.

Optimizing your Apps for Doze
By this point, you may be wondering how any app can provide a good user experience if it can’t perform essential background work whenever it needs to. While it’s true that Doze temporarily prevents applications from performing background activities, Doze is designed to have a minimal impact on your app’s performance.

Maintenance windows crop up pretty frequently when a device first dips into Doze mode, and only start to occur less frequently when the device has been dozing for a while (the assumption is that the user has either left their device somewhere, or they’ve left it unplugged overnight and are actually fast asleep).

If your app has to wait a little longer in order to perform deferred work, then this isn’t going to have a huge impact on the user experience – especially if the user is either nowhere near their device or it’s the middle of the night and they’re fast asleep.

However, there are some instances where you may need to make specific changes to your app, in order to provide a better Doze experience. In this section, I’ll look at two features that Doze is known to interfere with, and the workarounds you’ll need to use if your app includes these features. I’ll also share one final trick you can resort to, just in case Doze completely breaks your app and you need a get-out clause from Doze’s restrictions!

Receiving Messages in Doze Mode
If you’re developing a messaging app, or an app that has some form of messaging functionality, then chances are your users aren’t going to be too thrilled when your app doesn’t notify them about important messages straight away, just because their device happened to be dozing when these messages were sent.

To make sure your app never fails to notify the user about an incoming message, you can use either Google Cloud Messaging (GCM) or Firebase Cloud Messaging (FCM). Both of these services have the power to push messages to a dozing device, as long as you mark those messages as high-priority.

When your app is in Doze mode, standard AlarmManager alarms get deferred until the device enters its next maintenance window, or the device exits Doze completely.

GCM and FCM attempt to deliver high-priority messages immediately. If your app receives a high-priority message during Doze, the system will wake the device and grant your app temporary network services and partial wakelocks so it can notify the user (just resist the temptation to use these temporary privileges as an excuse to perform work that really could have waited until the next maintenance window).

While it’s easy to assume that everything your app does is important, waking a device from Doze mode will always have an impact on that device’s battery, so you should only use this technique for messages that are truly time-critical.

Unless you have a good reason for marking a message as high priority, you should assume that all your message have the default priority. Messages marked as “normal” won’t interrupt Doze mode, and will be delivered as soon as the device either enters a maintenance window or exits Doze completely.

Sounding the Alarm in Doze
Alarms are the other major feature you may need to adjust for Doze mode, so if you’re developing an alarm app, or an application that has some form of alarm functionality, then this section is for you!

When your app is in Doze mode, standard AlarmManager alarms get deferred until the device enters its next maintenance window, or the device exits Doze completely. This presents a problem, as it’s likely your users are going to ooh and aww over how little battery your app uses if they wind up getting into the office hours late because your app didn’t sound their morning alarm when it was supposed to.

To create alarms that are immune to Doze, you’ll need to use one of the following AlarmManager methods:


  • setExactAndAllowWhileIdle. Use this method to create an alarm that executes in Doze mode at exactly the time specified.
  • setAndAllowWhileIdle. Use this method if you need to be confident that an alarm will execute in Doze mode, but it’s not crucial that this alarm fires at exactly the time specified. This may sound strange (surely the whole purpose of an alarm is that it goes off at a particular time?) but there’s a few instances where you might want to use this method, rather than setExactAndAllowWhileIdle. For example maybe you’re building an app that alerts the user to bank holidays and other important events, or an app that presents the user with a ‘To Do’ list at the start of each day. In these scenarios, is it really crucial for the alarm to fire at exactly the time specified?

Note, setAndAllowWhileIdle and setExactAndAllowWhileIdle are only available in Lollipop and higher.

Bear in mind that if your app wakes a device then it’ll have an impact on that device’s battery, so you should only use these new methods if the benefits outweigh the potential battery hit of waking a dozing device.

If you suspect an alarm can wait until the device exits Doze mode or enters a maintenance window, then you should use the standard set() and setExact() instead.

Requesting access to the whitelist

Doze shouldn’t have a huge impact on most apps. Even if your app performs lots of background work then this work won’t be ignored, it’ll simply be deferred until the next maintenance window or until the device exits Doze (whichever comes first). And if you do need to make some explicit changes to your project in order to provide a better Doze experience, then most of the time this will be restricted to using GMC/FCM for time-sensitive messages, and using the new AlarmManager classes for important alarms.

However, occasionally Doze may break an app’s core functionality, for example if you’re developing a task automation app, then this app may hinge on being able to perform tasks when the user isn’t interacting with their device. Alternatively, you may be developing a messaging app that can’t use GCM or FCM for technical reasons.

If your app falls into either of these two very specific use cases, then you may need to request that the user adds your app to their ‘whitelist,’ at which point it’ll be exempt from Doze’s restrictions.

Users can build their own whitelist at any point, simply by opening their device’s ‘Settings’ app, followed by ‘Battery’ and ‘Battery Optimization,’ finding the app(s) they want to add to their whitelist, and then setting that app’s switch to ‘Off.’

However if Doze mode breaks your app, then you should take a more proactive approach and explicitly request that the user adds your app to their whitelist. You have two options:


  • Firing the ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS intent. This launches the device’s ‘Battery Optimization’ screen, ready for the user to (hopefully) add your app to their whitelist.
  • Adding the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission to your project. This will trigger a system dialogue prompting the user to disable battery optimizations for your app, at which point your app will be exempt from Doze’s restrictions.

You can check whether your app has made it onto the user’s whitelist at any point, by calling the isIgnoringBatteryOptimizations method.

Testing your app in Doze mode
The final step is testing how your app behaves in Doze, including ensuring that your app makes the most out of the mode’s maintenance windows, and that your app recovers gracefully once the device exits Doze.

Rather than waiting for your device to slip into Doze mode naturally, you can cut to the chase and use adb commands to send a device into deep sleep in an instant.

The most effective way of testing your app’s Doze performance, is to use an Android Virtual Device (AVD) that’s running Android 6.0 or higher. You can then use the emulator tools to simulate different events that may occur while your app is subjected to Doze’s restrictions, for example if you’re developing a messaging app you should simulate your app receiving messages in Doze mode.

Make sure the app you want to test is installed on your AVD, then open a Terminal (Mac) or Command Prompt (Windows) and changing directory (‘cd’) so it’s pointing at your Android SDK’s ‘platform-tool’s folder, for example:

cd /Users//Library/Android/sdk/platform-tools

Make sure the app you want to test is running, then turn the AVD’s screen off and simulate the device entering Doze mode by running the following adb commands:

adb shell dumpsys battery unplug

This tells the AVD to assume it’s been unplugged from a power source.

adb shell dumpsys deviceidle step

This command takes the device through the various states it needs to sink through, before entering full-blown Doze. The Terminal will print the device’s state each step of the way, so keep re-entering this command until the Terminal/Command Prompt window returns the Idle state.

Once your app is in Doze mode, spend some time testing how your app handles Doze in general, being on the lookout for anything that isn’t working as you intended, or parts of your app that you could tweak in order to provide a better overall Doze experience.

In particular, make sure you simulate all the events that you suspect Doze might impact, for example if you want your SMS app to wake the device whenever it receives a new message, then simulate an incoming message and check that your app behaves as expected.

You should also check how your app handles the device leaving Doze mode; the easiest way is by turning the AVD’s screen on and observing your app’s behavior.

By default, adb’s deviceidle step command glosses over the light-Doze phase and sends the device directly into a deep Doze, but you’ll want to test that your app provides a good user experience in both Doze states.

To place an AVD into Doze-light mode, enter the following adb command:

$ adb shell dumpsys deviceidle step [light]

Wrapping Up
Do you have anymore tips for creating apps that play nicely with Android’s Doze mode? Share them in the comments below!
Check out to get list of  new games coming out and upcoming video games