How to import music into Android library

by Y Kim » Fri, 23 Apr 2010 08:03:55 GMT


Sponsored Links
 Hello, I would like to know how can I import songs from a web service
into Android library without having to download the file into sdcard.
I have all the data from the web service but I do not know how to
integrate the tracks into Android database. My idea is not to have to
download the files, but playing them on streaming using the music
player. Do I need to download the tracks to the sd card and then
Android does all the stuff?

Thanks in advance

--



Other Threads

1. has leaked service connection in activity that was originally bound here

when I bind service when activity on create:




04-29 16:20:27.797: ERROR/ActivityThread(11629): Activity
com.maweis.ToggleSilentActivity has leaked ServiceConnection
com.maweis.togglesilentactivit...@434fffa0 that was originally bound
here
04-29 16:20:27.797: ERROR/ActivityThread(11629):
android.app.ServiceConnectionLeaked: Activity
com.maweis.ToggleSilentActivity has leaked ServiceConnection
com.maweis.togglesilentactivit...@434fffa0 that was originally bound
here
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.ActivityThread$PackageInfo$ServiceDispatcher.<init>
(ActivityThread.java:886)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.ActivityThread$PackageInfo.getServiceDispatcher
(ActivityThread.java:781)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.ApplicationContext.bindService(ApplicationContext.java:
820)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.content.ContextWrapper.bindService(ContextWrapper.java:307)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
com.maweis.ToggleSilentActivity.onCreate(ToggleSilentActivity.java:
153)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.os.Handler.dispatchMessage(Handler.java:99)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.os.Looper.loop(Looper.java:123)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
java.lang.reflect.Method.invokeNative(Native Method)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
java.lang.reflect.Method.invoke(Method.java:521)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
04-29 16:20:27.797: ERROR/ActivityThread(11629):     at
dalvik.system.NativeStart.main(Native Method)




code:

   private ToggleSilentService serviceBinder;

        private ServiceConnection mConnection = new ServiceConnection() {
                public void onServiceConnected(ComponentName className, IBinder
service) {
                        serviceBinder = ((ToggleSilentService.MyBinder) service)
                                        .getService();
                }

                public void onServiceDisconnected(ComponentName className) {
                        serviceBinder = null;
                }
        };

        @Override
        protected void onCreate(Bundle icicle) {
                super.onCreate(icicle);
                mSensorManager = (SensorManager) getSystemService
(Context.SENSOR_SERVICE);
                setContentView(R.layout.main);

                mView = (SilentView) findViewById(R.id.silentView);

                soundUtil = new SoundUtil(this);

                Intent bindIntent = new Intent(ToggleSilentActivity.this,
                                ToggleSilentService.class);
                bindService(bindIntent, mConnection, Context.BIND_DEBUG_UNBIND);

        }


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

2. text alignment in edit text

Hi,

Can anybody teell me how to set half  text left aligned and other half
right aligned in the edit text


thanks,
rakesh

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

3. How to programable send multi-attachment in an email

4. Launch android emulator on mingw/msys, but failed

5. how to get the string from a listview item

6. Can any Body Help me ?

7. How do I place an image on top of my existing layout through code?