Esempio n. 1
0
    protected Void doInBackground(Void... blah) {
      setSongInfo(context, intent);

      Song song = new Song(mTitle, mArtist, mAlbum);

      if (song.validate()) {
        writeNewSong(context, song);

        Intent send = new Intent();
        send.setAction(SONG_ACTION).addCategory(Intent.CATEGORY_DEFAULT);
        context.sendBroadcast(send);
      }
      // Log.i("SONG", mArtist + " " + mTitle + " " + mAlbum);

      result.finish();

      return null;
    }
Esempio n. 2
0
    protected Void doInBackground(Void... blah) {
      setSongInfo(context, intent);

      Song song = new Song(mTitle, mArtist, mAlbum);
      song.setAlbumUrl(mImageUrl);

      if (song.validate()) {
        song.removeFeaturing();
        writeNewSong(context, song);

        Intent send = new Intent(context, FlowActivity.class);
        send.setAction(ACTION_ADD_SONG);
        send.putExtra(EXTRA_FROM_ID, fromId);

        LocalBroadcastManager.getInstance(context).sendBroadcast(send);
      }
      // Log.i("SONG", mArtist + " " + mTitle + " " + mAlbum);

      result.finish();

      return null;
    }