O霉? : Android and Faceboo k in a same application

by sylvek » Tue, 03 Mar 2009 19:15:00 GMT


Sponsored Links
 to use it.
1. you need to register O by adding a generated code :
 http://www.facebook.com/code_gen.php?v=1.0& ;api_key=a35f127d062de5d648dff53ba6ef74f7
2. you need to authorize change status :
 http://www.facebook.com/authorize.php?v=1.0& ;ext_perm=status_update&api_key=a35f127d062de5d648dff53ba6ef74f7
3. you can launch the application and navigate to the map. You will
see your friends who stored them locations on the facebook application
or android application.



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. access points

Hi,

I have some code that uses a network connection .. I create a
connection by calling openConnection() on a URL object.

Is there any documentation that explains how this process works? Which
access point is being used? When that access point becomes invalid,
will it automatically switch to another accespoint? etc.

I would like to use only WIFI access points and otherwise fail even
tho 3G or GPRS could be available, is that possible?

Lew

-- 

2. HUGE PROBLEM - I really need help: after trying to retrieve videos from sd card, the app disappeared from the emulator entirely

Hi there,

I was working on the code below, trying to load all available videos
from the emulator sdcard into my gridview, I compiled and wanted to
test it, but the app has disappeared entirely from my emulator... what
can I do or better what have I done wrong in the code that could cause
a problem like that...???
I could really need some help, so if anyone may see what I have done
wrong, please tell, because I have no idea what's wrong...Thanks in
advance...

package com.mobilevideoeditor.moved;

import java.util.ArrayList;

import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.ImageView;




public class EditGalleryView extends Activity {
        Uri[] vidUris;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.videogrid);

        GridView vGrid=(GridView) findViewById(R.id.vgrid);
        vGrid.setAdapter(new VideoAdapter(this));

        Uri uri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;

        Log.d("EditGalleryView", "uri:"+uri);
        String[] projection = {
                MediaStore.Video.Media.DESCRIPTION,
                MediaStore.Video.Media.DATA
    };

        Cursor c = this.managedQuery(uri, projection, null, null,
                        MediaStore.Video.Media.DATE_ADDED);
                                 Log.d("EditGalleryView", "vids available:"
+c.getCount());

                                 ArrayList<Uri> experimentVids = new
ArrayList<Uri>();


                                     if (c.getCount() != 0) {
                                         c.moveToFirst();
 
experimentVids.add(Uri.parse(c.getString(1)));
                                         while (c.moveToNext()) {
 
experimentVids.add(Uri.parse(c.getString(1)));

                                          }
                              }
                                     Log.d("ClassName", "experimentVids.length:"
+experimentVids.size());
                                                              if 
(experimentVids.size() != 0)
{
                                                                vidUris = new
Uri[experimentVids.size()];
                                                                  for (int i = 
0; i <
experimentVids.size(); i++) {
                                                                      
vidUris[i] =
experimentVids.get(i);
                                                                  }
                                                                  
Log.d("EditGalleryView",
"vidUris:"+vidUris.length);
                                                              }
                                                          }


    public class VideoAdapter extends BaseAdapter {
        private Context mContext;

                public VideoAdapter(Context c) {
                    mContext = c;
            }

            public int getCount() {
                //return mThumbIds.length;
                return vidUris.length;
            }

            public Object getItem(int position) {
                //return null;
                return position;
            }

            public long getItemId(int position) {
                //return 0;
                return position;
            }

            // create a new ImageView for each item referenced by the Adapter
            public View getView(int position, View convertView, ViewGroup
parent) {
               ImageView imageView;
                if (convertView == null) {  // if it's not recycled,
initialize some attributes
                    imageView = new ImageView(mContext);
                    imageView.setImageURI(vidUris[position]);
                    imageView.setLayoutParams(new GridView.LayoutParams(85,
85));
                    imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
                    imageView.setPadding(8, 8, 8, 8);
                } else {
                    imageView = (ImageView) convertView;
                }

              //  imageView.setImageResource(mThumbIds[position]);
                return imageView;
            }

           /* // references to our images
            private Integer[] mThumbIds = {
                    R.drawable.sample_2, R.drawable.sample_3,
                    R.drawable.sample_4, R.drawable.sample_2,
                    R.drawable.sample_6, R.drawable.sample_3,
                    R.drawable.sample_4, R.drawable.sample_1,

            };*/

    }

}

-- 

3. Discrepancy between Active Installs and number of purchases

4. Why is the generated R class final?

5. object graphs

6. Preferences xml with custom layout

7. Need help - Android mkdir("/sdcard/") fails on Frayo