From: <kro...@us...> - 2010-12-08 13:35:34
|
Revision: 4019 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4019&view=rev Author: kroko_koenig Date: 2010-12-08 13:35:27 +0000 (Wed, 08 Dec 2010) Log Message: ----------- removed the gesture code for pictures, add a readme 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/main.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/picturefullscreenmenu.xml trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj trunk/plugins/AndroidRemote/Server/AndroidRemote.suo Added Paths: ----------- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-07 21:55:14 UTC (rev 4018) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/AndroidManifest.xml 2010-12-08 13:35:27 UTC (rev 4019) @@ -15,11 +15,11 @@ <category android:name="android.intent.category.VIEW" /> </intent-filter> </activity> - <activity android:name=".Remote_01" android:launchMode="singleInstance"></activity> - <activity android:name=".Remote_02" android:launchMode="singleInstance"></activity> + <activity android:launchMode="singleInstance" android:name=".Remote_01"></activity> + <activity android:launchMode="singleInstance" android:name=".Remote_02"></activity> <activity android:name=".pictures" android:launchMode="singleInstance"></activity> <activity android:name=".picturesfullscreen" android:launchMode="singleInstance"></activity> - <activity android:name=".MusicDir" 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> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-07 21:55:14 UTC (rev 4018) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/gen/mediaportal/remote/R.java 2010-12-08 13:35:27 UTC (rev 4019) @@ -65,10 +65,10 @@ public static final int videos_logo=0x7f020033; } public static final class id { - public static final int GridView01=0x7f060010; - public static final int ImageView01=0x7f060012; - public static final int LinearLayout01=0x7f060013; - public static final int ListView01=0x7f060022; + public static final int GridView01=0x7f060013; + public static final int ImageView01=0x7f060015; + public static final int LinearLayout01=0x7f060016; + public static final int ListView01=0x7f060024; public static final int MainButton1=0x7f060005; public static final int MainButton2=0x7f060006; public static final int MainButton3=0x7f060007; @@ -81,7 +81,7 @@ public static final int btnChannelUp=0x7f06003a; public static final int btnDown=0x7f060037; public static final int btnExit=0x7f06003e; - public static final int btnFBack=0x7f060025; + public static final int btnFBack=0x7f060026; public static final int btnFForw=0x7f060027; public static final int btnHibernate=0x7f060040; public static final int btnHome=0x7f06002e; @@ -90,7 +90,7 @@ public static final int btnMenu=0x7f060036; public static final int btnOk=0x7f060033; public static final int btnPause=0x7f06002b; - public static final int btnPlay=0x7f060026; + public static final int btnPlay=0x7f06000c; public static final int btnRestart=0x7f060041; public static final int btnRight=0x7f060034; public static final int btnShutOff=0x7f060042; @@ -103,38 +103,40 @@ public static final int btnVolumeMute=0x7f06003b; public static final int btnVolumeUp=0x7f060039; public static final int btnWakeOnLan=0x7f060043; - public static final int full_text=0x7f060011; + public static final int full_text=0x7f060014; public static final int icon_image=0x7f060001; public static final int icon_text=0x7f060002; - public static final int list_album=0x7f06000c; - public static final int list_artist=0x7f06000d; - public static final int list_result=0x7f06000e; - public static final int list_song=0x7f06000f; - public static final int music_grid=0x7f06000b; - public static final int naviRemote_text=0x7f060023; - public static final int now_album=0x7f060015; - public static final int now_artist=0x7f06001b; - public static final int now_cd=0x7f060016; - public static final int now_list=0x7f060021; - public static final int now_next=0x7f060020; - public static final int now_pause=0x7f06001e; - public static final int now_play=0x7f06001f; - public static final int now_playing=0x7f060014; - public static final int now_playing_right=0x7f060019; - public static final int now_playing_t_left=0x7f060018; - public static final int now_prev=0x7f06001c; - public static final int now_progress=0x7f060017; - public static final int now_stop=0x7f06001d; - public static final int now_title=0x7f06001a; + public static final int list_album=0x7f06000f; + public static final int list_artist=0x7f060010; + public static final int list_result=0x7f060011; + public static final int list_song=0x7f060012; + public static final int music_grid=0x7f06000e; + public static final int naviRemote_text=0x7f06000a; + public static final int now_album=0x7f060018; + public static final int now_artist=0x7f06001d; + public static final int now_cd=0x7f060019; + public static final int now_list=0x7f060023; + public static final int now_next=0x7f060022; + public static final int now_pause=0x7f060020; + public static final int now_play=0x7f060021; + public static final int now_playing=0x7f060017; + public static final int now_playing_right=0x7f06001b; + public static final int now_playing_t_left=0x7f06000b; + public static final int now_prev=0x7f06001e; + public static final int now_progress=0x7f06001a; + public static final int now_stop=0x7f06001f; + public static final int now_title=0x7f06001c; public static final int open=0x7f060049; + public static final int rslide=0x7f06004c; public static final int save=0x7f060048; public static final int send=0x7f06004a; public static final int server_ip=0x7f060044; public static final int server_macid=0x7f060046; public static final int server_port=0x7f060045; + public static final int slide=0x7f06004b; public static final int title=0x7f060047; - public static final int widget0=0x7f06000a; - public static final int widget00=0x7f060024; + public static final int widget0=0x7f06000d; + public static final int widget00=0x7f060025; public static final int widget01=0x7f060028; public static final int widget02=0x7f06002d; public static final int widget03=0x7f060031; Added: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme (rev 0) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/readme 2010-12-08 13:35:27 UTC (rev 4019) @@ -0,0 +1,22 @@ +Pictures section +---------------- + +implemented: + +browse folders (MP shares) +display thumbs + + +save to sd +open browser +send picture +slide show +random slide show + +wishes: + +gesture control for pictures (swipe) +save files from Android to MP + +Music section +------------- Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2010-12-07 21:55:14 UTC (rev 4018) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/layout/main.xml 2010-12-08 13:35:27 UTC (rev 4019) @@ -1,19 +1,20 @@ <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/back"> + android:layout_height="fill_parent" android:background="@drawable/back" + android:gravity="top"> - <Button android:id="@+id/MainButton1" android:layout_width="fill_parent" + <Button android:id="@+id/MainButton1" android:layout_width="fill_parent" android:layout_height="70dip" android:background="@drawable/pictures_logo" /> <View android:layout_height="2dip" android:layout_width="fill_parent" android:background="#000" /> - + <Button android:id="@+id/MainButton2" android:layout_width="fill_parent" android:layout_height="70dip" android:background="@drawable/music_logo" /> <View android:layout_height="2dip" android:layout_width="fill_parent" android:background="#000" /> - + <Button android:id="@+id/MainButton3" android:layout_width="fill_parent" android:layout_height="70dip" android:background="@drawable/videos_logo" /> @@ -22,14 +23,37 @@ <Button android:id="@+id/MainButton4" android:layout_width="fill_parent" android:layout_height="70dip" android:background="@drawable/remote_logo" /> - + <View android:layout_height="2dip" android:layout_width="fill_parent" android:background="#000" /> - <Button android:id="@+id/MainButton5" android:layout_width="fill_parent" + <Button android:id="@+id/MainButton5" android:layout_width="fill_parent" android:layout_height="70dip" android:background="@drawable/nowplaying_logo" /> + + <TextView android:id="@+id/naviRemote_text" android:layout_width="fill_parent" + android:layout_height="wrap_content" android:text="nothing playing" + android:gravity="center_horizontal" android:background="#FFFFFFFF" + android:textSize="15dip" + android:textColor="#FF000000" android:textColorHighlight="#FFFFFFFF"> + </TextView> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" android:layout_width="fill_parent" + android:background="#000" android:layout_height="50dip"> - <View android:layout_height="2dip" android:layout_width="fill_parent" - android:background="#000" /> + <TextView android:id="@+id/now_playing_t_left" + android:layout_width="80dip" android:layout_height="50dip" + android:textSize="12dip" android:textColor="#FF8080ff" android:text="00:00" /> + + <Button android:id="@+id/btnPlay" android:layout_width="50dip" + android:layout_height="50dip" android:text="FBW"> + </Button> + <Button android:id="@+id/btnPlay" android:layout_width="50dip" + android:layout_height="50dip" android:text="Play"> + </Button> + <Button android:id="@+id/btnPlay" android:layout_width="50dip" + android:layout_height="50dip" android:text="FFW"> + </Button> + </LinearLayout> </LinearLayout> Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/picturefullscreenmenu.xml =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/picturefullscreenmenu.xml 2010-12-07 21:55:14 UTC (rev 4018) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/res/menu/picturefullscreenmenu.xml 2010-12-08 13:35:27 UTC (rev 4019) @@ -6,4 +6,7 @@ android:title="Open in browser" /> <item android:id="@+id/send" android:title="Send Picture" /> + <item android:id="@+id/slide" + android:title="Slide show" android:checked="false" android:checkable="true"/> + <item android:title="Random slide show" android:id="@+id/rslide" android:checked="false" android:checkable="true"/> </menu> \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-07 21:55:14 UTC (rev 4018) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/main.java 2010-12-08 13:35:27 UTC (rev 4019) @@ -37,12 +37,12 @@ public class main extends Activity { private static final String PREFS_PRIVATE = "PREFS_MP_REMOTE"; - + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); - + SharedPreferences settings = getSharedPreferences(PREFS_PRIVATE, MODE_PRIVATE); @@ -110,6 +110,7 @@ startActivityForResult(myIntent, 0); } }); + } @Override Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-07 21:55:14 UTC (rev 4018) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/musicSong.java 2010-12-08 13:35:27 UTC (rev 4019) @@ -24,7 +24,6 @@ import java.util.ArrayList; import android.app.Activity; import android.content.Context; -import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; Modified: trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java =================================================================== --- trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-07 21:55:14 UTC (rev 4018) +++ trunk/plugins/AndroidRemote/Android/MediaPortalRemote/src/mediaportal/remote/picturesfullscreen.java 2010-12-08 13:35:27 UTC (rev 4019) @@ -26,7 +26,6 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; - import mediaportal.remote.R; import mediaportal.remote.ReceiveDirectoryXmlHandler.DirItems; import android.app.Activity; @@ -38,27 +37,18 @@ import android.os.Handler; import android.util.Log; import android.view.ContextMenu; -import android.view.GestureDetector; -import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.view.ContextMenu.ContextMenuInfo; -import android.view.GestureDetector.OnGestureListener; -import android.view.MotionEvent; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; -public class picturesfullscreen extends Activity implements OnGestureListener { +public class picturesfullscreen extends Activity { - 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 GestureDetector gestureScanner; private Handler mHandler = new Handler(); private boolean slideShow; @@ -68,69 +58,35 @@ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - + requestWindowFeature(Window.FEATURE_NO_TITLE); - getWindow().setFlags - (WindowManager.LayoutParams.FLAG_FULLSCREEN, - WindowManager.LayoutParams.FLAG_FULLSCREEN); - setContentView(R.layout.picturesfullscreen); - - //ImageView imagev = (ImageView) findViewById(R.id.ImageView01); - //registerForContextMenu(imagev); - - gestureScanner = new GestureDetector(this); + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FULLSCREEN); + setContentView(R.layout.picturesfullscreen); - setPicture(); - Toast.makeText(picturesfullscreen .this, "left/right swipe possible", - Toast.LENGTH_SHORT).show(); + ImageView imagev = (ImageView) findViewById(R.id.ImageView01); + registerForContextMenu(imagev); + setPicture(); } private void setPicture() { ImageView imagev = (ImageView) findViewById(R.id.ImageView01); DirItems item = pictures.pictureList.get(pictures.selectedPicture); - if (!item.isFolder) - { + if (!item.isFolder) { httpHandler http = new httpHandler(); String file = "http://" + Settings.Server + ":" + Settings.Port + "/pictures/"; file += pictures.actualDir + item.File; item.Picture = http.DownloadImage(file.replaceAll(" ", "%20")); imagev.setImageBitmap(item.Picture); - + TextView txt = (TextView) findViewById(R.id.full_text); txt.setText(item.File); } } @Override - public boolean onCreateOptionsMenu(Menu menu) { - menu.add(0, 101, 0, "Slide show"); - menu.add(0, 102, 1, "Random slide show"); - menu.add(0, 103, 2, "Stop slide show"); - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case 101: - slideShow = true; - randomShow = false; - return true; - case 102: - slideShow = true; - randomShow = true; - return true; - case 103: - slideShow = false; - randomShow = false; - return true; - } - return true; - } - - @Override public void onStart() { super.onStart(); @@ -142,25 +98,26 @@ public void run() { if (slideShow) { - if(!randomShow) - { - int max = pictures.pictureList.size(); + if (!randomShow) { + int max = pictures.pictureList.size(); - if (pictures.selectedPicture < max - 1) - pictures.selectedPicture++; - else - pictures.selectedPicture = 0; - setPicture(); - } - else - { - String req = "http://" + Settings.Server + ":" + Settings.Port +"/random/pictures/random.jpg"; + if (pictures.selectedPicture < max - 1) + pictures.selectedPicture++; + else + pictures.selectedPicture = 0; + setPicture(); + } else { + String req = "http://" + Settings.Server + ":" + + Settings.Port + "/random/pictures/random.jpg"; httpHandler handler = new httpHandler(); - + Bitmap pic = handler.DownloadImage(req); - + ImageView imagev = (ImageView) findViewById(R.id.ImageView01); imagev.setImageBitmap(pic); + + TextView txt = (TextView) findViewById(R.id.full_text); + txt.setText("Random slide show"); } } @@ -174,165 +131,131 @@ mHandler.removeCallbacks(mUpdateTimeTask); } - @Override - public boolean onTouchEvent(MotionEvent me) { - return gestureScanner.onTouchEvent(me); - } - + public void onCreateContextMenu(ContextMenu menu, View v, + ContextMenuInfo menuInfo) { + super.onCreateContextMenu(menu, v, menuInfo); + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.picturefullscreenmenu, menu); - public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, - float velocityY) { - try { + if (slideShow) { + if (randomShow) { + MenuItem item = menu.findItem(R.id.rslide); + item.setChecked(slideShow); + } else { + MenuItem item = menu.findItem(R.id.slide); + item.setChecked(slideShow); + } + } - int max = pictures.pictureList.size(); + } - if (Math.abs(e1.getY() - e2.getY()) > SWIPE_MAX_OFF_PATH) - return false; - // right to left swipe - if (e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE - && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { + @Override + public boolean onContextItemSelected(MenuItem item) { - if (pictures.selectedPicture < max - 1) { - pictures.selectedPicture++; - setPicture(); - } else - Toast.makeText(picturesfullscreen.this, "reached end +", - Toast.LENGTH_SHORT).show(); + String title = (String) item.getTitle(); - } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE - && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { - - if (pictures.selectedPicture > 0) { - pictures.selectedPicture--; - setPicture(); - } else - Toast.makeText(picturesfullscreen.this, "reached end -", - Toast.LENGTH_SHORT).show(); - + if (title.compareTo("Save to sd card") == 0) { + SavetoSDCard(); + return true; + } else if (title.compareTo("Open in browser") == 0) { + OpenURL(); + return true; + } else if (title.compareTo("Send Picture") == 0) { + SendPicture(); + return true; + } else if (title.compareTo("Slide show") == 0) { + if ((slideShow == false) || (slideShow && randomShow)) { + slideShow = true; + randomShow = false; + } else { + slideShow = false; } - } catch (Exception e) { - // nothing + return true; + } else if (title.compareTo("Random slide show") == 0) { + if ((slideShow == false) || (slideShow && !randomShow)) { + slideShow = true; + randomShow = true; + } else { + slideShow = false; + } + return true; } return false; } - public boolean onDown(MotionEvent arg0) { - return false; + // **************** + // Menu Functions + // ****************** + private void OpenURL() { + DirItems item = pictures.pictureList.get(pictures.selectedPicture); + String file = "http://" + Settings.Server + ":" + Settings.Port + + "/pictures/"; + file += pictures.actualDir + item.File; + String url = file.replaceAll(" ", "%20"); + Intent i = new Intent(Intent.ACTION_VIEW); + i.setData(Uri.parse(url)); + startActivity(i); } - public void onLongPress(MotionEvent arg0) { - } + private void SavetoSDCard() { + try { + DirItems item = pictures.pictureList.get(pictures.selectedPicture); + Bitmap bMap = item.Picture; + File fPath = Environment.getExternalStorageDirectory(); + OutputStream outStream = null; + try { - public boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2, - float arg3) { - return false; - } + outStream = new FileOutputStream(fPath + "/" + + item.File.toString()); - public void onShowPress(MotionEvent arg0) { - } + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + 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) { + // TODO Auto-generated catch block + e.printStackTrace(); + Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + + " |||| " + e.getLocalizedMessage().toString()); + } + try { + outStream.close(); - public boolean onSingleTapUp(MotionEvent arg0) { - return false; + Toast.makeText(picturesfullscreen.this, "File saved.", + Toast.LENGTH_SHORT).show(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + + " |||| " + e.getLocalizedMessage().toString()); + } + } catch (Exception e) { + Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + + " |||| " + e.getLocalizedMessage().toString()); + // e.printStackTrace(); + } + } - - public void onCreateContextMenu(ContextMenu menu, View v, - ContextMenuInfo menuInfo) { - super.onCreateContextMenu(menu, v, menuInfo); - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.picturefullscreenmenu, menu); - } - - @Override - public boolean onContextItemSelected(MenuItem item) { - if(item.getTitle()=="Save to sd card"){ - SavetoSDCard(); - } - else if(item.getTitle()=="Open in browser"){ - OpenURL(); - } - else if(item.getTitle()=="Send Picture"){ - SendPicture(); - } - else { - return false; - } - return false; - } - - - //**************** - //Menu Functions - //****************** - private void OpenURL(){ - DirItems item = pictures.pictureList.get(pictures.selectedPicture); - String file = "http://" + Settings.Server + ":" + Settings.Port - + "/pictures/"; - file += pictures.actualDir + item.File; - String url = file.replaceAll(" ", "%20"); - Intent i = new Intent(Intent.ACTION_VIEW); - i.setData(Uri.parse(url)); - startActivity(i); - } - - private void SavetoSDCard(){ - 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) { - // TODO Auto-generated catch block - 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) { - // TODO Auto-generated catch block - e.printStackTrace(); - Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString() ); - } - try { - outStream.close(); - - Toast.makeText(picturesfullscreen.this, "File saved.", - Toast.LENGTH_SHORT).show(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString() ); - } - } - catch (Exception e) - { - Log.e("Debug", "SavetoSDCard " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString() ); - //e.printStackTrace(); - } - - } - - - - private void SendPicture(){ - try - { + private void SendPicture() { + try { DirItems item = pictures.pictureList.get(pictures.selectedPicture); - Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND); - picMessageIntent.setType("image/jpeg"); + 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:")); + startActivity(Intent.createChooser(picMessageIntent, + "Send picture using:")); + } catch (Exception e) { + Log.e("Debug", "SendPicture " + e.getMessage().toString() + + " |||| " + e.getLocalizedMessage().toString()); + // e.printStackTrace(); } - catch (Exception e) - { - Log.e("Debug", "SendPicture " + e.getMessage().toString() + " |||| " + e.getLocalizedMessage().toString() ); - //e.printStackTrace(); - } - } - + } + } \ No newline at end of file Modified: trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj =================================================================== --- trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj 2010-12-07 21:55:14 UTC (rev 4018) +++ trunk/plugins/AndroidRemote/Server/AndroidRemote/AndroidRemote.csproj 2010-12-08 13:35:27 UTC (rev 4019) @@ -3,7 +3,7 @@ <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> + <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{E508BE47-8031-4202-9FD2-404732F86696}</ProjectGuid> <OutputType>Library</OutputType> @@ -37,7 +37,8 @@ </Reference> <Reference Include="Databases, Version=1.1.2.20596, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\Program Files (x86)\Team MediaPortal\MediaPortal\Databases.dll</HintPath> + <HintPath>..\..\..\..\Program Files\Team MediaPortal\MediaPortal\Databases.dll</HintPath> + <Private>False</Private> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> 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. |