Archived
This forum has been archived. Please start a new discussion on GitHub.
Is there any Training for "Ice for Android"
in Help Center
Hi All,
I am trying to learn "Ice for Android". I am able to find trainings for Ice with CPP and Ice with JAVA....
There are IceTrainningCPP.zip and IceTranningJava.zip in the following link ZeroC - Training Courses
But I could not find any training for "Ice for Android".
Is there anyway that I can learn basic things for Ice for Android? The demo examples seems very complicated for the beginners....
Any kind of help is appreciated !
Thanks,
uojha
I am trying to learn "Ice for Android". I am able to find trainings for Ice with CPP and Ice with JAVA....
There are IceTrainningCPP.zip and IceTranningJava.zip in the following link ZeroC - Training Courses
But I could not find any training for "Ice for Android".
Is there anyway that I can learn basic things for Ice for Android? The demo examples seems very complicated for the beginners....
Any kind of help is appreciated !
Thanks,
uojha
0
Comments
-
Hi Upama,
Unfortunately, we do not have a training course for Android at this time.
I'd suggest you go through the 'Ice for Java' training course, which should help a lot. You may also want to watch the 'Ice in 20 minutes' webcast:
http://www.zeroc.com/download/screencasts/IceIn20Minutes.mov
Best regards,
Bernard0 -
Hi Bernard,
I am trying to do a simple application using ICE and Android in which a client side has a button and pressing that button "Test!!!" is printed on server side.
As far as I understood server part cannot be done on android so I wrote server part in java as in the tutorial and modified the client for android.
I am confuse how to make a server.java and client.java inside the same project because server is just in java and client is in android.
I made two different projects test and test1
here is my code for server.java inside test1
public class server extends Ice.Application {
/** Called when the activity is first created.
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
} */
class TestI extends _TestDisp
{
@Override
public void thisTest(Current current) {
// TODO Auto-generated method stub
System.out.println("Test!!!!");
}
}
static public void main(String[] args)
{
server s = new server();
int status = s.main("server", args);
System.exit(status);
}
@Override
public int run(String[] args)
{
// TODO Auto-generated method stub
Ice.ObjectAdapter adapter = communicator().createObjectAdapterWithEndpoints("Test", "tcp -h 127.0.0.1 -p 10000");
adapter.add(new TestI(), communicator().stringToIdentity("Test"));
adapter.activate();
communicator().waitForShutdown();
return 0;
}
}
here is the code for the client.java inside test
import android.app.Activity;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.widget.Button;
public class client extends Activity
{
Ice.Communicator communicator;
Button sendButton;
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
sendButton = (Button)findViewById(R.id.send);
sendButton.setOnClickListener(new OnClickListener()
{
public void onClick(android.view.View v)
{
thisTest();
}
});
}
void thisTest()
{
Ice.ObjectPrx obj = communicator.stringToProxy("test:tcp -h 127.0.0.1 -p 10000");
Demo.TestPrx test= Demo.TestPrxHelper.uncheckedCast(obj);
test.thisTest();
}
}
I have a slice file test.ice on both of the project and is as follows
module Demo
{
interface Test
{
void thisTest();
};
};
But I could not run the program its say "unexpectedly stopped"
can you help me understand the problem and organize the project because I am confuse having two different projects, it will be great if I can do it on one project.
Thanks
Upama0 -
You can also create servers for Android.
Note that I wouldn't recommend trying to create Android and non-Android applications in the same project. I wouldn't expect that to create a usable non-Android application.
Take care,
Mark0 -
Hi Mark,
Thanks for the response and I would love to do the both side on android too.
Is there anyway I can get a small example of Android Client and server(may be program like minimal or Printer) There is a "hello" inside demo but it is very complicated to understand.
This one is very helpful for Java
http://www.zeroc.com/download/screencasts/IceIn20Minutes.mov
but I was not able to do the kind of program in Android...
Any suggestions will be a big help
Thanks
Upama0