SignalR client(SignalA) on android, does not work -
i beginner android programer. i'm having trouble signala. tried run signala client? how work??? wrote erick: download signala.longpolling. added reference signala.longpolling, added on signala.longpolling basic-http-client.
then added mainactivity:
package com.example.testdemo; import com.zsoft.signala.connection; import com.zsoft.signala.transport.statebase; import com.zsoft.signala.transport.longpolling.longpollingtransport; import android.os.bundle; import android.app.activity; import android.view.menu; import android.widget.toast; public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); string url = "http://signalrcalc.apphb.com/"; connection con = new com.zsoft.signala.connection(url, this, new longpollingtransport()) { @override public void onerror(exception exception) { toast.maketext(mainactivity.this, "on error: " + exception.getmessage(), toast.length_long).show(); } @override public void onmessage(string message) { toast.maketext(mainactivity.this, "message: " + message, toast.length_long).show(); } @override public void onstatechanged(statebase oldstate, statebase newstate) { } }; con.start(); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.main, menu); return true; } }
and got errors:
04-25 07:05:30.112: e/androidruntime(275): fatal exception: main 04-25 07:05:30.112: e/androidruntime(275): java.lang.noclassdeffounderror: com.zsoft.signala.transport.longpolling.connectingstate$1 04-25 07:05:30.112: e/androidruntime(275): @ com.zsoft.signala.transport.longpolling.connectingstate.onrun(connectingstate.java:39) 04-25 07:05:30.112: e/androidruntime(275): @ com.zsoft.signala.transport.longpolling.stopablestatewithcallback.run(stopablestatewithcallback.java:29) 04-25 07:05:30.112: e/androidruntime(275): @ com.zsoft.signala.connectionbase.setnewstate(connectionbase.java:46) 04-25 07:05:30.112: e/androidruntime(275): @ com.zsoft.signala.transport.longpolling.disconnectedstate.onrun(disconnectedstate.java:42) 04-25 07:05:30.112: e/androidruntime(275): @ com.zsoft.signala.transport.statebase.run(statebase.java:28) 04-25 07:05:30.112: e/androidruntime(275): @ com.zsoft.signala.transport.longpolling.disconnectedstate.start(disconnectedstate.java:25) 04-25 07:05:30.112: e/androidruntime(275): @ com.zsoft.signala.connectionbase.start(connectionbase.java:127) 04-25 07:05:30.112: e/androidruntime(275): @ com.example.testdemo.mainactivity.oncreate(mainactivity.java:38)
how run it, dont know... (((
i assume building source. when you've cloned github repo, following.
git submodule init , git submodule update
it initialize basic-http-client, included in project submodule. dont need install jar.
hope helps!