How to use JHlabs image filter in spring MVC project

First you have to create image filter class like this

public class ImageFilter {
public void applyFilter(MultipartFile multipartFile){
String destination = “/your/file/destination/folder/”;
try {
GaussianFilter filter = new GaussianFilter();
BufferedImage imBuff =;
filter.filter(imBuff, imBuff);

File outputfile = new File(destination+”image.jpg”);
ImageIO.write(imBuff, “jpg”, outputfile);

} catch (IllegalStateException e) {
// TODO Auto-generated catch block
} catch (IOException e) {
// TODO Auto-generated catch block

And then modify the request mapping method for file upload in your controller like this

@RequestMapping(method = RequestMethod.POST)
public String fileUploaded(Model model, @Validated File file,
BindingResult result) {

String returnVal = “successFile”;
if (result.hasErrors()) {
returnVal = “file”;
} else {
MultipartFile multipartFile = file.getFile();
SaveFileToFolder save = new SaveFileToFolder();
return returnVal;

After running the blurred image will be stored in the location you specified.

OnePlus will reveal its ‘OxygenOS’ February 12th

As Cyanogen moves along a new path (apparently with help from Microsoft) phone maker OnePlus is working on its own flavor of Android, and now it has a name: OxygenOS. Unfortunately, it doesn’t have much else beyond promises of going back to the drawing board with software that is “open, customizable, and free of bloat and unnecessary features.” That’s good to hear though, and matches up with the alpha build seen earlier this month. In classic OnePlus style, the tease just sets up another tease, and we’re told more information is coming on February 12th, so mark your calendars.


Baton – the Ultimate Android App Switcher


If you’ve ever started playing a game on your smartphone, and wanted to finish on your tablet but couldn’t, a new app could fix that problem for good.

Nextbit, a San Francisco-based startup whose founders were previously part of Google’s Android team, is coming out of stealth with Baton, an Android app that uses the cloud to bring Handoff-like sharing capabilities to multiple devices.

Baton works in the background of your device to sync all of your apps — as well as all the information in them— to the cloud. This allows you to not only backup and restore your device, but also to easily switch between browsing, playing games or even watching YouTube videos on multiple devices without losing your place.

“Until now, there hasn’t been a good way to pick up a tablet at the same place you left off on your smartphone,” Nextbit CEO Tom Moss said in a statement. “Our mobile activities shouldn’t just be available on a per-device basis.”

The idea is similar to Apple’s “Continuity” features in OS X Yosemite and iOS 8, which allow users to switch between supported apps on their iPhone and Mac. But Apple (and Google) has yet to create a feature within its operating system that brings a similar experience to multiple mobile devices.

The difference, according to Nextbit’s founders, is that Baton integrates the cloud as part of the core operating system. While other services can back up and restore your apps, or sync in limited ways, the process is often imperfect.

If you lose your phone, a backup may help you restore photos or even apps, but unless the apps themselves have a cloud-backed way to sync your account (like the Kindle app, for example), you’ll have to start over from scratch, which is particularly frustrating when playing level-based games.

Nextbit is accepting requests for its private beta, which will be available to select devices running CyanogenMod, an experimental version of Android. The operating system, which runs on rooted devices and the OnePlus One, gives users more control over the look and feel of Android, as well as the ability to make changes not possible on Google’s version of the operating system

Courtesy – Mashable

Android Webview

Laoding webpages

// Let’s display the progress in the activity title bar, like the
 // browser app does.



 final Activity activity = this;
 webview.setWebChromeClient(new WebChromeClient() {
   public void onProgressChanged(WebView view, int progress) {
     // Activities and WebViews measure progress with different scales.
     // The progress meter will automatically disappear when we reach 100%
     activity.setProgress(progress * 1000);
 webview.setWebViewClient(new WebViewClient() {
   public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
     Toast.makeText(activity, "Oh no! " + description, Toast.LENGTH_SHORT).show();


Blackout issue in Samsung galaxy s4 while running cocos2d

If  you are a developer , you might have come across various issues  while developing an app. If you have experienced black out issue while running a cocos2d , then the only way that upu could solve the issue is by  changing the zvalue of the perspective from1500 to 2000 . Now the code will be like this  ;

GLU.gluPerspective(gl, 60, size.width/size.height, 0.5f, 2000.0f);


How to Be a Highly Competitive Mobile Developer


The demand for mobile software developers is red hot, and the demand for Android developers is even hotter.

Since Americans are consumed by their smartphones alone for about an hour per day (a figure that doesn’t even account for tablet/other electronic media usage), most companies need highly skilled mobile developers to adapt their website or service to mobile usage.

Generally, enterprises and startups alike are adapting their products or services to the two biggest names in mobile technology: iOS and Android.
Android is outpacing iOS in the job market by a landslide

While both iOS and Android skills are highly in-demand,

employers are hiring Android developers much faster and more often than any other professionals in mobile tech.

employers are hiring Android developers much faster and more often than any other professionals in mobile tech.

Is this because the Android platform is better? That’s debatable. One thing is for sure: Hundreds of Android-supported mobile devices have blown up in popularity, and Android currently dominates the global market share.

“The growth of the Android market has had a ripple effect on the job market,” says Matt Miller, CTO at CyberCoders, a subsidiary of On Assignment, Inc. “For mobile programmers who specialize and are familiar with the Android operating system, there is no better time to improve your Android skills and look for a job.”

CyberCoders’ team of data scientists analyzed more than 3,700 mobile development job placements over the last two years. Below is a summary of the findings.

Jobs posted for Android positions grew by 110% from 2012 to 2014, compared to 54% for iOS jobs.

Similarly, job applications received for Android positions grew by an astounding 165%, compared to, again, 54% for iOS jobs.

The time it takes to place Android developers beat iOS by 50%.

From these findings, it’s clear that sharpening your Android skills — including Android SDK, NDK, C and C++ — can open up great career opportunities. In addition to Android development, employers are also on the lookout for the following three essential skills.
1. Demonstrate your understanding of the ‘why’ behind the app

The best mobile apps “solve a business problem such as improved work flow,” says Alex Bratton, CEO and chief geek of Lextech, an app development firm, and author of Billion Dollar Apps: How to Find & Implement a Winning Mobile Strategy.

It’s crucial to show your boss how your work impacts the company’s bottom line. “Developers who understand the ‘why’ behind the app are the most successful because they can offer the end user or the C-suite a return-on-app investment,” says Bratton.
2. Be able to communicate to non-technical folks as well

Building a solid mobile experience requires collaborating with stakeholders that may not understand the technical aspects of your work.

“It’s important that mobile developers are able to step outside of their technical shells and express the limitations and possibilities provided by mobile technology in a way that non-technical people can understand,” says Brady Donnelly, cofounder of Hungry, a digital agency that develops mobile products for brands like Samsung and MakerBot.

It’s equally important for developers to be able to walk away from the computer and pinpoint what works and what doesn’t from a consumer’s perspective.

In fact, one of the biggest job interview mistakes Donnelly sees is candidates taking an insular approach to work. “It’s common in the industry to put a barrier between clients and developers, in many cases, so their day-to-day lives are spent largely in a bubble outside of face-to-face interactions,” he says.

Competitive mobile developers are ready to collaborate and work cohesively.
3. Always keep your skills and industry knowledge sharp

The most impressive developers are able to connect the dots and think about the bigger, industry-wide picture.

“What particularly intrigues me while interviewing is when the conversation extends beyond the components of specific tasks into interest in the industry as a whole,”

“What particularly intrigues me while interviewing is when the conversation extends beyond the components of specific tasks into interest in the industry as a whole,” says Donnelly.

Staying abreast of the latest mobile-technology languages is key. For instance, honing the fundamentals skills (Java or C++ for Android and Objective-C or Swift for iOS) is a given. Developers should also have experience working with APIs and SDKs made available by larger social media platforms (e.g. Facebook or Instagram). After all, social media is making a huge impact on the landscape of mobile applications, helping apps build audiences and boost demand.

“It’s important to know not just current technology but what is coming up,” says Samit Shah, cofounder of Persource, a mobile app development company. “If you can advise clients on future-proofing their projects or showing how they can grow over time, it’s a better sell than ‘I can build this to specification.'”

Courtesy – Mashable

Google Brings Android 360-Degree Photo App to iPhone


Google tries to make sure its most popular Android apps are also available to iPhone users, but not everything makes the cut.

Now Google’s Photo Sphere app, designed to help you capture three-dimensional views of your world, has finally come to iOS.

Like Google’s other Android-to-iOS app ports, Photo Sphere blends in well with the operating system’s minimalist interface while delivering snappy performance.

After you launch the app, click on the camera menu option and you’ll immediately see an orange positioning dot and a targeting frame prompting you to begin creating your immersive photo.

Photo Sphere

We took the app for a spin and it performed perfectly, taking about five minutes of shooting and then processing to produce an impressive 360-degree image. The only hiccup: It missed pinpointing our geo-location by about half a block (although you can adjust the location within the app before publishing it).

Of course, a number of apps already let you create immersive panoramic photos, but Photo Sphere lets you contribute your own perspective to one of the most frequently used mobile maps available, Google Maps.

News & Image Courtesy – Mashable

Samsung Debuts Gear S Smartwatch With 3G, No Smartphone Needed

Samsung is at it again. Just six months after it announced its second-generation smartwatch — and just two since it launched its first Android Wear model — the company has a new wrist wearable: the Gear S.

This time there’s an extra twist, though: It’s the first Samsung smartwatch with built-in 3G connectivity.

The Samsung Gear S has the ability to connect to 3G and 2G networks on its own, meaning users won’t need to keep it wirelessly tethered to a smartphone in order to get notifications or make calls. The watch does include Wi-Fi and Bluetooth connectivity, though, so a user has the option of still pairing it with a smartphone some or all of the time. It can also go solo and stay connected when the situation calls for it (say, when exercising).

The display on the Gear S is a 2-inch SuperAMOLED screen with 360 x 480 resolution, making it fairly large as smartwatches go, although the curved screen (similar to the Samsung Gear Fit) makes it a little more sleek. The screen is rectangular, like most smartwatches.

The watch is powered by Samsung’s Tizen OS — as opposed to Android Wear, the Google-created wearable operating system, which Samsung has also shown support for via its Gear Live smartwatch. Tizen, however, is more power-efficient than Android, and the Gear S is rated for two days of battery life.

Samsung says the processor is a dual-core 1GHz design, but it didn’t specify the manufacturer or model. It has 512MB of RAM and 4GB of internal memory.

There’s no camera, but — like Samsung’s other Tizen-based Gear watches — it has a standalone music player.

The Gear S stems naturally from Samsung’s “throw everything against the wall” approach to most product categories, giving the wearable-curious crowd the option of a getting smartphone-like device without the smartphone. The display will even call up a QWERTY keyboard when needed, presumably with some pretty tiny keys.

Samsung is also debuting a ring-style headphone model called the Gear Circle. It connects via Bluetooth and features a magnetic lock that clasps around the users’s neck when it’s not being used. It can also vibrate to give the user notifications.

News & Image Courtesy – Mashable

Drawing Image using Canvas in Android

The following code is for drawing a bitmap using canvas.

package com.pac;

import android.content.Context;
import android.os.Bundle;
import android.view.View;

public class SampleActivity extends Activity
      public void onCreate(Bundle savedInstanceState)
            Keypaint view = new Keypaint(this);

      public class Keypaint extends View
            Paint p;
            protected void onDraw(Canvas canvas)
                  p=new Paint();
Bitmap b1=BitmapFactory.decodeResource(getResources(), R.drawable.im1);
canvas.drawBitmap(b1, 0, 0, p);

            public Keypaint(Context context)

How to Prevent Exit Issue Due to Exception in Android?

We can use try catch block to prevent exit issue in Android due to exception. Here is how we can do that :

try {

//Add the code which may have any exception.

} catch (IllegalArgumentException e) {


} catch (IllegalStateException e) {


} catch (IOException e) {



Please note that this will only prevent the app from exiting. But if there is any exception, the process inside the try block won’t be executed as we expect it to. So we should use this for debugging mainly and to avoid unwanted or unexpected exiting of the app.