Who can tell me why the delete function of ContentResolver can delete the video file on sd card?

by Henry » Fri, 24 Jul 2009 06:38:15 GMT


Sponsored Links
 Hi,when I use ContentResolver to delete one entry of video from the
media database(URI is MediaStore.Video.Media.EXTERNAL_CONTENT_URI),the
real video file will be deleted from the sdcard.But when I use
ContentResolver to delete one entry of mp3from the media database(URI
is MediaStore.Audio.Media.EXTERNAL_CONTENT_URI),the real mp3 file will
not be deleted.Who can tell me the reason?Thanks.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Import bug MapView Superclass not found Dalvik class loader

Hello and Good Morning,

I was doing examples of MapView to finish my templates for the
AndCooper Build tool and found that no matter what example I try I get
the same exception errors in SDK 1.5r3..

First lets head off the obvious.

-No widgets are present in the example.
-Simple class:

package com.mobilebytes.mymapview;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MyLocationOverlay;


import android.os.Bundle;



public class MyMapViewActivity extends MapActivity {


        private MapView mapView;
        private MapController controller;


    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);
        initMapView();
        initMyLocation();


    }

    /** Find and initialize the map view. */
    private void initMapView() {
       mapView = (MapView) findViewById(R.id.mapview);
       controller = mapView.getController();
       mapView.setSatellite(true);
       mapView.setBuiltInZoomControls(true);
    }

    /** Start tracking the position on the map. */
    private void initMyLocation() {
       final MyLocationOverlay overlay = new MyLocationOverlay(this,
mapView);
       overlay.enableMyLocation();
       //overlay.enableCompass(); // does not work in emulator
       overlay.runOnFirstFix(new Runnable() {
          public void run() {
             // Zoom in to current location
             controller.setZoom(8);
             controller.animateTo(overlay.getMyLocation());
          }
       });
       mapView.getOverlays().add(overlay);
    }

        @Override
        protected boolean isRouteDisplayed() {
                // TODO Auto-generated method stub
                return false;
        }
}


AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.mobilebytes.mymapview"
      android:versionCode="1"
      android:versionName="1.0">
      <uses-permission
         android:name="android.permission.ACCESS_COARSE_LOCATION" />
   <uses-permission
         android:name="android.permission.ACCESS_FINE_LOCATION" />
   <uses-permission
         android:name="android.permission.INTERNET" />
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".MyMapViewActivity"
                  android:label="@string/app_name">
                  <uses-library
android:name="com.google.android.maps" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="3" />



</manifest>

Layout/main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:id="@+id/frame"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent">

    <com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:clickable="true"
        android:apiKey="0Y13mLRcN1pG-G_NF7p6XvcknFAqfmKQEJ-24sg"
    />

</LinearLayout>

map.jar is on the classpath.

Logcat output:

08-04 09:44:11.369: WARN/dalvikvm(935): Unable to resolve superclass
of Lcom/mobilebytes/mymapview/MyMapViewActivity; (5)
08-04 09:44:11.389: WARN/dalvikvm(935): Link of class 'Lcom/
mobilebytes/mymapview/MyMapViewActivity;' failed
08-04 09:44:11.399: DEBUG/AndroidRuntime(935): Shutting down VM
08-04 09:44:11.439: WARN/dalvikvm(935): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-04 09:44:11.439: ERROR/AndroidRuntime(935): Uncaught handler:
thread main exiting due to uncaught exception
08-04 09:44:11.529: ERROR/AndroidRuntime(935):
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.mobilebytes.mymapview/
com.mobilebytes.mymapview.MyMapViewActivity}:
java.lang.ClassNotFoundException:
com.mobilebytes.mymapview.MyMapViewActivity in loader
dalvik.system.pathclassloa...@435980f0
08-04 09:44:11.529: ERROR/AndroidRuntime(935):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2194)
08-04 09:44:11.529: ERROR/AndroidRuntime(935):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
08-04 09:44:11.529: ERROR/AndroidRuntime(935):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)

Past reports of problems were with widgets and now it has happen to me
with no widgets..
Anybody else see the same problems?

PS Example used was Ed's form his ProgmaticBookshelf Android book..
--~--~---------~--~----~------------~-------~--~----~

2. Info about Developer phone

Can anybody give me an idea whether android developer phone are going
to be upgraded to G2 or any such intention??
If so when?

If someone already has the present G1 developer phone, whether he has
to buy again G2 or google would replace with the G1 Version.

As per my understanding image upgradation would be supported by google
for any further advancement so therefore  software upgradation would
not be a problem ( let me correct if I am wrong) but I was wondering
about physical improvement.

Please provide/share your information on this regard...

My primary question: when if at all Developer Phone G2 is going to
launch?

Re,
AG

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

3. Images not loading on the phone

4. Is It Possible to get Nottification

5. Creating file with rwxrwxrwx permission

6. RelativeLayout question

7. Question of OpenSource cannot emulate video recording