Posts

Showing posts with the label Android

Don't clear logs after app get crashed - Android Studio

Image
Currently, I am working on one app which keep getting crash at PIE version and I was not getting any crash log under logcat. After some research here and there, I get to know that by default logcat logs based on selected process and once your app get crashes, it will clear the crash log as the existing process is gone. To see the crash logs: ·         Goto logcat and click on right hand side drop down button and select Edit Configuration. ·         Add Filter Name as your app Name and project Name as Package Name. Save it. Now try again. You will able to see your app crash log now.   Thank you. Happy Coding…!!!

How to install Subversion,Google App Engine,Android with Eclipse.

Image
This is tutorial assumes you already have Eclipse installed. You can install the any plugin for Eclipse using the Software Update feature of Eclipse. To install the plugin, using Eclipse: Select the Help menu > Install New Software. ... In the Work with text box, enter: For Subversion: http://subclipse.tigris.org/update_1.0.x For Android: https://dl-ssl.google.com/android/eclipse/ For Google App Engine: Eclipse 3.6 (Helios): http://dl.google.com/eclipse/plugin/3.6 Eclipse 3.5 (Galileo): http://dl.google.com/eclipse/plugin/3.5 Eclipse 3.4 (Ganymede): http://dl.google.com/eclipse/plugin/3.4 Eclipse 3.3 (Europa): http://dl.google.com/eclipse/plugin/3.3 Click OK In the Available Software dialog, select the checkbox next to Developer Tools and click Next. In the next window, you'll see a list of the tools to be downloaded. Click Next . Read and accept the license agreements, then click Finish . No...

MyAppSharer:An easy way to share apps with friends

Image
Do you have friends that are  constantly  bothering you to “send them that app you used last week”? Tired of trying to hold hands while sending them to the Market? Well, thankfully, that painful part of your Android know how may be coming to an end, thanks to an awesome new app: MyAppSharer. The app allows you to not only send them a direct Market link, but also to send them the APK directly via bluetooth, what's app, email, dropbox, SMS or QR code – which has the potential to be wonderful for either pulled apps or apps in development. If you want to get your hands on MyAppSharer, it’s a free download via the market link below. Be sure to check it out and sound off with your reviews in the comments!                                                             Market Link

Android Interview Question

HI, these are the few Android questions that was asked during my interview and some basic questions too that you have to know before going to any interview, I am sharing with you guys. Hope It would help you in your interview too...  It is impossible for me to give every and each answer over here,but yes if you are not getting any answer from anywhere then just let me know...:) 1) What is Android? 2) Features and Architecture of Android? 3) What is Android Market? 4) What is ADT, AVD, DVM, DDMS, Logcat? 5) Anatomy of an Android Application? 6) What are the basic Components in Android? 7) Describe the .apk format? 8) What is an action, resources. 9) How is nine-patch image different from a regular bitmap? 10) What are the dialog boxes that are supported in android? Explain. 11) What languages does Android support for application development? 12) What is the use of AndroidManifest.xml file in Android Application and the content too? 13) Difference between t...

Android Cloud to Device Messaging(C2DM):Project

Image
Android Push application is an Android Application which is registers to the C2DM Server.It allows user to send and store contact,message,images,maps from the Server to your Device. It uses a features Cloud to Device Messaging to deliver messages that actually pushes the messages to your device, therefore it saves much more battery and best of all,there is nothing you need to do to enable it. The entire project(Android Cloud to Device Messaging) is mainly divided into three parts i,e the primary processes involves in this project are      -Android Push Application      - Cloud to Device Messaging framework.      - Android Push server thats sends message via C2DM Server. Overview of LifeCycle: Check following URL too to know more about C2DM,Authorization Token And Third Party Application Server. Android cloud to Device Messaging:Tutorial Client Login AuthToken Third Party Application Server Some Screenshot: Se...

Android Code Style

Android follow standard Java coding conventions. We add a few rules: Exceptions: Never catch and ignore them without explanation. Exceptions: do not catch generic Exception, except in library code at the root of the stack. Finalizers: generally don't use them. Imports: Fully qualify imports. 1.Exceptions: do not ignore: Never do this.Never wr ite code that completely ignores an exception like this : void setServerPort(String value) { try { serverPort = Integer.parseInt(value); } catch (NumberFormatException e) { } } Always: Throw the exception up to the caller of your method. void setServerPort(String value) throws NumberFormatException {     serverPort = Integer.parseInt(value);  } Throw a new exception that's appropriate to your level of abstraction. void setServerPort(String value) throws ConfigurationException { try { serverPort = Integer.parseInt(value); } catch (NumberFormatException e) { throw new Configura...

Android Progress Dialog Example

Image
In situations when you need to wait some operation it is good practice to notify user that operation is in progress.For this cases in Android present several classes which can help with this. One of them I am going to demonstrate. In this tutorial, I will show you how to add a progress dialog to your Android application. A dialog is usually a small window or tab that appears before any activity in your application. It is intended to display alerts or information to the user. A progress dialog can be used to either show some processing activity to the user or to show the progress of some custom activity using the progress bar. To create a Progress Dialog, we can make use of the ProgressDialog class which is an extension of the AlertDialog class. It can be used to display a standard progress dialog with a spinning wheel and some custom text. You can display your Progress Dialog using a simple show () call on your dialog object. Here's the syntax to create a standard Progress dial...

Error: Unable to open class file R.java and How to fix it.

[2011-05-27 12:12:39 - listActivity] ERROR: Unable to open class file /root/workspace/Manifest.java: No such file or directory [2011-05-27 13:50:38 - listActivity] ERROR: Unable to open class file /root/workspace//R.java: No such file or directory R.java and Manifest.java is a automatically generated file. The ADT has a few such annoying bugs. But you can sort them out.. What usually helps is: 1. Close Project->Open Project > Build Automatically . 2.Another thing that sometimes helps is right click project > android tools > fix project properties and remove unnecessary content or jar files. 3.Or you can do Project->clean and Refresh . If still it not generating R.java files then check your class there must be a extra line.. Import R.java.*; Remove that and then do all the above one by one.. Hope it help .. If someone know other way please let me know. T...

Conversion to Dalvik format failed with error 1

Sometime You will encounter this problem when trying to Build Android Project on Eclipse..  You will get such output in console: [2011-05-24 09:25:03 - Android C2DM] Dx 1 error; aborting [2011-05-24 09:25:03 - Android C2DM] Conversion to Dalvik format failed with error 1 You can solve this problem: Go to Project » Properties » Java Build Path » Libraries and remove all except the "Android X.Y" (in my case Android 2.2). click OK.  and then Go to Project » Clean » Clean projects selected below » select your project and click OK.   That work for me. Hope it works for you too.!!!!

Third Party Applcation Server

Image
The Third Party Server is *your* server and can actually be any process written in any language (for example, it can be a batch process or a cron script). The role of the 3rd party "server" is to send the message to the device. The Server will store (or update) the registrationID received into its local database. So, eventually the server will have registrationIDs from the devices. Your server needs to get a ClientLogin Auth token in order to talk to the C2DM servers. When it wants to push a message to the device. For ClientLogin Auth_Token:  Click Here To send a message to a particular device, the Server needs to POST to the C2DM Service the following 4 things:  The accountName which will be arxxus.pushapp@gmail.com . An authentication Token. The registrationID of the device it wants to send the message.  The message itself (Message limit 1024 Bytes) Code: // Create a new HttpClient and Post Header  HttpClient httpclient = new DefaultHttpClient()...

ClientLogin for Installed Applications for C2DM - Tutorial

Image
Before you can write client applications that use the C2DM feature, you must have an HTTPS application server that meets the following criteria:Able to communicate with your client. Able to fire off HTTP requests to the C2DM serve r. Able to handle requests and queue data as needed. For example, it should be able to perform   exponential back off.  Able to store the ClientLogin Auth token and client registration IDs. The ClientLogin Auth token is included in the header of POST requests that send messages. For more discussion of this topic, see  ClientLogin for Installed Applications . The server should store the token and have a policy to refresh it periodically. The ClientLogin authorization process: Authorization with ClientLogin involves a sequence of interactions between three entities: the installed application, Google services, and the user. This diagram illustrates the sequence: When the third-party application needs to access a user's Googl...