It seems a common issue, but i really can’t understand why is it happening even though i read ton of simialr issues. I am playing with a basic location class on a emulator device, i set everything – permissions (FINE and COARSE) , i have set the coordinates in the DDMS i also tried using the telne…
Tag: android
LOG4J in Android
I have a Java Project with a lot of files, which is using LOG4J. Now I am trying to Port it to the Android platform. Is it possible to reuse the code as it is, with LOG4J function calls? Current understanding: Property configuration won’t work (beans dependency) I tried with LOG4J for Android and SL4J L…
BasicAuthentication in android for webview not working
Hi I want to open this url http://3864.cloud-matic.net/ from my android webview and I have tried many ways but the app even not opens mainActivity. What I have tried is below. Please give me idea where I am wrong. Ali Answer This is most voted solution there I am not sure where to set the URL to open.Please s…
SSLHandshakeException Trust anchor for certification path not found Android HTTPS
I’m trying to establish a connection to a HTTPS site and I got this exception: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. My original code is as follows: Then, I read Google’s article here and modified my code …
android on Text Change Listener
I have a situation, where there are two fields. field1 and field2. All I want to do is empty field2 when field1 is changed and vice versa. So at the end only one field has content on it. It works fine if I attach addTextChangedListener to field1 only, but when I do it for both fields the app crashes. Obviousl…
Chaining static methods
This might not have a solution, or I might have not been able to find one, but here it is: !! Note: the code below is incorrect, I know. I just want to show what exactly I would like to accomplish. I would like to do something on the lines: … in order to do the below somewhere in another
Draw a line with curved edges in Android
I am using canvas.drawLine to draw some line in android but the lines are too sharp but i need a curved edges Here the 1 is what i have and 2 is what i want to achieve, means a line with curved edges rather than straight edges How can I achieve that ?? EDIT 2: I am trying to use
How to change fragments using Android navigation drawer
I know these types of question have already been here but still I have not found my answer for this question: I have created an application and used navigation drawer that has been created AUTOMATICALLY by the app (AndroidStudio) Here’s what I have: And some more here: I want to display another fragment…
Android: OutOfMemory error and the backstack
the following sheet represents the working flow in the application this question is about. I ran into problems with OutOfMemory Errors, mostly because users were able to switch from activity B to activity D multiple times (They are showing different content for every attempt), without the previous activity be…
Calling wait() after posting a runnable to UI thread until completion
I’m actually in need of waiting for the ui thread to execute a runnable before my application thread can continue. Is the wait()/notify() way a proper way to do it or is there something better for this? What I’m actually doing looks like this: Also when I do this I have to be sure that the thread …