Skip to content
Advertisement

Tag: android

Proguard keep class names?

Hello I am writing an Android app and I have set up Proguard to obfuscate my application. I however use a classloader to dynamically load different extensions to my application. The problem is that these don’t load correctly if their names are changed. How do I keep Proguard from obfuscating specific class names? Answer Use the -keepnames option in your

Possible to determine size of file to be downloaded?

I currently have the following code which reads a file located on the web and writes it to a file on the phone: Does anyone know whether it is possible (using the setup above or otherwise) to determine the total number of bytes which are to be read before commencing with the download (in order to publish percentage progress to

Android Call a method from another class

I know that this Question is repeated but I can’t find the answer in the Internet. I want to call a method from another class. I have Class1 and Class2. In Class 2 I have this method: I want to call the above method from Class1. Thanks for any answer. —-EDIT—- —-LogCat— Answer You should use the following code :

Loop through Months in Java / Android

I want to loop through months of the year and print out. for example: 01/2012 02/2012 03/2012 04/2012 etc… Here is my code: It is printing out in int’s 1 2 3 4 5 However, when I convert it to a date string, as seen in code above, it does this: 05/2012 06/2012 08/2012 11/2012 03/2013 08/2013 Basically, the gap

Android Fatal Signal 11

In the app I’m developing on Android, I keep getting a Fatal Signal 11 error. I think it’s something to do with the way that I’m accessing the memory but I can’t figure out what is causing it. Here’s the LogCat: Answer I had been trying to call an uninitialised Canvas inside another Class so when it was trying to

Draw a scaled Bitmap to the Canvas?

The following code defines my Bitmap: … And the following code is used to execute/draw it (the unscaled Bitmap): My question is, how might I set it to draw the scaled Bitmap returned in the form of Bitmap scaled, and not the original? Answer Define a new class member variable: Bitmap mScaledBackground; Then, assign your newly created scaled bitmap to

Advertisement