Aw: Re: PackageManage: Couldn't copy package file to temp file.

by Matthias » Fri, 20 May 2011 20:13:20 GMT


Sponsored Links
 I see this happening with rooted G1s, was your phone rooted by any chance?

In any case, I can install packages via adb and Eclipse, but not using the 
'pm' command on the device.

-- 



Other Threads

1. flurry android

hello, does anybody know how to use

FlurryAgent.onEvent(String eventId, Map<String, String> parameters)

in an android activity to track events with flurry ?

thanks

-- 

2. Quries about the Media Recorder

Hi  Dave am having some issues regarding the Media recorder i will
mention one by one
1. I am recording audio using the class MediaRecord but after some
time it gives  AudioRecordThread Buffer overflow.So let me know the
default audio input buffer size and whether this overflow is comming
becoz of the auido buffer oveflow only???(code attaching below (code
attaching in SSUE-2)
2.I am trying to record video using mediaRecorder similarly and i am
using a surface view also for getting the camera output but now its
not working its telling Io exception eventhough my output file is
properly placed in the sdcard created.
3.I was using sound pool for just playing one ring tone but its
telling "Sample 1 is not ready"(code attaching in ISSUE-3)
4.i used the AudioRecord for getting audio raw buffer but still am
doubtful regarding the read operation on the AudioRecord.read call
where i have to make before or after startrecording???? how the read
operation is done internally?actually my requirement is to get the raw
bytes with some frequency from an AudioRecord which is recording(code
attaching in ISSUE-4)

code ISSUE-2
-----------------

        public boolean onCreateOptionsMenu(Menu menu){
                menu.add(0,EXIT,1,"Exit");
                return true;
        }
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        setTitle(R.string.Title_Launcher);
        recorder = new MediaRecorder();
        surfaceView = (SurfaceView) findViewById
(R.id.camcordersurface);
        mHolder = surfaceView.getHolder();
        mHolder.addCallback(this);
        mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
        recorder.setOutputFormat
(MediaRecorder.OutputFormat.THREE_GPP);
        recorder.setVideoSize(176, 144);
        recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
        recorder.setVideoFrameRate(15);
        String state = android.os.Environment.getExternalStorageState
();
        if(!state.equals(android.os.Environment.MEDIA_MOUNTED))  {
//            throw new IOException("SD Card is not mounted.  It is "
+ state + ".");
        }
        path = "/videofiles/f1.3gp";
        File directory = new File(path).getParentFile();
        if (!directory.exists() && !directory.mkdirs()) {
//          throw new IOException("Path to file could not be
created.");
        }
        path = Environment.getExternalStorageDirectory
().getAbsolutePath() +path;
        Toast.makeText(this, ""+path, Toast.LENGTH_SHORT).show();
        recorder.setOutputFile(path);
        Button start=(Button)findViewById(R.id.Button_start);
        Button stop=(Button)findViewById(R.id.Button_stop);
        final TextView tv_path=(TextView)findViewById(R.id.tv_path);
        tv_path.setGravity(Gravity.TOP);
        path = "/Video/File"+count +".3gp";
        path = Environment.getExternalStorageDirectory
().getAbsolutePath() + path;
        Toast.makeText(this, ""+path, Toast.LENGTH_SHORT).show();
        start.setOnClickListener(new OnClickListener(){
                public void onClick(View v)
                {
                        tv_path.setText("Path: ");
                        Toast.makeText(v.getContext(), "Recorder Started",
Toast.LENGTH_SHORT).show();
                        count++;
                path = "/Video/File"+count +".3gp";
                path = Environment.getExternalStorageDirectory
().getAbsolutePath() + path;
                        try {
                                        recorder_start();
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                }

        });
        stop.setOnClickListener(new OnClickListener(){
                public void onClick(View v)
                {
                        Toast.makeText(v.getContext(), "Recorder Stopped!",
Toast.LENGTH_SHORT).show();
                        try {
                                        recorder_stop();
                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                        tv_path.setText("Path: "+path);
                }

        });
    }
    public boolean onOptionsItemSelected (MenuItem item){
        switch (item.getItemId()){
        case EXIT :
            recorder.release();
                finish();
                return true;
                }
        return false;
        }
    public void recorder_start() throws IOException {
        String state = android.os.Environment.getExternalStorageState
();
        if(!state.equals(android.os.Environment.MEDIA_MOUNTED))  {
            throw new IOException("SD Card is not mounted.  It is " +
state + ".");
        }
        path = "/videofiles/f1.3gp";
        File directory = new File(path).getParentFile();
        if (!directory.exists() && !directory.mkdirs()) {
          throw new IOException("Path to file could not be created.");
        }
        recorder.setOutputFile(path);
        recorder.prepare();
        recorder.start();
      }
      public void recorder_stop() throws
IOException,IllegalStateException{
        recorder.stop();
      }
        @Override
        public void surfaceChanged(SurfaceHolder holder, int format, int
width,
                        int height) {
                // TODO Auto-generated method stub

        }
        @Override
        public void surfaceCreated(SurfaceHolder holder) {
                recorder.setPreviewDisplay(holder.getSurface());
        try {
                        recorder.prepare();
                } catch (IllegalStateException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
        recorder.start();
        }
        @Override
        public void surfaceDestroyed(SurfaceHolder holder) {
        recorder.release();

        }
---------------------------------
code ISSUE-3
---------------------
public class sp_class {

        public static final int SOUND_EXPLOSION = 1;
        private SoundPool soundPool;
        private HashMap<Integer, Integer> soundPoolMap;
        private static Context ctx;
        private static int stream_id;

        public sp_class(Context context) {
                ctx = context;
              soundPool = new SoundPool(4, AudioManager.STREAM_RING, 100);
              soundPoolMap = new HashMap<Integer, Integer>();
              soundPoolMap.put(SOUND_EXPLOSION, soundPool.load(ctx,
R.raw.drum, 1));
              System.out.println("soundPool.load(ctx, R.raw.drum, 1) : "
+soundPool.load(ctx, R.raw.drum, 1));
        }
 public void init(int sound) {
     /* Updated: The next 4 lines calculate the current volume in a
scale of 0.0 to 1.0 */
     AudioManager mgr = (AudioManager)ctx.getSystemService
(Context.AUDIO_SERVICE);
     float streamVolumeCurrent = mgr.getStreamVolume
(AudioManager.STREAM_MUSIC);
     System.out.println("streamVolumeCurrent : "
+streamVolumeCurrent);
     float streamVolumeMax = mgr.getStreamMaxVolume
(AudioManager.STREAM_MUSIC);
     System.out.println("streamVolumeMax : " +streamVolumeMax);
     float volume = streamVolumeCurrent / streamVolumeMax;
     System.out.println("volume : " +volume);

     /* Play the sound with the correct volume */
     stream_id = soundPool.play(soundPoolMap.get(sound), volume,
volume, 1, -1, 1f);
     System.out.println("got stream id : " +stream_id);
 }

 public void play() {
         init(SOUND_EXPLOSION);
 }
--------------------------------------------------
CODE ISSUE-4
----------------
                        arcd.startRecording();
//                      Reads audio data from the audio hardware for recording
into a direct buffer.
                        arcd.read (Buffer,0,60000);
                        if(Buffer == null)
                                Toast.makeText(v.getContext(), "Null buffer",
Toast.LENGTH_SHORT).show();
                        else
                                Toast.makeText(v.getContext(), "buf length = 
"+arcd.read
(Buffer,0,min_buffsize)+"", Toast.LENGTH_SHORT).show();
                        tv_path.setText("Recording state : 
"+arcd.getRecordingState
());
---------------------------------------------------
thanks in advance
Uk

-- 

3. External keyboard possible?

4. GSM stack - RRM, LAPDm

5. Retrieving Shoutcast Meta-Data from MediaPlayer not possible. Any alternative ?

6. regarding image in menu items

7. News and Weather Standings: 11/16/2009 - 11/25/2009