Click here to Skip to main content
15,887,683 members
Home / Discussions / Android
   

Android

 
GeneralRe: Help me troubleshout error send message using SignalR from Android client Pin
Richard MacCutchan29-Nov-14 23:14
mveRichard MacCutchan29-Nov-14 23:14 
GeneralRe: Help me troubleshout error send message using SignalR from Android client Pin
thientamtita29-Nov-14 23:28
thientamtita29-Nov-14 23:28 
QuestionRe: Help me troubleshout error send message using SignalR from Android client Pin
David Crow1-Dec-14 8:15
David Crow1-Dec-14 8:15 
Questionandroid src code for bluetooth file and data transfer Pin
Member 1119766327-Nov-14 19:55
Member 1119766327-Nov-14 19:55 
AnswerRe: android src code for bluetooth file and data transfer Pin
den2k8827-Nov-14 20:37
professionalden2k8827-Nov-14 20:37 
GeneralRe: android src code for bluetooth file and data transfer Pin
inbrok0014-Dec-14 9:55
inbrok0014-Dec-14 9:55 
AnswerRe: android src code for bluetooth file and data transfer Pin
Richard MacCutchan27-Nov-14 21:26
mveRichard MacCutchan27-Nov-14 21:26 
Questionhelp me Convert code SignalR From Xamarin (C#) to Eclipse (Java) Pin
thientamtita26-Nov-14 22:53
thientamtita26-Nov-14 22:53 
I have small project using SignalR wrote C# (using Xamarin in Visual Studio 2013)
C#
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;

using Microsoft.AspNet.SignalR.Client;

using System.Collections.Generic;
//đọc thêm ở đây
//http://developer.telerik.com/products/real-time-mobile-apps-with-appbuilder-xamarin-and-signalr/
namespace SignalRWithXamarin
{
    [Activity(Label = "SignalRWithXamarin", MainLauncher = true)]
    public class MainActivity : Activity
    {
        HubConnection chatConnection;
        IHubProxy SignalRChatHub;


        public event EventHandler<string> OnMessageReceived;

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

           
            chatConnection = new HubConnection("http://www.mynotyfy.somee.com/");
            SignalRChatHub = chatConnection.CreateHubProxy("ChatHub");


            SignalRChatHub.On("broadcastMessage", (string name, string message) =>
            {
                if (OnMessageReceived != null)
                    OnMessageReceived(this, string.Format("{0}: {1}", name, message));
            });

            var input = FindViewById<EditText>(Resource.Id.ChatInput);
            var messages = FindViewById<ListView>(Resource.Id.ChatMessages);
            var adapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, new List<string>());

            JoinChat();

           

           
            messages.Adapter = adapter;
            OnMessageReceived += (sender, message) => RunOnUiThread(() =>
            adapter.Add(message));

            Button button = FindViewById<Button>(Resource.Id.ChatButton);
            button.Click += delegate
            {
                if (string.IsNullOrEmpty(input.Text))
                    return;

                Chat(input.Text);
                input.Text = "";
            };
        }

        public async virtual void JoinChat()
        {
            try
            {
                await chatConnection.Start();
            }
            catch (Exception)
            {
                // Do some error handling.
            }
        }

        public async virtual void Chat(string phoneChatMessage)
        {
            if (chatConnection.State == ConnectionState.Connected)
                await SignalRChatHub.Invoke("Send", "Android", phoneChatMessage);
        }

      
    }
}


Now I wanna Convert to Project in Eclipse.
AnswerRe: help me Convert code SignalR From Xamarin (C#) to Eclipse (Java) Pin
Richard MacCutchan26-Nov-14 22:59
mveRichard MacCutchan26-Nov-14 22:59 
GeneralNeed help from Google Glass dev/designers/testers! Pin
Josh Siemanowicz24-Nov-14 5:42
Josh Siemanowicz24-Nov-14 5:42 
GeneralRe: Need help from Google Glass dev/designers/testers! Pin
Richard MacCutchan24-Nov-14 6:23
mveRichard MacCutchan24-Nov-14 6:23 
QuestionWeb browser Pin
Member 1125990424-Nov-14 5:08
Member 1125990424-Nov-14 5:08 
AnswerRe: Web browser Pin
Richard MacCutchan24-Nov-14 5:55
mveRichard MacCutchan24-Nov-14 5:55 
Questionabout images in ListView Pin
Erdinc2724-Nov-14 1:28
Erdinc2724-Nov-14 1:28 
QuestionI can't find control id in R.id Pin
Richard MacCutchan21-Nov-14 3:19
mveRichard MacCutchan21-Nov-14 3:19 
QuestionRe: I can't find control id in R.id Pin
David Crow22-Nov-14 4:48
David Crow22-Nov-14 4:48 
AnswerRe: I can't find control id in R.id Pin
Richard MacCutchan22-Nov-14 5:52
mveRichard MacCutchan22-Nov-14 5:52 
QuestionHow to display ListFragments with corresponding details fragments Pin
Member 1124009217-Nov-14 0:37
Member 1124009217-Nov-14 0:37 
SuggestionRe: How to display ListFragments with corresponding details fragments Pin
David Crow20-Nov-14 11:04
David Crow20-Nov-14 11:04 
SuggestionRe: Give Mee Lotsss Ideasss Pin
Richard MacCutchan16-Nov-14 23:46
mveRichard MacCutchan16-Nov-14 23:46 
QuestionGive Mee Lotsss Ideasss Pin
owais_ahmed_ansari13-Nov-14 2:02
owais_ahmed_ansari13-Nov-14 2:02 
RantRe: Give Mee Lotsss Ideasss Pin
Kornfeld Eliyahu Peter13-Nov-14 2:16
professionalKornfeld Eliyahu Peter13-Nov-14 2:16 
AnswerRe: Give Mee Lotsss Ideasss Pin
Richard MacCutchan13-Nov-14 2:59
mveRichard MacCutchan13-Nov-14 2:59 
QuestionHow to read files in the folder by clicking on the button Pin
Kroshandowski11-Nov-14 4:18
Kroshandowski11-Nov-14 4:18 
QuestionRe: How to read files in the folder by clicking on the button Pin
David Crow20-Nov-14 11:08
David Crow20-Nov-14 11:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.