[android-developers] Any alternative of iphone's searchable list in Android?

2010-05-06 Thread SheikhAman
hi.
in iPhone, they have got an option of creating such a list which gives
them ability to jump to a particular character.
see the pic attached

http://www.phonemag.com/blog/wp-content/uploads/2008/03/iphone_search_icon.jpg


Do we have any such thing in Android?

i can setTextFilterEnabled(true) but that requires the keyboard to be
present, while perhaps there now way to implicitly show keyboard on
the device as we have in the emulator.

i have tried setFastScrollEnabled(true) it is good, but doesn't let
you jump to a particular character.

any suggestions?

-- 
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] About maintaining the state of the activity on orientation change

2010-05-06 Thread praveena ankitha
  Hi,
Using the folowing statements we can get the orientaion of a screen



  Display display = ((WindowManager) getSystemService(*
WINDOW_SERVICE*)).getDefaultDisplay();

* int* orientation = display.getOrientation();
  in this if orientation is equal to 0 then the screen is in portrait ,
   if orientation is equal to 1 then the screen is in  landscape .

  If These mail is used for you reply me.





On 5/6/10, ameya dandekar ameya...@gmail.com wrote:

 Hi
   I am new to androidi m currently working on landscape mode for
 android app in which i want to know
   how to maintain the state of the activity and views displayed on
 orientation change i.e from portrait mode to landscape mode ?

 Regards,
 Ameya

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

-- 
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 handle the Dpad event in headview/footview of listview?

2010-05-06 Thread Second Dancer
That is the right way and still the smart way, unless you don't use listview

On May 6, 2010 3:58 AM, Vincent Tsao caojunvinc...@gmail.com wrote:

i have add a footview in listview with this code:
  mListView.addFooterView(mFootView);

and also Register a callback to be invoked when this mFootView is clicked
with code below:

mFootView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
  // my code
}
 });

after this, when i press down dpad, there is no response, so i Register a
callback to be invoked when a key is pressed in this mFootView. with code
below:

  mHiddenFolders.setOnKeyListener(new OnKeyListener(){

@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
// my code
   Log.v(onKey, test);
return  true;
}

});

unfortunately, still nothing happened :(

After some attempt, i found this ugly way:

@Override
public void onItemClick(AdapterView? parent, View view, int position,
long id) {
// TODO Auto-generated method stub

if (id == -1) {
if (position == 0) {
   * // when click a header view*
} else {
   *// when click a footer view*
}
} else {
   * // when click other normal row*
}
}

finally, it works, but i'm wondering if there is a smart way to do this?


 --
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: TelephonyManager.getLine1Number() returning null?

2010-05-06 Thread Second Dancer
You can get an reflection call on the internal Api

On May 6, 2010 5:48 AM, Vinay S s.vinay@gmail.com wrote:

Hi,

Are you sure, you are getting the context correctly..?
Are you able to get other deatils, like Network type phone type, sim
status etc?

-Vinay


On May 5, 9:32 pm, David Given d...@cowlark.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Has...
  I think you are trying to useTelephonyManager.getLine1Number();

  Instead create an object of theTelephonyManagerand then call the

  getLine1Number();

 We're already doing that --- here's the code:

TelephonyManagertm = (TelephonyManager)

 _context.getSystemService(Context.TELEPHONY_SERVICE);
 return despace(tm.getLine1Numb...
 For more options, visit this group athttp://
groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers ...

-- 
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: I've found a way to stop piracy of my apps

2010-05-06 Thread Edward Falk
Intriguing.  I was wondering if maybe you could add a blurb to your
web site explaining in simple terms how it works.  E.g. when the API
is called, it communicates with the Android Market to verify your key;
once verified, the verification code is remembered so that no further
calls to the market are needed.  Or perhaps instead of Android
Market, it's our servers.  Or whatever.  How *does* it work?

And if it's your servers (or even the Android Market), what happens to
users when the servers go down?  This is the biggest problem with any
kind of server-based DRM.  Do they lose their apps?  Is there an
alternative recovery plan?

-- 
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: About maintaining the state of the activity on orientation change

2010-05-06 Thread Hugo Visser
If you want to save state, Android has a built in construct, from
http://developer.android.com/intl/zh-TW/reference/android/app/Activity.html
In addition, the method onSaveInstanceState(Bundle)  is called before
placing the activity in such a background state, allowing you to save
away any dynamic instance state in your activity into the given
Bundle, to be later received in onCreate(Bundle)

Your activity will be destroyed and in the onCreate you can restore
the state based on the bundle that is passed in when the bundle is not
null. It is the easiest way imho. Don't bother with detecting
landscape vs portrait, if your app requires a different layout in
landscape, just create a separate layout for it and put it in the
right resource folder. (see here
http://developer.android.com/intl/zh-TW/guide/topics/resources/resources-i18n.html)

Hugo

On May 6, 7:48 am, ameya dandekar ameya...@gmail.com wrote:
 Hi
   I am new to androidi m currently working on landscape mode for android
 app in which i want to know
   how to maintain the state of the activity and views displayed on
 orientation change i.e from portrait mode to landscape mode ?

 Regards,
 Ameya

 --
 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 
 athttp://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] Any alternative of iphone's searchable list in Android?

2010-05-06 Thread Romain Guy
The user can bring up the soft keyboard by long pressing the menu key.
Also, the text filter can be set programmatically.

On Wed, May 5, 2010 at 11:04 PM, SheikhAman shekh.a...@gmail.com wrote:
 hi.
 in iPhone, they have got an option of creating such a list which gives
 them ability to jump to a particular character.
 see the pic attached

 http://www.phonemag.com/blog/wp-content/uploads/2008/03/iphone_search_icon.jpg


 Do we have any such thing in Android?

 i can setTextFilterEnabled(true) but that requires the keyboard to be
 present, while perhaps there now way to implicitly show keyboard on
 the device as we have in the emulator.

 i have tried setFastScrollEnabled(true) it is good, but doesn't let
 you jump to a particular character.

 any suggestions?

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




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
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: Sliding Drawer question

2010-05-06 Thread brucko
Never done this before, Tommy.

Have a look at

http://developer.android.com/reference/android/widget/ImageView.html#attr_android:scaleType

-- 
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: onDraw being called - is that correct?

2010-05-06 Thread Second Dancer
The calendar app has a costom view,  here is another code snippet
@Override
protected void onDraw(Canvas canvas) {
if (mRedrawRequired) {
// if canvas is null, we get the canvas prepared for drawing,
and
// the background bitmap is needed because we do not need the
draw
// the view every time(such as the parent calls scrollTo()
method,
// etc.), only draw it when needed. when onDraw method is called
// again, by default if has nothing done, the view will be
cleared.
// Here we keep the background bitmap saved, we just show the
bitmap
// instead of draw the canvas.
if (null == mCanvas) {
Log.i(TAG, prepareCanvas.);
prepareCanvas(mVisibleWidth, mVisibleHeight);
}
// else means we can not just show the background bitmap, which
is
// not enough, we should clear the bitmap and redraw it.
// This statement clear will clear the canvas
mCanvas.drawColor(0, PorterDuff.Mode.CLEAR);
drawContent();
mRedrawRequired = false;
}
if (null != *mContentBitmap*) {
canvas.drawBitmap(mContentBitmap, mBitmapRect, mBitmapRect,
mPaint);
}
}

take attention the mContentBitmap here, this is the cache of the canvas, if
it is unnessarry to redraw your whole view, just call canvas.drawBitmap()
method

-- 
Regards

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

Re: [android-developers] how to handle the Dpad event in headview/footview of listview?

2010-05-06 Thread Vincent Tsao
one more question, why mFootView.setOnClickListener  not working? am i doing
sth wrong?

On Thu, May 6, 2010 at 2:13 PM, Second Dancer seconddan...@gmail.comwrote:

 That is the right way and still the smart way, unless you don't use
 listview

 On May 6, 2010 3:58 AM, Vincent Tsao caojunvinc...@gmail.com wrote:

 i have add a footview in listview with this code:
   mListView.addFooterView(mFootView);

 and also Register a callback to be invoked when this mFootView is clicked
 with code below:

 mFootView.setOnClickListener(new OnClickListener() {
 @Override
 public void onClick(View v) {
   // my code
 }
  });

 after this, when i press down dpad, there is no response, so i Register a
 callback to be invoked when a key is pressed in this mFootView. with code
 below:

   mHiddenFolders.setOnKeyListener(new OnKeyListener(){

 @Override
 public boolean onKey(View v, int keyCode, KeyEvent event) {
 // my code
Log.v(onKey, test);
 return  true;
 }

 });

 unfortunately, still nothing happened :(

 After some attempt, i found this ugly way:

 @Override
 public void onItemClick(AdapterView? parent, View view, int position,
 long id) {
 // TODO Auto-generated method stub

 if (id == -1) {
 if (position == 0) {
* // when click a header view*
 } else {
*// when click a footer view*
 }
 } else {
* // when click other normal row*
 }
 }

 finally, it works, but i'm wondering if there is a smart way to do this?


  --
 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.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 measure video file size?

2010-05-06 Thread Second Dancer
See android.media.MediaStore class, this class provides you enough info for
any kind of media on the device. If this infomation is not helpful, see
MediaProvider

-- 
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: Determine if my application is visible on screen

2010-05-06 Thread mort
onStop() and onPause() works great if your app only has one activity.
But they're also invoked if you switch to any sub activity, even if
it's done with startActivityForResult(). Only exception is when the
sub activity uses a transparent theme. (Well, onPause() is invoked for
sure, onStop() only sometimes...)
If you need a service that only runs when your app is visible, just
use a local service, Android will suspend it when the app becomes
invisible.
If you need to do something if the app is hidden, but not when
switching from one activity to another, there's no easy way I know of.
You can use isFinalizing() in onStop of the main activity, which
allows to do some work when the app is left with the back button. But
otherwise... Maybe with internal flags and handling the back button in
sub activities yourself, because without, you wouldn't know whether a
sub activity will return to the main activity (back button) or be left
to the Home screen or any other app (call, notification, etc.)...

-- 
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 disable home and other buttons so as to persist an app?

2010-05-06 Thread Ashok Jeevan
Hi guys,

I am building an app which uses a WebView. This app runs at startup.

Is there a way to maintain the app running(persists) even if the user
presses the 'Home' or 'Back' button?

In other words,pressing the 'Home', 'Back' or the other buttons shouldn't
close the activity.


Ashok Jeevan
+91 9895401278

-- 
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 fix java.lang.IllegalThreadStateExeception: Thread already started.

2010-05-06 Thread MSChoi
I made an application which has a thread for a notification
progressbar.

First time I started the thread, it works fine.
But Second time I tried to start the thread again, the application
stop with the exception.

How can I solve this problem?
Please give me any clue.


[==My thread code below==]
private class ProgressThread extends Thread {
Handler mHandler;
final static int STATE_DONE = 0;
final static int STATE_RUNNING = 1;
int outIncreamentPercent;
int mState;

ProgressThread(Handler h) {
mHandler = h;
}

public void run() {
int i = 0;
setState(STATE_RUNNING);
while (mState == STATE_RUNNING) {

if (i  MAX_LOOP_COUNT) {
setState(STATE_DONE);
} else {
if (i % 100 == 0) {
outIncreamentPercent = (int) (((float) 
i / MAX_LOOP_COUNT) *
100);

rv.setProgressBar(R.id.customProgressBar,
100,outIncreamentPercent, false);

mNotificationManager.notify(NOTIFICATION_ID,notification);

try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch 
block
e.printStackTrace();
}
}
}
i = i + LOOP_INCREMENT;
}
super.run();
} /* sets the current state for the thread, * used to stop the thread
*/
public void setState(int state) {
mState = state;
}
}

-- 
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 disable home and other buttons so as to persist an app?

2010-05-06 Thread Romain Guy
You can intercept the back key (although I highly recommend you don't
do that) but you CANNOT block the Home key. This is a security of the
OS to make sure the user can always exit any application.

Note that pressing Home will not close the Activity.

On Thu, May 6, 2010 at 12:07 AM, Ashok Jeevan ashokjee...@gmail.com wrote:
 Hi guys,
 I am building an app which uses a WebView. This app runs at startup.
 Is there a way to maintain the app running(persists) even if the user
 presses the 'Home' or 'Back' button?
 In other words,pressing the 'Home', 'Back' or the other buttons shouldn't
 close the activity.

 Ashok Jeevan
 +91 9895401278

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



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
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] NeighboringCellInfo returns CID as -1

2010-05-06 Thread Vinay S
Hi,

On Nexus One, when I try to get the NeighboringCellInfo, it returns me
with 5 nodes.

When I try to display the CID and LAC info, it is showing -1.

Does any one have any idea about his.? Any kind of info will be
helpful.

Sample output received:
05 05 2010 23:06:32.739  Neighbouring Cell Info :
Cell Info [1] : Cell Id :-1  RSSI :-1  LAC :-1  Nw Type:8]
Cell Info [2] : Cell Id :-1  RSSI :-7  LAC :-1  Nw Type:8]
Cell Info [3] : Cell Id :-1  RSSI :-9  LAC :-1  Nw Type:8]
Cell Info [4] : Cell Id :-1  RSSI :-41  LAC :-1  Nw Type:8]
Cell Info [5] : Cell Id :-1  RSSI :-41  LAC :-1  Nw Type:8]

Thanks in Advance,
Regards,
Vinay

-- 
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: APK for AGSP application

2010-05-06 Thread Andreas
Hi,

AGPS is used by the device to make better and faster fixes. That means
that when you use google maps on a device with support for AGPS, it is
used.

Andreas

On Mar 26, 4:30 pm, Kabita san.k...@gmail.com wrote:
 hi Andreas  ,
 I am looking for any Andriod application available on net in form of
 srouce code or apk which is based on AGPS technologies. I found that
 2.1 Eclair has support of this AGPS technology. It would be really
 helpfull if you can provide me any such apk. Please help...
 actually ... If I got this... i can see how that framework APIs for
 AGPS technology is used there ... it will help me a lottt..
 Thanks  Regards,
 Kabita

 On Mar 26, 5:29 am, Andreas andreas.bex...@gmail.com wrote:

  Hi,

  I'm not sure what you mean.AGPSis a technology, and a functionality.
  What kind of application is it you want? What do you want it to do?

  Andreas

  On Mar 25, 10:03 pm,Kabitasan.k...@gmail.com wrote:

   exactly I am looking for an apk which is based on AGSP. Please help
   me.

   On Mar 25, 4:20 pm,Kabitasan.k...@gmail.com wrote:

Hi,
Is there any APK available forAGPSapplication. Can anyboy please
help me...
Thanks in Advance- Hide quoted text -

  - Show quoted text -



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


[android-developers] Re: I've found a way to stop piracy of my apps

2010-05-06 Thread westmeadboy
How about users who go from using a paid-app-country sim card to a non-
paid-app-country sim card? In such a case, the app is no longer
visible on the Market?

I guess your answer to this would be its up to the developer to decide
how to handle such a license check failure but in reality the user
would demand that the app still works and so the dev would be pretty
much forced on the issue: i.e. validate once straight after install
and then future fails are allowed.

-- 
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] Find the Current Address

2010-05-06 Thread ensisinfo24
Hi  All,
   I want to find the current Address using current
lattitude and current longitude or phone number in android application .
   Please give me some suggestions.
   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.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-06 Thread debelyoo
Hi dillirao,

I don't receive onPrepared callback.

After requesting the live stream through the SDP file (http://
server_ip/live.sdp) I receive the following callbacks:
- onBufferingUpdate -- Buffering 100%
- onErrorCallback -- Command PLAYER_INIT completed with an error or
info PVMFErrCorrupt

My file is encoded in MPEG-4 part 2, audio is AAC, file format
is .mp4, resolution is 320x240. I have a bitrate of 700kbps but bw
should not be a problem since I'm on Wi-Fi.
I can stream the same file with a RTSP request from the Darwin server.
It works smoothly.

Any idea why the device returns this error ? evn though it can play
the same stream via RTSP ?

Jean

On May 5, 3:06 pm, dillirao malipeddi dillir...@arijasoft.com wrote:
 did u received OnPrepared callback.
 Plz write a onErrorcallback and see, if you get error callback.

 whats video profile and audio profile you are using.

 use : h263/h264 15fps; 176x144 or 320x240  and use low bit rate , on
 internet ; if lan, bw is not issu
 for audio: use aac/ again try low bit rate encoding;... amr/ is ok...

 Thanks



 On Thu, Apr 29, 2010 at 6:32 PM, debelyoo jean.ross...@gmail.com wrote:
  I try to play a live stream on my android phone using the MediaPlayer
  object. But I definitely see a black screen. Does anybody have any
  experience with streaming on Android ?

  Here is what I'm doing:
  I broadcast a stream with Darwin streaming server (via
  PlaylistBroadcast) to my Android phone. The stream is sent over RTP to
  the IP of my device (unicast). A .sdp file describes my stream.

  In my app, I try to play the stream with the following code where url
  is rtsp://server_ip/live.sdp

  private void playVideo(String url) {
         try {
                 //media.setEnabled(false);

                 if (player==null) {
                         //System.out.println(create MediaPlayer);
                         player=new MediaPlayer();
                         player.setScreenOnWhilePlaying(true);
                 } else {
                         player.stop();
                         player.reset();
                 }

                 player.setDataSource(url);
                 //holder.setFixedSize(320, 240);
                 player.setDisplay(holder);

                 player.setAudioStreamType(AudioManager.STREAM_MUSIC);
                 player.setOnPreparedListener(this);
                 player.prepareAsync();
                 player.setOnBufferingUpdateListener(this);
                 player.setOnCompletionListener(this);
         } catch (Throwable t) {
                 System.out.println(Exception in media prep:
  +t.toString());
         }
     }

  public void onPrepared(MediaPlayer mp) {
                 //System.out.println(onPrepared);

                 int width=player.getVideoWidth();
                 int height=player.getVideoHeight();

                 if (width!=0  height!=0) {
                          holder.setFixedSize(width, height);
                          player.start();
                 }
  }

  I always have a black screen, buffering remains at 0%.
  I checked that I can play this live stream on VLC and QT on a desktop,
  and it works fine. If I request the same file via a direct RTSP
  request (rtsp://server_IP/myVideo.mp4) the file plays correctly on my
  android phone.

  I also tried to request the .sdp file by an HTTP request (http://
  server_IP/live.sdp) but the result is the same (black screen).

  Does anybody have already succeeded in playing a live stream on an
  android phone ?

  Cheers
  Jean

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

 --
 Thank you,
 Dilli Rao. Mwww.arijasoft.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.com
 For more options, visit this group 
 athttp://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] Livewallpaper

2010-05-06 Thread risha
Hi! When the settings activity is made transparent, the livewallpaper
should continue to animate. I have used android:theme=@android:style/
Theme.Translucent  to make an activity transparent, but the
livewallpaper in the background remains static. Could anyone please
let me know how to make the livewallpaper animate.


Thanks  Regards,
Risha

-- 
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: I've found a way to stop piracy of my apps

2010-05-06 Thread a1


On May 5, 8:09 pm, dadical keyes...@gmail.com wrote:
 Hey Tim.

 You're correct that validating purchase with the market is a key piece
 of our solution.  Figuring out how exactly to do that using Google's
 binary market protocol in an efficient way (try doing everything that
 AAL does in a 35 KB library) was a fairly significant dev effort.
 What's more, balancing license generation, market API security, cross-
 Android version compatibility, customization, etc., and you've got a
 nice little chunk of work that we put into this solution.

 As for pricing, we'll see what the market will support.  In our own
 single app Screebl, we lose about $100/day in revenue to pirated
 apps, so $50 seems cheap.   I know that not all of that $100 will
 translate into sales, but some percentage will.  My point is it
 shouldn't take long for AAL to pay for itself.

Are you kidding me? You used code from this project:
http://code.google.com/p/android-market-api/ [you even left the same
UA spoof], and whats more important you are trying to charge for
solution that uses undocuemented google APIs (hence illegal), which
not only may change at any time but also using it may be legitimate
reason to block app from android market.

--
Bart Janusz (Beepstreet)

-- 
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: ADT Problem: Creating new Android Project

2010-05-06 Thread Harjeet Singh
I am currently on Windows 7 using Eclipse Galileo build for J2ee.
I will try uninstalling and get back.

- Harjeet.

2010/5/5 Kostya Vasilyev kmans...@gmail.com

 Harjeet,

 I guess trying to uninstall / reinstall everything (Java, Eclipse,
 Android...) is the usual black magic that might help :)

 BTW, what platform are you on? Windows, Ubuntu? 32 or 64 bit?

 -- Kostya

 Harjeet Singh harjee...@gmail.com писал(а) в своём письме Wed, 05 May
 2010 17:07:34 +0400:

  In my case the checkboxes do not show up at all. (Attaching the
 screenshot)
 Should I uninstall ADT plugin and install again. Would that seem to help.

 - Harjeet.

 2010/5/5 Kostya Vasilyev kmans...@gmail.com

  Ok, so you do have SDKs installed.

 Back to project creation - after selecting File - New - Android Project
 you should see something like the image I'm attaching to this message.

 The target platform selection is in there.

 -- Kostya

 harjeet harjee...@gmail.com писал(а) в своём письме Wed, 05 May 2010
 15:52:19 +0400:

  I have installed quite a few Android SDK platforms. In fact I had done

 so from within Eclipse ADT plugin. I very much appreciate help here.

 Here is the output of android list targets

 Available Android targets:
 id: 1 or android-4
Name: Android 1.6
Type: Platform
API level: 4
Revision: 1
Skins: HVGA (default), QVGA, WVGA800, WVGA854
 id: 2 or Google Inc.:Google APIs:4
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 2
Description: Android + Google APIs
Based on Android 1.6 (API level 4)
Libraries:
 * com.google.android.maps (maps.jar)
 API for Google Maps
Skins: WVGA854, HVGA (default), WVGA800, QVGA
 id: 3 or android-6
Name: Android 2.0.1
Type: Platform
API level: 6
Revision: 1
Skins: HVGA (default), QVGA, WQVGA400, WQVGA432, WVGA800, WVGA854
 id: 4 or Google Inc.:Google APIs:6
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 1
Description: Android + Google APIs
Based on Android 2.0.1 (API level 6)
Libraries:
 * com.google.android.maps (maps.jar)
 API for Google Maps
Skins: WVGA854, WQVGA400, HVGA (default), WQVGA432, WVGA800, QVGA
 id: 5 or android-7
Name: Android 2.1
Type: Platform
API level: 7
Revision: 1
Skins: HVGA (default), QVGA, WQVGA400, WQVGA432, WVGA800, WVGA854
 id: 6 or Google Inc.:Google APIs:7
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 1
Description: Android + Google APIs
Based on Android 2.1 (API level 7)
Libraries:
 * com.google.android.maps (maps.jar)
 API for Google Maps
Skins: WVGA854, WQVGA400, HVGA (default), WQVGA432, WVGA800, QVGA

 On May 5, 3:40 pm, Kostya Vasilyev kmans...@gmail.com wrote:

  This drop down list is populated by Eclipse automatically, using the
 list
 of installedAndroidplatform versions.

 Did you install anyAndroidplatform SDKs?

 If not, see here:

 http://developer.android.com/sdk/installing.html#components

 ... You need to download at least one platform into your environment,
 so
 that you will be able to compile your application and set up
 anAndroidVirtual Device (AVD) to run it on (in the emulator). ...


 Can you run androidlist targets from the command line and post the
 results?

 -- Kostya

 prachi prachi.tya...@wipro.com писал(а) в своём письме Wed, 05 May
 2010 14:28:44 +0400:



  Hi harjeet

  Whilecreatinganewprojectu must specify the target SDK under build
  target list.It has a list of checkboxes specifying the the various
  paltforms.choose any one of them

  On May 3, 2:05 pm, harjeet harjee...@gmail.com wrote:
  Hello,
  While trying to create anewAndroidProject., Get a error  -
  An SDK Target must be specified.

  The documentation states that - Under Target, select anAndroid
  target to be used as theproject'sBuild Target. The Build Target
  specifies whichAndroidplatform you'd like your application built
  against. 

  However in my case The Build Target section of the open dialog does
  not contain any text field or select dropdown, so I am not able to
  specify anything.

  Help in solving this is most appreciated.

  Thanks.

  --
  You received this message because you are subscribed to the Google
  Groups AndroidDevelopers group.
  To post to this group, send email
 toandroid-develop...@googlegroups.com
  To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 

  For more options, visit this group  athttp://
 groups.google.com/group/android-developers?hl=en

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

 --
 You received this message because you are subscribed to the Google
 Groups AndroidDevelopers group.
 To post to this group, send email
 

[android-developers] Android eclair: playing videos

2010-05-06 Thread petter
Hi I have compiled android eclair version 2.1 on my htc sapphire 32A
and everything works great up to playing videos. When I ran playing a
any video on device, android player starts and I see only black
screen. Sound is working properly, but something happens when bites
from video are copied to share memory with kernel. In logcat I see
this lines:
E/copybit (   73): copyBits failed (Invalid argument)
D/copybit (   73): 0: src={w=480, h=320, f=0, rect={0,0,480,320}}
D/copybit (   73): dst={w=480, h=320, f=0, rect={0,0,480,320}}
D/copybit (   73): flags=00020008
E/SurfaceFlinger(   73): GL error 0x0502

Please help somebody, I am already desperate.

-- 
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: I've found a way to stop piracy of my apps

2010-05-06 Thread Tomáš Hubálek
I believe that every DRM is something that IMHO Google HAVE to SOLVE. Every
independent solution is just a hack that may stop working anytime Google
wants. Sorry.

Tom

On Thu, May 6, 2010 at 9:22 AM, westmeadboy westmead...@yahoo.co.uk wrote:

 How about users who go from using a paid-app-country sim card to a non-
 paid-app-country sim card? In such a case, the app is no longer
 visible on the Market?

 I guess your answer to this would be its up to the developer to decide
 how to handle such a license check failure but in reality the user
 would demand that the app still works and so the dev would be pretty
 much forced on the issue: i.e. validate once straight after install
 and then future fails are allowed.

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




-- 
---
Tom Hubalek (tom.huba...@gmail.com), http://blog.hubalek.net/
http://facebook.com/thubalek, http://twitter.com/thubalek
http://www.linkedin.com/in/thubalek

-- 
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: NeighboringCellInfo returns CID as -1

2010-05-06 Thread Vinay S
Hi All,

Sorry about it..

It is returning -1 because it on UMTS.

I was thinking it was on GSM.

Thhanks  Regards,
Vinay
--

On May 6, 12:16 pm, Vinay S s.vinay@gmail.com wrote:
 Hi,

 On Nexus One, when I try to get the NeighboringCellInfo, it returns me
 with 5 nodes.

 When I try to display the CID and LAC info, it is showing -1.

 Does any one have any idea about his.? Any kind of info will be
 helpful.

 Sample output received:
 05 05 2010 23:06:32.739  Neighbouring Cell Info :
 Cell Info [1] : Cell Id :-1  RSSI :-1  LAC :-1  Nw Type:8]
 Cell Info [2] : Cell Id :-1  RSSI :-7  LAC :-1  Nw Type:8]
 Cell Info [3] : Cell Id :-1  RSSI :-9  LAC :-1  Nw Type:8]
 Cell Info [4] : Cell Id :-1  RSSI :-41  LAC :-1  Nw Type:8]
 Cell Info [5] : Cell Id :-1  RSSI :-41  LAC :-1  Nw Type:8]

 Thanks in Advance,
 Regards,
 Vinay

 --
 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 
 athttp://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] Re: I've found a way to stop piracy of my apps

2010-05-06 Thread a1
It uses this project: http://code.google.com/p/android-market-api/,
you can do same, just note that in proto purchased field is missing,
but you can simply extend App message in market.proto, purchased field
has id 34.

--
Regards,
Bart Janusz (Beepstreet)

On May 6, 8:22 am, Edward  Falk ed.f...@gmail.com wrote:
 Intriguing.  I was wondering if maybe you could add a blurb to your
 web site explaining in simple terms how it works.  E.g. when the API
 is called, it communicates with the Android Market to verify your key;
 once verified, the verification code is remembered so that no further
 calls to the market are needed.  Or perhaps instead of Android
 Market, it's our servers.  Or whatever.  How *does* it work?

 And if it's your servers (or even the Android Market), what happens to
 users when the servers go down?  This is the biggest problem with any
 kind of server-based DRM.  Do they lose their apps?  Is there an
 alternative recovery plan?

 --
 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 
 athttp://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] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-06 Thread skink


On May 5, 2:37 pm, Alok Kulkarni kulsu...@gmail.com wrote:
 It would be great if you could help me giving an example of using the
 inflate method and the NinePatchDrawable constructor.
 Thanks,
 Alok.


reading this: 
http://groups.google.com/group/android-developers/msg/db8d63fd8575129c
it seems ninePatches are created statically by aapt tool and if you
want to create ninepatchdrawable dynamically from any file you would
calculate chunk by yourself (ResourceTypes.h for its format)

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


[android-developers] UDP Broadcast Receiver, work on old Phone, but not on new

2010-05-06 Thread marcomoel...@googlemail.com
Hi,

I have written an app what is receiving UDP broadcast messages (via
WLAN). It is running on an HTC magic (1.6) without any problems. But
on a HTC Desire (2.1.1) or Motorola Milestone (2.0.1) we receive
nothing.
We tryed to send the broadcast by the phone it self, this is working
on all phones...

Has anyone a clue what could be wrong?

Thx

Marco

here my code:
---
DatagramSocket dsocket;
try {
dsocket = new 
DatagramSocket(BROADCAST_PORT);
dsocket.setReuseAddress(true);
} catch (SocketException e) {

CDebug.getLog().log(Level.SEVERE,
Could not open 
Backend broadcast listener, e);
return;
}

// Create a buffer to read datagrams 
into. If a
// packet is larger than this buffer, 
the
// excess will simply be discarded!
byte[] buffer = new byte[2048];

// Create a packet to receive data into 
the buffer
DatagramPacket packet = new 
DatagramPacket(buffer,
buffer.length);

CDebug.getLog().log(Level.FINE,
Open Backend broadcast 
listener on Port:  + BROADCAST_PORT);
dsocket.setSoTimeout(300); // max time 
the socket is blocked
// System.out.println(open poard);
// Now loop forever, waiting to receive 
packets and printing
// them.
while (true) {
if (stopBroadcastListening) {
dsocket.close();
return;
}
// Wait to receive a datagram
try {

dsocket.receive(packet);
oneBroadcastReceived = 
true;
} catch (SocketTimeoutException 
e) {
//  Debug
//  .getLog().info(Backend 
broadcast listener timeout);
continue;
} catch (IOException e) {
CDebug

.getLog()
.log(

Level.SEVERE,

Could not read from Backend broadcast listener socket.
close connection,

e);
dsocket.close();
return;
}

// Convert the contents to a 
string, and display them
String msg = new String(buffer, 
0, packet.getLength());
InetSocketAddress sender = 
(InetSocketAddress) packet

.getSocketAddress();
//  System.out.println(sender + 
msg);
CDebug.getLog().log(
Level.INFO,
Receive 
Broadcast from 

+ sender.getHostName() + : + msg);

try {

ObjectParser.fireEventsForMessage(msg, me,sender);
} catch (Exception e) {

[android-developers] TextView.setTextColor

2010-05-06 Thread mike
hi guys,

i want to set the text color. color will differ according to the
scenario because of that can't set the text color in the xml file.

in android only few colors are available. if i want to set the colors
like Pink,Orange it does not support.
even if i set the int color code of those values it's not rendering.

so anyone can give me a way to achieve this??
i want to set the pro grammatically.

regards,
Ranidka

-- 
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: mounting and unmountind USB storage from Java App

2010-05-06 Thread FrankG
I can only assume, that this kind of apps
are either modified by the vendor or the whole
app is a vendor extension ?

I think currently these things will be handled by each vendor
in a different way,with different software and also with different
APIs. Their is no trick, IMHO the android usb things are still in
progess.


On 5 Mai, 23:08, rchndrsn rchnd...@gmail.com wrote:
 Thank You FrankG for offering some information.

 Some apps are doing this, and I know they cannot do it as normal apps.
 Can offer any insight into the abnormal mechanism they use? What is
 their trick

 On May 4, 11:57 pm, FrankG frankgru...@googlemail.com wrote:





  No, you cannot do this from a normal app.

  And take care : Soon you will have Android Handy's with more USB
  functions on the market.
  And to mount a sdcard as a usb storage you must know I which mode the
  usb stack is.

  Good luck !

     Frank

  On 4 Mai, 18:33, rchndrsn rchnd...@gmail.com wrote:

   I searched many days in vain.

   Can someone tell me if there is a way to mount and unmount the SDCars
   as USB storage from a Java App. I am looking for the API mechanism.

   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 
   athttp://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 
  athttp://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 
 athttp://groups.google.com/group/android-developers?hl=en- Zitierten Text 
 ausblenden -

 - Zitierten Text anzeigen -

-- 
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] Local Service not Registering

2010-05-06 Thread brucko
Essentially my problem is this, I open my Activity. It binds to a
local service that appears to be connected. I get a force close when
I press the back button

IllegalArgumentException: Service not registered when unbind is
called in my onPause method...

public void onPause() {
super.onPause();
if (isFinishing()) {
if (mConnection != null){
Log.i(TAG,onPause, mConnection + 
mConnection.toString());
mDbS.unbindService(mConnection);
}else {
Log.i(TAG,mConnection is null);
}
The service is bound in onCreate

// bind to our sdCard database using our Service Connection
mServiceIntent = new Intent(this,DatabaseService.class);
if(bindService(mServiceIntent, mConnection,
Context.BIND_AUTO_CREATE)){
Log.e(TAG, service bound);
}else{
Log.e(TAG, service not bound);
}

bindService is returning true.

My Service connection is as follows. onServiceConnected is called and
goes to completion. onService Disconnected is never called (presumably
because my service is in same process)

private ServiceConnection mConnection = new ServiceConnection() {
public final String TAG = LoadView.ServiceConnection; //$NON-
NLS-1$

public void onServiceConnected(ComponentName className, IBinder
service) {
mDbS = ((LocalBinderDatabaseService) 
service).getService();
  .
stuff not relevant
   
Log.i(TAG, finished onServiceConnected); //$NON-NLS-1$
}
public void onServiceDisconnected(ComponentName className) {
Log.e(TAG, onServiceDisconnectedCalled); //$NON-NLS-1$
}
};

The only thing I do a little different is that I don't use an inner
class in my service for the Binder object - I use a separate class.
This is mostly because I have several databases and wanted code I
could reuse and set up simply rather than worry about all the ins and
outs and memory leak issues.

import android.os.Binder;
import android.util.Log;

public class LocalBinderS extends Binder {
private String TAG = LocalBinder;
private  S mService;

@SuppressWarnings(unused)
private LocalBinder() {
}

public LocalBinder(S service){
mService = service;
}

public S getService() {
return mService;
}

public void finalize(){
mService = null;
try {
//TODO reinstate this after Issue 8046 is resolved
//super.finalize();
} catch (Throwable e) {
Log.e(TAG,Unable to finalize Binder);
}

}
}

Any ideas?

-- 
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] TextView.setTextColor

2010-05-06 Thread Second Dancer
The params in setTextColor is not the resource id in xml file, but the real
ARGB value combination, so here you hava two choice.
1. setTextColor(context.getResources.getColor(int resId));
2. setTextColor(int value), for example white 0x

2010/5/6 mike hasitharand...@gmail.com

 hi guys,

 i want to set the text color. color will differ according to the
 scenario because of that can't set the text color in the xml file.

 in android only few colors are available. if i want to set the colors
 like Pink,Orange it does not support.
 even if i set the int color code of those values it's not rendering.

 so anyone can give me a way to achieve this??
 i want to set the pro grammatically.

 regards,
 Ranidka

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




-- 
Regards

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

[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-05-06 Thread Derek
still waiting in London. by the way, is it a dev phone, or a normal
one?

-- 
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: Device Seeding Program for Top Android Market Developers

2010-05-06 Thread Nikolay Ananiev
Still waiting in Bulgaria...


On Thu, May 6, 2010 at 12:14 PM, Derek xianguan...@gmail.com wrote:

 still waiting in London. by the way, is it a dev phone, or a normal
 one?

 --
 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: Device Seeding Program for Top Android Market Developers

2010-05-06 Thread Lim Sim
Normal.  Nexus One is not an official dev phone but it's more or less the
defecto now.

On 6 May 2010 10:14, Derek xianguan...@gmail.com wrote:

 still waiting in London. by the way, is it a dev phone, or a normal
 one?

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




-- 
Lim Sim
t: +44 790 4181648
f: http://www.flickr.com/photos/limsim

-- 
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 draw smooth gradients?

2010-05-06 Thread fexpop


On 5 Mai, 16:44, blew pascal.jac...@gmail.com wrote:
 I think you can do this by drawing the gradients in a 8-8-8 bit color
 defined canvas
 this should apply the configuration to all elements in the canvas:
 Bitmap bitmap = Bitmap.createBitmap(width, height,
 Bitmap.Config.ARGB_);
 Canvas canvas = new Canvas(bitmap);


Hmm, how do I actually put the canvas contents on the screen then?

The only way I know of is drawing it on a view's canvas in the
onDraw() method:

@override
protected void onDraw(Canvas canvas) {
   Bitmap bitmap888 = Bitmap.createBitmap(canvas.getWidth(),
canvas.getHeight(),
   Bitmap.Config.ARGB_);
   Canvas canvas888 = new Canvas(bitmap);
   drawSomething(canvas888); // actually draw gradient on canvas888

   canvas.drawBitmap(bitmap888, 0, 0, null);
}

When I do it that way, the gradient is rendered as 5-6-5 again.

Any ideas?

Kind regards,

Felix

-- 
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: Looking for advice into best way to store images within app

2010-05-06 Thread JimmyHoffa
Thanks for reply.

I should have stated that app will be offline and not relying on
online storage so cloud is not really appropriate as the same screen
will allow the user to grab a picture via the camera and then store
the image.  I think I'll have a play with both media storage and
database, and see what works best..



On May 5, 8:00 pm, Kumar Bibek coomar@gmail.com wrote:
 It really depends on the amount of space your images would take up. If
 it runs into less than 100KB, you can put them in the drawable folder.
 but, anything beyond than that is not a good practice. Your final
 apk's size will be huge.

 the best way is to keep your images somewhere in the cloud, and access
 them through the app.

 Thanks and Regards,
 Kumar Bibek

 On May 5, 8:45 pm, JimmyHoffa photos.d...@googlemail.com wrote:



    0  vote down  star

  Hi all,

  I'm just looking for some insight into what would be the best way for
  me to store images as part of my app.

  I have an activity that represents a 'Job' which has a couple of
  edittext's and underneath was planning on using the Gallery component
  to show images relevant to this job.

  The job data is stored in a database (on the sdcard) so was also
  thinking of creating a table to store 'JobImages' and having each
  image stored as a byte array.

  But I'm not sure if it would be better to store the images directly on
  sdcard under a folder structure specific to my application and the
  job. E.g. using the job ID number as a folder name.

  Depending on which method I use will greatly determine the code that
  goes into an 'adapter' that allows me to bind to the gallery component
  so before I begin I was wondering if anyone has had the same design
  problem and what option they chose.

  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 
  athttp://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 
 athttp://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] Start another application from another package with an Intent

2010-05-06 Thread Anders Widen
I know how to update my own programs, and I know how to open programs
using the a predefined Uri (for sms or email for example)

I need to know how I can create an Intent to open MyTracks or any
other application that I don't know what intents they listen to.

I got this info from DDMS, but I havn't been succesful in turning this
to an Intent I can use. This is taken from when opening MyTracks
manually.

Thanks for your help

05-06 11:22:24.945: INFO/ActivityManager(76): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1020
cmp=com.google.android.maps.mytracks/
com.google.android.apps.mytracks.MyTracks bnds=[243,338][317,417] }

05-06 11:22:25.005: INFO/ActivityManager(76): Start proc
com.google.android.maps.mytracks for activity
com.google.android.maps.mytracks/
com.google.android.apps.mytracks.MyTracks: pid=1176 uid=10063
gids={3003, 1015}

05-06 11:22:26.995: INFO/ActivityManager(76): Displayed activity
com.google.android.maps.mytracks/
com.google.android.apps.mytracks.MyTracks: 1996 ms (total 1996 ms)

-- 
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 fix java.lang.IllegalThreadStateExeception: Thread already started.

2010-05-06 Thread tobias429
Run into the same issue. What I'm doing is to not stop the thread and
restart it, but kill and rebuild it. I.e. kill the thread via:

boolean retry = true;
while (retry) {
try {
myThread.join();
retry = false;
} catch (InterruptedException e) {
}
}

When you need it again, create a new one and start it. Obviously this
is the crude way to do it, but with anything else I run into the same
illegal state issue. Interested if anyone has a better approach.

On May 6, 9:10 am, MSChoi moon_...@hotmail.com wrote:
 I made an application which has a thread for a notification
 progressbar.

 First time I started the thread, it works fine.
 But Second time I tried to start the thread again, the application
 stop with the exception.

 How can I solve this problem?
 Please give me any clue.

 [==My thread code below==]
 private class ProgressThread extends Thread {
         Handler mHandler;
         final static int STATE_DONE = 0;
         final static int STATE_RUNNING = 1;
         int outIncreamentPercent;
         int mState;

         ProgressThread(Handler h) {
                 mHandler = h;
         }

         public void run() {
                 int i = 0;
                 setState(STATE_RUNNING);
                 while (mState == STATE_RUNNING) {

                         if (i  MAX_LOOP_COUNT) {
                                 setState(STATE_DONE);
                         } else {
                                 if (i % 100 == 0) {
                                         outIncreamentPercent = (int) 
 (((float) i / MAX_LOOP_COUNT) *
 100);
                                         
 rv.setProgressBar(R.id.customProgressBar,
 100,outIncreamentPercent, false);
                                         
 mNotificationManager.notify(NOTIFICATION_ID,notification);

                                         try {
                                                 Thread.sleep(100);
                                         } catch (InterruptedException e) {
                                                 // TODO Auto-generated catch 
 block
                                                 e.printStackTrace();
                                         }
                                 }
                         }
                         i = i + LOOP_INCREMENT;
                 }
                 super.run();
         } /* sets the current state for the thread, * used to stop the thread
 */
         public void setState(int state) {
                 mState = state;
         }

 }

 --
 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 
 athttp://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] Re: Problem with StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-06 Thread skink


On May 6, 5:52 am, skink psk...@gmail.com wrote:
 reading 
 this:http://groups.google.com/group/android-developers/msg/db8d63fd8575129c
 it seems ninePatches are created statically by aapt tool and if you
 want to create ninepatchdrawable dynamically from any file you would
 calculate chunk by yourself (ResourceTypes.h for its format)

 pskink

so if creating NinePatcheDrawable is not an easy thing (due to binary
chunk format) i thing the best idea for OP is to create custom
drawable extending StateListDrawable

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


[android-developers] Re: How to fix java.lang.IllegalThreadStateExeception: Thread already started.

2010-05-06 Thread MSChoi
I avoid the exception with using of narrow-down variable scope.
Actually my friend suggest it me.

previous code
public class study004statuswithprogressbar extends Activity {

  @Override
  public boolean onKeyUp(int keyCode, KeyEvent event) {
switch (event.getUnicodeChar() - '0') {
case 1:
  //Some Code Here
  if ( progressIncrementthread.isAlive() == false )
  {
  progressIncrementthread.start();
  }
  }

  ProgressThread progressIncrementthread = new
ProgressThread(uploadProgressBarHandler);

  private class ProgressThread extends Thread {

  }
}


new code
public class study004statuswithprogressbar extends Activity {

  @Override
  public boolean onKeyUp(int keyCode, KeyEvent event) {
switch (event.getUnicodeChar() - '0') {
case 1:

  //Some Code Here

  ProgressThread progressIncrementthread = new
ProgressThread(uploadProgressBarHandler);

  if ( progressIncrementthread.isAlive() == false )
  {
  progressIncrementthread.start();
  }
  }

  //Move it to switch
  //ProgressThread progressIncrementthread = new
ProgressThread(uploadProgressBarHandler);

  private class ProgressThread extends Thread {

  }
}

It works!!
I think this is very smart way to avoid the problem.
But I still want to solve the problem instead of using variable scope.

Does anybody can do it?
Please suprise me. =)

On 5월6일, 오후6시59분, tobias429 ecker...@gmx.de wrote:
 Run into the same issue. What I'm doing is to not stop the thread and
 restart it, but kill and rebuild it. I.e. kill the thread via:

 boolean retry = true;
 while (retry) {
 try {
 myThread.join();
 retry = false;
 } catch (InterruptedException e) {
 }
 }

 When you need it again, create a new one and start it. Obviously this
 is the crude way to do it, but with anything else I run into the same
 illegal state issue. Interested if anyone has a better approach.

 On May 6, 9:10 am, MSChoi moon_...@hotmail.com wrote:





  I made an application which has a thread for a notification
  progressbar.

  First time I started the thread, it works fine.
  But Second time I tried to start the thread again, the application
  stop with the exception.

  How can I solve this problem?
  Please give me any clue.

  [==My thread code below==]
  private class ProgressThread extends Thread {
  Handler mHandler;
  final static int STATE_DONE = 0;
  final static int STATE_RUNNING = 1;
  int outIncreamentPercent;
  int mState;

  ProgressThread(Handler h) {
  mHandler = h;
  }

  public void run() {
  int i = 0;
  setState(STATE_RUNNING);
  while (mState == STATE_RUNNING) {

  if (i  MAX_LOOP_COUNT) {
  setState(STATE_DONE);
  } else {
  if (i % 100 == 0) {
  outIncreamentPercent = (int) 
  (((float) i / MAX_LOOP_COUNT) *
  100);
  
  rv.setProgressBar(R.id.customProgressBar,
  100,outIncreamentPercent, false);
  
  mNotificationManager.notify(NOTIFICATION_ID,notification);

  try {
  Thread.sleep(100);
  } catch (InterruptedException e) {
  // TODO Auto-generated 
  catch block
  e.printStackTrace();
  }
  }
  }
  i = i + LOOP_INCREMENT;
  }
  super.run();
  } /* sets the current state for the thread, * used to stop the 
  thread
  */
  public void setState(int state) {
  mState = state;
  }

  }

  --
  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 
  athttp://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 
 athttp://groups.google.com/group/android-developers?hl=en- 원본 텍스트 숨기기 -

 - 원본 텍스트 보기 -

-- 
You received this message because you are subscribed to the Google
Groups 

[android-developers] Re: Linkify-ed TextView non-linked text disappears on touch

2010-05-06 Thread westmeadboy
Just tried this using the emulator (SDK 1.6), and the same problem
occurs.

So it could be some change that has been introduced from 1.6.

Note: if no links are created in the text, then the problem does not
occur. In other words, clicking on the TextView does not result in the
text disappearing.

Linkify must be changing something about the TextView to make this
happen...

On May 4, 7:42 pm, westmeadboy westmead...@yahoo.co.uk wrote:
 I notice this happens on the Nexus One but not on the HTC Hero (EU
 version).

 Anyone else experience this?

 On May 4, 1:36 am, westmeadboy westmead...@yahoo.co.uk wrote:





  I'm not sure if this is by design but...

  I have a text view (white text on black background) which is
  linkified. If at least one link is created and the user touches on any
  non-linked part of the text, then the non-linked part disappears (or
  turns black, I'm not sure).

  Is there any way to stop this?

  --
  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 
  athttp://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 
 athttp://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] A couple of Rom questions for the experts

2010-05-06 Thread draf...@gmail.com
I have a couple of questions for the Rom developers/experts on here
regarding things that can be done with Android ROM's.

Is a parser Rom upgrade possible? So is it possible to change a small
part of a ROM and then allow users to upgrade their ROM easily?

So can I change a part of a ROM and then a customer can upgrade to the
newer ROM without having to be technically savvy and needing to root
and flash their devices?

Can a change be burnt into a ROM so that when a user selects Restore
Factory Settings that it doesn't remove the upgrade to the ROM?

So essentially I want to know if its possible (with a device
manufacturers permission) to add to a ROM some small additional parts
and then give this new ROM version as a firmware upgrade to the device
so that a user only has to upgrade and not go through the process of
rooting and flashing there device?

-- 
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: OpenGL ES and Projection Matrix using Ortho Projection

2010-05-06 Thread Alfonso
OK, I have cleaned this a little. Now I try to do the same but with
this code:

gl.glOrthof(-near_height * ratio, near_height * ratio, -near_height,
near_height, zNear, zFar);
.
.
.

Matrix.orthoM(orthoProjectionMatrix, 0, -near_height * ratio,
near_height * ratio, -near_height, near_height, zNear, zFar);
float pos3DdelPuntoInteres [] = new float [] {0.0f,0.0f,4.0f};
float acumulador[] = new float[4];
//remappedRotationMatrix is the modelView
android.opengl.Matrix.multiplyMV(acumulador, 0,
remappedRotationMatrix, 0, pos3DdelPuntoInteres, 0);
android.opengl.Matrix.multiplyMV(posPantalladelPI, 0,
orthoProjectionMatrix, 0, acumulador, 0);
Log.e(IconoRenderer, Posición del icono en la vista: ( +
posPantalladelPI[0]/posPantalladelPI[3] + ,  + posPantalladelPI[1]/
posPantalladelPI[3] + ,  + posPantalladelPI[2]/posPantalladelPI[3] +
));

I think the values posPantalladelPI[0]/posPantalladelPI[3],
posPantalladelPI[1]/
posPantalladelPI[3] and posPantalladelPI[2]/posPantalladelPI[3] should
be between -1 and 1. But not. The numbers are totally different.
Please, got someone any clue?

Thanks you very much.

-- 
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: OpenGL ES and Projection Matrix using Ortho Projection

2010-05-06 Thread Alfonso
A fix: float pos3DdelPuntoInteres [] = new float [] {0.0f,0.0f,4.0f,
1.0f};
I just forgot write here the last number, but it was present in my
code. In other words, the problem persists.

-- 
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] Screen off suspends the Thread

2010-05-06 Thread Raj
Hi All,
I have a created a thread in my application, and have a sleep for 5sec
in the run() function. This sleep function returns properly after 5
secs only if the device screen is turned ON. In case the device screen
goes to Hibernate, sleep function returns after around 2-3
minutes(instead of 5 sec).

Have any one faced this issue earlier?

Regards,
Raj

-- 
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: Linkify-ed TextView non-linked text disappears on touch

2010-05-06 Thread westmeadboy
Just found this thread which describes the problem:

http://groups.google.com/group/android-developers/browse_thread/thread/ccb475c855e8785a/f1f80a34fe3ff179

To confirm, the text was not actually disappearing, but being set to
black (and appearing to disappear where the background is also black).

The workaround is to explicitly set the textColor and this works for
me.

On May 6, 12:32 pm, westmeadboy westmead...@yahoo.co.uk wrote:
 Just tried this using the emulator (SDK 1.6), and the same problem
 occurs.

 So it could be some change that has been introduced from 1.6.

 Note: if no links are created in the text, then the problem does not
 occur. In other words, clicking on the TextView does not result in the
 text disappearing.

 Linkify must be changing something about the TextView to make this
 happen...

 On May 4, 7:42 pm, westmeadboy westmead...@yahoo.co.uk wrote:





  I notice this happens on the Nexus One but not on the HTC Hero (EU
  version).

  Anyone else experience this?

  On May 4, 1:36 am, westmeadboy westmead...@yahoo.co.uk wrote:

   I'm not sure if this is by design but...

   I have a text view (white text on black background) which is
   linkified. If at least one link is created and the user touches on any
   non-linked part of the text, then the non-linked part disappears (or
   turns black, I'm not sure).

   Is there any way to stop this?

   --
   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 
   athttp://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 
  athttp://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 
 athttp://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] HowTo: Supporting devices with different resolutions

2010-05-06 Thread Kostya Vasilyev

Hello all,

I've written a simple HowTo on supporting devices with different  
resolutions.


All the information is available elsewhere, still, I put it all together  
in one place for convenience.


Posted here: http://kmansoft.wordpress.com/

Hope this might be useful.

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


--
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] Stopping other Activity from my Service..

2010-05-06 Thread Raj
Hi,
I want to stop an Activity that is in some other application from my
Applications service.
Is there any mechanism to do so?

Thanks,
Raj

-- 
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] Wifi drop Issues on Motorola Droid

2010-05-06 Thread KK
I am trying to develop a streaming application and I am testing it on
multiple devices. But I am seeing some problems on Motorola Droid with
regards to wifi connection. The wifi connection drops occasionally and
comes back in 30 seconds to 1 minute on the Droid. Sometimes while in
the middle of streaming I get network connection errors even though I
am standing very next to the wifi router. I am not finding this
problem with any other devices. Has anyone found any similar issues
with the Droid? Any idea what can be done in my program to fix this?

Thanks
KK

-- 
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] SyncAdapter 2.x question

2010-05-06 Thread ionel
Can we use sync adapters for email?

-- 
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 draw smooth gradients?

2010-05-06 Thread blew
Can't really test your code now, but:
Why don't you put your bitmap888 when constructing your canvas888.

Canvas canvas888 = new Canvas(bitmap888);



On May 6, 11:32 am, fexpop caspar...@googlemail.com wrote:
 On 5 Mai, 16:44, blew pascal.jac...@gmail.com wrote:

  I think you can do this by drawing the gradients in a 8-8-8 bit color
  defined canvas
  this should apply the configuration to all elements in the canvas:
  Bitmap bitmap = Bitmap.createBitmap(width, height,
  Bitmap.Config.ARGB_);
  Canvas canvas = new Canvas(bitmap);

 Hmm, how do I actually put the canvas contents on the screen then?

 The only way I know of is drawing it on a view's canvas in the
 onDraw() method:

 @override
 protected void onDraw(Canvas canvas) {
    Bitmap bitmap888 = Bitmap.createBitmap(canvas.getWidth(),
 canvas.getHeight(),
    Bitmap.Config.ARGB_);
    Canvas canvas888 = new Canvas(bitmap);
    drawSomething(canvas888); // actually draw gradient on canvas888

    canvas.drawBitmap(bitmap888, 0, 0, null);

 }

 When I do it that way, the gradient is rendered as 5-6-5 again.

 Any ideas?

 Kind regards,

 Felix

 --
 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 
 athttp://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] Re: [android-porting] Re: Disable hardware codecs

2010-05-06 Thread Uander
Hey , it works now .

Disabled h/w codecs as suggested . It played using s/w codecs now .

Thanks for all of your support  Deva , Ricardo .

Thanks :
Uander

On Tue, May 4, 2010 at 7:20 PM, Deva R r.deva...@gmail.com wrote:

 Hi Uander,

 Hw codecs from TIOMX_Core library is still significant, and it
 shouldnt be in picture if 01_Vendor_ti_omx.cfg is deleted completely.
 is it like have u renamed the file? (confirm by 'ls /etc/' after android
 bootup)

 Intention of deleting the file is, PV OMX component sw-codecs should
 be chosen via /etc/pvplayer.cfg..

 -Deva
 On Tue, May 4, 2010 at 2:21 PM, Uander uandro...@gmail.com wrote:
  Hello  ,
 
  @Deva -
 
  I disable h/w acceleration by removing 01_Vendor_ti_omx.cfg file . now
 its
  using s/w codecs  .  But still same error comes up . logcat says :
 
  ***
 
 
  D/omx_interface(  906): DLOPEN SUCCEEDED (libOMX_Core.so)
  D/omx_interface(  906): TIOMXInterface: library lookup success
  D/TIOMX_CORE(  906): init count = 1
  D/TIOMX_CORE(  906): Found component OMX.TI.AMR.decode with refCount 0
  D/OMX_NBAMRDEC(  906): OMX_ComponentInit():202 202 ::OMX_ComponentInit
  D/OMX_NBAMRDEC(  906): NBAMRDECHandleCommand():829 829 ::
 OMX_AmrDec_Utils.c
  :: Error returned fromLCML_Init()
  W/MediaPlayer( 1441): info/warning (1, 26)
  D/OMX_NBAMRDEC(  906): NBAMRDEC_ComponentThread():102 :: Comp Thrd
 Exiting
  here...
  I/DEBUG   (  904): *** *** *** *** *** *** *** *** *** *** *** *** ***
 ***
  *** ***
  I/DEBUG   (  904): Build fingerprint:
  'NEC/pine/pine/pine:2.1/ERD79/eng.root.20100429.171703:eng/test-keys'
  I/DEBUG   (  904): pid: 906, tid: 1523   /system/bin/mediaserver 
  I/DEBUG   (  904): signal 11 (SIGSEGV), fault addr 
  I/DEBUG   (  904):  r0 0004a218  r1 80c20f18  r2 06f4  r3 80c229f0
  I/DEBUG   (  904):  r4 80c230f8  r5 40b0dbac  r6 00035420  r7 00021bb8
  I/DEBUG   (  904):  r8 0010  r9 a9d1b8e5  10 40a0e000  fp 00021b58
  I/DEBUG   (  904):  ip   sp 40b0db30  lr 80c1a69d  pc 
 cpsr
  a010
  I/DEBUG   (  904):  #00  pc 
  I/DEBUG   (  904):  #01  pc 0001a69a
  /system/lib/libOMX.TI.AMR.decode.so
  I/DEBUG   (  904):  #02  pc 10ca  /system/lib/libOMX_Core.so
 
  
  @Ricardo
 
  my file is AMR-NB formatted (mimetype set as audio/3gp in
 mediascanner.java
  ), I can find
   {OMX.TI.AMR.encode, audio_encoder.amrnb},
   {OMX.TI.AMR.decode, audio_decoder.amrnb},
 
  in platform/hardware/ti/omx/system/src/openmax_il/omx_core/src/OMX_core.c
 .
  so codecs support seem to listed there  .
 
  error comes up from LCML_Init () call in  OMX_AmrDec_Utils.c . that means
  its unable to load codec .
 
 
  Thanks :
  Uander
 
  On Mon, May 3, 2010 at 11:21 PM, Ricardo Martinez oscar2...@gmail.com
  wrote:
 
  Hi Uander,
  You can disable Hardware acceleration by editing this file:
  platform/vendor/ti/zoom2/BoardConfig.mk
 
  But I think it's better to find the root cause of the issue, probably
 the
  first step could be to verify if the audio format is actually supported,
  take a look at the supported OMX roles (tComponentName):
  platform/hardware/ti/omx/system/src/openmax_il/omx_core/src/OMX_core.c
  Thanks,
  Ricardo
  On Mon, May 3, 2010 at 7:54 AM, Deva R r.deva...@gmail.com wrote:
 
  [+porting list]
  you can delete  ./system/etc/01_Vendor_ti_omx.cfg in your file system,
  so as to use SW codecs from PVOMX components (picked up by
  ./system/etc/pvplayer.cfg).
 
  On Mon, May 3, 2010 at 6:23 PM, Uander uandro...@gmail.com wrote:
   Hello   ,
  
   I have a file a audio/3gp file that I can play in eclair-2.1 emulator
   but
   its throwing error on my Zoom2
   device  says Sorry , this player doesn't support this  type of audio
   file 
   .
  
   emulator will be using s/w codecs . while zoom2 has h/w codecs . The
   logic
   of  MMM framework is like if h/w codecs are not present it should
 look
   for
   s/w codec . if zoom2 is not finding h/w codec for my audio/3gp file ,
   it
   should search for s/w codec and play file , why does it fails with
   error ?
  
   How to disable hardware acceleration of codecs ?
  
   Please correct me If I am wrong .
  
  
  
  
   Thanks :
   Uander
  
   --
   You received this message because you are subscribed to the Google
   Groups
   android-platform group.
   To post to this group, send email to
 android-platf...@googlegroups.com.
   To unsubscribe from this group, send email to
   android-platform+unsubscr...@googlegroups.comandroid-platform%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group at
   http://groups.google.com/group/android-platform?hl=en.
  
 
  --
  unsubscribe: 
  android-porting+unsubscr...@googlegroups.comandroid-porting%2bunsubscr...@googlegroups.com
  website: http://groups.google.com/group/android-porting
 
  --
  You received this message because you are subscribed to the Google
 Groups
  android-platform group.
  To post to this group, send email to 

[android-developers] Re: Getting information from webview

2010-05-06 Thread absn
Hi,

I am developing a flickr application, in that for sign-in purpose I m
creating a login link(url)  and loading this url using
webView.loadUrl(url); and it redirects us to the flickr sign-in page.
this page contains two edittext one for yahoo id and other for
password, when user submit this information and click on sign-in
button , on this click event i want to fetch those entered value  for
username and password .

is it possible ??



On May 5, 4:45 pm, prachi prachi.tya...@wipro.com wrote:
 hiii

 Yeah it can be done..If that edit text is inside your webview---
 Inside the layout file give ur edittext and button inside the webview
 tag and in your program refer to that editText by its id given in xml
 file.

 Let me know if this is wat u want???

 On May 5, 11:44 am, absn amitbm...@gmail.com wrote:





  Hi all,

  I want to get the edittext value from webview(i.e My webview contains
  the edittext for username),
  Can anybody help me how to retrive them after clicking on some
  button of webview.

  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.com
  For more options, visit this group 
  athttp://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 
 athttp://groups.google.com/group/android-developers?hl=en- Hide quoted text -

 - Show quoted text -

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


[android-developers] Re: Getting information from webview

2010-05-06 Thread Anders Widen
This seams like a security issue, so I don't think it's made easy if
it's possible at all.

Ideas: There's something called formData that maybe can be used.
You could also read the onScreen keyboard, but that requires a special
permission.

On 6 Maj, 14:37, absn amitbm...@gmail.com wrote:
 Hi,

 I am developing a flickr application, in that for sign-in purpose I m
 creating a login link(url)  and loading this url using
 webView.loadUrl(url); and it redirects us to the flickr sign-in page.
 this page contains two edittext one for yahoo id and other for
 password, when user submit this information and click on sign-in
 button , on this click event i want to fetch those entered value  for
 username and password .

 is it possible ??

 On May 5, 4:45 pm, prachi prachi.tya...@wipro.com wrote:





  hiii

  Yeah it can be done..If that edit text is inside your webview---
  Inside the layout file give ur edittext and button inside the webview
  tag and in your program refer to that editText by its id given in xml
  file.

  Let me know if this is wat u want???

  On May 5, 11:44 am, absn amitbm...@gmail.com wrote:

   Hi all,

   I want to get the edittext value from webview(i.e My webview contains
   the edittext for username),
   Can anybody help me how to retrive them after clicking on some
   button of webview.

   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.com
   For more options, visit this group 
   athttp://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 
  athttp://groups.google.com/group/android-developers?hl=en-Hide quoted text -

  - Show quoted text -

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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] Re: How to fix java.lang.IllegalThreadStateExeception: Thread already started.

2010-05-06 Thread joebowbeer
In standard Java (not specific to Android), I would accomplish this by
scheduling a repeating TimerTask on a Timer.

Android provides a few other options, including postDelayed and
AsyncTask.

In this case, I would try to implement the progress indicator using
Android's animation framework.

Joe

On May 6, 12:10 am, MSChoi moon_...@hotmail.com wrote:
 I made an application which has a thread for a notification
 progressbar.

 First time I started the thread, it works fine.
 But Second time I tried to start the thread again, the application
 stop with the exception.

 How can I solve this problem?
 Please give me any clue.

 [==My thread code below==]
 private class ProgressThread extends Thread {
         Handler mHandler;
         final static int STATE_DONE = 0;
         final static int STATE_RUNNING = 1;
         int outIncreamentPercent;
         int mState;

         ProgressThread(Handler h) {
                 mHandler = h;
         }

         public void run() {
                 int i = 0;
                 setState(STATE_RUNNING);
                 while (mState == STATE_RUNNING) {

                         if (i  MAX_LOOP_COUNT) {
                                 setState(STATE_DONE);
                         } else {
                                 if (i % 100 == 0) {
                                         outIncreamentPercent = (int) 
 (((float) i / MAX_LOOP_COUNT) *
 100);
                                         
 rv.setProgressBar(R.id.customProgressBar,
 100,outIncreamentPercent, false);
                                         
 mNotificationManager.notify(NOTIFICATION_ID,notification);

                                         try {
                                                 Thread.sleep(100);
                                         } catch (InterruptedException e) {
                                                 // TODO Auto-generated catch 
 block
                                                 e.printStackTrace();
                                         }
                                 }
                         }
                         i = i + LOOP_INCREMENT;
                 }
                 super.run();
         } /* sets the current state for the thread, * used to stop the thread
 */
         public void setState(int state) {
                 mState = state;
         }

 }

 --
 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 
 athttp://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] Re: Screen off suspends the Thread

2010-05-06 Thread joebowbeer
This is by design.  Time stops for sleeping threads when the handset
is not awake.

However, the AlarmManager never sleeps -- well, in most
implementations:

http://community.developer.motorola.com/t5/Android-App-Development-for/AlarmManager-ELAPSED-REALTIME-WAKEUP-amp-RTC-WAKEUP-won-t-wake/td-p/4987

On May 6, 4:27 am, Raj lal.ra...@gmail.com wrote:
 Hi All,
 I have a created a thread in my application, and have a sleep for 5sec
 in the run() function. This sleep function returns properly after 5
 secs only if the device screen is turned ON. In case the device screen
 goes to Hibernate, sleep function returns after around 2-3
 minutes(instead of 5 sec).

 Have any one faced this issue earlier?

 Regards,
 Raj

 --
 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 
 athttp://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] Stopping other Activity from my Service..

2010-05-06 Thread Second Dancer
Just get the reference of the activity, can you achieve that?

On May 6, 2010 11:52 AM, Raj lal.ra...@gmail.com wrote:

Hi,
I want to stop an Activity that is in some other application from my
Applications service.
Is there any mechanism to do so?

Thanks,
Raj

--
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] Stopping other Activity from my Service..

2010-05-06 Thread Aditya
I don't think that it can be done!

Aditya

On Thu, May 6, 2010 at 6:30 PM, Second Dancer seconddan...@gmail.comwrote:

 Just get the reference of the activity, can you achieve that?

 On May 6, 2010 11:52 AM, Raj lal.ra...@gmail.com wrote:

 Hi,
 I want to stop an Activity that is in some other application from my
 Applications service.
 Is there any mechanism to do so?

 Thanks,
 Raj

 --
 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.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] Stopping other Activity from my Service..

2010-05-06 Thread Kostya Vasilyev

If that were possible, it'd be a massive security hole.


Raj lal.ra...@gmail.com писал(а) в своём письме Thu, 06 May 2010  
15:52:17 +0400:



Hi,
I want to stop an Activity that is in some other application from my
Applications service.
Is there any mechanism to do so?

Thanks,
Raj




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


--
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 draw smooth gradients?

2010-05-06 Thread fexpop
On 6 Mai, 14:23, blew pascal.jac...@gmail.com wrote:
 Why don't you put your bitmap888 when constructing your canvas888.

 Canvas canvas888 = new Canvas(bitmap888);


Ooops, that's because I wanted to edit the actual code I used for this
message. I added the 888 for clarity, but forgot so in the
constructor. In other words: A mistake in transcription ;-)

Nevertheless, in my actual code I'm really drawing on the canvas888
with bitmap888 behind it. The result is as stated above: Looks like
5-6-5.

Kind regards and thanks,

Felix

-- 
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 get screen height minus the title bar and status bar.

2010-05-06 Thread wtray
Hi rajesh

    I am new in android, i am getting the width and height for the
 screen using below code

             WindowManager w = getWindowManager();
             Display d = w.getDefaultDisplay();
             int totalwidth_screen = d.getWidth();
             int totalheight_screen = d.getHeight();

 But i need to get screen height minus the title bar and status bar.
 how to get it???

For instance you can add custom view (layout width and height are
equal to fill_parent) to your root FrameLayout and override
onSizeChanged method to get width and height needed. This is some hack
but it's work fine for me!

-- 
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 StateListDrawables not found in 1.5 but there from 1.6 onwards

2010-05-06 Thread Alok Kulkarni
Oh ok.. Thanks for that.. ill try that and will let you know...
Regards,
Alok.

On Thu, May 6, 2010 at 3:36 PM, skink psk...@gmail.com wrote:



 On May 6, 5:52 am, skink psk...@gmail.com wrote:
  reading this:
 http://groups.google.com/group/android-developers/msg/db8d63fd8575129c
  it seems ninePatches are created statically by aapt tool and if you
  want to create ninepatchdrawable dynamically from any file you would
  calculate chunk by yourself (ResourceTypes.h for its format)
 
  pskink

 so if creating NinePatcheDrawable is not an easy thing (due to binary
 chunk format) i thing the best idea for OP is to create custom
 drawable extending StateListDrawable

 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.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 custom option menu to arrange three menu items where 2 menu items are displayed at the top and the third below it.

2010-05-06 Thread D.Y
Anybody knows how to design custom option menu?

 

Any clue will be grateful…

 

Best Regards,

D.Y

 

  _  

发件人: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] 代表 TreKing
发送时间: 2010年4月30日 21:50
收件人: android-developers@googlegroups.com
主题: Re: [android-developers] How to custom option menu to arrange three
menu items where 2 menu items are displayed at the top and the third below
it.

 

2010/4/29 D.Y android.and...@gmail.com

Our UI Team has some professional idea that the menu layout like I told is
more friendly to the customer in my application,

 

I would argue that adhering to the standard conventions that the user is
accustomed to is more friendly to the customer. But then again, I'm no UI
expert with professional ideas.

 

and I can implement the menu as such in Activity but failed in ListActivity
with our own menu implementation.


If you can make it work in a standard Activity, there's really no reason it
can't work in a ListActivity.


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

-- 
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] Re: Wifi drop Issues on Motorola Droid

2010-05-06 Thread Zanshin
You're going to want to create a WifiManager.WifiLock
http://developer.android.com/intl/de/reference/android/net/wifi/WifiManager.WifiLock.html

This will likely solve most of your problem.  The rest can be solved
by my app. :P

The drop issues specific to the Droid, but happens on all Android
devices.

Hoping Google fixes in 2.2

On May 6, 4:52 am, KK krishnakumar.ramachand...@gmail.com wrote:
 I am trying to develop a streaming application and I am testing it on
 multiple devices. But I am seeing some problems on Motorola Droid with
 regards to wifi connection. The wifi connection drops occasionally and
 comes back in 30 seconds to 1 minute on the Droid. Sometimes while in
 the middle of streaming I get network connection errors even though I
 am standing very next to the wifi router. I am not finding this
 problem with any other devices. Has anyone found any similar issues
 with the Droid? Any idea what can be done in my program to fix this?

 Thanks
 KK

 --
 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 
 athttp://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] Re: How to disable home and other buttons so as to persist an app?

2010-05-06 Thread Mike dg
What are you trying to do? You could see that tons of things could go
wrong with an app that runs on boot and doesn't allow you to get away.

-Mike dg

On May 6, 3:07 am, Ashok Jeevan ashokjee...@gmail.com wrote:
 Hi guys,

 I am building an app which uses a WebView. This app runs at startup.

 Is there a way to maintain the app running(persists) even if the user
 presses the 'Home' or 'Back' button?

 In other words,pressing the 'Home', 'Back' or the other buttons shouldn't
 close the activity.

 Ashok Jeevan
 +91 9895401278

 --
 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 
 athttp://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] Re: Find the Current Address

2010-05-06 Thread Maps.Huge.Info (Maps API Guru)
What you're describing is reverse geocoding - search for that term.

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


Re: [android-developers] Accessing a Web Based Google Map from within an Android Application

2010-05-06 Thread TreKing
On Tue, May 4, 2010 at 6:05 AM, ali myrubbishm...@yahoo.co.uk wrote:

 a) I want to be able to:
 - access the location of user clicks
 - animateTo locations
 as I can currently do with a MapView and an inhouse Map and overlays
 etc.


OK, that's the easy part, as you said, you can already do that with a
MapView.


  b) I want to be able to access the Locations of, and textual content of
 Placemarks that have been defined within my map.


That's more tricky. You could try connecting to the very page you posted and
parsing the data.


 Also is there any way of Downloading the contents of the map to some sort
 of binary that could be packaged with the Android application without the
 need for an active web connection?


If this data is completely static and that's all you want to have in your
app, sure. You could just do this manually and package it with your app. If
it's not, you app could connect to the site, download the data it needs and
cache it to the SD card for use later.

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

-- 
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: Uploading large files - using setChunkedStreamingMode

2010-05-06 Thread Carmen Delessio
keianhzo,
Do you have an example of how you call this class?
I think I understand, but wanted to doublecheck.

I am using an HttpURLConnection with ChunkedStreaming mode to upload videos
to Facebook.
Using that mode successfully avoids running into memory issues, but I am not
successful in getting a response back from Facebook.

Carmen

  // Set up URL Connection for streaming
  HttpURLConnection conn = (HttpURLConnection)
connectURL.openConnection();
  conn.setDoInput(true);
  conn.setDoOutput(true);
  conn.setUseCaches(false);
  conn.setChunkedStreamingMode(
1000*1024);
  conn.setRequestMethod(POST);
  conn.setRequestProperty(Connection, Keep-Alive);
  conn.setRequestProperty(Content-Type,
  multipart/form-data;boundary=+boundary);



On Tue, Apr 27, 2010 at 7:53 PM, keianhzo imanol.mar...@gmail.com wrote:

 Hi,

 I had big headaches with this issue too, and finally opted for using
 sockets to upload big files otherwise any way tried always led me to
 the OutOfMemoryException or BufferOverflowException. So here is the
 code that works for me. All the meat is in the send() method, but I
 post the whole class for a better understanding. Feel free to use it
 or modify it to fit your needs if your find it useful:

 public class HttpMultipartClient {

public class Parameter {

private String name;
private String value;

public Parameter(String n, String v) {
name = n;
value = v;
}

public void setName(String n) {
name = n;
}

public void setValue(String v) {
value = v;
}

public String getName() {
return name;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return getName() + : + getValue();
}
}

private static final String TAG = HttpMultipartClient;

private static final int CONNECTION_TIMEOUT = 1;
private static final String END = \r\n;
private final String boundary = new Integer(new Random()
.nextInt(Integer.MAX_VALUE)).toString();
private final String lastBoundary = END + -- + boundary + -- +
 END;

private Socket socket;
private String host;
private int port;
private String path;
private String method;
private ListParameter headers;
private ListParameter cookies;
private ListParameter fields;
private String fileName;
private InputStream fileStream;
private int fileSize;
private int responseCode;
private String responseMessage;
private String responseBody;
private ListParameter responseHeaders;

private StringBuilder headersBuffer;
private StringBuilder bodyBuffer;
private long length = 0;

public HttpMultipartClient(String h, String pth, int p)
throws IllegalArgumentException {
if (h == null || h.length() == 0)
throw new IllegalArgumentException(Invalid host
 name: host= + h);
else {
host = h;
path = pth;
port = p;
socket = new Socket();
headers = new ArrayListParameter();
cookies = new ArrayListParameter();
fields = new ArrayListParameter();
responseHeaders = new ArrayListParameter();
responseBody = null;
}
}

public void disconnect() throws IOException {
socket.close();
}

public void addHeader(String name, String value)
throws IllegalArgumentException {
if (name == null || value == null)
throw new IllegalArgumentException(Header invalid:
 name= + name
+ , value= + value);
else {
headers.add(new Parameter(name, value));
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, Adding header [ + name + :  +
 value + ]);
}
}

public void addCookie(String name, String value)
throws IllegalArgumentException {
if (name == null || value == null)
throw new IllegalArgumentException(Cookie invalid:
 name= + name
+ , value= + value);
else {
cookies.add(new Parameter(name, value));
if (Log.isLoggable(TAG, 

[android-developers] Re: Wifi drop Issues on Motorola Droid

2010-05-06 Thread Zanshin
Whoops.  The drop issues aren't specific to the Droid, but happen on
all Android devices AFAIK.

On May 6, 6:56 am, Zanshin zanshin...@gmail.com wrote:
 You're going to want to create a 
 WifiManager.WifiLockhttp://developer.android.com/intl/de/reference/android/net/wifi/WifiM...

 This will likely solve most of your problem.  The rest can be solved
 by my app. :P

 The drop issues specific to the Droid, but happens on all Android
 devices.

 Hoping Google fixes in 2.2

 On May 6, 4:52 am, KK krishnakumar.ramachand...@gmail.com wrote:





  I am trying to develop a streaming application and I am testing it on
  multiple devices. But I am seeing some problems on Motorola Droid with
  regards to wifi connection. The wifi connection drops occasionally and
  comes back in 30 seconds to 1 minute on the Droid. Sometimes while in
  the middle of streaming I get network connection errors even though I
  am standing very next to the wifi router. I am not finding this
  problem with any other devices. Has anyone found any similar issues
  with the Droid? Any idea what can be done in my program to fix this?

  Thanks
  KK

  --
  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 
  athttp://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 
 athttp://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] MediaPlayer, AssetFileDescriptor and FileDescriptor doubt

2010-05-06 Thread Sebastián Treu
Hi,

I was wondering why I needed to do this to play a single file in MediaPlayer:

[code]

FileDescriptor  audioFd = null;
AssetFileDescriptor assetFd = null;
String fileName = audio/+lang+/+String.valueOf(code)+.mp3;

System.out.println(AUDIO FILE NAME: +fileName);

assetFd = ctx.getAssets().openFd(fileName);

System.out.println(assetFd.length(): +assetFd.getLength());

audioFd = assetFd.getFileDescriptor();

mp = new MediaPlayer();

mp.setDataSource(audioFd, 0, assetFd.getLength());
mp.prepare();
mp.start();
mp.setLooping(true);

[/code]


If I do:

[code]
audioFd = ctx.getAssets().openFd(fileName).getFileDescriptor();
mp = new MediaPlayer();
mp.setDataSource(audioFd);
[/code]

The media player is filled with the files within the directory I open
the AssetFileDescriptor. I mean, It plays the first file, the second,
and so on. Althought, assetFd.getLength() returns the correct length
of the file, when I get the file descriptor with getFileDescriptor(),
the MediaPlayer plays ALL the files, so reading the API I found the
setDataSource() method with helps me to play correctly only one file:

 public void  setDataSource  (FileDescriptor  fd, long offset, long length)

Could someone explain me to this please?

Thanks in advance,
-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

-- 
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: MediaPlayer, AssetFileDescriptor and FileDescriptor doubt

2010-05-06 Thread Sebastián Treu
 Could someone explain me to this please?


Sry, *to* should not be there, requestioning:

Could someone explain me this, please?

regards,

-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

-- 
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: Android : List View or Spinner - Need your help guys

2010-05-06 Thread Ramesh Sangili
Thanks so much

On Tue, May 4, 2010 at 9:38 AM, TreKing treking...@gmail.com wrote:

 2010/5/3 yidongsoft long...@gmail.com

 Customize a listview as:
 String[] lastName;
 String[] firstName;
 int[] ids;
 ...
 public object getItem(int position){
 return ids[position];
 }


 Please don't do this. Maintaining 3 (or more) separate lists where each
 item at a given position corresponds to the other items at the same index is
 just asking for trouble.

 Just have one structure that contains the data you need and have a SINGLE
 list of that object type.

 Also, having that getItem function return an Object when the array it's
 getting its data from is of int type makes no sense.



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

 --
 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] HTTP Bad Request when Posting File data to HTTPS from Phone But Not Emulator

2010-05-06 Thread Paul Tongyoo
Hi all--

I'm using HttpClient 3.x code to construct a MultipartEntity consisting of a
few strings and binary data and posting this data to my webserver.  What's
odd is that when executing these posts from my local emulator, my webserver
accepts the request fine and the data is posted.  However, executing this
same code from my mobile phones results in my webserver responding with an
HTTP 400 Bad Request response.  Is there a way for me to capture the data
being sent by my phone to confirm if there is any differences in data being
sent than what my emulator is sending?  Should there be any differences?

Thanks for any tips,
Paul

-- 
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] HTTP Bad Request when Posting File data to HTTPS from Phone But Not Emulator

2010-05-06 Thread Kevin Anthony
Do a tcp dump on the webserver when the requests come in from the emulator
and phone. Then compair the headers.

Just a quick thought, is the webserver behind a firewall?  If the emulator
is on a machine on the same network, that might be the cause

Kevin A

On May 6, 2010 12:23 PM, Paul Tongyoo paul.tong...@gmail.com wrote:

Hi all--

I'm using HttpClient 3.x code to construct a MultipartEntity consisting of a
few strings and binary data and posting this data to my webserver.  What's
odd is that when executing these posts from my local emulator, my webserver
accepts the request fine and the data is posted.  However, executing this
same code from my mobile phones results in my webserver responding with an
HTTP 400 Bad Request response.  Is there a way for me to capture the data
being sent by my phone to confirm if there is any differences in data being
sent than what my emulator is sending?  Should there be any differences?

Thanks for any tips,
Paul

-- 
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] Re: Abridged summary of android-developers@googlegroups.com - 83 Messages in 43 Topics

2010-05-06 Thread Matt Kanninen
Always work on stabilizing the new features first. ;)

On May 6, 9:40 am, Dave Arnold darn...@futurec.net wrote:
 Of course we can-do you want me to do that now or work on stabilizing the
 new features with QA?

 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of
 android-developers+nore...@googlegroups.com
 Sent: Wednesday, May 05, 2010 11:17 PM
 To: Abridged Recipients
 Subject: [android-developers] Abridged summary of
 android-developers@googlegroups.com - 83 Messages in 43 Topics

   Today's Topic Summary

 Group:http://groups.google.com/group/android-developers/topics

 *       TelephonyManager.getLine1Number()   returning null? [4 Updates]
 *       About maintaining the   state of the activity on orientation
 change [2 Updates]
 *       Any alternative of   iphone's searchable list in Android? [1
 Update]
 *       [android-kernel] A   simplest Application access Content
 Provider [3 Updates]
 *       Determine if my   application is visible on screen [1 Update]
 *       Loading and displaying   an image from a resource [1 Update]
 *       Speed issue: content   provider vs plain sqlite db [1 Update]
 *       how to handle the Dpad   event in headview/footview of listview?
 [1 Update]
 *       MediaStore.Audio   [1 Update]
 *       How to create Android   library in Eclipse? [1 Update]
 *       Soft Keyboard   Candidate View problem [1 Update]
 *       send dtmf   [1 Update]
 *       ubuntu 10.04 emulator   not launching [2 Updates]
 *       Porting MAME on   Android? [1 Update]
 *       Sliding Drawer   question [1 Update]
 *       finish an activity not   started from current activity [2 Updates]
 *       Simple LinearLayout   doesn't work [1 Update]
 *       Connecting to   bluetooth devices [2 Updates]
 *       CalendarSyncAdapter   always sending event notifications [1
 Update]
 *       Gps Signal Strength   [1 Update]
 *       mounting and   unmountind USB storage from Java App [1 Update]
 *       Problem with Saving   and opening file on moto-droid [1 Update]
 *       JUnit testing:   Question; How the 'unlock' screen be
 avoided/closed? [4 Updates]
 *       Error trying to use   XML Layout and extended GLSurfaceView [3
 Updates]
 *       I've found a way to   stop piracy of my apps [9 Updates]
 *       Problem updating widget   in emulator [1 Update]
 *       Invitation to connect   on LinkedIn [1 Update]
 *       Change text size and   color of listview [3 Updates]
 *       how to measure video   file size? [1 Update]
 *       How to send the Email   [1 Update]
 *       APK files   [1 Update]
 *       Looking for advice   into best way to store images within app [2
 Updates]
 *       EditText Image   changing look when given at runtime. [2 Updates]
 *       Widget Auto Install   [2 Updates]
 *       Adding child views   [10 Updates]
 *       AudioRecord delay in   recording [1 Update]
 *       XMPP service, jabber ,   push notification [1 Update]
 *       Download multiple   objects from the same server [2 Updates]
 *       how to get screen   height minus the title bar and status bar. [1
 Update]
 *       Activity and view   inflation [1 Update]
 *       updating a contact in   2.x Contacts API [1 Update]
 *       TextView cuts off part   of an initial capital J [1 Update]
 *       Problem with   StateListDrawables not found in 1.5 but there from
 1.6 onwards [4 Updates]

  Topic: TelephonyManager.getLine1Number() returning null?
 http://groups.google.com/group/android-developers/t/995f4bb277496fd5

 David Given d...@cowlark.com May 05 05:32PM +0100 ^ 

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 05/05/10 12:48, Mark Ellul wrote: I was informed that its a SIM issue, 
 and that some SIM cards do not
  store the telephone number in the more...

 http://groups.google.com/group/android-developers/msg/9bb862c1d1ee4335

 Vinay S s.vinay@gmail.com May 05 10:41PM -0700 ^ 

 Hi David,

 Pl. try this code..

 TelephonyManager tMgr = (TelephonyManager)
 getSystemService(Context.TELEPHONY_SERVICE) ;
 Log.d(+tMgr.getLine1Number() ) ;

 -Vinay

 --
 more...
 http://groups.google.com/group/android-developers/msg/d5764c2b28ef2403

 Vinay S s.vinay@gmail.com May 05 10:48PM -0700 ^ 

 Hi,

 Are you sure, you are getting the context correctly..?
 Are you able to get other deatils, like Network type phone type, sim
 status etc?

 -Vinay

 --
 You received this message because more...
 http://groups.google.com/group/android-developers/msg/6a42e80d19ecef9e

 Second Dancer seconddan...@gmail.com May 06 02:13PM +0800 ^ 

 You can get an reflection call on the internal Api

 On May 6, 2010 5:48 AM, Vinay S s.vinay@gmail.com wrote:

 Hi,

 Are you sure, you are getting the context correctly..? more...
 http://groups.google.com/group/android-developers/msg/d9d0ac6d4494cc8

  Topic: About maintaining the state of the activity on orientation
 http://groups.google.com/group/android-developers/t/52469c491712831
 change

 ameya dandekar 

[android-developers] Possible Solution found: JUnit testing: Question; How the 'unlock' screen be avoided/closed?

2010-05-06 Thread Streets Of Boston
I found a solution to this problem. It is a bit of a hack, but it
seems to work.

1. I create a very simple activity (SDK 1.5)
NoUnlockScreenActivity.java
   that does just this in its onCreate method:

KeyguardManager keyguardManager =
(KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock =
keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
lock.disableKeyguard();
finish();

2. Be sure to put this in your Manifest file:
uses-permission android:name=android.permission.DISABLE_KEYGUARD/
uses-permission android:name=android.permission.READ_PHONE_STATE/
(WRITE_EXTERNAL_STORAGE may be necessary as well for higher version
SDKs).

3. After starting the emulator, do these adb commands:
set SN= ... your emulator serial-num ...
adb -s %SN% wait-for-device
adb -s %SN% shell sleep 30
adb -s %SN% install -r C:\NoUnlockScreen.apk
adb -s %SN% shell am start -n nounlock_package/
nounlock_package.NoUnlockScreenActivity

From this moment you can run the (re)installation of your actual app
and test-app and run the 'shell am instrument' to run your test-app.

On May 5, 4:05 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
 I'm writing some JUnit tests for my Android Activity.
 They run fine and report proper results.

 However, when i automate the test and start the emulator, the emulator
 starts with an unlock screen. This prevents the test from running
 correctly.

 How do I start an emulator without the unlock screen so that it's
 ready to run a test immediately?
 Are there commands in the emulator.exe or adb.exe that can close/
 remove the unlock screen?

 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 
 athttp://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] Re: Problem with Saving and opening file on moto-droid

2010-05-06 Thread André
Thanks both of you for your answering. I'm waiting for a guy getting
back to me with a stacktrace of the problem.

I have declared the permission in the manifest file. Does it matter
where I declare it in the file?

The strange thing is that it works fine on some devices and not at all
on others. So far I have got reports of this problem on moto droid,
htc hero sprint and g1.

-André

On May 5, 11:04 pm, niko20 nikolatesl...@yahoo.com wrote:
 As mentioned, on Android 1.6 and up your app needs to declare the
 WRITE_EXTERNAL_STORAGE permission in it's manifest file or all sdcard
 write calls will fail.

 -niko

 On May 4, 10:02 am, TreKing treking...@gmail.com wrote:





  On Mon, May 3, 2010 at 4:50 PM, André pha...@hotmail.com wrote:
   Sorry, it force closes on reading in a file. And can't write to sdcard on
   write.

  I assume you have the EXTERNAL_STORAGE permission, of course?

  Besides that, your best option is to get a stacktrace of the problem to see
  exactly where you're going wrong. See if you can get a friendly user to help
  you out or find someone you know with a Droid to test on.

  On Tue, May 4, 2010 at 3:33 AM, André pha...@hotmail.com wrote:
   No one knows why this could be?

  If no one responded, apparently not ...

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

  --
  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 
  athttp://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 
 athttp://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 getId() for non-unique id's

2010-05-06 Thread yaturner
I have an array of RelativeLayouts that all contain the same views, so
thinking myself clever I used the same id's for each view, e.g.

view1.setid( R.id.View1 );
view2.setId( R.id.View2 );

when I create the layouts in my Java code. To access them I first get
the RelativeLayout and then use

for( i=0 i  10; i++ )
{
 rl = (RelativeLayout)findViewById(LayoutIds[i] );
 view1 = (ImageView)rl.findViewById( R.id.View1 );
 id = view1.getId();
}
my problem is that when I call

view1.getId();

I always get the same value for every pass thru the loop , if go into
the debugger and inspect view1, it always has a unique id for each
value of i, but it is not the same as what getId() returns

what am I missing?

-- 
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] Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required!

2010-05-06 Thread Abhi
Hi

The above error occurs when I do the following.

I have a text file with multiple lines of data. Within my application
I come across the need to replace a line from the file with a new one.
I am using BufferedReader with a fixed size (50k) to read the file
into as below:

FileReader input_redo = new FileReader(redo);
BufferedReader reader = new BufferedReader(input_redo);

  String line = , oldtext = ;

 while((line = reader.readLine()) != null)
 {
 oldtext += line + \r\n;
 }
 reader.close();
 String newtext = oldtext.replaceAll(Hello how are you, Have I
met you before?);

 FileWriter writer = new FileWriter(/sdcard/data/replace.txt);
 writer.write(newtext);
 writer.close();


Could anyone please help me out with this error? I know the device is
running out of memory bcoz of the buffer size or something but don't
know a work around for this. Please help

Abhi

-- 
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 upgrade my Android dev Phone 1 to 2.x release?

2010-05-06 Thread Anders
how? any good links to a how-to that works and is up to date?

On Mar 27, 10:24 pm, russ.a.mor...@gmail.com wrote:
 Yes I believe you can.
 Sent from my BlackBerry® device from Digicel

 -Original Message-
 From: Joe droidvi...@gmail.com
 Date: Sat, 27 Mar 2010 13:19:01
 To: Android Developersandroid-developers@googlegroups.com
 Subject: [android-developers] How to upgrade my Android dev Phone 1 to 2.x

         release?

 Is it possible to upgrade Android dev phone (the first version) to
 latest release (either 2.0 or 2.1)?

 I appreciate if you can point me right links.

 Thanks
 Joe

 --
 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 
 athttp://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to 
 android-developers+unsubscribegooglegroups.com or reply to this email with 
 the words REMOVE ME as the subject.

-- 
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 Saving and opening file on moto-droid

2010-05-06 Thread TreKing
On Thu, May 6, 2010 at 11:49 AM, André pha...@hotmail.com wrote:

 Does it matter where I declare it in the file?


Well, yeah - you can't just put it anywhere. Maybe post that part of your
manifest to double check.

For example, mine looks like this:
uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/
and it's a child of the root manifest node.

But I would expect the build process to throw an error if it were in the
wrong place. And it would fail miserably on all post 1.5 devices (and the
emulator, one would assume) if that were the case.


 The strange thing is that it works fine on some devices and not at all on
 others. So far I have got reports of this problem on moto droid, htc hero
 sprint and g1.


I don't know about the Hero, but if it's past 1.5, the permission seems like
a likely culprit.

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

-- 
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] On click enlarge the image

2010-05-06 Thread pawan nimje
Hi All,

I have a textview and an imagebutton.

textview has the description about the image[which is there in imagebutton]

Now on clickin the image button i want the imagebutton to occupy the whole
screen and on clicking this i want the imagebutton back to normal position

plz help ...

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

Re: [android-developers] HTTP Bad Request when Posting File data to HTTPS from Phone But Not Emulator

2010-05-06 Thread Paul Tongyoo
Thanks Kevin, I'll give that a shot!

On Thu, May 6, 2010 at 9:45 AM, Kevin Anthony kevin.s.anth...@gmail.comwrote:

 Do a tcp dump on the webserver when the requests come in from the emulator
 and phone. Then compair the headers.

 Just a quick thought, is the webserver behind a firewall?  If the emulator
 is on a machine on the same network, that might be the cause

 Kevin A

 On May 6, 2010 12:23 PM, Paul Tongyoo paul.tong...@gmail.com wrote:

 Hi all--

 I'm using HttpClient 3.x code to construct a MultipartEntity consisting of
 a few strings and binary data and posting this data to my webserver.  What's
 odd is that when executing these posts from my local emulator, my webserver
 accepts the request fine and the data is posted.  However, executing this
 same code from my mobile phones results in my webserver responding with an
 HTTP 400 Bad Request response.  Is there a way for me to capture the data
 being sent by my phone to confirm if there is any differences in data being
 sent than what my emulator is sending?  Should there be any differences?

 Thanks for any tips,
 Paul

 --
 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.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] AlertDialog and keyboard open configuration change

2010-05-06 Thread Julian Bunn
My app creates and shows an AlertDialog which accepts input from the
user (the user needs to type some text into an EditInput).

With the AlertDialog on screen, if the user opens up the keyboard on
the device, then the app's OnCreate and OnResume methods are called
and my AlertDialog promptly disappears from the screen ... not the
effect I was hoping for!

I thought that perhaps I needed to override the Activity's
onConfigurationChanged method, but despite having the following in my
Manifest:

application android:icon=@drawable/icon
 
android:configChanges=keyboardHidden|orientation
 android:label=@string/app_name
 android:launchMode=singleTask
 android:debuggable=true

my overriden method is never called when the keyboard is opened. And,
even if it was, it's not clear to me what I would need to do to avoid
the AlertDialog from disappearing!

I'd be grateful for some advice :-)

Julian

-- 
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] Conditional compile and porting techniques.

2010-05-06 Thread Leigh McRae

Hello,

I thought I would share what I came up with to manage my port from 
BlackBerry to Android.  Perhaps it can save someone sometime.


NetBeans has really good support to filter source trees and also has a 
target based preprocessor.   These two features alone will solve all 
porting problems IMHO.  Parts of the port can be done with interfaces or 
mirrored code but other parts need a preprocessor.  I did managed to get 
Android to work with NetBeans using the android tool to create a 
build.xml but unfortunately debugging still isn't that hot so I 
abandoned it.  BTW if you're having trouble connecting with the NetBeams 
debugger, try using localhost instead of the computer name or IP.


I have now switched to Eclipse since both Google and RIM have decided 
it's the standard.  I have found that while Eclipse has options to 
refresh resources that in practice it really doesn't want you to edit 
files outside of the IDE.  Also the ant integration is complete crap.


*Solution:

*I determined that really for the most part you develop in the same 
'config' most of the time.  A config being, BlackBerry debug or Android 
debug.  So I felt it acceptable to have the source be configured how you 
want it and then edit/debug in Eclipse.  This is how I did it.*

*
Install Antenna -  http://antenna.sourceforge.net/

Antenna is an open source group of ant tasks, one of which is a 
preprocessor task.  The preproccessor directives are all inside of 
comments so the IDE doesn't get confused.  All line numbers stay the 
same.  Even better, Antenna will comment out all the lines of source for 
the path that isn't valid and uncomment the lines for the valid path. 
This allows for the IDE to understand the code.  The preprocessor in 
RIMs rapc doesn't comment out dead paths and so you can get false errors 
from your IDE.


My project has a root with a common source tree and Eclipse projects for 
BlackBerry and Android. At the root I have an ant build file that is 
used to preprocess ALL of the source.  The ant file has targets called 
blackberry and android. Both require a target to be set from the command 
line.  The preprocessor will then be fed defines for the platform and 
target. So I use commands like:


ant android -Dtarget=DEBUG

This preprocesses the source tree with PLATFORM_ANDROID and DEBUG 
defined.  If you feel dirty at this point, don't bother hitting reply 
and getting all offside on me.


If you're still here, the preprocessor then overwrites the source tree 
with processed versions. This is alright since Antenna preprocessing 
isn't one way.  I can switch to blackberry or release at anytime without 
a problem.  Since I have ant build files for releasing my final builds I 
was very concerned that I could end up with a debug build for a 
release.  So in the top build file I added the creation of properties 
that indicate the current config of the source.


propertyfile file=source.properties
entry  key=source.platform value=android/
entry  key=source.target value=${target}/
/propertyfile

Now when I deploy I can verify that it's using the correct source.  
Really the BlackBerry build won't compile when the source is in Android 
mode anyway way so that isn't an issue.  It's more for making sure I 
release without diagnostics or back door tweaks.


Oh, I have gotten into the habit of checking in always using the same 
source config so you don't accumulate unnecessary revisions.


Comments welcomed.


--
Leigh McRae
www.lonedwarfgames.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.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Quick logcat question

2010-05-06 Thread redders
I fear the answer is no, but before I change the structure of all of
my log messages:

Is there any way to do this:
$ adb logcat *:S com.myappname.*:V

Or in words: I want to silence every tag that goes to logcat except
the ones that begin with com.myappname. Currently my classes print
into the log with this.getClass().getName() as the tag - typing each
tag out individually in the filter isn't an option, so is there anyway
to use the wildcard?

The above command doesn't work, because it just silences every class,
including the ones I've explicitly told to be verbal.
I've also tried:

$ adb logcat -s com.myappname.*:V
$ adb logcat com.myappname.*:V *:S

to no avail.

I have a feeling I might have to log in a more constant fashion. Or I
might just use log4J.
Any help/suggestions appreciated - perhaps you use a static log class?

Let me know,
Cheers,
~redders

-- 
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] Quick logcat question

2010-05-06 Thread Kostya Vasilyev

Pipe the output of logcat through grep - if you are on Linux.

Or pipe through find if on Windows.

Like this:


adb logcat | find com.myappname


-- Kostya

redders redders6...@googlemail.com писал(а) в своём письме Thu, 06 May  
2010 22:55:32 +0400:



I fear the answer is no, but before I change the structure of all of
my log messages:

Is there any way to do this:
$ adb logcat *:S com.myappname.*:V

Or in words: I want to silence every tag that goes to logcat except
the ones that begin with com.myappname. Currently my classes print
into the log with this.getClass().getName() as the tag - typing each
tag out individually in the filter isn't an option, so is there anyway
to use the wildcard?

The above command doesn't work, because it just silences every class,
including the ones I've explicitly told to be verbal.
I've also tried:

$ adb logcat -s com.myappname.*:V
$ adb logcat com.myappname.*:V *:S

to no avail.

I have a feeling I might have to log in a more constant fashion. Or I
might just use log4J.
Any help/suggestions appreciated - perhaps you use a static log class?

Let me know,
Cheers,
~redders




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


--
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] Quick logcat question

2010-05-06 Thread Galbayar D
Hi
why you don't use grep?

$ adb logcat|grep myappname

On Fri, May 7, 2010 at 3:55 AM, redders redders6...@googlemail.com wrote:
 I fear the answer is no, but before I change the structure of all of
 my log messages:

 Is there any way to do this:
 $ adb logcat *:S com.myappname.*:V

 Or in words: I want to silence every tag that goes to logcat except
 the ones that begin with com.myappname. Currently my classes print
 into the log with this.getClass().getName() as the tag - typing each
 tag out individually in the filter isn't an option, so is there anyway
 to use the wildcard?

 The above command doesn't work, because it just silences every class,
 including the ones I've explicitly told to be verbal.
 I've also tried:

 $ adb logcat -s com.myappname.*:V
 $ adb logcat com.myappname.*:V *:S

 to no avail.

 I have a feeling I might have to log in a more constant fashion. Or I
 might just use log4J.
 Any help/suggestions appreciated - perhaps you use a static log class?

 Let me know,
 Cheers,
 ~redders

 --
 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] Re: Accessing a Web Based Google Map from within an Android Application

2010-05-06 Thread Maps.Huge.Info (Maps API Guru)
If you're trying to do this with a v2 map, you're probably going to
have trouble on multiple levels... a v3 map works a lot better and
doesn't require a key.


 a) I want to be able to:
 - access the location of user clicks
 - animateTo locations
 as I can currently do with a MapView and an inhouse Map and overlays
 etc.


You should be able to do this, however, an inhouse map suggests it's
not on the open internet, that could run afoul of the terms unless you
have the premiere license.

 b) I want to be able to access the Locations of, and textual content
 of Placemarks that have been defined within my map.


That should work.


 Also is there any way of Downloading the contents of the map to some
 sort of binary that could be packaged with the Android application
 without the need for an active web connection?

Not possible with the web based Google Maps API. You need an active
internet connection to use this API.

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


Re: [android-developers] On click enlarge the image

2010-05-06 Thread TreKing
On Thu, May 6, 2010 at 1:04 PM, pawan nimje pawanni...@gmail.com wrote:

 plz help ...


With what? You didn't actually ask a question, indicate which part
SPECIFICALLY you're having trouble with, or what you have already tried that
isn't working. There are a myriad of different things you could do depending
on what EXACTLY you're trying to do (popup, separate activity, enlarge the
button itself, etc ).

Clarify you question and maybe you'll get a good response.

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

-- 
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] AlertDialog and keyboard open configuration change

2010-05-06 Thread TreKing
On Thu, May 6, 2010 at 1:28 PM, Julian Bunn jjb...@gmail.com wrote:

 And, even if it was, it's not clear to me what I would need to do to
 avoid the AlertDialog from disappearing!


How are you showing the dialog? If you're using Activity.showDialog(int), it
will maintain the dialog's state and keep it shown across orientation
change. If you're just using Dialog.show(), it's up to you to restore the
dialog's state. Prefer the former over the latter.

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

-- 
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: I've found a way to stop piracy of my apps

2010-05-06 Thread strazzere
As you could also note - there is nothing in Android-Market-Api's
license against this type of use.

Whether he used their code or not - I'm not sure, but basing it off of
the User Agent is sort of a big leap of conclusions. That user agent
is pretty common on the android devices ;)

It's not as if the user-agent is Android-Market-Api-v1.

-Tim

On May 6, 3:47 am, a1 arco...@gmail.com wrote:
 It uses this project:http://code.google.com/p/android-market-api/,
 you can do same, just note that in proto purchased field is missing,
 but you can simply extend App message in market.proto, purchased field
 has id 34.

 --
 Regards,
 Bart Janusz (Beepstreet)

 On May 6, 8:22 am, Edward  Falk ed.f...@gmail.com wrote:



  Intriguing.  I was wondering if maybe you could add a blurb to your
  web site explaining in simple terms how it works.  E.g. when the API
  is called, it communicates with the Android Market to verify your key;
  once verified, the verification code is remembered so that no further
  calls to the market are needed.  Or perhaps instead of Android
  Market, it's our servers.  Or whatever.  How *does* it work?

  And if it's your servers (or even the Android Market), what happens to
  users when the servers go down?  This is the biggest problem with any
  kind of server-based DRM.  Do they lose their apps?  Is there an
  alternative recovery plan?

  --
  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 
  athttp://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 
 athttp://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] Quick logcat question

2010-05-06 Thread Edward Hinchliffe
grep worked great, thanks both.

I noticed
$ adb logcat | grep com.myappname
Picks up a couple of other internal android messages (intents etc) which
might be useful, but you can also get rid of those like this:
$ adb logcat | grep /com.myappname

Awesome, thanks again :)

2010/5/6 Kostya Vasilyev kmans...@gmail.com

 Pipe the output of logcat through grep - if you are on Linux.

 Or pipe through find if on Windows.

 Like this:

  adb logcat | find com.myappname


 -- Kostya

 redders redders6...@googlemail.com писал(а) в своём письме Thu, 06 May
 2010 22:55:32 +0400:


  I fear the answer is no, but before I change the structure of all of
 my log messages:

 Is there any way to do this:
 $ adb logcat *:S com.myappname.*:V

 Or in words: I want to silence every tag that goes to logcat except
 the ones that begin with com.myappname. Currently my classes print
 into the log with this.getClass().getName() as the tag - typing each
 tag out individually in the filter isn't an option, so is there anyway
 to use the wildcard?

 The above command doesn't work, because it just silences every class,
 including the ones I've explicitly told to be verbal.
 I've also tried:

 $ adb logcat -s com.myappname.*:V
 $ adb logcat com.myappname.*:V *:S

 to no avail.

 I have a feeling I might have to log in a more constant fashion. Or I
 might just use log4J.
 Any help/suggestions appreciated - perhaps you use a static log class?

 Let me know,
 Cheers,
 ~redders



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

 --
 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] Re: Problem with Saving and opening file on moto-droid

2010-05-06 Thread André
Here is the manifest. Where the line of stars are is where I think I
had the permission line first and I just moved it to the bottom.
Is this correct?


?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=#
  android:versionCode=2
  android:versionName=2.0.1
application android:icon=@drawable/icon android:label=@string/
app_name
*
activity android:name=.# android:label=@string/
app_name android:theme=@android:style/Theme.NoTitleBar 
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
activity android:name=.# android:theme=@android:style/
Theme.NoTitleBar android:windowSoftInputMode=stateVisible|
adjustResize /
activity android:name=.# android:theme=@android:style/
Theme.NoTitleBar android:windowSoftInputMode=stateVisible|
adjustResize/
activity android:name=.# android:theme=@android:style/
Theme.NoTitleBar android:windowSoftInputMode=stateVisible|
adjustResize /
activity android:name=.# android:theme=@android:style/
Theme.NoTitleBar android:windowSoftInputMode=stateVisible|
adjustResize /
activity android:name=.# android:theme=@android:style/
Theme.NoTitleBar android:windowSoftInputMode=stateVisible|
adjustResize /
activity android:name=.# android:theme=@android:style/
Theme.NoTitleBar android:windowSoftInputMode=stateVisible|
adjustResize /
/application
uses-sdk android:minSdkVersion=4 /
uses-permission
android:name=android.permission.WRITE_EXTERNAL_STORAGE /
/manifest

On May 6, 8:02 pm, TreKing treking...@gmail.com wrote:
 On Thu, May 6, 2010 at 11:49 AM, André pha...@hotmail.com wrote:
  Does it matter where I declare it in the file?

 Well, yeah - you can't just put it anywhere. Maybe post that part of your
 manifest to double check.

 For example, mine looks like this:
 uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/
 and it's a child of the root manifest node.

 But I would expect the build process to throw an error if it were in the
 wrong place. And it would fail miserably on all post 1.5 devices (and the
 emulator, one would assume) if that were the case.

  The strange thing is that it works fine on some devices and not at all on
  others. So far I have got reports of this problem on moto droid, htc hero
  sprint and g1.

 I don't know about the Hero, but if it's past 1.5, the permission seems like
 a likely culprit.

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

 --
 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 
 athttp://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] On click enlarge the image

2010-05-06 Thread pawan nimje
hey trekingapp,

tell me how can i set x,y co-ordinate of any view [in my case imagebutton]
from code i.e

dynamically/programatically

-

the below code wont work because its part of a application

activity::
--
public class About extends Activity
{
TextView tvDesc = null;
ImageButton ibMap = null;
private countrydata cntrydata = new countrydata(this);
 @Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
setContentView(R.layout.about2);

tvDesc = (TextView) findViewById(R.id.tvDesc);
ibMap = (ImageButton)findViewById(R.id.ibMap);
tvDesc.setText(CountryDescription);
int resId = getResources().getIdentifier(in_map, drawable,
pkg.DestMsgs);
ibMap.setBackgroundResource(resId);


ibMap.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
   //here i have to write code
for enlarging the imagebutton
}
});
}
}
--


this is my xml :


?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=@color/white


AbsoluteLayout
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#
ScrollView
android:layout_x=20dip
android:layout_y=20dip
android:layout_height=141dip
android:layout_width=280dip
TextView
android:id=@+id/tvDesc
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=@color/white
android:textColor=@color/black
/TextView
/ScrollView
ImageButton
android:id=@+id/ibMap
android:layout_x=20dip
android:layout_y=180dip
android:layout_width=280dip
android:layout_height=140dip
/ImageButton
TextView
android:id=@+id/tvTouch
android:layout_x=20dip
android:layout_y=320dip
android:text=@string/touch
android:gravity=center
android:textColor=@color/black
/TextView

/AbsoluteLayout

/RelativeLayout

---

On Fri, May 7, 2010 at 12:41 AM, TreKing treking...@gmail.com wrote:

 On Thu, May 6, 2010 at 1:04 PM, pawan nimje pawanni...@gmail.com wrote:

 plz help ...


 With what? You didn't actually ask a question, indicate which part
 SPECIFICALLY you're having trouble with, or what you have already tried that
 isn't working. There are a myriad of different things you could do depending
 on what EXACTLY you're trying to do (popup, separate activity, enlarge the
 button itself, etc ).

 Clarify you question and maybe you'll get a good response.


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

 --
 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] Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required!

2010-05-06 Thread Al
This isn't an error, it's just a message to inform you it is better to
specify the size of the buffer you need in the constructor.

Abhi wrote:
   String line = , oldtext = ;

  while((line = reader.readLine()) != null)
  {
  oldtext += line + \r\n;
  }

Don't do that, use a StringBuilder and StringBuilder#append() instead.
String concatenation like the way you are doing it slows things down
and creates more objects.

-- 
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 Saving and opening file on moto-droid

2010-05-06 Thread TreKing
On Thu, May 6, 2010 at 2:26 PM, André pha...@hotmail.com wrote:

 Is this correct?


Think so - that's how I have mine set up and it works just fine.

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

-- 
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: I've found a way to stop piracy of my apps

2010-05-06 Thread a1


On May 6, 9:18 pm, strazzere str...@gmail.com wrote:
 As you could also note - there is nothing in Android-Market-Api's
 license against this type of use.

Yes there is, google APIs services in point 5.3 states that you are
not allowed to use undocumented APIs:

5.3 You agree not to access (or attempt to access) any of the
Services by any means other than through the interface that is
provided by Google, unless you have been specifically allowed to do so
in a separate agreement with Google. You specifically agree not to
access (or attempt to access) any of the Services through any
automated means (including use of scripts or web crawlers) and shall
ensure that you comply with the instructions set out in any robots.txt
file present on the Services.

moreover in point 5.5:

5.5 Unless you have been specifically permitted to do so in a
separate agreement with Google, you agree that you will not reproduce,
duplicate, copy, sell, trade or resell the Services for any purpose.


 Whether he used their code or not - I'm not sure, but basing it off of
 the User Agent is sort of a big leap of conclusions. That user agent
 is pretty common on the android devices ;)

No, each device uses different UA string when executing market request
(it contains device name and build id), therefore there is a lot of
possible combination that can be used. Also library that this guy try
to sell is based on google's protobuf, which android market api
project also uses.

Don't get me wrong I have game on android market, it features online
highscore and each online highscore entry stores AID (for
identification purposes), with 10k legitimate copies I've counted 16k
distinct AIDs in database that means that at lease 6k (probably more
as not everybody uses highscore) copies were pirated, so I'd really
welcome some form of DRM, but charging $300 for lib that reuses some
open source project (without mentioning it) and which legality is at
least disputable (due to usage of undocumented google service) is kind
of shady.

--
Regards,
Bart Janusz (Beepstreet)

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


  1   2   >