Results 1 to 5 of 5

Thread: Is there any Training for "Ice for Android"

  1. #1
    uojha is offline Registered User
    Name: Upama Ojha
    Organization: cal state university
    Project: learning Ice for Android
    Join Date
    Feb 2011
    Posts
    8

    Is there any Training for "Ice for Android"

    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

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    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/screen...n20Minutes.mov

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    uojha is offline Registered User
    Name: Upama Ojha
    Organization: cal state university
    Project: learning Ice for Android
    Join Date
    Feb 2011
    Posts
    8
    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("T est", "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
    Upama

  4. #4
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    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,
    Mark

  5. #5
    uojha is offline Registered User
    Name: Upama Ojha
    Organization: cal state university
    Project: learning Ice for Android
    Join Date
    Feb 2011
    Posts
    8
    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/screen...n20Minutes.mov

    but I was not able to do the kind of program in Android...

    Any suggestions will be a big help

    Thanks
    Upama

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-31-2011, 07:32 PM
  2. Replies: 3
    Last Post: 01-04-2010, 03:38 PM
  3. Replies: 1
    Last Post: 06-09-2009, 10:53 PM
  4. Replies: 1
    Last Post: 01-28-2009, 06:15 AM
  5. Replies: 4
    Last Post: 10-26-2006, 11:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •