Tag: java

Eclipse 3.6 frequently stalls during Content Assist

Has anyone ever solved this issue? The auto complete stalls so frequently and for so long, I quit using it altogether. I’ve only seen one other post for this and the answer did not help. Any guidance would be greatly appreciated.

Best way to implement Socket.io in android

I am planning to implement Socket.io in android by this library for a chat based application. As far as I understood the library seems to be pretty good. I want to know how to maintain a single socket connection throughout the app all the time? Here I have listed out ways to achieve, in which […]

GoogleApiClient.connect()' was expected to be of type interface but was found to be virtual

So I am connecting to the google api client like this. googleApiClient = new GoogleApiClient.Builder(context) .addApi(LocationServices.API) .addApi(ActivityRecognition.API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); googleApiClient.connect(); This exact same code I am using in several places and it works well. It’s not different from what you see in their tutorials. But now: java.lang.IncompatibleClassChangeError: The method ‘void com.google.android.gms.common.api.GoogleApiClient.connect()’ was expected to […]

Android – custom button with shape drawables and a gradient programmatically

I want to make a custom button like this program does with perhaps a radial gradient. I subclassed view, and draw three shape drawables and then draw the text. the text seems off center, so I tried to draw a bounding rectangle for the text, but no luck there. and was planning on adding a […]

Keep inner interface method names in proguard

Lets say I have.. public class SomeClass { public interface someInterface { public void firstMethod(String variable); public void secondMethod(String variable); public void thirdMethod(); } } and I do.. -keep,includedescriptorclasses public class com.somepackage.SomeClass { <fields>; <methods>; } -keep public interface com.somepackage.someInterface {*;} I end up with public interface someInterface { public void a(String variable); public void […]

java.lang.SecurityException: attempting to read gservices without permission

I have recently changed from adMob 6.4.1 to Google Play Services rev 15 and have just received notice of a new crash report that I do not understand: java.lang.SecurityException: attempting to read gservices without permission: Neither user 10158 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES. at android.os.Parcel.readException(Parcel.java:1425) at android.os.Parcel.readException(Parcel.java:1379) at xs.a(SourceFile:133) at xo.a(SourceFile:133) at xo.a(SourceFile:118) at ud.d(SourceFile:88) […]

How to delete user installed certificate programmatically?

I had installed a certificate programmatically. I am able to uninstall it manually by going Settings -> Security -> Trusted Credentials -> User -> Choose the certificate and click the remove button I want to remove the certificate programmatically. Here is the code that I tried but it didn’t work. javax.security.cert.X509Certificate x509 = javax.security.cert.X509Certificate.getInstance(caRootCertBytes); KeyStore […]

UnsatisfiedLinkError (Native method not found)

There is a block of code which is working fine on android 4.1.2 but not on 4.0.3, the crash log is of 4.0.3 I am getting UnsatisfiedLinkError Exception Please guide me thanks 02-22 12:57:09.319: D/dalvikvm(1312): Trying to load lib /data/data/com.kosh.android/lib/libsqliteX.so 0x41056f48 02-22 12:57:09.319: D/dalvikvm(1312): Added shared lib /data/data/com.kosh.android/lib/libsqliteX.so 0x41056f48 02-22 12:58:02.060: W/dalvikvm(1312): No implementation found […]

Good software engineering vs. Security

The Security and Design guidelines go to great length outlining various methods to make it more difficult for an attacker to compromise in-app billing implementation. Especially noted is how easy it is to reverse-engineer a .apk file, even if obfuscated via Proguard. So they even recommend modifying all sample application code, especially “known entry points […]

Android development: Visual Studio + Java. Is it possible (worth a try)?

I know there are (expensive) framework which let you write android apps in VS C# and compile it to android apk. I also know, that it is possible to write Java application in VS (link). Is it possible, maybe even not harder than in Eclipse, writing android apps in Visual Studio using some free plugins/frameworks/tools? […]

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