From: <kro...@us...> - 2010-12-19 13:44:31
|
Revision: 4046 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4046&view=rev Author: kroko_koenig Date: 2010-12-19 13:44:24 +0000 (Sun, 19 Dec 2010) Log Message: ----------- more vibrations and mp3 fix with menu now Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Release/Android Server communication.docx trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -25,11 +25,15 @@ import mediaportal.remote.R; import mediaportal.remote.ReceiveDirectoryXmlHandler.DirItems; import android.app.Activity; +import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; +import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; +import android.os.Environment; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -45,11 +49,16 @@ public class MusicDir extends Activity { private Handler mHandler = new Handler(); + private static Vibrator vibrate; + private String actualDir = ""; private static ArrayList<ReceiveDirectoryXmlHandler.DirItems> musicList; - private static ReceiveDirectoryXmlHandler.DirItems selectedItem; - + private static ReceiveDirectoryXmlHandler.DirItems selectedItem; + + final CharSequence[] items = { "Add to playlist", "Clear playlist", + "Save to SD card", "Cancel" }; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -58,6 +67,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + GridView gridview = (GridView) findViewById(R.id.music_grid); gridview.setOnItemClickListener(new OnItemClickListener() { @@ -67,12 +78,49 @@ ImageView iv = (ImageView) v.findViewById(R.id.icon_image); musicItem music = (musicItem) iv.getTag(); + DoVibrate(); + if (music.typ == "item") { - selectedItem = musicList.get(position); - PostAddFile(actualDir + selectedItem.File.replaceAll(" ", "%20")); - - Toast.makeText(MusicDir.this, - selectedItem.File + " has been added", Toast.LENGTH_SHORT).show(); + selectedItem = musicList.get(position-1); + + AlertDialog.Builder builder = new AlertDialog.Builder( + parent.getContext()); + + builder.setTitle(selectedItem.File); + builder.setItems(items, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int item) { + switch (item) { + case 0: + PostAddFile(actualDir + + selectedItem.File.replaceAll( + " ", "%20")); + Toast.makeText( + MusicDir.this, + selectedItem.File + + " has been added", + Toast.LENGTH_SHORT).show(); + break; + case 1: + PostClear(); + Toast.makeText(MusicDir.this, + "Playlist has been cleared", + Toast.LENGTH_SHORT).show(); + break; + case 2: + SavetoSDCard(selectedItem.File); + Toast.makeText( + MusicDir.this, + selectedItem.File + + " has been transferd", + Toast.LENGTH_SHORT).show(); + break; + } + } + }); + AlertDialog alert = builder.create(); + alert.show(); } if (music.typ == "folder") { @@ -100,6 +148,20 @@ }); } + public void PostClear() { + + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); + + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>CLEAR_PLAYLIST</command>"; + xml += "</message>"; + + post.Post(xml); + } + public void PostAddFile(String Filename) { PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); @@ -118,6 +180,18 @@ post.Post(xml); } + private void SavetoSDCard(String File) { + + httpHandler h = new httpHandler(); + h.DownloadFile(File , actualDir); + + String sd = Environment.getExternalStorageDirectory().toString(); + + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + + File, "audio/mpeg"); + } + private Runnable mUpdateTimeTask = new Runnable() { public void run() { new update().execute(); @@ -150,15 +224,21 @@ } if (musicList.size() == 0) { - Toast.makeText(MusicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT) - .show(); + Toast.makeText(MusicDir.this, "TIME OUT SERVER", + Toast.LENGTH_SHORT).show(); } else { GridView gridview = (GridView) findViewById(R.id.music_grid); gridview.setAdapter(new ImageAdapter2(MusicDir.this)); } } } - + + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + public class ImageAdapter2 extends BaseAdapter { private Context mContext; public static final int ACTIVITY_CREATE = 10; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -37,15 +37,15 @@ public class ReceiveHandler { private org.xml.sax.ContentHandler _handler; - + public ReceiveHandler(org.xml.sax.ContentHandler Handler) { _handler = Handler; } - - public void readValues(String Url) - { - String fileUrl = "http://" + Settings.Server + ":" + Settings.Port + Url; + public void readValues(String Url) { + String fileUrl = "http://" + Settings.Server + ":" + Settings.Port + + Url; + URL myFileUrl = null; try { myFileUrl = new URL(fileUrl); @@ -91,13 +91,18 @@ e.printStackTrace(); } is.close(); - sp.reset(); + + try { + sp.reset(); + } catch (Exception e) { + // if not supported ... + } + } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } - - + } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -76,31 +76,33 @@ return bitmap; } - public void DownloadFile(String Filename, String ID) { - - extStorageDirectory = Environment.getExternalStorageDirectory().toString(); - + public void DownloadFileByID(String Filename, String ID) { + + extStorageDirectory = Environment.getExternalStorageDirectory() + .toString(); + try { - InputStream in = openHttpConnection("http://"+ Settings.Server + ":" + Settings.Port + - "/db_music/getfile?id=" + ID); + InputStream in = openHttpConnection("http://" + Settings.Server + + ":" + Settings.Port + "/db_music/getfile?id=" + ID); // BufferedInputStream bis = new BufferedInputStream(in); ByteArrayBuffer baf = new ByteArrayBuffer(50); - //int current = 0; + // int current = 0; + OutputStream outStream = null; + File file = new File(extStorageDirectory, Filename); + outStream = new FileOutputStream(file); + byte[] bb = new byte[1024]; int l = in.read(bb, 0, 1024); while (l > -0) { - baf.append(bb, 0, l); + //baf.append(bb, 0, l); + outStream.write(bb); l = in.read(bb, 0, 1024); } - - OutputStream outStream = null; - File file = new File(extStorageDirectory, Filename); - - outStream = new FileOutputStream(file); - outStream.write(baf.toByteArray()); + + //outStream.write(baf.toByteArray()); outStream.flush(); outStream.close(); @@ -113,4 +115,46 @@ } } + public void DownloadFile(String Filename, String Path) { + + extStorageDirectory = Environment.getExternalStorageDirectory() + .toString(); + + try { + InputStream in = openHttpConnection("http://" + Settings.Server + + ":" + Settings.Port + "/music/" + Path + Filename.replaceAll( + " ", "%20")); + + if (in != null) { + // BufferedInputStream bis = new BufferedInputStream(in); + ByteArrayBuffer baf = new ByteArrayBuffer(50); + // int current = 0; + + OutputStream outStream = null; + File file = new File(extStorageDirectory, Filename); + outStream = new FileOutputStream(file); + + byte[] bb = new byte[1024]; + int l = in.read(bb, 0, 1024); + + while (l > -0) { + //baf.append(bb, 0, l); + outStream.write(bb); + l = in.read(bb, 0, 1024); + } + + //outStream.write(baf.toByteArray()); + outStream.flush(); + outStream.close(); + } + + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -45,6 +45,7 @@ public class musicAlbum extends Activity { private Handler mHandler = new Handler(); + private static Vibrator vibrate; private static ArrayList<ReceiveDbXmlHandler.DbItems> albumList; @@ -55,6 +56,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ListView l1 = (ListView) findViewById(R.id.list_album); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() @@ -67,6 +70,8 @@ musicResults.Select = item.Album + "&" + item.Artist; musicResults.Mode = musicResults.SelectMode.Album; + musicAlbum.DoVibrate(); + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); startActivityForResult(myIntent, 0); } @@ -116,16 +121,15 @@ listview.setAdapter(new EfficientAdapter(musicAlbum.this)); } } - - public void DoVibrate() { - if (Settings.Vibrate) { - // Get instance of Vibrator from current Context - Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - v.vibrate(100); - } + + } + + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); } } - + private static class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -44,9 +44,9 @@ public class musicArtist extends Activity { - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); - + private static Vibrator vibrate; + private static ArrayList<ReceiveDbXmlHandler.DbItems> artistList; public void onCreate(Bundle savedInstanceState) { @@ -56,6 +56,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ListView l1 = (ListView) findViewById(R.id.list_artist); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -67,6 +69,8 @@ musicResults.Select = item.Artist; musicResults.Mode = musicResults.SelectMode.Artist; + musicArtist.DoVibrate(); + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); startActivityForResult(myIntent, 0); @@ -118,15 +122,15 @@ } } - public void DoVibrate() { - if (Settings.Vibrate) { - // Get instance of Vibrator from current Context - Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - v.vibrate(100); - } + + } + + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); } } - + private static class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -33,6 +33,7 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -50,9 +51,9 @@ Artist,Album; } - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); - + private static Vibrator vibrate; + private static ArrayList<ReceiveDbXmlHandler.DbItems> itemList; public static String Select = ""; @@ -69,6 +70,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ListView l1 = (ListView) findViewById(R.id.list_result); ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); @@ -81,6 +84,8 @@ selectedItem = itemList.get(arg2); + DoVibrate(); + AlertDialog.Builder builder = new AlertDialog.Builder(arg0 .getContext()); builder.setTitle(selectedItem.Title); @@ -146,10 +151,11 @@ String id = Item.ID; httpHandler h = new httpHandler(); - h.DownloadFile(filename,id); + h.DownloadFileByID(filename,id); String sd = Environment.getExternalStorageDirectory().toString(); - MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); } private Runnable mUpdateTimeTask = new Runnable() { @@ -196,6 +202,12 @@ } } + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + private static class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -33,6 +33,7 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -46,7 +47,8 @@ public class musicSong extends Activity { private Handler mHandler = new Handler(); - + private static Vibrator vibrate; + private static ArrayList<ReceiveDbXmlHandler.DbItems> songList; public static String Select = ""; @@ -62,6 +64,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ListView l1 = (ListView) findViewById(R.id.list_song); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -69,6 +73,8 @@ long arg3) { selectedItem = songList.get(arg2); + + DoVibrate(); AlertDialog.Builder builder = new AlertDialog.Builder(arg0 .getContext()); @@ -144,6 +150,12 @@ } } + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + public void PostClear() { PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); @@ -180,7 +192,7 @@ String id = Item.ID; httpHandler h = new httpHandler(); - h.DownloadFile(filename,id); + h.DownloadFileByID(filename,id); String sd = Environment.getExternalStorageDirectory().toString(); MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -2,7 +2,6 @@ import java.io.IOException; import java.io.InputStream; - import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; @@ -11,14 +10,15 @@ import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; - import android.app.Activity; +import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.os.Bundle; import android.os.Handler; +import android.os.Vibrator; import android.view.View; import android.widget.ImageButton; import android.widget.ImageView; @@ -28,10 +28,10 @@ public class nowplaying extends Activity { - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - private static String lastTitle = ""; + private Handler mHandler = new Handler(); + private static Vibrator vibrate; /** Called when the activity is first created. */ @Override @@ -39,6 +39,8 @@ super.onCreate(savedInstanceState); setContentView(R.layout.playingnow); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + ImageButton btn1 = (ImageButton) findViewById(R.id.now_prev); ImageButton btn2 = (ImageButton) findViewById(R.id.now_stop); ImageButton btn4 = (ImageButton) findViewById(R.id.now_play); @@ -98,11 +100,9 @@ }; private void update() { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; nowplayinghandler handler = nowplayinghandler.getinstance(); handler.setconnection(HttpServer, HttpPort); @@ -178,11 +178,11 @@ } public void PostCommand(String button) { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + + DoVibrate(); - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; HttpParams httpParameters = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(httpParameters, 3000); @@ -228,4 +228,10 @@ } } + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -7,10 +7,10 @@ public class nowplayingXmlHandler extends DefaultHandler { Boolean currentElement = false; String currentValue = null; - + /** * Called when tag starts ( example:- <name>AndroidPeople</name> -- <name> ) - */ + */ @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -103,8 +103,15 @@ e.printStackTrace(); } is.close(); - sp.reset(); + try { + sp.reset(); + } + catch (Exception e) + { + // if not supported ... + } + result = true; } catch (IOException e) { @@ -115,5 +122,4 @@ return result; } - } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -2,7 +2,6 @@ import java.io.IOException; import java.io.InputStream; - import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; @@ -11,17 +10,16 @@ import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; - import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; -import android.content.SharedPreferences; import android.content.res.AssetManager; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.os.Handler; +import android.os.Vibrator; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -88,8 +86,8 @@ } } - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; private Handler mHandler = new Handler(); + private static Vibrator vibrate; final CharSequence[] items = { "Delete item", "Clear playlist", "Cancel" }; private nowplaylisthandler.PlayListItem selectedItem; @@ -103,6 +101,8 @@ ListView l1 = (ListView) findViewById(R.id.ListView01); l1.setAdapter(new EfficientAdapter(this)); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { // @override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, @@ -187,11 +187,9 @@ }; private void update() { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; nowplaylisthandler handler = nowplaylisthandler.getinstance(); handler.setconnection(HttpServer, HttpPort); @@ -209,12 +207,11 @@ public void PostCommand(String button) { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + DoVibrate(); + + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); - HttpParams httpParameters = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(httpParameters, 3000); HttpConnectionParams.setSoTimeout(httpParameters, 3000); @@ -259,4 +256,10 @@ } } + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } + } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -106,8 +106,13 @@ e.printStackTrace(); } is.close(); - sp.reset(); + try { + sp.reset(); + } catch (Exception e) { + // if not supported ... + } + result = true; } catch (IOException e) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-19 13:44:24 UTC (rev 4046) @@ -31,6 +31,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; +import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -46,6 +47,8 @@ public class pictures extends Activity { private Handler mHandler = new Handler(); + private static Vibrator vibrate; + public static String actualDir = ""; public static ArrayList<ReceiveDirectoryXmlHandler.DirItems> pictureList; @@ -59,6 +62,8 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); + GridView gridview = (GridView) findViewById(R.id.GridView01); gridview.setOnItemClickListener(new OnItemClickListener() { @@ -68,6 +73,8 @@ ImageView iv = (ImageView) v.findViewById(R.id.icon_image); picItem pic = (picItem) iv.getTag(); + DoVibrate(); + if (pic.typ == "item") { selectedPicture = position - 1; Intent myIntent = new Intent(pictures.this, @@ -141,6 +148,12 @@ } } } + + private static void DoVibrate() { + if (Settings.Vibrate) { + vibrate.vibrate(100); + } + } public class ImageAdapter2 extends BaseAdapter { private Context mContext; Modified: trunk/plugins/AndroidRemote/Release/Android Server communication.docx =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-19 12:43:40 UTC (rev 4045) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-19 13:44:24 UTC (rev 4046) @@ -1216,9 +1216,12 @@ } private void ReplyMusicFile(string Filename, string Mode) { - if (File.Exists(Filename)) + directoryList = GetMpShare("music"); + string dir = GetLocalDir(Filename, directoryList); + + if (File.Exists(dir)) { - byte[] b = FileToByteArray(Filename); + byte[] b = FileToByteArray(dir); string msg = string.Empty; // header Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-19 16:43:53
|
Revision: 4047 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4047&view=rev Author: kroko_koenig Date: 2010-12-19 16:43:47 +0000 (Sun, 19 Dec 2010) Log Message: ----------- add threads for sd download Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-19 16:43:47 UTC (rev 4047) @@ -20,7 +20,7 @@ <activity android:launchMode="singleInstance" android:name=".Remote_03"></activity> <activity android:name=".pictures" android:launchMode="singleInstance"></activity> <activity android:name=".picturesfullscreen" android:launchMode="singleInstance"></activity> - <activity android:launchMode="singleInstance" android:name=".MusicDir"></activity> + <activity android:launchMode="singleInstance" android:name=".musicDir"></activity> <activity android:name=".setup" android:launchMode="singleInstance"></activity> <activity android:name=".nowplaying" android:launchMode="singleInstance"></activity> <activity android:name=".nowplaylist" android:launchMode="singleInstance"></activity> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-19 16:43:47 UTC (rev 4047) @@ -39,8 +39,9 @@ ------------ Vibration feedback (not completed) switch WIFI on (just msg now) -gesture control for pictures (swipe) / alert dialog save files from Android to MP if the MP has no focus the remote doesnt work (normal) save huge files can cause out of memory, better save stream +playlist select on file (switch to file x) +progress task for downloads Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -5,6 +5,7 @@ import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.net.Uri; +import android.util.Log; public class MediaScannerNotifier implements MediaScannerConnectionClient { private Context mContext; @@ -13,6 +14,9 @@ private String mMimeType; public MediaScannerNotifier(Context context, String path, String mimeType) { + + Log.d("MediaPortal", "MediaScanner " + path + " | " + mimeType); + mContext = context; mPath = path; mMimeType = mimeType; @@ -21,10 +25,17 @@ } public void onMediaScannerConnected() { + + Log.d("MediaPortal", "MediaScanner connected"); + mConnection.scanFile(mPath, mMimeType); + Log.d("MediaScanner", "scanner connected"); } public void onScanCompleted(String path, Uri uri) { + + Log.d("MediaPortal", "MediaScanner completed"); + // OPTIONAL: scan is complete, this will cause the viewer to render it try { if (uri != null) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -46,12 +46,15 @@ import android.widget.AdapterView.OnItemClickListener; import android.widget.Toast; -public class MusicDir extends Activity { +public class musicDir extends Activity { + private Context myParent; + private Handler mHandler = new Handler(); private static Vibrator vibrate; private String actualDir = ""; + private String downloadFile = ""; private static ArrayList<ReceiveDirectoryXmlHandler.DirItems> musicList; private static ReceiveDirectoryXmlHandler.DirItems selectedItem; @@ -64,6 +67,8 @@ super.onCreate(savedInstanceState); setContentView(R.layout.music); + myParent = this.getApplicationContext(); + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); @@ -97,24 +102,19 @@ + selectedItem.File.replaceAll( " ", "%20")); Toast.makeText( - MusicDir.this, + musicDir.this, selectedItem.File + " has been added", Toast.LENGTH_SHORT).show(); break; case 1: PostClear(); - Toast.makeText(MusicDir.this, + Toast.makeText(musicDir.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); break; case 2: SavetoSDCard(selectedItem.File); - Toast.makeText( - MusicDir.this, - selectedItem.File - + " has been transferd", - Toast.LENGTH_SHORT).show(); break; } } @@ -182,14 +182,8 @@ private void SavetoSDCard(String File) { - httpHandler h = new httpHandler(); - h.DownloadFile(File , actualDir); - - String sd = Environment.getExternalStorageDirectory().toString(); - - @SuppressWarnings("unused") - MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" - + File, "audio/mpeg"); + downloadFile = File; + new download().execute(); } private Runnable mUpdateTimeTask = new Runnable() { @@ -199,7 +193,7 @@ }; private class update extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(MusicDir.this); + private final ProgressDialog dialog = new ProgressDialog(musicDir.this); // can use UI thread here protected void onPreExecute() { @@ -224,15 +218,50 @@ } if (musicList.size() == 0) { - Toast.makeText(MusicDir.this, "TIME OUT SERVER", + Toast.makeText(musicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { GridView gridview = (GridView) findViewById(R.id.music_grid); - gridview.setAdapter(new ImageAdapter2(MusicDir.this)); + gridview.setAdapter(new ImageAdapter2(musicDir.this)); } } } + private class download extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(musicDir.this); + // can use UI thread here + protected void onPreExecute() { + this.dialog.setMessage("save to sd card..."); + this.dialog.show(); + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + Log.d("MediaPortal", "download starts"); + + httpHandler h = new httpHandler(); + h.DownloadFile(downloadFile , actualDir); + + return null; + } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + this.dialog.dismiss(); + } + + Toast.makeText(musicDir.this, + selectedItem.File + " has been saved.", Toast.LENGTH_SHORT).show(); + + Log.d("MediaPortal", "download ends"); + + String sd = Environment.getExternalStorageDirectory().toString(); + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(myParent, sd + "/" + downloadFile, "audio/mpeg"); + } + } + private static void DoVibrate() { if (Settings.Vibrate) { vibrate.vibrate(100); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -16,6 +16,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Environment; +import android.util.Log; public class httpHandler { @@ -78,6 +79,7 @@ public void DownloadFileByID(String Filename, String ID) { + Log.d("MediaPortal", "get file: " + Filename); extStorageDirectory = Environment.getExternalStorageDirectory() .toString(); @@ -85,26 +87,33 @@ InputStream in = openHttpConnection("http://" + Settings.Server + ":" + Settings.Port + "/db_music/getfile?id=" + ID); - // BufferedInputStream bis = new BufferedInputStream(in); - ByteArrayBuffer baf = new ByteArrayBuffer(50); - // int current = 0; + if (in != null) { + // BufferedInputStream bis = new BufferedInputStream(in); + ByteArrayBuffer baf = new ByteArrayBuffer(50); + // int current = 0; - OutputStream outStream = null; - File file = new File(extStorageDirectory, Filename); - outStream = new FileOutputStream(file); - - byte[] bb = new byte[1024]; - int l = in.read(bb, 0, 1024); + OutputStream outStream = null; + File file = new File(extStorageDirectory, Filename); + outStream = new FileOutputStream(file); + + int size = 0; + + byte[] bb = new byte[1024]; + int l = in.read(bb, 0, 1024); - while (l > -0) { - //baf.append(bb, 0, l); - outStream.write(bb); - l = in.read(bb, 0, 1024); + while (l > -0) { + size += l; + //baf.append(bb, 0, l); + outStream.write(bb,0,l); + l = in.read(bb, 0, 1024); + } + + //outStream.write(baf.toByteArray()); + outStream.flush(); + outStream.close(); + + Log.d("MediaPortal", "finshed size: " + size); } - - //outStream.write(baf.toByteArray()); - outStream.flush(); - outStream.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block @@ -116,14 +125,15 @@ } public void DownloadFile(String Filename, String Path) { - + + Log.d("MediaPortal", "get file: " + Filename); extStorageDirectory = Environment.getExternalStorageDirectory() .toString(); try { InputStream in = openHttpConnection("http://" + Settings.Server - + ":" + Settings.Port + "/music/" + Path + Filename.replaceAll( - " ", "%20")); + + ":" + Settings.Port + "/music/" + Path + + Filename.replaceAll(" ", "%20")); if (in != null) { // BufferedInputStream bis = new BufferedInputStream(in); @@ -133,19 +143,24 @@ OutputStream outStream = null; File file = new File(extStorageDirectory, Filename); outStream = new FileOutputStream(file); + + int size = 0; byte[] bb = new byte[1024]; int l = in.read(bb, 0, 1024); while (l > -0) { - //baf.append(bb, 0, l); - outStream.write(bb); + size += l; + // baf.append(bb, 0, l); + outStream.write(bb, 0, l); l = in.read(bb, 0, 1024); } - //outStream.write(baf.toByteArray()); + // outStream.write(baf.toByteArray()); outStream.flush(); outStream.close(); + + Log.d("MediaPortal", "finshed size: " + size); } } catch (FileNotFoundException e) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -226,8 +226,8 @@ final android.net.NetworkInfo wifi = connMgr .getNetworkInfo(ConnectivityManager.TYPE_WIFI); - final android.net.NetworkInfo mobile = connMgr - .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); + //final android.net.NetworkInfo mobile = connMgr + // .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (!wifi.isAvailable()) { Toast.makeText(this, "Warning : Wifi is not available !", Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -51,6 +51,8 @@ Artist,Album; } + private Context myParent; + private Handler mHandler = new Handler(); private static Vibrator vibrate; @@ -58,6 +60,8 @@ public static String Select = ""; public static SelectMode Mode; + private static String downloadFile = ""; + private static String downloadID = ""; ReceiveDbXmlHandler.DbItems selectedItem = null; final CharSequence[] items = { "Add to playlist", "Clear playlist", @@ -67,6 +71,8 @@ super.onCreate(savedInstanceState); setContentView(R.layout.music_results); + myParent = this.getApplicationContext(); + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); @@ -103,8 +109,6 @@ break; case 2: SavetoSDCard(selectedItem); - Toast.makeText(musicResults.this, - selectedItem.Title + " has been transferd", Toast.LENGTH_SHORT).show(); break; } } @@ -146,16 +150,11 @@ post.Post(xml); } private void SavetoSDCard(ReceiveDbXmlHandler.DbItems Item) { - - String filename = Item.Artist + " - " + Item.Title + ".mp3"; - String id = Item.ID; + + downloadFile = Item.Artist + " - " + Item.Title + ".mp3";; + downloadID = Item.ID; - httpHandler h = new httpHandler(); - h.DownloadFileByID(filename,id); - - String sd = Environment.getExternalStorageDirectory().toString(); - @SuppressWarnings("unused") - MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); + new download().execute(); } private Runnable mUpdateTimeTask = new Runnable() { @@ -201,6 +200,41 @@ } } } + private class download extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(musicResults.this); + + // can use UI thread here + protected void onPreExecute() { + this.dialog.setMessage("save to sd card..."); + this.dialog.show(); + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + Log.d("MediaPortal", "download starts"); + + httpHandler h = new httpHandler(); + h.DownloadFileByID(downloadFile,downloadID); + + return null; + } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + this.dialog.dismiss(); + } + + Toast.makeText(musicResults.this, + selectedItem.Title + " has been saved.", Toast.LENGTH_SHORT).show(); + + Log.d("MediaPortal", "download ends"); + + String sd = Environment.getExternalStorageDirectory().toString(); + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(myParent, sd + "/" + downloadFile, "audio/mpeg"); + } + } private static void DoVibrate() { if (Settings.Vibrate) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java 2010-12-19 13:44:24 UTC (rev 4046) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java 2010-12-19 16:43:47 UTC (rev 4047) @@ -58,7 +58,7 @@ .setContent(intent); tabHost.addTab(spec); - intent = new Intent().setClass(this, MusicDir.class); + intent = new Intent().setClass(this, musicDir.class); spec = tabHost.newTabSpec("music") .setIndicator("Music", res.getDrawable(R.drawable.ic_tab4)) .setContent(intent); Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-19 21:16:13
|
Revision: 4048 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4048&view=rev Author: kroko_koenig Date: 2010-12-19 21:16:06 +0000 (Sun, 19 Dec 2010) Log Message: ----------- so far for this week Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -85,6 +85,8 @@ public static final int LinearLayout01=0x7f06001a; public static final int LinearLayout02=0x7f060055; public static final int LinearLayout03=0x7f06005f; + public static final int LinearLayout04=0x7f060069; + public static final int LinearLayout05=0x7f06006f; public static final int ListView01=0x7f060028; public static final int TableLayout01=0x7f060005; public static final int TableRow01=0x7f060006; @@ -154,12 +156,22 @@ public static final int btnkey26=0x7f060066; public static final int btnkey27=0x7f060067; public static final int btnkey28=0x7f060068; - public static final int btnkey29=0x7f060069; - public static final int btnkey30=0x7f06006a; - public static final int btnkey31=0x7f06006b; - public static final int btnkey32=0x7f06006c; - public static final int btnkey33=0x7f06006d; - public static final int clearplaylist=0x7f060074; + public static final int btnkey29=0x7f06006a; + public static final int btnkey30=0x7f06006b; + public static final int btnkey31=0x7f06006c; + public static final int btnkey32=0x7f06006d; + public static final int btnkey33=0x7f06006e; + public static final int btnkey41=0x7f060070; + public static final int btnkey42=0x7f060071; + public static final int btnkey43=0x7f060072; + public static final int btnkey44=0x7f060073; + public static final int btnkey45=0x7f060074; + public static final int btnkey46=0x7f060075; + public static final int btnkey47=0x7f060076; + public static final int btnkey48=0x7f060077; + public static final int btnkey49=0x7f060078; + public static final int btnkey50=0x7f060079; + public static final int clearplaylist=0x7f060080; public static final int full_text=0x7f060018; public static final int icon_image=0x7f060001; public static final int icon_text=0x7f060002; @@ -183,18 +195,18 @@ public static final int now_progress=0x7f06001e; public static final int now_stop=0x7f060024; public static final int now_title=0x7f060021; - public static final int open=0x7f060077; - public static final int playlist=0x7f060073; - public static final int rslide=0x7f06007a; - public static final int save=0x7f060076; - public static final int sdcard=0x7f060075; - public static final int send=0x7f060078; - public static final int server_ip=0x7f06006e; - public static final int server_macid=0x7f060070; - public static final int server_port=0x7f06006f; - public static final int slide=0x7f060079; - public static final int title=0x7f060072; - public static final int vibration=0x7f060071; + public static final int open=0x7f060083; + public static final int playlist=0x7f06007f; + public static final int rslide=0x7f060086; + public static final int save=0x7f060082; + public static final int sdcard=0x7f060081; + public static final int send=0x7f060084; + public static final int server_ip=0x7f06007a; + public static final int server_macid=0x7f06007c; + public static final int server_port=0x7f06007b; + public static final int slide=0x7f060085; + public static final int title=0x7f06007e; + public static final int vibration=0x7f06007d; public static final int widget0=0x7f060011; public static final int widget00=0x7f06002a; public static final int widget01=0x7f06002e; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml 2010-12-19 21:16:06 UTC (rev 4048) @@ -2,7 +2,7 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/full_text" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="name" + android:layout_height="wrap_content" android:text="Loading..." android:gravity="center_horizontal" android:background="#FFFFFFFF" android:textSize="20dip" android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF"> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml 2010-12-19 21:16:06 UTC (rev 4048) @@ -119,15 +119,14 @@ </Button> </LinearLayout> - <LinearLayout android:id="@+id/LinearLayout03" - android:layout_height="wrap_content" + <LinearLayout android:layout_height="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_gravity="center_horizontal" android:layout_width="wrap_content" - android:paddingBottom="5dip"> + android:paddingBottom="5dip" android:id="@+id/LinearLayout04"> <Button android:id="@+id/btnkey29" android:padding="0dip" - android:text=".?123" android:layout_width="64dip" android:layout_height="48dip"> + android:layout_width="64dip" android:layout_height="48dip" android:text="ENTER"> </Button> <Button android:id="@+id/btnkey30" android:padding="0dip" android:layout_height="48dip" android:layout_width="32dip" android:text="/"> @@ -143,5 +142,41 @@ </Button> </LinearLayout> + + <LinearLayout android:layout_height="wrap_content" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:paddingBottom="5dip" android:paddingTop="5dip" android:layout_marginTop="20dip" android:id="@+id/LinearLayout05"> + + <Button android:id="@+id/btnkey41" android:padding="0dip" + android:text="1" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey42" android:padding="0dip" + android:text="2" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey43" android:padding="0dip" + android:text="3" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey44" android:padding="0dip" + android:text="4" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey45" android:padding="0dip" + android:text="5" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey46" android:padding="0dip" + android:text="6" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey47" android:padding="0dip" + android:text="7" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey48" android:padding="0dip" + android:text="8" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey49" android:padding="0dip" + android:text="9" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey50" android:padding="0dip" + android:text="0" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + </LinearLayout> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -217,7 +217,7 @@ this.dialog.dismiss(); } - if (musicList.size() == 0) { + if (musicList == null) { Toast.makeText(musicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -74,6 +74,7 @@ // Get response BufferedReader rd = new BufferedReader(new InputStreamReader( socket.getInputStream())); + String line; while ((line = rd.readLine()) != null) { // Process line... Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -35,6 +35,7 @@ import android.view.View; import android.view.GestureDetector.OnGestureListener; import android.widget.Button; +import android.widget.Toast; public class Remote_02 extends Activity implements OnGestureListener { @@ -119,7 +120,8 @@ Button btnWakeOnLan = (Button) findViewById(R.id.btnWakeOnLan); btnWakeOnLan.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - PostCommand("wakeonlan"); + Toast.makeText(Remote_02.this, "not implemneted yet. Sorry", + Toast.LENGTH_SHORT).show(); } }); } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -123,6 +123,22 @@ Button btn27 = (Button) findViewById(R.id.btnkey27); btn27.setOnClickListener(mClickListener); + // del + Button btn28 = (Button) findViewById(R.id.btnkey28); + btn28.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + PostKey("{BKSP}"); + } + }); + + // enter + Button btn29 = (Button) findViewById(R.id.btnkey29); + btn29.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + PostKey("{ENTER}"); + } + }); + Button btn30 = (Button) findViewById(R.id.btnkey30); btn30.setOnClickListener(mClickListener); @@ -130,7 +146,7 @@ Button btn31 = (Button) findViewById(R.id.btnkey31); btn31.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - PostKey(" "); + PostKey("{ }"); } }); @@ -138,6 +154,27 @@ btn32.setOnClickListener(mClickListener); Button btn33 = (Button) findViewById(R.id.btnkey33); btn33.setOnClickListener(mClickListener); + + Button btn41 = (Button) findViewById(R.id.btnkey41); + btn41.setOnClickListener(mClickListener); + Button btn42 = (Button) findViewById(R.id.btnkey42); + btn42.setOnClickListener(mClickListener); + Button btn43 = (Button) findViewById(R.id.btnkey43); + btn43.setOnClickListener(mClickListener); + Button btn44 = (Button) findViewById(R.id.btnkey44); + btn44.setOnClickListener(mClickListener); + Button btn45 = (Button) findViewById(R.id.btnkey45); + btn45.setOnClickListener(mClickListener); + Button btn46 = (Button) findViewById(R.id.btnkey46); + btn46.setOnClickListener(mClickListener); + Button btn47 = (Button) findViewById(R.id.btnkey47); + btn47.setOnClickListener(mClickListener); + Button btn48 = (Button) findViewById(R.id.btnkey48); + btn48.setOnClickListener(mClickListener); + Button btn49 = (Button) findViewById(R.id.btnkey49); + btn49.setOnClickListener(mClickListener); + Button btn50 = (Button) findViewById(R.id.btnkey50); + btn50.setOnClickListener(mClickListener); } private void PostKey(String Key) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -45,9 +45,11 @@ public class main extends Activity { private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; + private Handler mHandler = new Handler(); private static String display = "nothing playing"; private static String state = ""; + private static boolean doUpdate; @Override public void onCreate(Bundle savedInstanceState) { @@ -75,7 +77,7 @@ } - Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); + Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); chkStatus(); SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, @@ -226,8 +228,8 @@ final android.net.NetworkInfo wifi = connMgr .getNetworkInfo(ConnectivityManager.TYPE_WIFI); - //final android.net.NetworkInfo mobile = connMgr - // .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); + // final android.net.NetworkInfo mobile = connMgr + // .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (!wifi.isAvailable()) { Toast.makeText(this, "Warning : Wifi is not available !", @@ -278,12 +280,15 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 1000); + + doUpdate = true; } - + @Override public void onPause() { super.onPause(); + doUpdate = false; mHandler.removeCallbacks(mUpdateTimeTask); } @@ -300,12 +305,10 @@ // automatically done on worker thread (separate from UI thread) protected Void doInBackground(final String... args) { - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + + String HttpServer = Settings.Server; + String HttpPort = Settings.Port; - String HttpServer = settings.getString("Server", "192.168.0.30"); - String HttpPort = settings.getString("Port", "8200"); - nowplayinghandler handler = nowplayinghandler.getinstance(); handler.setconnection(HttpServer, HttpPort); handler.fetchdata(); @@ -314,10 +317,14 @@ && (!nowplayinghandler.PlayerState .equals("no player active"))) { display = nowplayinghandler.Artist + " - " - + nowplayinghandler.Title + - " (" + nowplayinghandler.Actual + ")"; + + nowplayinghandler.Title + " (" + + nowplayinghandler.Actual + ")"; state = nowplayinghandler.PlayerState; } + else + { + display = "nothing playing"; + } return null; } @@ -327,20 +334,18 @@ TextView txt0 = (TextView) findViewById(R.id.main_now_playing); txt0.setText(display); - + ImageButton play = (ImageButton) findViewById(R.id.btn_main_play); - if(state.equals("playing")) - { - play.setImageDrawable(getResources() - .getDrawable(R.drawable.pause)); + if (state.equals("playing")) { + play.setImageDrawable(getResources().getDrawable( + R.drawable.pause)); + } else { + play.setImageDrawable(getResources().getDrawable( + R.drawable.right)); } - else - { - play.setImageDrawable(getResources() - .getDrawable(R.drawable.right)); - } - - mHandler.postDelayed(mUpdateTimeTask, 1000); + + if (doUpdate) + mHandler.postDelayed(mUpdateTimeTask, 1000); } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -13,7 +13,6 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.os.Bundle; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -89,8 +89,9 @@ private Handler mHandler = new Handler(); private static Vibrator vibrate; - final CharSequence[] items = { "Delete item", "Clear playlist", "Cancel" }; + final CharSequence[] items = { "Play item", "Delete item", "Clear playlist", "Cancel" }; private nowplaylisthandler.PlayListItem selectedItem; + private int selectedNo; /** Called when the activity is first created. */ @Override @@ -109,20 +110,27 @@ long arg3) { selectedItem = nowplaylisthandler.PlayList.get(arg2); - + selectedNo = arg2; + AlertDialog.Builder builder = new AlertDialog.Builder(arg0 .getContext()); builder.setTitle(selectedItem.Title); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { switch (item) { - case 0: + case 0: + PostSelectItem(selectedNo); + mHandler.postDelayed(mUpdateTimeTask, 100); + Toast.makeText(nowplaylist.this, + selectedItem.Title + " has been selected", Toast.LENGTH_SHORT).show(); + break; + case 1: PostDeleteItem(selectedItem.Filename); mHandler.postDelayed(mUpdateTimeTask, 100); Toast.makeText(nowplaylist.this, selectedItem.Title + " has been deleted", Toast.LENGTH_SHORT).show(); break; - case 1: + case 2: PostClear(); mHandler.postDelayed(mUpdateTimeTask, 100); Toast.makeText(nowplaylist.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); @@ -171,7 +179,22 @@ post.Post(xml); } + + public void PostSelectItem(int Number) { + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); + + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; + xml += "<message>"; + xml += "<command>SELECT_ITEM</command>"; + xml += "<itemNo>" + Number + "</itemNo>"; + xml += "</message>"; + + post.Post(xml); + } + @Override public void onStart() { super.onStart(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -58,14 +58,13 @@ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pictures); - + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); GridView gridview = (GridView) findViewById(R.id.GridView01); - gridview.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, long id) { @@ -139,7 +138,7 @@ this.dialog.dismiss(); } - if (pictureList.size() == 0) { + if (pictureList == null) { Toast.makeText(pictures.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-19 21:16:06 UTC (rev 4048) @@ -59,7 +59,7 @@ private boolean slideShow; private boolean randomShow; public static boolean SlideshowPaused = false; - private static long SlideInterval = 6000; + private static long SlideInterval = 5000; /** Called when the activity is first created. */ @Override @@ -73,7 +73,6 @@ gestureScanner = new GestureDetector(picturesfullscreen.this); new setPicture().execute(); - } private class setPicture extends AsyncTask<String, Void, Void> { Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-19 16:43:47 UTC (rev 4047) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2010-12-19 21:16:06 UTC (rev 4048) @@ -123,11 +123,12 @@ // GET int index1 = clientmessage.IndexOf(' '); int index2 = clientmessage.IndexOf(' ', index1 + 1); - string req = clientmessage.Substring(index1 + 1, index2 - index1).Trim().ToLower(); + string req = clientmessage.Substring(index1 + 1, index2 - index1).Trim(); req = HttpUtility.UrlDecode(req); AndroidServer.logDebug("receive HTTP GET : " + req); + System.Diagnostics.Debug.WriteLine("receive HTTP GET : " + req); if (req.StartsWith("/info")) { @@ -148,14 +149,14 @@ } else { - req = req.Replace("/", "\\"); - - if (req.EndsWith(".jpg")) + if (req.ToLower().EndsWith(".jpg")) { + req = req.Replace("/", "\\"); ReplyPictureFile(req); } - else if (req.EndsWith(".thb")) + else if (req.ToLower().EndsWith(".thb")) { + req = req.Replace("/", "\\"); ReplyPictureThumbFile(req); } else @@ -247,10 +248,9 @@ } else { - req = req.Replace("/", "\\"); - - if (req.EndsWith(".mp3")) + if (req.ToLower().EndsWith(".mp3")) { + req = req.Replace("/", "\\"); ReplyMusicFile(req, msgTyp); } else @@ -369,7 +369,7 @@ private void ExceuteCommand(string Message) { AndroidServer.logDebug("execute command"); - System.Diagnostics.Debug.WriteLine(Message); + //System.Diagnostics.Debug.WriteLine(Message); int x = Message.IndexOf("\r\n\r\n"); if ((x > 0) && (x < Message.Length)) @@ -683,7 +683,7 @@ } #endregion - #region clear playlist + #region playlist if (data["command"] == ("REMOVE_PLAYLIST")) { AndroidServer.logDebug("remove from playlist : " + data["filename"]); @@ -710,6 +710,30 @@ playList.Clear(); } + + if (data["command"] == ("SELECT_ITEM")) + { + AndroidServer.logDebug("select playlist : " + data["itemNo"]); + // parameter = itemNo + + PlayListPlayer playlistPlayer = PlayListPlayer.SingletonPlayer; + if (playlistPlayer.CurrentPlaylistType == PlayListType.PLAYLIST_MUSIC) + { + if (playlistPlayer.g_Player.Playing) + { + int sel = Convert.ToInt32(data["itemNo"]); + + PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); + if (sel < playList.Count) + playlistPlayer.Play(sel); + + } + } + + + + + } #endregion #endregion @@ -720,7 +744,12 @@ IntPtr handle = GUIGraphicsContext.form.Handle; SetForegroundWindow(handle); - SendKeys.SendWait(data["key"]); + if (data["key"] != "{ }") + SendKeys.SendWait(data["key"]); + else + SendKeys.SendWait(" "); + + } #endregion } @@ -822,7 +851,22 @@ else { // dir does not exist - SendErrorURL(Request); + //SendErrorURL(Request); + + string msg = string.Empty; + // header + msg += "HTTP/1.0 200 Ok\r\n"; + msg += "Content-Type: application/xml; charset=utf-8; filename=info.xml" + "\r\n"; + msg += "Proxy-Connection: close" + "\r\n"; + msg += "\r\n"; + // content + msg += "<?xml version=\"1.0\"?>\r\n"; + msg += "<Directory>\r\n"; + msg += "</Directory>\r\n"; + // send + sendMessage(socket, msg); + AndroidServer.logDebug("Reply empty picture dir"); + } #endregion @@ -1208,7 +1252,22 @@ else { // dir does not exist - SendErrorURL(Request); + //SendErrorURL(Request); + + string msg = string.Empty; + // header + msg += "HTTP/1.0 200 Ok\r\n"; + msg += "Content-Type: application/xml; charset=utf-8; filename=info.xml" + "\r\n"; + msg += "Proxy-Connection: close" + "\r\n"; + msg += "\r\n"; + // content + msg += "<?xml version=\"1.0\"?>\r\n"; + msg += "<Directory>\r\n"; + msg += "</Directory>\r\n"; + // send + sendMessage(socket, msg); + AndroidServer.logDebug("Reply empty music dir"); + } #endregion @@ -1964,6 +2023,7 @@ { if (!share.IsFtpShare) { + share.Name = share.Name.Replace("/", "_"); list.Add(share.Name, share.Path); } } @@ -1980,26 +2040,13 @@ } private string GetLocalDir(string Request, Dictionary<string, string> List) { - string folder = string.Empty; - string baseFolder = string.Empty; + string dir = string.Empty; - int x = Request.IndexOf("\\"); - if (x == -1) - { - baseFolder = Request; - } - else - { - baseFolder = Request.Substring(0, x); - folder = Request.Substring(x); - } - - string dir = string.Empty; foreach (KeyValuePair<string, string> pair in List) { - if (pair.Key.ToLower() == (baseFolder.ToLower())) + if (Request.StartsWith(pair.Key)) { - dir = pair.Value + folder; + dir = Request.Replace(pair.Key, pair.Value); return dir; } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-22 11:04:09
|
Revision: 4052 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4052&view=rev Author: kroko_koenig Date: 2010-12-22 11:04:02 +0000 (Wed, 22 Dec 2010) Log Message: ----------- start work on fastscroll (artist) and some bugs fixed plus utf8 Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylistXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml 2010-12-22 11:04:02 UTC (rev 4052) @@ -4,6 +4,6 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_artist" android:layout_height="wrap_content" - android:layout_width="fill_parent"> + android:layout_width="fill_parent" android:fastScrollEnabled="true"> </ListView> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-22 11:04:02 UTC (rev 4052) @@ -9,21 +9,16 @@ </TextView> <EditText android:id="@+id/server_ip" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:text="192.168.0.30" - android:inputType="text" - ></EditText> + android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="numberDecimal"></EditText> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="MediaPortal Port" android:textColor="#FF000000" android:textSize="18dip"></TextView> <EditText android:id="@+id/server_port" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="8200" - android:inputType="number|numberSigned"></EditText> + android:layout_height="wrap_content" android:text="8200" android:inputType="phone"></EditText> <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="MediaPortal MAC Adress" - android:textColor="#FF000000" android:textSize="18dip"></TextView> + android:layout_height="wrap_content" android:textColor="#FF000000" android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="12-34-56-78-90-12" - android:inputType="number|numberSigned"></EditText> + android:layout_height="wrap_content" android:text="12-34-56-78-90-12" android:inputType="text"></EditText> <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox> </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -0,0 +1,32 @@ +package mediaportal.remote; + +public class Entity { + + public static String AddEntity(String raw) { + if (raw == null) + return null; + char[] chars = raw.toCharArray(); + StringBuffer encoded = new StringBuffer(); + for (int i = 0; i < chars.length; i++) { + char c = chars[i]; + if (c == '&') + encoded.append("&"); + else if (c == '<') + encoded.append("<"); + else if (c == '>') + encoded.append(">"); + else if (c == '\'') + encoded.append("'"); + else if (c == '"') + encoded.append("""); + else if (c < 128) + encoded.append(c); + else { + encoded.append("&#"); + encoded.append((int) c); + encoded.append(";"); + } + } + return encoded.toString(); + } +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -64,7 +64,7 @@ socket.getOutputStream(), "UTF8")); wr.write("POST " + path + " HTTP/1.0\r\n"); wr.write("Content-Length: " + data.length() + "\r\n"); - wr.write("Content-Type: application/xml\r\n"); + wr.write("Content-Type: application/xml; charset=utf-8\r\n"); wr.write("\r\n"); // Send data Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -73,7 +73,7 @@ if (localName == "Artist") {currentDbItem.Artist =currentValue;} if (localName == "Title") {currentDbItem.Title =currentValue;} if (localName == "Album") {currentDbItem.Album =currentValue;} - if (localName == "AlbumArtist") {currentDbItem.AlbumArtist =currentValue;} + if (localName == "AlbumArtist") {currentDbItem.AlbumArtist =currentValue;} if (localName == "Track") {currentDbItem.Track =currentValue;} if (localName == "Rating") {currentDbItem.Rating =currentValue;} if (localName == "Filename") {currentDbItem.Filename =currentValue;} @@ -81,6 +81,8 @@ if (localName == "ID") {currentDbItem.ID =currentValue;} if (localName == "Item")DbList.add(currentDbItem); + + currentValue = null; } /** @@ -91,8 +93,8 @@ public void characters(char[] ch, int start, int length) throws SAXException { if (currentElement) { - currentValue = new String(ch, start, length); - currentElement = false; + String actual = new String(ch, start, length); + currentValue += actual; } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -21,11 +21,18 @@ package mediaportal.remote; +import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; +import java.net.URLDecoder; +import java.net.URLEncoder; + import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; @@ -34,6 +41,9 @@ import org.xml.sax.SAXException; import org.xml.sax.XMLReader; +import android.text.Html; +import android.util.Log; + public class ReceiveHandler { private org.xml.sax.ContentHandler _handler; @@ -104,5 +114,4 @@ } } - } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -31,6 +31,7 @@ import android.os.Bundle; import android.os.Vibrator; import android.view.GestureDetector; +import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.GestureDetector.OnGestureListener; @@ -171,6 +172,30 @@ .show(); } + public boolean onKeyDown(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_MENU) + { + Intent myIntent = new Intent(this, Remote_03.class); + startActivityForResult(myIntent, 0); + + return true; + } + else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) + { + PostCommand("volumeUp"); + return true; + } + else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) + { + PostCommand("volumeDown"); + return true; + } + else + { + return false; + } + } + public void PostCommand(String button) { DoVibrate(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -60,7 +60,7 @@ public Bitmap DownloadImage(String urlStr) { - final String url = urlStr; + final String url = urlStr.replaceAll(" ","%20"); Bitmap bitmap = null; InputStream in = null; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -39,6 +39,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Vibrator; +import android.view.KeyEvent; import android.view.View; import android.widget.*; @@ -86,7 +87,8 @@ Settings.Server = settings.getString("Server", "192.168.0.30"); Settings.Port = settings.getString("Port", "8200"); Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); - + Settings.Vibrate = settings.getBoolean("Vibrate", true); + Button btnPictures = (Button) findViewById(R.id.btn_main_pictures); btnPictures.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -168,7 +170,7 @@ } }); } - + private boolean reportExist() { try { @SuppressWarnings("unused") Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -175,7 +175,7 @@ holder.text2.setText(item.Album + " - " + item.Artist); convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE - : Color.LTGRAY); + : 0xFFEEEEEE); return convertView; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -22,6 +22,12 @@ package mediaportal.remote; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; + +import mediaportal.remote.ReceiveDbXmlHandler.DbItems; + import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; @@ -39,6 +45,7 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; +import android.widget.SectionIndexer; import android.widget.TextView; import android.widget.Toast; @@ -46,18 +53,21 @@ private Handler mHandler = new Handler(); private static Vibrator vibrate; - + private static ArrayList<ReceiveDbXmlHandler.DbItems> artistList; + private static HashMap<String, Integer> alphaIndexer; + private static String[] sections; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_artist); mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); - + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - + ListView l1 = (ListView) findViewById(R.id.list_artist); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -68,9 +78,9 @@ musicResults.Select = item.Artist; musicResults.Mode = musicResults.SelectMode.Artist; - + musicArtist.DoVibrate(); - + Intent myIntent = new Intent(arg1.getContext(), musicResults.class); startActivityForResult(myIntent, 0); @@ -87,9 +97,10 @@ new update().execute(); } }; - + private class update extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(musicArtist.this); + private final ProgressDialog dialog = new ProgressDialog( + musicArtist.this); // can use UI thread here protected void onPreExecute() { @@ -113,16 +124,33 @@ this.dialog.dismiss(); } - if (artistList.size() == 0) { + if (artistList == null) { Toast.makeText(musicArtist.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + // build hash map + alphaIndexer = new HashMap<String, Integer>(); + int size = artistList.size(); + + for (int x = 0; x < size; x++) { + DbItems s = artistList.get(x); + String ch = s.Artist.substring(0, 1); + ch = ch.toUpperCase(); + alphaIndexer.put(ch, x); + } + Set<String> sectionLetters = alphaIndexer.keySet(); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>(sectionLetters); + Collections.sort(sectionList); + sections = new String[sectionList.size()]; + sectionList.toArray(sections); + + // update list ListView listview = (ListView) findViewById(R.id.list_artist); listview.setAdapter(new EfficientAdapter(musicArtist.this)); } } - - } private static void DoVibrate() { @@ -130,9 +158,9 @@ vibrate.vibrate(100); } } + + private static class EfficientAdapter extends BaseAdapter implements SectionIndexer { - private static class EfficientAdapter extends BaseAdapter { - private LayoutInflater mInflater; public EfficientAdapter(Context context) { @@ -176,7 +204,7 @@ holder.text2.setText(item.Artist); convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE - : Color.LTGRAY); + : 0xFFEEEEEE); return convertView; } @@ -185,6 +213,20 @@ TextView text; TextView text2; } + + /// + /// implement SectionIndexer + /// + + public int getPositionForSection(int section) { + return alphaIndexer.get(sections[section]); + } + public int getSectionForPosition(int position) { + return 1; + } + public Object[] getSections() { + return sections; + } } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -48,7 +48,7 @@ private Handler mHandler = new Handler(); private static Vibrator vibrate; - + private static ArrayList<ReceiveDbXmlHandler.DbItems> songList; public static String Select = ""; @@ -63,9 +63,9 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); - + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - + ListView l1 = (ListView) findViewById(R.id.list_song); l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @@ -73,7 +73,7 @@ long arg3) { selectedItem = songList.get(arg2); - + DoVibrate(); AlertDialog.Builder builder = new AlertDialog.Builder(arg0 @@ -85,16 +85,20 @@ case 0: PostAddItem(selectedItem); Toast.makeText(musicSong.this, - selectedItem.Title + " has been added", Toast.LENGTH_SHORT).show(); + selectedItem.Title + " has been added", + Toast.LENGTH_SHORT).show(); break; case 1: PostClear(); - Toast.makeText(musicSong.this, "Playlist has been cleared", Toast.LENGTH_SHORT).show(); + Toast.makeText(musicSong.this, + "Playlist has been cleared", + Toast.LENGTH_SHORT).show(); break; case 2: SavetoSDCard(selectedItem); Toast.makeText(musicSong.this, - selectedItem.Title + " has been transferd", Toast.LENGTH_SHORT).show(); + selectedItem.Title + " has been transferd", + Toast.LENGTH_SHORT).show(); break; } } @@ -103,7 +107,7 @@ alert.show(); } }); - + ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); l1.setDivider(divcolor); l1.setDividerHeight(2); @@ -155,7 +159,7 @@ vibrate.vibrate(100); } } - + public void PostClear() { PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); @@ -169,6 +173,7 @@ post.Post(xml); } + public void PostAddItem(ReceiveDbXmlHandler.DbItems Item) { PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); @@ -178,24 +183,28 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; xml += "<command>ADD_MUSIC</command>"; - xml += "<filename>" + Item.Filename + "</filename>"; - xml += "<artist>" + Item.Artist + "</artist>"; - xml += "<title>" + Item.Title + "</title>"; + xml += "<filename>" + Entity.AddEntity(Item.Filename) + "</filename>"; + xml += "<artist>" + Entity.AddEntity(Item.Artist) + "</artist>"; + xml += "<title>" + Entity.AddEntity(Item.Title) + "</title>"; xml += "<duration>" + Item.Duration + "</duration>"; xml += "</message>"; post.Post(xml); } + private void SavetoSDCard(ReceiveDbXmlHandler.DbItems Item) { - + String filename = Item.Artist + " - " + Item.Title + ".mp3"; - String id = Item.ID; - - httpHandler h = new httpHandler(); - h.DownloadFileByID(filename,id); - - String sd = Environment.getExternalStorageDirectory().toString(); - MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); + String id = Item.ID; + + httpHandler h = new httpHandler(); + h.DownloadFileByID(filename, id); + + String sd = Environment.getExternalStorageDirectory().toString(); + + @SuppressWarnings("unused") + MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + + filename, "audio/mpeg"); } private static class EfficientAdapter extends BaseAdapter { @@ -243,7 +252,7 @@ holder.text2.setText(item.Title + " - " + item.Artist); convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE - : Color.LTGRAY); + : 0xFFEEEEEE); return convertView; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -6,7 +6,7 @@ public class nowplayingXmlHandler extends DefaultHandler { Boolean currentElement = false; - String currentValue = null; + String currentValue = ""; /** * Called when tag starts ( example:- <name>AndroidPeople</name> -- <name> ) @@ -15,7 +15,7 @@ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { currentElement = true; - currentValue = "..."; + currentValue = ""; } /** @@ -35,7 +35,7 @@ if (localName == "TotalTime") {nowplayinghandler.Total =currentValue;} if (localName == "ActualTime") {nowplayinghandler.Actual =currentValue;} if (localName == "Cover") {nowplayinghandler.Cover =currentValue;} - if (localName == "PlayerState") {nowplayinghandler.PlayerState =currentValue;} + if (localName == "PlayerState") {nowplayinghandler.PlayerState =currentValue;} } /** @@ -46,8 +46,8 @@ public void characters(char[] ch, int start, int length) throws SAXException { if (currentElement) { - currentValue = new String(ch, start, length); - currentElement = false; + String actual = new String(ch, start, length); + currentValue += actual; } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylistXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylistXmlHandler.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylistXmlHandler.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -6,7 +6,7 @@ public class nowplaylistXmlHandler extends DefaultHandler { Boolean currentElement = false; - String currentValue = null; + String currentValue = ""; nowplaylisthandler.PlayListItem item = null; /** @@ -16,7 +16,7 @@ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { currentElement = true; - currentValue = "..."; + currentValue = ""; if (localName == "Item") item = new nowplaylisthandler.PlayListItem(); @@ -62,8 +62,8 @@ public void characters(char[] ch, int start, int length) throws SAXException { if (currentElement) { - currentValue = new String(ch, start, length); - currentElement = false; + String actual = new String(ch, start, length); + currentValue += actual; } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -102,7 +102,6 @@ mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 0); } - } }); } @@ -216,8 +215,7 @@ String file = "http://" + Settings.Server + ":" + Settings.Port + "/pictures/"; file += actualDir + item.File + ".thb"; - item.Picture = http.DownloadImage(file.replaceAll(" ", - "%20")); + item.Picture = http.DownloadImage(file); iv.setImageBitmap(item.Picture); if (item.Picture == null) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -52,10 +52,12 @@ public class picturesfullscreen extends Activity implements OnGestureListener { private Handler mHandler = new Handler(); + private GestureDetector gestureScanner; private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; private static final int SWIPE_THRESHOLD_VELOCITY = 200; + private boolean slideShow; private boolean randomShow; public static boolean SlideshowPaused = false; @@ -95,7 +97,7 @@ String file = "http://" + Settings.Server + ":" + Settings.Port + "/pictures/"; file += pictures.actualDir + item.File; - item.Picture = http.DownloadImage(file.replaceAll(" ", "%20")); + item.Picture = http.DownloadImage(file); } return null; @@ -233,10 +235,13 @@ private void SendPicture() { try { DirItems item = pictures.pictureList.get(pictures.selectedPicture); + Intent picMessageIntent = new Intent( android.content.Intent.ACTION_SEND); + picMessageIntent.setType("image/jpeg"); picMessageIntent.putExtra(Intent.EXTRA_STREAM, item.Picture); + startActivity(Intent.createChooser(picMessageIntent, "Send picture using:")); } catch (Exception e) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2010-12-21 13:26:53 UTC (rev 4051) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2010-12-22 11:04:02 UTC (rev 4052) @@ -72,6 +72,7 @@ txt1.setText(Settings.Server); txt2.setText(Settings.Port); txt3.setText(Settings.MacId); + chk.setChecked(Settings.Vibrate); } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2010-12-23 14:49:47
|
Revision: 4053 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4053&view=rev Author: kroko_koenig Date: 2010-12-23 14:49:39 +0000 (Thu, 23 Dec 2010) Log Message: ----------- some more functions and first bug fixes Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/values/strings.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java trunk/plugins/AndroidRemote/Release/MediaPortalRemote.001 Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -36,4 +36,7 @@ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission> <uses-permission android:name="android.permission.VIBRATE"></uses-permission> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> + <uses-permission android:name="android.permission.DISABLE_KEYGUARD"></uses-permission> + <uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission> + </manifest> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -8,6 +8,9 @@ package mediaportal.remote; public final class R { + public static final class array { + public static final int shutdown=0x7f050000; + } public static final class attr { } public static final class drawable { @@ -79,141 +82,142 @@ public static final int wake_on_lan=0x7f020041; } public static final class id { - public static final int GridView01=0x7f060017; - public static final int ImageView01=0x7f060019; - public static final int LinearLayout00=0x7f06004a; - public static final int LinearLayout01=0x7f06001a; - public static final int LinearLayout02=0x7f060055; - public static final int LinearLayout03=0x7f06005f; - public static final int LinearLayout04=0x7f060069; - public static final int LinearLayout05=0x7f06006f; - public static final int ListView01=0x7f060028; - public static final int TableLayout01=0x7f060005; - public static final int TableRow01=0x7f060006; - public static final int TextView01=0x7f060003; - public static final int TextView02=0x7f060004; - public static final int btnBack=0x7f06003e; - public static final int btnChannelDown=0x7f060043; - public static final int btnChannelUp=0x7f060040; - public static final int btnDown=0x7f06003d; - public static final int btnExit=0x7f060044; - public static final int btnFBack=0x7f06002b; - public static final int btnFForw=0x7f06002d; - public static final int btnHibernate=0x7f060046; - public static final int btnHome=0x7f060034; - public static final int btnInfo=0x7f060036; - public static final int btnLeft=0x7f060038; - public static final int btnMenu=0x7f06003c; - public static final int btnOk=0x7f060039; - public static final int btnPause=0x7f060031; - public static final int btnPlay=0x7f06002c; - public static final int btnRestart=0x7f060047; - public static final int btnRight=0x7f06003a; - public static final int btnShutOff=0x7f060048; - public static final int btnSkipBack=0x7f06002f; - public static final int btnSkipForw=0x7f060032; - public static final int btnStop=0x7f060030; - public static final int btnSuspend=0x7f060045; - public static final int btnUp=0x7f060035; - public static final int btnVolumeDown=0x7f060042; - public static final int btnVolumeMute=0x7f060041; - public static final int btnVolumeUp=0x7f06003f; - public static final int btnWakeOnLan=0x7f060049; - public static final int btn_main_music=0x7f060008; - public static final int btn_main_now_playing=0x7f06000b; - public static final int btn_main_pictures=0x7f060007; - public static final int btn_main_play=0x7f06000f; - public static final int btn_main_remote=0x7f06000a; - public static final int btn_main_settings=0x7f06000c; - public static final int btn_main_skp_back=0x7f06000e; - public static final int btn_main_skp_forw=0x7f060010; - public static final int btn_main_video=0x7f060009; - public static final int btnkey01=0x7f06004b; - public static final int btnkey02=0x7f06004c; - public static final int btnkey03=0x7f06004d; - public static final int btnkey04=0x7f06004e; - public static final int btnkey05=0x7f06004f; - public static final int btnkey06=0x7f060050; - public static final int btnkey07=0x7f060051; - public static final int btnkey08=0x7f060052; - public static final int btnkey09=0x7f060053; - public static final int btnkey10=0x7f060054; - public static final int btnkey11=0x7f060056; - public static final int btnkey12=0x7f060057; - public static final int btnkey13=0x7f060058; - public static final int btnkey14=0x7f060059; - public static final int btnkey15=0x7f06005a; - public static final int btnkey16=0x7f06005b; - public static final int btnkey17=0x7f06005c; - public static final int btnkey18=0x7f06005d; - public static final int btnkey19=0x7f06005e; - public static final int btnkey20=0x7f060060; - public static final int btnkey21=0x7f060061; - public static final int btnkey22=0x7f060062; - public static final int btnkey23=0x7f060063; - public static final int btnkey24=0x7f060064; - public static final int btnkey25=0x7f060065; - public static final int btnkey26=0x7f060066; - public static final int btnkey27=0x7f060067; - public static final int btnkey28=0x7f060068; - public static final int btnkey29=0x7f06006a; - public static final int btnkey30=0x7f06006b; - public static final int btnkey31=0x7f06006c; - public static final int btnkey32=0x7f06006d; - public static final int btnkey33=0x7f06006e; - public static final int btnkey41=0x7f060070; - public static final int btnkey42=0x7f060071; - public static final int btnkey43=0x7f060072; - public static final int btnkey44=0x7f060073; - public static final int btnkey45=0x7f060074; - public static final int btnkey46=0x7f060075; - public static final int btnkey47=0x7f060076; - public static final int btnkey48=0x7f060077; - public static final int btnkey49=0x7f060078; - public static final int btnkey50=0x7f060079; - public static final int clearplaylist=0x7f060080; - public static final int full_text=0x7f060018; - public static final int icon_image=0x7f060001; - public static final int icon_text=0x7f060002; - public static final int list_album=0x7f060013; - public static final int list_artist=0x7f060014; - public static final int list_result=0x7f060015; - public static final int list_song=0x7f060016; - public static final int main_now_playing=0x7f06000d; - public static final int music_grid=0x7f060012; - public static final int naviRemote_text=0x7f060029; - public static final int now_album=0x7f06001c; - public static final int now_artist=0x7f060022; - public static final int now_cd=0x7f06001d; - public static final int now_list=0x7f060027; - public static final int now_next=0x7f060026; - public static final int now_play=0x7f060025; - public static final int now_playing=0x7f06001b; - public static final int now_playing_right=0x7f060020; - public static final int now_playing_t_left=0x7f06001f; - public static final int now_prev=0x7f060023; - public static final int now_progress=0x7f06001e; - public static final int now_stop=0x7f060024; - public static final int now_title=0x7f060021; - public static final int open=0x7f060083; - public static final int playlist=0x7f06007f; - public static final int rslide=0x7f060086; - public static final int save=0x7f060082; - public static final int sdcard=0x7f060081; - public static final int send=0x7f060084; - public static final int server_ip=0x7f06007a; - public static final int server_macid=0x7f06007c; - public static final int server_port=0x7f06007b; - public static final int slide=0x7f060085; - public static final int title=0x7f06007e; - public static final int vibration=0x7f06007d; - public static final int widget0=0x7f060011; - public static final int widget00=0x7f06002a; - public static final int widget01=0x7f06002e; - public static final int widget02=0x7f060033; - public static final int widget03=0x7f060037; - public static final int widget04=0x7f06003b; - public static final int widget44=0x7f060000; + public static final int GridView01=0x7f070017; + public static final int ImageView01=0x7f070019; + public static final int LinearLayout00=0x7f07004a; + public static final int LinearLayout01=0x7f07001a; + public static final int LinearLayout02=0x7f070055; + public static final int LinearLayout03=0x7f07005f; + public static final int LinearLayout04=0x7f070069; + public static final int LinearLayout05=0x7f07006f; + public static final int ListView01=0x7f070028; + public static final int Spinner01=0x7f07007d; + public static final int TableLayout01=0x7f070005; + public static final int TableRow01=0x7f070006; + public static final int TextView01=0x7f070003; + public static final int TextView02=0x7f070004; + public static final int btnBack=0x7f07003e; + public static final int btnChannelDown=0x7f070043; + public static final int btnChannelUp=0x7f070040; + public static final int btnDown=0x7f07003d; + public static final int btnExit=0x7f070044; + public static final int btnFBack=0x7f07002b; + public static final int btnFForw=0x7f07002d; + public static final int btnHibernate=0x7f070046; + public static final int btnHome=0x7f070034; + public static final int btnInfo=0x7f070036; + public static final int btnLeft=0x7f070038; + public static final int btnMenu=0x7f07003c; + public static final int btnOk=0x7f070039; + public static final int btnPause=0x7f070031; + public static final int btnPlay=0x7f07002c; + public static final int btnRestart=0x7f070047; + public static final int btnRight=0x7f07003a; + public static final int btnShutOff=0x7f070048; + public static final int btnSkipBack=0x7f07002f; + public static final int btnSkipForw=0x7f070032; + public static final int btnStop=0x7f070030; + public static final int btnSuspend=0x7f070045; + public static final int btnUp=0x7f070035; + public static final int btnVolumeDown=0x7f070042; + public static final int btnVolumeMute=0x7f070041; + public static final int btnVolumeUp=0x7f07003f; + public static final int btnWakeOnLan=0x7f070049; + public static final int btn_main_music=0x7f070008; + public static final int btn_main_now_playing=0x7f07000b; + public static final int btn_main_pictures=0x7f070007; + public static final int btn_main_play=0x7f07000f; + public static final int btn_main_remote=0x7f07000a; + public static final int btn_main_settings=0x7f07000c; + public static final int btn_main_skp_back=0x7f07000e; + public static final int btn_main_skp_forw=0x7f070010; + public static final int btn_main_video=0x7f070009; + public static final int btnkey01=0x7f07004b; + public static final int btnkey02=0x7f07004c; + public static final int btnkey03=0x7f07004d; + public static final int btnkey04=0x7f07004e; + public static final int btnkey05=0x7f07004f; + public static final int btnkey06=0x7f070050; + public static final int btnkey07=0x7f070051; + public static final int btnkey08=0x7f070052; + public static final int btnkey09=0x7f070053; + public static final int btnkey10=0x7f070054; + public static final int btnkey11=0x7f070056; + public static final int btnkey12=0x7f070057; + public static final int btnkey13=0x7f070058; + public static final int btnkey14=0x7f070059; + public static final int btnkey15=0x7f07005a; + public static final int btnkey16=0x7f07005b; + public static final int btnkey17=0x7f07005c; + public static final int btnkey18=0x7f07005d; + public static final int btnkey19=0x7f07005e; + public static final int btnkey20=0x7f070060; + public static final int btnkey21=0x7f070061; + public static final int btnkey22=0x7f070062; + public static final int btnkey23=0x7f070063; + public static final int btnkey24=0x7f070064; + public static final int btnkey25=0x7f070065; + public static final int btnkey26=0x7f070066; + public static final int btnkey27=0x7f070067; + public static final int btnkey28=0x7f070068; + public static final int btnkey29=0x7f07006a; + public static final int btnkey30=0x7f07006b; + public static final int btnkey31=0x7f07006c; + public static final int btnkey32=0x7f07006d; + public static final int btnkey33=0x7f07006e; + public static final int btnkey41=0x7f070070; + public static final int btnkey42=0x7f070071; + public static final int btnkey43=0x7f070072; + public static final int btnkey44=0x7f070073; + public static final int btnkey45=0x7f070074; + public static final int btnkey46=0x7f070075; + public static final int btnkey47=0x7f070076; + public static final int btnkey48=0x7f070077; + public static final int btnkey49=0x7f070078; + public static final int btnkey50=0x7f070079; + public static final int clearplaylist=0x7f070081; + public static final int full_text=0x7f070018; + public static final int icon_image=0x7f070001; + public static final int icon_text=0x7f070002; + public static final int list_album=0x7f070013; + public static final int list_artist=0x7f070014; + public static final int list_result=0x7f070015; + public static final int list_song=0x7f070016; + public static final int main_now_playing=0x7f07000d; + public static final int music_grid=0x7f070012; + public static final int naviRemote_text=0x7f070029; + public static final int now_album=0x7f07001c; + public static final int now_artist=0x7f070022; + public static final int now_cd=0x7f07001d; + public static final int now_list=0x7f070027; + public static final int now_next=0x7f070026; + public static final int now_play=0x7f070025; + public static final int now_playing=0x7f07001b; + public static final int now_playing_right=0x7f070020; + public static final int now_playing_t_left=0x7f07001f; + public static final int now_prev=0x7f070023; + public static final int now_progress=0x7f07001e; + public static final int now_stop=0x7f070024; + public static final int now_title=0x7f070021; + public static final int open=0x7f070084; + public static final int playlist=0x7f070080; + public static final int rslide=0x7f070087; + public static final int save=0x7f070083; + public static final int sdcard=0x7f070082; + public static final int send=0x7f070085; + public static final int server_ip=0x7f07007a; + public static final int server_macid=0x7f07007c; + public static final int server_port=0x7f07007b; + public static final int slide=0x7f070086; + public static final int title=0x7f07007f; + public static final int vibration=0x7f07007e; + public static final int widget0=0x7f070011; + public static final int widget00=0x7f07002a; + public static final int widget01=0x7f07002e; + public static final int widget02=0x7f070033; + public static final int widget03=0x7f070037; + public static final int widget04=0x7f07003b; + public static final int widget44=0x7f070000; } public static final class layout { public static final int icon=0x7f030000; @@ -237,8 +241,8 @@ public static final int title=0x7f030012; } public static final class menu { - public static final int music_menu=0x7f050000; - public static final int picturefullscreenmenu=0x7f050001; + public static final int music_menu=0x7f060000; + public static final int picturefullscreenmenu=0x7f060001; } public static final class string { public static final int app_name=0x7f040000; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-23 14:49:39 UTC (rev 4053) @@ -8,6 +8,8 @@ slide show random slide show +threaded caching + Music section ------------- browse folders (MP shares) @@ -18,6 +20,8 @@ clear playlist save files from db to phone +fast scroll + Video section ------------- nothing yet @@ -27,7 +31,7 @@ show actual title show actual time show actual cover -clear playlist +clear play list delete one item Remote @@ -37,11 +41,9 @@ Main issues ------------ -Vibration feedback (not completed) switch WIFI on (just msg now) save files from Android to MP if the MP has no focus the remote doesnt work (normal) -save huge files can cause out of memory, better save stream -playlist select on file (switch to file x) progress task for downloads + Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -4,6 +4,6 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_album" android:layout_height="wrap_content" - android:layout_width="fill_parent"> + android:layout_width="fill_parent" android:fastScrollEnabled="true"> </ListView> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -4,6 +4,6 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_result" android:layout_height="wrap_content" - android:layout_width="fill_parent"> + android:layout_width="fill_parent" android:fastScrollEnabled="true"> </ListView> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -4,6 +4,6 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_song" android:layout_height="wrap_content" - android:layout_width="fill_parent"> + android:layout_width="fill_parent" android:fastScrollEnabled="true"> </ListView> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -6,19 +6,30 @@ <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="MediaPortal IP" android:textColor="#FF000000" android:textSize="18dip"> - - </TextView> + + </TextView> <EditText android:id="@+id/server_ip" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="numberDecimal"></EditText> + android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="text"></EditText> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="MediaPortal Port" android:textColor="#FF000000" android:textSize="18dip"></TextView> <EditText android:id="@+id/server_port" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="8200" android:inputType="phone"></EditText> - <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:textColor="#FF000000" android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> + android:layout_height="wrap_content" android:text="8200" + android:inputType="phone"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="12-34-56-78-90-12" android:inputType="text"></EditText> - -<CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox> + android:layout_height="wrap_content" android:text="12-34-56-78-90-12" + android:inputType="text"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="Power Mode"></TextView> + <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" + android:layout_height="wrap_content"></Spinner> + + <CheckBox android:layout_width="wrap_content" + android:layout_height="wrap_content" android:textColor="#000" + android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox> + </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:layout_height="fill_parent" + android:orientation="vertical" android:padding="15dip" + android:background="@drawable/brush"> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="MediaPortal IP" + android:textColor="#FF000000" android:textSize="18dip"> + + </TextView> + <EditText android:id="@+id/server_ip" android:layout_width="fill_parent" android:text="192.168.0.30" + android:inputType="numberDecimal" android:layout_height="50dip"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="MediaPortal Port" + android:textColor="#FF000000" android:textSize="18dip"></TextView> + <EditText android:id="@+id/server_port" android:layout_width="fill_parent" + android:text="8200" + android:inputType="phone" android:layout_height="50dip"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> + <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" + android:text="12-34-56-78-90-12" + android:inputType="text" android:layout_height="50dip"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="Power Mode"></TextView> + <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" android:layout_height="50dip"></Spinner> + + <CheckBox android:layout_width="wrap_content" + android:textColor="#000" + android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback" android:layout_height="50dip"></CheckBox> + +</LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/values/strings.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/values/strings.xml 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/values/strings.xml 2010-12-23 14:49:39 UTC (rev 4053) @@ -1,4 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">MediaPortal Remote</string> + + <string-array name="shutdown"> + <item>Exit</item> + <item>Suspend</item> + <item>Hibernate</item> + <item>Restart</item> + <item>Shut Off</item> + </string-array> + </resources> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -40,6 +40,8 @@ import org.apache.http.params.HttpProtocolParams; import org.apache.http.protocol.HTTP; +import android.util.Log; + public class PostWebserver { public String httpServer = ""; @@ -77,6 +79,7 @@ String line; while ((line = rd.readLine()) != null) { + Log.d("MediaPortal", "Response POST : " + line); // Process line... } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -21,29 +21,18 @@ package mediaportal.remote; -import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.StringReader; -import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; -import java.net.URLDecoder; -import java.net.URLEncoder; - import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; - import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; -import android.text.Html; -import android.util.Log; - public class ReceiveHandler { private org.xml.sax.ContentHandler _handler; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -30,6 +30,7 @@ import android.content.res.AssetManager; import android.os.Bundle; import android.os.Vibrator; +import android.util.Log; import android.view.GestureDetector; import android.view.KeyEvent; import android.view.MotionEvent; @@ -40,8 +41,6 @@ public class Remote_01 extends Activity implements OnGestureListener { - public static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - private GestureDetector gestureScanner; private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; @@ -55,6 +54,10 @@ gestureScanner = new GestureDetector(this); + // / + // / buttons + // / + Button can = (Button) findViewById(R.id.btnBack); can.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -166,40 +169,40 @@ PostCommand("rewind"); } }); - - Toast.makeText(this, - "swipe to left for more", Toast.LENGTH_LONG) + + Toast.makeText(this, "swipe to left for more", Toast.LENGTH_SHORT) .show(); } - public boolean onKeyDown(int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_MENU) - { - Intent myIntent = new Intent(this, Remote_03.class); + // / + // / hardware keys + // / + + @Override public boolean onKeyDown(int keyCode, KeyEvent event) { + + switch (keyCode) { + case KeyEvent.KEYCODE_MENU: { + Intent myIntent = new Intent(this, Remote_03.class); startActivityForResult(myIntent, 0); - - return true; - } - else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) - { - PostCommand("volumeUp"); - return true; - } - else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) - { - PostCommand("volumeDown"); - return true; - } - else - { - return false; - } + return true; + } + case KeyEvent.KEYCODE_VOLUME_UP: { + PostCommand("volumeUp"); + return true; + } + case KeyEvent.KEYCODE_VOLUME_DOWN: { + PostCommand("volumeDown"); + return true; + } + } + + return super.onKeyDown(keyCode, event); } - + public void PostCommand(String button) { DoVibrate(); - + PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); AssetManager assetManager = getAssets(); @@ -224,7 +227,8 @@ @Override public boolean onTouchEvent(MotionEvent me) { return gestureScanner.onTouchEvent(me); - } + } + public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { try { @@ -235,32 +239,36 @@ && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { Intent myIntent = new Intent(this, Remote_02.class); startActivityForResult(myIntent, 0); - + } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { - + } } catch (Exception e) { // nothing } return false; } - + public boolean onDown(MotionEvent arg0) { return true; } + public void onLongPress(MotionEvent arg0) { } + public boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2, float arg3) { return false; } + public void onShowPress(MotionEvent arg0) { } + public boolean onSingleTapUp(MotionEvent arg0) { return false; } - + public void DoVibrate() { if (Settings.Vibrate) { // Get instance of Vibrator from current Context Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -122,6 +122,8 @@ public void onClick(View view) { Toast.makeText(Remote_02.this, "not implemneted yet. Sorry", Toast.LENGTH_SHORT).show(); + //Wol w = new Wol(); + //w.sendMagicPacket(macStr, 9); } }); } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -27,4 +27,5 @@ public static String Port = "8200"; public static String MacId = "11-22-33-44-55-66"; public static Boolean Vibrate= true; + public static int PowerMode = 0; } Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -0,0 +1,56 @@ +package mediaportal.remote; + +import java.net.DatagramPacket; +import java.net.DatagramSocket; +import java.net.InetAddress; + +public class Wol { + + public Boolean sendMagicPacket(String macStr, String ipStr, int PORT) { + try { + byte[] mac = getMacId(macStr); + + // WOL packet contains a 6-bytes trailer and 16 times a 6-bytes + // sequence containing the MAC address. + byte[] data = new byte[17 * 6]; + + // Trailer of 6 times 0xFF. + for (int i = 0; i < 6; i++) + data[i] = (byte) 0xff; + + // Body of magic packet contains 16 times the MAC address. + for (int i = 1; i <= 16; i++) + for (int j = 0; j < 6; j++) + data[i * 6 + j] = mac[j]; + + InetAddress address = InetAddress.getByName(ipStr); + DatagramPacket packet = new DatagramPacket(data, data.length, + address, PORT); + DatagramSocket socket = new DatagramSocket(); + socket.send(packet); + socket.close(); + + return true; + } catch (Exception e) { + return false; + } + } + public Boolean sendMagicPacket(String macStr, int PORT) { + return sendMagicPacket(macStr, "255.255.255.255", PORT); + } + + private static byte[] getMacId(String macStr) { + + String[] val = macStr.split("-"); + if (val.length == 6) { + byte[] erg = new byte[6]; + for (int i = 0; i < 6; i++) { + erg[i] = (byte) Integer.parseInt(val[i], 16); + } + return erg; + } + + return null; + } + +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -22,6 +22,7 @@ package mediaportal.remote; import java.io.BufferedReader; +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; @@ -29,6 +30,8 @@ import mediaportal.remote.R; import android.app.Activity; import android.app.AlertDialog; +import android.app.KeyguardManager; +import android.app.KeyguardManager.KeyguardLock; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -37,17 +40,19 @@ import android.net.ConnectivityManager; import android.os.AsyncTask; import android.os.Bundle; +import android.os.Environment; import android.os.Handler; +import android.os.PowerManager; import android.os.Vibrator; -import android.view.KeyEvent; import android.view.View; import android.widget.*; public class main extends Activity { private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - + private Handler mHandler = new Handler(); + private static String display = "nothing playing"; private static String state = ""; private static boolean doUpdate; @@ -57,6 +62,29 @@ super.onCreate(savedInstanceState); setContentView(R.layout.main); + // + // init mp folder + // + try { + File fPath = new File(Environment.getExternalStorageDirectory(), + "\\MP"); + if (!fPath.exists()) + fPath.mkdir(); + } catch (Exception e) { + } + + // / + // / disable keyboard lock + // / + + KeyguardManager keyguardManager = (KeyguardManager) getSystemService(Activity.KEYGUARD_SERVICE); + KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE); + lock.disableKeyguard(); + + // / + // / Report section + // / + if (reportExist()) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Do you want to send a crash report ?") @@ -81,14 +109,10 @@ Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); chkStatus(); - SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, - MODE_PRIVATE); + // / + // / Navigation Buttons + // / - Settings.Server = settings.getString("Server", "192.168.0.30"); - Settings.Port = settings.getString("Port", "8200"); - Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); - Settings.Vibrate = settings.getBoolean("Vibrate", true); - Button btnPictures = (Button) findViewById(R.id.btn_main_pictures); btnPictures.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -146,6 +170,10 @@ } }); + // / + // / Player Buttons + // / + Button skipForw = (Button) findViewById(R.id.btn_main_skp_forw); skipForw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -170,7 +198,7 @@ } }); } - + private boolean reportExist() { try { @SuppressWarnings("unused") @@ -178,7 +206,6 @@ this.openFileInput("stack.trace"))); return true; } catch (FileNotFoundException e) { - // TODO Auto-generated catch block e.printStackTrace(); } return false; @@ -211,10 +238,8 @@ this.deleteFile("stack.trace"); } catch (FileNotFoundException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } @@ -280,9 +305,18 @@ public void onStart() { super.onStart(); + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, + MODE_PRIVATE); + + Settings.Server = settings.getString("Server", "192.168.0.30"); + Settings.Port = settings.getString("Port", "8200"); + Settings.MacId = settings.getString("MacId", "11-22-33-44-55-66"); + Settings.Vibrate = settings.getBoolean("Vibrate", true); + Settings.PowerMode = settings.getInt("PowerMode", 0); + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 1000); - + doUpdate = true; } @@ -307,7 +341,7 @@ // automatically done on worker thread (separate from UI thread) protected Void doInBackground(final String... args) { - + String HttpServer = Settings.Server; String HttpPort = Settings.Port; @@ -322,9 +356,7 @@ + nowplayinghandler.Title + " (" + nowplayinghandler.Actual + ")"; state = nowplayinghandler.PlayerState; - } - else - { + } else { display = "nothing playing"; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -22,6 +22,12 @@ package mediaportal.remote; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; + +import mediaportal.remote.ReceiveDbXmlHandler.DbItems; + import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; @@ -39,6 +45,7 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; +import android.widget.SectionIndexer; import android.widget.TextView; import android.widget.Toast; @@ -49,34 +56,37 @@ private static ArrayList<ReceiveDbXmlHandler.DbItems> albumList; + private static HashMap<String, Integer> alphaIndexer; + private static String[] sections; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_album); mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); - + vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - + ListView l1 = (ListView) findViewById(R.id.list_album); - l1.setOnItemClickListener(new AdapterView.OnItemClickListener() - { + l1.setOnItemClickListener(new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, - long arg3) { + long arg3) { ReceiveDbXmlHandler.DbItems item = albumList.get(arg2); - + musicResults.Select = item.Album + "&" + item.Artist; musicResults.Mode = musicResults.SelectMode.Album; - + musicAlbum.DoVibrate(); - - Intent myIntent = new Intent(arg1.getContext(), musicResults.class); - startActivityForResult(myIntent, 0); + + Intent myIntent = new Intent(arg1.getContext(), + musicResults.class); + startActivityForResult(myIntent, 0); } }); - + ColorDrawable divcolor = new ColorDrawable(Color.DKGRAY); l1.setDivider(divcolor); l1.setDividerHeight(2); @@ -89,7 +99,8 @@ }; private class update extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(musicAlbum.this); + private final ProgressDialog dialog = new ProgressDialog( + musicAlbum.this); // can use UI thread here protected void onPreExecute() { @@ -113,10 +124,36 @@ this.dialog.dismiss(); } - if (albumList.size() == 0) { + if (albumList == null) { Toast.makeText(musicAlbum.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + + if(albumList.size() == 0) + Toast.makeText(musicAlbum.this, "No data received", + Toast.LENGTH_SHORT).show(); + + // build hash map + alphaIndexer = new HashMap<String, Integer>(); + int size = albumList.size(); + + for (int x = 0; x < size; x++) { + DbItems s = albumList.get(x); + String ch = s.Album.substring(0, 1); + ch = ch.toUpperCase(); + if (!alphaIndexer.containsKey(ch)) + alphaIndexer.put(ch, x); + } + Set<String> sectionLetters = alphaIndexer.keySet(); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>( + sectionLetters); + Collections.sort(sectionList); + sections = new String[sectionList.size()]; + sectionList.toArray(sections); + + // update list ListView listview = (ListView) findViewById(R.id.list_album); listview.setAdapter(new EfficientAdapter(musicAlbum.this)); } @@ -129,9 +166,10 @@ vibrate.vibrate(100); } } - - private static class EfficientAdapter extends BaseAdapter { + private static class EfficientAdapter extends BaseAdapter implements + SectionIndexer { + private LayoutInflater mInflater; public EfficientAdapter(Context context) { @@ -184,6 +222,22 @@ TextView text; TextView text2; } + + // + // implement SectionIndexer + // + + public int getPositionForSection(int section) { + return alphaIndexer.get(sections[section]); + } + + public int getSectionForPosition(int position) { + return 1; + } + + public Object[] getSections() { + return sections; + } } } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -58,7 +58,7 @@ private static HashMap<String, Integer> alphaIndexer; private static String[] sections; - + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_artist); @@ -128,6 +128,11 @@ Toast.makeText(musicArtist.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + + if(artistList.size() == 0) + Toast.makeText(musicArtist.this, "No data received", + Toast.LENGTH_SHORT).show(); + // build hash map alphaIndexer = new HashMap<String, Integer>(); int size = artistList.size(); @@ -136,12 +141,14 @@ DbItems s = artistList.get(x); String ch = s.Artist.substring(0, 1); ch = ch.toUpperCase(); - alphaIndexer.put(ch, x); + if (!alphaIndexer.containsKey(ch)) + alphaIndexer.put(ch, x); } Set<String> sectionLetters = alphaIndexer.keySet(); - - // sort results - ArrayList<String> sectionList = new ArrayList<String>(sectionLetters); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>( + sectionLetters); Collections.sort(sectionList); sections = new String[sectionList.size()]; sectionList.toArray(sections); @@ -159,8 +166,9 @@ } } - private static class EfficientAdapter extends BaseAdapter implements SectionIndexer { - + private static class EfficientAdapter extends BaseAdapter implements + SectionIndexer { + private LayoutInflater mInflater; public EfficientAdapter(Context context) { @@ -214,16 +222,18 @@ TextView text2; } - /// - /// implement SectionIndexer - /// - + // + // implement SectionIndexer + // + public int getPositionForSection(int section) { return alphaIndexer.get(sections[section]); } + public int getSectionForPosition(int position) { return 1; } + public Object[] getSections() { return sections; } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -22,6 +22,12 @@ package mediaportal.remote; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; + +import mediaportal.remote.ReceiveDbXmlHandler.DbItems; + import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; @@ -41,6 +47,7 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; +import android.widget.SectionIndexer; import android.widget.TextView; import android.widget.Toast; @@ -57,6 +64,9 @@ private static Vibrator vibrate; private static ArrayList<ReceiveDbXmlHandler.DbItems> itemList; + + private static HashMap<String, Integer> alphaIndexer; + private static String[] sections; public static String Select = ""; public static SelectMode Mode; @@ -191,10 +201,36 @@ this.dialog.dismiss(); } - if (itemList.size() == 0) { + if (itemList == null) { Toast.makeText(musicResults.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + + if(itemList.size() == 0) + Toast.makeText(musicResults.this, "No data received", + Toast.LENGTH_SHORT).show(); + + // build hash map + alphaIndexer = new HashMap<String, Integer>(); + int size = itemList.size(); + + for (int x = 0; x < size; x++) { + DbItems s = itemList.get(x); + String ch = s.Artist.substring(0, 1); + ch = ch.toUpperCase(); + if (!alphaIndexer.containsKey(ch)) + alphaIndexer.put(ch, x); + } + Set<String> sectionLetters = alphaIndexer.keySet(); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>( + sectionLetters); + Collections.sort(sectionList); + sections = new String[sectionList.size()]; + sectionList.toArray(sections); + + // update list ListView listview = (ListView) findViewById(R.id.list_result); listview.setAdapter(new EfficientAdapter(musicResults.this)); } @@ -242,7 +278,8 @@ } } - private static class EfficientAdapter extends BaseAdapter { + private static class EfficientAdapter extends BaseAdapter implements + SectionIndexer { private LayoutInflater mInflater; @@ -296,6 +333,22 @@ TextView text; TextView text2; } + + // + // implement SectionIndexer + // + + public int getPositionForSection(int section) { + return alphaIndexer.get(sections[section]); + } + + public int getSectionForPosition(int position) { + return 1; + } + + public Object[] getSections() { + return sections; + } } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -22,6 +22,12 @@ package mediaportal.remote; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Set; + +import mediaportal.remote.ReceiveDbXmlHandler.DbItems; + import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; @@ -41,6 +47,7 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ListView; +import android.widget.SectionIndexer; import android.widget.TextView; import android.widget.Toast; @@ -51,6 +58,9 @@ private static ArrayList<ReceiveDbXmlHandler.DbItems> songList; + private static HashMap<String, Integer> alphaIndexer; + private static String[] sections; + public static String Select = ""; ReceiveDbXmlHandler.DbItems selectedItem = null; @@ -144,10 +154,36 @@ this.dialog.dismiss(); } - if (songList.size() == 0) { + if (songList == null) { Toast.makeText(musicSong.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); } else { + + if(songList.size() == 0) + Toast.makeText(musicSong.this, "No data received", + Toast.LENGTH_SHORT).show(); + + // build hash map + alphaIndexer = new HashMap<String, Integer>(); + int size = songList.size(); + + for (int x = 0; x < size; x++) { + DbItems s = songList.get(x); + String ch = s.Title.substring(0, 1); + ch = ch.toUpperCase(); + if (!alphaIndexer.containsKey(ch)) + alphaIndexer.put(ch, x); + } + Set<String> sectionLetters = alphaIndexer.keySet(); + + // sort results + ArrayList<String> sectionList = new ArrayList<String>( + sectionLetters); + Collections.sort(sectionList); + sections = new String[sectionList.size()]; + sectionList.toArray(sections); + + // update list ListView listview = (ListView) findViewById(R.id.list_song); listview.setAdapter(new EfficientAdapter(musicSong.this)); } @@ -183,7 +219,7 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; xml += "<command>ADD_MUSIC</command>"; - xml += "<filename>" + Entity.AddEntity(Item.Filename) + "</filename>"; + xml += "<filename>" + Entity.AddEntity(Item.Filename) + "</filename>"; xml += "<artist>" + Entity.AddEntity(Item.Artist) + "</artist>"; xml += "<title>" + Entity.AddEntity(Item.Title) + "</title>"; xml += "<duration>" + Item.Duration + "</duration>"; @@ -201,13 +237,14 @@ h.DownloadFileByID(filename, id); String sd = Environment.getExternalStorageDirectory().toString(); - + @SuppressWarnings("unused") MediaScannerNotifier not = new MediaScannerNotifier(this, sd + "/" + filename, "audio/mpeg"); } - private static class EfficientAdapter extends BaseAdapter { + private static class EfficientAdapter extends BaseAdapter implements + SectionIndexer { private LayoutInflater mInflater; @@ -261,6 +298,18 @@ TextView text; TextView text2; } + + public int getPositionForSection(int section) { + return alphaIndexer.get(sections[section]); + } + + public int getSectionForPosition(int position) { + return 1; + } + + public Object[] getSections() { + return sections; + } } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -75,7 +75,7 @@ //holder.text2.setText(country[position]); convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE - : Color.LTGRAY); + : 0xFFEEEEEE); return convertView; } @@ -174,7 +174,7 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; xml += "<command>DELETE_MUSIC</command>"; - xml += "<filename>" + Filename + "</filename>"; + xml += "<filename>" + Entity.AddEntity(Filename) + "</filename>"; xml += "</message>"; post.Post(xml); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -28,6 +28,7 @@ import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; +import android.graphics.Bitmap; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-22 11:04:02 UTC (rev 4052) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-23 14:49:39 UTC (rev 4053) @@ -31,6 +31,7 @@ import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; +import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; @@ -39,6 +40,7 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; +import android.os.PowerManager; import android.util.Log; import android.view.GestureDetector; import android.view.MotionEvent; @@ -129,6 +131,22 @@ private Runnable mUpdateTimeTask = new Runnable() { public void run() { + /// + /// keep screen on in slideshow + /// + if((slideShow)||(randomShow)) + { + PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE); + PowerManager.WakeLock wl = pm.newWakeLock( + PowerManager.FULL_WAKE_LOCK + | PowerManager.ON_AFTER_RELEASE, + "MediaPortal"); + + wl.acquire(); + wl.release(); + } + + if (slideShow) { int max = pictures.pictureList.size(); @@ -231,16 +249,62 @@ } } + private void SavetoCache() { + try { + DirItems item = pictures.pictureList.get(pictures.selectedPicture); + Bitmap bMap = item.Picture; + File fPath = Environment.getExternalStorageDirectory(); + OutputStream outStream = null; + try { + outStream = new FileOutputStream(fPath + "/" + + item.File.toString()); + + } catch (FileNotFoundException e) { + e.printStackTrace(); + Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + + " |||| " + e.getLocalizedMessage().toString()); + } + bMap.compress(Bitmap.CompressFormat.JPEG, 100, outStream); + try { + outStream.flush(); + } catch (IOException e) { + e.printStackTrace(); + Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + + " |||| " + e.getLocalizedMessage().toString()); + } + try { + outStream.close(); + + Toast.makeText(picturesful... [truncated message content] |
From: <kro...@us...> - 2010-12-23 16:49:57
|
Revision: 4054 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4054&view=rev Author: kroko_koenig Date: 2010-12-23 16:49:51 +0000 (Thu, 23 Dec 2010) Log Message: ----------- small fix Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-23 14:49:39 UTC (rev 4053) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java 2010-12-23 16:49:51 UTC (rev 4054) @@ -151,9 +151,9 @@ xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; xml += "<message>"; xml += "<command>ADD_MUSIC</command>"; - xml += "<filename>" + Item.Filename + "</filename>"; - xml += "<artist>" + Item.Artist + "</artist>"; - xml += "<title>" + Item.Title + "</title>"; + xml += "<filename>" + Entity.AddEntity(Item.Filename) + "</filename>"; + xml += "<artist>" + Entity.AddEntity(Item.Artist) + "</artist>"; + xml += "<title>" + Entity.AddEntity(Item.Title) + "</title>"; xml += "<duration>" + Item.Duration + "</duration>"; xml += "</message>"; Modified: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-08 19:41:31
|
Revision: 4068 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4068&view=rev Author: kroko_koenig Date: 2011-01-08 19:41:22 +0000 (Sat, 08 Jan 2011) Log Message: ----------- more code clean up and stability Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/splash.java trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/player.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03b.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/StreamingMediaPlayer.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/HttpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/PostWebserver.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_02.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_03.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicTab.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/ReceiveDbHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/ReceiveDbXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlaying.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlayingList.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlayingListXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlayingXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/Entity.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/KeyLock.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/MediaScannerNotifier.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/SAX_Parser.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/Vibration.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/Wol.java trunk/plugins/AndroidRemote/Server/AndroidRemote/ExecuteCommand.cs Removed Paths: ------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDbXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDirHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveDirectoryXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/ReceiveHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_02.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Remote_03.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Settings.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/TopExceptionHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Wol.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/httpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicTab.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaying.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayingXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplayinghandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylistXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowplaylisthandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-08 19:41:22 UTC (rev 4068) @@ -3,32 +3,29 @@ package="mediaportal.remote" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar" android:debuggable="true"> - <activity android:name=".splash" android:label="@string/app_name" android:launchMode="singleInstance"> - <intent-filter> + <activity android:label="@string/app_name" + android:launchMode="singleInstance" android:name=".Main"> + <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - <activity android:label="@string/app_name" android:name=".main" android:launchMode="singleInstance"> - <intent-filter> - <action android:name="android.intent.action.DEFAULT" /> - <category android:name="android.intent.category.VIEW" /> </intent-filter> </activity> - <activity android:launchMode="singleInstance" android:name=".Remote_01"></activity> - <activity android:launchMode="singleInstance" android:name=".Remote_02"></activity> - <activity android:launchMode="singleInstance" android:name=".Remote_03"></activity> - <activity android:name=".pictures" android:launchMode="singleInstance"></activity> - <activity android:name=".picturesfullscreen" android:launchMode="singleInstance"></activity> - <activity android:launchMode="singleInstance" android:name=".musicDir"></activity> - <activity android:name=".setup" android:launchMode="singleInstance"></activity> - <activity android:name=".nowplaying" android:launchMode="singleInstance"></activity> - <activity android:name=".nowplaylist" android:launchMode="singleInstance"></activity> - <activity android:name=".musicArtist" android:launchMode="singleInstance"></activity> - <activity android:name=".musicAlbum" android:launchMode="singleInstance"></activity> - <activity android:name=".musicSong" android:launchMode="singleInstance"></activity> - <activity android:name=".musicTab" android:launchMode="singleInstance"></activity> - <activity android:name=".musicResults" android:launchMode="singleInstance"></activity> + <activity android:launchMode="singleInstance" android:name=".Splash"></activity> + <activity android:launchMode="singleInstance" android:name=".control.Remote_01"></activity> + <activity android:launchMode="singleInstance" android:name=".control.Remote_02"></activity> + <activity android:launchMode="singleInstance" android:name=".control.Remote_03"></activity> + <activity android:launchMode="singleInstance" android:name=".pictures.Pictures"></activity> + <activity android:launchMode="singleInstance" android:name=".pictures.Picturesfullscreen"></activity> + <activity android:launchMode="singleInstance" android:name=".music.MusicDir"></activity> + <activity android:launchMode="singleInstance" android:name="Setup"></activity> + <activity android:launchMode="singleInstance" android:name=".nowPlaying.NowPlaying"></activity> + <activity android:launchMode="singleInstance" android:name=".nowPlaying.NowPlayingList"></activity> + <activity android:launchMode="singleInstance" android:name=".music.MusicArtist"></activity> + <activity android:launchMode="singleInstance" android:name=".music.MusicAlbum"></activity> + <activity android:launchMode="singleInstance" android:name=".music.MusicSong"></activity> + <activity android:launchMode="singleInstance" android:name=".music.MusicTab"></activity> + <activity android:launchMode="singleInstance" android:name=".music.MusicResults"></activity> + <activity android:name=".MediaPlayerControl" android:launchMode="singleInstance"></activity> </application> <uses-sdk android:minSdkVersion="3" /> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-08 19:41:22 UTC (rev 4068) @@ -84,45 +84,45 @@ public static final class id { public static final int GridView01=0x7f070017; public static final int ImageView01=0x7f070019; - public static final int LinearLayout00=0x7f07004a; - public static final int LinearLayout01=0x7f07001a; - public static final int LinearLayout02=0x7f070055; - public static final int LinearLayout03=0x7f07005f; - public static final int LinearLayout04=0x7f070069; - public static final int LinearLayout05=0x7f07006f; - public static final int ListView01=0x7f070028; - public static final int Spinner01=0x7f07007d; + public static final int LinearLayout00=0x7f07004e; + public static final int LinearLayout01=0x7f07001e; + public static final int LinearLayout02=0x7f070059; + public static final int LinearLayout03=0x7f070063; + public static final int LinearLayout04=0x7f07006d; + public static final int LinearLayout05=0x7f070073; + public static final int ListView01=0x7f07002c; + public static final int Spinner01=0x7f070081; public static final int TableLayout01=0x7f070005; public static final int TableRow01=0x7f070006; public static final int TextView01=0x7f070003; public static final int TextView02=0x7f070004; - public static final int btnBack=0x7f07003e; - public static final int btnChannelDown=0x7f070043; - public static final int btnChannelUp=0x7f070040; - public static final int btnDown=0x7f07003d; - public static final int btnExit=0x7f070044; - public static final int btnFBack=0x7f07002b; - public static final int btnFForw=0x7f07002d; - public static final int btnHibernate=0x7f070046; - public static final int btnHome=0x7f070034; - public static final int btnInfo=0x7f070036; - public static final int btnLeft=0x7f070038; - public static final int btnMenu=0x7f07003c; - public static final int btnOk=0x7f070039; - public static final int btnPause=0x7f070031; - public static final int btnPlay=0x7f07002c; - public static final int btnRestart=0x7f070047; - public static final int btnRight=0x7f07003a; - public static final int btnShutOff=0x7f070048; - public static final int btnSkipBack=0x7f07002f; - public static final int btnSkipForw=0x7f070032; - public static final int btnStop=0x7f070030; - public static final int btnSuspend=0x7f070045; - public static final int btnUp=0x7f070035; - public static final int btnVolumeDown=0x7f070042; - public static final int btnVolumeMute=0x7f070041; - public static final int btnVolumeUp=0x7f07003f; - public static final int btnWakeOnLan=0x7f070049; + public static final int btnBack=0x7f070042; + public static final int btnChannelDown=0x7f070047; + public static final int btnChannelUp=0x7f070044; + public static final int btnDown=0x7f070041; + public static final int btnExit=0x7f070048; + public static final int btnFBack=0x7f07002f; + public static final int btnFForw=0x7f070031; + public static final int btnHibernate=0x7f07004a; + public static final int btnHome=0x7f070038; + public static final int btnInfo=0x7f07003a; + public static final int btnLeft=0x7f07003c; + public static final int btnMenu=0x7f070040; + public static final int btnOk=0x7f07003d; + public static final int btnPause=0x7f070035; + public static final int btnPlay=0x7f070030; + public static final int btnRestart=0x7f07004b; + public static final int btnRight=0x7f07003e; + public static final int btnShutOff=0x7f07004c; + public static final int btnSkipBack=0x7f070033; + public static final int btnSkipForw=0x7f070036; + public static final int btnStop=0x7f070034; + public static final int btnSuspend=0x7f070049; + public static final int btnUp=0x7f070039; + public static final int btnVolumeDown=0x7f070046; + public static final int btnVolumeMute=0x7f070045; + public static final int btnVolumeUp=0x7f070043; + public static final int btnWakeOnLan=0x7f07004d; public static final int btn_main_music=0x7f070008; public static final int btn_main_now_playing=0x7f07000b; public static final int btn_main_pictures=0x7f070007; @@ -132,50 +132,52 @@ public static final int btn_main_skp_back=0x7f07000e; public static final int btn_main_skp_forw=0x7f070010; public static final int btn_main_video=0x7f070009; - public static final int btnkey01=0x7f07004b; - public static final int btnkey02=0x7f07004c; - public static final int btnkey03=0x7f07004d; - public static final int btnkey04=0x7f07004e; - public static final int btnkey05=0x7f07004f; - public static final int btnkey06=0x7f070050; - public static final int btnkey07=0x7f070051; - public static final int btnkey08=0x7f070052; - public static final int btnkey09=0x7f070053; - public static final int btnkey10=0x7f070054; - public static final int btnkey11=0x7f070056; - public static final int btnkey12=0x7f070057; - public static final int btnkey13=0x7f070058; - public static final int btnkey14=0x7f070059; - public static final int btnkey15=0x7f07005a; - public static final int btnkey16=0x7f07005b; - public static final int btnkey17=0x7f07005c; - public static final int btnkey18=0x7f07005d; - public static final int btnkey19=0x7f07005e; - public static final int btnkey20=0x7f070060; - public static final int btnkey21=0x7f070061; - public static final int btnkey22=0x7f070062; - public static final int btnkey23=0x7f070063; - public static final int btnkey24=0x7f070064; - public static final int btnkey25=0x7f070065; - public static final int btnkey26=0x7f070066; - public static final int btnkey27=0x7f070067; - public static final int btnkey28=0x7f070068; - public static final int btnkey29=0x7f07006a; - public static final int btnkey30=0x7f07006b; - public static final int btnkey31=0x7f07006c; - public static final int btnkey32=0x7f07006d; - public static final int btnkey33=0x7f07006e; - public static final int btnkey41=0x7f070070; - public static final int btnkey42=0x7f070071; - public static final int btnkey43=0x7f070072; - public static final int btnkey44=0x7f070073; - public static final int btnkey45=0x7f070074; - public static final int btnkey46=0x7f070075; - public static final int btnkey47=0x7f070076; - public static final int btnkey48=0x7f070077; - public static final int btnkey49=0x7f070078; - public static final int btnkey50=0x7f070079; - public static final int clearplaylist=0x7f070081; + public static final int btnkey01=0x7f07004f; + public static final int btnkey02=0x7f070050; + public static final int btnkey03=0x7f070051; + public static final int btnkey04=0x7f070052; + public static final int btnkey05=0x7f070053; + public static final int btnkey06=0x7f070054; + public static final int btnkey07=0x7f070055; + public static final int btnkey08=0x7f070056; + public static final int btnkey09=0x7f070057; + public static final int btnkey10=0x7f070058; + public static final int btnkey11=0x7f07005a; + public static final int btnkey12=0x7f07005b; + public static final int btnkey13=0x7f07005c; + public static final int btnkey14=0x7f07005d; + public static final int btnkey15=0x7f07005e; + public static final int btnkey16=0x7f07005f; + public static final int btnkey17=0x7f070060; + public static final int btnkey18=0x7f070061; + public static final int btnkey19=0x7f070062; + public static final int btnkey20=0x7f070064; + public static final int btnkey21=0x7f070065; + public static final int btnkey22=0x7f070066; + public static final int btnkey23=0x7f070067; + public static final int btnkey24=0x7f070068; + public static final int btnkey25=0x7f070069; + public static final int btnkey26=0x7f07006a; + public static final int btnkey27=0x7f07006b; + public static final int btnkey28=0x7f07006c; + public static final int btnkey29=0x7f07006e; + public static final int btnkey30=0x7f07006f; + public static final int btnkey31=0x7f070070; + public static final int btnkey32=0x7f070071; + public static final int btnkey33=0x7f070072; + public static final int btnkey41=0x7f070074; + public static final int btnkey42=0x7f070075; + public static final int btnkey43=0x7f070076; + public static final int btnkey44=0x7f070077; + public static final int btnkey45=0x7f070078; + public static final int btnkey46=0x7f070079; + public static final int btnkey47=0x7f07007a; + public static final int btnkey48=0x7f07007b; + public static final int btnkey49=0x7f07007c; + public static final int btnkey50=0x7f07007d; + public static final int button_play=0x7f07001d; + public static final int button_stream=0x7f07001b; + public static final int clearplaylist=0x7f070085; public static final int full_text=0x7f070018; public static final int icon_image=0x7f070001; public static final int icon_text=0x7f070002; @@ -185,38 +187,40 @@ public static final int list_song=0x7f070016; public static final int main_now_playing=0x7f07000d; public static final int music_grid=0x7f070012; - public static final int naviRemote_text=0x7f070029; - public static final int now_album=0x7f07001c; - public static final int now_artist=0x7f070022; - public static final int now_cd=0x7f07001d; - public static final int now_list=0x7f070027; - public static final int now_next=0x7f070026; - public static final int now_play=0x7f070025; - public static final int now_playing=0x7f07001b; - public static final int now_playing_right=0x7f070020; - public static final int now_playing_t_left=0x7f07001f; - public static final int now_prev=0x7f070023; - public static final int now_progress=0x7f07001e; - public static final int now_stop=0x7f070024; - public static final int now_title=0x7f070021; - public static final int open=0x7f070084; - public static final int playlist=0x7f070080; - public static final int rslide=0x7f070087; - public static final int save=0x7f070083; - public static final int sdcard=0x7f070082; - public static final int send=0x7f070085; - public static final int server_ip=0x7f07007a; - public static final int server_macid=0x7f07007c; - public static final int server_port=0x7f07007b; - public static final int slide=0x7f070086; - public static final int title=0x7f07007f; - public static final int vibration=0x7f07007e; + public static final int naviRemote_text=0x7f07002d; + public static final int now_album=0x7f070020; + public static final int now_artist=0x7f070026; + public static final int now_cd=0x7f070021; + public static final int now_list=0x7f07002b; + public static final int now_next=0x7f07002a; + public static final int now_play=0x7f070029; + public static final int now_playing=0x7f07001f; + public static final int now_playing_right=0x7f070024; + public static final int now_playing_t_left=0x7f070023; + public static final int now_prev=0x7f070027; + public static final int now_progress=0x7f070022; + public static final int now_stop=0x7f070028; + public static final int now_title=0x7f070025; + public static final int open=0x7f070088; + public static final int playlist=0x7f070084; + public static final int progress_bar=0x7f07001c; + public static final int rslide=0x7f07008b; + public static final int save=0x7f070087; + public static final int sdcard=0x7f070086; + public static final int send=0x7f070089; + public static final int server_ip=0x7f07007e; + public static final int server_macid=0x7f070080; + public static final int server_port=0x7f07007f; + public static final int slide=0x7f07008a; + public static final int text_kb_streamed=0x7f07001a; + public static final int title=0x7f070083; + public static final int vibration=0x7f070082; public static final int widget0=0x7f070011; - public static final int widget00=0x7f07002a; - public static final int widget01=0x7f07002e; - public static final int widget02=0x7f070033; - public static final int widget03=0x7f070037; - public static final int widget04=0x7f07003b; + public static final int widget00=0x7f07002e; + public static final int widget01=0x7f070032; + public static final int widget02=0x7f070037; + public static final int widget03=0x7f07003b; + public static final int widget04=0x7f07003f; public static final int widget44=0x7f070000; } public static final class layout { @@ -231,14 +235,16 @@ public static final int musictab=0x7f030008; public static final int pictures=0x7f030009; public static final int picturesfullscreen=0x7f03000a; - public static final int playingnow=0x7f03000b; - public static final int playnowlist=0x7f03000c; - public static final int remote01=0x7f03000d; - public static final int remote02=0x7f03000e; - public static final int remote03=0x7f03000f; - public static final int setup=0x7f030010; - public static final int splash=0x7f030011; - public static final int title=0x7f030012; + public static final int player=0x7f03000b; + public static final int playingnow=0x7f03000c; + public static final int playnowlist=0x7f03000d; + public static final int remote01=0x7f03000e; + public static final int remote02=0x7f03000f; + public static final int remote03=0x7f030010; + public static final int remote03b=0x7f030011; + public static final int setup=0x7f030012; + public static final int splash=0x7f030013; + public static final int title=0x7f030014; } public static final class menu { public static final int music_menu=0x7f060000; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-08 19:41:22 UTC (rev 4068) @@ -16,12 +16,12 @@ browse MP database for artist,albums,songs add title to playlist view playlist -delete item from playlist +remove items from playlist clear playlist -save files from db to phone +save files from MP to phone +fast scroll bars +add whole folder (music dir) to playlist -fast scroll - Video section ------------- nothing yet @@ -45,5 +45,5 @@ save files from Android to MP if the MP has no focus the remote doesnt work (normal) progress task for downloads - - +multiply control of more then one MP +NowPlaying list show actual / count of items on top bar \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/picturesfullscreen.xml 2011-01-08 19:41:22 UTC (rev 4068) @@ -9,5 +9,5 @@ </TextView> <ImageView android:id="@+id/ImageView01" - android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView> + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal"></ImageView> </LinearLayout> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/player.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/player.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/player.xml 2011-01-08 19:41:22 UTC (rev 4068) @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="fill_parent" + android:layout_height="fill_parent" android:padding="10px"> + + <TextView android:id="@+id/text_kb_streamed" + android:layout_width="fill_parent" android:layout_height="wrap_content" + android:textStyle="bold" android:text="Streaming .mp3 Audio Tutorial" /> + + <Button android:id="@+id/button_stream" android:layout_width="wrap_content" + android:layout_height="wrap_content" android:layout_marginTop="10px" + style="?android:attr/buttonStyleSmall" android:text="Start Streaming" /> + + + <ProgressBar android:id="@+id/progress_bar" + android:layout_width="200px" android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + style="?android:attr/progressBarStyleHorizontal" /> + + <ImageButton android:id="@+id/button_play" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="5px" style="?android:attr/buttonStyleSmall" + android:src="@drawable/pause" /> + +</LinearLayout> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03b.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03b.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03b.xml 2011-01-08 19:41:22 UTC (rev 4068) @@ -0,0 +1,182 @@ +<?xml version="1.0" encoding="utf-8"?> + <LinearLayout android:id="@+id/LinearLayout00" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:orientation="vertical" android:layout_height="wrap_content" android:background="@drawable/brush"> + + <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="Remote 03" + android:gravity="center_horizontal" android:background="#FFA9A9A9" + android:textSize="15dip" + android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:padding="5dip"> + </TextView> + + <LinearLayout android:id="@+id/LinearLayout01" + android:layout_height="wrap_content" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:paddingBottom="5dip" android:paddingTop="5dip"> + + <Button android:id="@+id/btnkey01" android:padding="0dip" + android:text="q" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey02" android:padding="0dip" + android:text="w" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey03" android:padding="0dip" + android:text="e" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey04" android:padding="0dip" + android:text="r" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey05" android:padding="0dip" + android:text="t" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey06" android:padding="0dip" + android:text="y" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey07" android:padding="0dip" + android:text="u" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey08" android:padding="0dip" + android:text="i" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey09" android:padding="0dip" + android:text="o" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey10" android:padding="0dip" + android:text="p" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + </LinearLayout> + + <LinearLayout android:id="@+id/LinearLayout02" + android:layout_height="wrap_content" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_gravity="center_horizontal" + android:layout_width="wrap_content" + android:paddingBottom="5dip"> + + <Button android:id="@+id/btnkey11" android:padding="0dip" + android:text="a" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey12" android:padding="0dip" + android:text="s" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey13" android:padding="0dip" + android:text="d" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey14" android:padding="0dip" + android:text="f" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey15" android:padding="0dip" + android:text="g" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey16" android:padding="0dip" + android:text="h" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey17" android:padding="0dip" + android:text="j" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey18" android:padding="0dip" + android:text="k" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey19" android:padding="0dip" + android:text="l" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + </LinearLayout> + + <LinearLayout android:id="@+id/LinearLayout03" + android:layout_height="wrap_content" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_gravity="center_horizontal" + android:layout_width="wrap_content" + android:paddingBottom="5dip"> + + <Button android:id="@+id/btnkey20" android:padding="0dip" + android:text="Shift" android:layout_width="48dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey21" android:padding="0dip" + android:text="z" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey22" android:padding="0dip" + android:text="x" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey23" android:padding="0dip" + android:text="c" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey24" android:padding="0dip" + android:text="v" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey25" android:padding="0dip" + android:text="b" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey26" android:padding="0dip" + android:text="n" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey27" android:padding="0dip" + android:text="m" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey28" android:padding="0dip" + android:text="DEL" android:layout_width="48dip" android:layout_height="48dip"> + </Button> + </LinearLayout> + + <LinearLayout android:layout_height="wrap_content" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_gravity="center_horizontal" + android:layout_width="wrap_content" + android:paddingBottom="5dip" android:id="@+id/LinearLayout04"> + + <Button android:id="@+id/btnkey29" android:padding="0dip" + android:layout_width="64dip" android:layout_height="48dip" android:text="ENTER"> + </Button> + <Button android:id="@+id/btnkey30" android:padding="0dip" + android:layout_height="48dip" android:layout_width="32dip" android:text="/"> + </Button> + <Button android:id="@+id/btnkey31" android:padding="0dip" + android:text="Space" android:layout_height="48dip" android:layout_width="64dip"> + </Button> + <Button android:id="@+id/btnkey32" android:padding="0dip" + android:text="." android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey33" android:padding="0dip" + android:text="www" android:layout_width="64dip" android:layout_height="48dip"> + </Button> + + </LinearLayout> + + <LinearLayout android:layout_height="wrap_content" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:paddingBottom="5dip" android:paddingTop="5dip" android:layout_marginTop="20dip" android:id="@+id/LinearLayout05"> + + <Button android:id="@+id/btnkey41" android:padding="0dip" + android:text="1" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey42" android:padding="0dip" + android:text="2" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey43" android:padding="0dip" + android:text="3" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey44" android:padding="0dip" + android:text="4" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey45" android:padding="0dip" + android:text="5" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey46" android:padding="0dip" + android:text="6" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey47" android:padding="0dip" + android:text="7" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey48" android:padding="0dip" + android:text="8" android:layout_height="48dip" android:layout_width="32dip"> + </Button> + <Button android:id="@+id/btnkey49" android:padding="0dip" + android:text="9" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + <Button android:id="@+id/btnkey50" android:padding="0dip" + android:text="0" android:layout_width="32dip" android:layout_height="48dip"> + </Button> + </LinearLayout> + +</LinearLayout> Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Entity.java 2011-01-08 19:41:22 UTC (rev 4068) @@ -1,32 +0,0 @@ -package mediaportal.remote; - -public class Entity { - - public static String AddEntity(String raw) { - if (raw == null) - return null; - char[] chars = raw.toCharArray(); - StringBuffer encoded = new StringBuffer(); - for (int i = 0; i < chars.length; i++) { - char c = chars[i]; - if (c == '&') - encoded.append("&"); - else if (c == '<') - encoded.append("<"); - else if (c == '>') - encoded.append(">"); - else if (c == '\'') - encoded.append("'"); - else if (c == '"') - encoded.append("""); - else if (c < 128) - encoded.append(c); - else { - encoded.append("&#"); - encoded.append((int) c); - encoded.append(";"); - } - } - return encoded.toString(); - } -} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java 2011-01-08 19:41:22 UTC (rev 4068) @@ -2,34 +2,81 @@ import java.io.IOException; +import mediaportal.remote.utils.AppSettings; +import android.app.Activity; import android.media.MediaPlayer; +import android.os.Bundle; +import android.provider.Contacts.Settings; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.ImageButton; +import android.widget.ProgressBar; +import android.widget.TextView; -public class MediaPlayerControl { +public class MediaPlayerControl extends Activity { - private static MediaPlayerControl instance; - private static MediaPlayer mp; + private Button streamButton; + private ImageButton playButton; + private TextView textStreamed; - public static MediaPlayerControl getinstance() { - if (mp == null) - mp = new MediaPlayer(); - if (instance == null) - instance = new MediaPlayerControl(); - return instance; - } + private MediaPlayer mp; + + private boolean isPlaying; + + private StreamingMediaPlayer audioStreamer; + + @Override + public void onCreate(Bundle icicle) { + + super.onCreate(icicle); - public void Stop() - { - mp.stop(); - } - public void Play(String Path) - { - - try { -// mp.stop(); - - mp.setDataSource(Path); + setContentView(R.layout.player); + initControls(); + + mp = new MediaPlayer(); + } + + private void initControls() { + textStreamed = (TextView) findViewById(R.id.text_kb_streamed); + streamButton = (Button) findViewById(R.id.button_stream); + streamButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + startStreamingAudio(); + }}); + + playButton = (ImageButton) findViewById(R.id.button_play); + playButton.setEnabled(false); + playButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + if (audioStreamer.getMediaPlayer().isPlaying()) { + audioStreamer.getMediaPlayer().pause(); + playButton.setImageResource(R.drawable.play); + } else { + audioStreamer.getMediaPlayer().start(); + audioStreamer.startPlayProgressUpdater(); + playButton.setImageResource(R.drawable.pause); + } + isPlaying = !isPlaying; + }}); + } + + private void startStreamingAudio() { + + try { + mp.setDataSource("rtsp://" + AppSettings.getServer() +"/stream.sdp"); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalStateException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + try { mp.prepare(); - mp.start(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -37,8 +84,7 @@ // TODO Auto-generated catch block e.printStackTrace(); } - - - } - + mp.start(); + + } } Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaScannerNotifier.java 2011-01-08 19:41:22 UTC (rev 4068) @@ -1,52 +0,0 @@ -package mediaportal.remote; - -import android.content.Context; -import android.content.Intent; -import android.media.MediaScannerConnection; -import android.media.MediaScannerConnection.MediaScannerConnectionClient; -import android.net.Uri; -import android.util.Log; - -public class MediaScannerNotifier implements MediaScannerConnectionClient { - private Context mContext; - private MediaScannerConnection mConnection; - private String mPath; - private String mMimeType; - - public MediaScannerNotifier(Context context, String path, String mimeType) { - - Log.d("MediaPortal", "MediaScanner " + path + " | " + mimeType); - - mContext = context; - mPath = path; - mMimeType = mimeType; - mConnection = new MediaScannerConnection(context, this); - mConnection.connect(); - } - - public void onMediaScannerConnected() { - - Log.d("MediaPortal", "MediaScanner connected"); - - mConnection.scanFile(mPath, mMimeType); - Log.d("MediaScanner", "scanner connected"); - } - - public void onScanCompleted(String path, Uri uri) { - - Log.d("MediaPortal", "MediaScanner completed"); - - // OPTIONAL: scan is complete, this will cause the viewer to render it - try { - if (uri != null) { - //Intent intent = new Intent(Intent.ACTION_VIEW); - //intent.setData(uri); - //mContext.startActivity(intent); - } - } finally { - mConnection.disconnect(); - mContext = null; - } - } - -} Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MusicDir.java 2011-01-08 19:41:22 UTC (rev 4068) @@ -1,357 +0,0 @@ -/* - * Copyright (C) 2005-2010 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -package mediaportal.remote; - -import java.util.ArrayList; -import mediaportal.remote.R; -import mediaportal.remote.ReceiveDirectoryXmlHandler.DirItems; -import android.app.Activity; -import android.app.AlertDialog; -import android.app.ProgressDialog; -import android.content.Context; -import android.content.DialogInterface; -import android.os.AsyncTask; -import android.os.Bundle; -import android.os.Environment; -import android.os.Handler; -import android.os.Vibrator; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.AdapterView; -import android.widget.BaseAdapter; -import android.widget.GridView; -import android.widget.ImageView; -import android.widget.TextView; -import android.widget.AdapterView.OnItemClickListener; -import android.widget.Toast; - -public class musicDir extends Activity { - - private Context myParent; - - private Handler mHandler = new Handler(); - private static Vibrator vibrate; - - private String actualDir = ""; - private String downloadFile = ""; - - private static ArrayList<ReceiveDirectoryXmlHandler.DirItems> musicList; - private static ReceiveDirectoryXmlHandler.DirItems selectedItem; - - final CharSequence[] items = { "Add to playlist", "Clear playlist", - "Save to SD card", "Cancel" }; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.music); - - myParent = this.getApplicationContext(); - - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, 100); - - vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); - - GridView gridview = (GridView) findViewById(R.id.music_grid); - - gridview.setOnItemClickListener(new OnItemClickListener() { - public void onItemClick(AdapterView<?> parent, View v, - int position, long id) { - - ImageView iv = (ImageView) v.findViewById(R.id.icon_image); - musicItem music = (musicItem) iv.getTag(); - - DoVibrate(); - - if (music.typ == "item") { - selectedItem = musicList.get(position-1); - - AlertDialog.Builder builder = new AlertDialog.Builder( - parent.getContext()); - - builder.setTitle(selectedItem.File); - builder.setItems(items, - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, - int item) { - switch (item) { - case 0: - PostAddFile(actualDir - + selectedItem.File.replaceAll( - " ", "%20")); - Toast.makeText( - musicDir.this, - selectedItem.File - + " has been added", - Toast.LENGTH_SHORT).show(); - break; - case 1: - PostClear(); - Toast.makeText(musicDir.this, - "Playlist has been cleared", - Toast.LENGTH_SHORT).show(); - break; - case 2: - SavetoSDCard(selectedItem.File); - break; - } - } - }); - AlertDialog alert = builder.create(); - alert.show(); - } - - if (music.typ == "folder") { - actualDir += music.title.replaceAll(" ", "%20") + "/"; - - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, 0); - } - - if (music.typ == "oneup") { - if (actualDir.endsWith("/")) - actualDir = actualDir.substring(0, - actualDir.length() - 1); - - int x = actualDir.lastIndexOf("/"); - if (x >= 0) { - actualDir = actualDir.substring(0, x + 1); - } else - actualDir = ""; - - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, 0); - } - } - }); - } - - public void PostClear() { - - PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); - - String xml = ""; - - xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; - xml += "<message>"; - xml += "<command>CLEAR_PLAYLIST</command>"; - xml += "</message>"; - - post.Post(xml); - } - - public void PostAddFile(String Filename) { - - PostWebserver post = new PostWebserver(Settings.Server, Settings.Port); - - String xml = ""; - - xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; - xml += "<message>"; - xml += "<command>ADD_MUSIC_FILE</command>"; - xml += "<filename>" + Filename + "</filename>"; - xml += "<artist></artist>"; - xml += "<title>" + Filename + "</title>"; - xml += "<duration>0</duration>"; - xml += "</message>"; - - post.Post(xml); - } - - private void SavetoSDCard(String File) { - - downloadFile = File; - new download().execute(); - } - - private Runnable mUpdateTimeTask = new Runnable() { - public void run() { - new update().execute(); - } - }; - - private class update extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(musicDir.this); - - // can use UI thread here - protected void onPreExecute() { - this.dialog.setMessage("Loading..."); - this.dialog.show(); - } - - // automatically done on worker thread (separate from UI thread) - protected Void doInBackground(final String... args) { - Log.d("update music dir", "do update folder : " + actualDir); - - ReceiveDirHandler h = ReceiveDirHandler.getinstance(); - musicList = h.getMusicDir(actualDir); - - return null; - } - - // can use UI thread here - protected void onPostExecute(final Void unused) { - if (this.dialog.isShowing()) { - this.dialog.dismiss(); - } - - if (musicList == null) { - Toast.makeText(musicDir.this, "TIME OUT SERVER", - Toast.LENGTH_SHORT).show(); - } else { - GridView gridview = (GridView) findViewById(R.id.music_grid); - gridview.setAdapter(new ImageAdapter2(musicDir.this)); - } - } - } - private class download extends AsyncTask<String, Void, Void> { - private final ProgressDialog dialog = new ProgressDialog(musicDir.this); - - // can use UI thread here - protected void onPreExecute() { - this.dialog.setMessage("save to sd card..."); - this.dialog.show(); - } - - // automatically done on worker thread (separate from UI thread) - protected Void doInBackground(final String... args) { - Log.d("MediaPortal", "download starts"); - - httpHandler h = new httpHandler(); - h.DownloadFile(downloadFile , actualDir); - - return null; - } - - // can use UI thread here - protected void onPostExecute(final Void unused) { - if (this.dialog.isShowing()) { - this.dialog.dismiss(); - } - - Toast.makeText(musicDir.this, - selectedItem.File + " has been saved.", Toast.LENGTH_SHORT).show(); - - Log.d("MediaPortal", "download ends"); - - String sd = Environment.getExternalStorageDirectory().toString(); - @SuppressWarnings("unused") - MediaScannerNotifier not = new MediaScannerNotifier(myParent, sd + "/" + downloadFile, "audio/mpeg"); - } - } - - private static void DoVibrate() { - if (Settings.Vibrate) { - vibrate.vibrate(100); - } - } - - public class ImageAdapter2 extends BaseAdapter { - private Context mContext; - public static final int ACTIVITY_CREATE = 10; - - public ImageAdapter2(Context c) { - mContext = c; - } - - public int getCount() { - if (musicList != null) - return musicList.size() + 1; - else - return 0; - } - - public Object getItem(int position) { - return null; - } - - public long getItemId(int position) { - return 0; - } - - // @Override - // create a new ImageView for each item referenced by the Adapter - public View getView(int position, View convertView, ViewGroup parent) { - View v; - if (convertView == null) { // if it's not recycled, initialize some - // attributes - - LayoutInflater li = LayoutInflater.from(mContext); - v = li.inflate(R.layout.icon, null); - } else { - v = convertView; - } - - if (position > 0) { - position = position - 1; - - DirItems item1 = musicList.get(position); - - String txtName = item1.File; - Boolean isFolder = item1.isFolder; - - TextView tv = (TextView) v.findViewById(R.id.icon_text); - tv.setText(txtName); - - ImageView iv = (ImageView) v.findViewById(R.id.icon_image); - - if (isFolder) { - iv.setImageResource(R.drawable.folder); - musicItem item = new musicItem(); - item.title = txtName; - item.typ = "folder"; - iv.setTag(item); - } else { - iv.setImageResource(R.drawable.audio); - musicItem item = new musicItem(); - item.title = txtName; - item.typ = "item"; - iv.setTag(item); - } - } else { - LayoutInflater li = LayoutInflater.from(mContext); - v = li.inflate(R.layout.icon, null); - - TextView tv = (TextView) v.findViewById(R.id.icon_text); - tv.setText(".."); - - ImageView iv = (ImageView) v.findViewById(R.id.icon_image); - iv.setImageResource(R.drawable.folderback); - musicItem item = new musicItem(); - item.title = ".."; - item.typ = "oneup"; - iv.setTag(item); - } - - return v; - } - } - - public class musicItem { - public String title; - public String typ; - } - -} Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2011-01-08 19:27:09 UTC (rev 4067) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/PostWebserver.java 2011-01-08 19:41:22 UTC (rev 4068) @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2005-2010 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -package mediaportal.remote; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.net.InetAddress; -import java.net.Socket; - -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.params.BasicHttpParams; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; -import org.apache.http.params.HttpProtocolParams; -import org.apache.http.protocol.HTTP; - -import android.util.Log; - -public class PostWebserver { - - public String httpServer = ""; - public String httpPort = ""; - - public PostWebserver(String Server, String Port) { - httpServer = Server; - httpPort = Port; - } - - public boolean Post(String data) { - - boolean result = false; - - try { - InetAddress addr = InetAddress.getByName(Settings.Server); - Socket socket = new Socket(addr, 8200); - - // Send header String - String path = "/"; - BufferedWriter wr = new BufferedWriter(new OutputStreamWriter( - socket.getOutputStream(), "UTF8")); - wr.write("POST " + path + " HTTP/1.0\r\n"); - wr.write("Content-Length: " + data.length() + "\r\n"); - wr.write("Content-Type: application/xml; charset=utf-8\r\n"); - wr.write("\r\n"); - - // Send data - wr.write(data); - wr.flush(); - - // Get response - BufferedReader rd = new BufferedReader(new InputStreamReader( - socket.getInputStream())); - - String line; - while ((line = rd.readLine()) != null) { - Log.d("MediaPortal", "Response POST : " + line); - // Process line... - } - - wr.close(); - rd.close(); - - result = true; - - } catch (Exception e) { - } - - return result; - - } - - public boolean oldPost(String Dat... [truncated message content] |
From: <kro...@us...> - 2011-01-10 20:33:03
|
Revision: 4069 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4069&view=rev Author: kroko_koenig Date: 2011-01-10 20:32:55 +0000 (Mon, 10 Jan 2011) Log Message: ----------- add wol and powerswitch, remote layout change Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_01.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_03.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Server/AndroidRemote/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_aspectRatio.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_fullscreen.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_showOSD.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_showSubtitle.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_play.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_back.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_forw.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/select2.png Removed Paths: ------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_play.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_skp_back.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_skp_forw.xml Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_aspectRatio.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_aspectRatio.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_aspectRatio.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<message> + <command>ACTION_ASPECT_RATIO</command> +</message> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_fullscreen.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_fullscreen.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_fullscreen.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<message> + <command>ACTION_SHOW_FULLSCREEN</command> +</message> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_showOSD.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_showOSD.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_showOSD.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<message> + <command>ACTION_SHOW_OSD</command> +</message> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_showSubtitle.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_showSubtitle.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/assets/cmd_showSubtitle.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<message> + <command>ACTION_SHOW_SUBTITLES</command> +</message> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-10 20:32:55 UTC (rev 4069) @@ -46,83 +46,71 @@ public static final int main_music=0x7f02001d; public static final int main_now_playing=0x7f02001e; public static final int main_pictures=0x7f02001f; - public static final int main_play=0x7f020020; - public static final int main_remote=0x7f020021; - public static final int main_settings=0x7f020022; - public static final int main_skp_back=0x7f020023; - public static final int main_skp_forw=0x7f020024; - public static final int main_video=0x7f020025; - public static final int menu=0x7f020026; - public static final int music=0x7f020027; - public static final int mute=0x7f020028; - public static final int now_playing=0x7f020029; - public static final int pause=0x7f02002a; - public static final int picture=0x7f02002b; - public static final int pictures=0x7f02002c; - public static final int play=0x7f02002d; - public static final int power_off=0x7f02002e; - public static final int remote=0x7f02002f; - public static final int restart=0x7f020030; - public static final int rewind=0x7f020031; - public static final int right=0x7f020032; + public static final int main_remote=0x7f020020; + public static final int main_settings=0x7f020021; + public static final int main_video=0x7f020022; + public static final int menu=0x7f020023; + public static final int music=0x7f020024; + public static final int mute=0x7f020025; + public static final int now_playing=0x7f020026; + public static final int pause=0x7f020027; + public static final int picture=0x7f020028; + public static final int pictures=0x7f020029; + public static final int play=0x7f02002a; + public static final int power_off=0x7f02002b; + public static final int remote=0x7f02002c; + public static final int restart=0x7f02002d; + public static final int rewind=0x7f02002e; + public static final int right=0x7f02002f; + public static final int sel_play=0x7f020030; + public static final int sel_skp_back=0x7f020031; + public static final int sel_skp_forw=0x7f020032; public static final int select=0x7f020033; - public static final int settings=0x7f020034; - public static final int skip_back=0x7f020035; - public static final int skip_forward=0x7f020036; - public static final int song=0x7f020037; - public static final int song_off=0x7f020038; - public static final int splash=0x7f020039; - public static final int splash02=0x7f02003a; - public static final int stop=0x7f02003b; - public static final int suspend=0x7f02003c; - public static final int up=0x7f02003d; - public static final int video=0x7f02003e; - public static final int volume_m=0x7f02003f; - public static final int volume_p=0x7f020040; - public static final int wake_on_lan=0x7f020041; + public static final int select2=0x7f020034; + public static final int settings=0x7f020035; + public static final int skip_back=0x7f020036; + public static final int skip_forward=0x7f020037; + public static final int song=0x7f020038; + public static final int song_off=0x7f020039; + public static final int splash=0x7f02003a; + public static final int splash02=0x7f02003b; + public static final int stop=0x7f02003c; + public static final int suspend=0x7f02003d; + public static final int up=0x7f02003e; + public static final int video=0x7f02003f; + public static final int volume_m=0x7f020040; + public static final int volume_p=0x7f020041; + public static final int wake_on_lan=0x7f020042; } public static final class id { public static final int GridView01=0x7f070017; public static final int ImageView01=0x7f070019; - public static final int LinearLayout00=0x7f07004e; + public static final int LinearLayout00=0x7f070056; public static final int LinearLayout01=0x7f07001e; - public static final int LinearLayout02=0x7f070059; - public static final int LinearLayout03=0x7f070063; - public static final int LinearLayout04=0x7f07006d; - public static final int LinearLayout05=0x7f070073; + public static final int LinearLayout02=0x7f070061; + public static final int LinearLayout03=0x7f07006b; + public static final int LinearLayout04=0x7f070075; + public static final int LinearLayout05=0x7f07007b; public static final int ListView01=0x7f07002c; - public static final int Spinner01=0x7f070081; + public static final int Spinner01=0x7f070089; public static final int TableLayout01=0x7f070005; + public static final int TableLayout02=0x7f07003b; public static final int TableRow01=0x7f070006; + public static final int TableRow02=0x7f070040; + public static final int TableRow03=0x7f070045; public static final int TextView01=0x7f070003; public static final int TextView02=0x7f070004; - public static final int btnBack=0x7f070042; - public static final int btnChannelDown=0x7f070047; - public static final int btnChannelUp=0x7f070044; - public static final int btnDown=0x7f070041; - public static final int btnExit=0x7f070048; - public static final int btnFBack=0x7f07002f; - public static final int btnFForw=0x7f070031; - public static final int btnHibernate=0x7f07004a; - public static final int btnHome=0x7f070038; - public static final int btnInfo=0x7f07003a; - public static final int btnLeft=0x7f07003c; - public static final int btnMenu=0x7f070040; - public static final int btnOk=0x7f07003d; - public static final int btnPause=0x7f070035; - public static final int btnPlay=0x7f070030; - public static final int btnRestart=0x7f07004b; - public static final int btnRight=0x7f07003e; - public static final int btnShutOff=0x7f07004c; - public static final int btnSkipBack=0x7f070033; - public static final int btnSkipForw=0x7f070036; - public static final int btnStop=0x7f070034; - public static final int btnSuspend=0x7f070049; - public static final int btnUp=0x7f070039; - public static final int btnVolumeDown=0x7f070046; - public static final int btnVolumeMute=0x7f070045; - public static final int btnVolumeUp=0x7f070043; - public static final int btnWakeOnLan=0x7f07004d; + public static final int btnChannelDown=0x7f07004f; + public static final int btnChannelUp=0x7f07004c; + public static final int btnExit=0x7f070050; + public static final int btnHibernate=0x7f070052; + public static final int btnRestart=0x7f070053; + public static final int btnShutOff=0x7f070054; + public static final int btnSuspend=0x7f070051; + public static final int btnVolumeDown=0x7f07004e; + public static final int btnVolumeMute=0x7f07004d; + public static final int btnVolumeUp=0x7f07004b; + public static final int btnWakeOnLan=0x7f070055; public static final int btn_main_music=0x7f070008; public static final int btn_main_now_playing=0x7f07000b; public static final int btn_main_pictures=0x7f070007; @@ -132,52 +120,75 @@ public static final int btn_main_skp_back=0x7f07000e; public static final int btn_main_skp_forw=0x7f070010; public static final int btn_main_video=0x7f070009; - public static final int btnkey01=0x7f07004f; - public static final int btnkey02=0x7f070050; - public static final int btnkey03=0x7f070051; - public static final int btnkey04=0x7f070052; - public static final int btnkey05=0x7f070053; - public static final int btnkey06=0x7f070054; - public static final int btnkey07=0x7f070055; - public static final int btnkey08=0x7f070056; - public static final int btnkey09=0x7f070057; - public static final int btnkey10=0x7f070058; - public static final int btnkey11=0x7f07005a; - public static final int btnkey12=0x7f07005b; - public static final int btnkey13=0x7f07005c; - public static final int btnkey14=0x7f07005d; - public static final int btnkey15=0x7f07005e; - public static final int btnkey16=0x7f07005f; - public static final int btnkey17=0x7f070060; - public static final int btnkey18=0x7f070061; - public static final int btnkey19=0x7f070062; - public static final int btnkey20=0x7f070064; - public static final int btnkey21=0x7f070065; - public static final int btnkey22=0x7f070066; - public static final int btnkey23=0x7f070067; - public static final int btnkey24=0x7f070068; - public static final int btnkey25=0x7f070069; - public static final int btnkey26=0x7f07006a; - public static final int btnkey27=0x7f07006b; - public static final int btnkey28=0x7f07006c; - public static final int btnkey29=0x7f07006e; - public static final int btnkey30=0x7f07006f; - public static final int btnkey31=0x7f070070; - public static final int btnkey32=0x7f070071; - public static final int btnkey33=0x7f070072; - public static final int btnkey41=0x7f070074; - public static final int btnkey42=0x7f070075; - public static final int btnkey43=0x7f070076; - public static final int btnkey44=0x7f070077; - public static final int btnkey45=0x7f070078; - public static final int btnkey46=0x7f070079; - public static final int btnkey47=0x7f07007a; - public static final int btnkey48=0x7f07007b; - public static final int btnkey49=0x7f07007c; - public static final int btnkey50=0x7f07007d; + public static final int btnkey01=0x7f070057; + public static final int btnkey02=0x7f070058; + public static final int btnkey03=0x7f070059; + public static final int btnkey04=0x7f07005a; + public static final int btnkey05=0x7f07005b; + public static final int btnkey06=0x7f07005c; + public static final int btnkey07=0x7f07005d; + public static final int btnkey08=0x7f07005e; + public static final int btnkey09=0x7f07005f; + public static final int btnkey10=0x7f070060; + public static final int btnkey11=0x7f070062; + public static final int btnkey12=0x7f070063; + public static final int btnkey13=0x7f070064; + public static final int btnkey14=0x7f070065; + public static final int btnkey15=0x7f070066; + public static final int btnkey16=0x7f070067; + public static final int btnkey17=0x7f070068; + public static final int btnkey18=0x7f070069; + public static final int btnkey19=0x7f07006a; + public static final int btnkey20=0x7f07006c; + public static final int btnkey21=0x7f07006d; + public static final int btnkey22=0x7f07006e; + public static final int btnkey23=0x7f07006f; + public static final int btnkey24=0x7f070070; + public static final int btnkey25=0x7f070071; + public static final int btnkey26=0x7f070072; + public static final int btnkey27=0x7f070073; + public static final int btnkey28=0x7f070074; + public static final int btnkey29=0x7f070076; + public static final int btnkey30=0x7f070077; + public static final int btnkey31=0x7f070078; + public static final int btnkey32=0x7f070079; + public static final int btnkey33=0x7f07007a; + public static final int btnkey41=0x7f07007c; + public static final int btnkey42=0x7f07007d; + public static final int btnkey43=0x7f07007e; + public static final int btnkey44=0x7f07007f; + public static final int btnkey45=0x7f070080; + public static final int btnkey46=0x7f070081; + public static final int btnkey47=0x7f070082; + public static final int btnkey48=0x7f070083; + public static final int btnkey49=0x7f070084; + public static final int btnkey50=0x7f070085; public static final int button_play=0x7f07001d; public static final int button_stream=0x7f07001b; - public static final int clearplaylist=0x7f070085; + public static final int clearplaylist=0x7f07008d; + public static final int crtl_back=0x7f070038; + public static final int crtl_ch_m=0x7f070044; + public static final int crtl_ch_p=0x7f07003f; + public static final int crtl_down=0x7f070037; + public static final int crtl_full=0x7f070041; + public static final int crtl_info=0x7f070049; + public static final int crtl_left=0x7f070032; + public static final int crtl_menu=0x7f070043; + public static final int crtl_mp=0x7f07002e; + public static final int crtl_osd=0x7f070048; + public static final int crtl_parent=0x7f070036; + public static final int crtl_play=0x7f070042; + public static final int crtl_power=0x7f070030; + public static final int crtl_ratio=0x7f070047; + public static final int crtl_right=0x7f070034; + public static final int crtl_select=0x7f070033; + public static final int crtl_skip_back=0x7f07003c; + public static final int crtl_skip_forw=0x7f07003e; + public static final int crtl_stop=0x7f07003d; + public static final int crtl_sub=0x7f070046; + public static final int crtl_up=0x7f07002f; + public static final int crtl_vol_m=0x7f07003a; + public static final int crtl_vol_p=0x7f070039; public static final int full_text=0x7f070018; public static final int icon_image=0x7f070001; public static final int icon_text=0x7f070002; @@ -187,7 +198,7 @@ public static final int list_song=0x7f070016; public static final int main_now_playing=0x7f07000d; public static final int music_grid=0x7f070012; - public static final int naviRemote_text=0x7f07002d; + public static final int naviRemote_text=0x7f07004a; public static final int now_album=0x7f070020; public static final int now_artist=0x7f070026; public static final int now_cd=0x7f070021; @@ -201,26 +212,24 @@ public static final int now_progress=0x7f070022; public static final int now_stop=0x7f070028; public static final int now_title=0x7f070025; - public static final int open=0x7f070088; - public static final int playlist=0x7f070084; + public static final int open=0x7f070090; + public static final int playlist=0x7f07008c; public static final int progress_bar=0x7f07001c; - public static final int rslide=0x7f07008b; - public static final int save=0x7f070087; - public static final int sdcard=0x7f070086; - public static final int send=0x7f070089; - public static final int server_ip=0x7f07007e; - public static final int server_macid=0x7f070080; - public static final int server_port=0x7f07007f; - public static final int slide=0x7f07008a; + public static final int rslide=0x7f070093; + public static final int save=0x7f07008f; + public static final int sdcard=0x7f07008e; + public static final int send=0x7f070091; + public static final int server_ip=0x7f070086; + public static final int server_macid=0x7f070088; + public static final int server_port=0x7f070087; + public static final int slide=0x7f070092; public static final int text_kb_streamed=0x7f07001a; - public static final int title=0x7f070083; - public static final int vibration=0x7f070082; + public static final int title=0x7f07008b; + public static final int vibration=0x7f07008a; public static final int widget0=0x7f070011; - public static final int widget00=0x7f07002e; - public static final int widget01=0x7f070032; - public static final int widget02=0x7f070037; - public static final int widget03=0x7f07003b; - public static final int widget04=0x7f07003f; + public static final int widget00=0x7f07002d; + public static final int widget01=0x7f070031; + public static final int widget02=0x7f070035; public static final int widget44=0x7f070000; } public static final class layout { Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_play.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_play.xml 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_play.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - <selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_pressed="true" - android:drawable="@drawable/right" /> <!-- pressed --> - <item android:state_focused="true" - android:drawable="@drawable/right" /> <!-- focused --> - <item android:drawable="@drawable/right" /> <!-- default --> - </selector> \ No newline at end of file Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_skp_back.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_skp_back.xml 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_skp_back.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - <selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_pressed="true" - android:drawable="@drawable/skip_back" /> <!-- pressed --> - <item android:state_focused="true" - android:drawable="@drawable/skip_back" /> <!-- focused --> - <item android:drawable="@drawable/skip_back" /> <!-- default --> - </selector> \ No newline at end of file Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_skp_forw.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_skp_forw.xml 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_skp_forw.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - <selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_pressed="true" - android:drawable="@drawable/skip_forward" /> <!-- pressed --> - <item android:state_focused="true" - android:drawable="@drawable/skip_forward" /> <!-- focused --> - <item android:drawable="@drawable/skip_forward" /> <!-- default --> - </selector> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_play.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_play.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_play.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> + <selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" + android:drawable="@drawable/right" /> <!-- pressed --> + <item android:state_focused="true" + android:drawable="@drawable/right" /> <!-- focused --> + <item android:drawable="@drawable/right" /> <!-- default --> + </selector> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_back.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_back.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_back.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> + <selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" + android:drawable="@drawable/skip_back" /> <!-- pressed --> + <item android:state_focused="true" + android:drawable="@drawable/skip_back" /> <!-- focused --> + <item android:drawable="@drawable/skip_back" /> <!-- default --> + </selector> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_forw.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_forw.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_forw.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> + <selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" + android:drawable="@drawable/skip_forward" /> <!-- pressed --> + <item android:state_focused="true" + android:drawable="@drawable/skip_forward" /> <!-- focused --> + <item android:drawable="@drawable/skip_forward" /> <!-- default --> + </selector> \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/select2.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/select2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -63,14 +63,14 @@ android:orientation="horizontal" android:background="#0FF0FFFF" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> - <Button android:background="@drawable/main_skp_back" android:scaleType="fitXY" + <Button android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip"></Button> + android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip" android:background="@drawable/sel_skp_back"></Button> <ImageButton android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_play" android:background="@drawable/main_play" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> + android:id="@+id/btn_main_play" android:padding="2dip" android:layout_marginRight="5dip" android:background="@drawable/sel_play"></ImageButton> <Button android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_skp_forw" android:background="@drawable/main_skp_forw" android:padding="2dip"></Button> + android:id="@+id/btn_main_skp_forw" android:padding="2dip" android:background="@drawable/sel_skp_forw"></Button> </LinearLayout> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -1,136 +1,143 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout - android:id="@+id/widget0" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" - android:background="@drawable/brush" - xmlns:android="http://schemas.android.com/apk/res/android"> - - <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="Remote 01" - android:gravity="center_horizontal" android:background="#FFA9A9A9" - android:textSize="15dip" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:padding="5dip"> - </TextView> - - <LinearLayout - android:id="@+id/widget00" - android:layout_width="fill_parent" - android:layout_height="wrap_content" android:layout_marginTop="5dip"> - - <Button android:id="@+id/btnFBack" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/rewind"> - </Button> - - <Button android:id="@+id/btnPlay" - android:layout_width="160dip" - android:layout_height="60dip" - android:background="@drawable/play"> - </Button> - - <Button android:id="@+id/btnFForw" - android:layout_width="80dip" - android:layout_height="60dip" android:background="@drawable/forward"> - </Button> - - </LinearLayout> - - <LinearLayout - android:id="@+id/widget01" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - > - <Button android:id="@+id/btnSkipBack" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/skip_back"> - </Button> - - <Button android:id="@+id/btnStop" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/stop"> - </Button> - - <Button android:id="@+id/btnPause" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/pause"> - </Button> - - <Button android:id="@+id/btnSkipForw" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/skip_forward"> - </Button> - - </LinearLayout> - - <LinearLayout - android:id="@+id/widget02" - android:layout_width="fill_parent" - android:layout_height="wrap_content" android:paddingTop="20dip"> - - <Button android:id="@+id/btnHome" - android:layout_width="80dip" - android:background="@drawable/home" android:layout_height="60dip"> - </Button> - - <Button android:id="@+id/btnUp" - android:layout_width="160dip" android:background="@drawable/up" android:layout_height="60dip"> - </Button> - - <Button android:id="@+id/btnInfo" - android:layout_width="80dip" - android:background="@drawable/info" android:layout_height="60dip"> - </Button> - - </LinearLayout> +<LinearLayout android:id="@+id/widget0" + android:layout_width="fill_parent" android:layout_height="fill_parent" + android:orientation="vertical" android:background="@drawable/brush" + xmlns:android="http://schemas.android.com/apk/res/android"> - <LinearLayout - android:id="@+id/widget03" - android:layout_width="fill_parent" - android:layout_height="wrap_content"> - - <Button android:id="@+id/btnLeft" - android:layout_width="80dip" - android:layout_height="120dip" android:background="@drawable/left"> - </Button> - - <Button android:id="@+id/btnOk" - android:layout_width="160dip" android:background="@drawable/select" android:layout_height="120dip"> - </Button> - - <Button android:id="@+id/btnRight" - android:layout_width="80dip" - android:layout_height="120dip" android:background="@drawable/right"> - </Button> - </LinearLayout> - - <LinearLayout - android:id="@+id/widget04" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - > - - <Button android:id="@+id/btnMenu" - android:layout_width="80dip" - android:background="@drawable/menu" android:layout_height="60dip"> - </Button> - - <Button android:id="@+id/btnDown" - android:layout_width="160dip" - android:background="@drawable/down" android:layout_height="60dip"> - </Button> - - <Button android:id="@+id/btnBack" - android:layout_width="80dip" - android:background="@drawable/back" android:layout_height="60dip"> - </Button> - - </LinearLayout> - + <LinearLayout android:id="@+id/widget00" + android:layout_height="wrap_content" android:layout_gravity="center_horizontal" + android:layout_width="wrap_content"> + + <ImageButton android:id="@+id/crtl_mp" + android:layout_height="60dip" android:layout_width="100dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_up" + android:layout_width="100dip" android:layout_height="60dip" + android:background="@drawable/up"> + </ImageButton> + <ImageButton android:id="@+id/crtl_power" + android:layout_height="60dip" android:layout_width="100dip" + android:background="@drawable/power_off"> + </ImageButton> + </LinearLayout> + + <LinearLayout android:id="@+id/widget01" + android:layout_height="wrap_content" android:layout_width="wrap_content" + android:layout_gravity="center_horizontal"> + + <ImageButton android:layout_height="60dip" + android:layout_width="100dip" android:background="@drawable/left" + android:id="@+id/crtl_left"> + </ImageButton> + <ImageButton android:layout_width="100dip" + android:layout_height="60dip" android:background="@drawable/select2" + android:id="@+id/crtl_select"> + </ImageButton> + <ImageButton android:layout_width="100dip" + android:layout_height="60dip" android:background="@drawable/right" + android:id="@+id/crtl_right"> + </ImageButton> + </LinearLayout> + + <LinearLayout android:id="@+id/widget02" + android:layout_height="wrap_content" android:layout_width="wrap_content" + android:layout_gravity="center_vertical"> + + <ImageButton android:id="@+id/crtl_parent" + android:layout_height="60dip" android:layout_width="100dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_down" + android:layout_height="60dip" android:layout_width="100dip" + android:background="@drawable/down"> + </ImageButton> + <ImageButton android:id="@+id/crtl_back" + android:layout_height="60dip" android:layout_width="100dip" + android:background="@drawable/back"> + </ImageButton> + </LinearLayout> + + <LinearLayout android:id="@+id/LinearLayout01" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:orientation="horizontal" android:layout_gravity="center_horizontal"> + + <LinearLayout android:id="@+id/LinearLayout01" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:orientation="vertical"> + + <ImageButton android:id="@+id/crtl_vol_p" + android:layout_height="90dip" android:background="@drawable/volume_p" + android:layout_width="60dip"> + </ImageButton> + + <ImageButton android:id="@+id/crtl_vol_m" + android:layout_height="90dip" android:background="@drawable/volume_m" + android:layout_width="60dip"> + </ImageButton> + + </LinearLayout> + + <TableLayout android:id="@+id/TableLayout02" + android:layout_width="wrap_content" android:layout_height="wrap_content"> + + <TableRow android:id="@+id/TableRow01" android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageButton android:id="@+id/crtl_skip_back" + android:layout_height="60dip" android:background="@drawable/skip_back" + android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_stop" + android:layout_height="60dip" android:background="@drawable/stop" + android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_skip_forw" + android:layout_height="60dip" android:background="@drawable/skip_forward" + android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_ch_p" + android:layout_height="60dip" android:background="@drawable/channel_p" + android:layout_width="60dip"> + </ImageButton> + + </TableRow> + <TableRow android:id="@+id/TableRow02" android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageButton android:id="@+id/crtl_full" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_play" + android:layout_height="60dip" android:background="@drawable/right" + android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_menu" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_ch_m" + android:layout_height="60dip" android:background="@drawable/channel_m" + android:layout_width="60dip"> + </ImageButton> + + </TableRow> + <TableRow android:id="@+id/TableRow03" android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageButton android:id="@+id/crtl_sub" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_ratio" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_osd" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_info" + android:layout_height="60dip" android:background="@drawable/info" + android:layout_width="60dip"> + </ImageButton> + + </TableRow> + </TableLayout> + + </LinearLayout> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -63,14 +63,14 @@ android:orientation="horizontal" android:background="#0FF0FFFF" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> - <Button android:background="@drawable/main_skp_back" android:scaleType="fitXY" + <Button android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip"></Button> + android:id="@+id/btn_main_skp_back" android:background="@drawable/sel_skp_back"></Button> <ImageButton android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_play" android:background="@drawable/main_play" android:padding="2dip" android:layout_marginRight="5dip"></ImageButton> + android:id="@+id/btn_main_play" android:background="@drawable/sel_play" android:layout_marginRight="0dip"></ImageButton> <Button android:scaleType="fitXY" android:layout_height="60dip" android:layout_width="60dip" - android:id="@+id/btn_main_skp_forw" android:background="@drawable/main_skp_forw" android:padding="2dip"></Button> + android:id="@+id/btn_main_skp_forw" android:background="@drawable/sel_skp_forw"></Button> </LinearLayout> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2011-01-10 20:32:55 UTC (rev 4069) @@ -1,136 +1,143 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout - android:id="@+id/widget0" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" - android:background="@drawable/brush" - xmlns:android="http://schemas.android.com/apk/res/android"> - - <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="Remote 01" - android:gravity="center_horizontal" android:background="#FFA9A9A9" - android:textSize="15dip" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:padding="5dip"> - </TextView> - - <LinearLayout - android:id="@+id/widget00" - android:layout_width="fill_parent" - android:layout_height="wrap_content" android:layout_marginTop="5dip"> - - <Button android:id="@+id/btnFBack" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/rewind"> - </Button> - - <Button android:id="@+id/btnPlay" - android:layout_width="160dip" - android:layout_height="60dip" - android:background="@drawable/play"> - </Button> - - <Button android:id="@+id/btnFForw" - android:layout_width="80dip" - android:layout_height="60dip" android:background="@drawable/forward"> - </Button> - - </LinearLayout> - - <LinearLayout - android:id="@+id/widget01" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - > - <Button android:id="@+id/btnSkipBack" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/skip_back"> - </Button> - - <Button android:id="@+id/btnStop" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/stop"> - </Button> - - <Button android:id="@+id/btnPause" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/pause"> - </Button> - - <Button android:id="@+id/btnSkipForw" - android:layout_width="80dip" - android:layout_height="60dip" - android:background="@drawable/skip_forward"> - </Button> - - </LinearLayout> - - <LinearLayout - android:id="@+id/widget02" - android:layout_width="fill_parent" - android:layout_height="wrap_content" android:paddingTop="10dip"> - - <Button android:id="@+id/btnHome" - android:layout_width="80dip" - android:background="@drawable/home" android:layout_height="50dip"> - </Button> - - <Button android:id="@+id/btnUp" - android:layout_width="160dip" android:background="@drawable/up" android:layout_height="50dip"> - </Button> - - <Button android:id="@+id/btnInfo" - android:layout_width="80dip" - android:background="@drawable/info" android:layout_height="50dip"> - </Button> - - </LinearLayout> +<LinearLayout android:id="@+id/widget0" + android:layout_width="fill_parent" android:layout_height="fill_parent" + android:orientation="vertical" android:background="@drawable/brush" + xmlns:android="http://schemas.android.com/apk/res/android"> - <LinearLayout - android:id="@+id/widget03" - android:layout_width="fill_parent" - android:layout_height="wrap_content"> - - <Button android:id="@+id/btnLeft" - android:layout_width="80dip" - android:background="@drawable/left" android:layout_height="100dip"> - </Button> - - <Button android:id="@+id/btnOk" - android:layout_width="160dip" android:background="@drawable/select" android:layout_height="100dip"> - </Button> - - <Button android:id="@+id/btnRight" - android:layout_width="80dip" - android:background="@drawable/right" android:layout_height="100dip"> - </Button> - </LinearLayout> - - <LinearLayout - android:id="@+id/widget04" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - > - - <Button android:id="@+id/btnMenu" - android:layout_width="80dip" - android:background="@drawable/menu" android:layout_height="50dip"> - </Button> - - <Button android:id="@+id/btnDown" - android:layout_width="160dip" - android:background="@drawable/down" android:layout_height="50dip"> - </Button> - - <Button android:id="@+id/btnBack" - android:layout_width="80dip" - android:background="@drawable/back" android:layout_height="50dip"> - </Button> - - </LinearLayout> - + <LinearLayout android:id="@+id/widget00" + android:layout_height="wrap_content" android:layout_gravity="center_horizontal" + android:layout_width="wrap_content"> + + <ImageButton android:id="@+id/crtl_mp" + android:layout_height="60dip" android:layout_width="100dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_up" + android:layout_width="100dip" android:layout_height="60dip" + android:background="@drawable/up"> + </ImageButton> + <ImageButton android:id="@+id/crtl_power" + android:layout_height="60dip" android:layout_width="100dip" + android:background="@drawable/power_off"> + </ImageButton> + </LinearLayout> + + <LinearLayout android:id="@+id/widget01" + android:layout_height="wrap_content" android:layout_width="wrap_content" + android:layout_gravity="center_horizontal"> + + <ImageButton android:layout_height="60dip" + android:layout_width="100dip" android:background="@drawable/left" + android:id="@+id/crtl_left"> + </ImageButton> + <ImageButton android:layout_width="100dip" + android:layout_height="60dip" android:background="@drawable/select2" + android:id="@+id/crtl_select"> + </ImageButton> + <ImageButton android:layout_width="100dip" + android:layout_height="60dip" android:background="@drawable/right" + android:id="@+id/crtl_right"> + </ImageButton> + </LinearLayout> + + <LinearLayout android:id="@+id/widget02" + android:layout_height="wrap_content" android:layout_width="wrap_content" + android:layout_gravity="center_vertical"> + + <ImageButton android:id="@+id/crtl_parent" + android:layout_height="60dip" android:layout_width="100dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_down" + android:layout_height="60dip" android:layout_width="100dip" + android:background="@drawable/down"> + </ImageButton> + <ImageButton android:id="@+id/crtl_back" + android:layout_height="60dip" android:layout_width="100dip" + android:background="@drawable/back"> + </ImageButton> + </LinearLayout> + + <LinearLayout android:id="@+id/LinearLayout01" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:orientation="horizontal" android:layout_gravity="center_horizontal"> + + <LinearLayout android:id="@+id/LinearLayout01" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:orientation="vertical"> + + <ImageButton android:id="@+id/crtl_vol_p" + android:layout_height="90dip" android:background="@drawable/volume_p" + android:layout_width="60dip"> + </ImageButton> + + <ImageButton android:id="@+id/crtl_vol_m" + android:layout_height="90dip" android:background="@drawable/volume_m" + android:layout_width="60dip"> + </ImageButton> + + </LinearLayout> + + <TableLayout android:id="@+id/TableLayout02" + android:layout_width="wrap_content" android:layout_height="wrap_content"> + + <TableRow android:id="@+id/TableRow01" android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageButton android:id="@+id/crtl_skip_back" + android:layout_height="60dip" android:background="@drawable/skip_back" + android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_stop" + android:layout_height="60dip" android:background="@drawable/stop" + android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_skip_forw" + android:layout_height="60dip" android:background="@drawable/skip_forward" + android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_ch_p" + android:layout_height="60dip" android:background="@drawable/channel_p" + android:layout_width="60dip"> + </ImageButton> + + </TableRow> + <TableRow android:id="@+id/TableRow02" android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageButton android:id="@+id/crtl_full" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_play" + android:layout_height="60dip" android:background="@drawable/right" + android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_menu" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_ch_m" + android:layout_height="60dip" android:background="@drawable/channel_m" + android:layout_width="60dip"> + </ImageButton> + + </TableRow> + <TableRow android:id="@+id/TableRow03" android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageButton android:id="@+id/crtl_sub" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_ratio" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_osd" + android:layout_height="60dip" android:layout_width="60dip"> + </ImageButton> + <ImageButton android:id="@+id/crtl_info" + android:layout_height="60dip" android:background="@drawable/info" + android:layout_width="60dip"> + </ImageButton> + + </TableRow> + </TableLayout> + + </LinearLayout> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_01.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_01.java 2011-01-08 19:41:22 UTC (rev 4068) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_01.java 2011-01-10 20:32:55 UTC (rev 4069) @@ -23,25 +23,25 @@ import mediaportal.remote.R; import mediaportal.remote.communication.SendCommand; +import mediaportal.remote.utils.AppSettings; +import mediaportal.remote.utils.KeyLock; +import mediaportal.remote.utils.Wol; import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; import android.content.Intent; +import android.content.res.Resources; import android.os.Bundle; import android.util.Log; -import android.view.GestureDetector; import android.view.KeyEvent; -import android.view.MotionEvent; import android.view.View; -import android.view.GestureDetector.OnGestureListener; -import android.widget.Button; +import android.widget.ImageButton; import android.widget.Toast; -public class Remote_01 extends Activity implements OnGestureListener { +public class Remote_01 extends Activity { - private GestureDetector gestureScanner; - private static final int SWIPE_MIN_DISTANCE = 120; - private static final int SWIPE_MAX_OFF_PATH = 250; - private static final int SWIPE_THRESHOLD_VELOCITY = 200; - + private static String action; + /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { @@ -49,137 +49,256 @@ setContentView(R.layout.remote01); Log.d("MediaPortal", "start remote 1"); - - gestureScanner = new GestureDetector(this); // buttons - Button can = (Button) findViewById(R.id.btnBack); - can.setOnClickListener(new View.OnClickListener() { + // first row + + ImageButton up = (ImageButton) findViewById(R.id.crtl_up); + up.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("previousMenu"); + SendCommand.PostCommandButton("moveUp"); } }); - - Button menu = (Button) findViewById(R.id.btnMenu); - menu.setOnClickListener(new View.OnClickListener() { + + ImageButton power = (ImageButton) findViewById(R.id.crtl_power); + + power.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("contextMenu"); + + Wol w = new Wol(); + w.sendMagicPacket(AppSettings.getMacId(), 9); + + Toast.makeText(Remote_01.this, "power on", Toast.LENGTH_SHORT).show(); } }); + power.setOnLongClickListener(new View.OnLongClickListener() { + public boolean onLongClick(View view) { + + int x = AppSettings.getPowerMode(); + + Resources res = getResources(); + String[] actions = res.getStringArray(R.array.shutdown); + + action = actions[x]; + + AlertDialog.Builder builder = new AlertDialog.Builder(Remote_01.this); + builder.setMessage("Do you really want to " + action + " ?") + .setTitle("Please confirm") + .setPositiveButton("Yes", + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int item) { + + switch (AppSettings.getPowerMode()) + { + case 0: + // Exit + SendCommand.PostCommandButton("exit"); + break; + case 1: + // Suspend + SendCommand.PostCommandButton("suspend"); + break; + case 2: + // Hibernate + SendCommand.PostCommandButton("hibernate"); + break; + case 3: + // Restart + SendCommand.PostCommandButton("restart"); + break; + case 4: + // Shut Off + SendCommand.PostCommandButton("shutoff"); + break; + } + + Toast.makeText(Remote_01.this, "Please wait , " + action, Toast.LENGTH_SHORT).show(); + + } + }) + .setNegativeButton("No", + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int item) { + // nothing + } + }).show(); - Button home = (Button) findViewById(R.id.btnHome); - home.setOnClickListener(new View.OnClickListener() { - public void onClick(View view) { - SendCommand.PostCommandButton("parentDir"); + return true; } }); - - Button info = (Button) findViewById(R.id.btnInfo); - info.setOnClickListener(new View.OnClickListener() { + + + // second row + + ImageButton left = (ImageButton) findViewById(R.id.crtl_left); + left.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("showInfo"); + SendCommand.PostCommandButton("moveLeft"); } }); - - Button left = (Button) findViewById(R.id.btnLeft); - left.setOnClickListener(new View.OnClickListener() { + + ImageButton ok = (ImageButton) findViewById(R.id.crtl_select); + ok.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("moveLeft"); + SendCommand.PostCommandButton("selectItem"); } }); - Button right = (Button) findViewById(R.id.btnRight); + ImageButton right = (ImageButton) findViewById(R.id.crtl_right); right.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { SendCommand.PostCommandButton("moveRight"); } }); - - Button up = (Button) findViewById(R.id.btnUp); - up.setOnClickListener(new View.OnClickListener() { + + // third row + + ImageButton home = (ImageButton) findViewById(R.id.crtl_parent); + home.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("moveUp"); + SendCommand.PostCommandButton("parentDir"); } }); - - Button down = (Button) findViewById(R.id.btnDown); + + ImageButton down = (ImageButton) findViewById(R.id.crtl_down); down.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { SendCommand.PostCommandButton("moveDown"); } }); - Button ok = (Button) findViewById(R.id.btnOk); - ok.setOnClickListener(new View.OnClickListener() { + ImageButton can = (ImageButton) findViewById(R.id.crtl_back); + can.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("selectItem"); + SendCommand.PostCommandButton("previousMenu"); } }); - Button play = (Button) findViewById(R.id.btnPlay); - play.setOnClickListener(new View.OnClickListener() { + + // volume + + ImageButton btnVolumeUp = (ImageButton) findViewById(R.id.crtl_vol_p); + btnVolumeUp.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("play"); + SendCommand.PostCommandButton("volumeUp"); } }); - - Button pause = (Button) findViewById(R.id.btnPause); - pause.setOnClickListener(new View.OnClickListener() { + ImageButton btnVolumeDown = (ImageButton) findViewById(R.id.crtl_vol_m); + btnVolumeDown.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("pause"); + SendCommand.PostCommandButton("volumeDown"); } }); - - Button stop = (Button) findViewById(R.id.btnStop); + + // fourth row + + ImageButton skipBack = (ImageButton) findViewById(R.id.crtl_skip_back); + skipBack.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + SendCommand.PostCommandButton("prevItem"); + } + }); + + ImageButton stop = (ImageButton) findViewById(R.id.crtl_stop); stop.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { SendCommand.PostCommandButton("stop"); } }); - - Button skipForw = (Button) findViewById(R.id.btnSkipForw); + + ImageButton skipForw = (ImageButton) findViewById(R.id.crtl_skip_forw); skipForw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { SendCommand.PostCommandButton("nextItem"); } }); - Button skipBack = (Button) findViewById(R.id.btnSkipBack); - skipBack.setOnClickListener(new View.OnClickListener() { + ImageButton btnChannelUp = (ImageButton) findViewById(R.id.crtl_ch_p); + btnChannelUp.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - SendCommand.PostCommandButton("prevItem"); + SendCommand.PostCommandButton("nextChannel"); } }); + + // fifth row + + ImageButton full = (ImageButton) findViewById(R.id.crtl_full); + full.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + SendCommand.PostCommandButton("fullscreen"); + } + }); + + ImageButton play = (ImageButton) findViewById(R.id.crtl_play); + play.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + SendCommand.PostCommandButton("play"); + } + }); + + ImageButton menu = (ImageButton) findViewById(R.id.crtl_menu); + menu.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + SendCommand.PostCommandButton("contextMenu"); + } + }); - Button fForw = (Button) findViewById(R.id.btnFForw); - fForw.setOnClickListener(new View.OnClickListener() { + ImageButton btnChannelDown = (ImageButton) findViewById(R.id.crtl_ch_m); + btnChannelDown.setOnClickListener(new View.OnClic... [truncated message content] |
From: <kro...@us...> - 2011-01-13 21:02:17
|
Revision: 4070 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4070&view=rev Author: kroko_koenig Date: 2011-01-13 21:02:08 +0000 (Thu, 13 Jan 2011) Log Message: ----------- split the code into diff sections, add vlc interop Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/player.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/webradio.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/AudioPlayer.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/Webradio.java trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/NowPlayingHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/PictureHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/SomeUtils.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs Removed Paths: ------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/StreamingMediaPlayer.java trunk/plugins/AndroidRemote/Server/AndroidRemote/ExecuteCommand.cs Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-13 21:02:08 UTC (rev 4070) @@ -2,7 +2,11 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mediaportal.remote" android:versionCode="1" android:versionName="1.0"> - <application android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar" android:debuggable="true"> + <application android:icon="@drawable/icon" + + android:theme="@android:style/Theme.NoTitleBar" + android:debuggable="true" + android:label="MediaPortal Remote"> <activity android:label="@string/app_name" android:launchMode="singleInstance" android:name=".Main"> <intent-filter> @@ -25,6 +29,7 @@ <activity android:launchMode="singleInstance" android:name=".music.MusicSong"></activity> <activity android:launchMode="singleInstance" android:name=".music.MusicTab"></activity> <activity android:launchMode="singleInstance" android:name=".music.MusicResults"></activity> + <activity android:launchMode="singleInstance" android:name=".multimedia.Webradio"></activity> <activity android:name=".MediaPlayerControl" android:launchMode="singleInstance"></activity> </application> <uses-sdk android:minSdkVersion="3" /> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -85,32 +85,33 @@ public static final class id { public static final int GridView01=0x7f070017; public static final int ImageView01=0x7f070019; - public static final int LinearLayout00=0x7f070056; - public static final int LinearLayout01=0x7f07001e; - public static final int LinearLayout02=0x7f070061; - public static final int LinearLayout03=0x7f07006b; - public static final int LinearLayout04=0x7f070075; - public static final int LinearLayout05=0x7f07007b; - public static final int ListView01=0x7f07002c; - public static final int Spinner01=0x7f070089; + public static final int LinearLayout00=0x7f070058; + public static final int LinearLayout01=0x7f070020; + public static final int LinearLayout02=0x7f070063; + public static final int LinearLayout03=0x7f07006d; + public static final int LinearLayout04=0x7f070077; + public static final int LinearLayout05=0x7f07007d; + public static final int ListView01=0x7f07002e; + public static final int Spinner01=0x7f07008b; + public static final int SurfaceView01=0x7f07001f; public static final int TableLayout01=0x7f070005; - public static final int TableLayout02=0x7f07003b; + public static final int TableLayout02=0x7f07003d; public static final int TableRow01=0x7f070006; - public static final int TableRow02=0x7f070040; - public static final int TableRow03=0x7f070045; + public static final int TableRow02=0x7f070042; + public static final int TableRow03=0x7f070047; public static final int TextView01=0x7f070003; public static final int TextView02=0x7f070004; - public static final int btnChannelDown=0x7f07004f; - public static final int btnChannelUp=0x7f07004c; - public static final int btnExit=0x7f070050; - public static final int btnHibernate=0x7f070052; - public static final int btnRestart=0x7f070053; - public static final int btnShutOff=0x7f070054; - public static final int btnSuspend=0x7f070051; - public static final int btnVolumeDown=0x7f07004e; - public static final int btnVolumeMute=0x7f07004d; - public static final int btnVolumeUp=0x7f07004b; - public static final int btnWakeOnLan=0x7f070055; + public static final int btnChannelDown=0x7f070051; + public static final int btnChannelUp=0x7f07004e; + public static final int btnExit=0x7f070052; + public static final int btnHibernate=0x7f070054; + public static final int btnRestart=0x7f070055; + public static final int btnShutOff=0x7f070056; + public static final int btnSuspend=0x7f070053; + public static final int btnVolumeDown=0x7f070050; + public static final int btnVolumeMute=0x7f07004f; + public static final int btnVolumeUp=0x7f07004d; + public static final int btnWakeOnLan=0x7f070057; public static final int btn_main_music=0x7f070008; public static final int btn_main_now_playing=0x7f07000b; public static final int btn_main_pictures=0x7f070007; @@ -120,75 +121,76 @@ public static final int btn_main_skp_back=0x7f07000e; public static final int btn_main_skp_forw=0x7f070010; public static final int btn_main_video=0x7f070009; - public static final int btnkey01=0x7f070057; - public static final int btnkey02=0x7f070058; - public static final int btnkey03=0x7f070059; - public static final int btnkey04=0x7f07005a; - public static final int btnkey05=0x7f07005b; - public static final int btnkey06=0x7f07005c; - public static final int btnkey07=0x7f07005d; - public static final int btnkey08=0x7f07005e; - public static final int btnkey09=0x7f07005f; - public static final int btnkey10=0x7f070060; - public static final int btnkey11=0x7f070062; - public static final int btnkey12=0x7f070063; - public static final int btnkey13=0x7f070064; - public static final int btnkey14=0x7f070065; - public static final int btnkey15=0x7f070066; - public static final int btnkey16=0x7f070067; - public static final int btnkey17=0x7f070068; - public static final int btnkey18=0x7f070069; - public static final int btnkey19=0x7f07006a; - public static final int btnkey20=0x7f07006c; - public static final int btnkey21=0x7f07006d; - public static final int btnkey22=0x7f07006e; - public static final int btnkey23=0x7f07006f; - public static final int btnkey24=0x7f070070; - public static final int btnkey25=0x7f070071; - public static final int btnkey26=0x7f070072; - public static final int btnkey27=0x7f070073; - public static final int btnkey28=0x7f070074; - public static final int btnkey29=0x7f070076; - public static final int btnkey30=0x7f070077; - public static final int btnkey31=0x7f070078; - public static final int btnkey32=0x7f070079; - public static final int btnkey33=0x7f07007a; - public static final int btnkey41=0x7f07007c; - public static final int btnkey42=0x7f07007d; - public static final int btnkey43=0x7f07007e; - public static final int btnkey44=0x7f07007f; - public static final int btnkey45=0x7f070080; - public static final int btnkey46=0x7f070081; - public static final int btnkey47=0x7f070082; - public static final int btnkey48=0x7f070083; - public static final int btnkey49=0x7f070084; - public static final int btnkey50=0x7f070085; - public static final int button_play=0x7f07001d; - public static final int button_stream=0x7f07001b; - public static final int clearplaylist=0x7f07008d; - public static final int crtl_back=0x7f070038; - public static final int crtl_ch_m=0x7f070044; - public static final int crtl_ch_p=0x7f07003f; - public static final int crtl_down=0x7f070037; - public static final int crtl_full=0x7f070041; - public static final int crtl_info=0x7f070049; - public static final int crtl_left=0x7f070032; - public static final int crtl_menu=0x7f070043; - public static final int crtl_mp=0x7f07002e; - public static final int crtl_osd=0x7f070048; - public static final int crtl_parent=0x7f070036; - public static final int crtl_play=0x7f070042; - public static final int crtl_power=0x7f070030; - public static final int crtl_ratio=0x7f070047; - public static final int crtl_right=0x7f070034; - public static final int crtl_select=0x7f070033; - public static final int crtl_skip_back=0x7f07003c; - public static final int crtl_skip_forw=0x7f07003e; - public static final int crtl_stop=0x7f07003d; - public static final int crtl_sub=0x7f070046; - public static final int crtl_up=0x7f07002f; - public static final int crtl_vol_m=0x7f07003a; - public static final int crtl_vol_p=0x7f070039; + public static final int btnkey01=0x7f070059; + public static final int btnkey02=0x7f07005a; + public static final int btnkey03=0x7f07005b; + public static final int btnkey04=0x7f07005c; + public static final int btnkey05=0x7f07005d; + public static final int btnkey06=0x7f07005e; + public static final int btnkey07=0x7f07005f; + public static final int btnkey08=0x7f070060; + public static final int btnkey09=0x7f070061; + public static final int btnkey10=0x7f070062; + public static final int btnkey11=0x7f070064; + public static final int btnkey12=0x7f070065; + public static final int btnkey13=0x7f070066; + public static final int btnkey14=0x7f070067; + public static final int btnkey15=0x7f070068; + public static final int btnkey16=0x7f070069; + public static final int btnkey17=0x7f07006a; + public static final int btnkey18=0x7f07006b; + public static final int btnkey19=0x7f07006c; + public static final int btnkey20=0x7f07006e; + public static final int btnkey21=0x7f07006f; + public static final int btnkey22=0x7f070070; + public static final int btnkey23=0x7f070071; + public static final int btnkey24=0x7f070072; + public static final int btnkey25=0x7f070073; + public static final int btnkey26=0x7f070074; + public static final int btnkey27=0x7f070075; + public static final int btnkey28=0x7f070076; + public static final int btnkey29=0x7f070078; + public static final int btnkey30=0x7f070079; + public static final int btnkey31=0x7f07007a; + public static final int btnkey32=0x7f07007b; + public static final int btnkey33=0x7f07007c; + public static final int btnkey41=0x7f07007e; + public static final int btnkey42=0x7f07007f; + public static final int btnkey43=0x7f070080; + public static final int btnkey44=0x7f070081; + public static final int btnkey45=0x7f070082; + public static final int btnkey46=0x7f070083; + public static final int btnkey47=0x7f070084; + public static final int btnkey48=0x7f070085; + public static final int btnkey49=0x7f070086; + public static final int btnkey50=0x7f070087; + public static final int button_open=0x7f07001c; + public static final int button_stream=0x7f07001d; + public static final int button_stream_stop=0x7f07001e; + public static final int clearplaylist=0x7f070094; + public static final int crtl_back=0x7f07003a; + public static final int crtl_ch_m=0x7f070046; + public static final int crtl_ch_p=0x7f070041; + public static final int crtl_down=0x7f070039; + public static final int crtl_full=0x7f070043; + public static final int crtl_info=0x7f07004b; + public static final int crtl_left=0x7f070034; + public static final int crtl_menu=0x7f070045; + public static final int crtl_mp=0x7f070030; + public static final int crtl_osd=0x7f07004a; + public static final int crtl_parent=0x7f070038; + public static final int crtl_play=0x7f070044; + public static final int crtl_power=0x7f070032; + public static final int crtl_ratio=0x7f070049; + public static final int crtl_right=0x7f070036; + public static final int crtl_select=0x7f070035; + public static final int crtl_skip_back=0x7f07003e; + public static final int crtl_skip_forw=0x7f070040; + public static final int crtl_stop=0x7f07003f; + public static final int crtl_sub=0x7f070048; + public static final int crtl_up=0x7f070031; + public static final int crtl_vol_m=0x7f07003c; + public static final int crtl_vol_p=0x7f07003b; public static final int full_text=0x7f070018; public static final int icon_image=0x7f070001; public static final int icon_text=0x7f070002; @@ -198,38 +200,43 @@ public static final int list_song=0x7f070016; public static final int main_now_playing=0x7f07000d; public static final int music_grid=0x7f070012; - public static final int naviRemote_text=0x7f07004a; - public static final int now_album=0x7f070020; - public static final int now_artist=0x7f070026; - public static final int now_cd=0x7f070021; - public static final int now_list=0x7f07002b; - public static final int now_next=0x7f07002a; - public static final int now_play=0x7f070029; - public static final int now_playing=0x7f07001f; - public static final int now_playing_right=0x7f070024; - public static final int now_playing_t_left=0x7f070023; - public static final int now_prev=0x7f070027; - public static final int now_progress=0x7f070022; - public static final int now_stop=0x7f070028; - public static final int now_title=0x7f070025; - public static final int open=0x7f070090; - public static final int playlist=0x7f07008c; - public static final int progress_bar=0x7f07001c; - public static final int rslide=0x7f070093; - public static final int save=0x7f07008f; - public static final int sdcard=0x7f07008e; - public static final int send=0x7f070091; - public static final int server_ip=0x7f070086; - public static final int server_macid=0x7f070088; - public static final int server_port=0x7f070087; - public static final int slide=0x7f070092; + public static final int naviRemote_text=0x7f07004c; + public static final int now_album=0x7f070022; + public static final int now_artist=0x7f070028; + public static final int now_cd=0x7f070023; + public static final int now_list=0x7f07002d; + public static final int now_next=0x7f07002c; + public static final int now_play=0x7f07002b; + public static final int now_playing=0x7f070021; + public static final int now_playing_right=0x7f070026; + public static final int now_playing_t_left=0x7f070025; + public static final int now_prev=0x7f070029; + public static final int now_progress=0x7f070024; + public static final int now_stop=0x7f07002a; + public static final int now_title=0x7f070027; + public static final int open=0x7f070097; + public static final int playlist=0x7f070093; + public static final int radio01=0x7f07008e; + public static final int radio02=0x7f07008f; + public static final int radio03=0x7f070090; + public static final int radio04=0x7f070091; + public static final int radioStop=0x7f070092; + public static final int rslide=0x7f07009a; + public static final int save=0x7f070096; + public static final int sdcard=0x7f070095; + public static final int send=0x7f070098; + public static final int server_ip=0x7f070088; + public static final int server_macid=0x7f07008a; + public static final int server_port=0x7f070089; + public static final int slide=0x7f070099; public static final int text_kb_streamed=0x7f07001a; - public static final int title=0x7f07008b; - public static final int vibration=0x7f07008a; + public static final int title=0x7f07008d; + public static final int txtFile=0x7f07001b; + public static final int vibration=0x7f07008c; public static final int widget0=0x7f070011; - public static final int widget00=0x7f07002d; - public static final int widget01=0x7f070031; - public static final int widget02=0x7f070035; + public static final int widget00=0x7f07002f; + public static final int widget01=0x7f070033; + public static final int widget02=0x7f070037; public static final int widget44=0x7f070000; } public static final class layout { @@ -254,6 +261,7 @@ public static final int setup=0x7f030012; public static final int splash=0x7f030013; public static final int title=0x7f030014; + public static final int webradio=0x7f030015; } public static final class menu { public static final int music_menu=0x7f060000; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-13 21:02:08 UTC (rev 4070) @@ -24,7 +24,8 @@ Video section ------------- -nothing yet +play an initial file on startup +experimental stream / open file with preview NowPlaying ---------- Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/player.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/player.xml 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/player.xml 2011-01-13 21:02:08 UTC (rev 4070) @@ -5,21 +5,25 @@ <TextView android:id="@+id/text_kb_streamed" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:textStyle="bold" android:text="Streaming .mp3 Audio Tutorial" /> + android:textStyle="bold" android:text="Streaming files experimental"/> - <Button android:id="@+id/button_stream" android:layout_width="wrap_content" - android:layout_height="wrap_content" android:layout_marginTop="10px" - style="?android:attr/buttonStyleSmall" android:text="Start Streaming" /> + <EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="@+id/txtFile" android:id="@+id/txtFile" android:inputType="text" android:layout_marginTop="10dip"></EditText> + + <Button android:id="@+id/button_open" android:layout_height="wrap_content" android:layout_marginTop="10px" + style="?android:attr/buttonStyleSmall" android:text="Open stream" android:layout_width="fill_parent"/> + + <Button android:id="@+id/button_stream" android:layout_height="wrap_content" android:layout_marginTop="10px" + style="?android:attr/buttonStyleSmall" android:text="Start streaming" android:layout_width="fill_parent"/> + + <Button android:id="@+id/button_stream_stop" android:layout_height="wrap_content" android:layout_marginTop="10px" + style="?android:attr/buttonStyleSmall" android:text="Stop streaming" android:layout_width="fill_parent"/> - <ProgressBar android:id="@+id/progress_bar" - android:layout_width="200px" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - style="?android:attr/progressBarStyleHorizontal" /> + - <ImageButton android:id="@+id/button_play" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="5px" style="?android:attr/buttonStyleSmall" - android:src="@drawable/pause" /> + +<SurfaceView android:id="@+id/SurfaceView01" android:layout_width="300dip" android:layout_height="200dip" android:layout_marginTop="10dip"></SurfaceView> + + </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-13 21:02:08 UTC (rev 4070) @@ -40,8 +40,7 @@ </LinearLayout> <LinearLayout android:id="@+id/widget02" - android:layout_height="wrap_content" android:layout_width="wrap_content" - android:layout_gravity="center_vertical"> + android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> <ImageButton android:id="@+id/crtl_parent" android:layout_height="60dip" android:layout_width="100dip"> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/webradio.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/webradio.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/webradio.xml 2011-01-13 21:02:08 UTC (rev 4070) @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="fill_parent" + android:layout_height="fill_parent" android:background="@drawable/brush"> + +<Button android:text="Webradio 01" + android:id="@+id/radio01" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> +</Button> +<Button android:text="Webradio 02" + android:id="@+id/radio02" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> +</Button> +<Button android:text="Webradio 03" + android:id="@+id/radio03" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> +</Button> +<Button android:text="Webradio 04" + android:id="@+id/radio04" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> +</Button> + +<Button android:text="Stop Playing" + android:id="@+id/radioStop" + android:layout_width="fill_parent" + android:layout_height="wrap_content" android:layout_marginTop="20dip"> +</Button> + +</LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -2,69 +2,85 @@ import java.io.IOException; +import mediaportal.remote.communication.SendCommand; import mediaportal.remote.utils.AppSettings; import android.app.Activity; import android.media.MediaPlayer; import android.os.Bundle; -import android.provider.Contacts.Settings; -import android.util.Log; +import android.view.SurfaceHolder; +import android.view.SurfaceView; import android.view.View; import android.widget.Button; -import android.widget.ImageButton; -import android.widget.ProgressBar; import android.widget.TextView; -public class MediaPlayerControl extends Activity { +public class MediaPlayerControl extends Activity implements + SurfaceHolder.Callback { + private Button openButton; private Button streamButton; - private ImageButton playButton; - private TextView textStreamed; + private Button streamStopButton; - private MediaPlayer mp; - - private boolean isPlaying; - - private StreamingMediaPlayer audioStreamer; - - @Override + private TextView txtFile; + + private SurfaceView mPreview; + private SurfaceHolder holder; + + private static MediaPlayer mp; + + @Override public void onCreate(Bundle icicle) { - - super.onCreate(icicle); - setContentView(R.layout.player); - initControls(); - - mp = new MediaPlayer(); - } - - private void initControls() { - textStreamed = (TextView) findViewById(R.id.text_kb_streamed); + super.onCreate(icicle); + + setContentView(R.layout.player); + initControls(); + } + + private void initControls() { + + txtFile = (TextView) findViewById(R.id.txtFile); + txtFile.setText(AppSettings.getLastFile()); + + openButton = (Button) findViewById(R.id.button_open); streamButton = (Button) findViewById(R.id.button_stream); + streamStopButton = (Button) findViewById(R.id.button_stream_stop); + + mPreview = (SurfaceView) findViewById(R.id.SurfaceView01); + + // Set a size for the video screen + holder = mPreview.getHolder(); + holder.addCallback(this); + holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); + holder.setFixedSize(300, 200); + + openButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + SendCommand.PostStreamFile(txtFile.getText().toString(),"video"); + } + }); + streamButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - startStreamingAudio(); - }}); + if (mp == null) + mp = new MediaPlayer(); + startStreaming(); + } + }); - playButton = (ImageButton) findViewById(R.id.button_play); - playButton.setEnabled(false); - playButton.setOnClickListener(new View.OnClickListener() { + streamStopButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { - if (audioStreamer.getMediaPlayer().isPlaying()) { - audioStreamer.getMediaPlayer().pause(); - playButton.setImageResource(R.drawable.play); - } else { - audioStreamer.getMediaPlayer().start(); - audioStreamer.startPlayProgressUpdater(); - playButton.setImageResource(R.drawable.pause); - } - isPlaying = !isPlaying; - }}); - } - - private void startStreamingAudio() { - - try { - mp.setDataSource("rtsp://" + AppSettings.getServer() +"/stream.sdp"); + closePlayer(); + } + }); + + } + + private void startStreaming() { + + try { + mp.setDataSource("rtsp://" + AppSettings.getServer() + + ":5554/android.sdp"); + mp.setDisplay(holder); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -75,7 +91,7 @@ // TODO Auto-generated catch block e.printStackTrace(); } - try { + try { mp.prepare(); } catch (IllegalStateException e) { // TODO Auto-generated catch block @@ -84,7 +100,37 @@ // TODO Auto-generated catch block e.printStackTrace(); } - mp.start(); - - } + mp.start(); + mp.setScreenOnWhilePlaying(true); + } + + public void surfaceCreated(SurfaceHolder surfaceholder) { + + } + + public void surfaceChanged(SurfaceHolder surfaceholder, int i, int j, int k) { + + } + + public void surfaceDestroyed(SurfaceHolder surfaceholder) { + + } + + @Override + protected void onPause() { + super.onPause(); + + closePlayer(); + + AppSettings.setLastFile(txtFile.getText().toString()); + } + + private void closePlayer() { + if (mp != null) { + if (mp.isPlaying()) + mp.stop(); + mp = null; + + } + } } Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/StreamingMediaPlayer.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/StreamingMediaPlayer.java 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/StreamingMediaPlayer.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -1,335 +0,0 @@ -package mediaportal.remote; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import android.content.Context; -import android.media.MediaPlayer; -import android.os.Handler; -import android.util.Log; -import android.widget.Button; -import android.widget.ImageButton; -import android.widget.ProgressBar; -import android.widget.TextView; - -/** - * MediaPlayer does not yet support streaming from external URLs so this class provides a pseudo-streaming function - * by downloading the content incrementally & playing as soon as we get enough audio in our temporary storage. - */ -public class StreamingMediaPlayer { - - private static final int INTIAL_KB_BUFFER = 160*10/8;//assume 96kbps*10secs/8bits per byte - - private TextView textStreamed; - - private ImageButton playButton; - - private ProgressBar progressBar; - - // Track for display by progressBar - private long mediaLengthInKb, mediaLengthInSeconds; - private int totalKbRead = 0; - - // Create Handler to call View updates on the main UI thread. - private final Handler handler = new Handler(); - - private MediaPlayer mediaPlayer; - - private File downloadingMediaFile; - - private boolean isInterrupted; - - private Context context; - - private int counter = 0; - - public StreamingMediaPlayer(Context context,TextView textStreamed, ImageButton playButton, Button streamButton,ProgressBar progressBar) - { - this.context = context; - this.textStreamed = textStreamed; - this.playButton = playButton; - this.progressBar = progressBar; - } - - /** - * Progressively download the media to a temporary location and update the MediaPlayer as new content becomes available. - */ - public void startStreaming(final String mediaUrl, long mediaLengthInKb, long mediaLengthInSeconds) throws IOException { - - this.mediaLengthInKb = mediaLengthInKb; - this.mediaLengthInSeconds = mediaLengthInSeconds; - - Runnable r = new Runnable() { - public void run() { - try { - downloadAudioIncrement(mediaUrl); - } catch (IOException e) { - Log.e(getClass().getName(), "Unable to initialize the MediaPlayer for fileUrl=" + mediaUrl, e); - return; - } - } - }; - new Thread(r).start(); - } - - /** - * Download the url stream to a temporary location and then call the setDataSource - * for that local file - */ - public void downloadAudioIncrement(String mediaUrl) throws IOException { - - URLConnection cn = new URL(mediaUrl).openConnection(); - cn.connect(); - InputStream stream = cn.getInputStream(); - if (stream == null) { - Log.e(getClass().getName(), "Unable to create InputStream for mediaUrl:" + mediaUrl); - } - - downloadingMediaFile = new File(context.getCacheDir(),"downloadingMedia.dat"); - - // Just in case a prior deletion failed because our code crashed or something, we also delete any previously - // downloaded file to ensure we start fresh. If you use this code, always delete - // no longer used downloads else you'll quickly fill up your hard disk memory. Of course, you can also - // store any previously downloaded file in a separate data cache for instant replay if you wanted as well. - if (downloadingMediaFile.exists()) { - downloadingMediaFile.delete(); - } - - FileOutputStream out = new FileOutputStream(downloadingMediaFile); - byte buf[] = new byte[16384]; - int totalBytesRead = 0, incrementalBytesRead = 0; - do { - int numread = stream.read(buf); - if (numread <= 0) - break; - out.write(buf, 0, numread); - totalBytesRead += numread; - incrementalBytesRead += numread; - totalKbRead = totalBytesRead/1000; - - testMediaBuffer(); - fireDataLoadUpdate(); - } while (validateNotInterrupted()); - stream.close(); - if (validateNotInterrupted()) { - fireDataFullyLoaded(); - } - } - - private boolean validateNotInterrupted() { - if (isInterrupted) { - if (mediaPlayer != null) { - mediaPlayer.pause(); - //mediaPlayer.release(); - } - return false; - } else { - return true; - } - } - - - /** - * Test whether we need to transfer buffered data to the MediaPlayer. - * Interacting with MediaPlayer on non-main UI thread can causes crashes to so perform this using a Handler. - */ - private void testMediaBuffer() { - Runnable updater = new Runnable() { - public void run() { - if (mediaPlayer == null) { - // Only create the MediaPlayer once we have the minimum buffered data - if ( totalKbRead >= INTIAL_KB_BUFFER) { - try { - startMediaPlayer(); - } catch (Exception e) { - Log.e(getClass().getName(), "Error copying buffered conent.", e); - } - } - } else if ( mediaPlayer.getDuration() - mediaPlayer.getCurrentPosition() <= 1000 ){ - // NOTE: The media player has stopped at the end so transfer any existing buffered data - // We test for < 1second of data because the media player can stop when there is still - // a few milliseconds of data left to play - transferBufferToMediaPlayer(); - } - } - }; - handler.post(updater); - } - - private void startMediaPlayer() { - try { - File bufferedFile = new File(context.getCacheDir(),"playingMedia" + (counter++) + ".dat"); - - // We double buffer the data to avoid potential read/write errors that could happen if the - // download thread attempted to write at the same time the MediaPlayer was trying to read. - // For example, we can't guarantee that the MediaPlayer won't open a file for playing and leave it locked while - // the media is playing. This would permanently deadlock the file download. To avoid such a deadloack, - // we move the currently loaded data to a temporary buffer file that we start playing while the remaining - // data downloads. - moveFile(downloadingMediaFile,bufferedFile); - - Log.e(getClass().getName(),"Buffered File path: " + bufferedFile.getAbsolutePath()); - Log.e(getClass().getName(),"Buffered File length: " + bufferedFile.length()+""); - - mediaPlayer = createMediaPlayer(bufferedFile); - - // We have pre-loaded enough content and started the MediaPlayer so update the buttons & progress meters. - mediaPlayer.start(); - startPlayProgressUpdater(); - playButton.setEnabled(true); - } catch (IOException e) { - Log.e(getClass().getName(), "Error initializing the MediaPlayer.", e); - return; - } - } - - private MediaPlayer createMediaPlayer(File mediaFile) - throws IOException { - MediaPlayer mPlayer = new MediaPlayer(); - mPlayer.setOnErrorListener( - new MediaPlayer.OnErrorListener() { - public boolean onError(MediaPlayer mp, int what, int extra) { - Log.e(getClass().getName(), "Error in MediaPlayer: (" + what +") with extra (" +extra +")" ); - return false; - } - }); - - // It appears that for security/permission reasons, it is better to pass a FileDescriptor rather than a direct path to the File. - // Also I have seen errors such as "PVMFErrNotSupported" and "Prepare failed.: status=0x1" if a file path String is passed to - // setDataSource(). So unless otherwise noted, we use a FileDescriptor here. - FileInputStream fis = new FileInputStream(mediaFile); - mPlayer.setDataSource(fis.getFD()); - mPlayer.prepare(); - return mPlayer; - } - - /** - * Transfer buffered data to the MediaPlayer. - * NOTE: Interacting with a MediaPlayer on a non-main UI thread can cause thread-lock and crashes so - * this method should always be called using a Handler. - */ - private void transferBufferToMediaPlayer() { - try { - // First determine if we need to restart the player after transferring data...e.g. perhaps the user pressed pause - boolean wasPlaying = mediaPlayer.isPlaying(); - int curPosition = mediaPlayer.getCurrentPosition(); - - // Copy the currently downloaded content to a new buffered File. Store the old File for deleting later. - File oldBufferedFile = new File(context.getCacheDir(),"playingMedia" + counter + ".dat"); - File bufferedFile = new File(context.getCacheDir(),"playingMedia" + (counter++) + ".dat"); - - // This may be the last buffered File so ask that it be delete on exit. If it's already deleted, then this won't mean anything. If you want to - // keep and track fully downloaded files for later use, write caching code and please send me a copy. - bufferedFile.deleteOnExit(); - moveFile(downloadingMediaFile,bufferedFile); - - // Pause the current player now as we are about to create and start a new one. So far (Android v1.5), - // this always happens so quickly that the user never realized we've stopped the player and started a new one - mediaPlayer.pause(); - - // Create a new MediaPlayer rather than try to re-prepare the prior one. - mediaPlayer = createMediaPlayer(bufferedFile); - mediaPlayer.seekTo(curPosition); - - // Restart if at end of prior buffered content or mediaPlayer was previously playing. - // NOTE: We test for < 1second of data because the media player can stop when there is still - // a few milliseconds of data left to play - boolean atEndOfFile = mediaPlayer.getDuration() - mediaPlayer.getCurrentPosition() <= 1000; - if (wasPlaying || atEndOfFile){ - mediaPlayer.start(); - } - - // Lastly delete the previously playing buffered File as it's no longer needed. - oldBufferedFile.delete(); - - }catch (Exception e) { - Log.e(getClass().getName(), "Error updating to newly loaded content.", e); - } - } - - private void fireDataLoadUpdate() { - Runnable updater = new Runnable() { - public void run() { - textStreamed.setText((totalKbRead + " Kb read")); - float loadProgress = ((float)totalKbRead/(float)mediaLengthInKb); - progressBar.setSecondaryProgress((int)(loadProgress*100)); - } - }; - handler.post(updater); - } - - private void fireDataFullyLoaded() { - Runnable updater = new Runnable() { - public void run() { - transferBufferToMediaPlayer(); - - // Delete the downloaded File as it's now been transferred to the currently playing buffer file. - downloadingMediaFile.delete(); - textStreamed.setText(("Audio full loaded: " + totalKbRead + " Kb read")); - } - }; - handler.post(updater); - } - - public MediaPlayer getMediaPlayer() { - return mediaPlayer; - } - - public void startPlayProgressUpdater() { - float progress = (((float)mediaPlayer.getCurrentPosition()/1000)/mediaLengthInSeconds); - progressBar.setProgress((int)(progress*100)); - - if (mediaPlayer.isPlaying()) { - Runnable notification = new Runnable() { - public void run() { - startPlayProgressUpdater(); - } - }; - handler.postDelayed(notification,1000); - } - } - - public void interrupt() { - playButton.setEnabled(false); - isInterrupted = true; - validateNotInterrupted(); - } - - /** - * Move the file in oldLocation to newLocation. - */ - public void moveFile(File oldLocation, File newLocation) - throws IOException { - - if ( oldLocation.exists( )) { - BufferedInputStream reader = new BufferedInputStream( new FileInputStream(oldLocation) ); - BufferedOutputStream writer = new BufferedOutputStream( new FileOutputStream(newLocation, false)); - try { - byte[] buff = new byte[8192]; - int numChars; - while ( (numChars = reader.read( buff, 0, buff.length ) ) != -1) { - writer.write( buff, 0, numChars ); - } - } catch( IOException ex ) { - throw new IOException("IOException when transferring " + oldLocation.getPath() + " to " + newLocation.getPath()); - } finally { - try { - if ( reader != null ){ - writer.close(); - reader.close(); - } - } catch( IOException ex ){ - Log.e(getClass().getName(),"Error closing files when transferring " + oldLocation.getPath() + " to " + newLocation.getPath() ); - } - } - } else { - throw new IOException("Old location does not exist when transferring " + oldLocation.getPath() + " to " + newLocation.getPath() ); - } - } -} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -167,4 +167,23 @@ post.Post(xml); } + public static void PostStreamFile(String Filename, String MediaTyp) { + + Filename = Entity.AddEntity(Filename); + + Log.d("MediaPortal", "PostStreamFile : " + Filename); + + PostWebserver post = new PostWebserver(AppSettings.getServer(), AppSettings.getPort()); + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"; + xml += "<message>\r\n"; + xml += "<command>StreamFile</command>\r\n"; + xml += "<filename>" + Filename + "</filename>\r\n"; + xml += "<mediatyp>" + MediaTyp + "</mediatyp>\r\n"; + xml += "</message>\r\n"; + + post.Post(xml); + } + } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -30,6 +30,7 @@ import mediaportal.remote.R; import mediaportal.remote.communication.SendCommand; import mediaportal.remote.control.Remote_01; +import mediaportal.remote.multimedia.Webradio; import mediaportal.remote.music.MusicTab; import mediaportal.remote.nowPlaying.NowPlaying; import mediaportal.remote.nowPlaying.NowPlayingXmlHandler; @@ -52,6 +53,7 @@ import android.os.Handler; import android.os.Vibrator; import android.util.Log; +import android.view.KeyEvent; import android.view.View; import android.widget.*; @@ -146,13 +148,13 @@ public void onClick(View view) { Vibration.vibrateShort(); - Toast.makeText(view.getContext(), - "not implemented yet. Sorry !", Toast.LENGTH_LONG) - .show(); + //Toast.makeText(view.getContext(), + // "not implemented yet. Sorry !", Toast.LENGTH_LONG) + // .show(); - //Intent myIntent = new Intent(view.getContext(), - //MediaPlayerControl.class); - //startActivity(myIntent); + Intent myIntent = new Intent(view.getContext(), + MediaPlayerControl.class); + startActivity(myIntent); } }); @@ -179,7 +181,7 @@ btnSettings.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Vibration.vibrateShort(); - Intent myIntent = new Intent(view.getContext(), Setup.class); + Intent myIntent = new Intent(view.getContext(), Webradio.class); startActivity(myIntent); } }); @@ -281,7 +283,7 @@ super.onStart(); Log.d("MediaPortal", "start Main"); - + AppSettings.setSettings(getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE)); @@ -292,11 +294,6 @@ } @Override - public void onResume() { - super.onResume(); - } - - @Override public void onPause() { super.onPause(); @@ -304,6 +301,21 @@ mHandler.removeCallbacks(mUpdateTimeTask); } + // hardware keys + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + + switch (keyCode) { + case KeyEvent.KEYCODE_MENU: { + Intent myIntent = new Intent(this, Setup.class); + startActivityForResult(myIntent, 0); + return true; + } + } + + return super.onKeyDown(keyCode, event); + } + private Runnable mUpdateTimeTask = new Runnable() { public void run() { new update().execute(); @@ -333,8 +345,8 @@ if ((playerState != null) && (!playerState.equals("no player active"))) { display = values.get("Artist") + " - " - + values.get("Title") + " (" + values.get("ActualTime") - + ")"; + + values.get("Title") + " (" + + values.get("ActualTime") + ")"; state = playerState; } else { display = "nothing playing"; Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/AudioPlayer.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/AudioPlayer.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/AudioPlayer.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -0,0 +1,47 @@ +package mediaportal.remote.multimedia; + +import java.io.IOException; + +import mediaportal.remote.utils.AppSettings; +import android.media.MediaPlayer; + +public class AudioPlayer { + + private MediaPlayer mp; + + public AudioPlayer() { + mp = new MediaPlayer(); + } + + public void StartPlaying() { + try { + mp.setDataSource("http://" + AppSettings.getServer() + ":8081/"); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalStateException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + try { + mp.prepare(); + } catch (IllegalStateException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + mp.start(); + mp.setScreenOnWhilePlaying(true); + } + + public void StopPlaying() { + if (mp != null) + if (mp.isPlaying()) + mp.stop(); + } +} Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/Webradio.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/Webradio.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/Webradio.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -0,0 +1,84 @@ +package mediaportal.remote.multimedia; + +import mediaportal.remote.R; +import mediaportal.remote.communication.SendCommand; +import mediaportal.remote.utils.KeyLock; +import mediaportal.remote.utils.Vibration; +import android.app.Activity; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +public class Webradio extends Activity{ + + private AudioPlayer player; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.webradio); + + player = new AudioPlayer(); + + Button radio01 = (Button) findViewById(R.id.radio01); + radio01.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + + SendCommand.PostStreamFile("webradio_1","audio"); + player.StartPlaying(); + } + }); + Button radio02 = (Button) findViewById(R.id.radio02); + radio02.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + + SendCommand.PostStreamFile("webradio_2","audio"); + player.StartPlaying(); + } + }); + Button radio03 = (Button) findViewById(R.id.radio03); + radio03.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + + SendCommand.PostStreamFile("webradio_3","audio"); + player.StartPlaying(); + } + }); + Button radio04 = (Button) findViewById(R.id.radio04); + radio04.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + + SendCommand.PostStreamFile("webradio_4","audio"); + player.StartPlaying(); + } + }); + + Button radioStop = (Button) findViewById(R.id.radioStop); + radioStop.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + player.StopPlaying(); + } + }); + + } + + @Override + public void onResume() { + super.onResume(); + + KeyLock.disableKeylock(); + } + + @Override + public void onPause() { + super.onPause(); + + KeyLock.enbleKeylock(); + + } +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -69,6 +69,8 @@ public static boolean SlideshowPaused = false; private static long SlideInterval = 5000; + private Bitmap picture; + /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { @@ -105,7 +107,7 @@ Log.d("MediaPortal", "pictures fullscreen load " + file); - item.Picture = http.DownloadImage(file); + picture = http.DownloadImage(file); } return null; @@ -119,7 +121,7 @@ if (item.isFolder != true) { ImageView imagev = (ImageView) findViewById(R.id.ImageView01); - imagev.setImageBitmap(item.Picture); + imagev.setImageBitmap(picture); TextView txt = (TextView) findViewById(R.id.full_text); @@ -174,10 +176,10 @@ HttpHandler handler = new HttpHandler(); - Bitmap pic = handler.DownloadImage(req); + picture = handler.DownloadImage(req); ImageView imagev = (ImageView) findViewById(R.id.ImageView01); - imagev.setImageBitmap(pic); + imagev.setImageBitmap(picture); TextView txt = (TextView) findViewById(R.id.full_text); txt.setText("Random slide show"); @@ -220,7 +222,7 @@ private void SavetoSDCard() { try { DirItems item = Pictures.pictureList.get(Pictures.selectedPicture); - Bitmap bMap = item.Picture; + Bitmap bMap = picture; File fPath = Environment.getExternalStorageDirectory(); OutputStream outStream = null; try { @@ -249,7 +251,7 @@ Picturesfullscreen.this, fPath + "/" + item.File.toString(), "image/jpeg"); - Toast.makeText(Picturesfullscreen.this, "File saved.", + Toast.makeText(Picturesfullscreen.this, "File has been saved.", Toast.LENGTH_SHORT).show(); } catch (IOException e) { e.printStackTrace(); @@ -267,7 +269,7 @@ private void SavetoCache() { try { DirItems item = Pictures.pictureList.get(Pictures.selectedPicture); - Bitmap bMap = item.Picture; + Bitmap bMap = picture; File fPath = Environment.getExternalStorageDirectory(); OutputStream outStream = null; try { @@ -291,8 +293,8 @@ try { outStream.close(); - Toast.makeText(Picturesfullscreen.this, "File saved.", - Toast.LENGTH_SHORT).show(); + //Toast.makeText(Picturesfullscreen.this, "File saved.", + // Toast.LENGTH_SHORT).show(); } catch (IOException e) { e.printStackTrace(); Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-01-13 21:02:08 UTC (rev 4070) @@ -60,6 +60,11 @@ return "http://" + AppSettings.getServer() + ":" + AppSettings.getPort(); } + public static String getLastFile() + { + return settings.getString("LastFile", "c:\\test.mp4"); + } + public static void setServer(String Server) { prefEditor.putString("Server", Server); @@ -86,4 +91,10 @@ prefEditor.commit(); } + public static void setLastFile(String File) + { + prefEditor.putString("LastFile", File); + prefEditor.commit(); + } + } Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 =================================================================== --- trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-13 21:02:08 UTC (rev 4070) @@ -17,6 +17,13 @@ <ZipFileName>Installer{CopyFile}\{e035a37f-6b89-423d-b478-a1d7bbd1cce6}-AndroidRemote.dll</ZipFileName> <DestinationFilename>%Plugins%\process\AndroidRemote.dll</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\Server\AndroidRemote\bin\Release\VideoLan.Interop.dll</LocalFileName> + <ZipFileName>Installer{CopyFile}\{b71d0b6b-5613-449f-98a4-50dee3c65c8c}-VideoLan.Interop.dll</ZipFileName> + <DestinationFilename>%Plugins%\process\VideoLan.Interop.dll</DestinationFilename> + </FileItem> </Items> </Files> </GroupItem> @@ -193,6 +200,13 @@ <ZipFileName>Installer{CopyFile}\{e035a37f-6b89-423d-b478-a1d7bbd1cce6}-AndroidRemote.dll</ZipFileName> <DestinationFilename>%Plugins%\process\AndroidRemote.dll</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\Server\AndroidRemote\bin\Release\VideoLan.Interop.dll</LocalFileName> + <ZipFileName>Installer{CopyFile}\{b71d0b6b-5613-449f-98a4-50dee3c65c8c}-VideoLan.Interop.dll</ZipFileName> + <DestinationFilename>%Plugins%\process\VideoLan.Interop.dll</DestinationFilename> + </FileItem> </Items> </UniqueFileList> <ProjectSettings> Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj 2011-01-13 21:02:08 UTC (rev 4070) @@ -52,10 +52,18 @@ <HintPath>..\..\..\..\Program Files\Team MediaPortal\MediaPortal\Utils.dll</HintPath> <Private>False</Private> </Reference> + <Reference Include="VideoLan.Interop, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <Private>False</Private> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AndroidServer.cs" /> - <Compile Include="ExecuteCommand.cs" /> + <Compile Include="Content\MusicHandler.cs" /> + <Compile Include="Content\NowPlayingHandler.cs" /> + <Compile Include="Content\PictureHandler.cs" /> + <Compile Include="SocketHandler.cs" /> + <Compile Include="Content\SomeUtils.cs" /> + <Compile Include="Content\ExecuteCommand.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Request.cs" /> <Compile Include="Setup.cs"> Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-10 20:32:55 UTC (rev 4069) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-13 21:02:08 UTC (rev 4070) @@ -34,6 +34,8 @@ using System.Net; using System.Net.Sockets; +using VideoLan; + namespace AndroidRemote { [PluginIcons("AndroidRemote.icon.png", "AndroidRemote.icon_off.png")] @@ -43,10 +45,13 @@ private TcpListener myListener; public static string Server = string.Empty; public static string Port = string.Empty; + public static string VlcFile = string.Empty; private Thread listen; private Thread grabPictures; + public static VideoLan.VlcControl vlc; + #region IPlugin public void Start() { @@... [truncated message content] |
From: <kro...@us...> - 2011-01-17 14:33:57
|
Revision: 4071 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4071&view=rev Author: kroko_koenig Date: 2011-01-17 14:33:48 +0000 (Mon, 17 Jan 2011) Log Message: ----------- Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/AudioPlayer.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/Webradio.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/SomeUtils.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup_ip.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Setup_ip.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/MediaPlayerControl.java trunk/plugins/AndroidRemote/Release/icons.zip Removed Paths: ------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-17 14:33:48 UTC (rev 4071) @@ -22,6 +22,7 @@ <activity android:launchMode="singleInstance" android:name=".pictures.Picturesfullscreen"></activity> <activity android:launchMode="singleInstance" android:name=".music.MusicDir"></activity> <activity android:launchMode="singleInstance" android:name="Setup"></activity> + <activity android:launchMode="singleInstance" android:name="Setup_ip"></activity> <activity android:launchMode="singleInstance" android:name=".nowPlaying.NowPlaying"></activity> <activity android:launchMode="singleInstance" android:name=".nowPlaying.NowPlayingList"></activity> <activity android:launchMode="singleInstance" android:name=".music.MusicArtist"></activity> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -83,160 +83,164 @@ public static final int wake_on_lan=0x7f020042; } public static final class id { - public static final int GridView01=0x7f070017; - public static final int ImageView01=0x7f070019; - public static final int LinearLayout00=0x7f070058; - public static final int LinearLayout01=0x7f070020; - public static final int LinearLayout02=0x7f070063; - public static final int LinearLayout03=0x7f07006d; - public static final int LinearLayout04=0x7f070077; - public static final int LinearLayout05=0x7f07007d; - public static final int ListView01=0x7f07002e; - public static final int Spinner01=0x7f07008b; - public static final int SurfaceView01=0x7f07001f; + public static final int GridView01=0x7f070018; + public static final int ImageView01=0x7f07001a; + public static final int LinearLayout00=0x7f070059; + public static final int LinearLayout01=0x7f070021; + public static final int LinearLayout02=0x7f070064; + public static final int LinearLayout03=0x7f07006e; + public static final int LinearLayout04=0x7f070078; + public static final int LinearLayout05=0x7f07007e; + public static final int ListView01=0x7f07002f; + public static final int Spinner01=0x7f070089; + public static final int SurfaceView01=0x7f070020; public static final int TableLayout01=0x7f070005; - public static final int TableLayout02=0x7f07003d; - public static final int TableRow01=0x7f070006; - public static final int TableRow02=0x7f070042; - public static final int TableRow03=0x7f070047; + public static final int TableLayout02=0x7f07003e; + public static final int TableRow01=0x7f070007; + public static final int TableRow02=0x7f070043; + public static final int TableRow03=0x7f070048; public static final int TextView01=0x7f070003; public static final int TextView02=0x7f070004; - public static final int btnChannelDown=0x7f070051; - public static final int btnChannelUp=0x7f07004e; - public static final int btnExit=0x7f070052; - public static final int btnHibernate=0x7f070054; - public static final int btnRestart=0x7f070055; - public static final int btnShutOff=0x7f070056; - public static final int btnSuspend=0x7f070053; - public static final int btnVolumeDown=0x7f070050; - public static final int btnVolumeMute=0x7f07004f; - public static final int btnVolumeUp=0x7f07004d; - public static final int btnWakeOnLan=0x7f070057; - public static final int btn_main_music=0x7f070008; - public static final int btn_main_now_playing=0x7f07000b; - public static final int btn_main_pictures=0x7f070007; - public static final int btn_main_play=0x7f07000f; - public static final int btn_main_remote=0x7f07000a; - public static final int btn_main_settings=0x7f07000c; - public static final int btn_main_skp_back=0x7f07000e; - public static final int btn_main_skp_forw=0x7f070010; - public static final int btn_main_video=0x7f070009; - public static final int btnkey01=0x7f070059; - public static final int btnkey02=0x7f07005a; - public static final int btnkey03=0x7f07005b; - public static final int btnkey04=0x7f07005c; - public static final int btnkey05=0x7f07005d; - public static final int btnkey06=0x7f07005e; - public static final int btnkey07=0x7f07005f; - public static final int btnkey08=0x7f070060; - public static final int btnkey09=0x7f070061; - public static final int btnkey10=0x7f070062; - public static final int btnkey11=0x7f070064; - public static final int btnkey12=0x7f070065; - public static final int btnkey13=0x7f070066; - public static final int btnkey14=0x7f070067; - public static final int btnkey15=0x7f070068; - public static final int btnkey16=0x7f070069; - public static final int btnkey17=0x7f07006a; - public static final int btnkey18=0x7f07006b; - public static final int btnkey19=0x7f07006c; - public static final int btnkey20=0x7f07006e; - public static final int btnkey21=0x7f07006f; - public static final int btnkey22=0x7f070070; - public static final int btnkey23=0x7f070071; - public static final int btnkey24=0x7f070072; - public static final int btnkey25=0x7f070073; - public static final int btnkey26=0x7f070074; - public static final int btnkey27=0x7f070075; - public static final int btnkey28=0x7f070076; - public static final int btnkey29=0x7f070078; - public static final int btnkey30=0x7f070079; - public static final int btnkey31=0x7f07007a; - public static final int btnkey32=0x7f07007b; - public static final int btnkey33=0x7f07007c; - public static final int btnkey41=0x7f07007e; - public static final int btnkey42=0x7f07007f; - public static final int btnkey43=0x7f070080; - public static final int btnkey44=0x7f070081; - public static final int btnkey45=0x7f070082; - public static final int btnkey46=0x7f070083; - public static final int btnkey47=0x7f070084; - public static final int btnkey48=0x7f070085; - public static final int btnkey49=0x7f070086; - public static final int btnkey50=0x7f070087; - public static final int button_open=0x7f07001c; - public static final int button_stream=0x7f07001d; - public static final int button_stream_stop=0x7f07001e; - public static final int clearplaylist=0x7f070094; - public static final int crtl_back=0x7f07003a; - public static final int crtl_ch_m=0x7f070046; - public static final int crtl_ch_p=0x7f070041; - public static final int crtl_down=0x7f070039; - public static final int crtl_full=0x7f070043; - public static final int crtl_info=0x7f07004b; - public static final int crtl_left=0x7f070034; - public static final int crtl_menu=0x7f070045; - public static final int crtl_mp=0x7f070030; - public static final int crtl_osd=0x7f07004a; - public static final int crtl_parent=0x7f070038; - public static final int crtl_play=0x7f070044; - public static final int crtl_power=0x7f070032; - public static final int crtl_ratio=0x7f070049; - public static final int crtl_right=0x7f070036; - public static final int crtl_select=0x7f070035; - public static final int crtl_skip_back=0x7f07003e; - public static final int crtl_skip_forw=0x7f070040; - public static final int crtl_stop=0x7f07003f; - public static final int crtl_sub=0x7f070048; - public static final int crtl_up=0x7f070031; - public static final int crtl_vol_m=0x7f07003c; - public static final int crtl_vol_p=0x7f07003b; - public static final int full_text=0x7f070018; + public static final int btnChannelDown=0x7f070052; + public static final int btnChannelUp=0x7f07004f; + public static final int btnExit=0x7f070053; + public static final int btnHibernate=0x7f070055; + public static final int btnIpSettings=0x7f07008b; + public static final int btnRestart=0x7f070056; + public static final int btnShutOff=0x7f070057; + public static final int btnSuspend=0x7f070054; + public static final int btnVolumeDown=0x7f070051; + public static final int btnVolumeMute=0x7f070050; + public static final int btnVolumeUp=0x7f07004e; + public static final int btnWakeOnLan=0x7f070058; + public static final int btn_main_music=0x7f070009; + public static final int btn_main_now_playing=0x7f07000c; + public static final int btn_main_pictures=0x7f070008; + public static final int btn_main_play=0x7f070010; + public static final int btn_main_remote=0x7f07000b; + public static final int btn_main_settings=0x7f07000d; + public static final int btn_main_skp_back=0x7f07000f; + public static final int btn_main_skp_forw=0x7f070011; + public static final int btn_main_video=0x7f07000a; + public static final int btnkey01=0x7f07005a; + public static final int btnkey02=0x7f07005b; + public static final int btnkey03=0x7f07005c; + public static final int btnkey04=0x7f07005d; + public static final int btnkey05=0x7f07005e; + public static final int btnkey06=0x7f07005f; + public static final int btnkey07=0x7f070060; + public static final int btnkey08=0x7f070061; + public static final int btnkey09=0x7f070062; + public static final int btnkey10=0x7f070063; + public static final int btnkey11=0x7f070065; + public static final int btnkey12=0x7f070066; + public static final int btnkey13=0x7f070067; + public static final int btnkey14=0x7f070068; + public static final int btnkey15=0x7f070069; + public static final int btnkey16=0x7f07006a; + public static final int btnkey17=0x7f07006b; + public static final int btnkey18=0x7f07006c; + public static final int btnkey19=0x7f07006d; + public static final int btnkey20=0x7f07006f; + public static final int btnkey21=0x7f070070; + public static final int btnkey22=0x7f070071; + public static final int btnkey23=0x7f070072; + public static final int btnkey24=0x7f070073; + public static final int btnkey25=0x7f070074; + public static final int btnkey26=0x7f070075; + public static final int btnkey27=0x7f070076; + public static final int btnkey28=0x7f070077; + public static final int btnkey29=0x7f070079; + public static final int btnkey30=0x7f07007a; + public static final int btnkey31=0x7f07007b; + public static final int btnkey32=0x7f07007c; + public static final int btnkey33=0x7f07007d; + public static final int btnkey41=0x7f07007f; + public static final int btnkey42=0x7f070080; + public static final int btnkey43=0x7f070081; + public static final int btnkey44=0x7f070082; + public static final int btnkey45=0x7f070083; + public static final int btnkey46=0x7f070084; + public static final int btnkey47=0x7f070085; + public static final int btnkey48=0x7f070086; + public static final int btnkey49=0x7f070087; + public static final int btnkey50=0x7f070088; + public static final int button_open=0x7f07001d; + public static final int button_stream=0x7f07001e; + public static final int button_stream_stop=0x7f07001f; + public static final int clearplaylist=0x7f070098; + public static final int crtl_back=0x7f07003b; + public static final int crtl_ch_m=0x7f070047; + public static final int crtl_ch_p=0x7f070042; + public static final int crtl_down=0x7f07003a; + public static final int crtl_full=0x7f070044; + public static final int crtl_info=0x7f07004c; + public static final int crtl_left=0x7f070035; + public static final int crtl_menu=0x7f070046; + public static final int crtl_mp=0x7f070031; + public static final int crtl_osd=0x7f07004b; + public static final int crtl_parent=0x7f070039; + public static final int crtl_play=0x7f070045; + public static final int crtl_power=0x7f070033; + public static final int crtl_ratio=0x7f07004a; + public static final int crtl_right=0x7f070037; + public static final int crtl_select=0x7f070036; + public static final int crtl_skip_back=0x7f07003f; + public static final int crtl_skip_forw=0x7f070041; + public static final int crtl_stop=0x7f070040; + public static final int crtl_sub=0x7f070049; + public static final int crtl_up=0x7f070032; + public static final int crtl_vol_m=0x7f07003d; + public static final int crtl_vol_p=0x7f07003c; + public static final int full_text=0x7f070019; public static final int icon_image=0x7f070001; public static final int icon_text=0x7f070002; - public static final int list_album=0x7f070013; - public static final int list_artist=0x7f070014; - public static final int list_result=0x7f070015; - public static final int list_song=0x7f070016; - public static final int main_now_playing=0x7f07000d; - public static final int music_grid=0x7f070012; - public static final int naviRemote_text=0x7f07004c; - public static final int now_album=0x7f070022; - public static final int now_artist=0x7f070028; - public static final int now_cd=0x7f070023; - public static final int now_list=0x7f07002d; - public static final int now_next=0x7f07002c; - public static final int now_play=0x7f07002b; - public static final int now_playing=0x7f070021; - public static final int now_playing_right=0x7f070026; - public static final int now_playing_t_left=0x7f070025; - public static final int now_prev=0x7f070029; - public static final int now_progress=0x7f070024; - public static final int now_stop=0x7f07002a; - public static final int now_title=0x7f070027; - public static final int open=0x7f070097; - public static final int playlist=0x7f070093; - public static final int radio01=0x7f07008e; - public static final int radio02=0x7f07008f; - public static final int radio03=0x7f070090; - public static final int radio04=0x7f070091; - public static final int radioStop=0x7f070092; - public static final int rslide=0x7f07009a; - public static final int save=0x7f070096; - public static final int sdcard=0x7f070095; - public static final int send=0x7f070098; - public static final int server_ip=0x7f070088; - public static final int server_macid=0x7f07008a; - public static final int server_port=0x7f070089; - public static final int slide=0x7f070099; - public static final int text_kb_streamed=0x7f07001a; - public static final int title=0x7f07008d; - public static final int txtFile=0x7f07001b; - public static final int vibration=0x7f07008c; - public static final int widget0=0x7f070011; - public static final int widget00=0x7f07002f; - public static final int widget01=0x7f070033; - public static final int widget02=0x7f070037; + public static final int list_album=0x7f070014; + public static final int list_artist=0x7f070015; + public static final int list_result=0x7f070016; + public static final int list_song=0x7f070017; + public static final int main_now_playing=0x7f07000e; + public static final int music_grid=0x7f070013; + public static final int naviRemote_text=0x7f07004d; + public static final int now_album=0x7f070023; + public static final int now_artist=0x7f070029; + public static final int now_cd=0x7f070024; + public static final int now_list=0x7f07002e; + public static final int now_next=0x7f07002d; + public static final int now_play=0x7f07002c; + public static final int now_playing=0x7f070022; + public static final int now_playing_right=0x7f070027; + public static final int now_playing_t_left=0x7f070026; + public static final int now_prev=0x7f07002a; + public static final int now_progress=0x7f070025; + public static final int now_stop=0x7f07002b; + public static final int now_title=0x7f070028; + public static final int open=0x7f07009b; + public static final int playlist=0x7f070097; + public static final int radio01=0x7f070092; + public static final int radio02=0x7f070093; + public static final int radio03=0x7f070094; + public static final int radio04=0x7f070095; + public static final int radioStop=0x7f070096; + public static final int rslide=0x7f07009e; + public static final int save=0x7f07009a; + public static final int sdcard=0x7f070099; + public static final int send=0x7f07009c; + public static final int server_ip=0x7f07008c; + public static final int server_macid=0x7f07008e; + public static final int server_name=0x7f070090; + public static final int server_port=0x7f07008d; + public static final int slide=0x7f07009d; + public static final int text_kb_streamed=0x7f07001b; + public static final int title=0x7f070091; + public static final int txtFile=0x7f07001c; + public static final int txtInstance=0x7f070006; + public static final int txtIntanceName=0x7f07008f; + public static final int vibration=0x7f07008a; + public static final int widget0=0x7f070012; + public static final int widget00=0x7f070030; + public static final int widget01=0x7f070034; + public static final int widget02=0x7f070038; public static final int widget44=0x7f070000; } public static final class layout { @@ -259,9 +263,10 @@ public static final int remote03=0x7f030010; public static final int remote03b=0x7f030011; public static final int setup=0x7f030012; - public static final int splash=0x7f030013; - public static final int title=0x7f030014; - public static final int webradio=0x7f030015; + public static final int setup_ip=0x7f030013; + public static final int splash=0x7f030014; + public static final int title=0x7f030015; + public static final int webradio=0x7f030016; } public static final class menu { public static final int music_menu=0x7f060000; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-17 14:33:48 UTC (rev 4071) @@ -39,12 +39,12 @@ ------ most functions as on my remote two more buttons for subtitle / osd +zoom button missing Main issues ------------ switch WIFI on (just msg now) save files from Android to MP -if the MP has no focus the remote doesnt work (normal) progress task for downloads -multiply control of more then one MP +done : multiply control of more then one MP NowPlaying list show actual / count of items on top bar \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2011-01-17 14:33:48 UTC (rev 4071) @@ -11,7 +11,7 @@ android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> -<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> +<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="HTPC" android:textColor="#FF000000" android:textStyle="bold" android:textSize="20dip" android:gravity="center_horizontal" android:id="@+id/txtInstance"></TextView><TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> <Button android:background="@drawable/main_pictures" android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" @@ -36,8 +36,9 @@ android:scaleType="fitXY" android:padding="5dip" android:background="@drawable/main_remote" android:id="@+id/btn_main_remote"> </Button> - </TableRow> +</TableRow> + <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> <Button android:scaleType="fitXY" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2011-01-17 14:33:48 UTC (rev 4071) @@ -3,25 +3,11 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:padding="15dip" android:background="@drawable/brush"> + <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="MediaPortal IP" - android:textColor="#FF000000" android:textSize="18dip"> - - </TextView> - <EditText android:id="@+id/server_ip" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="text"></EditText> - <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="MediaPortal Port" - android:textColor="#FF000000" android:textSize="18dip"></TextView> - <EditText android:id="@+id/server_port" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="8200" - android:inputType="phone"></EditText> - <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#FF000000" - android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> - <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="12-34-56-78-90-12" - android:inputType="text"></EditText> + android:textSize="24dip" android:text="Global settings" android:paddingBottom="10dip"></TextView> + <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#FF000000" android:textSize="18dip" android:text="Power Mode"></TextView> @@ -30,6 +16,7 @@ <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000" - android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox> + android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox><Button android:layout_height="wrap_content" android:id="@+id/btnIpSettings" android:text="IP settings" android:layout_width="fill_parent" android:layout_marginTop="20dip"></Button> + </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup_ip.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup_ip.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup_ip.xml 2011-01-17 14:33:48 UTC (rev 4071) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:layout_height="fill_parent" + android:orientation="vertical" android:padding="15dip" + android:background="@drawable/brush"> + + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtIntanceName" android:textColor="#FF000000" android:text="Instance Name : 0" android:textSize="20dip"></TextView> + <EditText android:id="@+id/server_name" android:layout_height="wrap_content" + android:layout_width="fill_parent" android:inputType="text" android:text="HTPC"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="MediaPortal IP" + android:textColor="#FF000000" android:textSize="18dip"> + + </TextView> + <EditText android:id="@+id/server_ip" android:layout_height="wrap_content" + android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="text"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="MediaPortal Port" + android:textColor="#FF000000" android:textSize="18dip"></TextView> + <EditText android:id="@+id/server_port" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="8200" + android:inputType="phone"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textColor="#FF000000" + android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> + <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="12-34-56-78-90-12" + android:inputType="text"></EditText> + + + + + + + + +</LinearLayout> Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/MediaPlayerControl.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -1,136 +0,0 @@ -package mediaportal.remote; - -import java.io.IOException; - -import mediaportal.remote.communication.SendCommand; -import mediaportal.remote.utils.AppSettings; -import android.app.Activity; -import android.media.MediaPlayer; -import android.os.Bundle; -import android.view.SurfaceHolder; -import android.view.SurfaceView; -import android.view.View; -import android.widget.Button; -import android.widget.TextView; - -public class MediaPlayerControl extends Activity implements - SurfaceHolder.Callback { - - private Button openButton; - private Button streamButton; - private Button streamStopButton; - - private TextView txtFile; - - private SurfaceView mPreview; - private SurfaceHolder holder; - - private static MediaPlayer mp; - - @Override - public void onCreate(Bundle icicle) { - - super.onCreate(icicle); - - setContentView(R.layout.player); - initControls(); - } - - private void initControls() { - - txtFile = (TextView) findViewById(R.id.txtFile); - txtFile.setText(AppSettings.getLastFile()); - - openButton = (Button) findViewById(R.id.button_open); - streamButton = (Button) findViewById(R.id.button_stream); - streamStopButton = (Button) findViewById(R.id.button_stream_stop); - - mPreview = (SurfaceView) findViewById(R.id.SurfaceView01); - - // Set a size for the video screen - holder = mPreview.getHolder(); - holder.addCallback(this); - holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); - holder.setFixedSize(300, 200); - - openButton.setOnClickListener(new View.OnClickListener() { - public void onClick(View view) { - SendCommand.PostStreamFile(txtFile.getText().toString(),"video"); - } - }); - - streamButton.setOnClickListener(new View.OnClickListener() { - public void onClick(View view) { - if (mp == null) - mp = new MediaPlayer(); - startStreaming(); - } - }); - - streamStopButton.setOnClickListener(new View.OnClickListener() { - public void onClick(View view) { - closePlayer(); - } - }); - - } - - private void startStreaming() { - - try { - mp.setDataSource("rtsp://" + AppSettings.getServer() - + ":5554/android.sdp"); - mp.setDisplay(holder); - } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalStateException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - mp.prepare(); - } catch (IllegalStateException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - mp.start(); - mp.setScreenOnWhilePlaying(true); - } - - public void surfaceCreated(SurfaceHolder surfaceholder) { - - } - - public void surfaceChanged(SurfaceHolder surfaceholder, int i, int j, int k) { - - } - - public void surfaceDestroyed(SurfaceHolder surfaceholder) { - - } - - @Override - protected void onPause() { - super.onPause(); - - closePlayer(); - - AppSettings.setLastFile(txtFile.getText().toString()); - } - - private void closePlayer() { - if (mp != null) { - if (mp.isPlaying()) - mp.stop(); - mp = null; - - } - } -} Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Setup_ip.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Setup_ip.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Setup_ip.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2005-2011 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +package mediaportal.remote; + +import mediaportal.remote.R; +import mediaportal.remote.utils.AppSettings; +import android.app.Activity; +import android.os.Bundle; +import android.widget.EditText; +import android.widget.TextView; + +public class Setup_ip extends Activity { + + private TextView txtInstance; + private EditText txtName; + private EditText txtServer; + private EditText txtPort; + private EditText txtMac; + + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + setContentView(R.layout.setup_ip); + + txtInstance = (TextView) findViewById(R.id.txtIntanceName); + txtName = (EditText) findViewById(R.id.server_name); + txtServer = (EditText) findViewById(R.id.server_ip); + txtPort = (EditText) findViewById(R.id.server_port); + txtMac = (EditText) findViewById(R.id.server_macid); + } + + @Override + public void onResume() { + super.onResume(); + + txtInstance.setText("Instance name (" + AppSettings.getInstance() + ")"); + txtName.setText(AppSettings.getName()); + txtServer.setText(AppSettings.getServer()); + txtPort.setText(AppSettings.getPort()); + txtMac.setText(AppSettings.getMacId()); + } + + @Override + public void onPause() { + super.onPause(); + + AppSettings.setName(txtName.getText().toString()); + AppSettings.setServer(txtServer.getText().toString()); + AppSettings.setPort(txtPort.getText().toString()); + AppSettings.setMacId(txtMac.getText().toString()); + } +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -148,13 +148,13 @@ public void onClick(View view) { Vibration.vibrateShort(); - //Toast.makeText(view.getContext(), - // "not implemented yet. Sorry !", Toast.LENGTH_LONG) - // .show(); + Toast.makeText(view.getContext(), + "not implemented yet. Sorry !", Toast.LENGTH_SHORT) + .show(); - Intent myIntent = new Intent(view.getContext(), - MediaPlayerControl.class); - startActivity(myIntent); + //Intent myIntent = new Intent(view.getContext(), + //MediaPlayerControl.class); + //startActivity(myIntent); } }); @@ -207,17 +207,83 @@ }); } - private boolean reportExist() { - try { - @SuppressWarnings("unused") - BufferedReader reader = new BufferedReader(new InputStreamReader( - this.openFileInput("stack.trace"))); + // hardware keys + @Override public boolean onKeyDown(int keyCode, KeyEvent event) { + + switch (keyCode) { + case KeyEvent.KEYCODE_MENU: { + + final CharSequence[] items = { "Settings", + "Switch HTPC", "Exit", "Cancel" }; + + AlertDialog.Builder builder = new AlertDialog.Builder(Main.this); + builder.setTitle("Select option"); + + builder.setItems(items, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int item) { + switch (item) { + case 0: // settings + Intent myIntent = new Intent(Main.this, Setup.class); + startActivityForResult(myIntent, 0); + break; + case 1: // switch instance + final CharSequence[] items2 = AppSettings.getNames(); + + AlertDialog.Builder builder = new AlertDialog.Builder(Main.this); + builder.setTitle("Select instance"); + + builder.setItems(items2, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int item) { + switch (item) { + case 0: // MP1 + AppSettings.setInstance(1); + break; + case 1: // MP2 + AppSettings.setInstance(2); + break; + case 2: // MP3 + AppSettings.setInstance(3); + break; + } + TextView txtHtpc = (TextView) findViewById(R.id.txtInstance); + txtHtpc.setText(AppSettings.getName()); + } + + }); + + AlertDialog alert = builder.create(); + alert.show(); + break; + case 2: // exit + android.os.Process.killProcess(android.os.Process.myPid()); + break; + case 3: // cancel + break; + } + } + }); + AlertDialog alert = builder.create(); + alert.show(); + return true; - } catch (FileNotFoundException e) { - e.printStackTrace(); } - return false; + case KeyEvent.KEYCODE_VOLUME_UP: { + SendCommand.PostCommandButton("volumeUp"); + return true; + } + case KeyEvent.KEYCODE_VOLUME_DOWN: { + SendCommand.PostCommandButton("volumeDown"); + return true; + } + } + + return super.onKeyDown(keyCode, event); } + + private boolean reportExist() { + File f = new File("stack.trace"); + return f.exists(); + } private void sendReport() { try { @@ -256,7 +322,7 @@ this.deleteFile("stack.trace"); } - void chkStatus() { + void chkStatus() { final ConnectivityManager connMgr = (ConnectivityManager) this .getSystemService(Context.CONNECTIVITY_SERVICE); @@ -287,6 +353,9 @@ AppSettings.setSettings(getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE)); + TextView txtHtpc = (TextView) findViewById(R.id.txtInstance); + txtHtpc.setText(AppSettings.getName()); + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 1000); @@ -301,21 +370,6 @@ mHandler.removeCallbacks(mUpdateTimeTask); } - // hardware keys - @Override - public boolean onKeyDown(int keyCode, KeyEvent event) { - - switch (keyCode) { - case KeyEvent.KEYCODE_MENU: { - Intent myIntent = new Intent(this, Setup.class); - startActivityForResult(myIntent, 0); - return true; - } - } - - return super.onKeyDown(keyCode, event); - } - private Runnable mUpdateTimeTask = new Runnable() { public void run() { new update().execute(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/AudioPlayer.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/AudioPlayer.java 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/AudioPlayer.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -1,4 +1,4 @@ -package mediaportal.remote.multimedia; + package mediaportal.remote.multimedia; import java.io.IOException; Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/MediaPlayerControl.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/MediaPlayerControl.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/MediaPlayerControl.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -0,0 +1,136 @@ +package mediaportal.remote.multimedia; + +import java.io.IOException; +import mediaportal.remote.R; +import mediaportal.remote.communication.SendCommand; +import mediaportal.remote.utils.AppSettings; +import android.app.Activity; +import android.media.MediaPlayer; +import android.os.Bundle; +import android.view.SurfaceHolder; +import android.view.SurfaceView; +import android.view.View; +import android.widget.Button; +import android.widget.TextView; + +public class MediaPlayerControl extends Activity implements + SurfaceHolder.Callback { + + private Button openButton; + private Button streamButton; + private Button streamStopButton; + + private TextView txtFile; + + private SurfaceView mPreview; + private SurfaceHolder holder; + + private static MediaPlayer mp; + + @Override + public void onCreate(Bundle icicle) { + + super.onCreate(icicle); + + setContentView(R.layout.player); + initControls(); + } + + private void initControls() { + + txtFile = (TextView) findViewById(R.id.txtFile); + txtFile.setText(AppSettings.getLastFile()); + + openButton = (Button) findViewById(R.id.button_open); + streamButton = (Button) findViewById(R.id.button_stream); + streamStopButton = (Button) findViewById(R.id.button_stream_stop); + + mPreview = (SurfaceView) findViewById(R.id.SurfaceView01); + + // Set a size for the video screen + holder = mPreview.getHolder(); + holder.addCallback(this); + holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); + holder.setFixedSize(300, 200); + + openButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + SendCommand.PostStreamFile(txtFile.getText().toString(),"video"); + } + }); + + streamButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + if (mp == null) + mp = new MediaPlayer(); + startStreaming(); + } + }); + + streamStopButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + closePlayer(); + } + }); + + } + + private void startStreaming() { + + try { + mp.setDataSource("rtsp://" + AppSettings.getServer() + + ":5554/android.sdp"); + mp.setDisplay(holder); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalStateException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + try { + mp.prepare(); + } catch (IllegalStateException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + mp.start(); + mp.setScreenOnWhilePlaying(true); + } + + public void surfaceCreated(SurfaceHolder surfaceholder) { + + } + + public void surfaceChanged(SurfaceHolder surfaceholder, int i, int j, int k) { + + } + + public void surfaceDestroyed(SurfaceHolder surfaceholder) { + + } + + @Override + protected void onPause() { + super.onPause(); + + closePlayer(); + + AppSettings.setLastFile(txtFile.getText().toString()); + } + + private void closePlayer() { + if (mp != null) { + if (mp.isPlaying()) + mp.stop(); + mp = null; + + } + } +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/Webradio.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/Webradio.java 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/multimedia/Webradio.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -9,23 +9,24 @@ import android.view.View; import android.widget.Button; -public class Webradio extends Activity{ +public class Webradio extends Activity { - private AudioPlayer player; - + private static AudioPlayer player; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.webradio); - player = new AudioPlayer(); - + if (player == null) + player = new AudioPlayer(); + Button radio01 = (Button) findViewById(R.id.radio01); radio01.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Vibration.vibrateShort(); - - SendCommand.PostStreamFile("webradio_1","audio"); + + SendCommand.PostStreamFile("webradio_1", "audio"); player.StartPlaying(); } }); @@ -33,8 +34,8 @@ radio02.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Vibration.vibrateShort(); - - SendCommand.PostStreamFile("webradio_2","audio"); + + SendCommand.PostStreamFile("webradio_2", "audio"); player.StartPlaying(); } }); @@ -42,8 +43,8 @@ radio03.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Vibration.vibrateShort(); - - SendCommand.PostStreamFile("webradio_3","audio"); + + SendCommand.PostStreamFile("webradio_3", "audio"); player.StartPlaying(); } }); @@ -51,12 +52,12 @@ radio04.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Vibration.vibrateShort(); - - SendCommand.PostStreamFile("webradio_4","audio"); + + SendCommand.PostStreamFile("webradio_4", "audio"); player.StartPlaying(); } }); - + Button radioStop = (Button) findViewById(R.id.radioStop); radioStop.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { @@ -66,7 +67,7 @@ }); } - + @Override public void onResume() { super.onResume(); @@ -79,6 +80,6 @@ super.onPause(); KeyLock.enbleKeylock(); - + } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -400,7 +400,7 @@ AlertDialog.Builder builder = new AlertDialog.Builder( Picturesfullscreen.this); - builder.setTitle("Picture optoins"); + builder.setTitle("Picture options"); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { switch (item) { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -25,23 +25,28 @@ import mediaportal.remote.utils.AppSettings; import mediaportal.remote.utils.Vibration; import android.app.Activity; +import android.content.Intent; import android.os.Bundle; +import android.view.View; import android.widget.ArrayAdapter; +import android.widget.Button; import android.widget.CheckBox; -import android.widget.EditText; import android.widget.CompoundButton; import android.widget.Spinner; public class Setup extends Activity { + private Spinner powerMode; + private CheckBox vibrate; + /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.setup); - CheckBox chk = (CheckBox) findViewById(R.id.vibration); - chk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + vibrate = (CheckBox) findViewById(R.id.vibration); + vibrate.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked) { @@ -50,48 +55,39 @@ } }); - Spinner spinner = (Spinner) findViewById(R.id.Spinner01); + powerMode = (Spinner) findViewById(R.id.Spinner01); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( this, R.array.shutdown, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); - spinner.setAdapter(adapter); + powerMode.setAdapter(adapter); + + Button settings = (Button) findViewById(R.id.btnIpSettings); + settings.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + Intent myIntent = new Intent(view.getContext(), + Setup_ip.class); + startActivity(myIntent); + } + }); + } @Override public void onResume() { super.onResume(); - EditText txt1 = (EditText) findViewById(R.id.server_ip); - EditText txt2 = (EditText) findViewById(R.id.server_port); - EditText txt3 = (EditText) findViewById(R.id.server_macid); - CheckBox chk = (CheckBox) findViewById(R.id.vibration); - Spinner spinner = (Spinner) findViewById(R.id.Spinner01); - - txt1.setText(AppSettings.getServer()); - txt2.setText(AppSettings.getPort()); - txt3.setText(AppSettings.getMacId()); - - chk.setChecked(AppSettings.getVibrate()); - spinner.setSelection(AppSettings.getPowerMode()); + vibrate.setChecked(AppSettings.getVibrate()); + powerMode.setSelection(AppSettings.getPowerMode()); } @Override public void onPause() { super.onPause(); - - EditText txt1 = (EditText) findViewById(R.id.server_ip); - EditText txt2 = (EditText) findViewById(R.id.server_port); - EditText txt3 = (EditText) findViewById(R.id.server_macid); - CheckBox chk = (CheckBox) findViewById(R.id.vibration); - Spinner spinner = (Spinner) findViewById(R.id.Spinner01); - - AppSettings.setServer(txt1.getText().toString()); - AppSettings.setPort(txt2.getText().toString()); - AppSettings.setMacId(txt3.getText().toString()); - - AppSettings.setVibrate(chk.isChecked()); - AppSettings.setPowerMode(spinner.getSelectedItemPosition()); + + AppSettings.setVibrate(vibrate.isChecked()); + AppSettings.setPowerMode(powerMode.getSelectedItemPosition()); } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-01-17 14:33:48 UTC (rev 4071) @@ -34,54 +34,281 @@ prefEditor = settings.edit(); } + // get + + public static int getInstance() + { + return settings.getInt("Instance", 1); + } + public static String getServer() { - return settings.getString("Server", "192.168.0.30"); + switch(getInstance()) + { + case 1: + return getServer1(); + case 2: + return getServer2(); + case 3: + return getServer3(); + } + return ""; } public static String getPort() { - return settings.getString("Port", "8200"); + switch(getInstance()) + { + case 1: + return getPort1(); + case 2: + return getPort2(); + case 3: + return getPort3(); + } + return ""; } public static String getMacId() { - return settings.getString("MacId", "11-22-33-44-55-66"); + switch(getInstance()) + { + case 1: + return getMacId1(); + case 2: + return getMacId2(); + case 3: + return getMacId3(); + } + return ""; } - public static boolean getVibrate() + public static String getName() { - return settings.getBoolean("Vibrate", true); + switch(getInstance()) + { + case 1: + return getName1(); + case 2: + return getName2(); + case 3: + return getName3(); + } + return ""; + } + + private static String getServer1() + { + return settings.getString("Server1", "192.168.0.30"); } - public static int getPowerMode() + private static String getPort1() { - return settings.getInt("PowerMode", 0); + return settings.getString("Port1", "8200"); } + private static String getMacId1() + { + return settings.getString("MacId1", "11-22-33-44-55-66"); + } + private static String getName1() + { + return settings.getString("Name1", "HTPC 1"); + } + private static String getServer2() + { + return settings.getString("Server2", "192.168.0.31"); + } + private static String getPort2() + { + return settings.getString("Port2", "8200"); + } + private static String getMacId2() + { + return settings.getString("MacId2", "11-22-33-44-55-66"); + } + private static String getName2() + { + return settings.getString("Name2", "HTPC 2"); + } + + private static String getServer3() + { + return settings.getString("Server3", "192.168.0.32"); + } + private static String getPort3() + { + return settings.getString("Port3", "8200"); + } + private static String getMacId3() + { + return settings.getString("MacId3", "11-22-33-44-55-66"); + } + private static String getName3() + { + return settings.getString("Name3", "HTPC 3"); + } + + public static CharSequence[] getNames() + { + CharSequence[] ret = new CharSequence[4]; + ret[0] = getName1(); + ret[1] = getName2(); + ret[2] = getName3(); + ret[3] = "Cancel"; + + return ret; + } + public static String getWebServer() { return "http://" + AppSettings.getServer() + ":" + AppSettings.getPort(); } + public static boolean getVibrate() + { + return settings.getBoolean("Vibrate", true); + } + public static int getPowerMode() + { + return settings.getInt("PowerMode", 0); + } + public static String getLastFile() { return settings.getString("LastFile", "c:\\test.mp4"); } - public static void setServer(String Server) + // set + + public static void setInstance(int Instance) { - prefEditor.putString("Server", Server); + prefEditor.putInt("Instance", Instance); prefEditor.commit(); } + + public static void setServer(String Server) + { + switch(getInstance()) + { + case 1: + setServer1(Server); + break; + case 2: + setServer2(Server); + break; + case 3: + setServer3(Server); + break; + } + } public static void setPort(String Port) { - prefEditor.putString("Port", Port); - prefEditor.commit(); + switch(getInstance()) + { + case 1: + setPort1(Port); + break; + case 2: + setPort2(Port); + break; + case 3: + setPort3(Port); + break; + } } public static void setMacId(String MacId) { - prefEditor.putString("MacId", MacId); + switch(getInstance()) + { + case 1: + setMacId1(MacId); + break; + case 2: + setMacId2(MacId); + break; + case 3: + setMacId3(MacId); + break; + } + } + public static void setName(String Name) + { + switch(getInstance()) + { + case 1: + setName1(Name); + break; + case 2: + setName2(Name); + break; + case 3: + setName3(Name); + break; + } + } + + private static void setServer1(String Server) + { + prefEditor.putString("Server1", Server); prefEditor.commit(); + } + private static void setPort1(String Port) + { + prefEditor.putString("Port1", Port); + prefEditor.commit(); + } + private static void setMacId1(String MacId) + { + prefEditor.putString("MacId1", MacId); + prefEditor.commit(); } - public static void setVibrate(boolean Vibration) + private static void setName1(String Name) { + prefEditor.putString("Name1", Name); + prefEditor.commit(); + } + + private static void setServer2(String Server) + { + prefEditor.putString("Server2", Server); + prefEditor.commit(); + } + private static void setPort2(String Port) + { + prefEditor.putString("Port2", Port); + prefEditor.commit(); + } + private static void setMacId2(String MacId) + { + prefEditor.putString("MacId2", MacId); + prefEditor.commit(); + } + private static void setName2(String Name) + { + prefEditor.putString("Name2", Name); + prefEditor.commit(); + } + + private static void setServer3(String Server) + { + prefEditor.putString("Server3", Server); + prefEditor.commit(); + } + private static void setPort3(String Port) + { + prefEditor.putString("Port3", Port); + prefEditor.commit(); + } + private static void setMacId3(String MacId) + { + prefEditor.putString("MacId3", MacId); + prefEditor.commit(); + } + private static void setName3(String Name) + { + prefEditor.putString("Name3", Name); + prefEditor.commit(); + } + + public static void setVibrate(boolean Vibration) + { prefEditor.putBoolean("Vibrate", Vibration); prefEditor.commit(); } Added: trunk/plugins/AndroidRemote/Release/icons.zip =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/icons.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-13 21:02:08 UTC (rev 4070) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-17 14:33:48 UTC (rev 4071) @@ -48,6 +48,9 @@ [DllImport("USER32.DLL")] public static extern bool SetForegroundWindow(IntPtr hWnd); + private delegate void DoActionHandler(Action action); + private delegate void DoFullscreenHandler(); + private delegate void StartPlaylistPlayer(); private static Dictionary<string, string> directoryList = new Dictionary<string, string>(); @@ -84,7 +87,8 @@ if (g_Player.Playing) { Action action = new Action(Action.ActionType.ACTION_PAUSE, 0, 0); - GUIGraphicsContext.OnAction(action); + DoActionHandler del = new DoActionHandler(DoAction); + GUIGraphicsContext.form.Invoke(del, action); } else { @@ -95,32 +99,38 @@ if (data["command"] == ("ACTION_STOP")) { Action action = new Action(Action.ActionType.ACTION_STOP, 0, 0); - GUIGraphicsContext.OnAction(action); + DoActionHandler del = new DoActionHandler(DoAction); + GUIGraphicsContext.form.Invoke(del, action); } if (data["command"] == ("ACTION_PAUSE")) { Action action = new Action(Action.ActionType.ACTION_PAUSE, 0, 0); - GUIGraphicsContext.OnAction(action); + DoActionHandler del = new DoActionHandler(DoAction); + GUIGraphicsContext.form.Invoke(del, action); } if (data["command"] == ("ACTION_NEXT_ITEM")) { Action action = new Action(Action.ActionType.ACTION_NEXT_ITEM, 0, 0); - GUIGraphicsContext.OnAction(action); + DoActionHandler del = new DoActionHandler(DoAction); + GUIGraphicsContext.form.Invoke(del, action); } if (data["command"] == ("ACTION_PREV_ITEM")) { Action action = new Action(Action.ActionType.ACTION_PREV_ITEM, 0, 0); - GUIGraphicsContext.OnAction(action); + DoActionHandler del = new DoActionHandler(DoAction); + GUIGraphicsContext.form.Invoke(del, action); } if (data["command"] == ("ACTION_FORWARD")) { Action action = new Action(Action.ActionType.ACTION_FORWARD, 0, 0); - G... [truncated message content] |
From: <kro...@us...> - 2011-01-17 21:09:41
|
Revision: 4072 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4072&view=rev Author: kroko_koenig Date: 2011-01-17 21:09:34 +0000 (Mon, 17 Jan 2011) Log Message: ----------- some tweaks still slow on pictures (100% cpu on slow system) Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/PictureHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-17 14:33:48 UTC (rev 4071) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-17 21:09:34 UTC (rev 4072) @@ -247,6 +247,8 @@ } TextView txtHtpc = (TextView) findViewById(R.id.txtInstance); txtHtpc.setText(AppSettings.getName()); + + Pictures.actualDir = ""; } }); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-17 14:33:48 UTC (rev 4071) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-17 21:09:34 UTC (rev 4072) @@ -56,8 +56,10 @@ public static ArrayList<ReceiveDirectoryXmlHandler.DirItems> pictureList; public static int selectedPicture; + private static int picNo; - final CharSequence[] itemsLong = { "Slideshow", "Random Slideshow", "Cancel" }; + final CharSequence[] itemsLong = { "Slideshow", "Random Slideshow", + "Cancel" }; @Override public void onCreate(Bundle savedInstanceState) { @@ -141,7 +143,7 @@ } Log.d("MediaPortal", "pictures read folder finished"); - + if (pictureList == null) { Toast.makeText(Pictures.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); @@ -152,11 +154,60 @@ } else { GridView gridview = (GridView) findViewById(R.id.GridView01); gridview.setAdapter(new ImageAdapter2(Pictures.this)); + + picNo = 0; + mFetchTask.run(); } } } } + private Runnable mFetchTask = new Runnable() { + public void run() { + new fetchPictures().execute(); + } + }; + + private class fetchPictures extends AsyncTask<String, Void, Void> { + + // can use UI thread here + protected void onPreExecute() { + + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + + HttpHandler http = new HttpHandler(); + String server = AppSettings.getWebServer() + "/pictures/"; + + while(picNo < pictureList.size()) { + + DirItems item = pictureList.get(picNo); + if (!item.isFolder) { + if (item.Picture == null) { + String file = server + actualDir + item.File + ".thb"; + item.Picture = http.DownloadImage(file); + pictureList.set(picNo, item); + break; + } + } + picNo++; + } + return null; + } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + + GridView gridview = (GridView) findViewById(R.id.GridView01); + gridview.setAdapter(new ImageAdapter2(Pictures.this)); + + if (picNo < pictureList.size()) + mFetchTask.run(); + } + } + public class ImageAdapter2 extends BaseAdapter { private Context mContext; public static final int ACTIVITY_CREATE = 10; @@ -214,17 +265,20 @@ iv.setTag(pic); } else { - HttpHandler http = new HttpHandler(); + /* + * HttpHandler http = new HttpHandler(); + * + * String file = AppSettings.getWebServer() + "/pictures/"; + * file += actualDir + item.File + ".thb"; item.Picture = + * http.DownloadImage(file); + * iv.setImageBitmap(item.Picture); + */ - String file = AppSettings.getWebServer() + "/pictures/"; - file += actualDir + item.File + ".thb"; - item.Picture = http.DownloadImage(file); - iv.setImageBitmap(item.Picture); - if (item.Picture == null) iv.setImageResource(R.drawable.picture); - // else - // iv.setImageBitmap(item.Picture); + else + iv.setImageBitmap(item.Picture); + picItem pic = new picItem(); pic.title = txtName; pic.typ = "item"; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java 2011-01-17 14:33:48 UTC (rev 4071) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java 2011-01-17 21:09:34 UTC (rev 4072) @@ -69,7 +69,8 @@ public static boolean SlideshowPaused = false; private static long SlideInterval = 5000; - private Bitmap picture; + private static Bitmap picture; + private static String title; /** Called when the activity is first created. */ @Override @@ -77,12 +78,22 @@ super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.picturesfullscreen); gestureScanner = new GestureDetector(Picturesfullscreen.this); - new setPicture().execute(); + + if (savedInstanceState == null) + new setPicture().execute(); + else + { + ImageView imagev = (ImageView) findViewById(R.id.ImageView01); + imagev.setImageBitmap(picture); + TextView txt = (TextView) findViewById(R.id.full_text); + txt.setText(title); + } } private class setPicture extends AsyncTask<String, Void, Void> { @@ -116,7 +127,10 @@ // can use UI thread here protected void onPostExecute(final Void unused) { if (this.dialog.isShowing()) { - this.dialog.dismiss(); + try { + this.dialog.dismiss(); + } catch (Exception ex) { + } } if (item.isFolder != true) { @@ -126,9 +140,15 @@ TextView txt = (TextView) findViewById(R.id.full_text); if (!slideShow) + { txt.setText(item.File); + title = item.File; + } else + { txt.setText("Slide show"); + title = "Slide show"; + } } } } @@ -147,7 +167,7 @@ // // keep screen on in slideshow // - + if ((slideShow) || (randomShow)) { PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); PowerManager.WakeLock wl = pm.newWakeLock( @@ -293,8 +313,8 @@ try { outStream.close(); - //Toast.makeText(Picturesfullscreen.this, "File saved.", - // Toast.LENGTH_SHORT).show(); + // Toast.makeText(Picturesfullscreen.this, "File saved.", + // Toast.LENGTH_SHORT).show(); } catch (IOException e) { e.printStackTrace(); Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-17 14:33:48 UTC (rev 4071) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-17 21:09:34 UTC (rev 4072) @@ -49,6 +49,7 @@ private Thread listen; private Thread grabPictures; + private Thread cacheDB; public static VideoLan.VlcControl vlc; @@ -69,9 +70,14 @@ grabPictures.Start(); logInfo("Caching music DB"); - Content.MusicHandler.CacheDB(); + cacheDB = new Thread(Content.MusicHandler.CacheDB); + cacheDB.IsBackground = true; + cacheDB.Priority = ThreadPriority.Lowest; + cacheDB.Start(); } + + public void Stop() { logInfo("Stop server"); @@ -121,9 +127,10 @@ // work on request Request req = new Request(clientSocket); + Thread thread = new Thread(new ThreadStart(req.DoWork)); thread.IsBackground = true; - thread.Priority = ThreadPriority.Normal; + thread.Priority = ThreadPriority.BelowNormal; thread.Start(); } catch (Exception ex) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs 2011-01-17 14:33:48 UTC (rev 4071) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs 2011-01-17 21:09:34 UTC (rev 4072) @@ -50,6 +50,7 @@ MediaPortal.Music.Database.MusicDatabase db = MediaPortal.Music.Database.MusicDatabase.Instance; string msg = string.Empty; + int cnt = 0; #region artist @@ -64,11 +65,16 @@ ArrayList list = new ArrayList(); db.GetAllArtists(ref list); + AndroidServer.logInfo("Caching music artist found :" + list.Count); + cnt = 0; foreach (string artist in list) { if (artist != string.Empty) { + cnt++; + if (cnt > 1000) break; + msg += "<Item>\r\n"; msg += "<Artist>" + SomeUtils.EncodeString(artist) + "</Artist>\r\n"; msg += "</Item>\r\n"; @@ -78,6 +84,8 @@ replyAllArtist = msg; #endregion + AndroidServer.logInfo("Caching music artist finished"); + #region album msg = string.Empty; @@ -92,6 +100,7 @@ List<MediaPortal.Music.Database.AlbumInfo> list1 = new List<MediaPortal.Music.Database.AlbumInfo>(); db.GetAllAlbums(ref list1); + AndroidServer.logInfo("Caching music albums found :" + list1.Count); foreach (MediaPortal.Music.Database.AlbumInfo album in list1) { @@ -99,9 +108,14 @@ } list1.Sort(new AlbumComparer()); + AndroidServer.logInfo("Caching music album sorted"); + cnt = 0; foreach (MediaPortal.Music.Database.AlbumInfo album in list1) { + cnt++; + if (cnt > 1000) break; + string name = album.Album.Replace("|", "").Trim(); if (name != string.Empty) { @@ -121,6 +135,8 @@ #endregion + AndroidServer.logInfo("Caching music album finished"); + #region songs msg = string.Empty; @@ -137,11 +153,18 @@ List<MediaPortal.Music.Database.Song> list2 = new List<MediaPortal.Music.Database.Song>(); db.GetSongsByArtist("%", ref list2); + AndroidServer.logInfo("Caching music songs found :" + list2.Count) ; list2.Sort(new SongComparer()); + AndroidServer.logInfo("Caching music songs sorted"); + + cnt = 0; foreach (MediaPortal.Music.Database.Song song in list2) { + cnt++; + if (cnt > 1000) break; + msg += "<Item>\r\n"; msg += "<ID>" + HttpUtility.HtmlEncode(song.Id.ToString()) + "</ID>\r\n"; @@ -160,6 +183,9 @@ replyAllSong = msg; #endregion + + AndroidServer.logInfo("Caching music songs finished"); + } public static void ReplyMusicDir(Socket Socket, string Request) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/PictureHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/PictureHandler.cs 2011-01-17 14:33:48 UTC (rev 4071) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/PictureHandler.cs 2011-01-17 21:09:34 UTC (rev 4072) @@ -154,10 +154,10 @@ Bitmap bit = (Bitmap)Bitmap.FromFile(dir); byte[] b; - if ((bit.Width > 1600) || (bit.Height > 1600)) + if ((bit.Width > 600) || (bit.Height > 600)) { Bitmap thumb = (Bitmap)bit.Clone(); - thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 1600, 1600, false, true); + thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 600, 600, false, true); b = SomeUtils.ImageToByteArray((Image)thumb); } @@ -277,10 +277,10 @@ Bitmap bit = (Bitmap)Bitmap.FromFile(PictureHandler.AllPicturesList[x]); byte[] b; - if ((bit.Width > 1600) || (bit.Height > 1600)) + if ((bit.Width > 600) || (bit.Height > 600)) { Bitmap thumb = (Bitmap)bit.Clone(); - thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 1600, 1600, false, true); + thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 600, 600, false, true); b = SomeUtils.ImageToByteArray((Image)thumb); } @@ -307,12 +307,12 @@ } else { - handler.SendServerError(sock,PictureHandler.AllPicturesList[x], "ReplyRandomPictureFile"); + handler.SendServerError(sock, PictureHandler.AllPicturesList[x], "ReplyRandomPictureFile"); } } else { - handler.SendErrorFile(sock,"ReplyRandomPictureFile"); + handler.SendErrorFile(sock, "ReplyRandomPictureFile"); } } @@ -478,10 +478,10 @@ Bitmap bit = (Bitmap)Bitmap.FromFile(filePath); byte[] b; - if ((bit.Width > 1600) || (bit.Height > 1600)) + if ((bit.Width > 600) || (bit.Height > 600)) { Bitmap thumb = (Bitmap)bit.Clone(); - thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 1600, 1600, false, true); + thumb = MediaPortal.Util.BitmapResize.Resize(ref thumb, 600, 600, false, true); b = SomeUtils.ImageToByteArray((Image)thumb); } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-20 21:59:50
|
Revision: 4073 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4073&view=rev Author: kroko_koenig Date: 2011-01-20 21:59:40 +0000 (Thu, 20 Jan 2011) Log Message: ----------- pictures sometimes crashes (threading) Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/pictures.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/ReceiveDbXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_asr.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_full.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_menu.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_osd.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_sub.png Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-20 21:59:40 UTC (rev 4073) @@ -52,67 +52,74 @@ public static final int menu=0x7f020023; public static final int music=0x7f020024; public static final int mute=0x7f020025; - public static final int now_playing=0x7f020026; - public static final int pause=0x7f020027; - public static final int picture=0x7f020028; - public static final int pictures=0x7f020029; - public static final int play=0x7f02002a; - public static final int power_off=0x7f02002b; - public static final int remote=0x7f02002c; - public static final int restart=0x7f02002d; - public static final int rewind=0x7f02002e; - public static final int right=0x7f02002f; - public static final int sel_play=0x7f020030; - public static final int sel_skp_back=0x7f020031; - public static final int sel_skp_forw=0x7f020032; - public static final int select=0x7f020033; - public static final int select2=0x7f020034; - public static final int settings=0x7f020035; - public static final int skip_back=0x7f020036; - public static final int skip_forward=0x7f020037; - public static final int song=0x7f020038; - public static final int song_off=0x7f020039; - public static final int splash=0x7f02003a; - public static final int splash02=0x7f02003b; - public static final int stop=0x7f02003c; - public static final int suspend=0x7f02003d; - public static final int up=0x7f02003e; - public static final int video=0x7f02003f; - public static final int volume_m=0x7f020040; - public static final int volume_p=0x7f020041; - public static final int wake_on_lan=0x7f020042; + public static final int n_asr=0x7f020026; + public static final int n_full=0x7f020027; + public static final int n_menu=0x7f020028; + public static final int n_osd=0x7f020029; + public static final int n_sub=0x7f02002a; + public static final int now_playing=0x7f02002b; + public static final int pause=0x7f02002c; + public static final int picture=0x7f02002d; + public static final int pictures=0x7f02002e; + public static final int play=0x7f02002f; + public static final int power_off=0x7f020030; + public static final int remote=0x7f020031; + public static final int restart=0x7f020032; + public static final int rewind=0x7f020033; + public static final int right=0x7f020034; + public static final int sel_play=0x7f020035; + public static final int sel_skp_back=0x7f020036; + public static final int sel_skp_forw=0x7f020037; + public static final int select=0x7f020038; + public static final int select2=0x7f020039; + public static final int settings=0x7f02003a; + public static final int skip_back=0x7f02003b; + public static final int skip_forward=0x7f02003c; + public static final int song=0x7f02003d; + public static final int song_off=0x7f02003e; + public static final int splash=0x7f02003f; + public static final int splash02=0x7f020040; + public static final int stop=0x7f020041; + public static final int suspend=0x7f020042; + public static final int up=0x7f020043; + public static final int video=0x7f020044; + public static final int volume_m=0x7f020045; + public static final int volume_p=0x7f020046; + public static final int wake_on_lan=0x7f020047; } public static final class id { - public static final int GridView01=0x7f070018; - public static final int ImageView01=0x7f07001a; - public static final int LinearLayout00=0x7f070059; - public static final int LinearLayout01=0x7f070021; - public static final int LinearLayout02=0x7f070064; - public static final int LinearLayout03=0x7f07006e; - public static final int LinearLayout04=0x7f070078; - public static final int LinearLayout05=0x7f07007e; - public static final int ListView01=0x7f07002f; - public static final int Spinner01=0x7f070089; - public static final int SurfaceView01=0x7f070020; + public static final int GridView01=0x7f07001b; + public static final int ImageView01=0x7f07001d; + public static final int LinearLayout00=0x7f07005c; + public static final int LinearLayout01=0x7f070024; + public static final int LinearLayout02=0x7f070067; + public static final int LinearLayout03=0x7f070071; + public static final int LinearLayout04=0x7f07007b; + public static final int LinearLayout05=0x7f070081; + public static final int ListView01=0x7f070032; + public static final int Spinner01=0x7f07008c; + public static final int SurfaceView01=0x7f070023; public static final int TableLayout01=0x7f070005; - public static final int TableLayout02=0x7f07003e; + public static final int TableLayout02=0x7f070041; public static final int TableRow01=0x7f070007; - public static final int TableRow02=0x7f070043; - public static final int TableRow03=0x7f070048; + public static final int TableRow02=0x7f070046; + public static final int TableRow03=0x7f07004b; public static final int TextView01=0x7f070003; public static final int TextView02=0x7f070004; - public static final int btnChannelDown=0x7f070052; - public static final int btnChannelUp=0x7f07004f; - public static final int btnExit=0x7f070053; - public static final int btnHibernate=0x7f070055; - public static final int btnIpSettings=0x7f07008b; - public static final int btnRestart=0x7f070056; - public static final int btnShutOff=0x7f070057; - public static final int btnSuspend=0x7f070054; - public static final int btnVolumeDown=0x7f070051; - public static final int btnVolumeMute=0x7f070050; - public static final int btnVolumeUp=0x7f07004e; - public static final int btnWakeOnLan=0x7f070058; + public static final int btnChannelDown=0x7f070055; + public static final int btnChannelUp=0x7f070052; + public static final int btnExit=0x7f070056; + public static final int btnHibernate=0x7f070058; + public static final int btnIpSettings=0x7f07008e; + public static final int btnRestart=0x7f070059; + public static final int btnSelDown=0x7f070018; + public static final int btnSelUp=0x7f070019; + public static final int btnShutOff=0x7f07005a; + public static final int btnSuspend=0x7f070057; + public static final int btnVolumeDown=0x7f070054; + public static final int btnVolumeMute=0x7f070053; + public static final int btnVolumeUp=0x7f070051; + public static final int btnWakeOnLan=0x7f07005b; public static final int btn_main_music=0x7f070009; public static final int btn_main_now_playing=0x7f07000c; public static final int btn_main_pictures=0x7f070008; @@ -122,77 +129,77 @@ public static final int btn_main_skp_back=0x7f07000f; public static final int btn_main_skp_forw=0x7f070011; public static final int btn_main_video=0x7f07000a; - public static final int btnkey01=0x7f07005a; - public static final int btnkey02=0x7f07005b; - public static final int btnkey03=0x7f07005c; - public static final int btnkey04=0x7f07005d; - public static final int btnkey05=0x7f07005e; - public static final int btnkey06=0x7f07005f; - public static final int btnkey07=0x7f070060; - public static final int btnkey08=0x7f070061; - public static final int btnkey09=0x7f070062; - public static final int btnkey10=0x7f070063; - public static final int btnkey11=0x7f070065; - public static final int btnkey12=0x7f070066; - public static final int btnkey13=0x7f070067; - public static final int btnkey14=0x7f070068; - public static final int btnkey15=0x7f070069; - public static final int btnkey16=0x7f07006a; - public static final int btnkey17=0x7f07006b; - public static final int btnkey18=0x7f07006c; - public static final int btnkey19=0x7f07006d; - public static final int btnkey20=0x7f07006f; - public static final int btnkey21=0x7f070070; - public static final int btnkey22=0x7f070071; - public static final int btnkey23=0x7f070072; - public static final int btnkey24=0x7f070073; - public static final int btnkey25=0x7f070074; - public static final int btnkey26=0x7f070075; - public static final int btnkey27=0x7f070076; - public static final int btnkey28=0x7f070077; - public static final int btnkey29=0x7f070079; - public static final int btnkey30=0x7f07007a; - public static final int btnkey31=0x7f07007b; - public static final int btnkey32=0x7f07007c; - public static final int btnkey33=0x7f07007d; - public static final int btnkey41=0x7f07007f; - public static final int btnkey42=0x7f070080; - public static final int btnkey43=0x7f070081; - public static final int btnkey44=0x7f070082; - public static final int btnkey45=0x7f070083; - public static final int btnkey46=0x7f070084; - public static final int btnkey47=0x7f070085; - public static final int btnkey48=0x7f070086; - public static final int btnkey49=0x7f070087; - public static final int btnkey50=0x7f070088; - public static final int button_open=0x7f07001d; - public static final int button_stream=0x7f07001e; - public static final int button_stream_stop=0x7f07001f; - public static final int clearplaylist=0x7f070098; - public static final int crtl_back=0x7f07003b; - public static final int crtl_ch_m=0x7f070047; - public static final int crtl_ch_p=0x7f070042; - public static final int crtl_down=0x7f07003a; - public static final int crtl_full=0x7f070044; - public static final int crtl_info=0x7f07004c; - public static final int crtl_left=0x7f070035; - public static final int crtl_menu=0x7f070046; - public static final int crtl_mp=0x7f070031; - public static final int crtl_osd=0x7f07004b; - public static final int crtl_parent=0x7f070039; - public static final int crtl_play=0x7f070045; - public static final int crtl_power=0x7f070033; - public static final int crtl_ratio=0x7f07004a; - public static final int crtl_right=0x7f070037; - public static final int crtl_select=0x7f070036; - public static final int crtl_skip_back=0x7f07003f; - public static final int crtl_skip_forw=0x7f070041; - public static final int crtl_stop=0x7f070040; - public static final int crtl_sub=0x7f070049; - public static final int crtl_up=0x7f070032; - public static final int crtl_vol_m=0x7f07003d; - public static final int crtl_vol_p=0x7f07003c; - public static final int full_text=0x7f070019; + public static final int btnkey01=0x7f07005d; + public static final int btnkey02=0x7f07005e; + public static final int btnkey03=0x7f07005f; + public static final int btnkey04=0x7f070060; + public static final int btnkey05=0x7f070061; + public static final int btnkey06=0x7f070062; + public static final int btnkey07=0x7f070063; + public static final int btnkey08=0x7f070064; + public static final int btnkey09=0x7f070065; + public static final int btnkey10=0x7f070066; + public static final int btnkey11=0x7f070068; + public static final int btnkey12=0x7f070069; + public static final int btnkey13=0x7f07006a; + public static final int btnkey14=0x7f07006b; + public static final int btnkey15=0x7f07006c; + public static final int btnkey16=0x7f07006d; + public static final int btnkey17=0x7f07006e; + public static final int btnkey18=0x7f07006f; + public static final int btnkey19=0x7f070070; + public static final int btnkey20=0x7f070072; + public static final int btnkey21=0x7f070073; + public static final int btnkey22=0x7f070074; + public static final int btnkey23=0x7f070075; + public static final int btnkey24=0x7f070076; + public static final int btnkey25=0x7f070077; + public static final int btnkey26=0x7f070078; + public static final int btnkey27=0x7f070079; + public static final int btnkey28=0x7f07007a; + public static final int btnkey29=0x7f07007c; + public static final int btnkey30=0x7f07007d; + public static final int btnkey31=0x7f07007e; + public static final int btnkey32=0x7f07007f; + public static final int btnkey33=0x7f070080; + public static final int btnkey41=0x7f070082; + public static final int btnkey42=0x7f070083; + public static final int btnkey43=0x7f070084; + public static final int btnkey44=0x7f070085; + public static final int btnkey45=0x7f070086; + public static final int btnkey46=0x7f070087; + public static final int btnkey47=0x7f070088; + public static final int btnkey48=0x7f070089; + public static final int btnkey49=0x7f07008a; + public static final int btnkey50=0x7f07008b; + public static final int button_open=0x7f070020; + public static final int button_stream=0x7f070021; + public static final int button_stream_stop=0x7f070022; + public static final int clearplaylist=0x7f07009b; + public static final int crtl_back=0x7f07003e; + public static final int crtl_ch_m=0x7f07004a; + public static final int crtl_ch_p=0x7f070045; + public static final int crtl_down=0x7f07003d; + public static final int crtl_full=0x7f070047; + public static final int crtl_info=0x7f07004f; + public static final int crtl_left=0x7f070038; + public static final int crtl_menu=0x7f070049; + public static final int crtl_mp=0x7f070034; + public static final int crtl_osd=0x7f07004e; + public static final int crtl_parent=0x7f07003c; + public static final int crtl_play=0x7f070048; + public static final int crtl_power=0x7f070036; + public static final int crtl_ratio=0x7f07004d; + public static final int crtl_right=0x7f07003a; + public static final int crtl_select=0x7f070039; + public static final int crtl_skip_back=0x7f070042; + public static final int crtl_skip_forw=0x7f070044; + public static final int crtl_stop=0x7f070043; + public static final int crtl_sub=0x7f07004c; + public static final int crtl_up=0x7f070035; + public static final int crtl_vol_m=0x7f070040; + public static final int crtl_vol_p=0x7f07003f; + public static final int full_text=0x7f07001c; public static final int icon_image=0x7f070001; public static final int icon_text=0x7f070002; public static final int list_album=0x7f070014; @@ -201,46 +208,47 @@ public static final int list_song=0x7f070017; public static final int main_now_playing=0x7f07000e; public static final int music_grid=0x7f070013; - public static final int naviRemote_text=0x7f07004d; - public static final int now_album=0x7f070023; - public static final int now_artist=0x7f070029; - public static final int now_cd=0x7f070024; - public static final int now_list=0x7f07002e; - public static final int now_next=0x7f07002d; - public static final int now_play=0x7f07002c; - public static final int now_playing=0x7f070022; - public static final int now_playing_right=0x7f070027; - public static final int now_playing_t_left=0x7f070026; - public static final int now_prev=0x7f07002a; - public static final int now_progress=0x7f070025; - public static final int now_stop=0x7f07002b; - public static final int now_title=0x7f070028; - public static final int open=0x7f07009b; - public static final int playlist=0x7f070097; - public static final int radio01=0x7f070092; - public static final int radio02=0x7f070093; - public static final int radio03=0x7f070094; - public static final int radio04=0x7f070095; - public static final int radioStop=0x7f070096; - public static final int rslide=0x7f07009e; - public static final int save=0x7f07009a; - public static final int sdcard=0x7f070099; - public static final int send=0x7f07009c; - public static final int server_ip=0x7f07008c; - public static final int server_macid=0x7f07008e; - public static final int server_name=0x7f070090; - public static final int server_port=0x7f07008d; - public static final int slide=0x7f07009d; - public static final int text_kb_streamed=0x7f07001b; - public static final int title=0x7f070091; - public static final int txtFile=0x7f07001c; + public static final int naviRemote_text=0x7f070050; + public static final int now_album=0x7f070026; + public static final int now_artist=0x7f07002c; + public static final int now_cd=0x7f070027; + public static final int now_list=0x7f070031; + public static final int now_next=0x7f070030; + public static final int now_play=0x7f07002f; + public static final int now_playing=0x7f070025; + public static final int now_playing_right=0x7f07002a; + public static final int now_playing_t_left=0x7f070029; + public static final int now_prev=0x7f07002d; + public static final int now_progress=0x7f070028; + public static final int now_stop=0x7f07002e; + public static final int now_title=0x7f07002b; + public static final int open=0x7f07009e; + public static final int playlist=0x7f07009a; + public static final int radio01=0x7f070095; + public static final int radio02=0x7f070096; + public static final int radio03=0x7f070097; + public static final int radio04=0x7f070098; + public static final int radioStop=0x7f070099; + public static final int rslide=0x7f0700a1; + public static final int save=0x7f07009d; + public static final int sdcard=0x7f07009c; + public static final int send=0x7f07009f; + public static final int server_ip=0x7f07008f; + public static final int server_macid=0x7f070091; + public static final int server_name=0x7f070093; + public static final int server_port=0x7f070090; + public static final int slide=0x7f0700a0; + public static final int text_kb_streamed=0x7f07001e; + public static final int title=0x7f070094; + public static final int txtDirectory=0x7f07001a; + public static final int txtFile=0x7f07001f; public static final int txtInstance=0x7f070006; - public static final int txtIntanceName=0x7f07008f; - public static final int vibration=0x7f07008a; + public static final int txtIntanceName=0x7f070092; + public static final int vibration=0x7f07008d; public static final int widget0=0x7f070012; - public static final int widget00=0x7f070030; - public static final int widget01=0x7f070034; - public static final int widget02=0x7f070038; + public static final int widget00=0x7f070033; + public static final int widget01=0x7f070037; + public static final int widget02=0x7f07003b; public static final int widget44=0x7f070000; } public static final class layout { Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_asr.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_asr.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_full.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_full.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_menu.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_menu.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_osd.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_osd.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_sub.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_sub.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml 2011-01-20 21:59:40 UTC (rev 4073) @@ -4,6 +4,22 @@ android:layout_height="fill_parent"> <ListView android:id="@+id/list_song" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:fastScrollEnabled="true"> + android:layout_width="fill_parent" android:fastScrollEnabled="true" android:layout_weight="1"> </ListView> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="wrap_content" + android:orientation="horizontal" android:layout_gravity="center_horizontal" android:layout_width="wrap_content"> + + <Button android:background="@drawable/down" android:id="@+id/btnSelDown" android:layout_height="60dip" android:layout_width="60dip"> + </Button> + + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="1000/4000 items" android:textColor="#FFFFFFFF" + android:id="@+id/txtInstance" android:textSize="18dip" android:layout_marginLeft="10dip" android:layout_marginRight="10dip"> + </TextView> + + <Button android:background="@drawable/up" android:id="@+id/btnSelUp" android:layout_height="60dip" android:layout_width="60dip"> + </Button> + </LinearLayout> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/pictures.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/pictures.xml 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/pictures.xml 2011-01-20 21:59:40 UTC (rev 4073) @@ -1,6 +1,13 @@ -<AbsoluteLayout android:id="@+id/widget0" +<LinearLayout android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="wrap_content" - xmlns:android="http://schemas.android.com/apk/res/android"> + xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"> + + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="Actual: ..." android:textColor="#FFFFFFFF" + android:textSize="20dip" + android:id="@+id/txtDirectory" android:paddingBottom="5dip"></TextView> + <GridView android:layout_y="0dip" android:layout_x="0dip" android:id="@+id/GridView01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:columnWidth="90dp" @@ -8,5 +15,5 @@ android:horizontalSpacing="10dp" android:stretchMode="columnWidth" android:gravity="center"> </GridView> -</AbsoluteLayout> +</LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-20 21:59:40 UTC (rev 4073) @@ -9,7 +9,7 @@ android:layout_width="wrap_content"> <ImageButton android:id="@+id/crtl_mp" - android:layout_height="60dip" android:layout_width="100dip"> + android:layout_height="60dip" android:layout_width="100dip" android:background="@drawable/icon"> </ImageButton> <ImageButton android:id="@+id/crtl_up" android:layout_width="100dip" android:layout_height="60dip" @@ -43,7 +43,7 @@ android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> <ImageButton android:id="@+id/crtl_parent" - android:layout_height="60dip" android:layout_width="100dip"> + android:layout_height="60dip" android:layout_width="100dip" android:background="@drawable/home"> </ImageButton> <ImageButton android:id="@+id/crtl_down" android:layout_height="60dip" android:layout_width="100dip" @@ -103,14 +103,14 @@ android:layout_height="wrap_content"> <ImageButton android:id="@+id/crtl_full" - android:layout_height="60dip" android:layout_width="60dip"> + android:layout_height="60dip" android:layout_width="60dip" android:background="@drawable/n_full"> </ImageButton> <ImageButton android:id="@+id/crtl_play" android:layout_height="60dip" android:background="@drawable/right" android:layout_width="60dip"> </ImageButton> <ImageButton android:id="@+id/crtl_menu" - android:layout_height="60dip" android:layout_width="60dip"> + android:layout_height="60dip" android:layout_width="60dip" android:background="@drawable/menu"> </ImageButton> <ImageButton android:id="@+id/crtl_ch_m" android:layout_height="60dip" android:background="@drawable/channel_m" @@ -122,13 +122,13 @@ android:layout_height="wrap_content"> <ImageButton android:id="@+id/crtl_sub" - android:layout_height="60dip" android:layout_width="60dip"> + android:layout_height="60dip" android:layout_width="60dip" android:background="@drawable/n_sub"> </ImageButton> <ImageButton android:id="@+id/crtl_ratio" - android:layout_height="60dip" android:layout_width="60dip"> + android:layout_height="60dip" android:layout_width="60dip" android:background="@drawable/n_asr"> </ImageButton> <ImageButton android:id="@+id/crtl_osd" - android:layout_height="60dip" android:layout_width="60dip"> + android:layout_height="60dip" android:layout_width="60dip" android:background="@drawable/n_osd"> </ImageButton> <ImageButton android:id="@+id/crtl_info" android:layout_height="60dip" android:background="@drawable/info" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2011-01-20 21:59:40 UTC (rev 4073) @@ -104,7 +104,7 @@ android:layout_height="wrap_content"> <ImageButton android:id="@+id/crtl_full" - android:layout_height="60dip" android:layout_width="60dip"> + android:layout_height="60dip" android:layout_width="60dip" android:background="@drawable/n_full"> </ImageButton> <ImageButton android:id="@+id/crtl_play" android:layout_height="60dip" android:background="@drawable/right" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-20 21:59:40 UTC (rev 4073) @@ -30,7 +30,6 @@ import mediaportal.remote.R; import mediaportal.remote.communication.SendCommand; import mediaportal.remote.control.Remote_01; -import mediaportal.remote.multimedia.Webradio; import mediaportal.remote.music.MusicTab; import mediaportal.remote.nowPlaying.NowPlaying; import mediaportal.remote.nowPlaying.NowPlayingXmlHandler; @@ -152,9 +151,9 @@ "not implemented yet. Sorry !", Toast.LENGTH_SHORT) .show(); - //Intent myIntent = new Intent(view.getContext(), - //MediaPlayerControl.class); - //startActivity(myIntent); + // Intent myIntent = new Intent(view.getContext(), + // MediaPlayerControl.class); + // startActivity(myIntent); } }); @@ -181,7 +180,7 @@ btnSettings.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Vibration.vibrateShort(); - Intent myIntent = new Intent(view.getContext(), Webradio.class); + Intent myIntent = new Intent(view.getContext(), Setup.class); startActivity(myIntent); } }); @@ -208,17 +207,17 @@ } // hardware keys - @Override public boolean onKeyDown(int keyCode, KeyEvent event) { + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_MENU: { - - final CharSequence[] items = { "Settings", - "Switch HTPC", "Exit", "Cancel" }; - + + final CharSequence[] items = { "Settings", "Switch HTPC", "Exit" }; + AlertDialog.Builder builder = new AlertDialog.Builder(Main.this); builder.setTitle("Select option"); - + builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { switch (item) { @@ -228,45 +227,47 @@ break; case 1: // switch instance final CharSequence[] items2 = AppSettings.getNames(); - - AlertDialog.Builder builder = new AlertDialog.Builder(Main.this); + + AlertDialog.Builder builder = new AlertDialog.Builder( + Main.this); builder.setTitle("Select instance"); - - builder.setItems(items2, new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int item) { - switch (item) { - case 0: // MP1 - AppSettings.setInstance(1); - break; - case 1: // MP2 - AppSettings.setInstance(2); - break; - case 2: // MP3 - AppSettings.setInstance(3); - break; - } - TextView txtHtpc = (TextView) findViewById(R.id.txtInstance); - txtHtpc.setText(AppSettings.getName()); - - Pictures.actualDir = ""; - } - - }); - + + builder.setItems(items2, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int item) { + switch (item) { + case 0: // MP1 + AppSettings.setInstance(1); + break; + case 1: // MP2 + AppSettings.setInstance(2); + break; + case 2: // MP3 + AppSettings.setInstance(3); + break; + } + TextView txtHtpc = (TextView) findViewById(R.id.txtInstance); + txtHtpc.setText(AppSettings.getName()); + + Pictures.actualDir = ""; + } + + }); + AlertDialog alert = builder.create(); alert.show(); break; case 2: // exit - android.os.Process.killProcess(android.os.Process.myPid()); + android.os.Process.killProcess(android.os.Process + .myPid()); break; - case 3: // cancel - break; } } }); AlertDialog alert = builder.create(); alert.show(); - + return true; } case KeyEvent.KEYCODE_VOLUME_UP: { @@ -281,10 +282,10 @@ return super.onKeyDown(keyCode, event); } - + private boolean reportExist() { - File f = new File("stack.trace"); - return f.exists(); + File f = new File("stack.trace"); + return f.exists(); } private void sendReport() { @@ -324,7 +325,7 @@ this.deleteFile("stack.trace"); } - void chkStatus() { + void chkStatus() { final ConnectivityManager connMgr = (ConnectivityManager) this .getSystemService(Context.CONNECTIVITY_SERVICE); @@ -357,7 +358,7 @@ TextView txtHtpc = (TextView) findViewById(R.id.txtInstance); txtHtpc.setText(AppSettings.getName()); - + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 1000); @@ -428,7 +429,7 @@ } if (doUpdate) - mHandler.postDelayed(mUpdateTimeTask, 1000); + mHandler.postDelayed(mUpdateTimeTask, 2000); } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/ReceiveDbXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/ReceiveDbXmlHandler.java 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/ReceiveDbXmlHandler.java 2011-01-20 21:59:40 UTC (rev 4073) @@ -30,23 +30,26 @@ public class ReceiveDbXmlHandler extends DefaultHandler { Boolean currentElement = false; String currentValue = null; - - public ArrayList<DbItems> DbList = new ArrayList<DbItems>(); - - public static class DbItems - { - public String Title = ""; - public String Artist= ""; - public String Album= ""; - public String AlbumArtist= ""; - public String Track= ""; - public String Rating= ""; - public String Filename= ""; - public String Duration= ""; - public String ID= ""; + + public ArrayList<DbItems> DbList = new ArrayList<DbItems>(); + public int Results; + public int Start; + public int Count; + + public static class DbItems { + public String Title = ""; + public String Artist = ""; + public String Album = ""; + public String AlbumArtist = ""; + public String Track = ""; + public String Rating = ""; + public String Filename = ""; + public String Duration = ""; + public String ID = ""; } + private DbItems currentDbItem; - + /** * Called when tag starts ( example:- <name>AndroidPeople</name> -- <name> ) */ @@ -54,14 +57,20 @@ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { currentElement = true; - + currentValue = ""; - if (localName == "Database")DbList = new ArrayList<DbItems>(); - if (localName == "Item")currentDbItem = new DbItems(); + if (localName == "Database") { + DbList = new ArrayList<DbItems>(); + Results = 0; + Start = 0; + } + if (localName == "Item") + currentDbItem = new DbItems(); } /** - * Called when tag closing ( example:- <name>AndroidPeople</name> -- </name> ) + * Called when tag closing ( example:- <name>AndroidPeople</name> -- </name> + * ) */ @Override public void endElement(String uri, String localName, String qName) @@ -70,24 +79,53 @@ currentElement = false; /** set value */ - if (localName == "Artist") {currentDbItem.Artist =currentValue;} - if (localName == "Title") {currentDbItem.Title =currentValue;} - if (localName == "Album") {currentDbItem.Album =currentValue;} - if (localName == "AlbumArtist") {currentDbItem.AlbumArtist =currentValue;} - if (localName == "Track") {currentDbItem.Track =currentValue;} - if (localName == "Rating") {currentDbItem.Rating =currentValue;} - if (localName == "Filename") {currentDbItem.Filename =currentValue;} - if (localName == "Duration") {currentDbItem.Duration =currentValue;} - if (localName == "ID") {currentDbItem.ID =currentValue;} - - if (localName == "Item")DbList.add(currentDbItem); - + if (localName == "Results") { + Results = Integer.parseInt(currentValue); + } + if (localName == "Start") { + Start = Integer.parseInt(currentValue); + } + if (localName == "Count") { + Count = Integer.parseInt(currentValue); + } + + if (localName == "Artist") { + currentDbItem.Artist = currentValue; + } + if (localName == "Title") { + currentDbItem.Title = currentValue; + } + if (localName == "Album") { + currentDbItem.Album = currentValue; + } + if (localName == "AlbumArtist") { + currentDbItem.AlbumArtist = currentValue; + } + if (localName == "Track") { + currentDbItem.Track = currentValue; + } + if (localName == "Rating") { + currentDbItem.Rating = currentValue; + } + if (localName == "Filename") { + currentDbItem.Filename = currentValue; + } + if (localName == "Duration") { + currentDbItem.Duration = currentValue; + } + if (localName == "ID") { + currentDbItem.ID = currentValue; + } + + if (localName == "Item") + DbList.add(currentDbItem); + currentValue = null; } /** - * Called to get tag characters ( example:- <name>AndroidPeople</name> -- to get - * AndroidPeople Character ) + * Called to get tag characters ( example:- <name>AndroidPeople</name> -- to + * get AndroidPeople Character ) */ @Override public void characters(char[] ch, int start, int length) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-20 21:59:40 UTC (rev 4073) @@ -35,7 +35,6 @@ import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; -import android.os.Handler; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -50,30 +49,37 @@ public class Pictures extends Activity { - private Handler mHandler = new Handler(); - public static String actualDir = ""; public static ArrayList<ReceiveDirectoryXmlHandler.DirItems> pictureList; public static int selectedPicture; private static int picNo; - final CharSequence[] itemsLong = { "Slideshow", "Random Slideshow", - "Cancel" }; + private BaseAdapter adapter; + private update taskFetchData; + private fetchPictures taskFetchPictures; + + final CharSequence[] itemsLong = { "Slideshow", "Random Slideshow" }; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pictures); - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, 100); + adapter = new ImageAdapter2(Pictures.this); + taskFetchData = new update(); + taskFetchData.execute(); + GridView gridview = (GridView) findViewById(R.id.GridView01); + gridview.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, long id) { + taskFetchPictures.requestStop(); + ImageView iv = (ImageView) v.findViewById(R.id.icon_image); picItem pic = (picItem) iv.getTag(); @@ -89,8 +95,8 @@ if (pic.typ == "folder") { actualDir += pic.title.replaceAll(" ", "%20") + "/"; - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, 0); + taskFetchData = new update(); + taskFetchData.execute(); } if (pic.typ == "oneup") { @@ -104,26 +110,44 @@ } else actualDir = ""; - mHandler.removeCallbacks(mUpdateTimeTask); - mHandler.postDelayed(mUpdateTimeTask, 0); + taskFetchData = new update(); + taskFetchData.execute(); } } }); } - private Runnable mUpdateTimeTask = new Runnable() { - public void run() { - new update().execute(); + public void onResume() { + super.onResume(); + + picNo = 0; + + if (pictureList != null) { + taskFetchPictures = new fetchPictures(); + taskFetchPictures.execute(); } - }; + } private class update extends AsyncTask<String, Void, Void> { private final ProgressDialog dialog = new ProgressDialog(Pictures.this); // can use UI thread here protected void onPreExecute() { - this.dialog.setMessage("Loading..."); - this.dialog.show(); + try { + this.dialog.setMessage("Loading..."); + this.dialog.show(); + + String dsp = actualDir; + int len = dsp.length(); + + if(dsp=="") dsp = "root"; + if(len>25) dsp = "..." + dsp.substring(len-20, len); + + TextView txt = (TextView) findViewById(R.id.txtDirectory); + txt.setText("Act: " + dsp); + + } catch (Exception ex) { + } } // automatically done on worker thread (separate from UI thread) @@ -139,7 +163,10 @@ // can use UI thread here protected void onPostExecute(final Void unused) { if (this.dialog.isShowing()) { - this.dialog.dismiss(); + try { + this.dialog.dismiss(); + } catch (Exception ex) { + } } Log.d("MediaPortal", "pictures read folder finished"); @@ -151,25 +178,26 @@ if (pictureList.size() == 0) { Toast.makeText(Pictures.this, "no items", Toast.LENGTH_SHORT).show(); - } else { - GridView gridview = (GridView) findViewById(R.id.GridView01); - gridview.setAdapter(new ImageAdapter2(Pictures.this)); + } + GridView gridview = (GridView) findViewById(R.id.GridView01); + gridview.setAdapter(adapter); - picNo = 0; - mFetchTask.run(); - } + picNo = 0; + + taskFetchPictures = new fetchPictures(); + taskFetchPictures.execute(); } } } - private Runnable mFetchTask = new Runnable() { - public void run() { - new fetchPictures().execute(); + private class fetchPictures extends AsyncTask<String, Void, Void> { + + private volatile boolean stop = false; + + public synchronized void requestStop() { + stop = true; } - }; - private class fetchPictures extends AsyncTask<String, Void, Void> { - // can use UI thread here protected void onPreExecute() { @@ -180,9 +208,9 @@ HttpHandler http = new HttpHandler(); String server = AppSettings.getWebServer() + "/pictures/"; - - while(picNo < pictureList.size()) { + while (picNo < pictureList.size()) { + DirItems item = pictureList.get(picNo); if (!item.isFolder) { if (item.Picture == null) { @@ -194,17 +222,28 @@ } picNo++; } + + try { + Thread.sleep(10); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return null; } // can use UI thread here protected void onPostExecute(final Void unused) { - GridView gridview = (GridView) findViewById(R.id.GridView01); - gridview.setAdapter(new ImageAdapter2(Pictures.this)); - - if (picNo < pictureList.size()) - mFetchTask.run(); + if (!stop) { + adapter.notifyDataSetChanged(); + + if (picNo < pictureList.size()) { + taskFetchPictures = new fetchPictures(); + taskFetchPictures.execute(); + } + } } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-20 21:59:40 UTC (rev 4073) @@ -77,7 +77,7 @@ cacheDB.Start(); } - + public void Stop() { logInfo("Stop server"); Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs 2011-01-20 21:59:40 UTC (rev 4073) @@ -39,6 +39,8 @@ { public class MusicHandler { + const int maxResult = 500; + private static Dictionary<string, string> directoryList = new Dictionary<string, string>(); private static string replyAllArtist = string.Empty; @@ -67,13 +69,17 @@ db.GetAllArtists(ref list); AndroidServer.logInfo("Caching music artist found :" + list.Count); + msg += "<Results>" + list.Count + "</Results>\r\n"; + msg += "<Start>0</Start>\r\n"; + msg += "<Count>" + maxResult + "</Count>\r\n"; + cnt = 0; foreach (string artist in list) { if (artist != string.Empty) { cnt++; - if (cnt > 1000) break; + if (cnt > maxResult) break; msg += "<Item>\r\n"; msg += "<Artist>" + SomeUtils.EncodeString(artist) + "</Artist>\r\n"; @@ -110,11 +116,15 @@ list1.Sort(new AlbumComparer()); AndroidServer.logInfo("Caching music album sorted"); + msg += "<Results>" + list1.Count + "</Results>\r\n"; + msg += "<Start>0</Start>\r\n"; + msg += "<Count>" + maxResult + "</Count>\r\n"; + cnt = 0; foreach (MediaPortal.Music.Database.AlbumInfo album in list1) { cnt++; - if (cnt > 1000) break; + if (cnt > maxResult) break; string name = album.Album.Replace("|", "").Trim(); if (name != string.Empty) @@ -153,17 +163,21 @@ List<MediaPortal.Music.Database.Song> list2 = new List<MediaPortal.Music.Database.Song>(); db.GetSongsByArtist("%", ref list2); - AndroidServer.logInfo("Caching music songs found :" + list2.Count) ; + AndroidServer.logInfo("Caching music songs found :" + list2.Count); list2.Sort(new SongComparer()); AndroidServer.logInfo("Caching music songs sorted"); + msg += "<Results>" + list2.Count + "</Results>\r\n"; + msg += "<Start>0</Start>\r\n"; + msg += "<Count>" + maxResult + "</Count>\r\n"; + cnt = 0; foreach (MediaPortal.Music.Database.Song song in list2) { cnt++; - if (cnt > 1000) break; + if (cnt > maxResult) break; msg += "<Item>\r\n"; @@ -369,11 +383,11 @@ MediaPortal.Music.Database.MusicDatabase db = MediaPortal.Music.Database.MusicDatabase.Instance; List<MediaPortal.Music.Database.Song> list = new List<MediaPortal.Music.Database.Song>(); + int start = 0; + if (!req.StartsWith("?")) { // cached on startup - // db.GetSongsByArtist("%", ref list); - msg = replyAllSong; handler.SendMessage(sock, msg); @@ -382,6 +396,16 @@ AndroidServer.logDebug("Reply music db all songs "); return; } + else if (req.StartsWith("?start=")) + { + req = req.Replace("?start=", ""); + try + { + start = Convert.ToInt32(req); + } + catch { } + db.GetSongsByArtist("%", ref list); + } else if (req.StartsWith("?artist=")) { req = req.Replace("?artist=", ""); @@ -408,21 +432,36 @@ list.Sort(new SongComparer()); + int cnt = 0; + int act = 0; + if (start > list.Count) start = 0; + + msg += "<Results>" + list.Count + "</Results>\r\n"; + msg += "<Start>" + start + "</Start>\r\n"; + msg += "<Count>" + maxResult + "</Count>\r\n"; + foreach (MediaPortal.Music.Database.Song song in list) { - msg += "<Item>\r\n"; + if (act >= start) + { + msg += "<Item>\r\n"; - msg += "<ID>" + HttpUtility.HtmlEncode(song.Id.ToString()) + "</ID>\r\n"; - msg += "<Title>" + SomeUtils.EncodeString(song.Title) + "</Title>\r\n"; - msg += "<Artist>" + SomeUtils.EncodeString(song.Artist) + "</Artist>\r\n"; - msg += "<Album>" + SomeUtils.EncodeString(song.Artist) + "</Album>\r\n"; - msg += "<Genre>" + HttpUtility.HtmlEncode(song.Genre) + "</Genre>\r\n"; - msg += "<Track>" + HttpUtility.HtmlEncode(song.Track.ToString()) + "</Track>\r\n"; - msg += "<Duration>" + HttpUtility.HtmlEncode(song.Duration.ToString()) + "</Duration>\r\n"; - msg += "<Rating>" + HttpUtility.HtmlEncode(song.Rating.ToString()) + "</Rating>\r\n"; - msg += "<Filename>" + SomeUtils.EncodeString(song.FileName) + "</Filename>\r\n"; + msg += "<ID>" + HttpUtility.HtmlEncode(song.Id.ToString()) + "</ID>\r\n"; + msg += "<Title>" + SomeUtils.EncodeString(song.Title) + "</Title>\r\n"; + msg += "<Artist>" + SomeUtils.EncodeString(song.Artist) + "</Artist>\r\n"; + msg += "<Album>" + SomeUtils.EncodeString(song.Artist) + "</Album>\r\n"; + msg += "<Genre>" + HttpUtility.HtmlEncode(song.Genre) + "</Genre>\r\n"; + msg += "<Track>" + HttpUtility.HtmlEncode(song.Track.ToString()) + "</Track>\r\n"; + msg += "<Duration>" + HttpUtility.HtmlEncode(song.Duration.ToString()) + "</Duration>\r\n"; + msg += "<Rating>" + HttpUtility.HtmlEncode(song.Rating.ToString()) + "</Rating>\r\n"; + msg += "<Filename>" + SomeUtils.EncodeString(song.FileName) + "</Filename>\r\n"; - msg += "</Item>\r\n"; + msg += "</Item>\r\n"; + + cnt++; + if (cnt == maxResult) break; + } + act++; } msg += "</Database>\r\n\r\n"; Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2011-01-20 21:59:40 UTC (rev 4073) @@ -241,11 +241,11 @@ req = req.Replace("/db_music", ""); if (req.StartsWith("/")) req = req.Substring(1); - if (req == "artist.xml") + if (req.StartsWith("artist.xml")) { MusicHandler.ReplyMusicDbArtist(socket); } - if (req == "album.xml") + if (req.StartsWith("album.xml")) { MusicHandler.ReplyMusicDbAlbum(socket); } @@ -253,6 +253,7 @@ { MusicHandler.ReplyMusicDbSongs(socket, req); } + if (req.StartsWith("getfile")) { int pos = req.IndexOf("?"); Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs 2011-01-17 21:09:34 UTC (rev 4072) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs 2011-01-20 21:59:40 UTC (rev 4073) @@ -58,11 +58,39 @@ } catch { } } + private void sendText(Socket sock, String text) + { + sock.Send(Encoding.UTF8.GetBytes(text + Environment.NewLine)); + } + public void SendBytes(Socket sock, byte[] Bytes) { try { - sock.Send(Bytes, Bytes.Length, 0); + long read = 0; + long actual = 0; + + while (read < Bytes.Length) + { + actual = read; + + int buffersize; + if (Bytes.Length - read > 1024) + { + buffersize = 1024; + read += 1024; + } + else + { + buffersize = (int)(Bytes.Length - read); + read = Bytes.Length; + } + byte[] tosend = new byte[buffersize]; + Array.Copy(Bytes, actual, tosend, 0, buffersize); + + sock.Send(tosend); + System.Threading.Thread.Sleep(3); + } } catch { } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-21 16:49:39
|
Revision: 4075 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4075&view=rev Author: kroko_koenig Date: 2011-01-21 16:49:31 +0000 (Fri, 21 Jan 2011) Log Message: ----------- play video local and on the MP Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/movie.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/movies.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/VideoHandler.cs Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-21 16:49:31 UTC (rev 4075) @@ -32,6 +32,7 @@ <activity android:launchMode="singleInstance" android:name=".music.MusicResults"></activity> <activity android:launchMode="singleInstance" android:name=".multimedia.Webradio"></activity> <activity android:name=".MediaPlayerControl" android:launchMode="singleInstance"></activity> + <activity android:name=".movies.Movies" android:launchMode="singleInstance"></activity> </application> <uses-sdk android:minSdkVersion="3" /> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-21 16:49:31 UTC (rev 4075) @@ -51,46 +51,47 @@ public static final int main_settings=0x7f020022; public static final int main_video=0x7f020023; public static final int menu=0x7f020024; - public static final int music=0x7f020025; - public static final int mute=0x7f020026; - public static final int n_asr=0x7f020027; - public static final int n_full=0x7f020028; - public static final int n_menu=0x7f020029; - public static final int n_osd=0x7f02002a; - public static final int n_sub=0x7f02002b; - public static final int now_playing=0x7f02002c; - public static final int pause=0x7f02002d; - public static final int picture=0x7f02002e; - public static final int pictures=0x7f02002f; - public static final int play=0x7f020030; - public static final int plugins=0x7f020031; - public static final int power_off=0x7f020032; - public static final int remote=0x7f020033; - public static final int restart=0x7f020034; - public static final int rewind=0x7f020035; - public static final int right=0x7f020036; - public static final int sel_play=0x7f020037; - public static final int sel_skp_back=0x7f020038; - public static final int sel_skp_forw=0x7f020039; - public static final int select=0x7f02003a; - public static final int select2=0x7f02003b; - public static final int settings=0x7f02003c; - public static final int skip_back=0x7f02003d; - public static final int skip_forward=0x7f02003e; - public static final int song=0x7f02003f; - public static final int song_off=0x7f020040; - public static final int splash=0x7f020041; - public static final int splash02=0x7f020042; - public static final int stop=0x7f020043; - public static final int suspend=0x7f020044; - public static final int up=0x7f020045; - public static final int video=0x7f020046; - public static final int volume_m=0x7f020047; - public static final int volume_p=0x7f020048; - public static final int wake_on_lan=0x7f020049; + public static final int movie=0x7f020025; + public static final int music=0x7f020026; + public static final int mute=0x7f020027; + public static final int n_asr=0x7f020028; + public static final int n_full=0x7f020029; + public static final int n_menu=0x7f02002a; + public static final int n_osd=0x7f02002b; + public static final int n_sub=0x7f02002c; + public static final int now_playing=0x7f02002d; + public static final int pause=0x7f02002e; + public static final int picture=0x7f02002f; + public static final int pictures=0x7f020030; + public static final int play=0x7f020031; + public static final int plugins=0x7f020032; + public static final int power_off=0x7f020033; + public static final int remote=0x7f020034; + public static final int restart=0x7f020035; + public static final int rewind=0x7f020036; + public static final int right=0x7f020037; + public static final int sel_play=0x7f020038; + public static final int sel_skp_back=0x7f020039; + public static final int sel_skp_forw=0x7f02003a; + public static final int select=0x7f02003b; + public static final int select2=0x7f02003c; + public static final int settings=0x7f02003d; + public static final int skip_back=0x7f02003e; + public static final int skip_forward=0x7f02003f; + public static final int song=0x7f020040; + public static final int song_off=0x7f020041; + public static final int splash=0x7f020042; + public static final int splash02=0x7f020043; + public static final int stop=0x7f020044; + public static final int suspend=0x7f020045; + public static final int up=0x7f020046; + public static final int video=0x7f020047; + public static final int volume_m=0x7f020048; + public static final int volume_p=0x7f020049; + public static final int wake_on_lan=0x7f02004a; } public static final class id { - public static final int GridView01=0x7f07001b; + public static final int GridView01=0x7f070014; public static final int ImageView01=0x7f07001d; public static final int LinearLayout00=0x7f07005c; public static final int LinearLayout01=0x7f070024; @@ -114,8 +115,8 @@ public static final int btnHibernate=0x7f070058; public static final int btnIpSettings=0x7f07008e; public static final int btnRestart=0x7f070059; - public static final int btnSelDown=0x7f070018; - public static final int btnSelUp=0x7f070019; + public static final int btnSelDown=0x7f07001a; + public static final int btnSelUp=0x7f07001b; public static final int btnShutOff=0x7f07005a; public static final int btnSuspend=0x7f070057; public static final int btnVolumeDown=0x7f070054; @@ -204,12 +205,12 @@ public static final int full_text=0x7f07001c; public static final int icon_image=0x7f070001; public static final int icon_text=0x7f070002; - public static final int list_album=0x7f070014; - public static final int list_artist=0x7f070015; - public static final int list_result=0x7f070016; - public static final int list_song=0x7f070017; + public static final int list_album=0x7f070016; + public static final int list_artist=0x7f070017; + public static final int list_result=0x7f070018; + public static final int list_song=0x7f070019; public static final int main_now_playing=0x7f07000e; - public static final int music_grid=0x7f070013; + public static final int music_grid=0x7f070015; public static final int naviRemote_text=0x7f070050; public static final int now_album=0x7f070026; public static final int now_artist=0x7f07002c; @@ -242,7 +243,7 @@ public static final int slide=0x7f0700a0; public static final int text_kb_streamed=0x7f07001e; public static final int title=0x7f070094; - public static final int txtDirectory=0x7f07001a; + public static final int txtDirectory=0x7f070013; public static final int txtFile=0x7f07001f; public static final int txtInstance=0x7f070006; public static final int txtIntanceName=0x7f070092; @@ -257,26 +258,27 @@ public static final int icon=0x7f030000; public static final int list_item=0x7f030001; public static final int main=0x7f030002; - public static final int music=0x7f030003; - public static final int music_album=0x7f030004; - public static final int music_artist=0x7f030005; - public static final int music_results=0x7f030006; - public static final int music_song=0x7f030007; - public static final int musictab=0x7f030008; - public static final int pictures=0x7f030009; - public static final int picturesfullscreen=0x7f03000a; - public static final int player=0x7f03000b; - public static final int playingnow=0x7f03000c; - public static final int playnowlist=0x7f03000d; - public static final int remote01=0x7f03000e; - public static final int remote02=0x7f03000f; - public static final int remote03=0x7f030010; - public static final int remote03b=0x7f030011; - public static final int setup=0x7f030012; - public static final int setup_ip=0x7f030013; - public static final int splash=0x7f030014; - public static final int title=0x7f030015; - public static final int webradio=0x7f030016; + public static final int movies=0x7f030003; + public static final int music=0x7f030004; + public static final int music_album=0x7f030005; + public static final int music_artist=0x7f030006; + public static final int music_results=0x7f030007; + public static final int music_song=0x7f030008; + public static final int musictab=0x7f030009; + public static final int pictures=0x7f03000a; + public static final int picturesfullscreen=0x7f03000b; + public static final int player=0x7f03000c; + public static final int playingnow=0x7f03000d; + public static final int playnowlist=0x7f03000e; + public static final int remote01=0x7f03000f; + public static final int remote02=0x7f030010; + public static final int remote03=0x7f030011; + public static final int remote03b=0x7f030012; + public static final int setup=0x7f030013; + public static final int setup_ip=0x7f030014; + public static final int splash=0x7f030015; + public static final int title=0x7f030016; + public static final int webradio=0x7f030017; } public static final class menu { public static final int music_menu=0x7f060000; Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/movie.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/movie.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/movies.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/movies.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/movies.xml 2011-01-21 16:49:31 UTC (rev 4075) @@ -0,0 +1,19 @@ +<LinearLayout android:id="@+id/widget0" + android:layout_width="fill_parent" android:layout_height="wrap_content" + xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"> + + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="Actual: ..." android:textColor="#FFFFFFFF" + android:textSize="20dip" + android:id="@+id/txtDirectory" android:paddingBottom="5dip"></TextView> + + <GridView android:layout_y="0dip" android:layout_x="0dip" + android:id="@+id/GridView01" android:layout_width="fill_parent" + android:layout_height="fill_parent" android:columnWidth="90dp" + android:numColumns="auto_fit" android:verticalSpacing="10dp" + android:horizontalSpacing="10dp" android:stretchMode="columnWidth" + android:gravity="center"> + </GridView> +</LinearLayout> + Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java 2011-01-21 16:49:31 UTC (rev 4075) @@ -185,5 +185,24 @@ post.Post(xml); } + + public static void PostPlayFile(String Filename, String MediaTyp) { + Filename = Entity.AddEntity(Filename); + + Log.d("MediaPortal", "PostPlayFile : " + Filename); + + PostWebserver post = new PostWebserver(AppSettings.getServer(), AppSettings.getPort()); + String xml = ""; + + xml += "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"; + xml += "<message>\r\n"; + xml += "<command>PlayFile</command>\r\n"; + xml += "<filename>" + Filename + "</filename>\r\n"; + xml += "<mediatyp>" + MediaTyp + "</mediatyp>\r\n"; + xml += "</message>\r\n"; + + post.Post(xml); + } + } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirHandler.java 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirHandler.java 2011-01-21 16:49:31 UTC (rev 4075) @@ -46,7 +46,12 @@ return fetchData("/pictures/" + Dir); } + + public ArrayList<DirItems> getMoviesDir(String Dir) { + return fetchData("/movies/" + Dir); + } + public ArrayList<DirItems> gotodir(String dir) { actualDir += "/" + dir; return fetchData(actualDir); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-21 16:49:31 UTC (rev 4075) @@ -30,6 +30,7 @@ import mediaportal.remote.R; import mediaportal.remote.communication.SendCommand; import mediaportal.remote.control.Remote_01; +import mediaportal.remote.movies.Movies; import mediaportal.remote.music.MusicTab; import mediaportal.remote.nowPlaying.NowPlaying; import mediaportal.remote.nowPlaying.NowPlayingXmlHandler; @@ -46,7 +47,6 @@ import android.content.DialogInterface; import android.content.Intent; import android.net.ConnectivityManager; -import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.Environment; @@ -147,17 +147,8 @@ btnVideo.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Vibration.vibrateShort(); - - //Toast.makeText(view.getContext(), - // "not implemented yet. Sorry !", Toast.LENGTH_SHORT) - // .show(); - - // Intent myIntent = new Intent(view.getContext(), - // MediaPlayerControl.class); - // startActivity(myIntent); - - startActivity(new Intent(Intent.ACTION_VIEW, - Uri.parse("rtsp://" + AppSettings.getServer() + ":5554/android.sdp"))); + Intent myIntent = new Intent(view.getContext(), Movies.class); + startActivity(myIntent); } }); Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java 2011-01-21 16:49:31 UTC (rev 4075) @@ -0,0 +1,349 @@ +/* + * Copyright (C) 2005-2011 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +package mediaportal.remote.movies; + +import java.util.ArrayList; +import mediaportal.remote.R; +import mediaportal.remote.communication.SendCommand; +import mediaportal.remote.directory.ReceiveDirHandler; +import mediaportal.remote.directory.ReceiveDirectoryXmlHandler; +import mediaportal.remote.directory.ReceiveDirectoryXmlHandler.DirItems; +import mediaportal.remote.utils.AppSettings; +import mediaportal.remote.utils.Vibration; +import android.app.Activity; +import android.app.AlertDialog; +import android.app.ProgressDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.net.Uri; +import android.os.AsyncTask; +import android.os.Bundle; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.BaseAdapter; +import android.widget.GridView; +import android.widget.ImageView; +import android.widget.TextView; +import android.widget.AdapterView.OnItemClickListener; +import android.widget.Toast; + +public class Movies extends Activity { + + public static String actualDir = ""; + + public static ArrayList<ReceiveDirectoryXmlHandler.DirItems> moviesList; + + public static int selectedMovie; + public static String File; + + private BaseAdapter adapter; + + private update taskFetchData; + private startVideo taskStartVideo; + + final CharSequence[] items = { "Play file locally", "Play file on MP" }; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.pictures); + + adapter = new ImageAdapter2(Movies.this); + + taskFetchData = new update(); + taskFetchData.execute(); + + GridView gridview = (GridView) findViewById(R.id.GridView01); + + gridview.setOnItemClickListener(new OnItemClickListener() { + public void onItemClick(AdapterView<?> parent, View v, + int position, long id) { + + ImageView iv = (ImageView) v.findViewById(R.id.icon_image); + movieItem movie = (movieItem) iv.getTag(); + + Vibration.vibrateShort(); + + if (movie.typ == "item") { + selectedMovie = position - 1; + File = actualDir + movie.title.replaceAll(" ", "%20"); + + AlertDialog.Builder builder = new AlertDialog.Builder( + Movies.this); + + builder.setTitle("Movies options"); + + builder.setItems(items, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int item) { + switch (item) { + case 0: + SendCommand.PostStreamFile(File, + "video"); + + taskStartVideo = new startVideo(); + taskStartVideo.execute(); + break; + case 1: + SendCommand.PostPlayFile(File, "video"); + break; + + } + } + }); + AlertDialog alert = builder.create(); + alert.show(); + } + + if (movie.typ == "folder") { + actualDir += movie.title.replaceAll(" ", "%20") + "/"; + + taskFetchData = new update(); + taskFetchData.execute(); + } + + if (movie.typ == "oneup") { + if (actualDir.endsWith("/")) + actualDir = actualDir.substring(0, + actualDir.length() - 1); + + int x = actualDir.lastIndexOf("/"); + if (x >= 0) { + actualDir = actualDir.substring(0, x + 1); + } else + actualDir = ""; + + taskFetchData = new update(); + taskFetchData.execute(); + } + } + }); + } + + private class update extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(Movies.this); + + // can use UI thread here + protected void onPreExecute() { + try { + this.dialog.setMessage("Loading..."); + this.dialog.show(); + + String dsp = actualDir; + int len = dsp.length(); + + if (dsp == "") + dsp = "root"; + if (len > 25) + dsp = "..." + dsp.substring(len - 20, len); + + TextView txt = (TextView) findViewById(R.id.txtDirectory); + txt.setText("Act: " + dsp); + + } catch (Exception ex) { + } + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + Log.d("MediaPortal", "pictures do read folder : " + actualDir); + + ReceiveDirHandler h = ReceiveDirHandler.getinstance(); + moviesList = h.getMoviesDir(actualDir); + + return null; + } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + try { + this.dialog.dismiss(); + } catch (Exception ex) { + } + } + + Log.d("MediaPortal", "movies read folder finished"); + + if (moviesList == null) { + Toast.makeText(Movies.this, "TIME OUT SERVER", + Toast.LENGTH_SHORT).show(); + } else { + if (moviesList.size() == 0) { + Toast.makeText(Movies.this, "no items", Toast.LENGTH_SHORT) + .show(); + } + + GridView gridview = (GridView) findViewById(R.id.GridView01); + gridview.setAdapter(adapter); + } + } + } + + private class startVideo extends AsyncTask<String, Void, Void> { + private final ProgressDialog dialog = new ProgressDialog(Movies.this); + + // can use UI thread here + protected void onPreExecute() { + try { + this.dialog.setMessage("Please wait..."); + this.dialog.show(); + } catch (Exception ex) { + } + } + + // automatically done on worker thread (separate from UI thread) + protected Void doInBackground(final String... args) { + try { + Thread.sleep(3000); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return null; + } + + // can use UI thread here + protected void onPostExecute(final Void unused) { + if (this.dialog.isShowing()) { + try { + this.dialog.dismiss(); + } catch (Exception ex) { + } + + String link = "rtsp://" + AppSettings.getServer() + + ":5554/MediaPortal.sdp"; + + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(link)); + startActivity(intent); + } + + Log.d("MediaPortal", "movies read folder finished"); + + if (moviesList == null) { + Toast.makeText(Movies.this, "TIME OUT SERVER", + Toast.LENGTH_SHORT).show(); + } else { + if (moviesList.size() == 0) { + Toast.makeText(Movies.this, "no items", Toast.LENGTH_SHORT) + .show(); + } + + GridView gridview = (GridView) findViewById(R.id.GridView01); + gridview.setAdapter(adapter); + } + } + } + + public class ImageAdapter2 extends BaseAdapter { + private Context mContext; + public static final int ACTIVITY_CREATE = 10; + + public ImageAdapter2(Context c) { + mContext = c; + } + + public int getCount() { + if (moviesList != null) + return moviesList.size() + 1; + else + return 0; + } + + public Object getItem(int position) { + return null; + } + + public long getItemId(int position) { + return 0; + } + + // @Override + // create a new ImageView for each item referenced by the Adapter + public View getView(int position, View convertView, ViewGroup parent) { + View v; + if (convertView == null) { // if it's not recycled, initialize some + // attributes + + LayoutInflater li = LayoutInflater.from(mContext); + v = li.inflate(R.layout.icon, null); + } else { + v = convertView; + } + + if (position > 0) { + position = position - 1; + + DirItems item = moviesList.get(position); + + String txtName = item.File; + Boolean isFolder = item.isFolder; + + TextView tv = (TextView) v.findViewById(R.id.icon_text); + tv.setText(txtName); + + ImageView iv = (ImageView) v.findViewById(R.id.icon_image); + + if (isFolder) { + iv.setImageResource(R.drawable.folder); + movieItem pic = new movieItem(); + pic.title = txtName; + pic.typ = "folder"; + iv.setTag(pic); + } else { + iv.setImageResource(R.drawable.movie); + + movieItem pic = new movieItem(); + pic.title = txtName; + pic.typ = "item"; + iv.setTag(pic); + } + } else { + LayoutInflater li = LayoutInflater.from(mContext); + v = li.inflate(R.layout.icon, null); + + TextView tv = (TextView) v.findViewById(R.id.icon_text); + tv.setText(".."); + + ImageView iv = (ImageView) v.findViewById(R.id.icon_image); + iv.setImageResource(R.drawable.folderback); + movieItem mov = new movieItem(); + mov.title = ".."; + mov.typ = "oneup"; + iv.setTag(mov); + } + + return v; + } + } + + public class movieItem { + public String title; + public String typ; + } + +} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Picturesfullscreen.java 2011-01-21 16:49:31 UTC (rev 4075) @@ -416,7 +416,7 @@ randomslidestatus = "Start random slideshow"; final CharSequence[] items = { "Save to sd card", "Open in browser", - "Send Picture", slidestatus, randomslidestatus, "Cancel" }; + "Send Picture", slidestatus, randomslidestatus }; AlertDialog.Builder builder = new AlertDialog.Builder( Picturesfullscreen.this); Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj 2011-01-21 16:49:31 UTC (rev 4075) @@ -58,6 +58,7 @@ </ItemGroup> <ItemGroup> <Compile Include="AndroidServer.cs" /> + <Compile Include="Content\VideoHandler.cs" /> <Compile Include="Content\MusicHandler.cs" /> <Compile Include="Content\NowPlayingHandler.cs" /> <Compile Include="Content\PictureHandler.cs" /> Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-21 16:49:31 UTC (rev 4075) @@ -30,6 +30,7 @@ using System.Runtime.InteropServices; using System.IO; using System.Net.Sockets; +using System.Web; using MediaPortal.GUI.Library; using MediaPortal.Utils; @@ -50,6 +51,7 @@ private delegate void DoActionHandler(Action action); private delegate void DoFullscreenHandler(); + private delegate void DoStartFileHandler(string file); private delegate void StartPlaylistPlayer(); private static Dictionary<string, string> directoryList = new Dictionary<string, string>(); @@ -563,7 +565,6 @@ if (AndroidServer.vlc != null) { if (AndroidServer.vlc.IsPlaying) AndroidServer.vlc.Stop(); - AndroidServer.vlc = null; } string sVlcPath; @@ -577,53 +578,65 @@ { "--audio-desync=-50", "--no-sout-rtp-sap", - "--sout-transcode-fps=25", + "--sout-transcode-fps=15", "--sout-rtp-caching=2000", "--sout-transcode-threads=4", "--sout-transcode-high-priority", "--sout-keep", - "--sout=#duplicate{dst='transcode{venc=x264{profile=baseline,level=3,keyint=50,bframes=0,no-cabac,ref=1,no-interlaced,vbv-maxrate=512,vbv-bufsize=256,aq-mode=0,no-mbtree,partitions=none,no-weightb,weightp=0,me=dia,subme=0,no-mixed-refs,no-8x8dct,trellis=0},vcodec=h264,vb=600,vfilter=canvas{width=480,height=320,aspect=480:320,padd},soverlay,aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=128,channels=2,audio-sync}:gather:rtp{sdp=rtsp://0.0.0.0:5554/android.sdp,mp4a-latm}',dst='transcode{vcodec=null,acodec=mp3,ab=160,channels=2}:gather:std{access=http,mux=raw,dst=0.0.0.0:8081}'}", + "--sout=#duplicate{dst='transcode{venc=x264{profile=baseline,level=3,keyint=30,bframes=0,no-cabac,ref=1,no-interlaced,vbv-maxrate=512,vbv-bufsize=256,aq-mode=0,no-mbtree,partitions=none,no-weightb,weightp=0,me=dia,subme=0,no-mixed-refs,no-8x8dct,trellis=0},vcodec=h264,vb=512,vfilter=canvas{width=320,height=160,aspect=320:160,padd},soverlay,aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=96,channels=2,audio-sync}:gather:rtp{sdp=rtsp://0.0.0.0:5554/MediaPortal.sdp,mp4a-latm}',dst='transcode{vcodec=null,acodec=mp3,ab=160,channels=2}:gather:std{access=http,mux=raw,dst=0.0.0.0:8081}'}", "-I", "dumy", "--no-ignore-config", "--no-osd", - "--plugin-path=" + System.IO.Path.Combine(sVlcPath , "plugins") + //"--plugin-path=" + System.IO.Path.Combine(sVlcPath , "plugins") }; - AndroidServer.vlc = new VideoLan.VlcControl(args); - } - if (!data["filename"].StartsWith("webradio")) - AndroidServer.vlc.Open(data["filename"]); - else - { - string dir = Config.GetFolder(MediaPortal.Configuration.Config.Dir.Config); - string radio1 = string.Empty; - string radio2 = string.Empty; - string radio3 = string.Empty; - string radio4 = string.Empty; + if (AndroidServer.vlc == null) + AndroidServer.vlc = new VideoLan.VlcControl(args); - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(dir + "\\MediaPortal.xml")) - { - radio1 = xmlreader.GetValueAsString("android", "radio01", "http://ndrstream.ic.llnwd.net/stream/ndrstream_n-joy_hi_mp3"); - radio2 = xmlreader.GetValueAsString("android", "radio02", "http://ndrstream.ic.llnwd.net/stream/ndrstream_ndr2_hi_mp3"); - radio3 = xmlreader.GetValueAsString("android", "radio03", "http://www.fritz.de/live.m3u"); - radio4 = xmlreader.GetValueAsString("android", "radio04", "http://listen.to.techno4ever.net"); - } - if (data["filename"].StartsWith("webradio_1")) - AndroidServer.vlc.Open(radio1); - if (data["filename"].StartsWith("webradio_2")) - AndroidServer.vlc.Open(radio2); - if (data["filename"].StartsWith("webradio_3")) - AndroidServer.vlc.Open(radio3); - if (data["filename"].StartsWith("webradio_4")) - AndroidServer.vlc.Open(radio4); + string filename = data["filename"].Replace("/", "\\"); + + directoryList = GetMpShare("movies"); + string local = GetLocalDir(filename, directoryList); + local = HttpUtility.UrlDecode(local); + + AndroidServer.logDebug("StreamFile play: " + local); + + AndroidServer.vlc.Open(local); AndroidServer.vlc.Play(); } } catch { + // why ever + } + } + #endregion + + #region play video file + if (data["command"] == ("PlayFile")) + { + AndroidServer.logDebug("MP play video: " + data["filename"]); + // parameter = filename + + try + { + string filename = data["filename"].Replace("/", "\\"); + + directoryList = GetMpShare("movies"); + string local = GetLocalDir(filename, directoryList); + local = HttpUtility.UrlDecode(local); + + AndroidServer.logDebug("MP play video: " + local); + + DoStartFileHandler del = new DoStartFileHandler(StartFile); + GUIGraphicsContext.form.Invoke(del, local); } + catch + { + // why ever + } } #endregion @@ -650,6 +663,15 @@ if (playList.Count > 0) playlistPlayer.Play(playList.Count - 1); } + + private void StartFile(string File) + { + g_Player.Stop(); + g_Player.Play(File, g_Player.MediaType.Video); + + GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); + } + private void DoAction(Action action) { GUIGraphicsContext.OnAction(action); Added: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/VideoHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/VideoHandler.cs (rev 0) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/VideoHandler.cs 2011-01-21 16:49:31 UTC (rev 4075) @@ -0,0 +1,160 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +/* + * Copyright (C) 2005-2011 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Collections; +using System.Text; +using System.Net.Sockets; +using System.IO; +using System.Drawing; +using System.Web; + +using MediaPortal.GUI.Library; +using MediaPortal.Configuration; +using MediaPortal.Database; +using SQLite.NET; + +namespace AndroidRemote.Content +{ + public class VideoHandler + { + private static Dictionary<string, string> directoryList = new Dictionary<string, string>(); + + public static void ReplyVideoDir(Socket sock, string request) + { + directoryList = SomeUtils.GetMpShare("movies"); + string dir = SomeUtils.GetLocalDir(request, directoryList); + + SocketHandler handler = new SocketHandler(); + + if (request == string.Empty) + { + #region root shares + + string msg = string.Empty; + // header + msg += "HTTP/1.0 200 Ok\r\n"; + msg += "Content-Type: application/xml; charset=utf-8; filename=info.xml" + "\r\n"; + msg += "Proxy-Connection: close" + "\r\n"; + msg += "\r\n"; + // content + msg += "<?xml version=\"1.0\"?>\r\n"; + msg += "<Directory>\r\n"; + + // folder + foreach (string key in directoryList.Keys) + { + msg += "<Folder>" + SomeUtils.EncodeString(key) + "</Folder>\r\n"; + } + msg += "</Directory>\r\n"; + + // send + handler.SendMessage(sock, msg); + + AndroidServer.logDebug("Reply video root dir"); + + #endregion + } + else + { + #region reply dirs + + if (Directory.Exists(dir)) + { + string msg = string.Empty; + // header + msg += "HTTP/1.0 200 Ok\r\n"; + msg += "Content-Type: application/xml; charset=utf-8; filename=info.xml" + "\r\n"; + msg += "Proxy-Connection: close" + "\r\n"; + msg += "\r\n"; + // content + msg += "<?xml version=\"1.0\"?>\r\n"; + msg += "<Directory>\r\n"; + + // folder + string[] dirs = Directory.GetDirectories(dir, "*.*", SearchOption.TopDirectoryOnly); + foreach (string f in dirs) + { + msg += "<Folder>" + SomeUtils.EncodeString(Path.GetFileName(f)) + "</Folder>\r\n"; + } + + //files + + ArrayList list = getAllpattern(dir); + + foreach (string f in list) + { + string fName = Path.GetFileName(f); + msg += "<File>" + SomeUtils.EncodeString(fName) + "</File>\r\n"; + } + + msg += "</Directory>\r\n"; + + // send + handler.SendMessage(sock, msg); + + AndroidServer.logDebug("Reply video dir : " + dir); + } + else + { + // dir does not exist + //SendErrorURL(Request); + + string msg = string.Empty; + // header + msg += "HTTP/1.0 200 Ok\r\n"; + msg += "Content-Type: application/xml; charset=utf-8; filename=info.xml" + "\r\n"; + msg += "Proxy-Connection: close" + "\r\n"; + msg += "\r\n"; + // content + msg += "<?xml version=\"1.0\"?>\r\n"; + msg += "<Directory>\r\n"; + msg += "</Directory>\r\n"; + + // send + handler.SendMessage(sock, msg); + + AndroidServer.logDebug("Reply empty picture dir"); + } + + #endregion + } + } + + private static ArrayList getAllpattern(string Dir) + { + string[] filters = { "*.avi", "*.mpg", "*.flv" , "*.mp4" }; + ArrayList files = new ArrayList(); + + foreach (string filter in filters) + { + files.AddRange(Directory.GetFiles(Dir, filter)); + } + + return files; + } + + } +} Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2011-01-21 16:49:31 UTC (rev 4075) @@ -268,6 +268,26 @@ #endregion + #region movies + else if (req.StartsWith("/movies")) + { + // handle movies + req = req.Substring(7); + if (req.StartsWith("/")) req = req.Substring(1); + + if (req == "") + { + // root + VideoHandler.ReplyVideoDir(socket, ""); + } + else + { + req = req.Replace("/", "\\"); + VideoHandler.ReplyVideoDir(socket, req); + } + } + #endregion + #region nowplaying else if (req.StartsWith("/nowplaying/now.xml")) { Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs 2011-01-21 16:49:31 UTC (rev 4075) @@ -39,20 +39,7 @@ this.btnSave = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.btnStop = new System.Windows.Forms.Button(); - this.btnPlay04 = new System.Windows.Forms.Button(); - this.btnPlay03 = new System.Windows.Forms.Button(); - this.btnPlay02 = new System.Windows.Forms.Button(); - this.btnPlay01 = new System.Windows.Forms.Button(); - this.label7 = new System.Windows.Forms.Label(); - this.txtRadio04 = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.txtRadio03 = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.txtRadio02 = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); - this.txtRadio01 = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -142,7 +129,7 @@ // btnSave // this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnSave.Location = new System.Drawing.Point(12, 391); + this.btnSave.Location = new System.Drawing.Point(12, 186); this.btnSave.Name = "btnSave"; this.btnSave.Size = new System.Drawing.Size(84, 29); this.btnSave.TabIndex = 1; @@ -153,7 +140,7 @@ // btnCancel // this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnCancel.Location = new System.Drawing.Point(104, 391); + this.btnCancel.Location = new System.Drawing.Point(104, 186); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(84, 29); this.btnCancel.TabIndex = 2; @@ -163,165 +150,29 @@ // // groupBox2 // - this.groupBox2.Controls.Add(this.label8); - this.groupBox2.Controls.Add(this.btnStop); - this.groupBox2.Controls.Add(this.btnPlay04); - this.groupBox2.Controls.Add(this.btnPlay03); - this.groupBox2.Controls.Add(this.btnPlay02); - this.groupBox2.Controls.Add(this.btnPlay01); - this.groupBox2.Controls.Add(this.label7); - this.groupBox2.Controls.Add(this.txtRadio04); - this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.txtRadio03); - this.groupBox2.Controls.Add(this.label5); - this.groupBox2.Controls.Add(this.txtRadio02); this.groupBox2.Controls.Add(this.label3); - this.groupBox2.Controls.Add(this.txtRadio01); this.groupBox2.Location = new System.Drawing.Point(12, 114); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(487, 271); + this.groupBox2.Size = new System.Drawing.Size(491, 66); this.groupBox2.TabIndex = 3; this.groupBox2.TabStop = false; - this.groupBox2.Text = "Webradio"; + this.groupBox2.Text = "Streaming"; // - // btnStop - // - this.btnStop.Location = new System.Drawing.Point(338, 233); - this.btnStop.Name = "btnStop"; - this.btnStop.Size = new System.Drawing.Size(135, 32); - this.btnStop.TabIndex = 19; - this.btnStop.Text = "STOP"; - this.btnStop.UseVisualStyleBackColor = true; - this.btnStop.Click += new System.EventHandler(this.btnStop_Click); - // - // btnPlay04 - // - this.btnPlay04.Location = new System.Drawing.Point(398, 185); - this.btnPlay04.Name = "btnPlay04"; - this.btnPlay04.Size = new System.Drawing.Size(75, 23); - this.btnPlay04.TabIndex = 18; - this.btnPlay04.Text = "Test"; - this.btnPlay04.UseVisualStyleBackColor = true; - this.btnPlay04.Click += new System.EventHandler(this.btnPlay04_Click); - // - // btnPlay03 - // - this.btnPlay03.Location = new System.Drawing.Point(398, 137); - this.btnPlay03.Name = "btnPlay03"; - this.btnPlay03.Size = new System.Drawing.Size(75, 23); - this.btnPlay03.TabIndex = 17; - this.btnPlay03.Text = "Test"; - this.btnPlay03.UseVisualStyleBackColor = true; - this.btnPlay03.Click += new System.EventHandler(this.btnPlay03_Click); - // - // btnPlay02 - // - this.btnPlay02.Location = new System.Drawing.Point(398, 93); - this.btnPlay02.Name = "btnPlay02"; - this.btnPlay02.Size = new System.Drawing.Size(75, 23); - this.btnPlay02.TabIndex = 16; - this.btnPlay02.Text = "Test"; - this.btnPlay02.UseVisualStyleBackColor = true; - this.btnPlay02.Click += new System.EventHandler(this.btnPlay02_Click); - // - // btnPlay01 - // - this.btnPlay01.Location = new System.Drawing.Point(398, 46); - this.btnPlay01.Name = "btnPlay01"; - this.btnPlay01.Size = new System.Drawing.Size(75, 23); - this.btnPlay01.TabIndex = 15; - this.btnPlay01.Text = "Test"; - this.btnPlay01.UseVisualStyleBackColor = true; - this.btnPlay01.Click += new System.EventHandler(this.btnPlay01_Click); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label7.Location = new System.Drawing.Point(14, 168); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(85, 16); - this.label7.TabIndex = 14; - this.label7.Text = "Webradio 04"; - // - // txtRadio04 - // - this.txtRadio04.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtRadio04.Location = new System.Drawing.Point(100, 186); - this.txtRadio04.Name = "txtRadio04"; - this.txtRadio04.Size = new System.Drawing.Size(292, 22); - this.txtRadio04.TabIndex = 13; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label6.Location = new System.Drawing.Point(14, 120); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(85, 16); - this.label6.TabIndex = 12; - this.label6.Text = "Webradio 03"; - // - // txtRadio03 - // - this.txtRadio03.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtRadio03.Location = new System.Drawing.Point(100, 138); - this.txtRadio03.Name = "txtRadio03"; - this.txtRadio03.Size = new System.Drawing.Size(292, 22); - this.txtRadio03.TabIndex = 11; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(14, 75); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(85, 16); - this.label5.TabIndex = 10; - this.label5.Text = "Webradio 02"; - // - // txtRadio02 - // - this.txtRadio02.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtRadio02.Location = new System.Drawing.Point(100, 93); - this.txtRadio02.Name = "txtRadio02"; - this.txtRadio02.Size = new System.Drawing.Size(292, 22); - this.txtRadio02.TabIndex = 9; - // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Location = new System.Drawing.Point(14, 29); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(85, 16); - this.label3.TabIndex = 8; - this.label3.Text = "Webradio 01"; + this.label3.Size = new System.Drawing.Size(396, 16); + this.label3.TabIndex = 7; + this.label3.Text = "VLC parameter can be found in the vlc.par in the process directory"; // - // txtRadio01 - // - this.txtRadio01.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtRadio01.Location = new System.Drawing.Point(100, 47); - this.txtRadio01.Name = "txtRadio01"; - this.txtRadio01.Size = new System.Drawing.Size(292, 22); - this.txtRadio01.TabIndex = 7; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label8.ForeColor = System.Drawing.Color.DarkRed; - this.label8.Location = new System.Drawing.Point(118, 22); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(252, 16); - this.label8.TabIndex = 20; - this.label8.Text = "VLC 1.x need to be installed for streaming"; - // // Setup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(511, 432); + this.ClientSize = new System.Drawing.Size(514, 227); this.Controls.Add(this.groupBox2); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnSave); @@ -357,19 +208,6 @@ private System.Windows.Forms.Button btnCopy; private System.Windows.Forms.Label label4; private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Button btnPlay04; - private System.Windows.Forms.Button btnPlay03; - private System.Windows.Forms.Button btnPlay02; - private System.Windows.Forms.Button btnPlay01; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.TextBox txtRadio04; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox txtRadio03; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox txtRadio02; private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox txtRadio01; - private System.Windows.Forms.Button btnStop; - private System.Windows.Forms.Label label8; } } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs 2011-01-21 11:52:48 UTC (rev 4074) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs 2011-01-21 16:49:31 UTC (rev 4075) @@ -40,8 +40,6 @@ { public partial class Setup : Form { - private VideoLan.VlcControl vlc; - public Setup() { InitializeComponent(); @@ -65,11 +63,6 @@ { txtServer.Text = xmlreader.GetValueAsString("android", "server", "192.168.0.30"); txtPort.Text = xmlreader.GetValueAsString("android", "port", "8200"); - - txtRadio01.Text = xmlreader.GetValueAsString("android", "radio01", "http://ndrstream.ic.llnwd.net/stream/ndrstream_n-joy_hi_mp3"); - txtRadio02.Text = xmlreader.GetValueAsString("android", "radio02", "http://ndrstream.ic.llnwd.net/stream/ndrstream_ndr2_hi_mp3"); - txtRadio03.Text = xmlreader.GetValueAsString("android", "radio03", "http://hotmixradio80.hotmixradio.com"); - txtRadio04.Text = xmlreader.GetValueAsString("android", "radio04", "http://listen.to.techno4ever.net"); } } private void SaveSettings() @@ -79,11 +72,6 @@ { xmlwriter.SetValue("android", "server", txtServer.Text); xmlwriter.SetValue("android", "port", txtPort.Text); - - xmlwriter.SetValue("android", "radio01", txtRadio01.Text); - xmlwriter.SetValue("android", "radio02", txtRadio02.Text); - xmlwriter.SetValue("android", "radio03", txtRadio03.Text); - xmlwriter.SetValue("android", "radio04", txtRadio04.Text); } } @@ -102,62 +90,9 @@ txtServer.Text = txtMyIP.Text; } - private void btnPlay01_Click(object sender, EventArgs e) - { - PlayStream(txtRadio01.Text); - } - private void btnPlay02_Click(object sender, EventArgs e) - { - PlayStream(txtRadio02.Text); - } - private void btnPlay03_Click(object sender, EventArgs e) - { - PlayStream(txtRadio03.Text); - } - private void btnPlay04_Click(object sender, EventArgs e) - { - PlayStream(txtRadio04.Text); - } - - private void btnStop_Click(object sender, EventArgs e) - { - if (vlc != null) - { - if (vlc.IsPlaying) vlc.Stop(); - } - } - - private void PlayStream(string stream) - { - if (vlc == null) - { - Microsoft.Win32.RegistryKey regkeyVlcInstallPathKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\VideoLAN\VLC"); - if (regkeyVlcInstallPathKey != null) - { - vlc = new VideoLan.VlcControl(); - - vlc.Visible = false; - this.Controls.Add(vlc); - } - } - - if (vlc != null) - { - if (vlc.IsPlaying) vlc.Stop(); - - vlc.Open(stream); - vlc.Play(); - } - } - private void Setup_FormClosing(object sender, FormClosingEventArgs e) { - if (vlc != null) - { - if (vlc.IsPlaying) vlc.Stop(); - } + } - - } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-21 19:03:35
|
Revision: 4076 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4076&view=rev Author: kroko_koenig Date: 2011-01-21 19:03:28 +0000 (Fri, 21 Jan 2011) Log Message: ----------- release a new version Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_asr.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_full.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_menu.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_osd.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_sub.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Release/main.jpg trunk/plugins/AndroidRemote/Release/remote.jpg trunk/plugins/AndroidRemote/Release/remote3.jpg trunk/plugins/AndroidRemote/Release/settings.jpg trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/logo.png trunk/plugins/AndroidRemote/Release/MediaPortalRemote.011 trunk/plugins/AndroidRemote/Release/main_menu.jpg trunk/plugins/AndroidRemote/Release/settings2.jpg Removed Paths: ------------- trunk/plugins/AndroidRemote/Release/remote2.jpg Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-21 16:49:31 UTC (rev 4075) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-21 19:03:28 UTC (rev 4076) @@ -44,51 +44,52 @@ public static final int icon=0x7f02001b; public static final int info=0x7f02001c; public static final int left=0x7f02001d; - public static final int main_music=0x7f02001e; - public static final int main_now_playing=0x7f02001f; - public static final int main_pictures=0x7f020020; - public static final int main_remote=0x7f020021; - public static final int main_settings=0x7f020022; - public static final int main_video=0x7f020023; - public static final int menu=0x7f020024; - public static final int movie=0x7f020025; - public static final int music=0x7f020026; - public static final int mute=0x7f020027; - public static final int n_asr=0x7f020028; - public static final int n_full=0x7f020029; - public static final int n_menu=0x7f02002a; - public static final int n_osd=0x7f02002b; - public static final int n_sub=0x7f02002c; - public static final int now_playing=0x7f02002d; - public static final int pause=0x7f02002e; - public static final int picture=0x7f02002f; - public static final int pictures=0x7f020030; - public static final int play=0x7f020031; - public static final int plugins=0x7f020032; - public static final int power_off=0x7f020033; - public static final int remote=0x7f020034; - public static final int restart=0x7f020035; - public static final int rewind=0x7f020036; - public static final int right=0x7f020037; - public static final int sel_play=0x7f020038; - public static final int sel_skp_back=0x7f020039; - public static final int sel_skp_forw=0x7f02003a; - public static final int select=0x7f02003b; - public static final int select2=0x7f02003c; - public static final int settings=0x7f02003d; - public static final int skip_back=0x7f02003e; - public static final int skip_forward=0x7f02003f; - public static final int song=0x7f020040; - public static final int song_off=0x7f020041; - public static final int splash=0x7f020042; - public static final int splash02=0x7f020043; - public static final int stop=0x7f020044; - public static final int suspend=0x7f020045; - public static final int up=0x7f020046; - public static final int video=0x7f020047; - public static final int volume_m=0x7f020048; - public static final int volume_p=0x7f020049; - public static final int wake_on_lan=0x7f02004a; + public static final int logo=0x7f02001e; + public static final int main_music=0x7f02001f; + public static final int main_now_playing=0x7f020020; + public static final int main_pictures=0x7f020021; + public static final int main_remote=0x7f020022; + public static final int main_settings=0x7f020023; + public static final int main_video=0x7f020024; + public static final int menu=0x7f020025; + public static final int movie=0x7f020026; + public static final int music=0x7f020027; + public static final int mute=0x7f020028; + public static final int n_asr=0x7f020029; + public static final int n_full=0x7f02002a; + public static final int n_menu=0x7f02002b; + public static final int n_osd=0x7f02002c; + public static final int n_sub=0x7f02002d; + public static final int now_playing=0x7f02002e; + public static final int pause=0x7f02002f; + public static final int picture=0x7f020030; + public static final int pictures=0x7f020031; + public static final int play=0x7f020032; + public static final int plugins=0x7f020033; + public static final int power_off=0x7f020034; + public static final int remote=0x7f020035; + public static final int restart=0x7f020036; + public static final int rewind=0x7f020037; + public static final int right=0x7f020038; + public static final int sel_play=0x7f020039; + public static final int sel_skp_back=0x7f02003a; + public static final int sel_skp_forw=0x7f02003b; + public static final int select=0x7f02003c; + public static final int select2=0x7f02003d; + public static final int settings=0x7f02003e; + public static final int skip_back=0x7f02003f; + public static final int skip_forward=0x7f020040; + public static final int song=0x7f020041; + public static final int song_off=0x7f020042; + public static final int splash=0x7f020043; + public static final int splash02=0x7f020044; + public static final int stop=0x7f020045; + public static final int suspend=0x7f020046; + public static final int up=0x7f020047; + public static final int video=0x7f020048; + public static final int volume_m=0x7f020049; + public static final int volume_p=0x7f02004a; + public static final int wake_on_lan=0x7f02004b; } public static final class id { public static final int GridView01=0x7f070014; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-21 16:49:31 UTC (rev 4075) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-21 19:03:28 UTC (rev 4076) @@ -1,20 +1,27 @@ +General +------- +Control up to 3 Mediaportal +Wake On Lan from the remote +switch off / hibernate etc. your MP from the remote +vibration feedback +show what actual playing on the main screen and pause / skip control + Pictures section ---------------- browse folders (MP shares) -display thumbs +display thumbs (threaded) save to sd open browser -send picture +send picture via MMS slide show random slide show -threaded caching - Music section ------------- browse folders (MP shares) browse MP database for artist,albums,songs add title to playlist +play files locally view playlist remove items from playlist clear playlist @@ -24,8 +31,8 @@ Video section ------------- -play an initial file on startup -experimental stream / open file with preview +browse folders (MP shares) +play files locally or in the MP NowPlaying ---------- @@ -38,13 +45,14 @@ Remote ------ most functions as on my remote -two more buttons for subtitle / osd -zoom button missing +set the power mode for power control +short push is sending WakeOnLan +long push will exti etc. the MP (see power mode) Main issues ------------ switch WIFI on (just msg now) save files from Android to MP progress task for downloads -done : multiply control of more then one MP -NowPlaying list show actual / count of items on top bar \ No newline at end of file +NowPlaying list show actual / count of items on top bar +add gfx \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/logo.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_asr.png =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_full.png =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_menu.png =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_osd.png =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_sub.png =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-21 16:49:31 UTC (rev 4075) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-21 19:03:28 UTC (rev 4076) @@ -9,7 +9,7 @@ android:layout_width="wrap_content"> <ImageButton android:id="@+id/crtl_mp" - android:layout_height="60dip" android:layout_width="100dip" android:background="@drawable/icon"> + android:layout_height="60dip" android:layout_width="100dip" android:background="@drawable/logo"> </ImageButton> <ImageButton android:id="@+id/crtl_up" android:layout_width="100dip" android:layout_height="60dip" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2011-01-21 16:49:31 UTC (rev 4075) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2011-01-21 19:03:28 UTC (rev 4076) @@ -9,7 +9,7 @@ android:layout_width="wrap_content"> <ImageButton android:id="@+id/crtl_mp" - android:layout_height="60dip" android:layout_width="100dip" android:background="@drawable/icon"> + android:layout_height="60dip" android:layout_width="100dip" android:background="@drawable/logo"> </ImageButton> <ImageButton android:id="@+id/crtl_up" android:layout_width="100dip" android:layout_height="60dip" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-01-21 16:49:31 UTC (rev 4075) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-01-21 19:03:28 UTC (rev 4076) @@ -147,11 +147,10 @@ public static CharSequence[] getNames() { - CharSequence[] ret = new CharSequence[4]; + CharSequence[] ret = new CharSequence[3]; ret[0] = getName1(); ret[1] = getName2(); ret[2] = getName3(); - ret[3] = "Cancel"; return ret; } Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 =================================================================== --- trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-21 16:49:31 UTC (rev 4075) +++ trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-21 19:03:28 UTC (rev 4076) @@ -145,15 +145,15 @@ <UpdateUrl /> <Version> <Major>0</Major> - <Minor>1</Minor> - <Build>1</Build> + <Minor>2</Minor> + <Build>0</Build> <Revision>0</Revision> </Version> <ExtensionDescription>Control your MediaPortal with yout Android. It can be used as a remote control or doing many other things like music, pictures and video control. Gfx has been done by oddfella and some additional coding is from rolls1400. Have fun.</ExtensionDescription> - <VersionDescription>initial release</VersionDescription> + <VersionDescription>add video support, bug fixes, extend remote control</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation /> <ReleaseDate>2010-12-09T16:17:18.1693243+01:00</ReleaseDate> Added: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.011 =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.011 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/main.jpg =================================================================== (Binary files differ) Added: trunk/plugins/AndroidRemote/Release/main_menu.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/main_menu.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Release/remote.jpg =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Release/remote2.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/remote3.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/settings.jpg =================================================================== (Binary files differ) Added: trunk/plugins/AndroidRemote/Release/settings2.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/settings2.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs 2011-01-21 16:49:31 UTC (rev 4075) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs 2011-01-21 19:03:28 UTC (rev 4076) @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.0.0")] -[assembly: AssemblyFileVersion("0.1.0.0")] +[assembly: AssemblyVersion("0.2.0.0")] +[assembly: AssemblyFileVersion("0.2.0.0")] Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-23 16:56:32
|
Revision: 4077 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4077&view=rev Author: kroko_koenig Date: 2011-01-23 16:56:25 +0000 (Sun, 23 Jan 2011) Log Message: ----------- fix exception top handler Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Release/video.jpg trunk/plugins/AndroidRemote/Release/video2.jpg Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-21 19:03:28 UTC (rev 4076) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-23 16:56:25 UTC (rev 4077) @@ -5,6 +5,7 @@ switch off / hibernate etc. your MP from the remote vibration feedback show what actual playing on the main screen and pause / skip control +usese VLC to stream to the phone Pictures section ---------------- @@ -48,6 +49,8 @@ set the power mode for power control short push is sending WakeOnLan long push will exti etc. the MP (see power mode) +volume buttons will do vol +/- of the mp +menu opens the keyboard Main issues ------------ Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-21 19:03:28 UTC (rev 4076) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-23 16:56:25 UTC (rev 4077) @@ -73,6 +73,8 @@ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); + + Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); KeyLock.setKeyguardManager((KeyguardManager) getSystemService(Activity.KEYGUARD_SERVICE)); Vibration @@ -86,7 +88,7 @@ chkStatus(); Intent myIntent = new Intent(this, Splash.class); - startActivityForResult(myIntent, 0); + startActivity(myIntent); } // create MP folder @@ -121,8 +123,6 @@ } - Thread.setDefaultUncaughtExceptionHandler(new TopExceptionHandler(this)); - // Navigation Buttons Button btnPictures = (Button) findViewById(R.id.btn_main_pictures); @@ -175,7 +175,7 @@ btnSettings.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Vibration.vibrateShort(); - + Toast.makeText(view.getContext(), "not implemented yet. Sorry !", Toast.LENGTH_SHORT) .show(); @@ -281,8 +281,21 @@ } private boolean reportExist() { - File f = new File("stack.trace"); - return f.exists(); + + try + { + BufferedReader reader = new BufferedReader(new InputStreamReader( + this.openFileInput("stack.trace"))); + reader.close(); + + return true; + } + catch (Exception ex){} + + return false; + + //File f = new File("stack.trace"); + //return f.exists(); } private void sendReport() { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-21 19:03:28 UTC (rev 4076) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-23 16:56:25 UTC (rev 4077) @@ -59,7 +59,7 @@ } report += "-------------------------------\n\n"; - report += "Remote Version : initial release\n\n"; + report += "Remote Version : 2nd version\n\n"; report += "-------------------------------\n\n"; report += "--------- Device ---------\n\n"; report += "Brand: " + Build.BRAND + "\n"; Modified: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) Added: trunk/plugins/AndroidRemote/Release/video.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/video.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Release/video2.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/video2.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-21 19:03:28 UTC (rev 4076) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-23 16:56:25 UTC (rev 4077) @@ -75,6 +75,36 @@ cacheDB.IsBackground = true; cacheDB.Priority = ThreadPriority.Lowest; cacheDB.Start(); + + logInfo("Init vlc palyer"); + + string sVlcPath; + Microsoft.Win32.RegistryKey regkeyVlcInstallPathKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\VideoLAN\VLC"); + if (regkeyVlcInstallPathKey != null) + { + sVlcPath = (string)regkeyVlcInstallPathKey.GetValue("InstallDir", ""); + + string[] args = new string[] + { + "--audio-desync=-50", + "--no-sout-rtp-sap", + "--sout-transcode-fps=15", + "--sout-rtp-caching=2000", + "--sout-transcode-threads=4", + "--sout-transcode-high-priority", + "--sout-keep", + "--sout=#duplicate{dst='transcode{venc=x264{profile=baseline,level=3,keyint=30,bframes=0,no-cabac,ref=1,no-interlaced,vbv-maxrate=512,vbv-bufsize=256,aq-mode=0,no-mbtree,partitions=none,no-weightb,weightp=0,me=dia,subme=0,no-mixed-refs,no-8x8dct,trellis=0},vcodec=h264,vb=512,vfilter=canvas{width=320,height=160,aspect=320:160,padd},soverlay,aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=96,channels=2,audio-sync}:gather:rtp{sdp=rtsp://0.0.0.0:5554/MediaPortal.sdp,mp4a-latm}',dst='transcode{vcodec=null,acodec=mp3,ab=160,channels=2}:gather:std{access=http,mux=raw,dst=0.0.0.0:8081}'}", + "-I", + "dumy", + "--no-ignore-config", + "--no-osd", + //"--plugin-path=" + System.IO.Path.Combine(sVlcPath , "plugins") + }; + AndroidServer.vlc = new VideoLan.VlcControl(args); + + AndroidServer.vlc.Visible = false; + GUIGraphicsContext.form.Controls.Add(AndroidServer.vlc); + } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-21 19:03:28 UTC (rev 4076) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-23 16:56:25 UTC (rev 4077) @@ -565,35 +565,7 @@ if (AndroidServer.vlc != null) { if (AndroidServer.vlc.IsPlaying) AndroidServer.vlc.Stop(); - } - string sVlcPath; - Microsoft.Win32.RegistryKey regkeyVlcInstallPathKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\VideoLAN\VLC"); - if (regkeyVlcInstallPathKey != null) - { - - sVlcPath = (string)regkeyVlcInstallPathKey.GetValue("InstallDir", ""); - - string[] args = new string[] - { - "--audio-desync=-50", - "--no-sout-rtp-sap", - "--sout-transcode-fps=15", - "--sout-rtp-caching=2000", - "--sout-transcode-threads=4", - "--sout-transcode-high-priority", - "--sout-keep", - "--sout=#duplicate{dst='transcode{venc=x264{profile=baseline,level=3,keyint=30,bframes=0,no-cabac,ref=1,no-interlaced,vbv-maxrate=512,vbv-bufsize=256,aq-mode=0,no-mbtree,partitions=none,no-weightb,weightp=0,me=dia,subme=0,no-mixed-refs,no-8x8dct,trellis=0},vcodec=h264,vb=512,vfilter=canvas{width=320,height=160,aspect=320:160,padd},soverlay,aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=96,channels=2,audio-sync}:gather:rtp{sdp=rtsp://0.0.0.0:5554/MediaPortal.sdp,mp4a-latm}',dst='transcode{vcodec=null,acodec=mp3,ab=160,channels=2}:gather:std{access=http,mux=raw,dst=0.0.0.0:8081}'}", - "-I", - "dumy", - "--no-ignore-config", - "--no-osd", - //"--plugin-path=" + System.IO.Path.Combine(sVlcPath , "plugins") - }; - - if (AndroidServer.vlc == null) - AndroidServer.vlc = new VideoLan.VlcControl(args); - string filename = data["filename"].Replace("/", "\\"); directoryList = GetMpShare("movies"); @@ -610,8 +582,8 @@ { // why ever } - } + #endregion #region play video file Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-23 21:11:07
|
Revision: 4078 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4078&view=rev Author: kroko_koenig Date: 2011-01-23 21:10:56 +0000 (Sun, 23 Jan 2011) Log Message: ----------- some changes to avoid exceptions.. remove brush for now Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playnowlist.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03b.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup_ip.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/webradio.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/SomeUtils.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup_ip.xml Removed Paths: ------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/brush.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote02.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote02.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_02.java Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="mediaportal.remote" android:versionCode="1" - android:versionName="1.0"> + package="mediaportal.remote" android:versionName="1.1" android:versionCode="1"> <application android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-23 21:10:56 UTC (rev 4078) @@ -21,109 +21,97 @@ public static final int audio=0x7f020004; public static final int back=0x7f020005; public static final int border=0x7f020006; - public static final int brush=0x7f020007; - public static final int cdcover=0x7f020008; - public static final int channel_m=0x7f020009; - public static final int channel_p=0x7f02000a; - public static final int document=0x7f02000b; - public static final int down=0x7f02000c; - public static final int empty=0x7f02000d; - public static final int exit=0x7f02000e; - public static final int folder=0x7f02000f; - public static final int folderback=0x7f020010; - public static final int foldertab=0x7f020011; - public static final int foldertab_off=0x7f020012; - public static final int forward=0x7f020013; - public static final int hibernate=0x7f020014; - public static final int home=0x7f020015; - public static final int ic_tab=0x7f020016; - public static final int ic_tab1=0x7f020017; - public static final int ic_tab2=0x7f020018; - public static final int ic_tab3=0x7f020019; - public static final int ic_tab4=0x7f02001a; - public static final int icon=0x7f02001b; - public static final int info=0x7f02001c; - public static final int left=0x7f02001d; - public static final int logo=0x7f02001e; - public static final int main_music=0x7f02001f; - public static final int main_now_playing=0x7f020020; - public static final int main_pictures=0x7f020021; - public static final int main_remote=0x7f020022; - public static final int main_settings=0x7f020023; - public static final int main_video=0x7f020024; - public static final int menu=0x7f020025; - public static final int movie=0x7f020026; - public static final int music=0x7f020027; - public static final int mute=0x7f020028; - public static final int n_asr=0x7f020029; - public static final int n_full=0x7f02002a; - public static final int n_menu=0x7f02002b; - public static final int n_osd=0x7f02002c; - public static final int n_sub=0x7f02002d; - public static final int now_playing=0x7f02002e; - public static final int pause=0x7f02002f; - public static final int picture=0x7f020030; - public static final int pictures=0x7f020031; - public static final int play=0x7f020032; - public static final int plugins=0x7f020033; - public static final int power_off=0x7f020034; - public static final int remote=0x7f020035; - public static final int restart=0x7f020036; - public static final int rewind=0x7f020037; - public static final int right=0x7f020038; - public static final int sel_play=0x7f020039; - public static final int sel_skp_back=0x7f02003a; - public static final int sel_skp_forw=0x7f02003b; - public static final int select=0x7f02003c; - public static final int select2=0x7f02003d; - public static final int settings=0x7f02003e; - public static final int skip_back=0x7f02003f; - public static final int skip_forward=0x7f020040; - public static final int song=0x7f020041; - public static final int song_off=0x7f020042; - public static final int splash=0x7f020043; - public static final int splash02=0x7f020044; - public static final int stop=0x7f020045; - public static final int suspend=0x7f020046; - public static final int up=0x7f020047; - public static final int video=0x7f020048; - public static final int volume_m=0x7f020049; - public static final int volume_p=0x7f02004a; - public static final int wake_on_lan=0x7f02004b; + public static final int cdcover=0x7f020007; + public static final int channel_m=0x7f020008; + public static final int channel_p=0x7f020009; + public static final int document=0x7f02000a; + public static final int down=0x7f02000b; + public static final int empty=0x7f02000c; + public static final int exit=0x7f02000d; + public static final int folder=0x7f02000e; + public static final int folderback=0x7f02000f; + public static final int foldertab=0x7f020010; + public static final int foldertab_off=0x7f020011; + public static final int forward=0x7f020012; + public static final int hibernate=0x7f020013; + public static final int home=0x7f020014; + public static final int ic_tab=0x7f020015; + public static final int ic_tab1=0x7f020016; + public static final int ic_tab2=0x7f020017; + public static final int ic_tab3=0x7f020018; + public static final int ic_tab4=0x7f020019; + public static final int icon=0x7f02001a; + public static final int info=0x7f02001b; + public static final int left=0x7f02001c; + public static final int logo=0x7f02001d; + public static final int main_music=0x7f02001e; + public static final int main_now_playing=0x7f02001f; + public static final int main_pictures=0x7f020020; + public static final int main_remote=0x7f020021; + public static final int main_settings=0x7f020022; + public static final int main_video=0x7f020023; + public static final int menu=0x7f020024; + public static final int movie=0x7f020025; + public static final int music=0x7f020026; + public static final int mute=0x7f020027; + public static final int n_asr=0x7f020028; + public static final int n_full=0x7f020029; + public static final int n_menu=0x7f02002a; + public static final int n_osd=0x7f02002b; + public static final int n_sub=0x7f02002c; + public static final int now_playing=0x7f02002d; + public static final int pause=0x7f02002e; + public static final int picture=0x7f02002f; + public static final int pictures=0x7f020030; + public static final int play=0x7f020031; + public static final int plugins=0x7f020032; + public static final int power_off=0x7f020033; + public static final int remote=0x7f020034; + public static final int restart=0x7f020035; + public static final int rewind=0x7f020036; + public static final int right=0x7f020037; + public static final int sel_play=0x7f020038; + public static final int sel_skp_back=0x7f020039; + public static final int sel_skp_forw=0x7f02003a; + public static final int select=0x7f02003b; + public static final int select2=0x7f02003c; + public static final int settings=0x7f02003d; + public static final int skip_back=0x7f02003e; + public static final int skip_forward=0x7f02003f; + public static final int song=0x7f020040; + public static final int song_off=0x7f020041; + public static final int splash=0x7f020042; + public static final int splash02=0x7f020043; + public static final int stop=0x7f020044; + public static final int suspend=0x7f020045; + public static final int up=0x7f020046; + public static final int video=0x7f020047; + public static final int volume_m=0x7f020048; + public static final int volume_p=0x7f020049; + public static final int wake_on_lan=0x7f02004a; } public static final class id { public static final int GridView01=0x7f070014; public static final int ImageView01=0x7f07001d; - public static final int LinearLayout00=0x7f07005c; + public static final int LinearLayout00=0x7f070050; public static final int LinearLayout01=0x7f070024; - public static final int LinearLayout02=0x7f070067; - public static final int LinearLayout03=0x7f070071; - public static final int LinearLayout04=0x7f07007b; - public static final int LinearLayout05=0x7f070081; + public static final int LinearLayout02=0x7f07005b; + public static final int LinearLayout03=0x7f070065; + public static final int LinearLayout04=0x7f07006f; + public static final int LinearLayout05=0x7f070075; public static final int ListView01=0x7f070032; - public static final int Spinner01=0x7f07008c; + public static final int Spinner01=0x7f070080; public static final int SurfaceView01=0x7f070023; - public static final int TableLayout01=0x7f070005; + public static final int TableLayout01=0x7f070006; public static final int TableLayout02=0x7f070041; public static final int TableRow01=0x7f070007; public static final int TableRow02=0x7f070046; public static final int TableRow03=0x7f07004b; public static final int TextView01=0x7f070003; public static final int TextView02=0x7f070004; - public static final int btnChannelDown=0x7f070055; - public static final int btnChannelUp=0x7f070052; - public static final int btnExit=0x7f070056; - public static final int btnHibernate=0x7f070058; - public static final int btnIpSettings=0x7f07008e; - public static final int btnRestart=0x7f070059; + public static final int btnIpSettings=0x7f070082; public static final int btnSelDown=0x7f07001a; public static final int btnSelUp=0x7f07001b; - public static final int btnShutOff=0x7f07005a; - public static final int btnSuspend=0x7f070057; - public static final int btnVolumeDown=0x7f070054; - public static final int btnVolumeMute=0x7f070053; - public static final int btnVolumeUp=0x7f070051; - public static final int btnWakeOnLan=0x7f07005b; public static final int btn_main_music=0x7f070009; public static final int btn_main_now_playing=0x7f07000c; public static final int btn_main_pictures=0x7f070008; @@ -133,53 +121,53 @@ public static final int btn_main_skp_back=0x7f07000f; public static final int btn_main_skp_forw=0x7f070011; public static final int btn_main_video=0x7f07000a; - public static final int btnkey01=0x7f07005d; - public static final int btnkey02=0x7f07005e; - public static final int btnkey03=0x7f07005f; - public static final int btnkey04=0x7f070060; - public static final int btnkey05=0x7f070061; - public static final int btnkey06=0x7f070062; - public static final int btnkey07=0x7f070063; - public static final int btnkey08=0x7f070064; - public static final int btnkey09=0x7f070065; - public static final int btnkey10=0x7f070066; - public static final int btnkey11=0x7f070068; - public static final int btnkey12=0x7f070069; - public static final int btnkey13=0x7f07006a; - public static final int btnkey14=0x7f07006b; - public static final int btnkey15=0x7f07006c; - public static final int btnkey16=0x7f07006d; - public static final int btnkey17=0x7f07006e; - public static final int btnkey18=0x7f07006f; - public static final int btnkey19=0x7f070070; - public static final int btnkey20=0x7f070072; - public static final int btnkey21=0x7f070073; - public static final int btnkey22=0x7f070074; - public static final int btnkey23=0x7f070075; - public static final int btnkey24=0x7f070076; - public static final int btnkey25=0x7f070077; - public static final int btnkey26=0x7f070078; - public static final int btnkey27=0x7f070079; - public static final int btnkey28=0x7f07007a; - public static final int btnkey29=0x7f07007c; - public static final int btnkey30=0x7f07007d; - public static final int btnkey31=0x7f07007e; - public static final int btnkey32=0x7f07007f; - public static final int btnkey33=0x7f070080; - public static final int btnkey41=0x7f070082; - public static final int btnkey42=0x7f070083; - public static final int btnkey43=0x7f070084; - public static final int btnkey44=0x7f070085; - public static final int btnkey45=0x7f070086; - public static final int btnkey46=0x7f070087; - public static final int btnkey47=0x7f070088; - public static final int btnkey48=0x7f070089; - public static final int btnkey49=0x7f07008a; - public static final int btnkey50=0x7f07008b; + public static final int btnkey01=0x7f070051; + public static final int btnkey02=0x7f070052; + public static final int btnkey03=0x7f070053; + public static final int btnkey04=0x7f070054; + public static final int btnkey05=0x7f070055; + public static final int btnkey06=0x7f070056; + public static final int btnkey07=0x7f070057; + public static final int btnkey08=0x7f070058; + public static final int btnkey09=0x7f070059; + public static final int btnkey10=0x7f07005a; + public static final int btnkey11=0x7f07005c; + public static final int btnkey12=0x7f07005d; + public static final int btnkey13=0x7f07005e; + public static final int btnkey14=0x7f07005f; + public static final int btnkey15=0x7f070060; + public static final int btnkey16=0x7f070061; + public static final int btnkey17=0x7f070062; + public static final int btnkey18=0x7f070063; + public static final int btnkey19=0x7f070064; + public static final int btnkey20=0x7f070066; + public static final int btnkey21=0x7f070067; + public static final int btnkey22=0x7f070068; + public static final int btnkey23=0x7f070069; + public static final int btnkey24=0x7f07006a; + public static final int btnkey25=0x7f07006b; + public static final int btnkey26=0x7f07006c; + public static final int btnkey27=0x7f07006d; + public static final int btnkey28=0x7f07006e; + public static final int btnkey29=0x7f070070; + public static final int btnkey30=0x7f070071; + public static final int btnkey31=0x7f070072; + public static final int btnkey32=0x7f070073; + public static final int btnkey33=0x7f070074; + public static final int btnkey41=0x7f070076; + public static final int btnkey42=0x7f070077; + public static final int btnkey43=0x7f070078; + public static final int btnkey44=0x7f070079; + public static final int btnkey45=0x7f07007a; + public static final int btnkey46=0x7f07007b; + public static final int btnkey47=0x7f07007c; + public static final int btnkey48=0x7f07007d; + public static final int btnkey49=0x7f07007e; + public static final int btnkey50=0x7f07007f; public static final int button_open=0x7f070020; public static final int button_stream=0x7f070021; public static final int button_stream_stop=0x7f070022; - public static final int clearplaylist=0x7f07009b; + public static final int clearplaylist=0x7f07008f; public static final int crtl_back=0x7f07003e; public static final int crtl_ch_m=0x7f07004a; public static final int crtl_ch_p=0x7f070045; @@ -212,7 +200,6 @@ public static final int list_song=0x7f070019; public static final int main_now_playing=0x7f07000e; public static final int music_grid=0x7f070015; - public static final int naviRemote_text=0x7f070050; public static final int now_album=0x7f070026; public static final int now_artist=0x7f07002c; public static final int now_cd=0x7f070027; @@ -226,29 +213,29 @@ public static final int now_progress=0x7f070028; public static final int now_stop=0x7f07002e; public static final int now_title=0x7f07002b; - public static final int open=0x7f07009e; - public static final int playlist=0x7f07009a; - public static final int radio01=0x7f070095; - public static final int radio02=0x7f070096; - public static final int radio03=0x7f070097; - public static final int radio04=0x7f070098; - public static final int radioStop=0x7f070099; - public static final int rslide=0x7f0700a1; - public static final int save=0x7f07009d; - public static final int sdcard=0x7f07009c; - public static final int send=0x7f07009f; - public static final int server_ip=0x7f07008f; - public static final int server_macid=0x7f070091; - public static final int server_name=0x7f070093; - public static final int server_port=0x7f070090; - public static final int slide=0x7f0700a0; + public static final int open=0x7f070092; + public static final int playlist=0x7f07008e; + public static final int radio01=0x7f070089; + public static final int radio02=0x7f07008a; + public static final int radio03=0x7f07008b; + public static final int radio04=0x7f07008c; + public static final int radioStop=0x7f07008d; + public static final int rslide=0x7f070095; + public static final int save=0x7f070091; + public static final int sdcard=0x7f070090; + public static final int send=0x7f070093; + public static final int server_ip=0x7f070085; + public static final int server_macid=0x7f070087; + public static final int server_name=0x7f070084; + public static final int server_port=0x7f070086; + public static final int slide=0x7f070094; public static final int text_kb_streamed=0x7f07001e; - public static final int title=0x7f070094; + public static final int title=0x7f070088; public static final int txtDirectory=0x7f070013; public static final int txtFile=0x7f07001f; - public static final int txtInstance=0x7f070006; - public static final int txtIntanceName=0x7f070092; - public static final int vibration=0x7f07008d; + public static final int txtInstance=0x7f070005; + public static final int txtIntanceName=0x7f070083; + public static final int vibration=0x7f070081; public static final int widget0=0x7f070012; public static final int widget00=0x7f070033; public static final int widget01=0x7f070037; @@ -272,14 +259,13 @@ public static final int playingnow=0x7f03000d; public static final int playnowlist=0x7f03000e; public static final int remote01=0x7f03000f; - public static final int remote02=0x7f030010; - public static final int remote03=0x7f030011; - public static final int remote03b=0x7f030012; - public static final int setup=0x7f030013; - public static final int setup_ip=0x7f030014; - public static final int splash=0x7f030015; - public static final int title=0x7f030016; - public static final int webradio=0x7f030017; + public static final int remote03=0x7f030010; + public static final int remote03b=0x7f030011; + public static final int setup=0x7f030012; + public static final int setup_ip=0x7f030013; + public static final int splash=0x7f030014; + public static final int title=0x7f030015; + public static final int webradio=0x7f030016; } public static final class menu { public static final int music_menu=0x7f060000; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-23 21:10:56 UTC (rev 4078) @@ -5,7 +5,8 @@ switch off / hibernate etc. your MP from the remote vibration feedback show what actual playing on the main screen and pause / skip control -usese VLC to stream to the phone +uses VLC to stream to the phone +send crash report Pictures section ---------------- @@ -48,7 +49,7 @@ most functions as on my remote set the power mode for power control short push is sending WakeOnLan -long push will exti etc. the MP (see power mode) +long push will exit etc. the MP (see power mode) volume buttons will do vol +/- of the mp menu opens the keyboard @@ -58,4 +59,14 @@ save files from Android to MP progress task for downloads NowPlaying list show actual / count of items on top bar -add gfx \ No newline at end of file +add gfx + +NEW (after 2nd) +- fix for folder like //pictures//pictures//bla... +- fix display folder %20 +- pointer for thumb caching always to zero on execute fetching +- removed brush to have better contrast + +ActivityNotFoundException (MP3) added chooser +IndexOutOfBoundsException (pictures) hopefully now changed + Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/brush.png =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" - android:layout_height="fill_parent" android:background="@drawable/brush"> + android:layout_height="fill_parent"> +<TextView android:layout_height="wrap_content" android:text="HTPC" android:textColor="#FF000000" android:textStyle="bold" android:textSize="20dip" android:gravity="center_horizontal" android:id="@+id/txtInstance" android:background="#FFA9A9A9" android:layout_width="fill_parent"></TextView> + <TableLayout android:id="@+id/TableLayout01" xmlns:android="http://schemas.android.com/apk/res/android" @@ -11,7 +13,7 @@ android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> -<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="HTPC" android:textColor="#FF000000" android:textStyle="bold" android:textSize="20dip" android:gravity="center_horizontal" android:id="@+id/txtInstance"></TextView><TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> +<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> <Button android:background="@drawable/main_pictures" android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" @@ -61,7 +63,7 @@ </TextView> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" android:background="#0FF0FFFF" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> + android:orientation="horizontal" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> <Button android:scaleType="fitXY" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,7 +1,6 @@ <LinearLayout android:id="@+id/LinearLayout01" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background="@drawable/brush" xmlns:android="http://schemas.android.com/apk/res/android"> <TextView android:id="@+id/now_playing" android:layout_width="fill_parent" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playnowlist.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playnowlist.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playnowlist.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="@drawable/brush"> + android:layout_height="fill_parent"> <TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:text="Actual playlist" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:orientation="vertical" android:background="@drawable/brush" - xmlns:android="http://schemas.android.com/apk/res/android"> + android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout android:id="@+id/widget00" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote02.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote02.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote02.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout android:id="@+id/widget0" - android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background = "@drawable/brush" - android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"> - - <TextView android:id="@+id/naviRemote_text" - android:layout_width="fill_parent" android:layout_height="wrap_content" - android:text="Remote 02" android:gravity="center_horizontal" - android:textSize="15dip" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:padding="5dip"> - </TextView> - - <LinearLayout android:id="@+id/widget00" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="10dip" android:layout_gravity="center_horizontal"> - - <Button android:id="@+id/btnVolumeUp" android:layout_width="80dip" - android:layout_height="60dip" android:background="@drawable/volume_p"> - </Button> - - <Button android:id="@+id/btnChannelUp" android:layout_width="80dip" - android:layout_marginLeft="40dip" android:layout_height="60dip" - android:background="@drawable/channel_p"> - </Button> - </LinearLayout> - - <LinearLayout android:id="@+id/widget00" - android:layout_height="wrap_content" android:layout_width="wrap_content" - android:layout_gravity="center_vertical"> - - <Button android:layout_width="80dip" android:layout_height="60dip" - android:id="@+id/btnVolumeMute" android:background="@drawable/mute"> - </Button> - - </LinearLayout> - - <LinearLayout android:id="@+id/widget00" - android:layout_height="wrap_content" android:layout_width="wrap_content" - android:layout_gravity="center_vertical" android:paddingBottom="5dip"> - - <Button android:id="@+id/btnVolumeDown" android:layout_width="80dip" - - android:layout_height="60dip" android:background="@drawable/volume_m"> - </Button> - - <Button android:id="@+id/btnChannelDown" android:layout_width="80dip" - android:layout_marginLeft="40dip" android:layout_height="60dip" android:background="@drawable/channel_m"> - </Button> - </LinearLayout> - - <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="Power control" - android:gravity="center_horizontal" android:textSize="15dip" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:padding="5dip"> - </TextView> - - <LinearLayout android:id="@+id/widget00" - android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" - android:id="@+id/btnExit" android:gravity="bottom|center" android:background="@drawable/exit"> - </Button> - - <Button android:textSize="12dip" android:layout_height="60dip" - android:textColor="#FFFFFFFF" android:id="@+id/btnSuspend" - android:gravity="bottom|center" - android:layout_width="60dip" android:background="@drawable/suspend"> - </Button> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnHibernate" - android:gravity="bottom|center" android:background="@drawable/hibernate"> - </Button> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnRestart" - android:gravity="bottom|center" android:background="@drawable/restart"> - </Button> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnShutOff" - android:gravity="bottom|center" android:background="@drawable/power_off"> - </Button> - </LinearLayout> - - <LinearLayout android:id="@+id/widget00" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="10dip" android:layout_gravity="center_horizontal"> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnWakeOnLan" - android:gravity="bottom|center" android:background="@drawable/wake_on_lan"> - </Button> - </LinearLayout> - -</LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,14 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/LinearLayout00" xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" android:orientation="vertical" android:layout_height="wrap_content" android:background="@drawable/brush"> + android:layout_width="fill_parent" android:orientation="vertical" android:layout_height="wrap_content"> - <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="Remote 03" - android:gravity="center_horizontal" android:background="#FFA9A9A9" - android:textSize="15dip" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:padding="5dip"> - </TextView> + <LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03b.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03b.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote03b.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,14 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/LinearLayout00" xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" android:orientation="vertical" android:layout_height="wrap_content" android:background="@drawable/brush"> + android:layout_width="fill_parent" android:orientation="vertical" android:layout_height="wrap_content"> - <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="Remote 03" - android:gravity="center_horizontal" android:background="#FFA9A9A9" - android:textSize="15dip" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:padding="5dip"> - </TextView> + <LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,22 +1,18 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:orientation="vertical" android:padding="15dip" - android:background="@drawable/brush"> + android:orientation="vertical" android:padding="15dip"> <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:textColor="#FF000000" - android:textSize="24dip" android:text="Global settings" android:paddingBottom="10dip"></TextView> + android:layout_height="wrap_content" android:textSize="24dip" android:text="Global settings" android:paddingBottom="10dip" android:textColor="#FFFFFFFF"></TextView> <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:textColor="#FF000000" - android:textSize="18dip" android:text="Power Mode"></TextView> + android:layout_height="wrap_content" android:textSize="18dip" android:text="Power Mode" android:textColor="#FFFFFFFF"></TextView> <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" android:layout_height="wrap_content"></Spinner> <CheckBox android:layout_width="wrap_content" - android:layout_height="wrap_content" android:textColor="#000" - android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback"></CheckBox><Button android:layout_height="wrap_content" android:id="@+id/btnIpSettings" android:text="IP settings" android:layout_width="fill_parent" android:layout_marginTop="20dip"></Button> + android:layout_height="wrap_content" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback" android:textColor="#FFFFFFFF"></CheckBox><Button android:layout_height="wrap_content" android:id="@+id/btnIpSettings" android:text="IP settings" android:layout_width="fill_parent" android:layout_marginTop="20dip"></Button> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup_ip.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup_ip.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup_ip.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,28 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:orientation="vertical" android:padding="15dip" - android:background="@drawable/brush"> + android:orientation="vertical" android:padding="15dip"> - <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtIntanceName" android:textColor="#FF000000" android:text="Instance Name : 0" android:textSize="20dip"></TextView> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtIntanceName" android:text="Instance Name : 0" android:textSize="20dip" android:textColor="#FFFFFFFF"></TextView> <EditText android:id="@+id/server_name" android:layout_height="wrap_content" android:layout_width="fill_parent" android:inputType="text" android:text="HTPC"></EditText> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="MediaPortal IP" - android:textColor="#FF000000" android:textSize="18dip"> + android:textSize="18dip" android:textColor="#FFFFFFFF"> </TextView> <EditText android:id="@+id/server_ip" android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="text"></EditText> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="MediaPortal Port" - android:textColor="#FF000000" android:textSize="18dip"></TextView> + android:textSize="18dip" android:textColor="#FFFFFFFF"></TextView> <EditText android:id="@+id/server_port" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="8200" android:inputType="phone"></EditText> <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:textColor="#FF000000" - android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> + android:layout_height="wrap_content" android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)" android:textColor="#FFFFFFFF"></TextView> <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="12-34-56-78-90-12" android:inputType="text"></EditText> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/webradio.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/webradio.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/webradio.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" - android:layout_height="fill_parent" android:background="@drawable/brush"> + android:layout_height="fill_parent"> <Button android:text="Webradio 01" android:id="@+id/radio01" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" - android:layout_height="fill_parent" android:background="@drawable/brush"> + android:layout_height="fill_parent"> +<TextView android:layout_height="wrap_content" android:text="HTPC" android:textColor="#FF000000" android:textStyle="bold" android:textSize="20dip" android:gravity="center_horizontal" android:id="@+id/txtInstance" android:background="#FFA9A9A9" android:layout_width="fill_parent"></TextView> + <TableLayout android:id="@+id/TableLayout01" xmlns:android="http://schemas.android.com/apk/res/android" @@ -11,7 +13,7 @@ android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> -<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> +<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="3dip"> <Button android:background="@drawable/main_pictures" android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" @@ -25,7 +27,7 @@ </TableRow> - <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> + <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="3dip"> <Button android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" @@ -33,12 +35,12 @@ </Button> <Button android:layout_height="80dip" android:layout_width="80dip" - android:scaleType="fitXY" android:padding="5dip" android:background="@drawable/main_remote" android:id="@+id/btn_main_remote"> + android:scaleType="fitXY" android:background="@drawable/main_remote" android:id="@+id/btn_main_remote" android:padding="5dip"> </Button> </TableRow> - <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="5dip"> + <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TableRow01" android:padding="3dip"> <Button android:scaleType="fitXY" android:layout_height="80dip" android:layout_width="80dip" @@ -56,11 +58,11 @@ <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="nothing playing" android:gravity="center_horizontal" android:textSize="15dip" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:padding="5dip" android:id="@+id/main_now_playing"> + android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:id="@+id/main_now_playing" android:padding="3dip"> </TextView> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" android:background="#0FF0FFFF" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> + android:orientation="horizontal" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="2dip"> <Button android:scaleType="fitXY" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,7 +1,6 @@ <LinearLayout android:id="@+id/LinearLayout01" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background="@drawable/brush" xmlns:android="http://schemas.android.com/apk/res/android"> <TextView android:id="@+id/now_playing" android:layout_width="fill_parent" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:orientation="vertical" android:background="@drawable/brush" - xmlns:android="http://schemas.android.com/apk/res/android"> + android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout android:id="@+id/widget00" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote02.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote02.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote02.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout android:id="@+id/widget0" - android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background = "@drawable/brush" - android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"> - - <TextView android:id="@+id/naviRemote_text" - android:layout_width="fill_parent" android:layout_height="wrap_content" - android:text="Remote 02" android:gravity="center_horizontal" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:textSize="15dip" android:padding="2dip"> - </TextView> - - <LinearLayout android:id="@+id/widget00" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginTop="0dip"> - - <Button android:id="@+id/btnVolumeUp" android:background="@drawable/volume_p" android:layout_height="50dip" android:layout_width="60dip"> - </Button> - - <Button android:id="@+id/btnChannelUp" android:layout_marginLeft="40dip" android:background="@drawable/channel_p" android:layout_height="50dip" android:layout_width="60dip"> - </Button> - </LinearLayout> - - <LinearLayout android:id="@+id/widget00" - android:layout_height="wrap_content" android:layout_width="wrap_content" - android:layout_gravity="center_vertical"> - - <Button android:id="@+id/btnVolumeMute" android:background="@drawable/mute" android:layout_height="50dip" android:layout_width="60dip"> - </Button> - - </LinearLayout> - - <LinearLayout android:id="@+id/widget00" - android:layout_height="wrap_content" android:layout_width="wrap_content" - android:layout_gravity="center_vertical" android:paddingBottom="5dip"> - - <Button android:id="@+id/btnVolumeDown" android:background="@drawable/volume_m" android:layout_height="50dip" android:layout_width="60dip"> - </Button> - - <Button android:id="@+id/btnChannelDown" android:layout_marginLeft="40dip" android:background="@drawable/channel_m" android:layout_height="50dip" android:layout_width="60dip"> - </Button> - </LinearLayout> - - <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="Power control" - android:gravity="center_horizontal" android:textSize="15dip" - android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:padding="2dip"> - </TextView> - - <LinearLayout android:id="@+id/widget00" - android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" - android:id="@+id/btnExit" android:gravity="bottom|center" android:background="@drawable/exit"> - </Button> - - <Button android:textSize="12dip" android:layout_height="60dip" - android:textColor="#FFFFFFFF" android:id="@+id/btnSuspend" - android:gravity="bottom|center" - android:layout_width="60dip" android:background="@drawable/suspend"> - </Button> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnHibernate" - android:gravity="bottom|center" android:background="@drawable/hibernate"> - </Button> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnRestart" - android:gravity="bottom|center" android:background="@drawable/restart"> - </Button> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnShutOff" - android:gravity="bottom|center" android:background="@drawable/power_off"> - </Button> - </LinearLayout> - - <LinearLayout android:id="@+id/widget00" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="10dip" android:layout_gravity="center_horizontal"> - - <Button android:layout_width="60dip" android:textSize="12dip" - android:layout_height="60dip" android:textColor="#FFFFFFFF" android:id="@+id/btnWakeOnLan" - android:gravity="bottom|center" android:background="@drawable/wake_on_lan"> - </Button> - </LinearLayout> - -</LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,34 +1,18 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:orientation="vertical" android:padding="15dip" - android:background="@drawable/brush"> + android:orientation="vertical" android:padding="15dip"> + <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="MediaPortal IP" - android:textColor="#FF000000" android:textSize="18dip"> - - </TextView> - <EditText android:id="@+id/server_ip" android:layout_width="fill_parent" android:text="192.168.0.30" - android:inputType="numberDecimal" android:layout_height="50dip"></EditText> + android:layout_height="wrap_content" android:textSize="24dip" android:text="Global settings" android:paddingBottom="10dip" android:textColor="#FFFFFFFF"></TextView> + <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:text="MediaPortal Port" - android:textColor="#FF000000" android:textSize="18dip"></TextView> - <EditText android:id="@+id/server_port" android:layout_width="fill_parent" - android:text="8200" - android:inputType="phone" android:layout_height="50dip"></EditText> - <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:textColor="#FF000000" - android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)"></TextView> - <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" - android:text="12-34-56-78-90-12" - android:inputType="text" android:layout_height="50dip"></EditText> - <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:textColor="#FF000000" - android:textSize="18dip" android:text="Power Mode"></TextView> - <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" android:layout_height="50dip"></Spinner> + android:layout_height="wrap_content" android:textSize="18dip" android:text="Power Mode" android:textColor="#FFFFFFFF"></TextView> + <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" + android:layout_height="wrap_content"></Spinner> <CheckBox android:layout_width="wrap_content" - android:textColor="#000" - android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback" android:layout_height="50dip"></CheckBox> + android:layout_height="wrap_content" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback" android:textColor="#FFFFFFFF"></CheckBox><Button android:layout_height="wrap_content" android:id="@+id/btnIpSettings" android:text="IP settings" android:layout_width="fill_parent" android:layout_marginTop="20dip"></Button> + </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup_ip.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup_ip.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/setup_ip.xml 2011-01-23 21:10:56 UTC (rev 4078) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" android:layout_height="fill_parent" + android:orientation="vertical" android:padding="15dip"> + + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtIntanceName" android:text="Instance Name : 0" android:textSize="20dip" android:textColor="#FFFFFFFF"></TextView> + <EditText android:id="@+id/server_name" android:layout_height="wrap_content" + android:layout_width="fill_parent" android:inputType="text" android:text="HTPC"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="MediaPortal IP" + android:textSize="18dip" android:textColor="#FFFFFFFF"> + + </TextView> + <EditText android:id="@+id/server_ip" android:layout_height="wrap_content" + android:layout_width="fill_parent" android:text="192.168.0.30" android:inputType="text"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="MediaPortal Port" + android:textSize="18dip" android:textColor="#FFFFFFFF"></TextView> + <EditText android:id="@+id/server_port" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="8200" + android:inputType="phone"></EditText> + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textSize="18dip" android:text="MediaPortal MAC (WakeOnLan)" android:textColor="#FFFFFFFF"></TextView> + <EditText android:id="@+id/server_macid" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="12-34-56-78-90-12" + android:inputType="text"></EditText> + + + + + + + + +</LinearLayout> Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_02.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_02.java 2011-01-23 16:56:25 UTC (rev 4077) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/control/Remote_02.java 2011-01-23 21:10:56 UTC (rev 4078) @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2005-2011 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Genera... [truncated message content] |
From: <kro...@us...> - 2011-01-24 20:11:41
|
Revision: 4079 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4079&view=rev Author: kroko_koenig Date: 2011-01-24 20:11:34 +0000 (Mon, 24 Jan 2011) Log Message: ----------- changed mime type for mp3 playback add vlc profiles uses video extensions Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java trunk/plugins/AndroidRemote/Release/Android Server communication.docx trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Release/setup2.jpg trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/VideoHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Release/320x160.opt trunk/plugins/AndroidRemote/Release/400x240.opt Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-24 20:11:34 UTC (rev 4079) @@ -61,12 +61,11 @@ NowPlaying list show actual / count of items on top bar add gfx -NEW (after 2nd) - fix for folder like //pictures//pictures//bla... - fix display folder %20 - pointer for thumb caching always to zero on execute fetching - removed brush to have better contrast -ActivityNotFoundException (MP3) added chooser -IndexOutOfBoundsException (pictures) hopefully now changed +- add profiles for vlc (server) +- use video extensions list Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java 2011-01-24 20:11:34 UTC (rev 4079) @@ -219,7 +219,7 @@ // automatically done on worker thread (separate from UI thread) protected Void doInBackground(final String... args) { try { - Thread.sleep(3000); + Thread.sleep(4000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java 2011-01-24 20:11:34 UTC (rev 4079) @@ -129,7 +129,7 @@ + selectedItem.File.replaceAll(" ", "%20"); Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setDataAndType(Uri.parse(link), "audio/mp3"); + intent.setDataAndType(Uri.parse(link), "audio/mpeg"); startActivity(intent); break; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java 2011-01-24 20:11:34 UTC (rev 4079) @@ -133,7 +133,7 @@ + ":" + AppSettings.getPort() + "/db_music/getfile?id=" + selectedItem.ID; Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setDataAndType(Uri.parse(link), "audio/mp3"); + intent.setDataAndType(Uri.parse(link), "audio/mpeg"); startActivity(Intent .createChooser(intent, "Choose player :")); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java 2011-01-24 20:11:34 UTC (rev 4079) @@ -121,7 +121,7 @@ + ":" + AppSettings.getPort() + "/db_music/getfile?id=" + selectedItem.ID; Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setDataAndType(Uri.parse(link), "audio/mp3"); + intent.setDataAndType(Uri.parse(link), "audio/mpeg"); startActivity(Intent .createChooser(intent, "Choose player :")); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-24 20:11:34 UTC (rev 4079) @@ -209,7 +209,8 @@ String file = server + actualDir.replaceAll(" ", "%20") + item.File + ".thb"; item.Picture = http.DownloadImage(file); - pictureList.set(picNo, item); + if (picNo < pictureList.size()) // very strange exeption happens here 10/10 + pictureList.set(picNo, item); break; } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-24 20:11:34 UTC (rev 4079) @@ -59,7 +59,7 @@ } report += "-------------------------------\n\n"; - report += "Remote Version : 23.01 / 22:00\n\n"; + report += "Remote Version : 24.01 / 21:00\n\n"; report += "-------------------------------\n\n"; report += "--------- Device ---------\n\n"; report += "Brand: " + Build.BRAND + "\n"; Added: trunk/plugins/AndroidRemote/Release/320x160.opt =================================================================== --- trunk/plugins/AndroidRemote/Release/320x160.opt (rev 0) +++ trunk/plugins/AndroidRemote/Release/320x160.opt 2011-01-24 20:11:34 UTC (rev 4079) @@ -0,0 +1 @@ +--audio-desync=-50 --no-sout-rtp-sap --sout-transcode-fps=15 --sout-rtp-caching=2000 --sout-transcode-threads=4 --sout-transcode-high-priority --sout-keep --sout=#transcode{venc=x264{profile=baseline,level=3,keyint=50,bframes=0,no-cabac,ref=1,no-interlaced,vbv-maxrate=600,vbv-bufsize=256,aq-mode=0,no-mbtree,partitions=none,no-weightb,weightp=0,me=dia,subme=0,no-mixed-refs,no-8x8dct,trellis=0},vcodec=h264,vb=600,vfilter=canvas{width=320,height=160,aspect=320:160,padd},soverlay,aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=96,channels=2,audio-sync}:gather:rtp{sdp=rtsp://0.0.0.0:5554/MediaPortal.sdp,mp4a-latm} \ No newline at end of file Added: trunk/plugins/AndroidRemote/Release/400x240.opt =================================================================== --- trunk/plugins/AndroidRemote/Release/400x240.opt (rev 0) +++ trunk/plugins/AndroidRemote/Release/400x240.opt 2011-01-24 20:11:34 UTC (rev 4079) @@ -0,0 +1 @@ +--audio-desync=-50 --no-sout-rtp-sap --sout-transcode-fps=15 --sout-rtp-caching=2000 --sout-transcode-threads=4 --sout-transcode-high-priority --sout-keep --sout=#transcode{venc=x264{profile=baseline,level=3,keyint=50,bframes=0,no-cabac,ref=1,no-interlaced,vbv-maxrate=600,vbv-bufsize=256,aq-mode=0,no-mbtree,partitions=none,no-weightb,weightp=0,me=dia,subme=0,no-mixed-refs,no-8x8dct,trellis=0},vcodec=h264,vb=600,vfilter=canvas{width=400,height=240,aspect=400:240,padd},soverlay,aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=96,channels=2,audio-sync}:gather:rtp{sdp=rtsp://0.0.0.0:5554/MediaPortal.sdp,mp4a-latm} \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Release/Android Server communication.docx =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 =================================================================== --- trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-24 20:11:34 UTC (rev 4079) @@ -24,6 +24,20 @@ <ZipFileName>Installer{CopyFile}\{b71d0b6b-5613-449f-98a4-50dee3c65c8c}-VideoLan.Interop.dll</ZipFileName> <DestinationFilename>%Plugins%\process\VideoLan.Interop.dll</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>320x160.opt</LocalFileName> + <ZipFileName>Installer{CopyFile}\{d83ef543-b029-4580-8919-c17047dd95f3}-320x160.opt</ZipFileName> + <DestinationFilename>%Plugins%\process\320x160.opt</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>400x240.opt</LocalFileName> + <ZipFileName>Installer{CopyFile}\{377f216a-a2c1-4dfe-aeb3-5ba04e448c72}-400x240.opt</ZipFileName> + <DestinationFilename>%Plugins%\process\400x240.opt</DestinationFilename> + </FileItem> </Items> </Files> </GroupItem> @@ -146,14 +160,14 @@ <Version> <Major>0</Major> <Minor>2</Minor> - <Build>0</Build> + <Build>1</Build> <Revision>0</Revision> </Version> <ExtensionDescription>Control your MediaPortal with yout Android. It can be used as a remote control or doing many other things like music, pictures and video control. Gfx has been done by oddfella and some additional coding is from rolls1400. Have fun.</ExtensionDescription> - <VersionDescription>add video support, bug fixes, extend remote control</VersionDescription> + <VersionDescription>uses video exentions, tweaked vlc settings</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation /> <ReleaseDate>2010-12-09T16:17:18.1693243+01:00</ReleaseDate> @@ -207,6 +221,20 @@ <ZipFileName>Installer{CopyFile}\{b71d0b6b-5613-449f-98a4-50dee3c65c8c}-VideoLan.Interop.dll</ZipFileName> <DestinationFilename>%Plugins%\process\VideoLan.Interop.dll</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>320x160.opt</LocalFileName> + <ZipFileName>Installer{CopyFile}\{d83ef543-b029-4580-8919-c17047dd95f3}-320x160.opt</ZipFileName> + <DestinationFilename>%Plugins%\process\320x160.opt</DestinationFilename> + </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>400x240.opt</LocalFileName> + <ZipFileName>Installer{CopyFile}\{377f216a-a2c1-4dfe-aeb3-5ba04e448c72}-400x240.opt</ZipFileName> + <DestinationFilename>%Plugins%\process\400x240.opt</DestinationFilename> + </FileItem> </Items> </UniqueFileList> <ProjectSettings> Modified: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/setup2.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidServer.cs 2011-01-24 20:11:34 UTC (rev 4079) @@ -25,6 +25,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.IO; using MediaPortal.Configuration; using MediaPortal.GUI.Library; @@ -45,8 +46,10 @@ private TcpListener myListener; public static string Server = string.Empty; public static string Port = string.Empty; - public static string VlcFile = string.Empty; + private string VlcFile = string.Empty; + public static string VideoExtension = string.Empty; + private Thread listen; private Thread grabPictures; private Thread cacheDB; @@ -76,7 +79,7 @@ cacheDB.Priority = ThreadPriority.Lowest; cacheDB.Start(); - logInfo("Init vlc palyer"); + logInfo("Init vlc player"); string sVlcPath; Microsoft.Win32.RegistryKey regkeyVlcInstallPathKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\VideoLAN\VLC"); @@ -93,21 +96,28 @@ "--sout-transcode-threads=4", "--sout-transcode-high-priority", "--sout-keep", - "--sout=#duplicate{dst='transcode{venc=x264{profile=baseline,level=3,keyint=30,bframes=0,no-cabac,ref=1,no-interlaced,vbv-maxrate=512,vbv-bufsize=256,aq-mode=0,no-mbtree,partitions=none,no-weightb,weightp=0,me=dia,subme=0,no-mixed-refs,no-8x8dct,trellis=0},vcodec=h264,vb=512,vfilter=canvas{width=320,height=160,aspect=320:160,padd},soverlay,aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=96,channels=2,audio-sync}:gather:rtp{sdp=rtsp://0.0.0.0:5554/MediaPortal.sdp,mp4a-latm}',dst='transcode{vcodec=null,acodec=mp3,ab=160,channels=2}:gather:std{access=http,mux=raw,dst=0.0.0.0:8081}'}", - "-I", - "dumy", - "--no-ignore-config", - "--no-osd", - //"--plugin-path=" + System.IO.Path.Combine(sVlcPath , "plugins") + "--sout=#duplicate{dst='transcode{venc=x264{profile=baseline,level=3,keyint=30,bframes=0,no-cabac,ref=1,no-interlaced,vbv-maxrate=512,vbv-bufsize=256,aq-mode=0,no-mbtree,partitions=none,no-weightb,weightp=0,me=dia,subme=0,no-mixed-refs,no-8x8dct,trellis=0},vcodec=h264,vb=512,vfilter=canvas{width=320,height=160,aspect=320:160,padd},soverlay,aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=96,channels=2,audio-sync}:gather:rtp{sdp=rtsp://0.0.0.0:5554/MediaPortal.sdp,mp4a-latm}',dst='transcode{vcodec=null,acodec=mp3,ab=160,channels=2}:gather:std{access=http,mux=raw,dst=0.0.0.0:8081}'}" }; - AndroidServer.vlc = new VideoLan.VlcControl(args); - AndroidServer.vlc.Visible = false; - GUIGraphicsContext.form.Controls.Add(AndroidServer.vlc); + string option = Config.GetFolder(MediaPortal.Configuration.Config.Dir.Plugins) + "\\process\\" + VlcFile; + if (File.Exists(option)) + { + logInfo("Load vlc profile " + VlcFile); + + StreamReader sr = new StreamReader(option); + string read = sr.ReadToEnd(); + sr.Close(); + + args = read.Split(' '); + } + + vlc = new VideoLan.VlcControl(args); + vlc.Visible = false; + + GUIGraphicsContext.form.Controls.Add(vlc); } } - public void Stop() { logInfo("Stop server"); @@ -122,7 +132,9 @@ { Server = xmlreader.GetValueAsString("android", "server", "192.168.0.30"); Port = xmlreader.GetValueAsString("android", "port", "8200"); - VlcFile = xmlreader.GetValueAsString("android", "file", ""); + + VlcFile = xmlreader.GetValueAsString("android", "vlc", "320x160.opt"); + VideoExtension = xmlreader.GetValueAsString("movies", "extensions", ".avi,.mpg,.flv,.mp4"); } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-24 20:11:34 UTC (rev 4079) @@ -564,7 +564,11 @@ { if (AndroidServer.vlc != null) { - if (AndroidServer.vlc.IsPlaying) AndroidServer.vlc.Stop(); + if (AndroidServer.vlc.IsPlaying) + { + AndroidServer.vlc.Stop(); + System.Threading.Thread.Sleep(100); + } string filename = data["filename"].Replace("/", "\\"); Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/VideoHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/VideoHandler.cs 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/VideoHandler.cs 2011-01-24 20:11:34 UTC (rev 4079) @@ -145,12 +145,12 @@ private static ArrayList getAllpattern(string Dir) { - string[] filters = { "*.avi", "*.mpg", "*.flv" , "*.mp4" }; + string[] filters = AndroidServer.VideoExtension.Split(','); + ArrayList files = new ArrayList(); - foreach (string filter in filters) { - files.AddRange(Directory.GetFiles(Dir, filter)); + files.AddRange(Directory.GetFiles(Dir, "*" + filter)); } return files; Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs 2011-01-24 20:11:34 UTC (rev 4079) @@ -39,7 +39,8 @@ this.btnSave = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.label3 = new System.Windows.Forms.Label(); + this.btnBrowse = new System.Windows.Forms.Button(); + this.txtVlc = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -150,24 +151,37 @@ // // groupBox2 // - this.groupBox2.Controls.Add(this.label3); + this.groupBox2.Controls.Add(this.txtVlc); + this.groupBox2.Controls.Add(this.btnBrowse); this.groupBox2.Location = new System.Drawing.Point(12, 114); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(491, 66); this.groupBox2.TabIndex = 3; this.groupBox2.TabStop = false; - this.groupBox2.Text = "Streaming"; + this.groupBox2.Text = "Streaming Profile"; // - // label3 + // btnBrowse // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(14, 29); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(396, 16); - this.label3.TabIndex = 7; - this.label3.Text = "VLC parameter can be found in the vlc.par in the process directory"; + this.btnBrowse.Location = new System.Drawing.Point(287, 19); + this.btnBrowse.Name = "btnBrowse"; + this.btnBrowse.Size = new System.Drawing.Size(137, 23); + this.btnBrowse.TabIndex = 0; + this.btnBrowse.Text = "Browse profiles"; + this.btnBrowse.UseVisualStyleBackColor = true; + this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); // + // txtVlc + // + this.txtVlc.BackColor = System.Drawing.Color.White; + this.txtVlc.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.txtVlc.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtVlc.Location = new System.Drawing.Point(14, 22); + this.txtVlc.Name = "txtVlc"; + this.txtVlc.Size = new System.Drawing.Size(249, 25); + this.txtVlc.TabIndex = 7; + this.txtVlc.Text = "Profile"; + this.txtVlc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // Setup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -190,7 +204,6 @@ this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); this.ResumeLayout(false); } @@ -208,6 +221,7 @@ private System.Windows.Forms.Button btnCopy; private System.Windows.Forms.Label label4; private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btnBrowse; + private System.Windows.Forms.Label txtVlc; } } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs 2011-01-23 21:10:56 UTC (rev 4078) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs 2011-01-24 20:11:34 UTC (rev 4079) @@ -63,6 +63,8 @@ { txtServer.Text = xmlreader.GetValueAsString("android", "server", "192.168.0.30"); txtPort.Text = xmlreader.GetValueAsString("android", "port", "8200"); + + txtVlc.Text = xmlreader.GetValueAsString("android", "vlc", "320x160.opt"); } } private void SaveSettings() @@ -72,6 +74,8 @@ { xmlwriter.SetValue("android", "server", txtServer.Text); xmlwriter.SetValue("android", "port", txtPort.Text); + + xmlwriter.SetValue("android", "vlc", txtVlc.Text); } } @@ -94,5 +98,22 @@ { } + + private void btnBrowse_Click(object sender, EventArgs e) + { + + string dir = Config.GetFolder(MediaPortal.Configuration.Config.Dir.Plugins) + "\\process"; + + OpenFileDialog openFile1 = new OpenFileDialog(); + openFile1.Filter = "VLC profiles|*.opt"; + openFile1.InitialDirectory = dir; + openFile1.FileName = txtVlc.Text; + + if (openFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + txtVlc.Text = Path.GetFileName(openFile1.FileName); + } + + } } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-25 20:18:16
|
Revision: 4080 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4080&view=rev Author: kroko_koenig Date: 2011-01-25 20:18:10 +0000 (Tue, 25 Jan 2011) Log Message: ----------- small change to correct special chars Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirectoryXmlHandler.java 2011-01-25 20:18:10 UTC (rev 4080) @@ -32,16 +32,16 @@ Boolean currentElement = false; String currentValue = null; - public ArrayList<DirItems> DirList = new ArrayList<DirItems>(); + public ArrayList<DirItems> DirList = new ArrayList<DirItems>(); - public static class DirItems - { - public boolean isFolder = false; - public String File= ""; - public Bitmap Picture = null; + public static class DirItems { + public boolean isFolder = false; + public String File = ""; + public Bitmap Picture = null; } + private DirItems currentdirItem; - + /** * Called when tag starts ( example:- <name>AndroidPeople</name> -- <name> ) */ @@ -51,13 +51,20 @@ currentElement = true; currentValue = ""; - if (localName == "Directory") {DirList = new ArrayList<DirItems>(); } - if (localName == "Folder") {currentdirItem = new DirItems(); } - if (localName == "File") {currentdirItem = new DirItems(); } + if (localName == "Directory") { + DirList = new ArrayList<DirItems>(); + } + if (localName == "Folder") { + currentdirItem = new DirItems(); + } + if (localName == "File") { + currentdirItem = new DirItems(); + } } /** - * Called when tag closing ( example:- <name>AndroidPeople</name> -- </name> ) + * Called when tag closing ( example:- <name>AndroidPeople</name> -- </name> + * ) */ @Override public void endElement(String uri, String localName, String qName) @@ -79,15 +86,15 @@ } /** - * Called to get tag characters ( example:- <name>AndroidPeople</name> -- to get - * AndroidPeople Character ) + * Called to get tag characters ( example:- <name>AndroidPeople</name> -- to + * get AndroidPeople Character ) */ @Override public void characters(char[] ch, int start, int length) throws SAXException { if (currentElement) { - currentValue = new String(ch, start, length); - currentElement = false; + String actual = new String(ch, start, length); + currentValue += actual; } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-25 20:18:10 UTC (rev 4080) @@ -59,7 +59,7 @@ } report += "-------------------------------\n\n"; - report += "Remote Version : 24.01 / 21:00\n\n"; + report += "Remote Version : 25.01 / 21:00\n\n"; report += "-------------------------------\n\n"; report += "--------- Device ---------\n\n"; report += "Brand: " + Build.BRAND + "\n"; Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 =================================================================== --- trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-25 20:18:10 UTC (rev 4080) @@ -160,14 +160,14 @@ <Version> <Major>0</Major> <Minor>2</Minor> - <Build>1</Build> + <Build>2</Build> <Revision>0</Revision> </Version> <ExtensionDescription>Control your MediaPortal with yout Android. It can be used as a remote control or doing many other things like music, pictures and video control. Gfx has been done by oddfella and some additional coding is from rolls1400. Have fun.</ExtensionDescription> - <VersionDescription>uses video exentions, tweaked vlc settings</VersionDescription> + <VersionDescription>fixes special chars in links, encoding problem</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation /> <ReleaseDate>2010-12-09T16:17:18.1693243+01:00</ReleaseDate> Modified: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-25 20:18:10 UTC (rev 4080) @@ -31,6 +31,7 @@ using System.IO; using System.Net.Sockets; using System.Web; +using System.Runtime.InteropServices; using MediaPortal.GUI.Library; using MediaPortal.Utils; @@ -49,6 +50,12 @@ [DllImport("USER32.DLL")] public static extern bool SetForegroundWindow(IntPtr hWnd); + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + public static extern int GetShortPathName( + [MarshalAs(UnmanagedType.LPTStr)] string path, + [MarshalAs(UnmanagedType.LPTStr)] StringBuilder shortPath, + int shortPathLength); + private delegate void DoActionHandler(Action action); private delegate void DoFullscreenHandler(); private delegate void DoStartFileHandler(string file); @@ -578,7 +585,10 @@ AndroidServer.logDebug("StreamFile play: " + local); - AndroidServer.vlc.Open(local); + StringBuilder shortPath = new StringBuilder(255); + GetShortPathName(local, shortPath, shortPath.Capacity); + + AndroidServer.vlc.Open(shortPath.ToString()); AndroidServer.vlc.Play(); } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs 2011-01-24 20:11:34 UTC (rev 4079) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs 2011-01-25 20:18:10 UTC (rev 4080) @@ -37,7 +37,7 @@ try { int bytes = s.Receive(ByteArray, 1024, 0); - string messagefromclient = Encoding.ASCII.GetString(ByteArray); + string messagefromclient = Encoding.UTF7.GetString(ByteArray); clientmessage = (String)messagefromclient; return bytes; } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-27 08:09:39
|
Revision: 4081 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4081&view=rev Author: kroko_koenig Date: 2011-01-27 08:09:30 +0000 (Thu, 27 Jan 2011) Log Message: ----------- rename all gfx to have more skin, add support for huge dbs, fix UTF8? Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/list_item.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/splash.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/playingnow.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-small/remote01.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/SendCommand.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/directory/ReceiveDirHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/movies/Movies.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicTab.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/ReceiveDbHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlaying.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/splash.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/MediaScannerNotifier.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/SAX_Parser.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/SomeUtils.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/SocketHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_launcher_icon.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_back.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_backward.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_channel_m.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_channel_p.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_document.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_down.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_forward.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_fullscreen.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_home.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_info.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_left.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_logo.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_menu.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_minus.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_music.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_now_playing.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_osd.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_pause.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_pictures.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_play.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_plugins.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_plus.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_power.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_radio.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_ratio.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_remote.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_right.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_select.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_skip_backward.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_skip_forward.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_stop.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_subtitles.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_up.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_video.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_vol_m.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_vol_p.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_weather.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_border.ico trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_cdcover.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_file_audio.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_file_folder.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_file_folderback.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_file_movie.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_file_picture.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_splash.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_album.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_album_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_album_on.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_artist.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_artist_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_artist_on.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_music.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_music_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_music_on.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_song.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_song_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab_song_on.png Removed Paths: ------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/album.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/album_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/artist.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/artist_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/audio.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/back.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/border.ico trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/cdcover.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/channel_m.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/channel_p.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/document.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/down.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/exit.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/folder.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/folderback.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/foldertab.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/foldertab_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/forward.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/hibernate.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/home.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab1.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab2.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab3.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_tab4.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/icon.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/info.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/left.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/logo.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_music.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_now_playing.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_pictures.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_remote.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_settings.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/main_video.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/menu.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/movie.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/music.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/mute.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_asr.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_full.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_menu.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_osd.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/n_sub.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/now_playing.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/pause.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/picture.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/pictures.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/play.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/plugins.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/power_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/remote.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/restart.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/rewind.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/right.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_play.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_back.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/sel_skp_forw.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/select.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/select2.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/settings.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/skip_back.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/skip_forward.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/song.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/song_off.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/splash.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/splash02.jpg trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/stop.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/suspend.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/up.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/video.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/volume_m.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/volume_p.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/wake_on_lan.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/music_menu.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/picturefullscreenmenu.xml Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-25 20:18:10 UTC (rev 4080) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-27 08:09:30 UTC (rev 4081) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mediaportal.remote" android:versionName="1.1" android:versionCode="1"> - <application android:icon="@drawable/icon" + <application android:icon="@drawable/ic_launcher_icon" android:theme="@android:style/Theme.NoTitleBar" android:debuggable="true" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-25 20:18:10 UTC (rev 4080) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-27 08:09:30 UTC (rev 4081) @@ -14,233 +14,220 @@ public static final class attr { } public static final class drawable { - public static final int album=0x7f020000; - public static final int album_off=0x7f020001; - public static final int artist=0x7f020002; - public static final int artist_off=0x7f020003; - public static final int audio=0x7f020004; - public static final int back=0x7f020005; - public static final int border=0x7f020006; - public static final int cdcover=0x7f020007; - public static final int channel_m=0x7f020008; - public static final int channel_p=0x7f020009; - public static final int document=0x7f02000a; - public static final int down=0x7f02000b; - public static final int empty=0x7f02000c; - public static final int exit=0x7f02000d; - public static final int folder=0x7f02000e; - public static final int folderback=0x7f02000f; - public static final int foldertab=0x7f020010; - public static final int foldertab_off=0x7f020011; - public static final int forward=0x7f020012; - public static final int hibernate=0x7f020013; - public static final int home=0x7f020014; - public static final int ic_tab=0x7f020015; - public static final int ic_tab1=0x7f020016; - public static final int ic_tab2=0x7f020017; - public static final int ic_tab3=0x7f020018; - public static final int ic_tab4=0x7f020019; - public static final int icon=0x7f02001a; - public static final int info=0x7f02001b; - public static final int left=0x7f02001c; - public static final int logo=0x7f02001d; - public static final int main_music=0x7f02001e; - public static final int main_now_playing=0x7f02001f; - public static final int main_pictures=0x7f020020; - public static final int main_remote=0x7f020021; - public static final int main_settings=0x7f020022; - public static final int main_video=0x7f020023; - public static final int menu=0x7f020024; - public static final int movie=0x7f020025; - public static final int music=0x7f020026; - public static final int mute=0x7f020027; - public static final int n_asr=0x7f020028; - public static final int n_full=0x7f020029; - public static final int n_menu=0x7f02002a; - public static final int n_osd=0x7f02002b; - public static final int n_sub=0x7f02002c; - public static final int now_playing=0x7f02002d; - public static final int pause=0x7f02002e; - public static final int picture=0x7f02002f; - public static final int pictures=0x7f020030; - public static final int play=0x7f020031; - public static final int plugins=0x7f020032; - public static final int power_off=0x7f020033; - public static final int remote=0x7f020034; - public static final int restart=0x7f020035; - public static final int rewind=0x7f020036; - public static final int right=0x7f020037; - public static final int sel_play=0x7f020038; - public static final int sel_skp_back=0x7f020039; - public static final int sel_skp_forw=0x7f02003a; - public static final int select=0x7f02003b; - public static final int select2=0x7f02003c; - public static final int settings=0x7f02003d; - public static final int skip_back=0x7f02003e; - public static final int skip_forward=0x7f02003f; - public static final int song=0x7f020040; - public static final int song_off=0x7f020041; - public static final int splash=0x7f020042; - public static final int splash02=0x7f020043; - public static final int stop=0x7f020044; - public static final int suspend=0x7f020045; - public static final int up=0x7f020046; - public static final int video=0x7f020047; - public static final int volume_m=0x7f020048; - public static final int volume_p=0x7f020049; - public static final int wake_on_lan=0x7f02004a; + public static final int empty=0x7f020000; + public static final int ic_launcher_icon=0x7f020001; + public static final int ic_menu_skin1_back=0x7f020002; + public static final int ic_menu_skin1_backward=0x7f020003; + public static final int ic_menu_skin1_channel_m=0x7f020004; + public static final int ic_menu_skin1_channel_p=0x7f020005; + public static final int ic_menu_skin1_document=0x7f020006; + public static final int ic_menu_skin1_down=0x7f020007; + public static final int ic_menu_skin1_forward=0x7f020008; + public static final int ic_menu_skin1_fullscreen=0x7f020009; + public static final int ic_menu_skin1_home=0x7f02000a; + public static final int ic_menu_skin1_info=0x7f02000b; + public static final int ic_menu_skin1_left=0x7f02000c; + public static final int ic_menu_skin1_logo=0x7f02000d; + public static final int ic_menu_skin1_menu=0x7f02000e; + public static final int ic_menu_skin1_minus=0x7f02000f; + public static final int ic_menu_skin1_music=0x7f020010; + public static final int ic_menu_skin1_now_playing=0x7f020011; + public static final int ic_menu_skin1_osd=0x7f020012; + public static final int ic_menu_skin1_pause=0x7f020013; + public static final int ic_menu_skin1_pictures=0x7f020014; + public static final int ic_menu_skin1_play=0x7f020015; + public static final int ic_menu_skin1_plugins=0x7f020016; + public static final int ic_menu_skin1_plus=0x7f020017; + public static final int ic_menu_skin1_power=0x7f020018; + public static final int ic_menu_skin1_radio=0x7f020019; + public static final int ic_menu_skin1_ratio=0x7f02001a; + public static final int ic_menu_skin1_remote=0x7f02001b; + public static final int ic_menu_skin1_right=0x7f02001c; + public static final int ic_menu_skin1_select=0x7f02001d; + public static final int ic_menu_skin1_skip_backward=0x7f02001e; + public static final int ic_menu_skin1_skip_forward=0x7f02001f; + public static final int ic_menu_skin1_stop=0x7f020020; + public static final int ic_menu_skin1_subtitles=0x7f020021; + public static final int ic_menu_skin1_up=0x7f020022; + public static final int ic_menu_skin1_video=0x7f020023; + public static final int ic_menu_skin1_vol_m=0x7f020024; + public static final int ic_menu_skin1_vol_p=0x7f020025; + public static final int ic_menu_skin1_weather=0x7f020026; + public static final int ic_skin1_border=0x7f020027; + public static final int ic_skin1_cdcover=0x7f020028; + public static final int ic_skin1_file_audio=0x7f020029; + public static final int ic_skin1_file_folder=0x7f02002a; + public static final int ic_skin1_file_folderback=0x7f02002b; + public static final int ic_skin1_file_movie=0x7f02002c; + public static final int ic_skin1_file_picture=0x7f02002d; + public static final int ic_skin1_splash=0x7f02002e; + public static final int ic_tab_album=0x7f02002f; + public static final int ic_tab_album_off=0x7f020030; + public static final int ic_tab_album_on=0x7f020031; + public static final int ic_tab_artist=0x7f020032; + public static final int ic_tab_artist_off=0x7f020033; + public static final int ic_tab_artist_on=0x7f020034; + public static final int ic_tab_music=0x7f020035; + public static final int ic_tab_music_off=0x7f020036; + public static final int ic_tab_music_on=0x7f020037; + public static final int ic_tab_song=0x7f020038; + public static final int ic_tab_song_off=0x7f020039; + public static final int ic_tab_song_on=0x7f02003a; } public static final class id { - public static final int GridView01=0x7f070014; - public static final int ImageView01=0x7f07001d; - public static final int LinearLayout00=0x7f070050; - public static final int LinearLayout01=0x7f070024; - public static final int LinearLayout02=0x7f07005b; - public static final int LinearLayout03=0x7f070065; - public static final int LinearLayout04=0x7f07006f; - public static final int LinearLayout05=0x7f070075; - public static final int ListView01=0x7f070032; - public static final int Spinner01=0x7f070080; - public static final int SurfaceView01=0x7f070023; - public static final int TableLayout01=0x7f070006; - public static final int TableLayout02=0x7f070041; - public static final int TableRow01=0x7f070007; - public static final int TableRow02=0x7f070046; - public static final int TableRow03=0x7f07004b; - public static final int TextView01=0x7f070003; - public static final int TextView02=0x7f070004; - public static final int btnIpSettings=0x7f070082; - public static final int btnSelDown=0x7f07001a; - public static final int btnSelUp=0x7f07001b; - public static final int btn_main_music=0x7f070009; - public static final int btn_main_now_playing=0x7f07000c; - public static final int btn_main_pictures=0x7f070008; - public static final int btn_main_play=0x7f070010; - public static final int btn_main_remote=0x7f07000b; - public static final int btn_main_settings=0x7f07000d; - public static final int btn_main_skp_back=0x7f07000f; - public static final int btn_main_skp_forw=0x7f070011; - public static final int btn_main_video=0x7f07000a; - public static final int btnkey01=0x7f070051; - public static final int btnkey02=0x7f070052; - public static final int btnkey03=0x7f070053; - public static final int btnkey04=0x7f070054; - public static final int btnkey05=0x7f070055; - public static final int btnkey06=0x7f070056; - public static final int btnkey07=0x7f070057; - public static final int btnkey08=0x7f070058; - public static final int btnkey09=0x7f070059; - public static final int btnkey10=0x7f07005a; - public static final int btnkey11=0x7f07005c; - public static final int btnkey12=0x7f07005d; - public static final int btnkey13=0x7f07005e; - public static final int btnkey14=0x7f07005f; - public static final int btnkey15=0x7f070060; - public static final int btnkey16=0x7f070061; - public static final int btnkey17=0x7f070062; - public static final int btnkey18=0x7f070063; - public static final int btnkey19=0x7f070064; - public static final int btnkey20=0x7f070066; - public static final int btnkey21=0x7f070067; - public static final int btnkey22=0x7f070068; - public static final int btnkey23=0x7f070069; - public static final int btnkey24=0x7f07006a; - public static final int btnkey25=0x7f07006b; - public static final int btnkey26=0x7f07006c; - public static final int btnkey27=0x7f07006d; - public static final int btnkey28=0x7f07006e; - public static final int btnkey29=0x7f070070; - public static final int btnkey30=0x7f070071; - public static final int btnkey31=0x7f070072; - public static final int btnkey32=0x7f070073; - public static final int btnkey33=0x7f070074; - public static final int btnkey41=0x7f070076; - public static final int btnkey42=0x7f070077; - public static final int btnkey43=0x7f070078; - public static final int btnkey44=0x7f070079; - public static final int btnkey45=0x7f07007a; - public static final int btnkey46=0x7f07007b; - public static final int btnkey47=0x7f07007c; - public static final int btnkey48=0x7f07007d; - public static final int btnkey49=0x7f07007e; - public static final int btnkey50=0x7f07007f; - public static final int button_open=0x7f070020; - public static final int button_stream=0x7f070021; - public static final int button_stream_stop=0x7f070022; - public static final int clearplaylist=0x7f07008f; - public static final int crtl_back=0x7f07003e; - public static final int crtl_ch_m=0x7f07004a; - public static final int crtl_ch_p=0x7f070045; - public static final int crtl_down=0x7f07003d; - public static final int crtl_full=0x7f070047; - public static final int crtl_info=0x7f07004f; - public static final int crtl_left=0x7f070038; - public static final int crtl_menu=0x7f070049; - public static final int crtl_mp=0x7f070034; - public static final int crtl_osd=0x7f07004e; - public static final int crtl_parent=0x7f07003c; - public static final int crtl_play=0x7f070048; - public static final int crtl_power=0x7f070036; - public static final int crtl_ratio=0x7f07004d; - public static final int crtl_right=0x7f07003a; - public static final int crtl_select=0x7f070039; - public static final int crtl_skip_back=0x7f070042; - public static final int crtl_skip_forw=0x7f070044; - public static final int crtl_stop=0x7f070043; - public static final int crtl_sub=0x7f07004c; - public static final int crtl_up=0x7f070035; - public static final int crtl_vol_m=0x7f070040; - public static final int crtl_vol_p=0x7f07003f; - public static final int full_text=0x7f07001c; - public static final int icon_image=0x7f070001; - public static final int icon_text=0x7f070002; - public static final int list_album=0x7f070016; - public static final int list_artist=0x7f070017; - public static final int list_result=0x7f070018; - public static final int list_song=0x7f070019; - public static final int main_now_playing=0x7f07000e; - public static final int music_grid=0x7f070015; - public static final int now_album=0x7f070026; - public static final int now_artist=0x7f07002c; - public static final int now_cd=0x7f070027; - public static final int now_list=0x7f070031; - public static final int now_next=0x7f070030; - public static final int now_play=0x7f07002f; - public static final int now_playing=0x7f070025; - public static final int now_playing_right=0x7f07002a; - public static final int now_playing_t_left=0x7f070029; - public static final int now_prev=0x7f07002d; - public static final int now_progress=0x7f070028; - public static final int now_stop=0x7f07002e; - public static final int now_title=0x7f07002b; - public static final int open=0x7f070092; - public static final int playlist=0x7f07008e; - public static final int radio01=0x7f070089; - public static final int radio02=0x7f07008a; - public static final int radio03=0x7f07008b; - public static final int radio04=0x7f07008c; - public static final int radioStop=0x7f07008d; - public static final int rslide=0x7f070095; - public static final int save=0x7f070091; - public static final int sdcard=0x7f070090; - public static final int send=0x7f070093; - public static final int server_ip=0x7f070085; - public static final int server_macid=0x7f070087; - public static final int server_name=0x7f070084; - public static final int server_port=0x7f070086; - public static final int slide=0x7f070094; - public static final int text_kb_streamed=0x7f07001e; - public static final int title=0x7f070088; - public static final int txtDirectory=0x7f070013; - public static final int txtFile=0x7f07001f; - public static final int txtInstance=0x7f070005; - public static final int txtIntanceName=0x7f070083; - public static final int vibration=0x7f070081; - public static final int widget0=0x7f070012; - public static final int widget00=0x7f070033; - public static final int widget01=0x7f070037; - public static final int widget02=0x7f07003b; - public static final int widget44=0x7f070000; + public static final int GridView01=0x7f060014; + public static final int ImageView01=0x7f060027; + public static final int LinearLayout00=0x7f06005a; + public static final int LinearLayout01=0x7f06002e; + public static final int LinearLayout02=0x7f060065; + public static final int LinearLayout03=0x7f06006f; + public static final int LinearLayout04=0x7f060079; + public static final int LinearLayout05=0x7f06007f; + public static final int ListView01=0x7f06003c; + public static final int Spinner01=0x7f06008a; + public static final int SurfaceView01=0x7f06002d; + public static final int TableLayout01=0x7f060006; + public static final int TableLayout02=0x7f06004b; + public static final int TableRow01=0x7f060007; + public static final int TableRow02=0x7f060050; + public static final int TableRow03=0x7f060055; + public static final int TextView01=0x7f060003; + public static final int TextView02=0x7f060004; + public static final int btnAlbumSelDown=0x7f060017; + public static final int btnAlbumSelUp=0x7f060019; + public static final int btnArtistSelDown=0x7f06001b; + public static final int btnArtistSelUp=0x7f06001d; + public static final int btnIpSettings=0x7f06008c; + public static final int btnResultSelDown=0x7f06001f; + public static final int btnResultSelUp=0x7f060021; + public static final int btnSongSelDown=0x7f060023; + public static final int btnSongSelUp=0x7f060025; + public static final int btn_main_music=0x7f060009; + public static final int btn_main_now_playing=0x7f06000c; + public static final int btn_main_pictures=0x7f060008; + public static final int btn_main_play=0x7f060010; + public static final int btn_main_plugins=0x7f06000d; + public static final int btn_main_remote=0x7f06000b; + public static final int btn_main_skp_back=0x7f06000f; + public static final int btn_main_skp_forw=0x7f060011; + public static final int btn_main_video=0x7f06000a; + public static final int btnkey01=0x7f06005b; + public static final int btnkey02=0x7f06005c; + public static final int btnkey03=0x7f06005d; + public static final int btnkey04=0x7f06005e; + public static final int btnkey05=0x7f06005f; + public static final int btnkey06=0x7f060060; + public static final int btnkey07=0x7f060061; + public static final int btnkey08=0x7f060062; + public static final int btnkey09=0x7f060063; + public static final int btnkey10=0x7f060064; + public static final int btnkey11=0x7f060066; + public static final int btnkey12=0x7f060067; + public static final int btnkey13=0x7f060068; + public static final int btnkey14=0x7f060069; + public static final int btnkey15=0x7f06006a; + public static final int btnkey16=0x7f06006b; + public static final int btnkey17=0x7f06006c; + public static final int btnkey18=0x7f06006d; + public static final int btnkey19=0x7f06006e; + public static final int btnkey20=0x7f060070; + public static final int btnkey21=0x7f060071; + public static final int btnkey22=0x7f060072; + public static final int btnkey23=0x7f060073; + public static final int btnkey24=0x7f060074; + public static final int btnkey25=0x7f060075; + public static final int btnkey26=0x7f060076; + public static final int btnkey27=0x7f060077; + public static final int btnkey28=0x7f060078; + public static final int btnkey29=0x7f06007a; + public static final int btnkey30=0x7f06007b; + public static final int btnkey31=0x7f06007c; + public static final int btnkey32=0x7f06007d; + public static final int btnkey33=0x7f06007e; + public static final int btnkey41=0x7f060080; + public static final int btnkey42=0x7f060081; + public static final int btnkey43=0x7f060082; + public static final int btnkey44=0x7f060083; + public static final int btnkey45=0x7f060084; + public static final int btnkey46=0x7f060085; + public static final int btnkey47=0x7f060086; + public static final int btnkey48=0x7f060087; + public static final int btnkey49=0x7f060088; + public static final int btnkey50=0x7f060089; + public static final int button_open=0x7f06002a; + public static final int button_stream=0x7f06002b; + public static final int button_stream_stop=0x7f06002c; + public static final int crtl_back=0x7f060048; + public static final int crtl_ch_m=0x7f060054; + public static final int crtl_ch_p=0x7f06004f; + public static final int crtl_down=0x7f060047; + public static final int crtl_full=0x7f060051; + public static final int crtl_info=0x7f060059; + public static final int crtl_left=0x7f060042; + public static final int crtl_menu=0x7f060053; + public static final int crtl_mp=0x7f06003e; + public static final int crtl_osd=0x7f060058; + public static final int crtl_parent=0x7f060046; + public static final int crtl_play=0x7f060052; + public static final int crtl_power=0x7f060040; + public static final int crtl_ratio=0x7f060057; + public static final int crtl_right=0x7f060044; + public static final int crtl_select=0x7f060043; + public static final int crtl_skip_back=0x7f06004c; + public static final int crtl_skip_forw=0x7f06004e; + public static final int crtl_stop=0x7f06004d; + public static final int crtl_sub=0x7f060056; + public static final int crtl_up=0x7f06003f; + public static final int crtl_vol_m=0x7f06004a; + public static final int crtl_vol_p=0x7f060049; + public static final int full_text=0x7f060026; + public static final int icon_image=0x7f060001; + public static final int icon_text=0x7f060002; + public static final int list_album=0x7f060016; + public static final int list_artist=0x7f06001a; + public static final int list_result=0x7f06001e; + public static final int list_song=0x7f060022; + public static final int main_instance=0x7f060005; + public static final int main_now_playing=0x7f06000e; + public static final int music_grid=0x7f060015; + public static final int now_album=0x7f060030; + public static final int now_artist=0x7f060036; + public static final int now_cd=0x7f060031; + public static final int now_list=0x7f06003b; + public static final int now_next=0x7f06003a; + public static final int now_play=0x7f060039; + public static final int now_playing=0x7f06002f; + public static final int now_playing_right=0x7f060034; + public static final int now_playing_t_left=0x7f060033; + public static final int now_prev=0x7f060037; + public static final int now_progress=0x7f060032; + public static final int now_stop=0x7f060038; + public static final int now_title=0x7f060035; + public static final int radio01=0x7f060094; + public static final int radio02=0x7f060095; + public static final int radio03=0x7f060096; + public static final int radio04=0x7f060097; + public static final int radioStop=0x7f060098; + public static final int server_ip=0x7f06008f; + public static final int server_macid=0x7f060091; + public static final int server_name=0x7f06008e; + public static final int server_port=0x7f060090; + public static final int splash=0x7f060092; + public static final int text_kb_streamed=0x7f060028; + public static final int title=0x7f060093; + public static final int txtDbAlbum=0x7f060018; + public static final int txtDbArtist=0x7f06001c; + public static final int txtDbResult=0x7f060020; + public static final int txtDbSong=0x7f060024; + public static final int txtDirectory=0x7f060013; + public static final int txtFile=0x7f060029; + public static final int txtIntanceName=0x7f06008d; + public static final int vibration=0x7f06008b; + public static final int widget0=0x7f060012; + public static final int widget00=0x7f06003d; + public static final int widget01=0x7f060041; + public static final int widget02=0x7f060045; + public static final int widget44=0x7f060000; } public static final class layout { public static final int icon=0x7f030000; @@ -267,10 +254,6 @@ public static final int title=0x7f030015; public static final int webradio=0x7f030016; } - public static final class menu { - public static final int music_menu=0x7f060000; - public static final int picturefullscreenmenu=0x7f060001; - } public static final class string { public static final int app_name=0x7f040000; } Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/album.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/album_off.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/artist.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/artist_off.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/audio.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/back.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/border.ico =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/cdcover.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/channel_m.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/channel_p.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/document.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/down.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/exit.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/folder.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/folderback.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/foldertab.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/foldertab_off.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/forward.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/hibernate.png =================================================================== (Binary files differ) Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/home.png =================================================================== (Binary files differ) Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_launcher_icon.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_launcher_icon.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_back.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_back.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_backward.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_backward.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_channel_m.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_channel_m.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_channel_p.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_channel_p.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_document.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_document.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_down.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_down.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_forward.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_forward.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_fullscreen.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_fullscreen.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_home.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_home.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_info.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_info.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_left.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_left.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_logo.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_menu.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_menu.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_minus.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_minus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_music.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_music.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_now_playing.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_now_playing.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_osd.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_osd.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_pause.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_pause.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_pictures.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_pictures.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_play.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_play.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_plugins.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_plugins.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_plus.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_plus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_power.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_power.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_radio.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_radio.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_ratio.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_ratio.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_remote.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_remote.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_right.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_right.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_select.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_select.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_skip_backward.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_skip_backward.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_skip_forward.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_skip_forward.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_stop.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_stop.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_subtitles.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_subtitles.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_up.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_up.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_video.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_menu_skin1_video.png _... [truncated message content] |
From: <kro...@us...> - 2011-01-28 09:25:35
|
Revision: 4083 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4083&view=rev Author: kroko_koenig Date: 2011-01-28 09:25:28 +0000 (Fri, 28 Jan 2011) Log Message: ----------- fix for Android bug, fix for pictures caching Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicAlbum.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicArtist.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip trunk/plugins/AndroidRemote/Release/album.jpg trunk/plugins/AndroidRemote/Release/artist.jpg trunk/plugins/AndroidRemote/Release/folder.jpg trunk/plugins/AndroidRemote/Release/main.jpg trunk/plugins/AndroidRemote/Release/nowplaying.jpg trunk/plugins/AndroidRemote/Release/remote.jpg trunk/plugins/AndroidRemote/Release/song.jpg trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_album.xml 2011-01-28 09:25:28 UTC (rev 4083) @@ -3,14 +3,20 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> - <ListView android:id="@+id/list_album" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:fastScrollEnabled="true" - android:layout_weight="1"> - </ListView> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:layout_weight="1"> + <ListView android:id="@+id/list_album" android:layout_height="wrap_content" + android:layout_width="fill_parent" android:fastScrollEnabled="true"> + </ListView> + + </LinearLayout> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_height="wrap_content" android:orientation="horizontal" - android:layout_gravity="center_horizontal" android:layout_width="wrap_content"> + android:layout_height="80dip" android:layout_weight="1" + android:orientation="horizontal" android:layout_gravity="center_horizontal" + android:layout_width="wrap_content"> <Button android:background="@drawable/ic_menu_skin1_minus" android:id="@+id/btnAlbumSelDown" android:layout_height="40dip" Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_artist.xml 2011-01-28 09:25:28 UTC (rev 4083) @@ -3,30 +3,36 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> - <ListView android:id="@+id/list_artist" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:fastScrollEnabled="true" - android:layout_weight="1"> - </ListView> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:layout_weight="1"> + <ListView android:id="@+id/list_artist" + android:layout_height="wrap_content" android:layout_width="fill_parent" + android:fastScrollEnabled="true"> + </ListView> + + </LinearLayout> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_height="wrap_content" android:orientation="horizontal" - android:layout_gravity="center_horizontal" android:layout_width="wrap_content"> + android:orientation="horizontal" android:layout_width="wrap_content" + android:layout_height="80dip" android:layout_weight="1" + android:layout_gravity="center_horizontal"> <Button android:background="@drawable/ic_menu_skin1_minus" android:id="@+id/btnArtistSelDown" android:layout_height="40dip" android:layout_width="60dip"> </Button> - <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="--- / --- items" android:textColor="#FFFFFFFF" android:id="@+id/txtDbArtist" android:textSize="18dip" android:layout_marginLeft="10dip" android:layout_marginRight="10dip"> </TextView> - <Button android:background="@drawable/ic_menu_skin1_plus" android:id="@+id/btnArtistSelUp" android:layout_height="40dip" android:layout_width="60dip"> </Button> </LinearLayout> + </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_results.xml 2011-01-28 09:25:28 UTC (rev 4083) @@ -3,14 +3,22 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> - <ListView android:id="@+id/list_result" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:fastScrollEnabled="true" android:layout_weight="1"> - </ListView> - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_height="wrap_content" android:orientation="horizontal" - android:layout_gravity="center_horizontal" android:layout_width="wrap_content"> + android:orientation="horizontal" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:layout_weight="1"> + <ListView android:id="@+id/list_result" + android:layout_height="wrap_content" android:layout_width="fill_parent" + android:fastScrollEnabled="true"> + </ListView> + + </LinearLayout> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="80dip" android:orientation="horizontal" + android:layout_gravity="center_horizontal" android:layout_width="wrap_content" + android:layout_weight="1"> + <Button android:background="@drawable/ic_menu_skin1_minus" android:id="@+id/btnResultSelDown" android:layout_height="40dip" android:layout_width="60dip"> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music_song.xml 2011-01-28 09:25:28 UTC (rev 4083) @@ -3,23 +3,36 @@ android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> - <ListView android:id="@+id/list_song" android:layout_height="wrap_content" - android:layout_width="fill_parent" android:fastScrollEnabled="true" android:layout_weight="1"> - </ListView> - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_height="wrap_content" - android:orientation="horizontal" android:layout_gravity="center_horizontal" android:layout_width="wrap_content"> - - <Button android:background="@drawable/ic_menu_skin1_minus" android:id="@+id/btnSongSelDown" android:layout_height="40dip" android:layout_width="60dip"> - </Button> - - <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="--- / --- items" android:textColor="#FFFFFFFF" - android:id="@+id/txtDbSong" android:textSize="18dip" android:layout_marginLeft="10dip" android:layout_marginRight="10dip"> - </TextView> + android:orientation="horizontal" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:layout_weight="1"> - <Button android:background="@drawable/ic_menu_skin1_plus" android:id="@+id/btnSongSelUp" android:layout_height="40dip" android:layout_width="60dip"> - </Button> - </LinearLayout> + <ListView android:id="@+id/list_song" android:layout_height="wrap_content" + android:layout_width="fill_parent" android:fastScrollEnabled="true"> + </ListView> + + </LinearLayout> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="80dip" android:orientation="horizontal" + android:layout_gravity="center_horizontal" android:layout_width="wrap_content" + android:layout_weight="1"> + + <Button android:background="@drawable/ic_menu_skin1_minus" + android:id="@+id/btnSongSelDown" android:layout_height="40dip" + android:layout_width="60dip"> + </Button> + + <TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" android:text="--- / --- items" + android:textColor="#FFFFFFFF" android:id="@+id/txtDbSong" + android:textSize="18dip" android:layout_marginLeft="10dip" + android:layout_marginRight="10dip"> + </TextView> + + <Button android:background="@drawable/ic_menu_skin1_plus" + android:id="@+id/btnSongSelUp" android:layout_height="40dip" + android:layout_width="60dip"> + </Button> + </LinearLayout> </LinearLayout> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicAlbum.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicAlbum.java 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicAlbum.java 2011-01-28 09:25:28 UTC (rev 4083) @@ -45,6 +45,8 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Button; +import android.widget.FrameLayout; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.SectionIndexer; import android.widget.TextView; @@ -64,6 +66,8 @@ private static HashMap<String, Integer> alphaIndexer; private static String[] sections; + + private boolean FLAG_THUMB_PLUS; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -209,6 +213,18 @@ listview.setAdapter(new EfficientAdapter(MusicAlbum.this)); listview.setFastScrollEnabled(true); + + // tweak as described in many post, not very nice but work + int newWidth = (FLAG_THUMB_PLUS) ? LinearLayout.LayoutParams.FILL_PARENT + : listview.getWidth() - 1; + + LinearLayout.LayoutParams l = new LinearLayout.LayoutParams( + newWidth, FrameLayout.LayoutParams.FILL_PARENT); + + listview.setLayoutParams(l); + + FLAG_THUMB_PLUS = FLAG_THUMB_PLUS ? false : true; + // tweak finished } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicArtist.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicArtist.java 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicArtist.java 2011-01-28 09:25:28 UTC (rev 4083) @@ -45,6 +45,8 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Button; +import android.widget.FrameLayout; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.SectionIndexer; import android.widget.TextView; @@ -55,20 +57,22 @@ private Handler mHandler = new Handler(); private static ArrayList<ReceiveDbXmlHandler.DbItems> artistList; - + private static int startList; private static int countList; private static int countItems; - + private TextView dbCount; private static HashMap<String, Integer> alphaIndexer; private static String[] sections; + private boolean FLAG_THUMB_PLUS; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_artist); - + dbCount = (TextView) findViewById(R.id.txtDbArtist); startList = 0; @@ -132,7 +136,7 @@ Vibration.vibrateShort(); } - + private Runnable mUpdateTimeTask = new Runnable() { public void run() { new update().execute(); @@ -159,7 +163,7 @@ artistList = result.data; countList = result.results; countItems = result.count; - + return null; } @@ -203,14 +207,28 @@ Collections.sort(sectionList); sections = new String[sectionList.size()]; sectionList.toArray(sections); - + ListView listview = (ListView) findViewById(R.id.list_artist); - listview.setFastScrollEnabled(false); + listview.setFastScrollEnabled(false); // we need it, otherwise exception out of bound... + + listview.setAdapter(new EfficientAdapter(MusicArtist.this)); + listview.setFastScrollEnabled(true); + + // tweak as described in many post, not very nice but work + int newWidth = (FLAG_THUMB_PLUS) ? LinearLayout.LayoutParams.FILL_PARENT + : listview.getWidth() - 1; + + LinearLayout.LayoutParams l = new LinearLayout.LayoutParams( + newWidth, FrameLayout.LayoutParams.FILL_PARENT); + + listview.setLayoutParams(l); - listview.setAdapter(new EfficientAdapter(MusicArtist.this)); - listview.setFastScrollEnabled(true); + FLAG_THUMB_PLUS = FLAG_THUMB_PLUS ? false : true; + // tweak finished + } } + } private static class EfficientAdapter extends BaseAdapter implements @@ -284,8 +302,6 @@ public Object[] getSections() { return sections; } - - } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicResults.java 2011-01-28 09:25:28 UTC (rev 4083) @@ -55,6 +55,8 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Button; +import android.widget.FrameLayout; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.SectionIndexer; import android.widget.TextView; @@ -90,6 +92,8 @@ final CharSequence[] items = { "Add to playlist", "Clear playlist", "Save to SD card", "Play locally" }; + private boolean FLAG_THUMB_PLUS; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_results); @@ -290,6 +294,18 @@ listview.setAdapter(new EfficientAdapter(MusicResults.this)); listview.setFastScrollEnabled(true); + + // tweak as described in many post, not very nice but work + int newWidth = (FLAG_THUMB_PLUS) ? LinearLayout.LayoutParams.FILL_PARENT + : listview.getWidth() - 1; + + LinearLayout.LayoutParams l = new LinearLayout.LayoutParams( + newWidth, FrameLayout.LayoutParams.FILL_PARENT); + + listview.setLayoutParams(l); + + FLAG_THUMB_PLUS = FLAG_THUMB_PLUS ? false : true; + // tweak finished } } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicSong.java 2011-01-28 09:25:28 UTC (rev 4083) @@ -55,6 +55,8 @@ import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Button; +import android.widget.FrameLayout; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.SectionIndexer; import android.widget.TextView; @@ -85,6 +87,8 @@ final CharSequence[] items = { "Add to playlist", "Clear playlist", "Save to SD card", "Play locally" }; + private boolean FLAG_THUMB_PLUS; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.music_song); @@ -276,6 +280,18 @@ listview.setAdapter(new EfficientAdapter(MusicSong.this)); listview.setFastScrollEnabled(true); + + // tweak as described in many post, not very nice but work + int newWidth = (FLAG_THUMB_PLUS) ? LinearLayout.LayoutParams.FILL_PARENT + : listview.getWidth() - 1; + + LinearLayout.LayoutParams l = new LinearLayout.LayoutParams( + newWidth, FrameLayout.LayoutParams.FILL_PARENT); + + listview.setLayoutParams(l); + + FLAG_THUMB_PLUS = FLAG_THUMB_PLUS ? false : true; + // tweak finished } } } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-27 15:34:00 UTC (rev 4082) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-28 09:25:28 UTC (rev 4083) @@ -95,6 +95,7 @@ if (pic.typ == "folder") { actualDir += pic.title + "/"; + picNo = 0; taskFetchData = new update(); taskFetchData.execute(); } @@ -110,6 +111,7 @@ } else actualDir = ""; + picNo = 0; taskFetchData = new update(); taskFetchData.execute(); } @@ -195,14 +197,14 @@ // can use UI thread here protected void onPreExecute() { - picNo = 0; + } // automatically done on worker thread (separate from UI thread) protected Void doInBackground(final String... args) { while (picNo < pictureList.size()) { - + DirItems item = pictureList.get(picNo); if (!item.isFolder) { if (item.Picture == null) { @@ -211,9 +213,10 @@ item.Picture = http.DownloadImage(file); if (picNo < pictureList.size()) // very strange exeption happens here 10/10 pictureList.set(picNo, item); + picNo++; break; } - } + } picNo++; } Modified: trunk/plugins/AndroidRemote/Release/MediaPortalRemote.zip =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/album.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/artist.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/folder.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/main.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/nowplaying.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/remote.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/song.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-30 19:59:20
|
Revision: 4084 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4084&view=rev Author: kroko_koenig Date: 2011-01-30 19:59:10 +0000 (Sun, 30 Jan 2011) Log Message: ----------- some fixes and playlist (not 100%) Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/HttpHandler.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_file_playlist.png trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/skin.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/SelectSkin.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup_ip.java trunk/plugins/AndroidRemote/Release/skins.jpg Removed Paths: ------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Setup_ip.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2011-01-30 19:59:10 UTC (rev 4084) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="mediaportal.remote" android:versionName="1.1" android:versionCode="1"> + package="mediaportal.remote" android:versionCode="1" android:versionName="1.2"> <application android:icon="@drawable/ic_launcher_icon" android:theme="@android:style/Theme.NoTitleBar" @@ -15,13 +15,13 @@ </activity> <activity android:launchMode="singleInstance" android:name=".Splash"></activity> <activity android:launchMode="singleInstance" android:name=".control.Remote_01"></activity> - <activity android:launchMode="singleInstance" android:name=".control.Remote_02"></activity> + <activity android:launchMode="singleInstance" android:name=".control.Remote_03"></activity> <activity android:launchMode="singleInstance" android:name=".pictures.Pictures"></activity> <activity android:launchMode="singleInstance" android:name=".pictures.Picturesfullscreen"></activity> <activity android:launchMode="singleInstance" android:name=".music.MusicDir"></activity> - <activity android:launchMode="singleInstance" android:name="Setup"></activity> - <activity android:launchMode="singleInstance" android:name="Setup_ip"></activity> + <activity android:launchMode="singleInstance" android:name=".setup.Setup"></activity> + <activity android:launchMode="singleInstance" android:name=".setup.Setup_ip"></activity> <activity android:launchMode="singleInstance" android:name=".nowPlaying.NowPlaying"></activity> <activity android:launchMode="singleInstance" android:name=".nowPlaying.NowPlayingList"></activity> <activity android:launchMode="singleInstance" android:name=".music.MusicArtist"></activity> @@ -32,6 +32,7 @@ <activity android:launchMode="singleInstance" android:name=".multimedia.Webradio"></activity> <activity android:name=".MediaPlayerControl" android:launchMode="singleInstance"></activity> <activity android:name=".movies.Movies" android:launchMode="singleInstance"></activity> + <activity android:launchMode="singleInstance" android:name=".setup.SelectSkin"></activity> </application> <uses-sdk android:minSdkVersion="3" /> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -60,19 +60,20 @@ public static final int ic_skin1_file_folderback=0x7f02002b; public static final int ic_skin1_file_movie=0x7f02002c; public static final int ic_skin1_file_picture=0x7f02002d; - public static final int ic_skin1_splash=0x7f02002e; - public static final int ic_tab_album=0x7f02002f; - public static final int ic_tab_album_off=0x7f020030; - public static final int ic_tab_album_on=0x7f020031; - public static final int ic_tab_artist=0x7f020032; - public static final int ic_tab_artist_off=0x7f020033; - public static final int ic_tab_artist_on=0x7f020034; - public static final int ic_tab_music=0x7f020035; - public static final int ic_tab_music_off=0x7f020036; - public static final int ic_tab_music_on=0x7f020037; - public static final int ic_tab_song=0x7f020038; - public static final int ic_tab_song_off=0x7f020039; - public static final int ic_tab_song_on=0x7f02003a; + public static final int ic_skin1_file_playlist=0x7f02002e; + public static final int ic_skin1_splash=0x7f02002f; + public static final int ic_tab_album=0x7f020030; + public static final int ic_tab_album_off=0x7f020031; + public static final int ic_tab_album_on=0x7f020032; + public static final int ic_tab_artist=0x7f020033; + public static final int ic_tab_artist_off=0x7f020034; + public static final int ic_tab_artist_on=0x7f020035; + public static final int ic_tab_music=0x7f020036; + public static final int ic_tab_music_off=0x7f020037; + public static final int ic_tab_music_on=0x7f020038; + public static final int ic_tab_song=0x7f020039; + public static final int ic_tab_song_off=0x7f02003a; + public static final int ic_tab_song_on=0x7f02003b; } public static final class id { public static final int GridView01=0x7f060014; @@ -84,7 +85,8 @@ public static final int LinearLayout04=0x7f060079; public static final int LinearLayout05=0x7f06007f; public static final int ListView01=0x7f06003c; - public static final int Spinner01=0x7f06008a; + public static final int RadioGroup01=0x7f060094; + public static final int Spinner01=0x7f06008b; public static final int SurfaceView01=0x7f06002d; public static final int TableLayout01=0x7f060006; public static final int TableLayout02=0x7f06004b; @@ -97,9 +99,10 @@ public static final int btnAlbumSelUp=0x7f060019; public static final int btnArtistSelDown=0x7f06001b; public static final int btnArtistSelUp=0x7f06001d; - public static final int btnIpSettings=0x7f06008c; + public static final int btnIpSettings=0x7f06008e; public static final int btnResultSelDown=0x7f06001f; public static final int btnResultSelUp=0x7f060021; + public static final int btnSelectSkin=0x7f06008d; public static final int btnSongSelDown=0x7f060023; public static final int btnSongSelUp=0x7f060025; public static final int btn_main_music=0x7f060009; @@ -203,26 +206,33 @@ public static final int now_progress=0x7f060032; public static final int now_stop=0x7f060038; public static final int now_title=0x7f060035; - public static final int radio01=0x7f060094; - public static final int radio02=0x7f060095; - public static final int radio03=0x7f060096; - public static final int radio04=0x7f060097; - public static final int radioStop=0x7f060098; - public static final int server_ip=0x7f06008f; - public static final int server_macid=0x7f060091; - public static final int server_name=0x7f06008e; - public static final int server_port=0x7f060090; - public static final int splash=0x7f060092; + public static final int radio01=0x7f06009d; + public static final int radio02=0x7f06009e; + public static final int radio03=0x7f06009f; + public static final int radio04=0x7f0600a0; + public static final int radioStop=0x7f0600a1; + public static final int selectSkin1=0x7f060095; + public static final int selectSkin2=0x7f060097; + public static final int selectSkin3=0x7f060099; + public static final int server_ip=0x7f060091; + public static final int server_macid=0x7f060093; + public static final int server_name=0x7f060090; + public static final int server_port=0x7f060092; + public static final int splash=0x7f06009b; public static final int text_kb_streamed=0x7f060028; - public static final int title=0x7f060093; + public static final int title=0x7f06009c; public static final int txtDbAlbum=0x7f060018; public static final int txtDbArtist=0x7f06001c; public static final int txtDbResult=0x7f060020; public static final int txtDbSong=0x7f060024; public static final int txtDirectory=0x7f060013; public static final int txtFile=0x7f060029; - public static final int txtIntanceName=0x7f06008d; - public static final int vibration=0x7f06008b; + public static final int txtIntanceName=0x7f06008f; + public static final int txtVersion=0x7f06008a; + public static final int vibration=0x7f06008c; + public static final int visitHome1=0x7f060096; + public static final int visitHome2=0x7f060098; + public static final int visitHome3=0x7f06009a; public static final int widget0=0x7f060012; public static final int widget00=0x7f06003d; public static final int widget01=0x7f060041; @@ -250,9 +260,10 @@ public static final int remote03b=0x7f030011; public static final int setup=0x7f030012; public static final int setup_ip=0x7f030013; - public static final int splash=0x7f030014; - public static final int title=0x7f030015; - public static final int webradio=0x7f030016; + public static final int skin=0x7f030014; + public static final int splash=0x7f030015; + public static final int title=0x7f030016; + public static final int webradio=0x7f030017; } public static final class string { public static final int app_name=0x7f040000; Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_file_playlist.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/drawable/ic_skin1_file_playlist.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/setup.xml 2011-01-30 19:59:10 UTC (rev 4084) @@ -6,13 +6,19 @@ <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="24dip" android:text="Global settings" android:paddingBottom="10dip" android:textColor="#FFFFFFFF"></TextView> - <TextView android:layout_width="fill_parent" - android:layout_height="wrap_content" android:textSize="18dip" android:text="Power Mode" android:textColor="#FFFFFFFF"></TextView> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFFFF" android:text="Version" android:id="@+id/txtVersion"></TextView><TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:textSize="18dip" android:text="Power Mode" android:textColor="#FFFFFFFF" android:layout_marginTop="10dip"></TextView> <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" android:layout_height="wrap_content"></Spinner> <CheckBox android:layout_width="wrap_content" - android:layout_height="wrap_content" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback" android:textColor="#FFFFFFFF"></CheckBox><Button android:layout_height="wrap_content" android:id="@+id/btnIpSettings" android:text="IP settings" android:layout_width="fill_parent" android:layout_marginTop="20dip"></Button> + android:layout_height="wrap_content" android:textSize="18dip" android:id="@+id/vibration" android:text="use vibration feedback" android:textColor="#FFFFFFFF"></CheckBox> + <Button android:layout_height="wrap_content" android:id="@+id/btnSelectSkin" + android:text="Select skin" android:layout_width="fill_parent" + android:layout_marginTop="20dip" android:textSize="18dip"> + </Button> + + </LinearLayout> Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/skin.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/skin.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/skin.xml 2011-01-30 19:59:10 UTC (rev 4084) @@ -0,0 +1,30 @@ +<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"> +<TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="Select skin" android:textColor="#FFFFFFFF" android:layout_marginTop="5dip" android:textSize="24dip"></TextView> + + <RadioGroup android:id="@+id/RadioGroup01" android:layout_height="wrap_content" android:layout_width="fill_parent"> + + <LinearLayout android:id="@+id/LinearLayout02" android:layout_height="wrap_content" android:layout_width="fill_parent"> + <RadioButton android:id="@+id/selectSkin1" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left" android:layout_weight="1" android:checked="true" android:text="dark skin ( by inspirement )"> + </RadioButton> + <Button android:id="@+id/visitHome1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Homepage" android:layout_marginLeft="10dip" android:layout_gravity="right"></Button> + +</LinearLayout> + + <LinearLayout android:id="@+id/LinearLayout02" android:layout_height="wrap_content" android:layout_width="fill_parent"> + <RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="left" android:layout_weight="1" android:id="@+id/selectSkin2" android:text="Skin2 ( by someone )"> + </RadioButton> + <Button android:id="@+id/visitHome2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Homepage" android:layout_marginLeft="10dip" android:layout_gravity="right"></Button> + </LinearLayout> + + <LinearLayout android:id="@+id/LinearLayout02" android:layout_height="wrap_content" android:layout_width="fill_parent"> + <RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="left" android:layout_weight="1" android:id="@+id/selectSkin3" android:text="Skin3 ( by someone )"> + </RadioButton> + <Button android:id="@+id/visitHome3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Homepage" android:layout_marginLeft="10dip" android:layout_gravity="right"></Button> + </LinearLayout> + +</RadioGroup> + +</LinearLayout> Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Setup_ip.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Setup_ip.java 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/Setup_ip.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2005-2011 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -package mediaportal.remote; - -import mediaportal.remote.R; -import mediaportal.remote.utils.AppSettings; -import android.app.Activity; -import android.os.Bundle; -import android.widget.EditText; -import android.widget.TextView; - -public class Setup_ip extends Activity { - - private TextView txtInstance; - private EditText txtName; - private EditText txtServer; - private EditText txtPort; - private EditText txtMac; - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle icicle) { - super.onCreate(icicle); - setContentView(R.layout.setup_ip); - - txtInstance = (TextView) findViewById(R.id.txtIntanceName); - txtName = (EditText) findViewById(R.id.server_name); - txtServer = (EditText) findViewById(R.id.server_ip); - txtPort = (EditText) findViewById(R.id.server_port); - txtMac = (EditText) findViewById(R.id.server_macid); - } - - @Override - public void onResume() { - super.onResume(); - - txtInstance.setText("Instance name (" + AppSettings.getInstance() + ")"); - txtName.setText(AppSettings.getName()); - txtServer.setText(AppSettings.getServer()); - txtPort.setText(AppSettings.getPort()); - txtMac.setText(AppSettings.getMacId()); - } - - @Override - public void onPause() { - super.onPause(); - - AppSettings.setName(txtName.getText().toString()); - AppSettings.setServer(txtServer.getText().toString()); - AppSettings.setPort(txtPort.getText().toString()); - AppSettings.setMacId(txtMac.getText().toString()); - } -} Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/HttpHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/HttpHandler.java 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/communication/HttpHandler.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -27,10 +27,12 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; +import java.net.URLEncoder; import mediaportal.remote.utils.AppSettings; import android.graphics.Bitmap; @@ -80,13 +82,22 @@ public Bitmap DownloadImage(String urlStr) { - final String url = urlStr.replaceAll(" ","%20"); + try { + urlStr = URLEncoder.encode(urlStr, "UTF-8"); + } catch (UnsupportedEncodingException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + urlStr = urlStr.replaceAll("%2F", "/"); + urlStr = urlStr.replaceAll("%3A", ":"); + Bitmap bitmap = null; InputStream in = null; try { - in = openHttpConnection(url); + in = openHttpConnection(urlStr); bitmap = BitmapFactory.decodeStream(in); if (in != null) in.close(); @@ -147,6 +158,7 @@ .toString(); try { + InputStream in = openHttpConnection("http://" + AppSettings.getServer() + ":" + AppSettings.getPort() + "/music/" + Path + Filename.replaceAll(" ", "%20")); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -35,6 +35,8 @@ import mediaportal.remote.nowPlaying.NowPlaying; import mediaportal.remote.nowPlaying.NowPlayingXmlHandler; import mediaportal.remote.pictures.Pictures; +import mediaportal.remote.setup.Setup; +import mediaportal.remote.setup.Setup_ip; import mediaportal.remote.utils.AppSettings; import mediaportal.remote.utils.KeyLock; import mediaportal.remote.utils.SAX_Parser; @@ -103,7 +105,7 @@ Intent myIntent = new Intent(this, Splash.class); startActivity(myIntent); } - + // create MP folder try { File fPath = new File(Environment.getExternalStorageDirectory(), @@ -220,7 +222,8 @@ switch (keyCode) { case KeyEvent.KEYCODE_MENU: { - final CharSequence[] items = { "Settings", "Switch HTPC", "Exit" }; + final CharSequence[] items = { "Global Settings", "IP Settings", + "Switch HTPC", "Exit" }; AlertDialog.Builder builder = new AlertDialog.Builder(Main.this); builder.setTitle("Select option"); @@ -228,11 +231,15 @@ builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { switch (item) { - case 0: // settings - Intent myIntent = new Intent(Main.this, Setup.class); - startActivityForResult(myIntent, 0); + case 0: // global settings + Intent myIntent1 = new Intent(Main.this, Setup.class); + startActivityForResult(myIntent1, 0); break; - case 1: // switch instance + case 1: // ip settings + Intent myIntent2 = new Intent(Main.this, Setup_ip.class); + startActivityForResult(myIntent2, 0); + break; + case 2: // switch instance final CharSequence[] items2 = AppSettings.getNames(); AlertDialog.Builder builder = new AlertDialog.Builder( @@ -255,7 +262,8 @@ break; } - txtInstance.setText(AppSettings.getName()); + txtInstance.setText(AppSettings + .getName()); Pictures.actualDir = ""; } @@ -264,7 +272,7 @@ AlertDialog alert = builder.create(); alert.show(); break; - case 2: // exit + case 3: // exit android.os.Process.killProcess(android.os.Process .myPid()); break; @@ -380,7 +388,7 @@ @Override public void onPause() { super.onPause(); - + doUpdate = false; mHandler.removeCallbacks(mUpdateTimeTask); } @@ -394,7 +402,7 @@ private class update extends AsyncTask<String, Void, Void> { // can use UI thread here protected void onPreExecute() { - + } // automatically done on worker thread (separate from UI thread) Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -70,8 +70,10 @@ final CharSequence[] items = { "Add to playlist", "Clear playlist", "Save to SD card", "Play locally" }; + final CharSequence[] itemsPlaylist = { "Add to playlist", "Clear playlist" }; - final CharSequence[] itemsLong = { "Add folder to playlist", "Clear playlist" }; + final CharSequence[] itemsLong = { "Add folder to playlist", + "Clear playlist" }; @Override public void onCreate(Bundle savedInstanceState) { @@ -79,7 +81,7 @@ setContentView(R.layout.music); myParent = this.getApplicationContext(); - + mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); @@ -100,15 +102,22 @@ AlertDialog.Builder builder = new AlertDialog.Builder( parent.getContext()); + CharSequence[] tmp = items; + if(!selectedItem.File.toLowerCase().contains(".mp3")) + { + tmp = itemsPlaylist; + } + builder.setTitle(selectedItem.File); - builder.setItems(items, + builder.setItems(tmp, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { switch (item) { case 0: SendCommand.PostAddFile(actualDir - + selectedItem.File.replaceAll(" ", "%20")); + + selectedItem.File.replaceAll( + " ", "%20")); Toast.makeText( MusicDir.this, selectedItem.File @@ -125,22 +134,28 @@ SavetoSDCard(selectedItem.File); break; case 3: - - String link = "http://" + AppSettings.getServer() - + ":" + AppSettings.getPort() + "/music/"; - - String file = actualDir + selectedItem.File; + + String link = "http://" + + AppSettings.getServer() + ":" + + AppSettings.getPort() + + "/music/"; + + String file = actualDir + + selectedItem.File; try { - file = URLEncoder.encode(file, "UTF-8"); + file = URLEncoder.encode(file, + "UTF-8"); } catch (UnsupportedEncodingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } link = link + file; - - Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setDataAndType(Uri.parse(link), "audio/mpeg"); - + + Intent intent = new Intent( + Intent.ACTION_VIEW); + intent.setDataAndType(Uri.parse(link), + "audio/mpeg"); + startActivity(intent); break; } @@ -185,7 +200,7 @@ Vibration.vibrateShort(); selectedItem = musicList.get(position - 1); - + AlertDialog.Builder builder = new AlertDialog.Builder( parent.getContext()); @@ -197,7 +212,9 @@ switch (item) { case 0: // add folder - SendCommand.PostAddFolder(actualDir + selectedItem.File.replaceAll(" ", "%20")); + SendCommand.PostAddFolder(actualDir + + selectedItem.File.replaceAll( + " ", "%20")); break; case 1: SendCommand.PostClearPlaylist(); @@ -216,7 +233,7 @@ }); } - + @Override public void onResume() { super.onResume(); @@ -368,7 +385,15 @@ item.typ = "folder"; iv.setTag(item); } else { + + if(txtName.toLowerCase().contains(".mp3")) + { iv.setImageResource(R.drawable.ic_skin1_file_audio); + } + else + { + iv.setImageResource(R.drawable.ic_skin1_file_playlist); + } musicItem item = new musicItem(); item.title = txtName; item.typ = "item"; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/pictures/Pictures.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -208,8 +208,7 @@ DirItems item = pictureList.get(picNo); if (!item.isFolder) { if (item.Picture == null) { - String file = server + actualDir.replaceAll(" ", "%20") - + item.File + ".thb"; + String file = server + actualDir + item.File + ".thb"; item.Picture = http.DownloadImage(file); if (picNo < pictureList.size()) // very strange exeption happens here 10/10 pictureList.set(picNo, item); Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/SelectSkin.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/SelectSkin.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/SelectSkin.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2005-2011 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +package mediaportal.remote.setup; + +import mediaportal.remote.R; +import mediaportal.remote.utils.Vibration; +import android.app.Activity; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.CompoundButton; +import android.widget.CompoundButton.OnCheckedChangeListener; +import android.widget.RadioButton; + +public class SelectSkin extends Activity { + + private RadioButton radio1; + private RadioButton radio2; + private RadioButton radio3; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.skin); + + radio1 = (RadioButton) findViewById(R.id.selectSkin1); + radio2 = (RadioButton) findViewById(R.id.selectSkin2); + radio3 = (RadioButton) findViewById(R.id.selectSkin3); + + radio1.setOnCheckedChangeListener(new OnCheckedChangeListener() { + public void onCheckedChanged(CompoundButton buttonView, + boolean isChecked) { + Vibration.vibrateShort(); + if (isChecked) { + radio2.setChecked(false); + radio3.setChecked(false); + } + } + }); + radio2.setOnCheckedChangeListener(new OnCheckedChangeListener() { + public void onCheckedChanged(CompoundButton buttonView, + boolean isChecked) { + Vibration.vibrateShort(); + if (isChecked) { + radio1.setChecked(false); + radio3.setChecked(false); + } + } + }); + radio3.setOnCheckedChangeListener(new OnCheckedChangeListener() { + public void onCheckedChanged(CompoundButton buttonView, + boolean isChecked) { + Vibration.vibrateShort(); + if (isChecked) { + radio1.setChecked(false); + radio2.setChecked(false); + } + } + }); + + + Button btnVisitHome1 = (Button) findViewById(R.id.visitHome1); + btnVisitHome1.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + OpenURL("http://www.kleiner-schelm.de"); + } + }); + Button btnVisitHome2 = (Button) findViewById(R.id.visitHome2); + btnVisitHome2.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + OpenURL("http://www.kleiner-schelm.de"); + } + }); + Button btnVisitHome3 = (Button) findViewById(R.id.visitHome3); + btnVisitHome3.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + OpenURL("http://www.kleiner-schelm.de"); + } + }); + + } + + private void OpenURL(String Url) { + Intent i = new Intent(Intent.ACTION_VIEW); + i.setData(Uri.parse(Url)); + startActivity(i); + } + +} \ No newline at end of file Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2005-2011 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +package mediaportal.remote.setup; + +import mediaportal.remote.R; +import mediaportal.remote.utils.AppSettings; +import mediaportal.remote.utils.Vibration; +import android.app.Activity; +import android.content.Intent; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.CheckBox; +import android.widget.CompoundButton; +import android.widget.Spinner; +import android.widget.TextView; + +public class Setup extends Activity { + + private Spinner powerMode; + private CheckBox vibrate; + + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + setContentView(R.layout.setup); + + TextView version = (TextView)findViewById(R.id.txtVersion); + version.setText("Version : " + getSoftwareVersion()); + + vibrate = (CheckBox) findViewById(R.id.vibration); + vibrate.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + public void onCheckedChanged(CompoundButton buttonView, + boolean isChecked) { + if (isChecked) { + Vibration.vibrateShort(); + } + } + }); + + powerMode = (Spinner) findViewById(R.id.Spinner01); + ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( + this, R.array.shutdown, + android.R.layout.simple_spinner_item); + adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + powerMode.setAdapter(adapter); + + Button selectSkin = (Button) findViewById(R.id.btnSelectSkin); + selectSkin.setOnClickListener(new View.OnClickListener() { + public void onClick(View view) { + Vibration.vibrateShort(); + + Intent myIntent = new Intent(view.getContext(), + SelectSkin.class); + startActivity(myIntent); + } + }); + + } + + @Override + public void onResume() { + super.onResume(); + + vibrate.setChecked(AppSettings.getVibrate()); + powerMode.setSelection(AppSettings.getPowerMode()); + } + + @Override + public void onPause() { + super.onPause(); + + AppSettings.setVibrate(vibrate.isChecked()); + AppSettings.setPowerMode(powerMode.getSelectedItemPosition()); + } + + private String getSoftwareVersion() { + try { + PackageInfo packageInfo = getPackageManager().getPackageInfo( + getPackageName(), 0); + return packageInfo.versionName; + } catch (PackageManager.NameNotFoundException e) { + Log.e("MediaPortal", "Package name not found", e); + } + return "not found"; + } +} Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup_ip.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup_ip.java (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup_ip.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2005-2011 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +package mediaportal.remote.setup; + +import mediaportal.remote.R; +import mediaportal.remote.utils.AppSettings; +import android.app.Activity; +import android.os.Bundle; +import android.widget.EditText; +import android.widget.TextView; + +public class Setup_ip extends Activity { + + private TextView txtInstance; + private EditText txtName; + private EditText txtServer; + private EditText txtPort; + private EditText txtMac; + + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + setContentView(R.layout.setup_ip); + + txtInstance = (TextView) findViewById(R.id.txtIntanceName); + txtName = (EditText) findViewById(R.id.server_name); + txtServer = (EditText) findViewById(R.id.server_ip); + txtPort = (EditText) findViewById(R.id.server_port); + txtMac = (EditText) findViewById(R.id.server_macid); + } + + @Override + public void onResume() { + super.onResume(); + + txtInstance.setText("Instance name (" + AppSettings.getInstance() + ")"); + txtName.setText(AppSettings.getName()); + txtServer.setText(AppSettings.getServer()); + txtPort.setText(AppSettings.getPort()); + txtMac.setText(AppSettings.getMacId()); + } + + @Override + public void onPause() { + super.onPause(); + + AppSettings.setName(txtName.getText().toString()); + AppSettings.setServer(txtServer.getText().toString()); + AppSettings.setPort(txtPort.getText().toString()); + AppSettings.setMacId(txtMac.getText().toString()); + } +} Deleted: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup.java 2011-01-30 19:59:10 UTC (rev 4084) @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2005-2011 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -package mediaportal.remote; - -import mediaportal.remote.R; -import mediaportal.remote.utils.AppSettings; -import mediaportal.remote.utils.Vibration; -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.view.View; -import android.widget.ArrayAdapter; -import android.widget.Button; -import android.widget.CheckBox; -import android.widget.CompoundButton; -import android.widget.Spinner; - -public class Setup extends Activity { - - private Spinner powerMode; - private CheckBox vibrate; - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle icicle) { - super.onCreate(icicle); - setContentView(R.layout.setup); - - vibrate = (CheckBox) findViewById(R.id.vibration); - vibrate.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { - public void onCheckedChanged(CompoundButton buttonView, - boolean isChecked) { - if (isChecked) { - Vibration.vibrateShort(); - } - } - }); - - powerMode = (Spinner) findViewById(R.id.Spinner01); - ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( - this, R.array.shutdown, - android.R.layout.simple_spinner_item); - adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); - powerMode.setAdapter(adapter); - - Button settings = (Button) findViewById(R.id.btnIpSettings); - settings.setOnClickListener(new View.OnClickListener() { - public void onClick(View view) { - Vibration.vibrateShort(); - - Intent myIntent = new Intent(view.getContext(), - Setup_ip.class); - startActivity(myIntent); - } - }); - - } - - @Override - public void onResume() { - super.onResume(); - - vibrate.setChecked(AppSettings.getVibrate()); - powerMode.setSelection(AppSettings.getPowerMode()); - } - - @Override - public void onPause() { - super.onPause(); - - AppSettings.setVibrate(vibrate.isChecked()); - AppSettings.setPowerMode(powerMode.getSelectedItemPosition()); - } -} Added: trunk/plugins/AndroidRemote/Release/skins.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/skins.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/ExecuteCommand.cs 2011-01-30 19:59:10 UTC (rev 4084) @@ -368,47 +368,72 @@ PlayList playList = playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); - bool found = false; - string fileName = data["filename"]; - fileName = fileName.Replace("%20", " "); - fileName = fileName.Replace("/", "\\"); - string artist = data["artist"].Replace("%20", " "); - string title = data["title"].Replace("%20", " "); + if (fileName.ToLower().Contains(".mp3")) + { + bool found = false; - directoryList = GetMpShare("music"); - string local = GetLocalDir(fileName, directoryList); + fileName = fileName.Replace("%20", " "); + fileName = fileName.Replace("/", "\\"); - foreach (PlayListItem item in playList) - { - if (item.FileName == local) + string artist = data["artist"].Replace("%20", " "); + string title = data["title"].Replace("%20", " "); + + directoryList = GetMpShare("music"); + string local = GetLocalDir(fileName, directoryList); + + foreach (PlayListItem item in playList) { - found = true; - break; + if (item.FileName == local) + { + found = true; + break; + } } + + if (!found) + { + AndroidServer.logDebug("add music : " + artist + " - " + title); + + PlayListItem playlistItem = new PlayListItem(); + playlistItem.Type = PlayListItem.PlayListItemType.Audio; + playlistItem.FileName = local; + playlistItem.Description = artist + " - " + title; + playlistItem.Duration = 0; + + MusicTag readTag = TagReader.ReadTag(local); + playlistItem.MusicTag = readTag; + + playList.Add(playlistItem); + + if (!g_Player.Playing) + { + StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayerLast); + GUIGraphicsContext.form.Invoke(del, new object[] { }); + } + } } - - if (!found) + else { - AndroidServer.logDebug("add music : " + artist + " - " + title); + playList.Clear(); + fileName = fileName.Replace("%20", " "); + fileName = fileName.Replace("/", "\\"); + directoryList = GetMpShare("music"); + string local = GetLocalDir(fileName, directoryList); + PlayListItem playlistItem = new PlayListItem(); - playlistItem.Type = PlayListItem.PlayListItemType.Audio; + playlistItem.Type = PlayListItem.PlayListItemType.Unknown; playlistItem.FileName = local; - playlistItem.Description = artist + " - " + title; + playlistItem.Description = Path.GetFileNameWithoutExtension(local); playlistItem.Duration = 0; - MusicTag readTag = TagReader.ReadTag(local); - playlistItem.MusicTag = readTag; - playList.Add(playlistItem); - if (!g_Player.Playing) - { - StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayerLast); - GUIGraphicsContext.form.Invoke(del, new object[] { }); - } + StartPlaylistPlayer del = new StartPlaylistPlayer(StartPlayer); + GUIGraphicsContext.form.Invoke(del, new object[] { }); + } } #endregion Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Content/MusicHandler.cs 2011-01-30 19:59:10 UTC (rev 4084) @@ -259,13 +259,16 @@ msg += "<Folder>" + SomeUtils.EncodeString(Path.GetFileName(f)) + "</Folder>\r\n"; } - //files - string[] files = Directory.GetFiles(dir, "*.mp3", SearchOption.TopDirectoryOnly); - foreach (string f in files) + ArrayList fileList = getAllpattern(dir); + fileList.Sort(); + + for (int i = 0; i < fileList.Count; i++) { - string fName = Path.GetFileName(f); + string file = (string)fileList[i]; + string fName = Path.GetFileName(file); msg += "<File>" + SomeUtils.EncodeString(fName) + "</File>\r\n"; } + msg += "</Directory>\r\n"; // send @@ -687,5 +690,18 @@ } return string.Empty; } + + private static ArrayList getAllpattern(string Dir) + { + string[] filters = { ".mp3", ".m3u", ".pls", ".wpl" }; + + ArrayList files = new ArrayList(); + foreach (string filter in filters) + { + files.AddRange(Directory.GetFiles(Dir, "*" + filter)); + } + + return files; + } } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs 2011-01-30 19:59:10 UTC (rev 4084) @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.2.0.0")] -[assembly: AssemblyFileVersion("0.2.0.0")] +[assembly: AssemblyVersion("0.2.1.0")] +[assembly: AssemblyFileVersion("0.2.1.0")] Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2011-01-28 09:25:28 UTC (rev 4083) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Request.cs 2011-01-30 19:59:10 UTC (rev 4084) @@ -314,6 +314,34 @@ { PictureHandler.ReplyRandomPicture(socket); } + + #region some test how to accces the gui + else if (req.StartsWith("/onlinevideos")) + { + GUIWindowManager.ActivateWindow(4755); + } + else if (req.StartsWith("/items")) + { + GUIWindow window = GUIWindowManager.GetWindow(4755); + GUIFacadeControl cont = (GUIFacadeControl) window.GetControl(50); + + cont.SelectedListItemIndex = 2; + GUIListItem i = cont.SelectedListItem; + + // header + string msg = "HTTP/1.0 200 Ok\r\n"; + msg += "Content-Type: application/xml; charset=utf-8; filename=info.xml" + "\r\n"; + msg += "Proxy-Connection: close" + "\r\n"; + msg += "\r\n"; + // content + msg += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"; + msg += "<OnlineVideos>\r\n"; + + + msg += "<OnlineVideos>\r\n"; + } + #endregion + else { handler.SendErrorURL(socket, req); Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-01-31 22:03:10
|
Revision: 4085 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4085&view=rev Author: kroko_koenig Date: 2011-01-31 22:03:04 +0000 (Mon, 31 Jan 2011) Log Message: ----------- Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlayingList.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java trunk/plugins/AndroidRemote/Release/remote3.jpg trunk/plugins/AndroidRemote/Release/settings.jpg trunk/plugins/AndroidRemote/Release/settings2.jpg Added Paths: ----------- trunk/plugins/AndroidRemote/Release/Using Android Remote.docx trunk/plugins/AndroidRemote/Release/options.jpg trunk/plugins/AndroidRemote/Release/pictures_folder.jpg trunk/plugins/AndroidRemote/Release/playlist_option.jpg trunk/plugins/AndroidRemote/Release/settings3.jpg Removed Paths: ------------- trunk/plugins/AndroidRemote/Release/main_menu.jpg Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-30 19:59:10 UTC (rev 4084) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2011-01-31 22:03:04 UTC (rev 4085) @@ -1,23 +1,28 @@ General ------- Control up to 3 Mediaportal -Wake On Lan from the remote -switch off / hibernate etc. your MP from the remote -vibration feedback +WakeOnLan from the remote control (press short on power button) +switch off / hibernate etc. your MP from the remote (press long on power button) +optional vibration feedback show what actual playing on the main screen and pause / skip control -uses VLC to stream to the phone -send crash report +uses VLC on the pc side to stream video to the phone (fast processor needed) +send crash report if terminated by exception +different skins Pictures section ---------------- browse folders (MP shares) display thumbs (threaded) -save to sd -open browser +save pictures to SD card +open browser with picture send picture via MMS -slide show -random slide show +slide show of a folder +random slide show of all pictures +in fullscreen you can swipe left right in the directory +touch long for options +touch short to stop slideshow + Music section ------------- browse folders (MP shares) @@ -56,16 +61,11 @@ Main issues ------------ switch WIFI on (just msg now) -save files from Android to MP -progress task for downloads +progress task for downloads (0...100%) NowPlaying list show actual / count of items on top bar -add gfx +add skins +browsing pictues make slideshow available onlongclick a folder +adjustable time delay for slideshow +sending commands threaded -- fix for folder like //pictures//pictures//bla... -- fix display folder %20 -- pointer for thumb caching always to zero on execute fetching -- removed brush to have better contrast -- add profiles for vlc (server) -- use video extensions list - Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-30 19:59:10 UTC (rev 4084) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-01-31 22:03:04 UTC (rev 4085) @@ -222,7 +222,7 @@ switch (keyCode) { case KeyEvent.KEYCODE_MENU: { - final CharSequence[] items = { "Global Settings", "IP Settings", + final CharSequence[] items = { "Global settings", "IP settings", "Switch HTPC", "Exit" }; AlertDialog.Builder builder = new AlertDialog.Builder(Main.this); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlayingList.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlayingList.java 2011-01-30 19:59:10 UTC (rev 4084) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/nowPlaying/NowPlayingList.java 2011-01-31 22:03:04 UTC (rev 4085) @@ -49,7 +49,7 @@ private Handler mHandler = new Handler(); final CharSequence[] items = { "Play item", "Remove item", - "Clear playlist", "Cancel" }; + "Clear playlist"}; private static ArrayList<PlayListItem> PlayListItems; private NowPlayingListXmlHandler.PlayListItem selectedItem; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-30 19:59:10 UTC (rev 4084) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/TopExceptionHandler.java 2011-01-31 22:03:04 UTC (rev 4085) @@ -59,7 +59,7 @@ } report += "-------------------------------\n\n"; - report += "Remote Version : 26.01 / 21:00\n\n"; + report += "Remote Version : 1.2\n\n"; report += "-------------------------------\n\n"; report += "--------- Device ---------\n\n"; report += "Brand: " + Build.BRAND + "\n"; Added: trunk/plugins/AndroidRemote/Release/Using Android Remote.docx =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/Using Android Remote.docx ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/plugins/AndroidRemote/Release/main_menu.jpg =================================================================== (Binary files differ) Added: trunk/plugins/AndroidRemote/Release/options.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/options.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Release/pictures_folder.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/pictures_folder.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/AndroidRemote/Release/playlist_option.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/playlist_option.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/AndroidRemote/Release/remote3.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/settings.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/settings2.jpg =================================================================== (Binary files differ) Added: trunk/plugins/AndroidRemote/Release/settings3.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/AndroidRemote/Release/settings3.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-02-01 07:07:37
|
Revision: 4086 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4086&view=rev Author: kroko_koenig Date: 2011-02-01 07:07:30 +0000 (Tue, 01 Feb 2011) Log Message: ----------- add installer for MP Modified Paths: -------------- trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Release/AndroidRemote.xml Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Added: trunk/plugins/AndroidRemote/Release/AndroidRemote.xml =================================================================== --- trunk/plugins/AndroidRemote/Release/AndroidRemote.xml (rev 0) +++ trunk/plugins/AndroidRemote/Release/AndroidRemote.xml 2011-02-01 07:07:30 UTC (rev 4086) @@ -0,0 +1,169 @@ +<?xml version="1.0" encoding="utf-8"?> +<ExtensionCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <Items> + <PackageClass> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items /> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items /> + </Sections> + <Dependencies> + <Items /> + </Dependencies> + <GeneralInfo> + <Name>Android Remote</Name> + <Id>d29419c3-1176-48fd-bed5-599a4ec93b7b</Id> + <Author>Mark Koenig (kroko) 2010</Author> + <HomePage>http://forum.team-mediaportal.com/</HomePage> + <ForumPage>http://forum.team-mediaportal.com/webservice-mobile-access-537/plugin-android-remote-89895/</ForumPage> + <UpdateUrl /> + <Version> + <Major>0</Major> + <Minor>2</Minor> + <Build>3</Build> + <Revision>0</Revision> + </Version> + <ExtensionDescription>Control your MediaPortal with yout Android. It can be used as a remote control or doing many other things like music, pictures and video control. +Gfx has been done by oddfella and some additional coding is from rolls1400. + +Have fun.</ExtensionDescription> + <VersionDescription>add support for huge databases +/- buttons, prepare 2nd skin</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation /> + <ReleaseDate>2010-12-09T16:17:18.1693243+01:00</ReleaseDate> + <Tags>android,remote</Tags> + <Location>C:\AAA\AndroidRemote2\Release\AndroidRemote.mpe1</Location> + <Params> + <Items> + <SectionParam Name="Icon"> + <Value /> + <ValueType>File</ValueType> + <Description>The icon file of the package (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Online Icon"> + <Value /> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value /> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items /> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + </ProjectSettings> + </PackageClass> + <PackageClass> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items /> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items /> + </Sections> + <Dependencies> + <Items /> + </Dependencies> + <GeneralInfo> + <Name>Android Remote</Name> + <Id>d29419c3-1176-48fd-bed5-599a4ec93b7b</Id> + <Author>Mark Koenig (kroko) 2010</Author> + <HomePage>http://forum.team-mediaportal.com/</HomePage> + <ForumPage>http://forum.team-mediaportal.com/webservice-mobile-access-537/plugin-android-remote-89895/</ForumPage> + <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/AndroidRemote/Release/AndroidRemote.xml</UpdateUrl> + <Version> + <Major>0</Major> + <Minor>2</Minor> + <Build>4</Build> + <Revision>0</Revision> + </Version> + <ExtensionDescription>Control your MediaPortal with yout Android. It can be used as a remote control or doing many other things like music, pictures and video control. +Gfx has been done by oddfella and some additional coding is from rolls1400. + +Have fun.</ExtensionDescription> + <VersionDescription>small fixes</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1</OnlineLocation> + <ReleaseDate>2010-12-09T16:17:18.1693243+01:00</ReleaseDate> + <Tags>android,remote</Tags> + <Location>C:\AAA\AndroidRemote2\Release\AndroidRemote.mpe1</Location> + <Params> + <Items> + <SectionParam Name="Icon"> + <Value /> + <ValueType>File</ValueType> + <Description>The icon file of the package (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Online Icon"> + <Value /> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value /> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items /> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + </ProjectSettings> + </PackageClass> + </Items> +</ExtensionCollection> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 =================================================================== --- trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-01-31 22:03:04 UTC (rev 4085) +++ trunk/plugins/AndroidRemote/Release/AndroidRemote.xmp2 2011-02-01 07:07:30 UTC (rev 4086) @@ -156,20 +156,20 @@ <Author>Mark Koenig (kroko) 2010</Author> <HomePage>http://forum.team-mediaportal.com/</HomePage> <ForumPage>http://forum.team-mediaportal.com/webservice-mobile-access-537/plugin-android-remote-89895/</ForumPage> - <UpdateUrl /> + <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/AndroidRemote/Release/AndroidRemote.xml</UpdateUrl> <Version> <Major>0</Major> <Minor>2</Minor> - <Build>3</Build> + <Build>4</Build> <Revision>0</Revision> </Version> <ExtensionDescription>Control your MediaPortal with yout Android. It can be used as a remote control or doing many other things like music, pictures and video control. Gfx has been done by oddfella and some additional coding is from rolls1400. Have fun.</ExtensionDescription> - <VersionDescription>add support for huge databases +/- buttons, prepare 2nd skin</VersionDescription> + <VersionDescription>small fixes</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> - <OnlineLocation /> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1</OnlineLocation> <ReleaseDate>2010-12-09T16:17:18.1693243+01:00</ReleaseDate> <Tags>android,remote</Tags> <Location>C:\AAA\AndroidRemote2\Release\AndroidRemote.mpe1</Location> @@ -240,5 +240,8 @@ <ProjectSettings> <FolderGroups /> <ProjectFilename>C:\AAA\AndroidRemote2\Release\AndroidRemote.xmp2</ProjectFilename> + <UpdatePath1>C:\AAA\AndroidRemote2\Release\AndroidRemote.xml</UpdatePath1> + <UpdatePath2 /> + <UpdatePath3 /> </ProjectSettings> </PackageClass> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs 2011-01-31 22:03:04 UTC (rev 4085) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Properties/AssemblyInfo.cs 2011-02-01 07:07:30 UTC (rev 4086) @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.2.1.0")] -[assembly: AssemblyFileVersion("0.2.1.0")] +[assembly: AssemblyVersion("0.2.4.0")] +[assembly: AssemblyFileVersion("0.2.4.0")] Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-02-01 14:33:22
|
Revision: 4087 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4087&view=rev Author: kroko_koenig Date: 2011-02-01 14:33:14 +0000 (Tue, 01 Feb 2011) Log Message: ----------- show dir also in music dirs, more doc Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/pictures.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 trunk/plugins/AndroidRemote/Release/Using Android Remote.docx trunk/plugins/AndroidRemote/Release/setup2.jpg trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-large/ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-large/main.xml Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-02-01 07:07:30 UTC (rev 4086) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2011-02-01 14:33:14 UTC (rev 4087) @@ -77,34 +77,34 @@ } public static final class id { public static final int GridView01=0x7f060014; - public static final int ImageView01=0x7f060027; - public static final int LinearLayout00=0x7f06005a; - public static final int LinearLayout01=0x7f06002e; - public static final int LinearLayout02=0x7f060065; - public static final int LinearLayout03=0x7f06006f; - public static final int LinearLayout04=0x7f060079; - public static final int LinearLayout05=0x7f06007f; - public static final int ListView01=0x7f06003c; - public static final int RadioGroup01=0x7f060094; - public static final int Spinner01=0x7f06008b; - public static final int SurfaceView01=0x7f06002d; + public static final int ImageView01=0x7f060028; + public static final int LinearLayout00=0x7f06005b; + public static final int LinearLayout01=0x7f06002f; + public static final int LinearLayout02=0x7f060066; + public static final int LinearLayout03=0x7f060070; + public static final int LinearLayout04=0x7f06007a; + public static final int LinearLayout05=0x7f060080; + public static final int ListView01=0x7f06003d; + public static final int RadioGroup01=0x7f060095; + public static final int Spinner01=0x7f06008c; + public static final int SurfaceView01=0x7f06002e; public static final int TableLayout01=0x7f060006; - public static final int TableLayout02=0x7f06004b; + public static final int TableLayout02=0x7f06004c; public static final int TableRow01=0x7f060007; - public static final int TableRow02=0x7f060050; - public static final int TableRow03=0x7f060055; + public static final int TableRow02=0x7f060051; + public static final int TableRow03=0x7f060056; public static final int TextView01=0x7f060003; public static final int TextView02=0x7f060004; - public static final int btnAlbumSelDown=0x7f060017; - public static final int btnAlbumSelUp=0x7f060019; - public static final int btnArtistSelDown=0x7f06001b; - public static final int btnArtistSelUp=0x7f06001d; - public static final int btnIpSettings=0x7f06008e; - public static final int btnResultSelDown=0x7f06001f; - public static final int btnResultSelUp=0x7f060021; - public static final int btnSelectSkin=0x7f06008d; - public static final int btnSongSelDown=0x7f060023; - public static final int btnSongSelUp=0x7f060025; + public static final int btnAlbumSelDown=0x7f060018; + public static final int btnAlbumSelUp=0x7f06001a; + public static final int btnArtistSelDown=0x7f06001c; + public static final int btnArtistSelUp=0x7f06001e; + public static final int btnIpSettings=0x7f06008f; + public static final int btnResultSelDown=0x7f060020; + public static final int btnResultSelUp=0x7f060022; + public static final int btnSelectSkin=0x7f06008e; + public static final int btnSongSelDown=0x7f060024; + public static final int btnSongSelUp=0x7f060026; public static final int btn_main_music=0x7f060009; public static final int btn_main_now_playing=0x7f06000c; public static final int btn_main_pictures=0x7f060008; @@ -114,129 +114,130 @@ public static final int btn_main_skp_back=0x7f06000f; public static final int btn_main_skp_forw=0x7f060011; public static final int btn_main_video=0x7f06000a; - public static final int btnkey01=0x7f06005b; - public static final int btnkey02=0x7f06005c; - public static final int btnkey03=0x7f06005d; - public static final int btnkey04=0x7f06005e; - public static final int btnkey05=0x7f06005f; - public static final int btnkey06=0x7f060060; - public static final int btnkey07=0x7f060061; - public static final int btnkey08=0x7f060062; - public static final int btnkey09=0x7f060063; - public static final int btnkey10=0x7f060064; - public static final int btnkey11=0x7f060066; - public static final int btnkey12=0x7f060067; - public static final int btnkey13=0x7f060068; - public static final int btnkey14=0x7f060069; - public static final int btnkey15=0x7f06006a; - public static final int btnkey16=0x7f06006b; - public static final int btnkey17=0x7f06006c; - public static final int btnkey18=0x7f06006d; - public static final int btnkey19=0x7f06006e; - public static final int btnkey20=0x7f060070; - public static final int btnkey21=0x7f060071; - public static final int btnkey22=0x7f060072; - public static final int btnkey23=0x7f060073; - public static final int btnkey24=0x7f060074; - public static final int btnkey25=0x7f060075; - public static final int btnkey26=0x7f060076; - public static final int btnkey27=0x7f060077; - public static final int btnkey28=0x7f060078; - public static final int btnkey29=0x7f06007a; - public static final int btnkey30=0x7f06007b; - public static final int btnkey31=0x7f06007c; - public static final int btnkey32=0x7f06007d; - public static final int btnkey33=0x7f06007e; - public static final int btnkey41=0x7f060080; - public static final int btnkey42=0x7f060081; - public static final int btnkey43=0x7f060082; - public static final int btnkey44=0x7f060083; - public static final int btnkey45=0x7f060084; - public static final int btnkey46=0x7f060085; - public static final int btnkey47=0x7f060086; - public static final int btnkey48=0x7f060087; - public static final int btnkey49=0x7f060088; - public static final int btnkey50=0x7f060089; - public static final int button_open=0x7f06002a; - public static final int button_stream=0x7f06002b; - public static final int button_stream_stop=0x7f06002c; - public static final int crtl_back=0x7f060048; - public static final int crtl_ch_m=0x7f060054; - public static final int crtl_ch_p=0x7f06004f; - public static final int crtl_down=0x7f060047; - public static final int crtl_full=0x7f060051; - public static final int crtl_info=0x7f060059; - public static final int crtl_left=0x7f060042; - public static final int crtl_menu=0x7f060053; - public static final int crtl_mp=0x7f06003e; - public static final int crtl_osd=0x7f060058; - public static final int crtl_parent=0x7f060046; - public static final int crtl_play=0x7f060052; - public static final int crtl_power=0x7f060040; - public static final int crtl_ratio=0x7f060057; - public static final int crtl_right=0x7f060044; - public static final int crtl_select=0x7f060043; - public static final int crtl_skip_back=0x7f06004c; - public static final int crtl_skip_forw=0x7f06004e; - public static final int crtl_stop=0x7f06004d; - public static final int crtl_sub=0x7f060056; - public static final int crtl_up=0x7f06003f; - public static final int crtl_vol_m=0x7f06004a; - public static final int crtl_vol_p=0x7f060049; - public static final int full_text=0x7f060026; + public static final int btnkey01=0x7f06005c; + public static final int btnkey02=0x7f06005d; + public static final int btnkey03=0x7f06005e; + public static final int btnkey04=0x7f06005f; + public static final int btnkey05=0x7f060060; + public static final int btnkey06=0x7f060061; + public static final int btnkey07=0x7f060062; + public static final int btnkey08=0x7f060063; + public static final int btnkey09=0x7f060064; + public static final int btnkey10=0x7f060065; + public static final int btnkey11=0x7f060067; + public static final int btnkey12=0x7f060068; + public static final int btnkey13=0x7f060069; + public static final int btnkey14=0x7f06006a; + public static final int btnkey15=0x7f06006b; + public static final int btnkey16=0x7f06006c; + public static final int btnkey17=0x7f06006d; + public static final int btnkey18=0x7f06006e; + public static final int btnkey19=0x7f06006f; + public static final int btnkey20=0x7f060071; + public static final int btnkey21=0x7f060072; + public static final int btnkey22=0x7f060073; + public static final int btnkey23=0x7f060074; + public static final int btnkey24=0x7f060075; + public static final int btnkey25=0x7f060076; + public static final int btnkey26=0x7f060077; + public static final int btnkey27=0x7f060078; + public static final int btnkey28=0x7f060079; + public static final int btnkey29=0x7f06007b; + public static final int btnkey30=0x7f06007c; + public static final int btnkey31=0x7f06007d; + public static final int btnkey32=0x7f06007e; + public static final int btnkey33=0x7f06007f; + public static final int btnkey41=0x7f060081; + public static final int btnkey42=0x7f060082; + public static final int btnkey43=0x7f060083; + public static final int btnkey44=0x7f060084; + public static final int btnkey45=0x7f060085; + public static final int btnkey46=0x7f060086; + public static final int btnkey47=0x7f060087; + public static final int btnkey48=0x7f060088; + public static final int btnkey49=0x7f060089; + public static final int btnkey50=0x7f06008a; + public static final int button_open=0x7f06002b; + public static final int button_stream=0x7f06002c; + public static final int button_stream_stop=0x7f06002d; + public static final int crtl_back=0x7f060049; + public static final int crtl_ch_m=0x7f060055; + public static final int crtl_ch_p=0x7f060050; + public static final int crtl_down=0x7f060048; + public static final int crtl_full=0x7f060052; + public static final int crtl_info=0x7f06005a; + public static final int crtl_left=0x7f060043; + public static final int crtl_menu=0x7f060054; + public static final int crtl_mp=0x7f06003f; + public static final int crtl_osd=0x7f060059; + public static final int crtl_parent=0x7f060047; + public static final int crtl_play=0x7f060053; + public static final int crtl_power=0x7f060041; + public static final int crtl_ratio=0x7f060058; + public static final int crtl_right=0x7f060045; + public static final int crtl_select=0x7f060044; + public static final int crtl_skip_back=0x7f06004d; + public static final int crtl_skip_forw=0x7f06004f; + public static final int crtl_stop=0x7f06004e; + public static final int crtl_sub=0x7f060057; + public static final int crtl_up=0x7f060040; + public static final int crtl_vol_m=0x7f06004b; + public static final int crtl_vol_p=0x7f06004a; + public static final int full_text=0x7f060027; public static final int icon_image=0x7f060001; public static final int icon_text=0x7f060002; - public static final int list_album=0x7f060016; - public static final int list_artist=0x7f06001a; - public static final int list_result=0x7f06001e; - public static final int list_song=0x7f060022; + public static final int list_album=0x7f060017; + public static final int list_artist=0x7f06001b; + public static final int list_result=0x7f06001f; + public static final int list_song=0x7f060023; public static final int main_instance=0x7f060005; public static final int main_now_playing=0x7f06000e; - public static final int music_grid=0x7f060015; - public static final int now_album=0x7f060030; - public static final int now_artist=0x7f060036; - public static final int now_cd=0x7f060031; - public static final int now_list=0x7f06003b; - public static final int now_next=0x7f06003a; - public static final int now_play=0x7f060039; - public static final int now_playing=0x7f06002f; - public static final int now_playing_right=0x7f060034; - public static final int now_playing_t_left=0x7f060033; - public static final int now_prev=0x7f060037; - public static final int now_progress=0x7f060032; - public static final int now_stop=0x7f060038; - public static final int now_title=0x7f060035; - public static final int radio01=0x7f06009d; - public static final int radio02=0x7f06009e; - public static final int radio03=0x7f06009f; - public static final int radio04=0x7f0600a0; - public static final int radioStop=0x7f0600a1; - public static final int selectSkin1=0x7f060095; - public static final int selectSkin2=0x7f060097; - public static final int selectSkin3=0x7f060099; - public static final int server_ip=0x7f060091; - public static final int server_macid=0x7f060093; - public static final int server_name=0x7f060090; - public static final int server_port=0x7f060092; - public static final int splash=0x7f06009b; - public static final int text_kb_streamed=0x7f060028; - public static final int title=0x7f06009c; - public static final int txtDbAlbum=0x7f060018; - public static final int txtDbArtist=0x7f06001c; - public static final int txtDbResult=0x7f060020; - public static final int txtDbSong=0x7f060024; + public static final int music_grid=0x7f060016; + public static final int now_album=0x7f060031; + public static final int now_artist=0x7f060037; + public static final int now_cd=0x7f060032; + public static final int now_list=0x7f06003c; + public static final int now_next=0x7f06003b; + public static final int now_play=0x7f06003a; + public static final int now_playing=0x7f060030; + public static final int now_playing_right=0x7f060035; + public static final int now_playing_t_left=0x7f060034; + public static final int now_prev=0x7f060038; + public static final int now_progress=0x7f060033; + public static final int now_stop=0x7f060039; + public static final int now_title=0x7f060036; + public static final int radio01=0x7f06009e; + public static final int radio02=0x7f06009f; + public static final int radio03=0x7f0600a0; + public static final int radio04=0x7f0600a1; + public static final int radioStop=0x7f0600a2; + public static final int selectSkin1=0x7f060096; + public static final int selectSkin2=0x7f060098; + public static final int selectSkin3=0x7f06009a; + public static final int server_ip=0x7f060092; + public static final int server_macid=0x7f060094; + public static final int server_name=0x7f060091; + public static final int server_port=0x7f060093; + public static final int splash=0x7f06009c; + public static final int text_kb_streamed=0x7f060029; + public static final int title=0x7f06009d; + public static final int txtDbAlbum=0x7f060019; + public static final int txtDbArtist=0x7f06001d; + public static final int txtDbResult=0x7f060021; + public static final int txtDbSong=0x7f060025; + public static final int txtDirMusic=0x7f060015; public static final int txtDirectory=0x7f060013; - public static final int txtFile=0x7f060029; - public static final int txtIntanceName=0x7f06008f; - public static final int txtVersion=0x7f06008a; - public static final int vibration=0x7f06008c; - public static final int visitHome1=0x7f060096; - public static final int visitHome2=0x7f060098; - public static final int visitHome3=0x7f06009a; + public static final int txtFile=0x7f06002a; + public static final int txtIntanceName=0x7f060090; + public static final int txtVersion=0x7f06008b; + public static final int vibration=0x7f06008d; + public static final int visitHome1=0x7f060097; + public static final int visitHome2=0x7f060099; + public static final int visitHome3=0x7f06009b; public static final int widget0=0x7f060012; - public static final int widget00=0x7f06003d; - public static final int widget01=0x7f060041; - public static final int widget02=0x7f060045; + public static final int widget00=0x7f06003e; + public static final int widget01=0x7f060042; + public static final int widget02=0x7f060046; public static final int widget44=0x7f060000; } public static final class layout { Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music.xml 2011-02-01 07:07:30 UTC (rev 4086) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/music.xml 2011-02-01 14:33:14 UTC (rev 4087) @@ -1,6 +1,13 @@ -<AbsoluteLayout android:id="@+id/widget0" +<LinearLayout android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="wrap_content" - xmlns:android="http://schemas.android.com/apk/res/android"> + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical"> + + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="Actual: ..." + android:textColor="#FFFFFFFF" android:textSize="20dip" android:id="@+id/txtDirMusic" + android:paddingBottom="5dip"></TextView> + <GridView android:layout_y="0dip" android:layout_x="0dip" android:id="@+id/music_grid" android:layout_width="fill_parent" android:layout_height="fill_parent" android:columnWidth="90dp" @@ -8,5 +15,5 @@ android:horizontalSpacing="10dp" android:stretchMode="columnWidth" android:gravity="center"> </GridView> -</AbsoluteLayout> +</LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/pictures.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/pictures.xml 2011-02-01 07:07:30 UTC (rev 4086) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/pictures.xml 2011-02-01 14:33:14 UTC (rev 4087) @@ -1,6 +1,7 @@ <LinearLayout android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="wrap_content" - xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"> + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-large/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-large/main.xml (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout-large/main.xml 2011-02-01 14:33:14 UTC (rev 4087) @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="fill_parent" + android:layout_height="fill_parent"> + +<TextView android:layout_height="wrap_content" android:text="HTPC" android:textColor="#FF000000" android:textStyle="bold" android:gravity="center_horizontal" android:background="#FFA9A9A9" android:layout_width="fill_parent" android:id="@+id/main_instance" android:textSize="28dip"></TextView> + +<TableLayout + android:id="@+id/TableLayout01" + xmlns:android="http://schemas.android.com/apk/res/android" + + android:layout_height="wrap_content" + android:layout_width="wrap_content" android:layout_gravity="center_horizontal"> + + +<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> + + <Button android:scaleType="fitXY" + android:layout_marginRight="40dip" android:padding="5dip" android:id="@+id/btn_main_pictures" android:background="@drawable/ic_menu_skin1_pictures" android:layout_height="120dip" android:layout_width="120dip"> + </Button> + + <Button android:scaleType="fitXY" android:padding="5dip" + android:id="@+id/btn_main_music" android:background="@drawable/ic_menu_skin1_music" android:layout_height="120dip" android:layout_width="120dip"> + </Button> + + </TableRow> + + <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> + + <Button android:scaleType="fitXY" + android:padding="5dip" android:layout_marginRight="40dip" android:id="@+id/btn_main_video" android:background="@drawable/ic_menu_skin1_video" android:layout_height="120dip" android:layout_width="120dip"> + </Button> + + <Button android:layout_width="80dip" + android:scaleType="fitXY" android:padding="5dip" android:id="@+id/btn_main_remote" android:background="@drawable/ic_menu_skin1_remote" android:layout_height="120dip"> + </Button> + + +</TableRow> + + <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" android:id="@+id/TableRow01"> + + <Button android:scaleType="fitXY" + android:padding="5dip" android:layout_marginRight="40dip" android:id="@+id/btn_main_now_playing" android:background="@drawable/ic_menu_skin1_now_playing" android:layout_height="120dip" android:layout_width="120dip"> + </Button> + + <Button android:scaleType="fitXY" android:padding="5dip" android:background="@drawable/ic_menu_skin1_plugins" android:id="@+id/btn_main_plugins" android:layout_height="120dip" android:layout_width="120dip"> + </Button> + + </TableRow> + +</TableLayout> + + <TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="nothing playing" + android:gravity="center_horizontal" android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF" android:background="#FFA9A9A9" android:padding="5dip" android:id="@+id/main_now_playing" android:textSize="24dip"> + </TextView> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:padding="5dip"> + + + <Button android:scaleType="fitXY" + android:id="@+id/btn_main_skp_back" android:padding="2dip" android:layout_marginRight="5dip" android:background="@drawable/ic_menu_skin1_skip_backward" android:layout_height="80dip" android:layout_width="80dip"></Button> + <ImageButton android:scaleType="fitXY" + android:id="@+id/btn_main_play" android:padding="2dip" android:layout_marginRight="5dip" android:background="@drawable/ic_menu_skin1_play" android:layout_height="80dip" android:layout_width="80dip"></ImageButton> + <Button android:scaleType="fitXY" + android:id="@+id/btn_main_skp_forw" android:padding="2dip" android:background="@drawable/ic_menu_skin1_skip_forward" android:layout_height="80dip" android:layout_width="80dip"></Button> +</LinearLayout> +</LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-02-01 07:07:30 UTC (rev 4086) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2011-02-01 14:33:14 UTC (rev 4087) @@ -81,7 +81,7 @@ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); - + btnPlay = (ImageButton) findViewById(R.id.btn_main_play); btnSkipBack = (Button) findViewById(R.id.btn_main_skp_back); btnSkipForw = (Button) findViewById(R.id.btn_main_skp_forw); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java 2011-02-01 07:07:30 UTC (rev 4086) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/music/MusicDir.java 2011-02-01 14:33:14 UTC (rev 4087) @@ -281,6 +281,17 @@ } } + String dsp = actualDir; + int len = dsp.length(); + + if (dsp == "") + dsp = "root"; + if (len > 25) + dsp = "..." + dsp.substring(len - 20, len); + + TextView txt = (TextView) findViewById(R.id.txtDirMusic); + txt.setText("Act: " + dsp); + if (musicList == null) { Toast.makeText(MusicDir.this, "TIME OUT SERVER", Toast.LENGTH_SHORT).show(); Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-02-01 07:07:30 UTC (rev 4086) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-02-01 14:33:14 UTC (rev 4087) @@ -21,7 +21,11 @@ package mediaportal.remote.utils; +import java.net.InetAddress; +import java.net.UnknownHostException; + import android.content.SharedPreferences; +import android.util.Log; public class AppSettings{ @@ -43,16 +47,31 @@ public static String getServer() { + String dns = ""; + switch(getInstance()) { case 1: - return getServer1(); + dns = getServer1(); case 2: - return getServer2(); + dns = getServer2(); case 3: - return getServer3(); + dns = getServer3(); } - return ""; + + InetAddress in; + try { + in = InetAddress.getByName(dns); + Log.d("MediaPortal", "IP lookup : " + in.getHostAddress()); + + dns = in.getHostAddress(); + + } catch (UnknownHostException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + return dns; } public static String getPort() { Modified: trunk/plugins/AndroidRemote/Release/AndroidRemote.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/Using Android Remote.docx =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Release/setup2.jpg =================================================================== (Binary files differ) Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs 2011-02-01 07:07:30 UTC (rev 4086) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.Designer.cs 2011-02-01 14:33:14 UTC (rev 4087) @@ -39,8 +39,9 @@ this.btnSave = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.txtVlc = new System.Windows.Forms.Label(); this.btnBrowse = new System.Windows.Forms.Button(); - this.txtVlc = new System.Windows.Forms.Label(); + this.txtVersion = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -160,16 +161,6 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "Streaming Profile"; // - // btnBrowse - // - this.btnBrowse.Location = new System.Drawing.Point(287, 19); - this.btnBrowse.Name = "btnBrowse"; - this.btnBrowse.Size = new System.Drawing.Size(137, 23); - this.btnBrowse.TabIndex = 0; - this.btnBrowse.Text = "Browse profiles"; - this.btnBrowse.UseVisualStyleBackColor = true; - this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); - // // txtVlc // this.txtVlc.BackColor = System.Drawing.Color.White; @@ -182,11 +173,31 @@ this.txtVlc.Text = "Profile"; this.txtVlc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // btnBrowse + // + this.btnBrowse.Location = new System.Drawing.Point(287, 19); + this.btnBrowse.Name = "btnBrowse"; + this.btnBrowse.Size = new System.Drawing.Size(137, 23); + this.btnBrowse.TabIndex = 0; + this.btnBrowse.Text = "Browse profiles"; + this.btnBrowse.UseVisualStyleBackColor = true; + this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); + // + // txtVersion + // + this.txtVersion.Location = new System.Drawing.Point(385, 189); + this.txtVersion.Name = "txtVersion"; + this.txtVersion.Size = new System.Drawing.Size(117, 23); + this.txtVersion.TabIndex = 4; + this.txtVersion.Text = "Version 0.1.0.0"; + this.txtVersion.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // // Setup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(514, 227); + this.Controls.Add(this.txtVersion); this.Controls.Add(this.groupBox2); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnSave); @@ -223,5 +234,6 @@ private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Button btnBrowse; private System.Windows.Forms.Label txtVlc; + private System.Windows.Forms.Label txtVersion; } } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs 2011-02-01 07:07:30 UTC (rev 4086) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/Setup.cs 2011-02-01 14:33:14 UTC (rev 4087) @@ -54,6 +54,8 @@ txtMyIP.Text = IPHost.AddressList[0].ToString(); else txtMyIP.Text = "no IP adress !"; + + txtVersion.Text = GetVersion(); } private void LoadSettings() @@ -96,7 +98,7 @@ private void Setup_FormClosing(object sender, FormClosingEventArgs e) { - + } private void btnBrowse_Click(object sender, EventArgs e) @@ -113,7 +115,13 @@ { txtVlc.Text = Path.GetFileName(openFile1.FileName); } + } + private string GetVersion() + { + Version v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + return ("Version : " + v.Major + "." + v.Minor + "." + v.Build + "." + v.Revision); } + } } Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2011-02-02 13:55:09
|
Revision: 4088 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4088&view=rev Author: kroko_koenig Date: 2011-02-02 13:55:02 +0000 (Wed, 02 Feb 2011) Log Message: ----------- fixed settings, forwarding still not working Modified Paths: -------------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup_ip.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/SAX_Parser.java trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup_ip.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup_ip.java 2011-02-01 14:33:14 UTC (rev 4087) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/setup/Setup_ip.java 2011-02-02 13:55:02 UTC (rev 4088) @@ -55,7 +55,7 @@ txtInstance.setText("Instance name (" + AppSettings.getInstance() + ")"); txtName.setText(AppSettings.getName()); - txtServer.setText(AppSettings.getServer()); + txtServer.setText(AppSettings.getSavedServer()); txtPort.setText(AppSettings.getPort()); txtMac.setText(AppSettings.getMacId()); } Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-02-01 14:33:14 UTC (rev 4087) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/AppSettings.java 2011-02-02 13:55:02 UTC (rev 4088) @@ -44,7 +44,20 @@ { return settings.getInt("Instance", 1); } - + public static String getSavedServer() + { + switch(getInstance()) + { + case 1: + return getServer1(); + case 2: + return getServer2(); + case 3: + return getServer3(); + } + + return null; + } public static String getServer() { String dns = ""; @@ -53,10 +66,13 @@ { case 1: dns = getServer1(); + break; case 2: dns = getServer2(); + break; case 3: dns = getServer3(); + break; } InetAddress in; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/SAX_Parser.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/SAX_Parser.java 2011-02-01 14:33:14 UTC (rev 4087) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/utils/SAX_Parser.java 2011-02-02 13:55:02 UTC (rev 4088) @@ -49,8 +49,8 @@ try { HttpURLConnection conn = (HttpURLConnection) myFileUrl .openConnection(); - conn.setConnectTimeout(5000); - conn.setReadTimeout(10000); + //conn.setConnectTimeout(5000); + //conn.setReadTimeout(10000); conn.setRequestMethod("GET"); conn.setDoInput(true); conn.connect(); Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |