From 6d008cdc066226589ad46cdc52c1b6d5f61b8f38 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 6 May 2013 22:08:59 +0200 Subject: [PATCH] take profile photos by android phone (still very buggy) --- .../AndroidRemote/AndroidRemote.csproj | 4 +- ClientServerLib/AndroidRemote/MainActivity.cs | 96 +++++++++++++++++- .../Properties/AndroidManifest.xml | 7 ++ .../Resources/Resource.designer.cs | 35 ++++--- .../AndroidRemote/Resources/layout/Main.axml | 11 ++ .../Resources/values/Strings.xml | 1 + ClientServerLib/ClientServerLib/CClient.cs | 35 +++++-- .../ClientServerLib/CConnection.cs | 30 ++++-- ClientServerLib/ClientServerLib/CServer.cs | 5 +- .../ClientServerLib/Vocaluxe/CCommands.cs | 38 ++++++- .../Vocaluxe/VocaluxeStructs.cs | 7 ++ .../ClientTest/ClientTest.Designer.cs | 14 +++ ClientServerLib/ClientTest/ClientTest.cs | 29 +++++- Output/ClientServerLib.dll | Bin 39424 -> 40448 bytes Vocaluxe/Base/CProfiles.cs | 3 +- Vocaluxe/Base/Server/CVocaluxeServer.cs | 70 ++++++++++++- Vocaluxe/Screens/CScreenProfiles.cs | 2 +- 17 files changed, 339 insertions(+), 48 deletions(-) create mode 100644 ClientServerLib/AndroidRemote/Properties/AndroidManifest.xml diff --git a/ClientServerLib/AndroidRemote/AndroidRemote.csproj b/ClientServerLib/AndroidRemote/AndroidRemote.csproj index e7b5397e..a5f49241 100644 --- a/ClientServerLib/AndroidRemote/AndroidRemote.csproj +++ b/ClientServerLib/AndroidRemote/AndroidRemote.csproj @@ -15,6 +15,7 @@ True Resources\Resource.designer.cs AndroidRemote + Properties\AndroidManifest.xml true @@ -78,7 +79,7 @@ - + @@ -88,5 +89,6 @@ + \ No newline at end of file diff --git a/ClientServerLib/AndroidRemote/MainActivity.cs b/ClientServerLib/AndroidRemote/MainActivity.cs index f2a1c89f..ff59e44b 100644 --- a/ClientServerLib/AndroidRemote/MainActivity.cs +++ b/ClientServerLib/AndroidRemote/MainActivity.cs @@ -1,11 +1,15 @@ using System; +using System.Collections.Generic; using Android.App; using Android.Content; +using Android.Content.PM; +using Android.Graphics; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; +using Android.Provider; using ClientServerLib; using Vocaluxe.Base.Server; @@ -20,7 +24,14 @@ namespace AndroidRemote Button bLogin; Button bUp; Button bDown; + Button bSendAvatar; bool loggedIn; + byte[] fileBytes; + + ImageView imageView; + Java.IO.File file; + Java.IO.File dir; + System.IO.FileStream fs; protected override void OnCreate (Bundle bundle) { @@ -46,12 +57,66 @@ namespace AndroidRemote bDown.Click += delegate { client.SendMessage (CCommands.CreateCommandWithoutParams (CCommands.CommandSendKeyDown), OnResponse); }; + + imageView = FindViewById(Resource.Id.imageView1); + + bSendAvatar = FindViewById