Cerberus android app is one of popular mobile security app to track your lost or stolen android phone, it cost around $4.00 with one time payment without any monthly or yearly fees. Now celebrate their third birthday offering free Cerberus license code to users for the next 24 hours, until April 26 at 6:00 AM GMT.
- Android Basics
- Android - User Interface
- Android Advanced Concepts
- Android Useful Examples
- Android Useful Resources
- Selected Reading
A login application is the screen asking your credentials to login to some particular application. You might have seen it when logging into facebook,twitter e.t.c
This chapter explains, how to create a login screen and how to manage security when false attempts are made.
First you have to define two TextView asking username and password of the user. The password TextView must have inputType set to password. Its syntax is given below −
Define a button with login text and set its onClick Property. After that define the function mentioned in the onClick property in the java file.
In the java file, inside the method of onClick get the username and passwords text using getText() and toString() method and match it with the text using equals() function.
The last thing you need to do is to provide a security mechanism, so that unwanted attempts should be avoided. For this initialize a variable and on each false attempt, decrement it. And when it reaches to 0, disable the login button.
Example
Here is an example demonstrating a login application. It creates a basic application that gives you only three attempts to login to an application.
To experiment with this example, you can run this on an actual device or in an emulator.
Steps | Description |
---|---|
1 | You will use Android studio to create an Android application under a package com.example.sairamkrishna.myapplication. |
3 | Modify src/MainActivity.java file to add necessary code. |
4 | Modify the res/layout/activity_main to add respective XML components |
5 | Run the application and choose a running android device and install the application on it and verify the results |
Following is the content of the modified main activity file src/MainActivity.java.
Following is the modified content of the xml res/layout/activity_main.xml.
In the following code abc indicates about logo of tutorialspoint.com
Following is the content of the res/values/string.xml.
Following is the content of AndroidManifest.xml file.
Let's try to run our application we just modified. I assume you had created your AVD while doing environment setup. To run the app from Android studio, open one of your project's activity files and click Run icon from the toolbar. Android studio installs the app on your AVD and starts it and if everything is fine with your setup and application, it will display following Emulator window −
Type anything in the username and password field, and then press the login button. I put abc in the username field and abc in the password field. I got failed attempt. This is shown below −
Do this two more time, and you will see that you have 0 login attempts left and your login button is disabled.
Now open the application again, and this time enter correct username as admin and password as admin and click on login. You will be successfully login.
If user press on cancel button, it will close an application of login screen.
Cerberus is the name of the three-headed hound that guards the gates of hell in Greek mythology. It’s also a useful Guardian Force (GF) from Final Fantasy 8 that casts Triple on your party. Not only that, it’s also a very cool anti-theft app for your Android phone.
A worthy addition to everything we’ve previously mentioned in our phone security round up, the Cerberus Android app is very much worthy of its namesake.
You get three ways in which to protect your Android phone and SIM card if it’s been lost/stolen, each of which comes with plenty of bite. By logging to the Cerberus website with your account, tracking it with texts and enabling the SIM Checker, that allows you to trace your phone even if somebody has put a different SIM card in it.
Track your missing phone with the Cerberus remote login console
Of these three protection measures its the remote login that’s by far the most impressive.
This gives you access to a console through which to track your phone’s location on Google Maps. When we were testing this out, we also noticed that the app forced our ‘lost’ Samsung Galaxy S2 to connect to our Wi-Fi access point, allowing for more accurate location requests.
![Login Login](/uploads/1/2/5/8/125876320/592680443.jpg)
From the Command drop down we were also able to pull up the name of the Wi-Fi point we were connected to as well as the IP address, using the ‘Get device info’ command.
Cerberus also says that the GPS antenna will be auto-enabled when you’re searching for your phone if its running Android 2.3.3 Gingerbread or higher – though we couldn’t get this to work on our 2.3.3. running Galaxy S2.
Information on our SIM card was also displayed, so if someone has nabbed your phone, the serial number of any new SIM card put in to the phone ought to display as well. Perhaps the best thing about the remote login console is that you can also force your phone to take pictures using the main and the front cameras (if your phone has one).
As as well as pinpointing roughly where your phone is, you’ve also got the possibility of capturing a mugshot of whoever’s currently got your phone as well as spying a glimpse of their surroundings.
Other security measure available to you includes the ability to lock your phone with a four-digit PIN – this is the same PIN locker that you can access from the settings of your Android phone. Cerberus just gives you the ability to configure this remotely from your desktop.
What’s even cooler about this is that if someone tries to guess your PIN and guesses wrongly, they’ll be greeted by the sound of your phone’s front camera taking a snap of their confused face before Cerberus emails it to you.
You can also wipe any sensitive information from the internal memory and the microSD card from the panel as well, so should somebody get past this, you can remote nuke anything sensitive, just to be safe.
Track by texting
If you can’t track your phone because there’s no adequate 3G or Wi-Fi connections available, there’s a second, more lo-tech solution available.
By texting commands plus your Cerberus password to your missing number you can enable many of the commands described above.
So to locate your phone, you’d have to text ‘cerberus [your password] find’ to your number; within a couple of minutes, Cerberus will text you back with an approximate location along with a link to Google Maps.
Handily, there’s also the option to text a ‘cerberus [your password] enabledata’ command to force a 3G switch on on your phone if someone has disabled it. You can also text commands to take pictures and wipe the internal/microSD card contents.
Find out who has put a new SIM card in your phone
A little trickier to set up, but worth the effort is the SIM Checker feature. This aspect of Cerberus allows you to find out if someone has put a new SIM card in your phone and gives you the number associated with that SIM card, allowing you to track the phone using both the methods described above.
![Android Android](/uploads/1/2/5/8/125876320/199364104.png)
In the settings menu of the Cerberus app, make sure you’ve got all of the revelant tick boxes checked in order to enable the SIM Checker feature.
How much is that three-headed doggie in the window?
It’s free to download the Cerberus app from the Android Market, which gives you a week long trial of the services. After this expires, you’ll be prompted to pay €2.99 (about £2.50) for the full licence. This is a one off purchase for the full licence, so no subscriptions or renewal fees. Cerberus ought to work on any Android device running 2.2 or higher, and can be used to secure/track up to five phones.
The guys over at DailyAppShow shot a video detailing Cerberus in action that’s featured on the Android Market page of the app itself. Check out the video below to get a better idea of how this works before jumping on the app link to be taken right to said Android Market page.