mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Small fix for android client 1.0.7
This commit is contained in:
parent
f091feadc9
commit
e9f1ef9d7b
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.musikcube"
|
||||
android:versionName="1.0.5" android:versionCode="5">
|
||||
package="org.musikcube.app1"
|
||||
android:versionCode="7" android:versionName="1.0.7">
|
||||
<application android:icon="@drawable/icon" android:label="@string/app_name" android:name="App" android:debuggable="false">
|
||||
<activity android:name=".main"
|
||||
android:label="@string/app_name" android:launchMode="singleTask" android:screenOrientation="portrait">
|
||||
|
@ -7,5 +7,7 @@
|
||||
# "build.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
# Project target.
|
||||
target=android-3
|
||||
|
@ -4,5 +4,5 @@
|
||||
<item android:title="@string/menu_settings" android:id="@+id/context_settings" android:enabled="true" android:visible="true" android:icon="@drawable/ic_menu_preferences"></item>
|
||||
<item android:id="@+id/context_nowplaying" android:title="@string/menu_nowplaying" android:icon="@drawable/ic_menu_nowplaying"></item>
|
||||
<item android:id="@+id/context_help" android:title="@string/menu_help" android:icon="@drawable/ic_menu_help"></item>
|
||||
<item android:id="@+id/context_search" android:title="@string/menu_search"></item>
|
||||
|
||||
</menu>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import android.app.Application;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -229,7 +229,7 @@ public class CategoryList extends ListActivity implements OnQueryResultListener
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
startService(new Intent(this, org.musikcube.Service.class));
|
||||
startService(new Intent(this, org.musikcube.app1.Service.class));
|
||||
org.musikcube.core.Library.GetInstance().AddPointer();
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -14,7 +14,6 @@ import android.app.ListActivity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.util.SparseBooleanArray;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
@ -112,8 +111,8 @@ public class CategorySelect extends ListActivity implements OnQueryResultListene
|
||||
}
|
||||
}
|
||||
Workout.GetInstance().SetCategory(selections, CategorySelect.this.category);
|
||||
Log.v("mC2::SAVE",CategorySelect.this.category);
|
||||
Log.v("mC2::SAVE",selections.toString());
|
||||
//Log.v("mC2::SAVE",CategorySelect.this.category);
|
||||
//Log.v("mC2::SAVE",selections.toString());
|
||||
intent.putExtra("org.musikcube.PlayerBPMControl.category", CategorySelect.this.category);
|
||||
intent.putExtra("org.musikcube.PlayerBPMControl.selection", selections);
|
||||
startActivity(intent);
|
||||
@ -249,7 +248,7 @@ public class CategorySelect extends ListActivity implements OnQueryResultListene
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
startService(new Intent(this, org.musikcube.Service.class));
|
||||
startService(new Intent(this, org.musikcube.app1.Service.class));
|
||||
org.musikcube.core.Library.GetInstance().AddPointer();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import org.musikcube.core.Workout;
|
||||
|
||||
@ -14,20 +14,20 @@ public class Helper {
|
||||
//Log.i("MC2.onContextItemSelected","item "+item.getItemId()+" "+R.id.context_settings);
|
||||
switch (item.getItemId()) {
|
||||
case R.id.context_settings:
|
||||
context.startActivity(new Intent(context, org.musikcube.Preferences.class));
|
||||
context.startActivity(new Intent(context, org.musikcube.app1.Preferences.class));
|
||||
return true;
|
||||
case R.id.context_browse:
|
||||
context.startActivity(new Intent(context, org.musikcube.main.class));
|
||||
context.startActivity(new Intent(context, org.musikcube.app1.main.class));
|
||||
return true;
|
||||
case R.id.context_controls:
|
||||
if(Workout.GetInstance().Active()){
|
||||
context.startActivity(new Intent(context, org.musikcube.PlayerBPMControl.class));
|
||||
context.startActivity(new Intent(context, org.musikcube.app1.PlayerBPMControl.class));
|
||||
}else{
|
||||
context.startActivity(new Intent(context, org.musikcube.PlayerControl.class));
|
||||
context.startActivity(new Intent(context, org.musikcube.app1.PlayerControl.class));
|
||||
}
|
||||
return true;
|
||||
case R.id.context_nowplaying:
|
||||
context.startActivity(new Intent(context, org.musikcube.NowPlayingList.class));
|
||||
context.startActivity(new Intent(context, org.musikcube.app1.NowPlayingList.class));
|
||||
return true;
|
||||
case R.id.context_help:
|
||||
Dialog dialog = new Dialog(context);
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import org.musikcube.core.Player;
|
||||
import org.musikcube.core.Player.OnTrackListUpdateListener;
|
||||
@ -48,7 +48,7 @@ public class NowPlayingList extends TrackListBase implements OnTrackListUpdateLi
|
||||
public boolean onContextItemSelected(MenuItem item) {
|
||||
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
|
||||
java.util.ArrayList<Integer> trackList = new java.util.ArrayList<Integer>();
|
||||
Intent intent = new Intent(this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(this, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.position", 0);
|
||||
switch (item.getItemId()) {
|
||||
case PLAY_THIS_ID:
|
@ -1,4 +1,4 @@
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
@ -58,14 +58,14 @@ public class PlayerBPMControl extends Activity implements OnTrackUpdateListener,
|
||||
|
||||
private OnClickListener onNextClick = new OnClickListener() {
|
||||
public void onClick(View v){
|
||||
Intent intent = new Intent(PlayerBPMControl.this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(PlayerBPMControl.this, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "next");
|
||||
startService(intent);
|
||||
}
|
||||
};
|
||||
private OnClickListener onPauseClick = new OnClickListener() {
|
||||
public void onClick(View v){
|
||||
Intent intent = new Intent(PlayerBPMControl.this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(PlayerBPMControl.this, org.musikcube.app1.Service.class);
|
||||
if(Workout.GetInstance().Active()){
|
||||
intent.putExtra("org.musikcube.Service.action", "workoutstop");
|
||||
}else{
|
@ -1,4 +1,4 @@
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
@ -58,21 +58,21 @@ public class PlayerControl extends Activity implements OnTrackUpdateListener {
|
||||
|
||||
private OnClickListener onNextClick = new OnClickListener() {
|
||||
public void onClick(View v){
|
||||
Intent intent = new Intent(PlayerControl.this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(PlayerControl.this, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "next");
|
||||
startService(intent);
|
||||
}
|
||||
};
|
||||
private OnClickListener onPrevClick = new OnClickListener() {
|
||||
public void onClick(View v){
|
||||
Intent intent = new Intent(PlayerControl.this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(PlayerControl.this, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "prev");
|
||||
startService(intent);
|
||||
}
|
||||
};
|
||||
private OnClickListener onPauseClick = new OnClickListener() {
|
||||
public void onClick(View v){
|
||||
Intent intent = new Intent(PlayerControl.this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(PlayerControl.this, org.musikcube.app1.Service.class);
|
||||
if(Player.GetInstance().Playing()){
|
||||
intent.putExtra("org.musikcube.Service.action", "stop");
|
||||
}else{
|
@ -1,4 +1,4 @@
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -34,7 +34,7 @@ public class Preferences extends PreferenceActivity {
|
||||
// Log.v("mC2::PREFS","onResume");
|
||||
super.onResume();
|
||||
org.musikcube.core.Library.GetInstance().AddPointer();
|
||||
startService(new Intent(this, org.musikcube.Service.class));
|
||||
startService(new Intent(this, org.musikcube.app1.Service.class));
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import android.app.TabActivity;
|
||||
import android.os.Bundle;
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import org.musikcube.core.Library;
|
||||
import org.musikcube.core.Player;
|
||||
@ -61,7 +61,7 @@ public class Service extends android.app.Service {
|
||||
switch(state)
|
||||
{
|
||||
case TelephonyManager.CALL_STATE_RINGING:
|
||||
Intent intent = new Intent(Service.this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(Service.this, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "stop");
|
||||
startService(intent);
|
||||
break;
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -71,7 +71,7 @@ public class TrackList extends TrackListBase {
|
||||
public boolean onContextItemSelected(MenuItem item) {
|
||||
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
|
||||
java.util.ArrayList<Integer> trackList = new java.util.ArrayList<Integer>();
|
||||
Intent intent = new Intent(this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(this, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.position", 0);
|
||||
switch (item.getItemId()) {
|
||||
case PLAY_THIS_ID:
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import org.musikcube.core.IQuery;
|
||||
import org.musikcube.core.Library;
|
||||
@ -183,7 +183,7 @@ public class TrackListBase extends ListActivity implements OnQueryResultListener
|
||||
|
||||
@Override
|
||||
protected void onListItemClick(ListView l, View v, int position, long id){
|
||||
Intent intent = new Intent(this, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(this, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.tracklist", this.trackList);
|
||||
intent.putExtra("org.musikcube.Service.position", position);
|
||||
intent.putExtra("org.musikcube.Service.action", "playlist");
|
||||
@ -206,7 +206,7 @@ public class TrackListBase extends ListActivity implements OnQueryResultListener
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
startService(new Intent(this, org.musikcube.Service.class));
|
||||
startService(new Intent(this, org.musikcube.app1.Service.class));
|
||||
org.musikcube.core.Library.GetInstance().AddPointer();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.musikcube;
|
||||
package org.musikcube.app1;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
@ -12,7 +12,6 @@ import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.musikcube.CategoryList;
|
||||
import org.musikcube.core.Library;
|
||||
import org.musikcube.core.Library.OnLibraryStatusListener;
|
||||
|
||||
@ -111,7 +110,7 @@ public class main extends Activity implements OnLibraryStatusListener {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
startService(new Intent(this, org.musikcube.Service.class));
|
||||
startService(new Intent(this, org.musikcube.app1.Service.class));
|
||||
org.musikcube.core.Library.GetInstance().AddPointer();
|
||||
org.musikcube.core.Library.GetInstance().SetStatusListener(this);
|
||||
}
|
@ -10,7 +10,6 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import doep.xml.*;
|
||||
|
||||
import org.musikcube.core.IQuery;
|
||||
@ -79,7 +78,7 @@ public final class Library implements Runnable{
|
||||
|
||||
private final void SetStatus(int status){
|
||||
synchronized(this.status){
|
||||
Log.v("mC2::Lib","STATUS "+this.status);
|
||||
//Log.v("mC2::Lib","STATUS "+this.status);
|
||||
this.status = status;
|
||||
if(this.statusListener!=null){
|
||||
this.statusListener.OnLibraryStatusChange(status);
|
||||
@ -206,7 +205,7 @@ public final class Library implements Runnable{
|
||||
this.SetStatus(STATUS_SHUTDOWN);
|
||||
|
||||
while(true){
|
||||
Log.v("mC2::Lib","1");
|
||||
//Log.v("mC2::Lib","1");
|
||||
|
||||
this.running = true;
|
||||
// First try to connect
|
||||
@ -316,7 +315,7 @@ public final class Library implements Runnable{
|
||||
|
||||
}
|
||||
|
||||
Log.v("mC2::Lib","4");
|
||||
//Log.v("mC2::Lib","4");
|
||||
|
||||
synchronized (notifier) {
|
||||
if(!this.restart){
|
||||
@ -329,18 +328,18 @@ public final class Library implements Runnable{
|
||||
}
|
||||
this.restart = false;
|
||||
|
||||
Log.v("mC2::Lib","5");
|
||||
//Log.v("mC2::Lib","5");
|
||||
|
||||
if(this.exit){
|
||||
Log.v("mC2::Lib","EXIT");
|
||||
Intent intent = new Intent(this.context, org.musikcube.Service.class);
|
||||
//Log.v("mC2::Lib","EXIT");
|
||||
Intent intent = new Intent(this.context, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "shutdown");
|
||||
this.context.startService(intent);
|
||||
return;
|
||||
}
|
||||
this.restart = false;
|
||||
// this.running = true;
|
||||
Log.v("mC2::Lib","6");
|
||||
//Log.v("mC2::Lib","6");
|
||||
}
|
||||
|
||||
}
|
||||
@ -384,7 +383,7 @@ public final class Library implements Runnable{
|
||||
}
|
||||
}
|
||||
|
||||
Log.v("Library::WriteThread","wait over");
|
||||
//Log.v("Library::WriteThread","wait over");
|
||||
}else{
|
||||
// Get the first query
|
||||
query = this.sendQueryQueue.removeFirst();
|
||||
@ -429,7 +428,7 @@ public final class Library implements Runnable{
|
||||
//Log.e("Library::WriteThread","E "+x.getMessage());
|
||||
}
|
||||
|
||||
Log.v("Library::WriteThread","Ended");
|
||||
//Log.v("Library::WriteThread","Ended");
|
||||
}
|
||||
|
||||
public final void Exit(){
|
||||
|
@ -285,7 +285,7 @@ public final class Player implements TrackPlayer.OnTrackStatusListener, OnQueryR
|
||||
this.library = Library.GetInstance();
|
||||
this.library.AddPointer();
|
||||
|
||||
Intent intent = new Intent(this.service, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(this.service, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "player_start");
|
||||
this.service.startService(intent);
|
||||
}
|
||||
@ -304,7 +304,7 @@ public final class Player implements TrackPlayer.OnTrackStatusListener, OnQueryR
|
||||
this.library.RemovePointer();
|
||||
this.library = null;
|
||||
|
||||
Intent intent = new Intent(this.service, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(this.service, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "player_end");
|
||||
this.service.startService(intent);
|
||||
|
||||
@ -316,7 +316,7 @@ public final class Player implements TrackPlayer.OnTrackStatusListener, OnQueryR
|
||||
/* if(status==TrackPlayer.STATUS_EXIT){
|
||||
this.Next();
|
||||
}*/
|
||||
Intent intent = new Intent(this.service, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(this.service, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "next");
|
||||
this.service.startService(intent);
|
||||
}
|
||||
@ -378,7 +378,7 @@ public final class Player implements TrackPlayer.OnTrackStatusListener, OnQueryR
|
||||
}
|
||||
}
|
||||
|
||||
Intent intent = new Intent(this.service, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(this.service, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.action", "player_start");
|
||||
this.service.startService(intent);
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ public class Workout implements OnBPMListener, Runnable, OnQueryResultListener {
|
||||
this.lastQueryTime = android.os.SystemClock.elapsedRealtime();
|
||||
BPMQuery bpmQuery = (BPMQuery)query;
|
||||
if(!bpmQuery.trackList.isEmpty() && this.context!=null){
|
||||
Intent intent = new Intent(this.context, org.musikcube.Service.class);
|
||||
Intent intent = new Intent(this.context, org.musikcube.app1.Service.class);
|
||||
intent.putExtra("org.musikcube.Service.tracklist", bpmQuery.trackList);
|
||||
intent.putExtra("org.musikcube.Service.position", 0);
|
||||
intent.putExtra("org.musikcube.Service.action", "playlist_prepare");
|
||||
|
Loading…
Reference in New Issue
Block a user