404 Error

by cuil yahoo » Mon, 21 Feb 2011 01:55:44 GMT


Sponsored Links
 Can somebody please point out the error in the following code ? i am always
getting a 404 not found error.

String url =
https://spreadsheets.google.com/feeds/spreadsheets/private/full/?oauth_signature=2343243D&oauth_consumer_key=anonymous&oauth_version=1.0&oauth_signature_method=HMAC-SHA1&oauth_timestamp=12981233697&oauth_nonce=somthing...<https://spreadsheets.google.com/feeds/spreadsheets/private/full/?oauth_signature=veCGhtgHZ9IdVg%3D&oauth_consumer_key=anonymous&oauth_version=1.0&oauth_signature_method=HMAC-SHA1&oauth_timestamp=12981233697&oauth_nonce=231234123345223760713>(
i have changed the url a bit for reasons.. )

            HttpGet get = new HttpGet(url);

            HttpClient client = new DefaultHttpClient();
            HttpResponse response = client.execute(get);


            if (response.getStatusLine().getStatusCode() ==
HttpStatus.SC_OK) {

}

Isn't this the normal way of getting the response to any get call ?



Thanks,


--
Cuil

-- 



RE: 404 Error

by Tommy » Mon, 21 Feb 2011 04:11:37 GMT


 I notice some spaces in the string. You may want to replace those with %20
and see if it makes a difference.

 

From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of cuil yahoo
Sent: Sunday, February 20, 2011 12:55 PM
To: android-developers@googlegroups.com
Subject: [android-developers] 404 Error

 

Can somebody please point out the error in the following code ? i am always
getting a 404 not found error.

String url = 
https://spreadsheets.google.com/feeds/spreadsheets/private/full/?oauth_signa
ture=2343243D
<https://spreadsheets.google.com/feeds/spreadsheets/private/full/?oauth_sign
ature=veCGhtgHZ9IdVg%3D&oauth_consumer_key=anonymous&oauth_version=1.0&oauth
_signature_method=HMAC-SHA1&oauth_timestamp=12981233697&oauth_nonce=23123412
3345223760713>
&oauth_consumer_key=anonymous&oauth_version=1.0&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=12981233697&oauth_nonce=somthing... ( i have changed
the url a bit for reasons.. )

            HttpGet get = new HttpGet(url);

            HttpClient client = new DefaultHttpClient();
            HttpResponse response = client.execute(get);


            if (response.getStatusLine().getStatusCode() ==
HttpStatus.SC_OK) {

}

Isn't this the normal way of getting the response to any get call ? 


        
Thanks,


--
Cuil

-- 


-- 


Sponsored Links


Other Threads

1. How to open new view (call an activity) from options menu defined in XML

I am trying to open another view from the options menu of my program.

My options_menu.xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/settings_button"
          android:title="Settings"
          android:icon="@android:drawable/ic_menu_preferences" />
    <item android:id="@+id/about_button"
          android:title="About"
          android:icon="@android:drawable/ic_menu_myplaces" />
</menu>

My mnfsms.java
package com.example.mnfsms;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class mnfsms extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        /*        OnClickListener myocl = new View.OnClickListener() {
        public void onClick(View v){
                Intent myi = new Intent(mnfsms.this, mnfsms_settings.class);
                startActivity(myi);
        }
    };*/
    }

    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.options_menu, menu);

        MenuItem mi_settings = (MenuItem)findViewById
(R.id.settings_button);
        mi_settings.setIntent(new Intent(this,
mnfsms_settings.class));

        return true;
    }
}

mnfsms_settings (another activity) is what I am trying to open.

Whether the Intent is in the onCreateOptionsMenu or onCreate
functions, the application still crashes when it sets the intent to
the item.

What I have used to try to help me:
http://developer.android.com/guide/topics/intents/intents-filters.html
http://developer.android.com/resources/faq/commontasks.html#opennewscreen
http://developer.android.com/guide/topics/ui/menus.html
http://developer.android.com/guide/topics/fundamentals.html
http://learnandroid.blogspot.com/2008/01/opening-new-screen-in-android.html

2. Strange crashing while using OpenGL

Hello,

I am currently developing an application that uses OpenGL with the
Android 1.6 SDK.
I am testing on both a Nexus One and an I/O Device (Magic).

The application runs perfectly on the Nexus.

On the Magic, the application crashes >50% of the time on the first
frame with a segmentation fault (see end of post). If it does not
crash immediately, it runs fine and exits normally.

The crash occurs when calling glDrawArrays for one of my vertex buffer
objects.
Oddly, when I enable lighting and one light, the application no longer
crashes. Unfortunately this is not a solution because the application
runs too slowly with lighting.

I have found reports of crashing with vertex buffer objects when using
non-direct buffers, but I am using direct buffers.

For debugging, I modified my code to Log each gl call before it was
made. Everything looks fine to me but maybe I'm doing something wrong:
http://p5ui5jjnxq.pastebin.com/m2e2c1754

Does anyone have any idea what could be causing the segmentation
fault?
Any ideas why lighting would affect it, or why everything is fine on
the Nexus?
Is there something in addition to using direct buffers that needs to
be done when using vertex buffer objects?

Thanks

-----------------------------------------------------------------------------------------------------------------------------------------------------------
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google_ion/google_ion/sapphire/sapphire:1.6/
DRC83/14721:user/test-keys'
pid: 536, tid: 553
signal 11 (SIGSEGV), fault addr 001fa000
 r0 001b51b8  r1 001f9ff8  r2 00000003  r3 001b9e70
 r4 001f9ffc  r5 001b9e74  r6 00000014  r7 000003ff
 r8 00000000  r9 001b9e58  10 00000003  fp 001b51a4
 ip 00000002  sp 44847d08  lr 8042b8dc  pc 8043fdd8  cpsr 20000010
         #00  pc 0003fdd8  /system/lib/libhgl.so
         #01  lr 8042b8dc  /system/lib/libhgl.so
stack:
    44847cc8  001af0e0  [heap]
    44847ccc  001177e0  [heap]
    44847cd0  4210aecc
    44847cd4  8043bac0  /system/lib/libhgl.so
    44847cd8  001af0e0  [heap]
    44847cdc  00000000
    44847ce0  001b00e0  [heap]
    44847ce4  804251a0  /system/lib/libhgl.so
    44847ce8  001177e0  [heap]
    44847cec  00984300
    44847cf0  001b5198  [heap]
    44847cf4  001af0e0  [heap]
    44847cf8  001afbdc  [heap]
    44847cfc  00000005
    44847d00  df002777
    44847d04  e3a070ad
#00 44847d08  00000400
    44847d0c  001177e0  [heap]
    44847d10  00989300
    44847d14  001b5198  [heap]
    44847d18  001af0e0  [heap]
    44847d1c  001afbdc  [heap]
    44847d20  00000000
    44847d24  00001000
    44847d28  00000008
    44847d2c  00000000
    44847d30  00000000
    44847d34  001af0e0  [heap]
    44847d38  001b00e0  [heap]
    44847d3c  001177e0  [heap]
    44847d40  4210aecc
    44847d44  4210aeb8
    44847d48  000003c0
    44847d4c  8041f79c  /system/lib/libhgl.so
-----------------------------------------------------------------------------------------------------------------------------------------------------------

3. Forward locking or copy protection outside the Marketplace

4. HTC S740 Android Porting

5. View.getLocationInWindow() only returns Y (and sometimes not even X)

6. Thx to boss lesjaw

7. Emulator on Ubuntu problem running after first time starting emulator