Proguard errors with external jar – returns error code 1

While exporting my Android Application, Proguard returned with error code 1. I am using twitter4j external jars in my app. I already added library jars, rt.jar (For this I downloaded latest jdk1.7 which has* classes) and dontwarn statements also to proguard.cfg file. I included injars, libraryjars statements also.. Updated -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers […]

Android, catch webview redirection url

My web view loads a url that – after completing loading – gets changed to another url. how can I catch the new url. getURL() always returns the 1st url not the second. I can see the new URL if i use a browser but I can’t get if from the webview.

Android Compass that can Compensate for Tilt and Pitch

I’m trying to make a application on my Android phone (Nexus 4), which will be used in a model boat. I’ve added low pass filters to filter out the gitter from the sensors. However, the compass is only stable when the phone is flat on its back. If I tilt it up, (such as turning […]

How to read the message content of a new in coming message in android?

Can anyone help me with this? I want to read the message body of a new incoming SMS in android, programmatically. I tried something but that doesn’t return any contents: Uri uri = Uri.parse(“content://sms/inbox”); ContextWrapper context = null; Cursor c = context.getContentResolver().query(uri, null, null ,null,null); String body = null; String number=null; if(c.moveToFirst()) { body = […]

What's the difference between windowBackground and background for activities style?

I have a background set for all of the activities of the app by using the “android:background” parameter in the styles and setting the theme of the application to link to this style. All worked well, till I’ve noticed that for a dialog with a list of items, it makes each item to have the […]

Build failed after updating tools for Android L

I cannot build my project after updating the tools. I get this error in Android Studio. /build/exploded-aar/] Failed to parse : must be an integer number or codename. Any ideas? This manifest is from the support library I think. I also have another for my project which is min=14 target=19 <?xml version=”1.0″ encoding=”utf-8″?> <!– Copyright […]

android share images from assets folder

I’m trying to share an image from my assets folder. My code is: Intent share = new Intent(Intent.ACTION_SEND); share.setType(“image/jpg”); share.putExtra(Intent.EXTRA_STREAM, Uri.parse(“file:///assets/myImage.jpg”)); startActivity(Intent.createChooser(share, “Share This Image”)); but it doesn’t work. Do you have any ideas?

How do I set AM/PM in a TimePicker?

I am using a TimePicker in my app. Whenever the user opens the screen with the TimePicker, I initialize it with the current time. When I do this, the TimePicker shows AM instead of PM. Why does this happen? Is there anything I have to add in my code? Date initDate = m_NoteManageObject.getDateTimeArray(position); Calendar myCal […]

i want to add a color filter to the imageview

I’d like to add a ColorFilter to ImageView. Currently I’m using: ImageView iv = (ImageView)findViewById(resIdOfImageToFilter); iv.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP); I’ve checked Multiple Modes in PotterDuff such as SRC_IN, SRC etc., but I’m not getting any difference in any of the modes… All mode turns the whole ImageView in perfect Red color. I need to blend RED color […]

How can I set a shadow in each cell of a ListView?

I have a custom cell for an Android ListView. This custom cell is a relative layout with some views inside. There is a space between each cell, so I want to add to the bottom of the cells a shadow. I’ve been googling around but couldn’t found anything? I want to achieve something similar to […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.