Posts

Secure Android Application Development Tips

In Android Operating system, there are lots of security features which will protect your applications. The common security threat of Man in the middle attack, will help attackers to initiate an attack from a mobile application. This may of a small mistake like adding log of sensitive data. After development of an application it is better to do a Penetration testing . There are lots of tools and services for penetration testing and vulnerability testing. In this post I would like to give small idea about how to avoid vulnerabilities and security holes in our android application while development. As developers we should aware about the best practices of secure application development. Android developer page  contains the security best practices and security tips, the developers should follow while development. The best thing is to keep these basic tips in mind throughout the development. Then we can reduce the number of vulnerabilities and security issues inside the application...

Android Linkedin API with OAuth Authentication (Using Scribe-Java Library)

Image
As Linkedin is one of the professional social media network, most of us needs to access there web services to collect data. In this post I would like to give simple examples on how to get logged in user information such as email, full name, friends list. And I'm planning to update this post with the sending messages and share posts. There is no official SDK provided by the Linkedin developer support. They have recommended to use  Scribe  library (By Pablo Fernandez ), which will helpful to do the OAuth authentication with Linkedin web services. This library can be used for most of the web services, where they use OAuth authentication. In this example still I'm using OAuth 1.0 as default authentication. First we have to add the Scribe dependancy to build.gradle dependencies { compile ' org.scribe:scribe:1.3.+ ' } We have to create an application to access Linkedin API's. For that go to  Developer Console  and Add New Application. After creating the ap...

Android Event Bus Implementations using Otto

As android developers we face difficulties on decoupling different parts in android application. To overcome this difficulties, the Square has introduced an event bus for android called Otto . In this post I will demonstrate how to use Otto event bus with IntentServices in Restful android client. This code can be more optimized. This publish-subscribe style can be used to decouple many other components except the Services. This is just a sample implementation to demonstrate Event Bus concept with IntentService, except ResultReceiver usage with Services. This is more interesting when it comes to event bus. Because the same results set will be available to multiple components by publishing it on event bus. The required component should subscribe to receive the results. This is more robust than the traditional java event listners and will provide more flexibility. We can initiate the Bus object according to the requirement of our application. It is not required to be singleton o...

Searching For Bluetooth Devices

Bluetooth is a wireless protocol for exchanging data over short distances from fixed and mobile devices, creating personal area networks(PANs).When any two devices need to talk to each other, they have to agree on a number of points before the conversation can begin.The Bluetooth protocol is used to communicate with mobile devices in wireless media.It is a well known and popular technology that is being used by many mobile device manufactures. Mainly the Bluetooth technology is used in mobile phones.Here is some code examples to search for Bluetooth devices near to your device. Start Inquiring for Bluetooth Devices LocalDevice localDeviceData = LocalDevice.getLocalDevice(); DiscoveryAgent bluetoothDiscoveryAgent = localDeviceData.getDiscoveryAgent(); bluetoothDiscoveryAgent.startInquiry(0x9e8b33, this); After finishing the inquiry of Bluetooth devices,the deviceDiscovered(RemoteDevice rd, DeviceClass arg1) method will be invoked. Vector remoteDevices; Li...

Finding GPS using J2ME

The Global Positioning System (GPS) is a satellite based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. GPS was originally intended for military applications, but in the 1980s, the government made the system available for civilian use. GPS works in any weather conditions, anywhere in the world, 24 hours a day. There are no subscription fees or setup charges to use GPS. The GPS is made up of three parts: satellites orbiting the Earth; control and monitoring stations on Earth; and the GPS receivers owned by users. GPS satellites broadcast signals from space that are picked up and identified by GPS receivers. Each GPS receiver then provides three-dimensional location (latitude, longitude, and altitude) plus the time. I have created a J2ME midlet which is used to get the Location,Country,Address and few other de...

XML Validation

XML is stand for EXtensible Markup Language and it is easy to use XML as a markup language.XML haven't got any predefined tags as HTML.Therefor when we are using a XML content, we have to use a mechanism to read those tags and identify those tags separately. For this mechanism there are XML parsers.Specially we can use SAX parser and DOM parser.In most web browsers they have an inbuilt XML parser. DOM parser is effective than the SAX parser. SAX uses an event callback mechanism requiring you to code methods to handle events thrown by the parser as it encounters different entities within the XML document. DOM parses an XML document and returns an instance of org.w3c.dom.Document. This document object's tree must then be "walked" in order to process the different elements. JDOM is an open source API, designed specifically for Java programmers, that represents an XML tree as Elements and Attributes. JDOM can interact with SAX or DOM. With JDOM, y...