[android-developers] Android App publisher

2012-02-27 Thread riz
Hi,

Is it legal to publish an app on behalf of someone and take commission
on per sale ?  something like http://www.androidpublisher.com/

Please advise .

Regards

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] EAAccessory Class in Android

2011-10-14 Thread riz
Hi ,

I am an iphone developer and curious to know is there any equivalent
to Iphone EAAccessory Class in Android ?  please advise .

Regards

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Android Open Accessory API

2011-10-14 Thread riz
Hi,

Is it possible to read data from audio jack using Android Open
Accessory API ? please advise or suggest alternate .

Regards

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] reading data from audio head jack in android

2011-09-19 Thread riz
Hi,

I am curious to know how it is possible to read data directly from
audio head jack of android. ? I am looking to control some external
device through it .

how Jack Dorsey is doing this ?

Please let me know any library or source code available for reading

Looking forward for your replies .

Regards

riz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] reading data from audio head jack in android

2011-09-19 Thread riz
Hi,

I am curious to know how it is possible to read data directly from
audio head jack of android. ? I am looking to control some external
device through it .

how Jack Dorsey is doing this ?

Please let me know any library or source code available for reading

Looking forward for your replies .

Regards

riz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: reading data from audio head jack in android

2011-09-19 Thread riz
If I check the permission of square

 change your audio settings
Allows application to modify global audio settings such as volume and
routing.
record audio
Allows application to access the audio record path.


So I believe it actually records the credit card data and then decode
it to view original credit card reader. please advise me


On Sep 19, 5:35 pm, riz rizcs...@gmail.com wrote:
 Hi,

 I am curious to know how it is possible to read data directly from
 audio head jack of android. ? I am looking to control some external
 device through it .

 how Jack Dorsey is doing this ?

 Please let me know any library or source code available for reading

 Looking forward for your replies .

 Regards

 riz

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] problems reloading map in android.

2010-11-17 Thread Riz
hi all,
i have created a view i.e. a button and a listener attached to the
button, when i click the button its shows a map, when i click the the
option menu button after diplaying the map
 i call back my main interface view i.e. only a button which opens the
map.

problem: when i call back my main interface View i cannot reload the
map, it gives me an error. which says, the application map (process
andoird.myexample.map) has stopped unexpectedly, please try again.

how can i solve this problem ?? i want to show the map every time the
button is clicked.
help needed.. thanks in advance. or  **a working code that displays
the map everytime i go back to interface view, is appreciated.** 
thanks all for the help.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] how to obtain location through WiFi instead of cell towers?

2010-10-17 Thread Riz
hi,
i'm trying to obtain my location using android 2.1 thorugh
Provider_Network but the problem is it uses both cell towers and
Wifi Access Point. i only want to obtain my location through Wifi
Access point and not through cell towers? any idea how to do it?

thanks all for ur help.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Google Android Challenge II bugix..!

2009-09-02 Thread riz

but there should be at least bug fixing or version upgrade option
available because we are not changing the ORIGINAL IDEA SUBMITTED .

On Sep 3, 7:39 am, Eric Wong (hdmp4.com) ericwon...@gmail.com
wrote:
 Good luck getting google to help you on this.
 I don't think they would do anything to help you ;)

 Remember the no revision rule after deadline for ADC2?

 Eric

 On Sep 3, 12:55 am, sommeralex alexander.som...@gmail.com wrote:

  google, please answer!!

  On 2 Sep., 02:15, sommeralex alexander.som...@gmail.com wrote:

   Hello Google!

   I cant find a proper email to contact you, therefore, i write you
   here.. I have submitted an Application for the google android
   challenge but did a big mistake when I was re-send the application. I
   removed the Allow Android Mock Location Permission but forgot to
   remove the testProvider in my Application. Now, i just wanted to start
   my application again and was wondering why it didnt work.

   Because of an Permission Exception..

   I hope, that there is a way to still take part in this challenge.. I
   know, that there are rules and that it would be un-managable if every
   developer would come with bugs..

   hm..

   hope to hear from you soon,
   alex
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: media player exception

2009-08-20 Thread riz

when I try to create media Player through Create(Context,Resource_ID)
(rest of the codr remain same)it played the audio of the video file
but still no video . ..my project is stuck . I need to know how to
play video file from resource folder. .

On Aug 20, 8:41 am, riz rizcs...@gmail.com wrote:
 Hi Venky,
 No I have not file the bug yet ,if you want to file the bug then
 please go ahead. most important thing for me right now is how to play
 a resource video file in android ?
 please suggest me alternate solution . I m stuck here ,looking for a
 solution ...please help me .

 Thanks
 Riz

 On Aug 19, 4:39 pm, Venky sgve...@gmail.com wrote:



  Hi Riz

  Did you get a chance to file the bug for crash. This is not specific
  to file I believe. I get the same crash with a different .3gp file
  when prepare is called after create.

  Regds,
  Venky

  On Aug 19, 3:14 pm, riz rizcs...@gmail.com wrote:

   I m trying to play mp4 
   moviehttp://www.mp4mail.com/docs/files/disney_128v_16a.mp4
   .mediaplayer.start() method is onprepaidEventListener() , but still no
   success. please help me

   I m using this code

   public void onCreate(Bundle icicle) {
   super.onCreate(icicle);

   try {

   /*
 * TODO: Set the path variable to a local media
   file path.
 */
setContentView(R.layout.mediaplayer_2);
   mPreview = (SurfaceView) findViewById(R.id.surface);
   holder = mPreview.getHolder();

   // Create a new media player and set the listeners
   mMediaPlayer = new MediaPlayer() ;

   AssetFileDescriptor afd = getResources().openRawResourceFd
   (R.raw.disney);
mMediaPlayer.setDataSource(afd.getFileDescriptor(),
   afd.getStartOffset(), afd.getLength());
mMediaPlayer.setDisplay(holder);

//   mMediaPlayer.prepare();
   mMediaPlayer.setOnBufferingUpdateListener(this);
   mMediaPlayer.setOnCompletionListener(this);
   mMediaPlayer.setOnPreparedListener(this);
   
   mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);

   } catch (Exception e) {

   Log.e(TAG, error:  + e.getMessage(), e);
   }

   }

   public void onBufferingUpdate(MediaPlayer arg0, int percent) {
   Log.d(TAG, onBufferingUpdate percent: + percent);

   }

   public void onCompletion(MediaPlayer arg0) {
   Log.d(TAG, onCompletion called);

   }

   public void onPrepared(MediaPlayer mediaplayer) {
   try  {
   Log.d(TAG, onPrepared called);
   mVideoWidth = mMediaPlayer.getVideoWidth();
   mVideoHeight = mMediaPlayer.getVideoHeight();
   Log.d(TAG, VideoWidth :+mVideoWidth);
   Log.d(TAG, VideoHeight :+mVideoHeight);
   if (mVideoWidth != 0  mVideoHeight != 0) {
   holder.setFixedSize(mVideoWidth, mVideoHeight);
 mMediaPlayer.start();
   Log.d(TAG, Player Started );
   }
   }
   catch(Exception e) {
   Log.d(TAG, Exception Trace.. +e.getMessage());

   }

   }

   here is the stack trace

   I/ActivityManager(  568): Starting activity: Intent { flags=0x1000
   comp={Hel
   lo.Android/Hello.Android.HellAndroid} }
   D/AndroidRuntime(  712): Shutting down VM
   D/dalvikvm(  712): DestroyJavaVM waiting for non-daemon threads to
   exit
   D/dalvikvm(  712): DestroyJavaVM shutting VM down
   D/dalvikvm(  712): HeapWorker thread shutting down
   D/dalvikvm(  712): HeapWorker thread has shut down
   D/jdwp(  712): JDWP shutting down net...
   D/dalvikvm(  712): VM cleaning up
   I/ActivityManager(  568): Start proc Hello.Android for activity
   Hello.Android/.H
   ellAndroid: pid=718 uid=10019 gids={3003}
   D/dalvikvm(  712): LinearAlloc 0x0 used 637060 of 4194304 (15%)
   I/jdwp(  653): received file descriptor 30 from ADB
   I/jdwp(  662): received file descriptor 25 from ADB
   I/jdwp(  681): received file descriptor 27 from ADB
   I/jdwp(  718): received file descriptor 13 from ADB
   I/ActivityManager(  568): Displayed activity
   Hello.Android/.HellAndroid: 1542 ms

   D/dalvikvm(  633): GC freed 2853 objects / 162352 bytes in 132ms
   D/dalvikvm(  653): GC freed 2852 objects / 175536 bytes in 142ms
   D/dalvikvm(  662): GC freed 1248 objects / 79664 bytes in 117ms
   D/dalvikvm(  611): GC freed 2128 objects / 114400 bytes in 115ms

   On Aug 19, 2:03 pm, 李亮亮 leeco...@hotmail.com wrote:

Hi,

Maybe you didn't post all your code, But I didn't find 
mMediaPlayer.start();

You'd better try some more STANDARD format first like MP4.

Best Regards
LiangLiang Li

 Date: Wed, 19 Aug 2009 01:44:19 -0700
 Subject: [android-developers] Re: media player exception

[android-developers] Re: media player exception

2009-08-19 Thread riz

I am trying from hours to play a video file from raw resource but no
success.

I have tried

 setContentView(R.layout.mediaplayer_2);
mPreview = (SurfaceView) findViewById(R.id.surface);
holder = mPreview.getHolder();

// Create a new media player and set the listeners
mMediaPlayer = new MediaPlayer() ;

AssetFileDescriptor afd = getResources().openRawResourceFd
(R.raw.lucky);
 mMediaPlayer.setDataSource(afd.getFileDescriptor(),
afd.getStartOffset(), afd.getLength());
 mMediaPlayer.setDisplay(holder);

 //   mMediaPlayer.prepare();
mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnCompletionListener(this);
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);


nothing happens on the screen and it just stand idle ,neither
OnBuffering event called nor onCompletion Event. I have tried to play
boht wmv and 3gp file. but nothing works . please advise what i m
missing.


On Aug 19, 7:57 am, riz rizcs...@gmail.com wrote:
 ok Nelisson , I will ,
 but tell me how can load a movie from resource through media Player or
 any other alternative,please .

 On Aug 18, 9:00 pm, Marco Nelissen marc...@android.com wrote:

  On Tue, Aug 18, 2009 at 12:07 AM,rizwanrizcs...@gmail.com wrote:

   Hi,

   I m trying to run a simple media player activity ..

   public void onCreate(Bundle icicle) {
  super.onCreate(icicle);

  try {

  /*
* TODO: Set the path variable to a local media
   file path.
*/
   setContentView(R.layout.mediaplayer_2);
  mPreview = (SurfaceView) findViewById(R.id.surface);
  holder = mPreview.getHolder();

   // Create a new media player and set the listeners
  mMediaPlayer = MediaPlayer.create(this, R.raw.lucky);
  mMediaPlayer.setDisplay(holder);
  mMediaPlayer.prepare();

  That won't work, because MediaPlayer.create() calls prepare()
  internally, and you can't call prepare() twice.
  It shouldn't cause a native crash though. Can you file a bug 
  athttp://b.android.com, and attach the file you're trying to play?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: media player exception

2009-08-19 Thread riz

I m trying to play mp4 movie 
http://www.mp4mail.com/docs/files/disney_128v_16a.mp4
.mediaplayer.start() method is onprepaidEventListener() , but still no
success. please help me


I m using this code

public void onCreate(Bundle icicle) {
super.onCreate(icicle);


try {

/*
  * TODO: Set the path variable to a local media
file path.
  */
 setContentView(R.layout.mediaplayer_2);
mPreview = (SurfaceView) findViewById(R.id.surface);
holder = mPreview.getHolder();

// Create a new media player and set the listeners
mMediaPlayer = new MediaPlayer() ;

AssetFileDescriptor afd = getResources().openRawResourceFd
(R.raw.disney);
 mMediaPlayer.setDataSource(afd.getFileDescriptor(),
afd.getStartOffset(), afd.getLength());
 mMediaPlayer.setDisplay(holder);

 //   mMediaPlayer.prepare();
mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnCompletionListener(this);
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);

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


}

public void onBufferingUpdate(MediaPlayer arg0, int percent) {
Log.d(TAG, onBufferingUpdate percent: + percent);

}

public void onCompletion(MediaPlayer arg0) {
Log.d(TAG, onCompletion called);
}

public void onPrepared(MediaPlayer mediaplayer) {
try  {
Log.d(TAG, onPrepared called);
mVideoWidth = mMediaPlayer.getVideoWidth();
mVideoHeight = mMediaPlayer.getVideoHeight();
Log.d(TAG, VideoWidth :+mVideoWidth);
Log.d(TAG, VideoHeight :+mVideoHeight);
if (mVideoWidth != 0  mVideoHeight != 0) {
holder.setFixedSize(mVideoWidth, mVideoHeight);
  mMediaPlayer.start();
Log.d(TAG, Player Started );
}
}
catch(Exception e) {
Log.d(TAG, Exception Trace.. +e.getMessage());

}
}



here is the stack trace


I/ActivityManager(  568): Starting activity: Intent { flags=0x1000
comp={Hel
lo.Android/Hello.Android.HellAndroid} }
D/AndroidRuntime(  712): Shutting down VM
D/dalvikvm(  712): DestroyJavaVM waiting for non-daemon threads to
exit
D/dalvikvm(  712): DestroyJavaVM shutting VM down
D/dalvikvm(  712): HeapWorker thread shutting down
D/dalvikvm(  712): HeapWorker thread has shut down
D/jdwp(  712): JDWP shutting down net...
D/dalvikvm(  712): VM cleaning up
I/ActivityManager(  568): Start proc Hello.Android for activity
Hello.Android/.H
ellAndroid: pid=718 uid=10019 gids={3003}
D/dalvikvm(  712): LinearAlloc 0x0 used 637060 of 4194304 (15%)
I/jdwp(  653): received file descriptor 30 from ADB
I/jdwp(  662): received file descriptor 25 from ADB
I/jdwp(  681): received file descriptor 27 from ADB
I/jdwp(  718): received file descriptor 13 from ADB
I/ActivityManager(  568): Displayed activity
Hello.Android/.HellAndroid: 1542 ms

D/dalvikvm(  633): GC freed 2853 objects / 162352 bytes in 132ms
D/dalvikvm(  653): GC freed 2852 objects / 175536 bytes in 142ms
D/dalvikvm(  662): GC freed 1248 objects / 79664 bytes in 117ms
D/dalvikvm(  611): GC freed 2128 objects / 114400 bytes in 115ms


On Aug 19, 2:03 pm, 李亮亮 leeco...@hotmail.com wrote:
 Hi,

 Maybe you didn't post all your code, But I didn't find mMediaPlayer.start();

 You'd better try some more STANDARD format first like MP4.

 Best Regards
 LiangLiang Li



  Date: Wed, 19 Aug 2009 01:44:19 -0700
  Subject: [android-developers] Re: media player exception
  From: rizcs...@gmail.com
  To: android-developers@googlegroups.com

  I am trying from hours to play a video file from raw resource but no
  success.

  I have tried

  setContentView(R.layout.mediaplayer_2);
  mPreview = (SurfaceView) findViewById(R.id.surface);
  holder = mPreview.getHolder();

  // Create a new media player and set the listeners
  mMediaPlayer = new MediaPlayer() ;

  AssetFileDescriptor afd = getResources().openRawResourceFd
  (R.raw.lucky);
  mMediaPlayer.setDataSource(afd.getFileDescriptor(),
  afd.getStartOffset(), afd.getLength());
  mMediaPlayer.setDisplay(holder);

  // mMediaPlayer.prepare();
  mMediaPlayer.setOnBufferingUpdateListener(this);
  mMediaPlayer.setOnCompletionListener(this);
  mMediaPlayer.setOnPreparedListener(this);
  mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);

  nothing happens on the screen and it just stand idle ,neither
  OnBuffering event called nor onCompletion Event. I have tried to play
  boht wmv and 3gp file. but nothing works . please advise what i m
  missing.

  On Aug 19, 7:57 am, riz rizcs...@gmail.com wrote:
   ok Nelisson , I will ,
   but tell me how can load a movie from resource through media Player or
   any

[android-developers] Re: media player exception

2009-08-19 Thread riz

Hi Venky,
No I have not file the bug yet ,if you want to file the bug then
please go ahead. most important thing for me right now is how to play
a resource video file in android ?
please suggest me alternate solution . I m stuck here ,looking for a
solution ...please help me .

Thanks
Riz

On Aug 19, 4:39 pm, Venky sgve...@gmail.com wrote:
 Hi Riz

 Did you get a chance to file the bug for crash. This is not specific
 to file I believe. I get the same crash with a different .3gp file
 when prepare is called after create.

 Regds,
 Venky

 On Aug 19, 3:14 pm, riz rizcs...@gmail.com wrote:

  I m trying to play mp4 
  moviehttp://www.mp4mail.com/docs/files/disney_128v_16a.mp4
  .mediaplayer.start() method is onprepaidEventListener() , but still no
  success. please help me

  I m using this code

  public void onCreate(Bundle icicle) {
  super.onCreate(icicle);

  try {

  /*
* TODO: Set the path variable to a local media
  file path.
*/
   setContentView(R.layout.mediaplayer_2);
  mPreview = (SurfaceView) findViewById(R.id.surface);
  holder = mPreview.getHolder();

  // Create a new media player and set the listeners
  mMediaPlayer = new MediaPlayer() ;

  AssetFileDescriptor afd = getResources().openRawResourceFd
  (R.raw.disney);
   mMediaPlayer.setDataSource(afd.getFileDescriptor(),
  afd.getStartOffset(), afd.getLength());
   mMediaPlayer.setDisplay(holder);

   //   mMediaPlayer.prepare();
  mMediaPlayer.setOnBufferingUpdateListener(this);
  mMediaPlayer.setOnCompletionListener(this);
  mMediaPlayer.setOnPreparedListener(this);
  mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);

  } catch (Exception e) {

  Log.e(TAG, error:  + e.getMessage(), e);
  }

  }

  public void onBufferingUpdate(MediaPlayer arg0, int percent) {
  Log.d(TAG, onBufferingUpdate percent: + percent);

  }

  public void onCompletion(MediaPlayer arg0) {
  Log.d(TAG, onCompletion called);

  }

  public void onPrepared(MediaPlayer mediaplayer) {
  try  {
  Log.d(TAG, onPrepared called);
  mVideoWidth = mMediaPlayer.getVideoWidth();
  mVideoHeight = mMediaPlayer.getVideoHeight();
  Log.d(TAG, VideoWidth :+mVideoWidth);
  Log.d(TAG, VideoHeight :+mVideoHeight);
  if (mVideoWidth != 0  mVideoHeight != 0) {
  holder.setFixedSize(mVideoWidth, mVideoHeight);
mMediaPlayer.start();
  Log.d(TAG, Player Started );
  }
  }
  catch(Exception e) {
  Log.d(TAG, Exception Trace.. +e.getMessage());

  }

  }

  here is the stack trace

  I/ActivityManager(  568): Starting activity: Intent { flags=0x1000
  comp={Hel
  lo.Android/Hello.Android.HellAndroid} }
  D/AndroidRuntime(  712): Shutting down VM
  D/dalvikvm(  712): DestroyJavaVM waiting for non-daemon threads to
  exit
  D/dalvikvm(  712): DestroyJavaVM shutting VM down
  D/dalvikvm(  712): HeapWorker thread shutting down
  D/dalvikvm(  712): HeapWorker thread has shut down
  D/jdwp(  712): JDWP shutting down net...
  D/dalvikvm(  712): VM cleaning up
  I/ActivityManager(  568): Start proc Hello.Android for activity
  Hello.Android/.H
  ellAndroid: pid=718 uid=10019 gids={3003}
  D/dalvikvm(  712): LinearAlloc 0x0 used 637060 of 4194304 (15%)
  I/jdwp(  653): received file descriptor 30 from ADB
  I/jdwp(  662): received file descriptor 25 from ADB
  I/jdwp(  681): received file descriptor 27 from ADB
  I/jdwp(  718): received file descriptor 13 from ADB
  I/ActivityManager(  568): Displayed activity
  Hello.Android/.HellAndroid: 1542 ms

  D/dalvikvm(  633): GC freed 2853 objects / 162352 bytes in 132ms
  D/dalvikvm(  653): GC freed 2852 objects / 175536 bytes in 142ms
  D/dalvikvm(  662): GC freed 1248 objects / 79664 bytes in 117ms
  D/dalvikvm(  611): GC freed 2128 objects / 114400 bytes in 115ms

  On Aug 19, 2:03 pm, 李亮亮 leeco...@hotmail.com wrote:

   Hi,

   Maybe you didn't post all your code, But I didn't find 
   mMediaPlayer.start();

   You'd better try some more STANDARD format first like MP4.

   Best Regards
   LiangLiang Li

Date: Wed, 19 Aug 2009 01:44:19 -0700
Subject: [android-developers] Re: media player exception
From: rizcs...@gmail.com
To: android-developers@googlegroups.com

I am trying from hours to play a video file from raw resource but no
success.

I have tried

setContentView(R.layout.mediaplayer_2);
mPreview = (SurfaceView) findViewById(R.id.surface);
holder = mPreview.getHolder();

// Create a new media player and set the listeners
mMediaPlayer = new MediaPlayer() ;

AssetFileDescriptor

[android-developers] Re: media player exception

2009-08-18 Thread riz

ok Nelisson , I will ,
but tell me how can load a movie from resource through media Player or
any other alternative,please .

On Aug 18, 9:00 pm, Marco Nelissen marc...@android.com wrote:
 On Tue, Aug 18, 2009 at 12:07 AM,rizwanrizcs...@gmail.com wrote:

  Hi,

  I m trying to run a simple media player activity ..

  public void onCreate(Bundle icicle) {
         super.onCreate(icicle);

         try {

         /*
       * TODO: Set the path variable to a local media
  file path.
       */
                  setContentView(R.layout.mediaplayer_2);
                 mPreview = (SurfaceView) findViewById(R.id.surface);
                 holder = mPreview.getHolder();

  // Create a new media player and set the listeners
                 mMediaPlayer = MediaPlayer.create(this, R.raw.lucky);
                 mMediaPlayer.setDisplay(holder);
                 mMediaPlayer.prepare();

 That won't work, because MediaPlayer.create() calls prepare()
 internally, and you can't call prepare() twice.
 It shouldn't cause a native crash though. Can you file a bug 
 athttp://b.android.com, and attach the file you're trying to play?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: GmapActivity Only marker Touch Listener

2009-08-17 Thread riz

can anyone suggest me a better solution rather than implementing a
collision deduction or ray tracing algorithm .please

On Aug 16, 8:46 pm, rizwan rizcs...@gmail.com wrote:
 Hi All ,

 I have extended a MapActivity and add a marker over it like
 this ..

  MapView mapView = (MapView) findViewById(R.id.mapView);

 mapOverlays =mapView.getOverlays();
 drawable = this.getResources().getDrawable
 (R.drawable.androidmarker);
 itemizedOverlay = new SimpleOutItemizedOverlay(drawable,this);

 GeoPoint point = new GeoPoint(1924,-9912);
 OverlayItem overlayitem = new OverlayItem(point, , );

 itemizedOverlay.addOverlay(overlayitem);
 mapOverlays.add(itemizedOverlay);

  mapView.setBuiltInZoomControls(true);

 in my SimpleOutItemizedOverlay class which inherits from
 ItemizedOverlay I only want to Listen only when particular marker
 (place on map ) is touched or clicked .
   @Override
  public boolean onTouchEvent(MotionEvent event, MapView mapView)

 Listen on whole Map . I just want to listen on a particular markers
 touched or Clicked Event. let me know how can I setListener on that
 Event.

 Thanks
 Rizwan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: what's wrong in this code

2009-08-02 Thread riz

yes widgets are not thread safe. thanks dude for the link

On Jul 31, 9:50 am, gopu gopuraj...@gmail.com wrote:
 http://android-developers.blogspot.com/2009/05/painless-threading.html

 On Jul 31, 9:08 am, Marco Nelissen marc...@android.com wrote:



  Can you be more specific than it's not working ?Does it crash? If so, post
  the stack trace from the log.

  On Thu, Jul 30, 2009 at 11:20 AM, rizwan rizcs...@gmail.com wrote:

   it is not working . I don't know why please advise at your earliest. I
   m stuck here .

   public myclass extends Activity  implements ICounter{

          TextView view ;
     �...@override
      public void onCreate(Bundle savedInstanceState) {

          super.onCreate(savedInstanceState);

     view = new TextView(this);
      view.setTextSize(25);
      view.setTextColor(Color.YELLOW) ;
     view.setText(Starting Counter.. ) ;
     setContentView(view) ;

     CounterManager manager = CounterManager.getcounterManager() ;
     manager.setCounterListener(this);
     manager.start();

      }

         �...@override
          public void drawScore(String Score) {

                  // TODO Auto-generated method stub
                  view.setText(Score ) ;
          }
   }

   public class counterManager implements Runnable{

          private static counterManager instance ;
          IForce force ;
          public static forceManager getcounterManager(){

                  if(instance == null)
                          instance = new CounterManager();
                  return instance ;

          }
          public void setCounterListener(IForce force) {
                  this.force = force ;

          }

          public void start(){
                  Thread t = new Thread(this) ;
                  t.start() ;
          }

         �...@override
          public void run() {
                  // TODO Auto-generated method stub

           for(int counter = 0 ; counter = 20 ; counter ++) {

                   try {
                          Thread.sleep(2000) ;
                  } catch (InterruptedException e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                  }
                   force.drawScore(String.valueOf(counter)) ;
           }
          }

   }- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: what's wrong in this code

2009-07-30 Thread riz

it is causing a problem in
Thread.sleep (2000);
but why ? please if any body explain

On Jul 30, 11:23 pm, riz rizcs...@gmail.com wrote:
 I m just trying to call drawScore method from another Thread .
 drawScore method just changes the text of textView but it's not
 working .any idea ?

 On Jul 30, 11:20 pm, rizwan rizcs...@gmail.com wrote:



  it is not working . I don't know why please advise at your earliest. I
  m stuck here .

  public myclass extends Activity  implements ICounter{

          TextView view ;
      @Override
      public void onCreate(Bundle savedInstanceState) {

          super.onCreate(savedInstanceState);

     view = new TextView(this);
      view.setTextSize(25);
      view.setTextColor(Color.YELLOW) ;
     view.setText(Starting Counter.. ) ;
     setContentView(view) ;

     CounterManager manager = CounterManager.getcounterManager() ;
     manager.setCounterListener(this);
     manager.start();

      }

          @Override
          public void drawScore(String Score) {

                  // TODO Auto-generated method stub
                  view.setText(Score ) ;
          }

  }

  public class counterManager implements Runnable{

          private static counterManager instance ;
          IForce force ;
          public static forceManager getcounterManager(){

                  if(instance == null)
                          instance = new CounterManager();
                  return instance ;

          }
          public void setCounterListener(IForce force) {
                  this.force = force ;

          }

          public void start(){
                  Thread t = new Thread(this) ;
                  t.start() ;
          }

          @Override
          public void run() {
                  // TODO Auto-generated method stub

           for(int counter = 0 ; counter = 20 ; counter ++) {

                   try {
                          Thread.sleep(2000) ;
                  } catch (InterruptedException e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                  }
                   force.drawScore(String.valueOf(counter)) ;
           }
          }

  }- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] BroadCastReceiver Alternate

2009-07-05 Thread riz

hi All ,

I m exploring Android SDK for ADC2 challenge.  I need to know If my
application main activity calls
intent for doing some network activity (blocking call in separate
thread ) meanwhile it starts another activity . how can I BroadCast
network response to second activity I guess through extending
BroadCastReceiver class but is there any alternate ? any interface
that should I implement ? I just need to show on top of that activity
a dialog box with Commands OK and CANCEL.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---