Communicating with the gtalk app?

by Jim Duchek » Fri, 04 Sep 2009 02:04:29 GMT


Sponsored Links
 Hi.  Considering the code for the gtalk app is unavailable, I'm unable
to discern this information for myself, and haven't been able to find
it anywhere -- I know Google has security concerns, but I'm wondering
if there is any API at all for communicating with the google talk
application itself, such as setting available/busy or signin/out?  A
plugin for Locale that would be able to do that would be extremely
useful, and trivial for me to write, but the information seems not to
be available, as far as I can tell.  Does anyone know anything about
doing this?

Jim

--~--~---------~--~----~------------~-------~--~----~



Communicating with the gtalk app?

by Roman ( T-Mobile USA) » Fri, 04 Sep 2009 06:02:05 GMT


 You might want to look at the libjingle library which had some hard
coded hooks to talk to the GoogleTalk servers.

Of course you would have to port the needed libraries to the Android
platform which is not a trivial task. I am not aware that there is any
porting available on Android.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
T  Mobile stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Unable to remove the prev,next buttons of MediaController, please help me

Hi friends,

I want to show MediaController for normal MediaPlayer class. I have
done like this:

I have put the MediaController in layout (here in case :
sdcard_media_view) and written the code like this.

Its just an audio player. Its working fine but Unable to remove the
prev,next buttons of the MediaController.

Can any one please help me.

public class AudioPlayerNew extends Activity implements
MediaPlayerControl
{

    private static final String TAG = "MediaPlayerDemo";
    MediaController mediaController;
    MediaPlayer mMediaPlayer;
    private static final String MEDIA = "media";
    PowerManager powerMgr = null;
    PowerManager.WakeLock wakeLock = null;
    final String POWERTAG = "VideoViewTag";
    boolean m_prgisShowing = false;
    ProgressDialog mDialog2;
    private String path = "/sdcard/Kaarulo Shikarukelle.mp3";


    boolean isVideoFilePlayedProperly = true;

    int percent = 0;
    boolean playerState;
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        requestWindowFeature(Window.FEATURE_NO_TITLE);  // Wont show
the title of the app on top of the device.

         getWindow().setFlags
(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.sdcard_media_view);



        mediaController = (MediaController) findViewById
(R.id.MediaController01);


        mediaController.setAnchorView( findViewById
(R.layout.sdcard_media_view));
        mediaController.setMediaPlayer(this);

        mediaController.setEnabled(true);
        mediaController.setPrevNextListeners(null, null);

       powerMgr = (PowerManager)getSystemService
(Context.POWER_SERVICE);
        wakeLock = powerMgr.newWakeLock
(PowerManager.SCREEN_BRIGHT_WAKE_LOCK,POWERTAG );
        wakeLock.setReferenceCounted(true);

        wakeLock.acquire();

        playAudio(path);
    }



    private void playAudio(String media)
    {
        try
        {
                mMediaPlayer = new MediaPlayer();
            //mMediaPlayer.setDataSource(path);
                mMediaPlayer.setDataSource(AudioPlayerNew.this,Uri.parse
(path));
            mMediaPlayer.prepare();


            showDialog();

            mMediaPlayer.setOnPreparedListener(new
MediaPlayer.OnPreparedListener()
            {

                                @Override
                                public void onPrepared(MediaPlayer mp)
                                {

                                        dismissDialog();
                                        mMediaPlayer.start();
                                        mediaController.show();
                                }

            });

            mMediaPlayer.setOnCompletionListener(new
MediaPlayer.OnCompletionListener()
            {

                                @Override
                                public void onCompletion(MediaPlayer mp) {

                                        Log.i("VideoViewDemo ->"," 
onCompletion() calledooooochhhhhhhh");
                                        
setProgressBarIndeterminateVisibility(false);
                                        finish();
                                }

            });


            mMediaPlayer.setOnErrorListener(new
MediaPlayer.OnErrorListener()
            {

                                @Override
                                public boolean onError(MediaPlayer arg0, int 
arg1, int arg2) {

                                        isVideoFilePlayedProperly = false;


                                        Log.i("VideoViewDemo ->"," onError() 
calledooooochhhhhhhh");
                                        Log.i("onERROR:","arg1:"+arg1);
                                        Log.i("onERROR:","arg2:"+arg2);

                                        return true;
                                }

            });

            mMediaPlayer.setOnBufferingUpdateListener(new
OnBufferingUpdateListener()
            {

                                @Override
                                public void onBufferingUpdate(MediaPlayer arg0, 
int arg1)
                                {

                                        percent = arg1;
                                }

            });


        }
        catch (Exception e)
        {
            Log.e(TAG, "error: " + e.getMessage(), e);
        }

    }

    public void showDialog()
    {
        m_prgisShowing = true;

        showDialog(1000);
    }

    public  void dismissDialog()
    {
        if(m_prgisShowing)
        {
                Log.i("WEB_DEMO_VIEW","DISMISSING PROGRESSBAR!!!");
                mDialog2.dismiss();
        }
        m_prgisShowing = false;


    }
    protected Dialog onCreateDialog(int id)
         {

                switch (id)
                {
                        case 1000:
                        {

                                mDialog2 = new ProgressDialog(this);
                                mDialog2.setMessage("buffering...");
                                mDialog2.setIndeterminate(true);
                                mDialog2.setCancelable(true);

                                Log.i("WEB_VIEW_DEMO","SHOWING PROGRESS 
BAR!!!");

                            return mDialog2;
                        }
                }
                return null;
         }

    public void onConfigurationChanged(Configuration arg0)
    {
            super.onConfigurationChanged(arg0);

            Log.i("VideoViewDemo","CONFIGURATION CHANGED!!!");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

        dismissDialog();
        if(null != mMediaPlayer)
        {
                mMediaPlayer.release();
                mMediaPlayer = null;
        }


                wakeLock.release();
    }

        @Override
        public int getBufferPercentage() {
                System.out.println("MediaController.getBufferPercentage()
called!!!");

                return percent;
        }

        @Override
        public int getCurrentPosition() {
                System.out.println("MediaController.getCurrentPosition()
called!!!");

                return mMediaPlayer.getCurrentPosition();
        }

        @Override
        public int getDuration() {
                System.out.println("MediaController.getDuration() called!!!");

                return mMediaPlayer.getDuration();
        }

        @Override
        public boolean isPlaying()
        {
                System.out.println("MediaController.isPlaying() called!!!");

                return playerState;
        }

        @Override
        public void pause()
        {
                System.out.println("MediaController.pause() called!!!");

                if(null != mMediaPlayer)
                {
                        mMediaPlayer.pause();
                }
                playerState = false;
        }

        @Override
        public void seekTo(int pos)
        {

                System.out.println("MediaController.seekTo() called!!!");
                if(mMediaPlayer != null)
                {
                        mMediaPlayer.seekTo(pos);
                }
        }

        @Override
        public void start()
        {
                System.out.println("MediaController.start() called!!!");

                if(null != mMediaPlayer )//&& !mMediaPlayer.isPlaying())
                {
                        mMediaPlayer.start();
                }
                playerState = true;
        }




}

--~--~---------~--~----~------------~-------~--~----~

2. Please Help! I Can't get the ADT Plugin to Install

I get this error no matter which of the 3 methods I try. What should I
do?

An error occurred while collecting items to be installed
  No repository found containing: org.eclipse.draw2d/osgi.bundle/
3.4.1.v20080910-1351
  No repository found containing: org.eclipse.emf.common/osgi.bundle/
2.4.0.v200808251517
  No repository found containing: org.eclipse.emf.ecore/osgi.bundle/
2.4.1.v200808251517
  No repository found containing: org.eclipse.emf.ecore.change/
osgi.bundle/2.4.0.v200808251517
  No repository found containing: org.eclipse.emf.ecore.edit/
osgi.bundle/2.4.1.v200808251517
  No repository found containing: org.eclipse.emf.ecore.xmi/
osgi.bundle/2.4.1.v200808251517
  No repository found containing: org.eclipse.emf.edit/osgi.bundle/
2.4.1.v200808251517
  No repository found containing: org.eclipse.wst.common.emf/
osgi.bundle/1.1.202.v200809111955
  No repository found containing:
org.eclipse.wst.common.emfworkbench.integration/osgi.bundle/
1.1.201.v200808071700
  No repository found containing: org.eclipse.wst.common.frameworks/
osgi.bundle/1.1.200.v200805140020
  No repository found containing:
org.eclipse.wst.common.project.facet.core/osgi.bundle/
1.3.3.v200809102124
  No repository found containing: org.eclipse.wst.common.ui/
osgi.bundle/1.1.301.v200805140415
  No repository found containing: org.eclipse.wst.sse.core/osgi.bundle/
1.1.302.v200808260045
  No repository found containing: org.eclipse.wst.sse.ui/osgi.bundle/
1.1.2.v200809120159
  No repository found containing: org.eclipse.wst.validation/
osgi.bundle/1.2.2.v200809050219
  No repository found containing: org.eclipse.wst.xml.core/osgi.bundle/
1.1.305.v200809120354
  No repository found containing: org.eclipse.wst.xml.ui/osgi.bundle/
1.0.410.v200809120143

--~--~---------~--~----~------------~-------~--~----~

3. sean guo wants to chat

4. group messaging / email

5. How can I get HorizontalScrollView's width???

6. How can I get HorizontalScrollView's width???

7. onRecieve starting activity problem