cyclic "android.process.acore" failure (1.0r2 and 1.1r1)

by sreten » Fri, 06 Mar 2009 05:19:39 GMT


Sponsored Links
 Hi,

I hope this is the correct area. I have been using the SDK for a while
now. For some reason
only projects I create cause the home screen to go into cyclic lockup
as the force close on
android.process.acore just shortly launches another one that fails.

I can delete userdata-qemu.img to get a running emulator back. I've
tried updating / replacing
everything. I can write a very simple project and that is fine. Copy
that and update it with say
more resource files and it then causes the above problem for no
apparent reaason.

It is hard to believe an appplication can inadvertantly cause such a
major problem. I'm a bit
like a headless chicken, I do not know where to start looking for the
cause in my code.


There is a repeated Android runtime error,
Uncaught handler  : thread application loader exiting due to uncaught
exception
java.lang.ClassCast Exception: android .text.Spanned string
           more AndroidRuntime errors
final one at java.lang.Thread.run(Thread.java:935)

/Sreten.





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



Other Threads

1. How to attach a video to an email...???

Hi everyone,

I am working on a Video App, where you can click on a video from the
sdcard. This click event opens a menu (I used a options menu) that
provides the user with different sharing options, e.g. email,
bluetooth etc. This part works fine so far... What I am now trying to
do is, when the user chooses "email" the app should open the email app
of the phone via an intent (this also works fine) and should directly
attach the video he clicked before to the new email .

The last part is, where I am stuck because I don't know how to tell
the app that the video that was clicked before to open the menu should
be attached to the mail:

Intent i = new Intent(Intent.ACTION_SEND);
                        i.setType("text/plain");
                        i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        i.setType("video/mp4");
                        i.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new
File(Environment.getExternalStorageDirectory(),"DON'T KNOW HOW TO
ACCESS THE CLICKE FILENAME")));
                        startActivity(i);



I would appreciate any advice or help. Thank you in advance

...I will post my entire code below...


package com.mobilevideoeditor.moved;

import java.io.File;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;


public class ShareGalleryView extends Activity {
        private Cursor videocursor;
        private int video_column_index;
        int count;

        public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.videogrid);

        //create new Grid View
        GridView vGrid=(GridView) findViewById(R.id.vgrid);
        registerForContextMenu(vGrid);
        vGrid.setAdapter(new VideoAdapter(this));

        init_phone_video_grid();

        vGrid.setOnItemClickListener(new OnItemClickListener() {

        @Override // click on item and open options menu
                public void onItemClick(AdapterView<?> parent, View v, int 
position,
long id) {
                        openOptionsMenu(); //Opens Options Menu by clicking on 
an item

                        }
        });

    }

        private void init_phone_video_grid() {
                System.gc();
                String[] proj = {
                                MediaStore.Video.Media._ID,
                                MediaStore.Video.Media.DISPLAY_NAME,
                                MediaStore.Video.Media.DATA
                };

                videocursor =
managedQuery(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, proj, null,
null, null);
                count = videocursor.getCount();
                GridView vGrid=(GridView) findViewById(R.id.vgrid);
        vGrid.setAdapter(new VideoAdapter(this));
        }

        @Override //creates options menu with menu-items
        public boolean onCreateOptionsMenu(Menu menu) {

          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu_gallery_share, menu);
          return super.onCreateOptionsMenu(menu);
        }
        @Override //what happens when a menu item is clicked
        public boolean onOptionsItemSelected (MenuItem item){


                 try{
        //Facebook
        if (item.getItemId() == R.id.menu_facebook)
                {
                 //TODO open fb
                new AlertDialog.Builder(this)
                  .setTitle("No Service")
              .setMessage("Sorry, Facebook is not supported yet!")
              .setNeutralButton("Close", new
DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                                // TODO Auto-generated method stub
                    }}).show();
                        return true;

                }
           //YouTube
                else if (item.getItemId() == R.id.menu_youtube)
                {
                        //TODO open YouTube

                        new AlertDialog.Builder(this)
                          .setTitle("No Service")
                      .setMessage("Sorry, YouTube is not supported yet!")
                      .setNeutralButton("Close", new
DialogInterface.OnClickListener() {
                                @Override
                                public void onClick(DialogInterface dialog, int 
which) {
                                        // TODO Auto-generated method stub
                            }}).show();

                      return  true;
                }
                else if (item.getItemId() == R.id.menu_email)
                {

                        Intent i = new Intent(Intent.ACTION_SEND);
                        i.setType("text/plain");
                        i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        i.setType("video/mp4");
                        i.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new
File(Environment.getExternalStorageDirectory(),"DON'T KNOW HOW TO
ACCESS THE CLICKE FILENAME")));
                        startActivity(i);

                        return true;

                }
                else if (item.getItemId() == R.id.menu_bluetooth)
                {
                        // TODO send via bluetooth
                        new AlertDialog.Builder(this)
                          .setTitle("No Service")
                      .setMessage("Sorry, Bluetooth is not supported yet!")
                      .setNeutralButton("Close", new
DialogInterface.OnClickListener() {
                                @Override
                                public void onClick(DialogInterface dialog, int 
which) {
                                        // TODO Auto-generated method stub
                            }}).show();
                        return true;

                }

                    }
                 catch(Exception e)
                    {
                    e.printStackTrace();
                    }
                      return super.onContextItemSelected(item);
        }


        public class VideoAdapter extends BaseAdapter {
        private Context vContext;

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

            public int getCount() {
                return count;
            }

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

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

            // create a new ImageView for each item referenced by the Adapter
            public View getView(int position, View convertView, ViewGroup
parent) {
                System.gc();
                      TextView tv = new 
TextView(vContext.getApplicationContext());
                      String id = null;

                  if (convertView == null) {
                        video_column_index =
        
videocursor.getColumnIndexOrThrow(MediaStore.Video.Media.DISPLAY_NAME);
                        videocursor.moveToPosition(position);
                        id = videocursor.getString(video_column_index);
                        tv.setText(id);
                  } else
                        tv = (TextView) convertView;
                  return tv;
                    }
            }

}



-- 

2. If and How to get video thumbnails?

Hi,
I am working on a video app. And I have created a GridView that shall
display any video stored on the sdcard. Currently it only displays the
name of the video file.

I wanted to ask if and how it would be possible instead of showing
only the name to also display thumbs (or a frame preview) of the
videos ?!?

I would be grateful for any help...thanks.



 I wanted to ask if and how it would be possible instead of showing
only the name to also display thumbs (or a frame preview) of the
videos ?!?

I would be grateful for any help...thanks.

This is the code I have used so far:

package com.mobilevideoeditor.moved;

   import android.app.Activity;
   import android.content.Context;
   import android.database.Cursor;
   import android.os.Bundle;
   import android.provider.MediaStore;
   import android.view.View;
   import android.view.ViewGroup;
   import android.widget.BaseAdapter;
   import android.widget.GridView;
   import android.widget.TextView;




   public class EditGalleryView extends Activity {
       private Cursor videocursor;
       private int video_column_index;
       int count;

       public void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.videogrid);



           init_phone_video_grid();




       }

           private void init_phone_video_grid() {
           System.gc();
           String[] proj = {
                   MediaStore.Video.Media._ID,
                   MediaStore.Video.Media.DISPLAY_NAME,
                   MediaStore.Video.Media.DATA
           };

           videocursor =
managedQuery(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, proj, null,
null, null);
           count = videocursor.getCount();
           GridView vGrid=(GridView) findViewById(R.id.vgrid);
           vGrid.setAdapter(new VideoAdapter(this));
           }


       public class VideoAdapter extends BaseAdapter {
           private Context vContext;

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

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


           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) {
             System.gc();
             TextView tv = new
TextView(vContext.getApplicationContext());
             String id = null;
             if (convertView == null) {
                   video_column_index =

videocursor.getColumnIndexOrThrow(MediaStore.Video.Media.DISPLAY_NAME);
                   videocursor.moveToPosition(position);
                   id = videocursor.getString(video_column_index);

                   tv.setText(id);
             } else
                   tv = (TextView) convertView;
             return tv;
           }



       }

-- 

3. OOT : WTA Paket sms termurah

4. Handroid1 (Porting Android to Samsung Vodafone 360 H1)

5. ftp blapk market apa ya

6. SIGSEGV on Droid X (libskia.so)

7. Errors after customizing Linux Kernel