[android-developers] Different APKs for same code on difference machines

2015-12-29 Thread Shashidhar
Hi,
 I have used the same code base and referenced the same android version on
2 windows machines and generated APKs on both of them. The APK's differ in
size. What could the possible reasons for APKs to differ even thought I
have same development environment in both machines.

Thanks,
Shashidhar

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAHWL_jP391cOpXHthK%3D2ASfVBjbp7NSQxxOT9cO1DB1vMTdEtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] FusedLocationApi does not update location with out interent

2015-12-18 Thread Shashidhar
Hi,
 I have implemented the frequent location updates in my app following the
training @
http://developer.android.com/training/location/receive-location-updates.html .
Every thing works fine when the phone is connected to internet. But the
location does not get updated when there is no internet connection?
Is this expected behavior or do we have a workaround to get the location
updates with out internet? We even tried with setting the priority as
PRIORITY_HIGH_ACCURACY
<http://developer.android.com/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_HIGH_ACCURACY>
while
initializing the location request and that did not help with out internet.

Appreciate your Help!

Thanks,
Shashidhar

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAHWL_jP8th63PC7iHWAhCBt_g9VJniN%2BeMFz4jUusLncUvae2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] gzip compression for http parameters

2014-09-29 Thread Shashidhar
Hi,
 Currently I am using httpclient's bytearray entity to compress and send
data to server. Code for the same is below.

final String url = www.example.com/u.h;

HttpPost httppost = new HttpPost(url);

String data = Hello World! Blah.. Blah Blah..;  //sample
data. this can be huge that the compression helps

   if (data.length() 
AndroidHttpClient.getMinGzipSize(getContentResolver())) {

 httppost.setHeader(Content-Encoding, gzip);

   }

   httppost.setEntity(AndroidHttpClient.getCompressedEntity(data.getBytes(
UTF-8), WorkoutActivity.this.getContentResolver()));

   HttpResponse response = httpClient.execute(httppost);



Now, I want to change the bytearray entity to url encoded entity i.e, I
want to change something like param1=data.

i.e, I want to still compress the data and attach it to a http parameter.
We use servlet on server side to read the data.

Currently with bytestream being uploaded we are using servlet filter to
handle decompressing the data.

I need the sample code similar to like the one below.


String url = www.example.com/u.z;

  HttpPost httppost = new HttpPost(url);

String data = Hello World! Blah.. Blah Blah..;  //sample
data. this can be huge that the compression helps

  ListNameValuePair nameValuePairs = new ArrayListNameValuePair();

  nameValuePairs.add(new BasicNameValuePair(param1, data ));  // I want
the data to be compressed here.

httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

   HttpResponse response= httpclient.execute(httppost);


Any help is appreciated.


Thanks,

Shashidhar

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Recreating a surface view

2013-05-15 Thread Shashidhar
Hi,
  I have a framlayout which has 2 childs. One is a surfaceview and the
other one is an imageview. I need to play a video on the surfaceview when
the activity starts and show the imageview after the video completes. I got
this working.
But after showing the image for 5 mins, I need to play the video again.

How can I do this? I mean as soon as the video completes for the first time
the surfaceview is destroyed. How can recreate the surfaceview to play the
video for the 2nd time after 5 mins??


Thanks,
Shashidhar

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Recreating a surface view

2013-05-15 Thread Shashidhar
Thanks. got it working.


On Thu, May 16, 2013 at 2:44 AM, Justin Anderson magouyaw...@gmail.comwrote:

 I've never heard of the surfaceview getting destroyed after playing a
 video...  That being said, why can't use just use the constructor and
 create a new one if you need to?

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Wed, May 15, 2013 at 9:58 AM, Shashidhar shashi.zep...@gmail.comwrote:

 Hi,
   I have a framlayout which has 2 childs. One is a surfaceview and the
 other one is an imageview. I need to play a video on the surfaceview when
 the activity starts and show the imageview after the video completes. I got
 this working.
 But after showing the image for 5 mins, I need to play the video again.

 How can I do this? I mean as soon as the video completes for the first
 time the surfaceview is destroyed. How can recreate the surfaceview to play
 the video for the 2nd time after 5 mins??


 Thanks,
 Shashidhar

 --
 --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




  --
 --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: 2 Media players can not run simulateneously

2013-04-28 Thread Shashidhar
This issue happens only on a smat tv android device that I use. When I run
the app on Samsung galaxy S3 It worked file. It plays both video and audio
together.

So, I wrote a separate app which has a service to play the music. And my
app bind to that service and the service can play the music. This solved my
problem.


On Sat, Apr 27, 2013 at 10:50 PM, bob b...@coolfone.comze.com wrote:

 That's really strange as MediaPlayer.java doesn't have anywhere near 4528
 lines:


 http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/4.2.2_r1/android/media/MediaPlayer.java/?v=source

 Seems to have about 2433.

 Maybe you can copy and paste the stack trace?

 Thanks.



 On Saturday, April 27, 2013 5:27:08 AM UTC-5, shashidhar wrote:

 Hi,
  I am trying to run a video(with audio - using surfaceview approach to
 play video) and a separate another audio file in the same activity. For
 this, I am creating 2 media player objects. But, only one media player is
 running at a time. I mean, as soon as the 2nd media player object is
 created, the first one is not working. I get the error 
 *E/MediaPlayer.java(4528):
 release prev. media player* as soon as it creates the 2nd instance of
 media player.


 Any help?

 Thanks,
 Shashidhar

  --
 --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] 2 Media players can not run simulateneously

2013-04-27 Thread Shashidhar
Hi,
 I am trying to run a video(with audio - using surfaceview approach to play
video) and a separate another audio file in the same activity. For this, I
am creating 2 media player objects. But, only one media player is running
at a time. I mean, as soon as the 2nd media player object is created, the
first one is not working. I get the error *E/MediaPlayer.java(4528):
release prev. media player* as soon as it creates the 2nd instance of
media player.


Any help?

Thanks,
Shashidhar

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] How to take the focus on to the softkeyboard

2013-04-17 Thread Shashidhar
Hi,
 I am working on a project which does not have any touch interface. All it
has is a remote control with 6 buttons (Enter, Back, next, prev, up and
down arrow keys). Using these button we need to control the navigation of
the app.

Coming to my problem here, I have an edit text which shows the soft
keyboard when it takes focus. Is there any way by which I can take the
focus on to the soft keyboard.  I mean, I should be able to use the next,
prev, up and down arrows buttons of my remote control to
move across the soft-keyboard keys and type in into the edittext.


Thanks,
Shashidhar

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Listview items focus change event

2013-03-12 Thread Shashidhar
Hi,
 I have an application which has a custom listview. I run it on a smart tv
android device and the whole navigation is based on the standard keyboard
arrow buttons. I am able to scroll up and down through the list items using
up and down arrow keys. When I scroll using keys, the list selector moves
appropriately. I need to do somethings based on the item being focused.
But, I could not find a way to get the list item focus changed event.
Essentially, I need to know whenever a list item takes the focus.

I tried to set the focuschangelistener for the view that I am returning in
getView() method. But its not working.


Any help is appreciated.

thanks,
Shashidhar

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Listview items focus change event

2013-03-12 Thread Shashidhar
Found the solution.

OnItemSelectedListener  on list view gets the position of the current
focused list item.|


On Tue, Mar 12, 2013 at 6:17 PM, Shashidhar shashi.zep...@gmail.com wrote:

 Hi,
  I have an application which has a custom listview. I run it on a smart tv
 android device and the whole navigation is based on the standard keyboard
 arrow buttons. I am able to scroll up and down through the list items using
 up and down arrow keys. When I scroll using keys, the list selector moves
 appropriately. I need to do somethings based on the item being focused.
 But, I could not find a way to get the list item focus changed event.
 Essentially, I need to know whenever a list item takes the focus.

 I tried to set the focuschangelistener for the view that I am returning in
 getView() method. But its not working.


 Any help is appreciated.

 thanks,
 Shashidhar


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Injecting focus change events programatically

2013-01-30 Thread Shashidhar
Any help on this???


On Mon, Jan 7, 2013 at 4:48 PM, Shashidhar shashi.zep...@gmail.com wrote:

 Hi,
  I have seen the examples for injecting key press and motion
 events programmatically in android. But is there a way to inject focus
 change events programmatically.

 I want to make a android device operated with a remote control. So, if I
 am on all applications screen and based on the buttons that I press(up,
 down, left or right), the focus should change from one app icon to the
 other accordingly. If I press Enter button on an icon, the app should be
 opened. Assuming I know how to read the remote control operations from USB
 interface, based on the data that we receive over USB, we need to change
 focus.

 So, is there a public API that can handle changing focus based on my
 remote control buttons in all the installed apps. In all I need all the
 navigation of the system with remote control.


 Thanks,
 Shashidhar


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Injecting focus change events programatically

2013-01-07 Thread Shashidhar
Hi,
 I have seen the examples for injecting key press and motion
events programmatically in android. But is there a way to inject focus
change events programmatically.

I want to make a android device operated with a remote control. So, if I am
on all applications screen and based on the buttons that I press(up, down,
left or right), the focus should change from one app icon to the other
accordingly. If I press Enter button on an icon, the app should be
opened. Assuming I know how to read the remote control operations from USB
interface, based on the data that we receive over USB, we need to change
focus.

So, is there a public API that can handle changing focus based on my remote
control buttons in all the installed apps. In all I need all the navigation
of the system with remote control.


Thanks,
Shashidhar

-- 
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] UI getting slow on video playing

2012-12-19 Thread Shashidhar
Hi,
 In my application, I am majorly doing 2 things.

1) some part of the screen plays video
2) The remaining part of screen has a set of text views and I am updating
them every one second.

For playing video, I am using surface view approach and for updating
textviews, I am using an async task which updates UI in onprogresschanged()
method every one second.

With this approach, the textviews are not getting refreshed with the latest
data every one second. The refresh rate is keep on changing. Some times
they update for 10 sec etc.

When I comment the video playing code, the textviews are getting updated
every 1 sec. properly.

Can any one suggest me a approach such that both the video playing and
textview updates on UI occur properly with out any delay?


Thanks,
Shashidhar

-- 
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

Re: [android-developers] Re: UI getting slow on video playing

2012-12-19 Thread Shashidhar
Below is the async task I am using to update the UI


private class DisplayTask extends AsyncTaskVoid, Void, Void {

public boolean isStopped = false;

@Override

protected Void doInBackground(Void... params) {

   try {

  while (!isStopped) {

   try {

   publishProgress();

  Thread.sleep(1000);

   } catch(InterruptedException e) {

e.printStackTrace();

   }

}

  }catch(Exception e) {

  e.printStackTrace();

  }

  return null;

  }


  @Override

   protected void onProgressUpdate(Void... values) {

   //Code to update UI

   }

}


On Wed, Dec 19, 2012 at 5:26 PM, skink psk...@gmail.com wrote:



 Shashidhar wrote:
  Hi,
   In my application, I am majorly doing 2 things.
 
  1) some part of the screen plays video
  2) The remaining part of screen has a set of text views and I am updating
  them every one second.
 
  For playing video, I am using surface view approach and for updating
  textviews, I am using an async task which updates UI in
 onprogresschanged()
  method every one second.
 
  With this approach, the textviews are not getting refreshed with the
 latest
  data every one second. The refresh rate is keep on changing. Some times
  they update for 10 sec etc.
 
  When I comment the video playing code, the textviews are getting updated
  every 1 sec. properly.
 
  Can any one suggest me a approach such that both the video playing and
  textview updates on UI occur properly with out any delay?
 
 
  Thanks,
  Shashidhar

 what async task?can you be more elaborate?

 pskink

 --
 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


-- 
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

Re: [android-developers] Re: UI getting slow on video playing

2012-12-19 Thread Shashidhar
In fact, the first thing I tried was the Handler approach, but it also had
the same problem. Hence, I changed it to async task.


On Wed, Dec 19, 2012 at 5:52 PM, skink psk...@gmail.com wrote:



 Shashidhar wrote:
  Below is the async task I am using to update the UI
 
 
  private class DisplayTask extends AsyncTaskVoid, Void, Void {
 
  public boolean isStopped = false;
 
  @Override
 
  protected Void doInBackground(Void... params) {
 
 try {
 
while (!isStopped) {
 
 try {
 
 publishProgress();
 
Thread.sleep(1000);
 
 } catch(InterruptedException e) {
 
  e.printStackTrace();
 
 }
 
  }
 
}catch(Exception e) {
 
e.printStackTrace();
 
}
 
return null;
 
}
 
 
@Override
 
 protected void onProgressUpdate(Void... values) {
 
 //Code to update UI
 
 }
 
  }
 
 
 

 don't  use AsyncTask, use Handler instead

 pskink

 --
 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


-- 
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

Re: [android-developers] Re: UI getting slow on video playing

2012-12-19 Thread Shashidhar
I am not running the app on a mobile phone or a tablet. I am running it on
a smart android decive which has HDMI output and you can connect it to TV
and see the UI on the TV. Can the processing speed limitation of the device
be the reason for slow UI updates??


On Wed, Dec 19, 2012 at 6:44 PM, skink psk...@gmail.com wrote:



 Shashidhar wrote:
  In fact, the first thing I tried was the Handler approach, but it also
 had
  the same problem. Hence, I changed it to async task.
 
 
 

 I'm using surface view with handlers and its working like a charm

 pskink

 --
 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


-- 
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 launch youtube activity to play a playlist

2012-08-29 Thread Shashidhar
Hi,
 I have the youtube playlist id and I want to launch the youtube activity
to play that playlist(which contains a series of videos).
I have searched on internet but could not get any solution.

any help is appreciated

Thanks,
Shashidhar

-- 
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

Re: [android-developers] record video with camera

2012-03-28 Thread Shashidhar
On Tue, Mar 27, 2012 at 7:05 PM, MANJINDER SANDHA 
manjindersing...@gmail.com wrote:

 i want code of recording video with camera in android...


I want anjelina angelina jolie !!! LoL...

Do some google search before posting some questions here.



 --
 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

-- 
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

Re: [android-developers] regarding tabhost

2012-02-27 Thread Shashidhar
This group is to help you, if you are stuck on something while programming
but not to share the code...

On Tue, Feb 28, 2012 at 12:03 PM, Mulsaniya Bhadresh 
bhadresh.ha...@gmail.com wrote:

 Hello,

 Please anyone have complete tabhost code so that i can develop my
 application with the help of that.
 I don't know how to identify which tab is clicked and hoe to set the click
 event on it.

 so please help me


 please send me complete code

 --
 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

-- 
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

Re: [android-developers] split the string in three parts...

2012-02-27 Thread Shashidhar
It's all good. What the hell is your problem then???

On Tue, Feb 28, 2012 at 9:36 AM, IS SOA isso...@gmail.com wrote:

 I am trying to split the below string into three parts

 String _books = |||###Chapter 01###ONE###INDEX 1|||###Chapter
 02###TWO###INDEX 2|||###Chapter 03###THREE###INDEX 3|||;

 so the above code should print like this:

 chapter: chapter 01
 title: ONE
 page: INDEX 1

 chapter: chapter 02
 title: TWO
 page: INDEX 2

 .
 .

for(String book: _books.split(|||))
{
String[] parts = book.split(###);
System.out.println(chapter:  + parts[0]);
System.out.println(title:  + parts[1]);
System.out.println(page:  + parts[2]);
}

 --
 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

-- 
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

Re: [android-developers] Why explicit need for Permissions to be specified in Manifest File

2012-02-23 Thread Shashidhar
AFAIK, it was meant for security for the users who install the application.
When a user try to install your application, It will show up all the
permissions that you have requested in manifest file with a proper message
corresponding to that permission. Now, User can decide based on the phone
features your app uses whether to install it or not.

Thanks,
Shashidhar

On Thu, Feb 23, 2012 at 5:27 PM, Raja Nagendra Kumar 
nagendra.r...@tejasoft.com wrote:

 Hi,

 Looking for some inputs why Android explicitly expects all the
 permissions need to be declared in Android Manifest file..

 Can Android Run time introspect at run time or during compile time and
 prepare such info based on the API used by the application...

 Can it made redundant..through automatic application introspection..

 Basically looking for why android is designed for explicit permissions
 declaration.. when it can be automatically discovered at compiler time
 or at run time..

 Regards,
 Raja Nagendra Kumar,
 C.T.O
 www.tejasoft.com
 - Enterprise Mobile Applications Development

 --
 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


-- 
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

Re: [android-developers] How to restrict ContentProviders to be used for some apps

2012-02-23 Thread Shashidhar
Check out the content provider permissions @
http://developer.android.com/guide/topics/security/security.html#declaring


Thanks,
Shashidhar

On Thu, Feb 23, 2012 at 4:38 PM, ashiq sayyad ashiqsay...@gmail.com wrote:

 I have created one custom content provider.I want only my apps should
 use my custom content provider and the outside apps should not be able
 to use it even if they know the URI of the content provider.

 Is it possible???



 Regards,
 Ashiq

 --
 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

-- 
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 find Bluetooth discoverability time left?

2012-02-21 Thread Shashidhar
Hi,

   In my activity, I need to show a counter which represents,  how much
time still left for bluetooth to be in discoverable mode.
If bluetooth is not already in discoverable mode,  I am starting an intent
to make it discoverable and since I know for how much time I am making it
discoverable, I am able to show the proper time left and update it every
second.

But, if the bluetooth is already in discoverable mode when my activity gets
started, is there a way by which I can get the time still left for
bluetooth to be in discoverable mode?

Thanks,
Shashidhar

-- 
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

Re: [android-developers] Children Height in Expandable List View

2012-02-21 Thread Shashidhar
You must have given fixed width to the view that displays address. Make it
to wrap_content and that should do.

-Shashi

On Wed, Feb 22, 2012 at 4:55 AM, TreKing treking...@gmail.com wrote:

 On Tue, Feb 21, 2012 at 2:42 PM, Naren naren.garap...@gmail.com wrote:

 Where can i change the height of children in an expandable list view.


 In the layout for the view you're using for the child, if you are
 inflating it from an XML file. Otherwise directly on the View if you're
 creating it dynamically.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices


  --
 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


-- 
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

Re: [android-developers] Children Height in Expandable List View

2012-02-21 Thread Shashidhar
On Wed, Feb 22, 2012 at 11:29 AM, Shashidhar shashi.zep...@gmail.comwrote:

 You must have given fixed width to the view that displays address. Make it
 to wrap_content and that should do.


Same is the case with height also.



 -Shashi


 On Wed, Feb 22, 2012 at 4:55 AM, TreKing treking...@gmail.com wrote:

 On Tue, Feb 21, 2012 at 2:42 PM, Naren naren.garap...@gmail.com wrote:

 Where can i change the height of children in an expandable list view.


 In the layout for the view you're using for the child, if you are
 inflating it from an XML file. Otherwise directly on the View if you're
 creating it dynamically.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices


  --
 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




-- 
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

Re: [android-developers] How to find Bluetooth discoverability time left?

2012-02-21 Thread Shashidhar
Thanks kris, for the detailed information.


On Tue, Feb 21, 2012 at 7:25 PM, Kristopher Micinski krismicin...@gmail.com
 wrote:

 I don't believe this is available.  I suspected that it was not, and
 then I double checked (even through the bluecove api) this morning. I
 would suspect that this is something that varies so much that it
 cannot be accurately be estimated by your software (I mean surely
 somewhere down in hardware there's some timer, but at the Android
 system, and perhaps even linux system level, you don't have access to
 this information, and it will vary quite a bit from chipset to
 chipset.)

 kris

 On Tue, Feb 21, 2012 at 8:50 AM, Shashidhar shashi.zep...@gmail.com
 wrote:
  Hi,
 
 In my activity, I need to show a counter which represents,  how much
 time
  still left for bluetooth to be in discoverable mode.
  If bluetooth is not already in discoverable mode,  I am starting an
 intent
  to make it discoverable and since I know for how much time I am making it
  discoverable, I am able to show the proper time left and update it every
  second.
 
  But, if the bluetooth is already in discoverable mode when my activity
 gets
  started, is there a way by which I can get the time still left for
 bluetooth
  to be in discoverable mode?
 
  Thanks,
  Shashidhar
 
  --
  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

 --
 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

-- 
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

Re: [android-developers] Re: How to find which drawable folder is being used??

2011-11-04 Thread Shashidhar
Hi,
 I found a weird ways of finding this.
We can place three completely different images(ex: cat, pig, elephant  :-)
) with same name in each of the folder.
In your app use this image on UI.
When you run the app now, you will be able to find which drawable folder is
being used based on the image shown on the GUI :) .

Thanks,
Shashidhar


On Fri, Nov 4, 2011 at 3:29 PM, Marcel Arts marcelarts1...@gmail.comwrote:

 Hello anyone,

 I want to know more about this issue too! Does anyone can give 'us'
 more info about the 3 drawable folders? (hdpi,ldpi and mdpi)  Witch
 drawable resource will the cellphone/ tab use?

 grtz,

 Marcel




 On Nov 2, 7:31 am, Shashidhar shashi.zep...@gmail.com wrote:
  Hi,
Is there a way to find which drawable folder images are currently used
  when I run my application.
  I mean, say when I run my app on Nexus-one phone, I want to know which
  drawable folder images are used on the UI.
  I have 3 separate folder and each having the same set of images with
  different sizes.
 
  Thanks,
  Shashidhar

 --
 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

-- 
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 find which drawable folder is being used??

2011-11-02 Thread Shashidhar
Hi,
  Is there a way to find which drawable folder images are currently used
when I run my application.
I mean, say when I run my app on Nexus-one phone, I want to know which
drawable folder images are used on the UI.
I have 3 separate folder and each having the same set of images with
different sizes.


Thanks,
Shashidhar

-- 
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] Bluetooth not getting paired

2011-08-29 Thread Shashidhar
Hi,
  I am trying to pair a Bluetooth device in my program. I open a server
socket and wait for the client to connect and when the client connects to
the server for the first time,
its prompting a Bluetooth pairing request dialog. So far its all fine. But
even if I enter the correct passkey(pairing code), pairing process is
not successful.
Here is the log cat description for the same.


08-29 14:45:54.123: ERROR/BluetoothEventLoop.cpp(96): event_filter: Received
signal org.bluez.Device:PropertyChanged from
/org/bluez/5028/hci0/dev_00_A0_96_2E_3F_3A
08-29 14:45:54.143: ERROR/BluetoothEventLoop.cpp(96): event_filter: Received
signal org.bluez.Adapter:PropertyChanged from /org/bluez/5028/hci0
08-29 14:45:54.153: ERROR/BluetoothEventLoop.cpp(96): event_filter: Received
signal org.bluez.Adapter:DeviceRemoved from /org/bluez/5028/hci0
08-29 14:45:54.153: DEBUG/BluetoothService(96): 00:A0:96:2E:3F:3A bond state
11 - 10 (0)
08-29 14:45:54.153: WARN/BluetoothService(96): setBondState() called to
unbond device, but reason code is invalid. Overriding reason code with
BOND_RESULT_REMOVED
08-29 14:45:54.173: VERBOSE/BluetoothEventRedirector(8381): Received
android.bluetooth.device.action.BOND_STATE_CHANGED
08-29 14:45:54.173: ERROR/CachedBluetoothDeviceManager(8381): Got bonding
state changed for 00:A0:96:2E:3F:3A, but we have no record of that device.
08-29 14:45:54.173: WARN/CachedBluetoothDeviceManager(8381):
showUnbondMessage: Not displaying any message for reason:9


I tried with 2 phones. I was able to get it paired successfully with Samsung
Nexus S phone but the same code if giving the above logact info when i try
it on Nexus one.

Any help is appreciated.


Thanks,
Shashi

-- 
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

Re: [android-developers] Re: Minimize activity on back key press

2011-07-13 Thread Shashidhar
Check this.
http://developer.android.com/reference/android/app/Activity.html#moveTaskToBack(boolean)

On Wed, Jul 13, 2011 at 11:52 AM, Ali Chousein ali.chous...@gmail.comwrote:

 Study and understand the activity lifecycle well (http://
 developer.android.com/reference/android/app/Activity.html) and then
 think again what you are trying to do. Forget about minimizing/
 maximizing; that concept doesn't even exist in Android. You have to
 think in terms of activity lifecycle.

 --
 Ali Chousein
 Geo-Filtered Assistant
 http://geo-filtered-assistant.blogspot.com/
 Cisco Android marketplace (Chosen for Cisco Cius)
 https://marketplace.cisco.com/apphq/products/510


 On Jul 7, 2:58 pm, sandeep kumar pksandeepku...@gmail.com wrote:
  On Back Key press i want to minimize the application, How can i do
  this???
 
  public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK) {
 
  //Here i want to put minimize code.. pls give me this
  statement
 
  return true;
  }
  return super.onKeyDown(keyCode, event);
  }

 --
 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


-- 
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

Re: [android-developers] Re: Getting Discovered Bluetooth Devices List Returns Too Late

2011-07-12 Thread Shashidhar
You should have 2 broadcast receivers.

one for getting the discovered bluetooth devices in your list using
ACTION_FOUND intent filter.

second one is for Knowing when the discovery is completed using
ACTION_DISCOVERY_FINISHED. In this broadcast receiver, you should take the
devices list when you the the event for discovery finished.

On Tue, Jul 12, 2011 at 9:07 AM, gjs garyjamessi...@gmail.com wrote:

 Hi,

 Have a look at
 http://developer.android.com/resources/samples/BluetoothChat/index.html

 In particular

 http://developer.android.com/resources/samples/BluetoothChat/src/com/example/android/BluetoothChat/DeviceListActivity.html

 And read this carefully
 http://developer.android.com/guide/topics/wireless/bluetooth.html

 Regards

 On Jul 9, 9:26 am, Bassel Yahia basselya...@gmail.com wrote:
  Hi,
 
  I am having a real problem here with discovering bluetooth devices. I
  am making a method that returns a List with all devices that were
  discovered. This method triggers other methods that executes the
  discovery and establish the BroadcastReceivers.
  THE PROBLEM is that the method returns before the BroadcastReceivers
  finds the devices. This results in returning an empty list every time
  by the getDiscoveredList() because the List hasn't been filled yet by
  the Receivers. List made global where all methods and Receivers share
  the same List. The List is filled with devices after the method
  returns.
 
  Here is my code:
 
  ArrayListDevice discoveredDevices = new ArrayListDevice();
 
  public ArrayListDevice getDiscoveredList() {
 
  isDiscovering = true;
  monitorDiscovery();
 
  discoverDevices();
 
  Log.d(Save, Before - btAdapter.isDiscovering()
  +btAdapter.isDiscovering());
  while (btAdapter.isDiscovering()) {
   // Waiting for discovery to end. Assuming
  that during discovery devices have already been added
   // in discoveredDevices because they are
  added when BluetoothDevice.ACTION_FOUND
   // When discovery ends, no nearby devices is
  expected to be found by the
   // discoveryResult BroadcastReceiver because
  I am not discovering outside this loop
  }
 
  Log.d(Save, After - btAdapter.isDiscovering()
  +btAdapter.isDiscovering());
  Log.d(Save, Returning from getDiscoveredList());
  return discoveredDevices;
  }
 
  private void monitorDiscovery() {
  registerReceiver(discoveryMonitor, new IntentFilter(
 
 BluetoothAdapter.ACTION_DISCOVERY_STARTED));
  registerReceiver(discoveryMonitor, new IntentFilter(
 
 BluetoothAdapter.ACTION_DISCOVERY_FINISHED));
  }
 
  private void discoverDevices() {
 
  while (!btAdapter.isEnabled()) { // If Bluetooth is
 still
  opening, then wait till opened
  }
  discoveredDevices.clear();   //Clear the List
  btAdapter.startDiscovery();
  while (!btAdapter.isDiscovering()) { //Wait till
 discovery
  starts
  }
  BroadcastReceiver discoveryResult = new
 BroadcastReceiver() {
  @Override
  public void onReceive(Context context, Intent
 intent) {
  BluetoothDevice remoteDevice;
  remoteDevice = intent
 
 .getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
  short rssi =
 intent.getShortExtra(BluetoothDevice.EXTRA_RSSI,
  Short.MIN_VALUE);
 
  Toast.makeText(
  getApplicationContext(),
  Discovered:  +
 remoteDevice.getName() +   RSSI: 
  + rssi,
 Toast.LENGTH_SHORT).show();
 
  if
 (!discoveredDevices.contains(remoteDevice)) {
  discoveredDevices.add(new
 Device(remoteDevice, rssi));
  Log.d(Save, Name:  +
 remoteDevice.getName());
  Log.d(Save, Address:  +
 remoteDevice.getAddress());
  Log.d(Save, RSSI:  + rssi);
  Log.d(Save, Size Now:  +
 discoveredDevices.size());
  }
  }
  };
  registerReceiver(discoveryResult, new
  IntentFilter(BluetoothDevice.ACTION_FOUND));
 
  return;
  }
 
  BroadcastReceiver discoveryMonitor = new BroadcastReceiver() {
 
  String dStarted =
 

Re: [android-developers] Orientation change problem

2011-07-11 Thread Shashidhar
Check if these help.

http://stackoverflow.com/questions/5685631/how-can-i-prevent-edit-text-being-hidden-by-the-android-keyboard


http://stackoverflow.com/questions/6473399/android-edittext-stays-hidden-behind-the-keyboard

Thanks,
Shashi

On Mon, Jul 11, 2011 at 3:32 PM, muthumani ct.muthum...@gmail.com wrote:



 -- Forwarded message --
 From: muthumani ct.muthum...@gmail.com
 Date: Mon, Jul 11, 2011 at 2:10 PM
 Subject: prob while using the android application horizontally
 To: Android Developers android-developers@googlegroups.com


 Hi
   i am developing a project for android galaxy tab i have 3
  EditText in the activity when i click on the first EditText the
 keypad slides into the screen and block my view of the entire screen.
 I find it odd, it ll be tough for the user if he doesn't see the
 screen, for every entry he is forced to use back button to exit out of
 the keypad screen i think it makes him frustrate.

 But this prob doesn't come up when i use the tablet vertically. Only
 the lower end of the screen is hiden while using vertically. Can
 anyone suggest me a way to solve this problem.


 thank you in advance



 --

 --
 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

-- 
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

Re: [android-developers] Fail to install Apk on device

2011-06-28 Thread Shashidhar
What does the logcat say

On Tue, Jun 28, 2011 at 6:07 PM, Ankit Kasliwal kasliwalankit2...@gmail.com
 wrote:

 Hello Everyone please any one tell how i install apk file on my device.
 when i install apk file it should show me a message Application not
 install .

 please any one help me or how i install application directly on my device
 connecting with USB.

 Thanks in advance

 --

 Thanks and Regards,

 Ankit Kasliwal
 kasliwalankit2...@gmail.com
 +91-9300-940-136

 --
 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

-- 
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

Re: [android-developers] BT transfer data issue

2011-06-22 Thread Shashidhar
Every time you read the data that you want call flush.
In your example on client side after reading abcdefghijklmnop  call flush.
You can do this every time you are done with reading.


On Wed, Jun 22, 2011 at 1:09 PM, wu mark androidmark2...@gmail.com wrote:

 Dear :

  Thanks.

  Sorry, I'm a new learner for Android. Should I add this command in
 BTServer or BTClient?

 Best Regards,
 Mark

 2011/6/22 shailesh mistry shailesh.mistry@gmail.com

 use buffer.flush to clear last msg
 Regards,
 *Shailesh Mistry*
 +91 9974148507




 On Wed, Jun 22, 2011 at 10:53 AM, mark2011 androidmark2...@gmail.comwrote:

 Dear All :

I write a BTClient.java on a ViewPad  a BTServer.java on a ACER
 A500. I hope to tranfer data through the Bluetooth devices. When I
 input some data on Viewpad, the same data will be displayed on A500.

 My problem is that A500 will display the old buffer + replaced data.
 For example:

 BTClient input  BTServer
 display
 1.  abcdefghijklmnop  abcdefghijklmnop
 2.  12345
 12345fghijklmnop

 How do I to clear the output buffer before it display the new-coming
 data?

 Thanks.

 Best Regards,
 Mark

 --
 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


 --
 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


  --
 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


-- 
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] opening a url in browser with post data from an activity

2011-06-13 Thread Shashidhar
Hi,
 I need to open a browser with a URL when I click on a button in my
activity.
The URL has some parameters which I need to send it using HTTP POST method.
I am able to get it working with the GET request where we append the
parameters to the end of the URL.
But, I need the POST method way.
Any Ideas on how to send the URL data using POST method to open it in
browser.

Thanks,
Shashidhar

-- 
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

Re: [android-developers] opening a url in browser with post data from an activity

2011-06-13 Thread Shashidhar
On Mon, Jun 13, 2011 at 6:32 PM, Kumar Bibek coomar@gmail.com wrote:

 AFAIK, you cant do it.


I have tried the below code.

WebView webview = new WebView(this);
setContentView(webview);
byte[] post = EncodingUtils.getBytes(un=us...@gmail.com,
BASE64);
webview.postUrl(http://www.example.com/;, post);

But it doesn't work.

Thanks,
Shashi



 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*



 On Mon, Jun 13, 2011 at 5:11 PM, Shashidhar shashi.zep...@gmail.comwrote:

 Hi,
  I need to open a browser with a URL when I click on a button in my
 activity.
 The URL has some parameters which I need to send it using HTTP POST
 method.
 I am able to get it working with the GET request where we append the
 parameters to the end of the URL.
 But, I need the POST method way.
 Any Ideas on how to send the URL data using POST method to open it in
 browser.

 Thanks,
 Shashidhar

 --
 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


  --
 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

-- 
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

Re: [android-developers] How can I know when the home button has been pressed?

2011-06-08 Thread Shashidhar
Follow this:
http://stackoverflow.com/questions/2261914/catch-keypress-with-android

On Wed, Jun 8, 2011 at 12:04 PM, Droid rod...@gmail.com wrote:

 I have a thread that needs specifically to be cancelled when the home
 button is pressed.
 But, nothing reliable gives me that information. (I have over 10
 activities all in the stack)

 --
 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

-- 
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

Re: [android-developers] center buttons

2011-06-01 Thread Shashidhar
see the text in red color below.

On Wed, Jun 1, 2011 at 3:20 PM, Knutsford Software 
i...@knutsford-software.co.uk wrote:

 I have this layout


 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
   android:orientation=vertical
   android:layout_width=fill_parent
   android:layout_height=fill_parent


TextView
   android:layout_width=fill_parent
   android:layout_height=wrap_content
   android:text=Please enter your login details
   android:typeface=sans
   /
   TextView
   android:layout_width=fill_parent
   android:layout_height=wrap_content
   android:typeface=sans
   android:text=Login:
   /
   EditText
   android:id=@+id/username
   android:typeface=sans
   android:singleLine=true
   android:layout_width=fill_parent
   android:layout_height=wrap_content
   android:hint=username
   /
   TextView
   android:layout_width=fill_parent
   android:typeface=sans
   android:layout_height=wrap_content
   android:text=Password:
   /
   EditText
   android:id=@+id/password
   android:typeface=sans
   android:password=true
   android:singleLine=true
   android:layout_width=fill_parent
   android:layout_height=wrap_content
   android:hint=password
   /
   LinearLayout xmlns:android=
 http://schemas.android.com/apk/res/android;
   android:orientation=horizontal
   android:layout_width=fill_parent
   android:layout_height=fill_parent

 *android:gravity=center_horizontal*

   
   Button
   android:id=@+id/login_button
   android:typeface=sans
   android:text=Login
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:hint=Login
   android:layout_centerHorizontal=true
   /
   Button
   android:id=@+id/cancel_button
   android:typeface=sans
   android:text=Cancel
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:hint=Cancel
   android:layout_centerHorizontal=true
   /
   /LinearLayout
   TextView
   android:id=@+id/result
   android:typeface=sans
  android:layout_width=fill_parent
  android:layout_height=wrap_content
   /
 /LinearLayout




 How do I get the two buttons to horizontally centre


 Thanks



 --
 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

-- 
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

Re: [android-developers] change the image of the individual row

2011-06-01 Thread Shashidhar
On Tue, May 31, 2011 at 5:46 PM, Amritesh amriteshmad...@gmail.com wrote:

 I am developing an application which will contain the lists of songs
 every row has play image .On click of this image it should change to a
 green one (like on and off), but if there is another image in
 different row is on it should get off.

 I am able to find the current position and the previous position of
 the row whose image is on but based on the position of the row i am
 not able to get the corresponding imageview  .
 I am trying with the setTag() and getTag() method but  get tag method
 is returning null for me.

 Any help would be appreciated.Please bail me out of this.
 below is my code


 package com.fstech.cslist;

 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;




 import android.app.Activity;
 import android.content.Context;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.View.OnClickListener;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
 import android.widget.ToggleButton;

 public class CustomList extends Activity {
ArrayListString pname;
ListView projectList;
private LayoutInflater mInflater;
 private boolean[] itemToggled;
 int Position;
 ImageView play;
 int size;
 int previousposn=0;
int currentposn=0;
int cPosition;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
projectList = (ListView) findViewById(R.id.projectlist);
pname = new ArrayListString();
pname.add(first);
pname.add(fssecond);
pname.add(third);
pname.add(fourth);
pname.add(fifthe);
pname.add(sixth);
mInflater = (LayoutInflater)
 getSystemService(Context.LAYOUT_INFLATER_SERVICE);
size  = pname.size();
itemToggled = new boolean[pname.size()];
Arrays.fill(itemToggled, false);
projectList.setAdapter(new ArrayAdapterString(this,
 R.layout.list_item,pname){
ArrayListString ar =new ArrayListString();

@Override
public View getView(int position, View convertView,
 ViewGroup
 parent) {
 Position=position;
View row;

if (null == convertView) {
row =
 mInflater.inflate(R.layout.list_item, null);
} else {
row = convertView;
}
TextView tv = (TextView)
 row.findViewById(android.R.id.text1);
tv.setText(getItem(position));

  play=(ImageView)row.findViewById(R.id.roundplay);

  play.setBackgroundResource(R.drawable.roundplay);
ImageView icon = (ImageView)
 row.findViewById(R.id.icon);
icon.setImageResource(R.drawable.roundplay);
play.setTag(String.valueOf(position));
play.setOnClickListener(new
 OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated
 method stub


 cPosition=Integer.parseInt(v.getTag().toString());
 previousposn=currentposn;

  currentposn=cPosition;

View view
 =v.findViewWithTag(v.getTag(Position));
//(View)
 play.getTag(1);

if(view!=null)
System.out.println(Tag is
 not returning object);
else

  System.out.println(Tag is not returning object);
}


});




return row;
}

});

projectList.setOnItemClickListener(new
 AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView? listView, View
 itemView, int position, long id) {
itemToggled[position] = ! itemToggled[position];
}
});

}
 }


The itemView you are getting here corresponds to the whole row's
view(row.xml) i.e, Relativelayout in your case. So, get the imageview you
that you want calling 

Re: [android-developers] Generating .jar from Android service project

2011-06-01 Thread Shashidhar
Every service that you use in your application should have an entry in the
androidmanifest file.

Your service is no exception...

On Tue, May 31, 2011 at 6:57 PM, DanielSchH dan...@schmitz-huebsch.netwrote:

 Hello,

 I have a Android Project which implements a android-service. Now I
 want to share this, without publishing the code.
 I have tried to generate a .jar and added it to another android
 project, but then I get a FileNotFoundException: AndroidManifest.xml

 Maybe because the service-project contains a Manifest.

 Hase somebody an idea how to solve it?

 --
 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

-- 
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

Re: [android-developers] Bluetooth: Server vs Client

2011-05-26 Thread Shashidhar
On Thu, May 26, 2011 at 9:38 AM, JR jayarr.patri...@gmail.com wrote:

 Hello I am new in android application development. I have red the
 BluetoothChat sample code and having a hard time understanding the
 server-client side.

 My question is: If I set the device (say dev1) be the server and the
 other device (dev2) be the client, can I expect a mutual communication
 between the two device? meaning to say that client side and server
 side can send data and reply to each other?


Yes, You can have 2 way communication. Both server and client can send and
receive to each other.


 Server-Client can be
 automatically Client-Server also?


No, AFAIK.


 Sorry I have no clear idea what is
 server-client really is.

 Thanks
 JR

 --
 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

-- 
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] Resource not found exception when my activity goes to background

2011-05-25 Thread Shashidhar
Hi,
 I have an application in which I refresh the GUI ( set some images in my
layout ) for every one second.
Its all working well when the activity is in foreground. But when it goes to
background ( ex. when I press home button) it starts throwing exception
saying Resource not found when try to get the image to apply on UI. Can
any one tell me why is this happening and how to take care of this scenario.

Please find the log from my eclipse below.

05-25 14:22:50.075: WARN/ResourceType(1339): Failure getting entry for
0x7f020061 (t=1 e=97) in package 0 (error -75)
05-25 14:22:50.075: WARN/System.err(1339):
android.content.res.Resources$NotFoundException: Resource ID #0x7f020061
05-25 14:22:50.075: WARN/System.err(1339): at
android.content.res.Resources.getValue(Resources.java:892)
05-25 14:22:50.075: WARN/System.err(1339): at
android.content.res.Resources.getDrawable(Resources.java:580)
05-25 14:22:50.075: WARN/System.err(1339): at
android.view.View.setBackgroundResource(View.java:7533)
05-25 14:22:50.085: WARN/System.err(1339): at
android.sample.MyActivity.setImgAndPerc(MyActivity.java:2879)


Thanks,
Shashidhar

-- 
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] Problem with resources while drawing

2011-03-07 Thread Shashidhar
Hi,
 I am drawing some images on the canvas with a delay of 1sec continuously. I
am getting the following exception when my app comes from background to
foreground.
Can any one tell me what this exception is?? Also, some times when my apps
goes to background, it gives exception saying it could not find the image
resource.


03-07 15:03:21.082: ERROR/qsd8k.gralloc(97): /dev/pmem: no more pmem
available
03-07 15:03:21.082: ERROR/qsd8k.gralloc(97): couldn't open pmem (Try again)
03-07 15:03:21.082: ERROR/qsd8k.gralloc(97): gralloc failed err=Out of
memory
03-07 15:03:21.082: WARN/GraphicBufferAllocator(97): alloc(800, 718, 1,
0133, ...) failed -12 (Out of memory)
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97): Allocated buffers:
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x33a7b8:  539.75
KiB |  519 ( 544) x  254 |1 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x388318: 1346.25
KiB |  480 ( 480) x  718 |1 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x3d0e48: 1428.75
KiB |  480 ( 480) x  762 |1 | 0x0303
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x42f5b0: 1500.00
KiB |  480 ( 480) x  800 |2 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x451a70: 1500.00
KiB |  480 ( 480) x  800 |2 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x456a48:  750.00
KiB |  480 ( 480) x  800 |4 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4591e0: 1500.00
KiB |  480 ( 480) x  800 |2 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x472a28:  539.75
KiB |  519 ( 544) x  254 |1 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x47bc60: 1500.00
KiB |  480 ( 480) x  800 |2 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4b7ac8:   60.00
KiB |  102 ( 128) x  120 |1 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4c1990: 1428.75
KiB |  480 ( 480) x  762 |1 | 0x0303
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4cb548: 1500.00
KiB |  480 ( 480) x  800 |1 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4d4230: 1500.00
KiB |  480 ( 480) x  800 |2 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4d9900:  539.75
KiB |  519 ( 544) x  254 |1 | 0x0133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4dc0a0:  204.25
KiB |  603 ( 608)
03-07 15:03:21.082: ERROR/SurfaceFlinger(97):
Layer::requestBuffer(this=0x491a10), index=0, w=800, h=718 failed (Out of
memory)
03-07 15:03:21.082: ERROR/Surface(264): Surface (identity=4)
requestBuffer(0, 0, 0, 0, 0033) returned a buffer with a null handle
03-07 15:03:21.082: ERROR/Surface(264): getBufferLocked(0, 0, 0, 0,
0033) failed (Out of memory)
03-07 15:03:21.082: ERROR/Surface(264): dequeueBuffer failed (Out of memory)
03-07 15:03:21.092:
INFO/zephyr.android.mhealth.ftiab.gui.ZephyrOmniSense(10622): onStart
03-07 15:03:21.092:
INFO/zephyr.android.mhealth.ftiab.gui.ZephyrOmniSense(10622): onResume
03-07 15:03:21.102: ERROR/ViewRoot(264): OutOfResourcesException locking
surface
03-07 15:03:21.102: ERROR/ViewRoot(264):
android.view.Surface$OutOfResourcesException
03-07 15:03:21.102: ERROR/ViewRoot(264): at
android.view.Surface.lockCanvasNative(Native Method)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
android.view.Surface.lockCanvas(Surface.java:314)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
android.view.ViewRoot.draw(ViewRoot.java:1456)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
android.view.ViewRoot.performTraversals(ViewRoot.java:1258)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
android.os.Handler.dispatchMessage(Handler.java:99)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
android.os.Looper.loop(Looper.java:123)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
android.app.ActivityThread.main(ActivityThread.java:3683)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
java.lang.reflect.Method.invokeNative(Native Method)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
java.lang.reflect.Method.invoke(Method.java:507)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-07 15:03:21.102: ERROR/ViewRoot(264): at
dalvik.system.NativeStart.main(Native Method)



Thanks,
Shashidhar

-- 
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

[android-developers] how to show a progressbar in a canvas

2011-02-28 Thread Shashidhar
Hi,
 I want to show a progress bar on my custom view canvas. I tried the
following in onDraw() method of my custom view.

ProgressBar pb = new
ProgressBar(getContext());
pb.setIndeterminate(true);
pb.draw(canvas);
pb.invalidate();

But, its not showing any progress bar on the canvas.

Any help on this is appreciated.


Thanks,
Shashidhar

-- 
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: how to show a progressbar in a canvas

2011-02-28 Thread Shashidhar
To add to the above question, I have seen some progress bar examples in API
demos. but they are using xml to represent the progress bar.
Is there a way to access the xml specified progress bar to show on canvas??

On Tue, Mar 1, 2011 at 12:28 PM, Shashidhar shashi.zep...@gmail.com wrote:

 Hi,
  I want to show a progress bar on my custom view canvas. I tried the
 following in onDraw() method of my custom view.

 ProgressBar pb = new
 ProgressBar(getContext());
  pb.setIndeterminate(true);
 pb.draw(canvas);
 pb.invalidate();

 But, its not showing any progress bar on the canvas.

 Any help on this is appreciated.


 Thanks,
 Shashidhar


-- 
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

Re: [android-developers] Layout problem on Galaxy tab emulator

2011-01-10 Thread Shashidhar
Any Success on this.
I am also having the same issue.

Thanks,
Shashidhar

On Mon, Dec 20, 2010 at 1:21 PM, Bape peete...@gmail.com wrote:

 I want to develop a application on Samsung Galaxy.
 The resolution is 1024 * 600
 My mainlayout should look like this:

 http://office.techniconsulting.be/~peeters/eclipse_screenshot.jpg

 I've a left image (296 *600) and right image (728 * 600) as
 background.
 mail.xml looks like:

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=horizontal android:layout_height=600px
 android:layout_width=1024px

  LinearLayout android:id=@+id/LinearLayout01
 android:background=@drawable/frame_left android:gravity=left
 android:layout_width=296px android:layout_height=600px/
 LinearLayout
 RelativeLayout android:id=@+id/RelativeLayout01
 android:gravity=right android:background=@drawable/
 frame_right_kelder android:layout_width=728px
 android:layout_height=600px/RelativeLayout
 /LinearLayout


 Whwen I run it in the simulator it looks like:

 http://office.techniconsulting.be/~peeters/emulator_screenshot.jpg

 Is it not possible to work with pixel height en width in the emulator?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] Layout problem on Galaxy tab emulator

2011-01-10 Thread Shashidhar
@Kostya: Thanks a lot. I Was struggling all the day for this.

On Mon, Jan 10, 2011 at 5:43 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  This has been resolved.

 Set minSdk to 4 or above:

 http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

 -- Kostya

 10.01.2011 15:02, Shashidhar пишет:

 Any Success on this.
 I am also having the same issue.

  Thanks,
 Shashidhar

 On Mon, Dec 20, 2010 at 1:21 PM, Bape peete...@gmail.com wrote:

 I want to develop a application on Samsung Galaxy.
 The resolution is 1024 * 600
 My mainlayout should look like this:

 http://office.techniconsulting.be/~peeters/eclipse_screenshot.jpghttp://office.techniconsulting.be/%7Epeeters/eclipse_screenshot.jpg

 I've a left image (296 *600) and right image (728 * 600) as
 background.
 mail.xml looks like:

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=horizontal android:layout_height=600px
 android:layout_width=1024px

  LinearLayout android:id=@+id/LinearLayout01
 android:background=@drawable/frame_left android:gravity=left
 android:layout_width=296px android:layout_height=600px/
 LinearLayout
 RelativeLayout android:id=@+id/RelativeLayout01
 android:gravity=right android:background=@drawable/
 frame_right_kelder android:layout_width=728px
 android:layout_height=600px/RelativeLayout
 /LinearLayout


 Whwen I run it in the simulator it looks like:

 http://office.techniconsulting.be/~peeters/emulator_screenshot.jpghttp://office.techniconsulting.be/%7Epeeters/emulator_screenshot.jpg

 Is it not possible to work with pixel height en width in the emulator?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 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



 --
 Kostya Vasilyev -- WiFi Manager + pretty widget -- 
 http://kmansoft.wordpress.com

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Drawing circle in MapView

2010-10-29 Thread Shashidhar
I think you are missing a call to invalidate() on map view after adding the
overlay.

-Shashi

On Fri, Oct 29, 2010 at 12:26 PM, Hendrik Greving fourhend...@gmail.comwrote:

 Trying to draw a circle at a longitude/latitude position. The circle below
 doesn't show up, does anybody know why?

 latitude, longitude is known here

 ListOverlay mapOverlays = mapView.getOverlays();
 ColorDrawable myCircle = new ColorDrawable();
 mCirc = new Canvas();
 mPaint = new Paint();
 mPaint.setStyle(Paint.Style.FILL);
 mPaint.setColor(0xee44);

 GeoPoint gp = new GeoPoint(latitude, longitude);
 MapController mc = mapView.getController();
 mc.setZoom(18);
 if (mc != null) {
 mc.animateTo(gp);
 }

 // mapView is the current mapView from MapViewActivity
 Projection proj = mapView.getProjection();
 Point mp = proj.toPixels(gp, null);

 mCirc.drawCircle(mp.x, mp.y, 50, mPaint);
 //myCircle.setBounds(mp.x-100, mp.y-100, mp.x+100, mp.y+100); // do I need
 this???
 myCircle.draw(mCirc);

 // MyItemizedOverlay is defined in the project
 MyItemizedOverlay itemizedoverlay = new MyItemizedOverlay(myCircle);
 OverlayItem overlayitem = new OverlayItem(gp, title, );
 itemizedoverlay.addOverlay(overlayitem);
 mapOverlays.add(itemizedoverlay);


 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] Destroy Android Thread

2010-09-25 Thread Shashidhar
While cancelling the dialog for the first time, you must be using the
cancel() method. It just cancel's the dialog and does not do any
initialization of the progress bar again when you show the same dialog
again, thats why next time also it showing with 100% progress. There are 2
solutions for this.

1) override  onPrepareDialog(int,
Dialog)http://developer.android.com/reference/android/app/Activity.html#onPrepareDialog(int,
android.app.Dialog) method. This is called every time a dialog is shown.
You can clear the sate of the dialog in this. Where as onCreateDialog() is
called only for the first time when you first create the dialog.

2) Instead of cancelling the dialog, call dismiss(). This will remove the
dialog and when you want to show the dialog again, create a new one and
show. This is a bit expensive as you are creating a new dialog each time.

Thanks,
Shashidhar


On Sat, Sep 25, 2010 at 10:52 AM, TreKing treking...@gmail.com wrote:

 On Fri, Sep 24, 2010 at 11:48 PM, Hudar hudars...@gmail.com wrote:

 But after finished, when I click on the button again, it should analyze
 again, but what happen was it show progress dialog already at 100% and stuck
 there, instead of reanalyze and start progress dialog  at 0%.


 Sounds like you're simply not resetting the progress value on the dialog.
 Hard to say for sure though without more information.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices


  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Re: How to calculate distance between to city (dynamically)

2010-09-17 Thread Shashidhar
Doesn't the method of Location class implement the same formula???

On Fri, Sep 17, 2010 at 11:21 AM, Rocky rkjhaw1...@gmail.com wrote:

 thanks man


 On Fri, Sep 17, 2010 at 11:12 AM, Maps.Huge.Info (Maps API Guru) 
 cor...@gmail.com wrote:

 The Haversine formula computes distance between two points along a
 spheroid (such as Earth). You will need to know the coordinates of
 each city to use this formula. Coordinates for nearly all cities in
 the world can be downloaded from the geonames.org website for free.
 The Google geocoder will also return those coordinates but you'll have
 to obey the terms in order for you to use that service. For the exact
 formula, try searching Google.

 -John Coryat

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Thanks  Regards

 Rakesh Kumar Jha
 Software Developer
 Symphony Services Corp (India) Pvt Ltd
 Bangalore
 (O) +918030273740
 (R) +919886336619

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] How to calculate distance between to city (dynamically)

2010-09-16 Thread Shashidhar
Have a look at this
http://developer.android.com/reference/android/location/Location.html#distanceBetween%28double,%20double,%20double,%20double,%20float[]%29

http://developer.android.com/reference/android/location/Location.html#distanceBetween%28double,%20double,%20double,%20double,%20float[]%29
-Shashidhar

On Thu, Sep 16, 2010 at 12:45 PM, RKJ (Android developer) 
rkjhaw1...@gmail.com wrote:

 Hi All,

 I want to calculate the distance between 2 city, whatever user
 mention.

 Example -
 Default City - 1st City - New York or New Delhi, London Seoul anything
 User Put - 2nd City - California

 Need - to calculate distance between California to New York  or London

 Welcome any hints
 --RKJ

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] moving text effect in spinner

2010-09-15 Thread Shashidhar
Hi,
  I am showing a list of urls in my spinner adapter and since the URL length
is more than the width of the spinner, it is not able to show the whole URL
text. Can we get some text moving effect for the spinner selected item so
that user can read the whole selected URL when it is moving.

One more question, when we click on spinner it shows the selection list in a
popup, since the URL is larger than the text it can display, only some part
of the URL is shown. how can we deal with it. Is there a way to apply the
same text moving effect to the list items.


Thanks,
Shashidhar

-- 
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

Re: [android-developers] Can we customize spinner dialog

2010-09-15 Thread Shashidhar
Yes, You can do it. While setting the dropdownviewresource for the adapter
of your spinner, define your own xml layout instead of the android's inbuilt
resource xml. Your xml can simply have a textview with your required layout
parameters.

-Shashidhar

On Thu, Sep 16, 2010 at 9:55 AM, Karteek N kartee...@gmail.com wrote:

 When we select spinner it shows a display of  items which almost the device
 screen size

 Can we minimize its width or height, I think this question was already
 posted by some one. But i am unable to find solution

 Thanks,
 Karteek

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] Problem with icons of Menu items

2010-09-07 Thread Shashidhar
Hi,
  I have a problem with showing icons for menu items. The items which appear
when I click on menu button are having icons but When I click on More
option in Menu, The newly shown menu items are not having any icons even
though I have set the icons for these items in my xml.

Thanks,
Shashidhar

-- 
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

Re: [android-developers] How to use 'SQLiteStatement' to insert a item ( with multiple columns)

2010-09-07 Thread Shashidhar
On Mon, Sep 6, 2010 at 8:19 PM, xi developer xidevelope...@gmail.comwrote:

 I am new in Android development, I got a simple question to ask,
 I know the way how to implement item insert to DB table when there is
 only one id column and one name column in the table, which is:

 CREATE TABLE  myTable (id INTEGER PRIMARY KEY, name TEXT)
 String INSERT = insert into myTable  (name) values(?);
 SQLiteStatement insertStmt = db.compileStatement(INSERT);
 insertStmt.bindString(1, name);
 Id = insertStmt.executeInsert();


 But how about there are multiple columns (more than 2 columns) in the
 table, how to implement the insert function?? For example  I have a
 TABLE (myTable) has the following columns:

 CREATE TABLE  myTable (id INTEGER PRIMARY KEY, date TEXT, time TEXT,
 cost DOUBLE)''


You can follow the same procedure.

Strubg INSERT = insert into myTable(date, time, cost) values (?,?,?);
SQLiteStatement insertStmt = db.compileStatement(INSERT);

then use the corresponding bind statements.


 Now, I want to use SQLiteStatement to insert a item to this table, how
 to do that?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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 repeatedly draw on a canvas

2010-09-06 Thread Shashidhar
Hi,
  My requirement is to draw a line on canvas for every second. I am able to
draw the line but its clearing the previously drawn lines when I call
myview.invalidate(). Now my question is how to draw a new line retaining all
the previously drawn line on the same canvas.

Thanks,
Shashidhar

-- 
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

Re: [android-developers] How to repeatedly draw on a canvas

2010-09-06 Thread Shashidhar
@Frank: Thanks and could you please elaborate what is a display list

On Tue, Sep 7, 2010 at 9:42 AM, Frank Weiss fewe...@gmail.com wrote:

 I suppose you need to use a display list.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] EditText field not update, how to do this?

2010-09-01 Thread Shashidhar
Can you please post the code here..

On Wed, Sep 1, 2010 at 3:42 PM, Mystique joven.ch...@gmail.com wrote:

 Hi,

 I have an EditText field and a button.
 My aim is to let user enter text info to the EditText or click the
 button to launch a dialog to select some checkbox and radio button
 which it will perform some computation and return a value to display
 at the EditText field.

 I can't seems to get the value to display at the EditText field after
 the dialog dismiss. I did try a toast to display the value and it is
 ok.
 I *think* the view was not refresh to display the text in the EditText
 field.

 Can anyone tell me roughly how to do this?

 Cheers.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] Re: Problem with spinner in a list view

2010-09-01 Thread Shashidhar
Thanks for the replies. I have fixed this one.

Previously while returning the view from getview() method it was checking
for convertview to null or not, if its null then only I was creating a new
view.
But I have removed the null checking login now and always returning a new
view. This sovled my problem.

Thanks,
Shashidhar

On Tue, Aug 31, 2010 at 1:12 AM, Kumar Bibek coomar@gmail.com wrote:

 Can you post some code as to what you are doing?

 That's interesting I would say, A spinner in a List View, :) I would
 suggest not to do that, but still if you have to, well, let's fix it.

 -Kumar Bibek
 http://techdroid.kbeanie.com

 On Aug 30, 6:42 pm, Shashidhar shashi.zep...@gmail.com wrote:
  Hi,
I am using a custom list adapter with a spinner in each item.
  There is a strange problem with the value the spinner shows.
  For some of the items the spinner always shows the first value in the
  adapter set to the spinner but when I touch on spinner, on the pop up
  selection list it shows the actual value which I have set before. I mean
 the
  value shown in the spinner and the selected item that is shown in pop
 list
  of the spinner are some times different.
 
  Please help me and tell me why this happens.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Re: Problem with spinner in a list view

2010-09-01 Thread Shashidhar
Yeah agreed, but I have no other quick option.

On Wed, Sep 1, 2010 at 4:20 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Wed, Sep 1, 2010 at 6:47 AM, Shashidhar shashi.zep...@gmail.com
 wrote:
  Thanks for the replies. I have fixed this one.
  Previously while returning the view from getview() method it was checking
  for convertview to null or not, if its null then only I was creating a
 new
  view.
  But I have removed the null checking login now and always returning a new
  view. This sovled my problem.

 It also created new problems, such as increased memory usage.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Android Development Wiki: http://wiki.andmob.org

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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] softKeyboard's next button not taking focus to the next edit text

2010-09-01 Thread Shashidhar
 void onClick(DialogInterface dialog, int whichButton) {
InputMethodManager imm =
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(input1.getWindowToken(), 0);
}
});

alert.show();
}

});
}
}



Thanks,
Shashidhar
*

-- 
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: softKeyboard's next button not taking focus to the next edit text

2010-09-01 Thread Shashidhar
Figured it out. I thought android will automatically create id's for
dynamically created UI elements. Thats why I put

*
input1.setNextFocusDownId(input2.getId());

Here I was not assigning any id explicitly for input2.

If I set explicitly some id to input2 and the set the next focus down id,
it worked.
*



On Wed, Sep 1, 2010 at 4:31 PM, Shashidhar shashi.zep...@gmail.com wrote:

 Hi,
   In My code I have an alter window in which I take a mac address as input.
 For this I have created 6 Edit texts to accept mac address. Now my problem
 is When I am in first edit text and click on next button in soft
 keyboard it does not take the focus to the next available edittext. I have
 set the next focus down id for Each of the Edit text to be its next Edit
 text. But still its not working. Please Help me.

 I am posting the code here.
 _
 *main.xml*
 *__*
 *
 *
 *
 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
 android:orientation=vertical
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 
 TextView
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=@string/hello
 /
 Button android:id=@+id/button
  android:layout_width =wrap_content
  android:layout_height=wrap_content
  android:text=Click Me
 /
 /LinearLayout



 __

 Activity File
 ___

 public class Test extends Activity {
 /** Called when the activity is first created. */
  private Button b;
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 b = (Button) findViewById(R.id.button);
 b.setOnClickListener(new OnClickListener(){

 public void onClick(View v) {

 AlertDialog.Builder alert = new AlertDialog.Builder(v.getContext());

 alert.setTitle(Dialog);
  alert.setMessage(Enter MAC);

 // Set an EditText view to get user input
  final EditText input1 = new EditText(v.getContext());
  final EditText input2 = new EditText(v.getContext());
  final EditText input3 = new EditText(v.getContext());
  final EditText input4 = new EditText(v.getContext());
  final EditText input5 = new EditText(v.getContext());
  final EditText input6 = new EditText(v.getContext());
  input1.setNextFocusDownId(input2.getId());
  input2.setNextFocusDownId(input3.getId());
  input3.setNextFocusDownId(input4.getId());
  input4.setNextFocusDownId(input5.getId());
  input5.setNextFocusDownId(input6.getId());
  input1.setImeOptions(5);
  input2.setImeOptions(5);
  input3.setImeOptions(5);
  input4.setImeOptions(5);
  input5.setImeOptions(5);
  input6.setImeOptions(6);

  final TextView tv1 = new TextView(v.getContext());
  tv1.setText(:);
  tv1.setTextSize(15);
  final TextView tv2 = new TextView(v.getContext());
  tv2.setText(:);
  final TextView tv3 = new TextView(v.getContext());
  tv3.setText(:);
  final TextView tv4 = new TextView(v.getContext());
  tv4.setText(:);
  final TextView tv5 = new TextView(v.getContext());
  tv5.setText(:);
  final TextView tv6 = new TextView(v.getContext());
  final TextView emptytv = new TextView(v.getContext());
  emptytv.setText(  );
  emptytv.setWidth(2);

 InputFilter[] FilterArray = new InputFilter[1];
  FilterArray[0] = new InputFilter.LengthFilter(2);
  input1.setFilters(FilterArray);
  input2.setFilters(FilterArray);
  input3.setFilters(FilterArray);
  input4.setFilters(FilterArray);
  input5.setFilters(FilterArray);
  input6.setFilters(FilterArray);

 int width = 40;
  input1.setWidth(width);
  input2.setWidth(width);
  input3.setWidth(width);
  input4.setWidth(width);
  input5.setWidth(width);
  input6.setWidth(width);

 input1.setSingleLine(true);
  input1.setSingleLine(true);
  input2.setSingleLine(true);
  input3.setSingleLine(true);
  input4.setSingleLine(true);
  input5.setSingleLine(true);
  input6.setSingleLine(true);

 int inputTextSize = 15;
  input1.setTextSize(inputTextSize);
  input2.setTextSize(inputTextSize);
  input3.setTextSize(inputTextSize);
  input4.setTextSize(inputTextSize);
  input5.setTextSize(inputTextSize);
  input6.setTextSize(inputTextSize);

 final LinearLayout ll = new LinearLayout(v.getContext());
  ll.addView(emptytv);
  ll.addView(input1);
  ll.addView(tv1);
  ll.addView(input2);
  ll.addView(tv2);
  ll.addView(input3);
  ll.addView(tv3);
  ll.addView(input4);
  ll.addView(tv4);
  ll.addView(input5);
  ll.addView(tv5);
  ll.addView(input6);
  ll.addView(tv6);


 alert.setView(ll);

 alert.setPositiveButton(Save, new DialogInterface.OnClickListener() {
  public void onClick(DialogInterface dialog, int whichButton) {
  InputMethodManager imm =
 (InputMethodManager

[android-developers] Memory problem with UI elements

2010-09-01 Thread Shashidhar
Hi,
  In my application I change layouts very frequently with most of the user
interactions. Each time when a new layout is drawn, the applications memory
size is increasing. I can see this in DDMS.
This is absolutely fine. I have analyzed my application with memory analyze
tool and it shows that there around 42 Table layouts at some point of time
and this number increase as user does more interactions with the app. Now my
question is why doesn't the GC collect the stale layout objects. Does
GC collect on UI widgets also??? I feel it does but can any one tell me what
may be the reason for GC not collecting my UI elements.

Thanks,
Shashidhar

-- 
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

Re: [android-developers] Memory problem with UI elements

2010-09-01 Thread Shashidhar
On Wed, Sep 1, 2010 at 7:25 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Wed, Sep 1, 2010 at 9:48 AM, Shashidhar shashi.zep...@gmail.com
 wrote:
In my application I change layouts very frequently with most of the
 user
  interactions.

 Do you mean you call setContentView() repeatedly? Or how do you
 change layouts?


Yes, I cal setContentView() repeatedly.



  Now my
  question is why doesn't the GC collect the stale layout objects.

 Because something is holding onto them. If you cannot identify what is
 holding onto them, you can use DDMS to dump an HPROF file of the
 objects in your process' heap. There are several tools to help you
 examine that HPROF file:

 http://stackoverflow.com/questions/185893/how-do-i-analyze-a-hprof-file

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Android App Developer Books: http://commonsware.com/books

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] Problem with spinner in a list view

2010-08-30 Thread Shashidhar
Hi,
  I am using a custom list adapter with a spinner in each item.
There is a strange problem with the value the spinner shows.
For some of the items the spinner always shows the first value in the
adapter set to the spinner but when I touch on spinner, on the pop up
selection list it shows the actual value which I have set before. I mean the
value shown in the spinner and the selected item that is shown in pop list
of the spinner are some times different.

Please help me and tell me why this happens.

-- 
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

Re: [android-developers] How to email the screen

2010-08-25 Thread Shashidhar
You can take a snapshot of your mobile screen using DDMS and attach it here.

On Thu, Aug 26, 2010 at 12:11 AM, ArcDroid jacobrjohn...@gmail.com wrote:

 Hello,
 I am trying to email whats it on the screen.  I am able to email text,
 but don't know what to call for the screen to be sent as an
 attachment.


Intent emailIntent = new
 Intent(android.content.Intent.ACTION_SEND);

String[] recipients = new String[]{};

emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,
 recipients);

emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
 Hello World);

emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,
 This is email's message);

   // need help here to attach what is currently on the
 screen

emailIntent.setType(text/plain);

startActivity(Intent.createChooser(emailIntent, Send
 mail...));

finish();

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] Re: Scrolling in a ListView

2010-08-21 Thread Shashidhar
I have experienced the same error for my custom adapter.
The problem is that when you scroll down it tries to construct the view to
be shown on the list.
In my case I was assigning null values for one of the spinner which is part
of my list view item.

Check if there are any null values in your *game.getTeamNames()* method's
result.

Thanks,
Shashidhar

On Fri, Aug 20, 2010 at 11:21 PM, Sebastian Muehr 
sebastian.mu...@googlemail.com wrote:

 On 20 Aug., 19:17, TreKing treking...@gmail.com wrote:
  You probably need to provide more information, like what you adapter
 looks
  like, how you've implemented getView(), and what, exactly, you're doing
 when
  you get this error.

 This is all I implemented:

 setContentView(R.layout.new_career);
 ListView lv = (ListView) findViewById(R.id.listview_newCareer);
 lv.setTextFilterEnabled(true);
 lv.setAdapter(new ArrayAdapterString(getApplicationContext(),
 R.layout.item_team, game.getTeamNames()));

 new_career.xml:
 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent

ListView
android:id=@+id/listview_newCareer
android:layout_width=fill_parent
android:layout_height=wrap_content
/

 /LinearLayout

 item_team.xml:
 ?xml version=1.0 encoding=utf-8?
 TextView xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
 /

 All I do when getting this error is scrolling through the list.
 At about the half of the list I get the error.
 In the upper half I can scroll normally without any problems.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Re: make automatic login on application

2010-08-18 Thread Shashidhar
When the login is success full store the credentials in local sqlite
database.
Whenever your app starts it should check this local database first and if
there are already no credentials stored then redirect to login page else to
redirect it to your app's home screen.

Thanks,
Shashidhar

On Wed, Aug 18, 2010 at 11:12 AM, Sarwar Erfan erfanonl...@gmail.comwrote:

 Hi,
 You can use SharedPreferences as Frank mentioned.

 In client:
 When your first activity runs (or may be you can override Application
 and put it in the constructor):
 Check in SharedPreferences whether the registration information exists
 or not.
 If exists, then do not send request to server.
 If does not exist, then get name/email (may be through a activity?)
 and send request to your server.
 When response is got from server, save registration information in
 SharedPreferences


 In server:
 When a request is received, check in database whether the email is
 already registered or not.
 If not registered, then put the record in database.
 If registered, then do not put in database (uninstall-reinstall check)


 Finally, did you really mean if the user has registered with that
 cellphone ? What if the user wants to use the app with same email on
 different devices?
 If you really want to identify in device level (rather than email
 level), then you may want to send and also save in DB the ANDROID_ID
 of the device.

 http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID

 Regards
 Sarwar Erfan


 On Aug 18, 4:16 am, Frank Weiss fewe...@gmail.com wrote:
  I'd use SharedPreferences for that. You will also need to add a use
  case for the user uninstalling and then reinstalling the app. In that
  case, SharedPreferences would be empty, but your server DB would have
  a record of the prior registration.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Activity getting killed and automatically starting again on screen off button press

2010-08-16 Thread Shashidhar
Thanks for the reply. I found the problem. There is a bug in android which
is listed at

http://code.google.com/p/android/issues/detail?id=7479

http://code.google.com/p/android/issues/detail?id=7479As mentioned in the
above bug my activity's orientation is fixed to landscape and when the phone
gets unlocked it starts in the other mode hence a new activity is getting
created each time.


Thanks,
Shashidhar

On Fri, Aug 13, 2010 at 9:56 PM, TreKing treking...@gmail.com wrote:

 On Fri, Aug 13, 2010 at 1:56 AM, Shashidhar shashi.zep...@gmail.comwrote:

 Any specific reason for this ?


 Determine all the places where you start your activity.
 Are you somewhere possibly starting your activity in response to broadcast
 events or in onPause / onStop / onResume/ onStart?


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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] Activity getting killed and automatically starting again on screen off button press

2010-08-13 Thread Shashidhar
Hi,
  We are experiencing this strange problem. If I press screen off button
When my activity is running, its again starting a new activity. If I press
the screen off button again and unlock the phone, it again starts a new
activity. So in total there are 2 new activities getting created for one
screen off and on.  Any specific reason for this ? Please help me.


Thanks,
Shashidhar

-- 
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

Re: [android-developers] Activity getting killed and automatically starting again on screen off button press

2010-08-13 Thread Shashidhar
Thanks for the reply habib. But my programs is doing none of the 2 things
you have mentioned...

On Fri, Aug 13, 2010 at 1:30 PM, Farjad Habib habib.far...@gmail.comwrote:

 see if ur activity is persistent or is it getting modified by the phone
 state...

 On Fri, Aug 13, 2010 at 11:56 AM, Shashidhar shashi.zep...@gmail.comwrote:

 Hi,
   We are experiencing this strange problem. If I press screen off button
 When my activity is running, its again starting a new activity. If I press
 the screen off button again and unlock the phone, it again starts a new
 activity. So in total there are 2 new activities getting created for one
 screen off and on.  Any specific reason for this ? Please help me.


 Thanks,
 Shashidhar

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Farjad Habib
 Software Engineer and Developer
 BS(Hons) 2011
 LUMS

 +92-331-4944-354

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] listview....want to set different icon in each item in list.

2010-08-03 Thread Shashidhar
http://stackoverflow.com/questions/459729/how-to-display-list-of-images-in-listview-in-android


http://stackoverflow.com/questions/459729/how-to-display-list-of-images-in-listview-in-android
-Shashi

On Tue, Aug 3, 2010 at 1:25 PM, A N K ! T ankit.awasth...@gmail.com wrote:

 am trying to set 6 icon in 6 different items in list...but not getting how
 to do it.

 --

  A N K ! T..


  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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

Re: [android-developers] Re: Map is Empty, no matter what I do

2010-07-28 Thread shashidhar yamsani
Some time back I was having the same problem. My mistake was that I have
added both the


   1.

   uses-library android:name=com.google.android.maps /

   2.

   uses-permission android:name=android.permission.INTERNET /


as childs for application tag. But the first one Should go as a child for
application tag and the second one as child of manifest tag.

I don't know, if you did the same mistake. But check it once.


On Wed, Jul 28, 2010 at 8:03 PM, Oscar oscar...@gmail.com wrote:

 Can you see the maps with the normal google maps application, maybe
 proxies or permissions

 On Jul 26, 2:33 am, TheIrish theiris...@gmail.com wrote:
  Hello everyone,
  I'm trying to embed maps into my application.
  I followed the official guide,
  - Generated a fingerprint using my .android/debug.keystore and with
  that, a google api key.
  - Enabled the maps library in the manifest
  - Enabled internet and location permissions in the manifest
  - Added a MapView
  - Verified that Eclipse is pointing its keystore to debug.keystore
 
  Problem: the application launches correctly, I see the maps grid, but
  no apps is loaded in there.
  Any suggestion? Thanks in advance.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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] Shuttle component in Anroid ???

2010-06-25 Thread shashidhar yamsani
Hi,
  In my android application I need a shuttle widget ( picture of shuttle
widget http://technology.amis.nl/blog/wp-content/images/reorderColumns3.jpg
  ).
Can someone provide the code if you already have done it before??
If not suggest me the easiest way to implement it.
I have pasted the widget's pic. below.
[image: shuttle_widget.jpg]


Thanks
Shashidhar

-- 
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=enshuttle_widget.jpg

[android-developers] Shuttle component in Android ???

2010-06-25 Thread shashidhar
Hi,
  In my android application I need a shuttle widget ( picture of
shuttle widget is at 
http://technology.amis.nl/blog/wp-content/images/reorderColumns3.jpg
).
Can someone provide the code if you already have done it before??
If not suggest me the easiest way to implement it.

-- 
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