android,ssl,httpclientRelated issues-Collection of common programming errors


  • rene
    android
    I have MainActivity (which extends Activity) and GameView (which extends SurfaceView).MainActivity has TextViews for score and for time left. GameView calculates score and time left, and updates the TextViews in MainActivity.This works wells, but the problem is when I re-start the game over and over. The more games are re-started, the slower they become and eventually the app force-closes.Below is what I see in logcat messages.08-21 10:01:59.826: E/MP-Decision(293): UP Nw:2.700000 Tw:180 rq:2.90

  • user3157940
    android bluetooth android-ndk shared-libraries
    I’m trying to build a shared library I can use to access native bluetooth API functions. I’m currently trying to compile a c file from: https://android.googlesource.com/platform/external/bluetooth/bluedroid/ Whenever I attempt to compile any of this code as a shared library I get numerous undefined reference errors.. it looks like to every function referenced by the header files. In my latest attempt, I copied the entire bluedroid/bta file to my eclipse project/jni folder. Using the include

  • virusss8
    android android-emulator
    My emulator is online, adb is seeing it, but emulator itself can’t get through the startup to homescreen. Startup routine stops when the title ANDROID is on the screen. I thought that the key to repaired emulator is update to the newest version of android sdk, but it wasn’t worked. It is still the same problem. Thanks12-31 15:47:32.269: I/DEBUG(30): debuggerd: Jun 30 2010 14:39:19 12-31 15:47:33.351: D/qemud(37): entering main loop 12-31 15:47:33.359: I/Netd(29): Netd 1.0 starting 12-31 15:47:33

  • Raghunandan
    android
    I am trying to start an activity from other one(MainAcitivty) but this is not working it stops immediately whenever i click the button.code for MainActivity.java:public class MainActivity extends Activity implements OnClickListener {EditText title,body;Button btn,getnotes;NotepadDb notepad;Cursor cursor;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);title=(EditText)findViewById(R.id.title);body=(EditText)find

  • aSystemOverload
    android
    I’ve tried all the other posts on here and other places to solve this, but can’t get it working.I’m using the Eclipse IDE, it suggests there are no problems, but once it loads up the virtual device, and the application it force closes.On advice from another post, I’m just re-running the app with logCat loaded… Well attempting to, Eclipse freezes up sometimes with logCat loaded when I try to run the app. Also my Virtual Device seems to take a silly long time to boot into the GUI (when loading

  • Janusz Chudzynski
    android
    I am trying to parse a JSON using the JSONParser class presented below.Based on breakpoints it seems like it’s crashing on this line of code:HttpResponse httpResponse = httpClient.execute(httpPost);I don’t know how to proceed with it. I will appreciate any help.FRAGMENT public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {View view = inflater.inflate(R.layout.agenda, container, false);final ListView listview = (ListView)view.findViewById(R.id.listVie

  • Student
    java android google-maps
    I am working on a project that includes location detection using the GPS so I found this code that included a working .apk file but when I tried to compile it and run it, it always crashes. The application crashes when I try opening it in an emulator or on a Samsung S4 mobile. N.B. I’ve chosen the correct target which is API 17 and downloaded Google play services and included it in the library of the project.Here is the code if anyone can helpManifest file<?xml version=”1.0″ encoding=”utf-8″

  • user998953
    android target
    When I update my android app target form 2.2 to 4.2.2 and update the manifest.xml fileMy app can’t open anymore . there is some Native code error info in my logcat.here is the logs: I don’t know what happend06-25 19:41:09.229: I/DEBUG(4120): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 06-25 19:41:09.229: I/DEBUG(4120): Build fingerprint: ‘SKY/SKY_IM-A760S/ef33s:4.0.4/IMM76D/S0211228.EF33S_004:user/release-keys’ 06-25 19:41:09.229: I/DEBUG(4120): pid: 13302, tid: 13341 >&g

  • Bananeweizen
    android listview sqlitedatabase
    In my application’s database I have 2 tables one called “PLAYERS” which holds the data of every user and “FRIENDSLIST” which is intended to be a personal “friends” list for every registered account.How the process goes in my app is that when a player (Joe) registers a Username his information goes into the “PLAYERS” table and now he could go into my FindFriends activty,search the app for his friend’s Username (Bob) and then clicks the ADD button.The friend (Bob) then gets added to the “FRIENDSLI

  • chentc
    android mediacodec
    I have a bunch of local images saved as jpeg files. My images are captured using CameraPreview and the PreviewFormat is as default: NV21. I want to generate a small video from a fixed number of images. I am not going to use FFMpeg because it requires NDK and will introduce compatibility issues. MediaCodec and MediaMuxer seems work but there are not one working solutions on the web. There are a few references lead to my current solution.1.EncodeAndMuxTest: http://bigflake.com/mediacodec/EncodeAnd

  • user1938742
    java android ssl
    I know that there are many similar threads out there, but none of the solutions presented in these threads helped me, so here comes another one.I’ve an Android client communicating with a Java server. I want the communication to be secure so I use SSL. However, the handshake fails with the following error:From logcat:03-28 03:31:30.171: W/System.err(1214): javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb81201c8: Failure in SSL library, usual

  • Ken Allen
    java ssl
    I’m trying to do some json/https rpc in Java with client certificate authentication. I’m trying to use the windows keystore for the client cert and it’s not working – the server returns a decrypt_error ssl alert. I can hit the same server with the same client cert in IE so I know it’s not a problem with the cert itself. I can also do it from java if I pull the key from a different source. The server is running Apache 2.2.8 with openssl 0.9.8g. I tried different ciphers in the mod_ssl config but

  • Dark Star1
    ssl tomcat5.5
    I’m having trouble getting tomcat to load a self signed certificate. I followed the instructions at this site to the letter, modified my connectors in the server.xml file, added the security constraint to my tomcat.conf file. The following is an out put of my catalina.out: Using CATALINA_BASE: /usr/share/tomcat5 Using CATALINA_HOME: /usr/share/tomcat5 Using CATALINA_TMPDIR: /usr/share/tomcat5/temp Using JRE_HOME: /usr/lib/jvm/jre Created MBeanServer with ID: -hnoxxr:gj0olj3z.0:s1542571

  • simonC
    email ssl smtp jboss5.x
    I’m, having problems sending emails over smtp with TLS enabled on port 587 on Jboss5.1the problem looks like this : sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetI have also tried to add the CA keys in the jre keystor with the java keytool … It looks like i’m missing something here…any hints?I have this settings in mail-service.xml: <property name=”mail.store.protocol” value=”pop3″/><property name=”mail.transp

  • stanleyhope
    javascript ajax ssl internet-explorer-8
    The problem: I have a site with a recently installed SSL certificate that is very dependent on POST calls over AJAX. The site worked fine on Internet Explorer 8 before the SSL certificate, but now does not.Since I haven’t been able to get a good way to read any error messages, I haven’t been able to pin down where the bug is coming from. I will try to list as much as I know/ have figured out, and I greatly appreciate any suggestions.What I know:On IE8, the site will not perform any AJAX POST cal

  • Bhaskar Sharma
    java ssl javax.mail
    I was trying to send mail using java. The code i was using worked when I used it with GMail’s SMTP server (“smtp.gmail.com”). But when I changed the code (smtp_host_name, smtp_port properties and authentication UserID/Pwd) to send email through the SMTP server of my ISP provider, this code failed.Here is my code-String host = “smtp server host of my isp provider”;Properties props = System.getProperties();props.put(“mail.smtp.host”, host);props.put(“mail.debug”, “true”);props.put(“mail.transport.

  • user1136342
    unit-testing ssl junit ssl-certificate playframework-2.2
    Is it possible to write a test with Play’s built-in testing for an SSL page? I use the example Integration test:import org.junit.*;import play.mvc.*; import play.test.*; import play.libs.F.*;import static play.test.Helpers.*; import static org.fest.assertions.Assertions.*;import static org.fluentlenium.core.filter.FilterConstructor.*;public class IntegrationTest {/*** add your integration test here* in this example we just check if the welcome page is being shown*/@Testpublic void test() {runnin

  • jiduvah
    android ssl httpclient
    The app I am working on is supporting android 2.3 upwards. As the download manager does not support https in 2.3(I can’t comprehend why), I am implementing my own version.The problem I have is if android changes network (wifi to 3g etc) when downloading content I am getting the following error.06-14 17:26:48.770: W/System.err(15648): javax.net.ssl.SSLException: Read error: ssl=0x270420: I/O error during system call, Connection timed out 06-14 17:26:48.770: W/System.err(15648): at org.apache.h

  • DreamsNeverDie
    java android web-services ssl https
    I am calling https webservice and its works fine before, but now when i am trying to call it its give me following errors.Log Errors :12-23 06:28:11.969: W/System.err(3014): javax.net.ssl.SSLException: SSL handshake aborted: ssl=0x1cc160: I/O error during system call, Connection reset by peer 12-23 06:28:11.979: W/System.err(3014): at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method) 12-23 06:28:11.979: W/System.err(3014): at org.apache.harmony.xnet.provi

  • rethab
    java ssl jetty activemq
    I have setup ActiveMQ such that it only accepts SSL connections from clients and all users are authenticated based on certificates.I have for example this connector:<transportConnector name=”ssl” uri=”ssl://0.0.0.0:61617?needClientAuth=true&amp;maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600″/>and this is one user (in users.properties) userA=CN=User A, OU=Engineering, O=Organization, L=Zurich, ST=Zurich, C=CHNow this all works and the client can communicate as expecte

  • AsAFink
    android json http-post httpclient
    Im trying to send an JSONObject over HTTPPost, however now Im receiving a 400 error.I’ve been going through with the server coder, and making smaller and more concise calls with a less complicated JSON object, however I still receive the same 400 error. How do I go about fixing it?import java.io.IOException; import java.io.UnsupportedEncodingException;import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.h

  • Sam
    java android json android-asynctask httpclient
    I have been stuck on this problem for a day or two now, so i decided to see if anyone out there could help me.The current goal i have, is to make a HttpPost that connects to, and executes a script that i have on my Wamp server. I have implemented a class that extends AsyncTask, and includes the 3 necessary methods, that are required in order for it to work effectively. I will first show you the code that i have used to put the variables into a Json Object, followed by the JSONParser class, that

  • dongshengcn
    java https connection httpclient
    I am using apache HttpClient. While debugging something, I found I am getting error when I execute the same HTTPS HEAD request for the second time using the same connection (connection kept alive). The host is https://dongshengcn.iriscouch.com. I am not sure where is wrong, is the server? is it a HttpClient bug? I tend to think this is a HttpClient bug somewhere. Anyways, I am wondering if someone can point me to the right direction. Here is the code and logging info:import org.apache.http.Http

  • jiduvah
    android ssl httpclient
    The app I am working on is supporting android 2.3 upwards. As the download manager does not support https in 2.3(I can’t comprehend why), I am implementing my own version.The problem I have is if android changes network (wifi to 3g etc) when downloading content I am getting the following error.06-14 17:26:48.770: W/System.err(15648): javax.net.ssl.SSLException: Read error: ssl=0x270420: I/O error during system call, Connection timed out 06-14 17:26:48.770: W/System.err(15648): at org.apache.h

  • cosjav
    java http httpclient apache-httpclient-4.x http-head
    Using the test class below, the line at ///// 1 ///// throws a NoHttpResponseException (see exception trace with logging at the end of the question). Executing any of the other lines ///// 2-to-8 ///// prints out the headers fine. Is this a bug in HttpClient 4.3.x or am I doing something wrong (I have tested this with both 4.3.1 and 4.3.2)?import java.util.Arrays;import org.apache.http.client.methods.*; import org.apache.http.impl.client.*; import org.apache.http.params.*;public class PrintHeade

  • Nirali
    android android-asynctask connection httpclient
    I want to read JSon from a local web server in my android Application.This is my code :public class MainActivity extends Activity implements OnItemClickListener {HttpClient client; JSONObject json;public final static String EXTRA_MESSAGE = “com.example.gestionformations.MESSAGE”; final static String URL = “http://10.0.2.2/apis/general/get_categories/”; final static String LOG = “gestionFormations.log”; ListView conferenceListe; ListView coursListe;@Override protected void onCreate(Bundle savedIn

  • user2548513
    c# javascript httpclient content-type boundary
    I have a bit of a messy situation that I am hoping someone can offer a solution for. So please bare with me while I offer a bit of background. Basically I am using javascript to communicate with a third party service. As part of their authentication process they need the “multipart/form” body of the post message including an image to be encrypted in md5, this is added to a string including the date, and a few other things and then a HMAc/SHA1 run on it. So in the end they have the multipart b

  • Maksim
    java file-upload httpclient pandastream
    I’m building Java client that will automatically upload file from Java server to Panda Instance that I installed on my EC2 cloud using their AMI. I’m trying to use Apache HTTP Components to upload to Panda Server (Panda Stream). It works fine with my browser client but for some reason I can’t upload from that library. Here is my code:String videoUploadUrl = “http://[panda server ip]/videos/” + getVideoID() + “/upload.xml”; File file = new File(“/temp/videofile.mp4”);DefaultHttpClient httpclient

  • RHT
    java apache java-ee weblogic httpclient
    Every now and then I see following stacktrace in the log in which, HttpClient socket times out trying to access text/script content from another server. My question is what config settings should I check for my J2EE app running on Weblogic, on Linux? I am specifically looking for the following.JVM timeout params HttpClient params Weblogic timeout params or any other config like number of threads etc. J2EE Application settings like servlet config etc. Operating system resources like threads, file

  • Imdad Sarkar
    android httpclient
    I need to get all headers from a url. to do so i am using the following codetry {HttpClient client = HttpClientBuilder.create().build();HttpGet request = new HttpGet(“http://onlineservice.banglalinkgsm.com/Construction.htm”);HttpResponse response = client.execute(request);Header[] headers = response.getAllHeaders();for (Header header : headers) {Result =Result +”Key : ” + header.getName() + ” ,Value : ” + header.getValue();} catch (Exception e) { }but when i run the app it crashs. I can not fig

Web site is in building