Author: Sergey Kargopolov

In this tutorial, we will use Kotlin to make a simple Android mobile app that will be able to receive push notifications sent from Firebase. I used to call these kind of messages “push messages” but the correct term for this tutorials will probably be a Firebase Cloud Messaging or the FCM which also stands for Firebase Cloud Messaging.  I…

Read More Push Notifications Example with Kotlin and Firebase

When writing a JUnit test there are different ways to test for expected exception and below I am going to share with you three different ways. Using @Test Expected Attribute One way to test for expected exceptions is to use the @Test’s expected attribute to specify that the method below should throw an exception specified by…

Read More JUnit Test Expected Exception Example

Heads up guys! Google has just launched a new certification program for mobile web developers. The complete name of certification exam is Mobile Web Specialist Certification and if you have been building mobile web apps then this is your chance to show off your skills and become Google Certified Mobile Web Specialist :). Those who…

Read More A new certification program from Google for mobile web developers

It time to learn how to create a Web Service to authenticate user with their user name and password and how to issue a unique secure access token which our Mobile Application can use to send HTTP requests and communicate with protected web services of our API. For a free video tutorial on how to…

Read More RESTful Web Service to Authenticate User and Issue Access Token

In this blog post I am going to share with you a way to create a RESTful Web Service to: Create a new user profile, Generate and save in database a user secure user password rather than an actual password provided by user, Return back as a response a custom user profile object(JSON) with information that…

Read More RESTful Web Service to Save a New User in Database

With Mockito we can Mock an object, stub some of it’s methods but not the other and still be able to call a real method of this stubbed object. In the code example below I am going to share with you how to call a real method of a mocked object using Mockito’s thenCallRealMethod(). In…

Read More Use Mockito’s thenCallRealMethod() to Call a Real Method

Earlier I’ve published a blog post on now to create a RESTful Web Service(JAX-RS) to accept JSON payload with user profile details and how to save user profile details into a MySQL database using Java Hibernate framework. In this blog post I am going to share with you how to test(using JUnit and Mockito) it’s Service…

Read More Test RESTful Web Service with JUnit and Mockito

When building RESTful Web Services for your Mobile app with Java JAX-RS and Jersey you can use any Java Servlet container to deploy and run your final .WAR file. But if you use Jetty then there is a very quick way to build and run your application using Maven and jetty-maven-plugin. Below is a short…

Read More Add Jetty Maven Plugin to Your JAX-RS Project

Hibernate is a great framework to use to persist data into a database when building RESTful Web Services for your mobile application with Jersey and JAX-RS. In most of the projects I have participated when designing RESTful Web Services for Mobile App we used MySQL database server and Hibernate framework to store user data which…

Read More Persist Java Object in MySQL Database With Hibernate

If one of you RESTful Web Service Endpoints built with Jersey JAX-RS needs to initiate image download, you can use the following example to let user download an image stored on your server  when they access a certain web service end point. The below example downloads a PNG image specified by @Produces(“image/png”) but you can easily…

Read More Image Download in Jersey JAX-RS