September 01, 2015
Gallia: Rise of Clans
In Gallia rebellious Gauls try to start a revolt against Caesar and his legions. Take the lead of the revolt, and your name will make it into history!

A Druid named Neocomix will be always near you. He will prepare magic potions and come up with destructive conjurations. Their skillful use and accuracy of your catapult during the clash will make Romans surrender the village and seek safety in flight.

Don’t spare stones for the victory! Show Caesar that one tiny but angry Gaul is capable to win the entire war.

Game features:

- This game is based on real events – the Gallic Wars.
- Combination of the best ideas – Match3, Bubbleshooter, Catapult
- Colorful graphics and sound effects.
- Several game modes are possible: arcade and time limit.
- Various effects, bonuses and combo!
- More than 75 fascinating levels.
- Players’ ratings for watching friends and competitors.
- Game graphics is adapted for all types of screens, including QHD.
- Support for telephones and tablets.
August 31, 2015
Material Design Spec Updated
www.xda-developers.com/wp-content/uploads/2015/08/social-150x150.png" height="150" width="150" style="float: left; margin: 0 15px 15px 0;" />

The Material Design Spec has been updated to add info and guidelines on various aspects such as permissions, bottom sheets, peeking notifications, and fingerprint authentication. More examples have also been added for cards, launch screens as well as settings UI. Go on over and have a look!


August 30, 2015
Snapprefs Xposed Module Updated with Latest Snapchat Support
www.xda-developers.com/wp-content/uploads/2015/08/FsFw0Dp-150x150.png" height="150" width="150" style="float: left; margin: 0 15px 15px 0;" />

Snapprefs Xposed Module has been updated with a stable release after quite some time. The newest non-beta update brings along complete support for Snapchat version 9.14.2.0, along with ability to hide Discover from UI, save images as PNGs and Overlays and other bug fixes and improvements.


Show Download Progress in NotificationBar in Android with Notification Event Listeners

Below Sample code shows you how to download images from a url with progress in the notification bar.



package com.coderzheaven.customnotificationdownloaddemo;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;

import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.provider.Settings;
import android.support.v4.app.NotificationCompat;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;

public class MainActivity extends ActionBarActivity {

NotificationCompat.Builder mBuilder;
NotificationManager mNotifyManager;
int id = 1;
String urlsToDownload[] = { "http://www.devoxx.be/wp-content/uploads/2014/10/android.png", "http://www.devoxx.be/wp-content/uploads/2014/10/android.png",
"http://www.devoxx.be/wp-content/uploads/2014/10/android.png", "http://www.devoxx.be/wp-content/uploads/2014/10/android.png",
"http://www.devoxx.be/wp-content/uploads/2014/10/android.png" };
int counter = 0;
private NotificationReceiver nReceiver;
ArrayList<AsyncTask<String, String, Void>> arr;

class NotificationReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String event = intent.getExtras().getString(NLService.NOT_EVENT_KEY);
Log.i("NotificationReceiver", "NotificationReceiver onReceive : " + event);
if (event.trim().contentEquals(NLService.NOT_REMOVED)) {
killTasks();
}
}
}

private void killTasks() {
if (null != arr & arr.size() > 0) {
for (AsyncTask<String, String, Void> a : arr) {
if (a != null) {
Log.i("NotificationReceiver", "Killing download thread");
a.cancel(true);
}
}
mNotifyManager.cancelAll();
}
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mBuilder = new NotificationCompat.Builder(this);
mBuilder.setContentTitle("Downloading images...").setContentText("Download in progress").setSmallIcon(R.drawable.ic_launcher);
// Start a lengthy operation in a background thread
mBuilder.setProgress(0, 0, true);
mNotifyManager.notify(id, mBuilder.build());
mBuilder.setAutoCancel(true);

arr = new ArrayList<AsyncTask<String, String, Void>>();
int incr;
for (incr = 0; incr < urlsToDownload.length; incr++) {
ImageDownloader imageDownloader = new ImageDownloader();
imageDownloader.execute(urlsToDownload[incr]);
arr.add(imageDownloader);
}

ContentResolver contentResolver = getContentResolver();
String enabledNotificationListeners = Settings.Secure.getString(contentResolver, "enabled_notification_listeners");
String packageName = getPackageName();

// check to see if the enabledNotificationListeners String contains our
// package name
if (enabledNotificationListeners == null || !enabledNotificationListeners.contains(packageName)) {
// in this situation we know that the user has not granted the app
// the Notification access permission
// Check if notification is enabled for this application
Log.i("ACC", "Dont Have Notification access");
Intent intent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
startActivity(intent);
} else {
Log.i("ACC", "Have Notification access");
}

nReceiver = new NotificationReceiver();
IntentFilter filter = new IntentFilter();
filter.addAction(NLService.NOT_TAG);
registerReceiver(nReceiver, filter);

}

@Override
protected void onDestroy() {
super.onDestroy();
killTasks();
unregisterReceiver(nReceiver);
}

private void downloadImagesToSdCard(String downloadUrl, String imageName) {
FileOutputStream fos;
InputStream inputStream = null;

try {
URL url = new URL(downloadUrl);
/* making a directory in sdcard */
String sdCard = Environment.getExternalStorageDirectory().toString();
File myDir = new File(sdCard, "DemoDownload");

/* if specified not exist create new */
if (!myDir.exists()) {
myDir.mkdir();
Log.v("", "inside mkdir");
}

/* checks the file and if it already exist delete */
String fname = imageName;
File file = new File(myDir, fname);
Log.d("file===========path", "" + file);
if (file.exists())
file.delete();

/* Open a connection */
URLConnection ucon = url.openConnection();

HttpURLConnection httpConn = (HttpURLConnection) ucon;
httpConn.setRequestMethod("GET");
httpConn.connect();
inputStream = httpConn.getInputStream();

/*
* if (httpConn.getResponseCode() == HttpURLConnection.HTTP_OK) {
* inputStream = httpConn.getInputStream(); }
*/

fos = new FileOutputStream(file);
// int totalSize = httpConn.getContentLength();
// int downloadedSize = 0;
byte[] buffer = new byte[1024];
int bufferLength = 0;
while ((bufferLength = inputStream.read(buffer)) > 0) {
fos.write(buffer, 0, bufferLength);
// downloadedSize += bufferLength;
// Log.i("Progress:", "downloadedSize:" + downloadedSize +
// "totalSize:" + totalSize);
}
inputStream.close();
fos.close();
Log.d("test", "Image Saved in sdcard..");
} catch (IOException io) {
inputStream = null;
fos = null;
io.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {

}

}

private class ImageDownloader extends AsyncTask<String, String, Void> {

@Override
protected Void doInBackground(String... param) {
downloadImagesToSdCard(param[0], "Image" + counter + ".png");
return null;
}

protected void onProgressUpdate(String... values) {
}

@Override
protected void onPreExecute() {
Log.i("Async-Example", "onPreExecute Called");
}

@Override
protected void onPostExecute(Void result) {
Log.i("Async-Example", "onPostExecute Called");

float len = urlsToDownload.length;
// When the loop is finished, updates the notification
if (counter >= len - 1) {
mBuilder.setContentTitle("Done.");
mBuilder.setContentText("Download complete")
// Removes the progress bar
.setProgress(0, 0, false);
mNotifyManager.notify(id, mBuilder.build());
} else {
int per = (int) (((counter + 1) / len) * 100f);
Log.i("Counter", "Counter : " + counter + ", per : " + per);
mBuilder.setContentText("Downloaded (" + per + "/100");
mBuilder.setProgress(100, per, false);
// Displays the progress bar for the first time.
mNotifyManager.notify(id, mBuilder.build());
}
counter++;

}

}
}

“NLService” Class is the actual Notification Listener class that can hear events in your notification.
But before everything you need to be sure that, you have enabled notification access for your app.


package com.coderzheaven.customnotificationdownloaddemo;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.util.Log;

@SuppressLint("NewApi")
public class NLService extends NotificationListenerService {
private String TAG = this.getClass().getSimpleName();
public static final String NOT_TAG = "com.coderzheaven.NOTIFICATION_LISTENER";
public static final String NOT_POSTED = "POSTED";
public static final String NOT_REMOVED = "REMOVED";
public static final String NOT_EVENT_KEY = "not_key";

@Override
public void onCreate() {
super.onCreate();
}

@Override
public void onDestroy() {
super.onDestroy();
}

@Override
public void onNotificationPosted(StatusBarNotification sbn) {
Log.i(TAG, "********** onNotificationPosted");
Intent i = new Intent(NOT_TAG);
i.putExtra(NOT_EVENT_KEY, NOT_POSTED);
sendBroadcast(i);
}

@Override
public void onNotificationRemoved(StatusBarNotification sbn) {
Log.i(TAG, "********** onNOtificationRemoved");
Intent i = new Intent(NOT_TAG);
i.putExtra(NOT_EVENT_KEY, NOT_REMOVED);
sendBroadcast(i);
}

}

Make sure you add the “services” in the AndroidManifest file.


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.coderzheaven.customnotificationdownloaddemo"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="22" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name="com.coderzheaven.customnotificationdownloaddemo.NLService"
android:label="@string/app_name"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" >
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
</application>

</manifest>

You can download the complete source code from here..


Link to this post!More Similar Posts
August 29, 2015
QuickPic Now Owned By Maker of Clean Master
www.xda-developers.com/wp-content/uploads/2015/08/QuickPic-Gallery-150x150.jpg" height="150" width="150" style="float: left; margin: 0 15px 15px 0;" />

QuickPic, the highly regarded media gallery for Android, is now a part of Cheeta Mobile alongside the questionably beneficial Clean Master task killer. A new update is in the works, so stay tuned as we watch this ownership change with keen eyes. Official announcement after the jump.


ONEPLUS 2 REVIEW

ONEPLUS 2 REVIEW


Introduction

After the massive hype surrounding their first foray into the mobile phone market, OnePlus have returned this year with a new handset and have tried to recreate the buzz around the original. Over the near sixteen months since OnePlus inflicted the invite system on us, so much has changed for them. They have alienated and annoyed large sections of the Android community with tasteless ill advised ‘competitions’ for invites, severed their ties with Cyanogen (possibly one of the main reasons their hype train gathered as much momentum as it did) and even managed to upset the Android Police team



OnePlus are still brandishing the ‘flagship killer’ tag line that served them so well with the OnePlus One however this year consumers have far more choice in the sub £300 market than they had before so the claim carries a lot less weight. There have also been a couple of interesting choices with the hardware specification of the OnePlus 2 with the removal of NFC and deciding not to include either fast or wireless charging (all features you would expect on a current flagship). The OnePlus 2 is also a little more expensive than it’s older sibling, coming in at £289 for the 64G model (the unit under review here), as compared to £269 for the equivalent version of the One.


The OnePlus 2 went on sale on August the 11th using a supposedly updated version of the controversial invite system with a larger stock holding to speed the queue along. Delivery has been notably quicker and I have as yet to see any reports of hardware issues such as the yellow banding being reported on the OnePlus One screen at release.


Aesthetics

The OnePlus 2 is a solidly built unit, nothing feels below par or of a sub standard quality. Buttons and button holes fill as they should, edges between different surfaces meet and connect the way they are meant to with nothing protruding or indenting but instead continuing smooth lines. The whole unit has been manufactured and assembled very well completely devoid of sharp edges or little gaps.













The signature black sandstone back is returns but this time there are more OEM options available for changing it and it is also a lot easier to snap off and on. The device is a little heavier than the previous model weighing in 13 grams more and also a little fatter being 1mm thicker, but the height and width are reduced coming in at 151.8 x 74.9 with the same 5.5” screen. Out of all the little small differences it is the added weight you will notice the most, those 13 grams can be felt. Aesthetically the 2 is a very simple looking device. The front is plain and dark with a small speaker grill, the front camera lens and the fingerprint scanner being the only visible features you can notice when the screen is off. Added to these are a notification LED and two capacitive buttons either of the scanner which light up as thin lines. On the bottom in the centre is the USB type C connector flanked on either side by appears to be two speaker grills but only one is actually used with the other housing the microphone. Up top is a standard audio output plug and a pinhole used for noise cancellation. The right hand edge has a long thin volume rocker just over two thirds of the way up and the power button sits roughly 5mm below this. The right hand edge has something new, a three position alert slider that is used for switching notification priority, this sits directly opposite the volume rocker and has a rough surface to aide grip. As mentioned the rear of the phone has the familiar sandstone back with the camera, focus laser and duel LED flash sitting roughly an inch from the top. The side edges are constructed from an aluminium and magnesium alloy which adds to the quality but it isn’t quite enough to give an all over premium feel.


Display

With constant advances in screen technology many manufacturers are incorporating screens which are flexible or curved, or have ultra high resolutions. OnePlus have shied away from this and have instead opted for a 1080p LTPS LCD unit the same as was on the original One. Given the low cost this is a compromise that makes sense, while screens of higher resolution can be very nice they are a luxury item rather than a necessity even on high end devices.



Viewing angles are fine with text and images remaining clear even with the phone held at quite obtuse angles. The screen also performed well for me in very bright sunlight (we do get the odd clear day in Scotland) but the response time for the OS to adjust the brightness when first unlocking is slower than I would like.


Camera(s)

One area that OnePlus have rung the changes is with the camera. It still has a 13mp main shooter but it is for from the same sensor. This time the pixel size has been increased to 1.3um which should mean that each image pixel is capable of collecting more light, OnePlus claim this is the largest pixel size on any smartphone camera of this resolution. The end result should mean clearer, more detailed shots in low lighting conditions. Additionally the new camera module also boasts optical image stabilisation (a feature missing from the original), dual LED flash, f/2.0 aperture and laser focusing. The end result is a far more accomplished unit which should mean a higher percentage of quality images than before. On the front there is a ‘5mp distortion free’ module according to the blurb from OnePlus, and they have left it at that rather than being tempted by adding a flash as is becoming popular on a lot of handsets right now.







While the hardware has undoubtedly been improved the same cannot be said for the camera software. It still does slow motion video, panorama and time lapse shots but the interface is poor and there are no value added features that most OEM’s now include. For a gallery app they have opted for the Google photos app so you wont get anything unique to your OnePlus.



















The end result of all the above is a camera that is very capable in a variety of different settings. Rather than bore you with details of each of the included gallery images I will just say that each shot was taken on auto mode with only manual selection of the flash being off or on.


Software

One of the big controversies with OnePlus in the last year has been their public breakup with Cyanogen Inc., and how the parting would affect future devices. Their answer was to form a ROM development team from within the custom ROM community to create their own Android based OS, and the result was Oxygen OS. If you have ever used a Nexus device or flashed an AOSP based ROM then Oxygen OS will seem very familiar. More and more device manufacturers are keeping the look and feel of standard Android and OnePlus have decided on this course as well. However, where other OEM’s swap out some apps and services for their own, OnePlus sticks pretty rigidly with Google’s offerings. The only notable exceptions are the previously mentioned camera app and the application launcher, with all other differences being some customised settings.








The Oxygen OS Shelf sits a swipe to the right away from your main launcher screen in the same the Google Now launcher has it’s now page. OnePlus have said that the Shelf is still a beta feature but they decided to make it available anyway (it can be switched off and on in settings). It Contains your most used apps, contacts, the current weather and also allows you to add widgets of your choice. I personally turned it off after a couple of days, but others may like what it brings.


Audio

The speaker in the 2 produces a decent volume but it is far from being of a high quality. Talking and sound effects are OK, but the minute you play some music you soon discover it’s failings. The ROM has the MaxAudio audio effects software and while it can help a bit it isn’t enough to mask the mediocre quality of the hardware. Using headphones is a far better experience as you would expect, but I have seen reports of issues with certain brands.


Development & Customisation

Losing Cyanogen as a ROM provider hasn’t just affected how the ROM works but also how you can theme it. Whereas the OnePlus One had the full power of the Cyanogen Theme Provider, the 2 is almost entirely devoid of theming options. You can switch from normal to dark mode with a choice of accent colours and you can select to use on-screen navigation buttons or stick with the capacitive ones on the lower bezel and that’s about it. The stock ROM will mostly work with custom Layers via the Layers Manager app from the Play Store if you don’t mind rooting your device but it isn’t 100% compatible.



ROM development will be as good as you can get, once the phone makes it’s way into willing developers hands. Unlike some OEM’s OnePlus don’t expect you to jump through hoops to unlock your device, no nasty propriety flashing utilities, just good old fastboot and adb the way Google intended. Not only have they made it easy to unlock, they actively encourage it. One of the better things OnePlus did on social media was to post links to custom ROM’s they thought owners might like to try, I expect the same this time round. To aide buyers in this act they actually include all the drivers and software you need (for Windows, Mac and Linux) on a partition on the phone which you can just copy off when you connect the device to your computer.
Because devices are still only trickling out there is currently only one custom ROM on the XDA web site, a CM 12.1 build that at the time of writing still has a few bugs, but expect the forum to explode with new ROM’s over the coming weeks.


Performance

With a Snapdragon 810 SOC and 4G of RAM (3G in the 16G version) the 2 performs as well as you would expect. Well it almost does, I find that the device seems to stutter every now and then regardless of what task it is doing. Since the last OS update the number of times this happens has greatly reduced but it does very occasionally still happen. Much has been made of the Snapdragon 810 overheating issues since it first hit the market but to date I have yet to encounter anything worse than I would get pushing any of my previous phones. Yes it warms up, but not overly so. One of the ways OnePlus claims to have dealt with the heat issue is through their software control of core switching to stop any core being overused, they have also attached a graphite heat sync to dissipate the heat in an even manner.


Land of Droid -