[android-developers] Re: fast removing SurfaceView

2009-06-24 Thread skink



On 24 Cze, 01:14, Dianne Hackborn hack...@android.com wrote:
 Fyi, I would guess the problem has to do with loading and initializing your
 view hierarchy, and not with the previous surface view.  Have you tried
 launching with just the second hierarchy and not the surface view to see how
 fast it is?



Dianne,

yes i have, and it worked pretty fast (just half second or so)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 createBitmap method

2009-06-24 Thread hamlatzis

Thank you all for your reply.

I've tried the above solution and it works perfectly. I was reluctant
to do so, since in the documentation it says:


public void recycle ()
Free up the memory associated with this bitmap's pixels, and mark the
bitmap as dead, meaning it will throw an exception if getPixels() or
setPixels() is called, and will draw nothing. This operation cannot be
reversed, so it should only be called if you are sure there are no
further uses for the bitmap. This is an advanced call, and normally
need not be called, since the normal GC process will free up this
memory when there are no more references to this bitmap.


The same applies for calling the GC implicitly. It's something that we
should not have to do.

Anyway, thank you all.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Get a unique string / serial number?

2009-06-24 Thread Al Sutton

You might want to look at 
http://andappstore.com/AndroidPhoneApplications/licensing_4.jsp

Sections 4(c)(i) to (iv) detail how to get and test various IDs
available, the Android ID *may* be what you're looking for, but
because Android is an open OS there is no absolute guarentee that all
Android devices will have unique identifiers.

Al.

On Jun 23, 5:58 pm, dapaintballer331 dapaintballer...@gmail.com
wrote:
 Is there any way to get some type of serial number or unique string,
 that no other android device should have?

 It can't be relative to the sim card, I'm looking for some type of
 hardware identification number...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Android Developers group.
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] testing uses-permission

2009-06-24 Thread Sheado

howdy,

i'm prepping my first app for publishing and am a bit confused about
how to properly test my uses-permission tags.. if i don't specify
any permissions my app runs with no complaints on my G1. I tried
installing it via adb install as well as with the eoeAppInstaller
(as somebody had recommended). Also, the app is signed with my own
certificate (not the debug cert).

given that it works fine with no permissions (btw, it accesses camera
and sd card), how will I know if I've set all of the proper uses-
permission tags?

what's the proper way to test uses-permission tags?


thank you!!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: AnalogClock AppWidget dial.

2009-06-24 Thread Jeff Sharkey

AnalogClock doesn't directly provide methods to change its drawables.
One approach you could use would be to have two layout files, one each
for AM and PM, and build a new RemoteViews targeting the correct
layout when building updates.

j

On Tue, Jun 23, 2009 at 9:54 PM, Raviravikumar...@gmail.com wrote:

 Using Appwidgets, If we use TextView in layout provider xml then, we
 are able to set the text in Provider.java using
 remoteViews.setTextViewText() method.

 Similarly, if I use AnalogClock as AppWidget in xml then, is there any
 method available to change the android:dial value using RemoteViews or
 AnalogClock api's in Provider.java ?

 For Ex- I need to load two dial png's based on AM or PM.

 Please help me.
 




-- 
Jeff Sharkey
jshar...@android.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] findviewbyid in service?

2009-06-24 Thread brilliant winger

HI!


I develop an application.
This don't use activity class.
only use service class..

I need method(findviewbyid). but service don't have this method.

how to use?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: AnalogClock AppWidget dial.

2009-06-24 Thread Ravi

Hi Jeff, Thnz for the reply...
Well, I feel tht there should be AnalogClock Api's to modify it's
drawables atleast in next SDK version.
Right now, I'am goin to make use of a single layout  change it's dial
making use of Remote view's visiblity option.

On Jun 24, 1:13 pm, Jeff Sharkey jshar...@android.com wrote:
 AnalogClock doesn't directly provide methods to change its drawables.
 One approach you could use would be to have two layout files, one each
 for AM and PM, and build a new RemoteViews targeting the correct
 layout when building updates.

 j

 On Tue, Jun 23, 2009 at 9:54 PM, Raviravikumar...@gmail.com wrote:

  Using Appwidgets, If we use TextView in layout provider xml then, we
  are able to set the text in Provider.java using
  remoteViews.setTextViewText() method.

  Similarly, if I use AnalogClock as AppWidget in xml then, is there any
  method available to change the android:dial value using RemoteViews or
  AnalogClock api's in Provider.java ?

  For Ex- I need to load two dial png's based on AM or PM.

  Please help me.

 --
 Jeff Sharkey
 jshar...@android.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] Re: NinePatchDrawable as ItemizedOverlay

2009-06-24 Thread skyman

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



[android-developers] Strange ListView loading problems

2009-06-24 Thread Peter

I have a listview that is populated by a couple threads that pull in
data from the network. Before that data comes in, there are some
default values displayed. When the screen loads, there are 6 items
displayed, each with the default data. The 1st (index 0) loads and is
updated on the screen, and then number 6 (index 5) is updated with
that same info. Then, item 2 (index 1) loads, and then item 5 (index
4) mirrors that data. Then item 3 loads, then item 4 reloads with the
correct data, then then item 5 with the correct data, then item 6.

Why are items 5 and 6 briefly showing the data from other elements in
the list? I can't figure out what in the world could be causing 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 at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: EditText and Virtual Keyboard

2009-06-24 Thread Hazam

Folks,
is there nobody having the same problem?
Did I explain I clearly?

The problem is that if i press some of the virtual keyboard keys, they
do not cause a onKeyDown event;
this happens with keys '/','!' and such.

While if i press physical emulator keys, (even the same keys), they
do.
Could you give me some feedback on this, even a pointer to some code
to study
Thanks

On 22 Giu, 20:22, Emanuele Di Saverio emanuele.disave...@gmail.com
wrote:
 Hi all,
 I was fillding with EditText and handling of events, and I was wondering on
 a strange thing:

 If you press some of the keys (for example forward slash '/') on the
 emulated physical keyboard, the keyevents are called
 as usual (onKeydown, the KeyListeners etc).
 If I click on the corresponding virtual key on the onscreen virtual
 keyboard, all these callbacks do not get called at all!
 This is strange, given that If I press other keys like alhpanumerical, the
 events are called.

 Can someone explain me this behaviour of the EditText component?
 Thanks a lot

 -Emanuele
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Errors In Android Run time I need suggestions

2009-06-24 Thread Desu Vinod Kumar
HI

This errors iam getting in log cat

06-24 15:05:51.610: ERROR/AndroidRuntime(472): Uncaught handler: thread main
exiting due to uncaught exception

06-24 15:05:51.774: ERROR/AndroidRuntime(472):
android.content.ActivityNotFoundException: Unable to find explicit activity
class {com.dci.isizzle/com.dci.isizzle.WebServices}; have you declared this
activity in your AndroidManifest.xml?

06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1467)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:1441)

06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
android.app.Activity.startActivityForResult(Activity.java:2526)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
android.app.Activity.startActivity(Activity.java:2570)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
com.dci.isizzle.Splash$1.run(Splash.java:32)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
android.os.Handler.handleCallback(Handler.java:542)

06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
android.os.Handler.dispatchMessage(Handler.java:86)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
android.os.Looper.loop(Looper.java:123)

06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
android.app.ActivityThread.main(ActivityThread.java:3739)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
java.lang.reflect.Method.invokeNative(Native Method)

06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
java.lang.reflect.Method.invoke(Method.java:515)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
06-24 15:05:51.774: ERROR/AndroidRuntime(472): at
dalvik.system.NativeStart.main(Native Method)


On Tue, Jun 23, 2009 at 5:42 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote:

 Hi

 Yes absolutly correct that cmdcalculate button invoking webservices when i
 press that button it is quitting

 i am not getting how to solve
 this



 On Tue, Jun 23, 2009 at 4:51 PM, Urs Grob grob@gmail.com wrote:


 Ok ..counting by hand I think this is the 31st line:
 findViewById(R.id.cmdCalculate).setOnClickListener(new OnClickListener() {

 So I guess findViewById(R.id.cmdCalculate) returns null.

 Is there a definition for cmdCalculate in your main layout? (if there
 is, there's maybe a typo?)

 -- Urs

 On Tue, Jun 23, 2009 at 1:15 PM, Desu Vinod Kumarvinny.s...@gmail.com
 wrote:
  Hi
 
  thanks for giving response
 
  How to clear that i am not getting this is my code
 
  package org.tuxpan;
 
  import org.ksoap2.SoapEnvelope;
  import org.ksoap2.serialization.SoapObject;
  import org.ksoap2.serialization.SoapSerializationEnvelope;
  import org.ksoap2.transport.AndroidHttpTransport;
 
  import android.app.Activity;
  import android.view.View;
  import android.os.Bundle;
  import android.view.View.OnClickListener;
  import android.widget.EditText;
  import android.widget.TextView;
 
 
 
  public class Adder extends Activity
  {
  private static final String SOAP_ACTION = AddIntegers;
  private static final String METHOD_NAME = AddIntegers;
  private static final String NAMESPACE = http://services.o2;;
  private static final String URL =
  http://wiki.tuxpan.com:8069/axis2/services/Simple;;
 
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle icicle)
  {
  super.onCreate(icicle);
 
  setContentView(R.layout.main);
  findViewById(R.id.cmdCalculate).setOnClickListener(new
  OnClickListener() {
  public void onClick(View view)
  {
  ((TextView)findViewById(R.id.lblStatus)).setText(...
  Invoking Web Service ...);
  String stA =
  ((EditText)findViewById(R.id.numberA)).getText().toString();
  String stB =
  ((EditText)findViewById(R.id.numberB)).getText().toString();
  Integer a = null;
  Integer b = null;
  try {
  a = Integer.valueOf(stA);
  b = Integer.valueOf(stB);
  } catch(Exception e1) {
  }
  if (a == null || b == null) {
 
 ((TextView)findViewById(R.id.lblStatus)).setText(Only
  Integer numbers please...);
  }
  SoapObject request = new SoapObject(NAMESPACE,
 METHOD_NAME);
  SoapObject inAddIntegers = new SoapObject(NAMESPACE,
  InAddIntegers);
  inAddIntegers.addProperty(a, a);
  inAddIntegers.addProperty(b, b);
  request.addProperty(InAddIntegers, inAddIntegers);
  SoapSerializationEnvelope envelope = new
  SoapSerializationEnvelope(SoapEnvelope.VER11);
  

[android-developers] G1 Firmware in ADP1?

2009-06-24 Thread František Fuka

Hello,

my friend has got himself Android Developer Phone 1. But he is not
developer, he just wants to use it as a normal phone and he doesn't
want any hassle with firmware updating (and he's not interested in
root access etc.). If I flash the official U.S. G1 firmware into his
phone, will he then receive normal OTA firmware upgrades, or will his
phone still report as ADP1 and will he have to update manually?

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



[android-developers] Re: G1 Firmware in ADP1?

2009-06-24 Thread Delta Foxtrot
2009/6/24 František Fuka f...@fuxoft.cz


 Hello,

 my friend has got himself Android Developer Phone 1. But he is not
 developer, he just wants to use it as a normal phone and he doesn't
 want any hassle with firmware updating (and he's not interested in
 root access etc.). If I flash the official U.S. G1 firmware into his
 phone, will he then receive normal OTA firmware upgrades, or will his
 phone still report as ADP1 and will he have to update manually?


You don't need the t-mobile firmware for auto-updates, the ADP firmware
upgrades itself when updates are put out too.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: G1 Firmware in ADP1?

2009-06-24 Thread Frantisek Fuka

Really? But he still has firmware 1.0 and no offer to upgrade.

On Jun 24, 12:16 pm, Delta Foxtrot deltafoxtrot...@gmail.com wrote:
 You don't need the t-mobile firmware for auto-updates, the ADP firmware
 upgrades itself when updates are put out too.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] PopupWindow Dismissal

2009-06-24 Thread peeyush varshney
Hi,
   I am creating Spinner over PopupWindow .But when I press back key in
opened Spinner. it dismiss the Spinner as well as PopupWindow.
It should close the Spinner only and come back to PopupWindow.but it is no
happening.
How should  I handle this scenrio.

-- 
Thank  Regards
Peeyush Varshney

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: G1 Firmware in ADP1?

2009-06-24 Thread Delta Foxtrot
2009/6/24 Frantisek Fuka f...@fuxoft.cz


 Really? But he still has firmware 1.0 and no offer to upgrade.


Sorry, the 1.1 firmware included the auto-update feature, if you upgrade to
1.1 or 1.5 it will upgrade automatically in future.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Recreate PopupWindow onRestoreInstanceState

2009-06-24 Thread extrapedestrian

Hello,

My application has floating popup window (PopupWindow) that is
successfully displayed on user click.

When screen orientation is changed, everything is recreated and I want
my Popup to remain visible.

onRestoreInstanceState is called and my Popup function crashes whilst
calling showAtLocation:

View parentView = this.getCurrentFocus();
if(parentView != null) {
mPopup.showAtLocation(parentView, Gravity.BOTTOM, 0, 0);
}

LogCat saying:

06-24 12:51:26.136: ERROR/AndroidRuntime(1123): Caused by:
android.view.WindowManager$BadTokenException: Unable to add window --
token null is not valid; is your activity running?
06-24 12:51:26.136: ERROR/AndroidRuntime(1123): at
android.view.ViewRoot.setView(ViewRoot.java:384)
06-24 12:51:26.136: ERROR/AndroidRuntime(1123): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
06-24 12:51:26.136: ERROR/AndroidRuntime(1123): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:90)
06-24 12:51:26.136: ERROR/AndroidRuntime(1123): at
android.widget.PopupWindow.invokePopup(PopupWindow.java:495)
06-24 12:51:26.136: ERROR/AndroidRuntime(1123): at
android.widget.PopupWindow.showAtLocation(PopupWindow.java:393)


My assumption is that Main Activity Window is not yet displayed (not
yet created) so can not display popup.
Where can I show this popup then? How do I catch event when activity
is displayed.

I can start popup again in this new session, but I would like it to be
opened on screen orientation change.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Errors In Android Run time I need suggestions

2009-06-24 Thread Mark Murphy

Desu Vinod Kumar wrote:
 This errors iam getting in log cat

snip

 06-24 15:05:51.774: ERROR/AndroidRuntime(472):
 android.content.ActivityNotFoundException: Unable to find explicit
 activity class {com.dci.isizzle/com.dci.isizzle.WebServices}; have you
 declared this activity in your AndroidManifest.xml?

It would appear you did not declare com.dci.isizzle.WebServices as an
activity in your AndroidManifest.xml file:

http://developer.android.com/guide/topics/manifest/manifest-intro.html

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] WebView

2009-06-24 Thread Sukitha Udugamasooriya

Hello,

I have a webview and need to trigger a function when a user clicks on
particular url.

How can I achieve this?

Regards and 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
-~--~~~~--~~--~--~---



[android-developers] Re: WebView

2009-06-24 Thread Desu Vinod Kumar
Hi

Try this Snippet

it may helpful for u
try
{
URL url = new URL(eText.getText().toString());
URLConnection conn = url.openConnection();
// Get the response
BufferedReader rd = new BufferedReader(new
InputStreamReader(conn.getInputStream()));
String line = ;
}

On Wed, Jun 24, 2009 at 5:28 PM, Sukitha Udugamasooriya suk...@gmail.comwrote:


 Hello,

 I have a webview and need to trigger a function when a user clicks on
 particular url.

 How can I achieve this?

 Regards and thanks
 



-- 
Regards
---
Desu Vinod Kumar
vinny.s...@gmail.com
09916009493

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 catch BOOT_COMPLETED_ACTION from an IntentReceiver

2009-06-24 Thread GAYET Thierry
Hi, because i need to start a background deamon not just when an application 
need to bind with, i have searched a way to auto-start it. One interesting 
reply was given in this maillist and i wanna more explanation on the way to 
catch BOOT_COMPLETED_ACTION from an IntentReceiver ?

The previous thread that i have found on this maillist was this one:


 Use an IntentReceiver and catch the BOOT_COMPLETED_ACTION. Then in the
IntentReceiver call Context.startService() (but use carefully, only
when you really need a background service to run all the time).


http://markmail.org/message/7r6afkcusvwe2wfz#query:android%20autostart%20service+page:1+mid:uee3n7yjip6nsmfr+state:results

 Regards


Thierry GAYET
NextInnovation.org
+33(0)663.849.589



  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: WebView

2009-06-24 Thread Mark Murphy

Sukitha Udugamasooriya wrote:
 I have a webview and need to trigger a function when a user clicks on
 particular url.
 
 How can I achieve this?

1. Implement a WebViewClient subclass

2. Override shouldOverrideURLLoading() on your WebViewClient subclass

3. Attach an instance of your WebViewClient subclass to the WebView via
setWebViewClient()

4. Put smarts in shouldOverrideURLLoading() to handle your particular URL

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Lising of the available AT-commands on an HTC G1 ?

2009-06-24 Thread GAYET Thierry
Hi, i am looking for the complete listing of the AT commands available from the 
HTC G1's baseband ?

 Regards


Thierry GAYET
NextInnovation.org
+33(0)663.849.589



  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 catch BOOT_COMPLETED_ACTION from an IntentReceiver

2009-06-24 Thread Mark Murphy

GAYET Thierry wrote:
 Hi, because i need to start a background deamon not just when an
 application need to bind with, i have searched a way to auto-start it.
 One interesting reply was given in this maillist and i wanna more
 explanation on the way to catch BOOT_COMPLETED_ACTION from an
 IntentReceiver ?
 
 The previous thread that i have found on this maillist was this one:
 
  Use an IntentReceiver and catch the BOOT_COMPLETED_ACTION. Then in the
 IntentReceiver call Context.startService() (but use carefully, only when
 you really need a background *service* to run all the time). 
 
 http://markmail.org/message/7r6afkcusvwe2wfz#query:android%20autostart%20service+page:1+mid:uee3n7yjip6nsmfr+state:results

You'll see this covered as part of:

http://androidguys.com/?p=4411

Sample code implementing BroadcastReceivers for BOOT_COMPLETED can be
found at:

http://commonsware.com/AdvAndroid/

(scroll down, download the Source Code from the link, and look for
SysEvents/OnBoot and SysServices/Alarm projects)

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Binder Thread issue.

2009-06-24 Thread Mark Murphy

Gavin wrote:
 OK. thanks for your suggestion. I will modify my design.
 It is Binder Thread that I want to know. Is there any negative impact?

I do not know what a Binder Thread is in this context.

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 use Graphics.VCENTER|Graphics.HCENTER

2009-06-24 Thread manohar

Hi All

I am porting a game from J2ME to Android. In J2ME the code is as
follows
g.drawImage(image,x,y,Graphics.HCENTER | Graphics.VCENTER)

In android i have written has

g.drawBitmap(image, x, y, paintObject);

Here i do not have a ooption to specify the anchor position.  Can any
one pls tell me how to specifiy anchor position in andorid. By defult
in andorid it is taking as Graphics.LEFT | Graphics.TOP.

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



[android-developers] Re: G1 Firmware in ADP1?

2009-06-24 Thread Frantisek Fuka


  Really? But he still has firmware 1.0 and no offer to upgrade.

 Sorry, the 1.1 firmware included the auto-update feature, if you upgrade to
 1.1 or 1.5 it will upgrade automatically in future.

OK. Since that means I'll have to do manual upgrade after all, there
is a question of differences between ADP1, EU and US firmware. I heard
Latitude is not present in all of them, as well as ICQ client... Is
there some sort of comparison chart available?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: list add item error

2009-06-24 Thread Mark Murphy

tstanly wrote:
 hi all,
 
 it's so strange!!
 
 i have a list decleared:
 public static ListString list1=new ArrayListString();
 and use
 
 list1.add(str);
 it is ok!
 
 but use
 list1.add(index,str);
 program will be error

What is the error?

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Strange ListView loading problems

2009-06-24 Thread Guru
Are you running any thread in the getView of the adapter?

On Wed, Jun 24, 2009 at 2:04 PM, Peter pkana...@gmail.com wrote:


 I have a listview that is populated by a couple threads that pull in
 data from the network. Before that data comes in, there are some
 default values displayed. When the screen loads, there are 6 items
 displayed, each with the default data. The 1st (index 0) loads and is
 updated on the screen, and then number 6 (index 5) is updated with
 that same info. Then, item 2 (index 1) loads, and then item 5 (index
 4) mirrors that data. Then item 3 loads, then item 4 reloads with the
 correct data, then then item 5 with the correct data, then item 6.

 Why are items 5 and 6 briefly showing the data from other elements in
 the list? I can't figure out what in the world could be causing this.
 



-- 
Thanks and Regards
Gurudutt P.S.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: list add item error

2009-06-24 Thread Tsai stanly
with the location parameter,
when into the app,will show
the application demo(process demo.app) has stopped on unexpectedly,
please try again

without location, it works!!


2009/6/24 Mark Murphy mmur...@commonsware.com


 tstanly wrote:
  hi all,
 
  it's so strange!!
 
  i have a list decleared:
  public static ListString list1=new ArrayListString();
  and use
 
  list1.add(str);
  it is ok!
 
  but use
  list1.add(index,str);
  program will be error

 What is the error?

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

 _The Busy Coder's Guide to *Advanced* Android Development_
 Version 0.9 Available!

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: list add item error

2009-06-24 Thread Mark Murphy

Tsai stanly wrote:
 with the location parameter,
 when into the app,will show
 the application demo(process demo.app) has stopped on unexpectedly,
 please try again
  
 without location, it works!!

And your Java stack trace tells you...what?

You can examine your Java stack trace via adb logcat, standalone DDMS,
or the DDMS perspective in Eclipse.

Whenever you get the stopped unexpectedly dialog, you will have a
stack trace showing your exception, which will tell you everything you
need to know about why your code failed.

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] where is the definition of member functions in the struct audio_track_cblk_t

2009-06-24 Thread max

Hi All,

I don't know whether there is someone who have a look at the structure
audio_track_cblk_t, which is at
frameworks/base/include/private/media/AudioTrackShared.h
struct audio_track_cblk_t
{

// The data members are grouped so that members accessed
frequently and in the same context
// are in the same line of data cache.
Mutex   lock;
Condition   cv;
volatileuint32_tuser;
volatileuint32_tserver;
uint32_tuserBase;
uint32_tserverBase;
void*   buffers;
uint32_tframeCount;
// Cache line boundary
uint32_tloopStart;
uint32_tloopEnd;
int loopCount;
volatileunion {
uint16_tvolume[2];
uint32_tvolumeLR;
};
uint16_tsampleRate;
uint16_tchannels;
int16_t flowControlFlag; // underrun (out) or
overrrun (in) indication
uint8_t out;// out equals 1 for AudioTrack
and 0 for AudioRecord
uint8_t forceReady;
uint16_tbufferTimeoutMs; // Maximum cumulated
timeout before restarting audioflinger
uint16_twaitTimeMs;  // Cumulated wait time
// Padding ensuring that data buffer starts on a cache
line boundary (32 bytes).
// See AudioFlinger::TrackBase constructor
int32_t Padding[3];

audio_track_cblk_t();
uint32_tstepUser(uint32_t frameCount);
boolstepServer(uint32_t frameCount);
void*   buffer(uint32_t offset) const;
uint32_tframesAvailable();
uint32_tframesAvailable_l();
uint32_tframesReady();
};
I try to find where is the definition of framesReady(), stepUser() and
etc, but I cann't get the location, anybody can tell me?

Thanks a lot
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: where is the definition of member functions in the struct audio_track_cblk_t

2009-06-24 Thread Mark Murphy

max wrote:
 I don't know whether there is someone who have a look at the structure
 audio_track_cblk_t, which is at
 frameworks/base/include/private/media/AudioTrackShared.h

Questions about the Android source code are best asked on a list that
pertains to the Android source code:

http://source.android.com/discuss

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

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



Re : [android-developers] Re: How to catch BOOT_COMPLETED_ACTION from an IntentReceiver

2009-06-24 Thread GAYET Thierry
First thanks for your quick reply. I have well found the code you told me about 
(OnBootReceiver).

I have one more question 'cos i as i have said before i ma programming a 
service that i want to start when Android boot.

My core class extends Service not  BroadcastReceiver. So may i extend more than 
one time. I mean to extends  Service and BroadcastReceiver. for the same class 
? 

Maybe i need to add a public class OnBootReceiver extends BroadcastReceiver 
inside my service project ? But if so how to link this second class with the 
service one ?

 Regards


Thierry GAYET
NextInnovation.org
+33(0)663.849.589





De : Mark Murphy mmur...@commonsware.com
À : android-developers@googlegroups.com
Envoyé le : Mercredi, 24 Juin 2009, 14h08mn 24s
Objet : [android-developers] Re: How to catch BOOT_COMPLETED_ACTION from an 
IntentReceiver


GAYET Thierry wrote:
 Hi, because i need to start a background deamon not just when an
 application need to bind with, i have searched a way to auto-start it.
 One interesting reply was given in this maillist and i wanna more
 explanation on the way to catch BOOT_COMPLETED_ACTION from an
 IntentReceiver ?
 
 The previous thread that i have found on this maillist was this one:
 
  Use an IntentReceiver and catch the BOOT_COMPLETED_ACTION. Then in the
 IntentReceiver call Context.startService() (but use carefully, only when
 you really need a background *service* to run all the time). 
 
 http://markmail.org/message/7r6afkcusvwe2wfz#query:android%20autostart%20service+page:1+mid:uee3n7yjip6nsmfr+state:results

You'll see this covered as part of:

http://androidguys.com/?p=4411

Sample code implementing BroadcastReceivers for BOOT_COMPLETED can be
found at:

http://commonsware.com/AdvAndroid/

(scroll down, download the Source Code from the link, and look for
SysEvents/OnBoot and SysServices/Alarm projects)

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!



  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: list add item error

2009-06-24 Thread Tsai stanly
thanks for your help!

from my DDMS on my Eclipse,
it just show:
[2009-06-24 20:06:02 - DeviceMonitor]Error reading jdwp list: EOF

and how to use the adb logcat? thanks!
2009/6/24 Mark Murphy mmur...@commonsware.com


 Tsai stanly wrote:
  with the location parameter,
  when into the app,will show
  the application demo(process demo.app) has stopped on unexpectedly,
  please try again
 
  without location, it works!!

 And your Java stack trace tells you...what?

 You can examine your Java stack trace via adb logcat, standalone DDMS,
 or the DDMS perspective in Eclipse.

 Whenever you get the stopped unexpectedly dialog, you will have a
 stack trace showing your exception, which will tell you everything you
 need to know about why your code failed.

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

 _The Busy Coder's Guide to *Advanced* Android Development_
 Version 0.9 Available!

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: RTP streaming with Cupcake

2009-06-24 Thread pierre

Sorry, there is no RTSP problem with Cupcake.
My problem was due to the viedo file which was not really identical to
the one used before.

Regards.

On 17 juin, 12:57, pierre pierre.rou...@gmail.com wrote:
 Hello all,

 isRTPstreamingknown to be working on Cupcake devices?

 I have not been able to start anRTPmultimedia session with my G1
 since Cupcake upgrade. It was working before the upgrade, e.g. by
 using the VideoView class and providing an RTSP URL. But the same test
 which was working before fails now. The RTSP OPTIONS and DESCRIBES
 exchanges are OK, and then there is a PVMFFailure in the Log, and a
 popup saying Sorry, this Video can't be played...

 Thanks in advance

 (Note: I removed a similar message that I sent yesterday because it
 contained broken links)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: list add item error

2009-06-24 Thread Mark Murphy

Tsai stanly wrote:
 thanks for your help!
  
 from my DDMS on my Eclipse,
 it just show:
 [2009-06-24 20:06:02 - DeviceMonitor]Error reading jdwp list: EOF

It should show many more lines than that. There may be some issue
connecting DDMS in Eclipse with your device or emulator.

 and how to use the adb logcat? thanks!

http://developer.android.com/guide/developing/tools/adb.html

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 0.9 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Re : [android-developers] Re: How to catch BOOT_COMPLETED_ACTION from an IntentReceiver

2009-06-24 Thread Mark Murphy

GAYET Thierry wrote:
 First thanks for your quick reply. I have well found the code you told
 me about (OnBootReceiver).
 
 I have one more question 'cos i as i have said before i ma programming a
 service that i want to start when Android boot.
 
 My core class extends Service not  BroadcastReceiver. So may i extend
 more than one time. I mean to extends Service and BroadcastReceiver. for
 the same class ?
 
 Maybe i need to add a public class OnBootReceiver extends
 BroadcastReceiver inside my service project ? But if so how to link this
 second class with the service one ?

BOOT_COMPLETED must be received by a receiver element for a
BroadcatReceiver. You have no choice in the matter.

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

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

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



[android-developers] Re: Sending Email from Android application

2009-06-24 Thread Peli

You can find the correct MIME type to send a text message here:
http://www.openintents.org/en/node/121
(scroll down for the sample code)

Peli
www.openintents.org

On Jun 24, 7:02 am, doubleminus doublemi...@gmail.com wrote:
 Swathi,

 Did you ever figure this one out??

 Thanks,
 double

 On May 12, 1:40 am, Swathi swathimuddin...@gmail.com wrote:

  I have tried to sendemailfrom myapplication in emulator , with
  following code.

  Intent sendIntent = new Intent(Intent.ACTION_SEND);
  sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);
  sendIntent.putExtra(Intent.EXTRA_SUBJECT,
  subject.getText().toString());
  sendIntent.putExtra(Intent.EXTRA_TEXT,
  body.getText().toString());
  sendIntent.setType(text/plain);

  startActivity(Intent.createChooser(sendIntent, MySendMail));

  But i got an error No applications can perform this action.

  I tried by configuring Gmail in emulator, with the following code

          boolean debug = false;
          //Set the host smtp address
          Properties props = new Properties();
          props.setProperty(mail.transport.protocol, smtp);
          props.setProperty(mail.host, smtp.gmail.com);
          props.put(mail.smtp.auth, true);
          props.put(mail.smtp.port, 465);
          props.put(mail.smtp.socketFactory.port, 465);
          props.put(mail.smtp.socketFactory.class,
                               javax.net.ssl.SSLSocketFactory);
          props.put(mail.smtp.socketFactory.fallback, false);
          props.setProperty(mail.smtp.quitwait, false);
          Session session = Session.getDefaultInstance(props, this);
          session.setDebug(debug);
         try
         {
          // create a message
          Message msg = new MimeMessage(session);
          // set the from and to address
          InternetAddress addressFrom = new InternetAddress(from);
          msg.setFrom(addressFrom);
          InternetAddress[] addressTo =
                          new InternetAddress[recipients.length];
          for (int i = 0; i  recipients.length; i++) {
              addressTo[i] = new InternetAddress(recipients[i]);
          }
          msg.setRecipients(Message.RecipientType.TO, addressTo);
          // Setting the Subject and Content Type
          msg.setSubject(subject);
          msg.setContent(message, text/html);
          Transport.send(msg);
         }
         catch (Exception e) {
                  // TODO: handle exception
             System.out.println(Exception in Message+e.getMessage());
          }
      }

  But i got an error but i got an error
  java.lang.verifyError:javax.mail.internet.Mimemessage.

  Can anybody help 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
-~--~~~~--~~--~--~---



[android-developers] how to avoid the showing of prev,next buttons of MediaController

2009-06-24 Thread manoj

Hi,

I have implemented media player with MediaController.

Its working fine.

Now I would like to show only fastbackward, fast forward, play/pause
icons (omitting prev, next song buttons).

Can any one please help me to do this.

Thanks,
Manoj.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 set intent flags

2009-06-24 Thread Peli

intent_back.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

Peli
www.openintents.org

On Jun 24, 5:51 am, tstanly tsai.sta...@gmail.com wrote:
 hi all,

 in thehttp://developer.android.com/reference/android/content/Intent.html
 there are constant FLAG_ACTIVITY_CLEAR_TOP
 and setFlag method,

 but i use for:
                                 Intent intent_back=new Intent();
                         intent_back.setClass(favorit.this, demo.class);
                         intent_back.setFlags(FLAG_ACTIVITY_CLEAR_TOP);

                         startActivity(intent_back);
                         favorit.this.finish();

 setFlag is error,
 how to use the constant in the class??
 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
-~--~~~~--~~--~--~---



[android-developers] Re: G1 Firmware in ADP1?

2009-06-24 Thread Delta Foxtrot
2009/6/24 Frantisek Fuka f...@fuxoft.cz

 OK. Since that means I'll have to do manual upgrade after all, there
 is a question of differences between ADP1, EU and US firmware. I heard
 Latitude is not present in all of them, as well as ICQ client... Is
 there some sort of comparison chart available?


Considering the latest gmaps app is on Android Market and can be downloaded
to any phone, Latitude is a non issue in your decision.

As for the ICQ client, if you mean from the T-Mobile firmware, it uses
SMS/Messaging credit, you'd be better off looking at some third party app
like Meebo which only uses data...

http://www.meebo.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] Re: G1 Firmware in ADP1?

2009-06-24 Thread Delta Foxtrot
There is a whole bunch of things you can do with root access on the phone
you can do otherwise, like tethering over wifi and blocking ads by altering
the hosts file or using AdFree

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: AnalogClock AppWidget dial.

2009-06-24 Thread Ravi

I'm facing a problem again...Even if i make two layouts, the AppWidget
already drawn is not getting redrawn :(
For Ex:

if(0 == calendar.get(Calendar.AM_PM))
   views = new RemoteViews(context.getPackageName(),
R.layout.analog_appwidget_am);
else
 views = new RemoteViews(context.getPackageName(),
R.layout.analog_appwidget_pm);

 int[] appWidgetIds = intent.getIntArrayExtra
(AppWidgetManager.EXTRA_APPWIDGET_IDS);
 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance
(context);
 appWidgetManager.updateAppWidget(appWidgetIds, views);

What should I do now?

On Jun 24, 1:25 pm, Ravi ravikumar...@gmail.com wrote:
 Hi Jeff, Thnz for the reply...
 Well, I feel tht there should be AnalogClock Api's to modify it's
 drawables atleast in next SDK version.
 Right now, I'am goin to make use of a single layout  change it's dial
 making use of Remote view's visiblity option.

 On Jun 24, 1:13 pm, Jeff Sharkey jshar...@android.com wrote:



  AnalogClock doesn't directly provide methods to change its drawables.
  One approach you could use would be to have two layout files, one each
  for AM and PM, and build a new RemoteViews targeting the correct
  layout when building updates.

  j

  On Tue, Jun 23, 2009 at 9:54 PM, Raviravikumar...@gmail.com wrote:

   Using Appwidgets, If we use TextView in layout provider xml then, we
   are able to set the text in Provider.java using
   remoteViews.setTextViewText() method.

   Similarly, if I use AnalogClock as AppWidget in xml then, is there any
   method available to change the android:dial value using RemoteViews or
   AnalogClock api's in Provider.java ?

   For Ex- I need to load two dial png's based on AM or PM.

   Please help me.

  --
  Jeff Sharkey
  jshar...@android.com- 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] Security Exception - Browser.BOOKMARKS_URI !

2009-06-24 Thread Shibbs

Hi all,

I am getting Security Exception - Permission denial when I am trying
to access the Browser.BOOKMARK_URI in my code.
Cursor cur = m_Context.getContentResolver().query
(Browser.BOOKMARKS_URI, null, null,null, null);

However it gives me this error only on device whereas on emulator it
works great. I tried to find if there is any permission for the
bookmark uri, but got none.

After a little googling I found the permission:

uses-permission
android:name=com.android.browser.permission.READ_HISTORY_BOOKMARKS/

from: 
http://github.com/android/platform_packages_apps_browser/blob/0cb2af7646d0a41c0543a086021df3042bfc814a/AndroidManifest.xml


Just wondering why this permission is hidden or sort of hidden as its
not available in drop down permission bar of Manifest.xml (using
eclipse)


Thanks,
Shibbs
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Security Exception - Browser.BOOKMARKS_URI !

2009-06-24 Thread Mark Murphy

Shibbs wrote:
 After a little googling I found the permission:
 
 uses-permission
 android:name=com.android.browser.permission.READ_HISTORY_BOOKMARKS/
 
 from: 
 http://github.com/android/platform_packages_apps_browser/blob/0cb2af7646d0a41c0543a086021df3042bfc814a/AndroidManifest.xml
 
 Just wondering why this permission is hidden or sort of hidden as its
 not available in drop down permission bar of Manifest.xml (using
 eclipse)

Do you have any evidence to suggest it is part of the SDK?

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

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

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



[android-developers] when set android:layout_below = @id/ then margin_bottom is not working for the Button

2009-06-24 Thread jaimin

i want the margin_bottom to work for those Last two Buttons.Botton c
And Botton d
when i set android:layout_below = @id/answer_a then margin_Bottom
does not work

?xml version=1.0 encoding=UTF-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:id=@+id/container
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background = @drawable/bg1
 

ImageView
android:id=@+id/bar
android:layout_width=wrap_content
android:layout_height=wrap_content
android:src=@drawable/bar
android:layout_alignParentTop=true
/
ImageView
android:id=@+id/sound
android:layout_width=wrap_content
android:layout_height=wrap_content
android:src=@drawable/volume
android:layout_alignParentLeft=true
android:paddingTop = 2dip
android:paddingBottom = 2dip
android:paddingLeft = 10dip

/

TextView
android:id=@+id/level
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Level: 1
android:paddingTop = 2dip
android:paddingBottom = 2dip
android:paddingLeft = 90dip
android:textColor = #00

/
TextView
android:id=@+id/score
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Score: 
android:layout_toRightOf = @+id/level
android:paddingTop = 2dip
android:paddingBottom = 2dip
android:paddingLeft = 20dip
/

TextView
android:id=@+id/point
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=0
android:layout_toRightOf = @+id/score
android:paddingTop = 2dip
android:paddingBottom = 8dip
android:paddingLeft = 0dip
android:textColor = #00
/
ImageView
android:id=@+id/close
android:layout_width=wrap_content
android:layout_height=wrap_content
android:src=@drawable/close
android:layout_alignParentRight=true
android:paddingTop = 2dip
android:paddingBottom = 2dip
android:paddingRight = 10dip

/
ViewFlipper
android:id=@+id/flipper
android:layout_width=fill_parent
android:layout_height=fill_parent

ImageView
android:id=@+id/error
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background = @drawable/red_img
/
/ViewFlipper
ScrollView
android:id =@+id/svScreen1
android:layout_width=fill_parent
android:layout_height=fill_parent
android:scrollbarThumbVertical=@drawable/scrollbar_thumb

android:scrollbarTrackVertical=@drawable/scrollbar_invisible
android:scrollbarStyle=outsideOverlay
android:layout_below = @id/bar
 

RelativeLayout 
xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent


TextView
android:id=@+id/trick
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=1
android:layout_marginLeft=5px
android:layout_marginRight=5px
android:layout_centerHorizontal=true
android:gravity = center
android:layout_below = @id/bar
/
TextView
android:id=@+id/question1
android:layout_width=wrap_content
android:layout_height=wrap_content
  

[android-developers] Noser Academy for Android

2009-06-24 Thread Joerg Pleumann
Hello everybody,

I'd like to invite you to joining the first incarnation of the Noser Academy
for Android. It will take place September 3-4 2009 in Zurich, Switzerland.
The event is meant to be a Commercialization Boot Camp and, as the name
implies, mainly targeted at companies that want to use Android in a
commercial context.

Topics include application and service development as well as porting and
customizing Android. The schedule and the list of speakers are not totally
set in stone. We have some additional OHA speakers that we will announce
soon, and we also welcome other companies to contribute talks to the event.

You can find the Academy website here

http://www.noseracademy.comhttps://webmail.noser.com/owa/redir.aspx?C=fd1b9862ea9347eaae799113758167dcURL=http%3a%2f%2fwww.noseracademy.com

and the official press release here

http://www.nosertomarket.com/press/NoserAcademy09June2009FINAL.pdfhttps://webmail.noser.com/owa/redir.aspx?C=fd1b9862ea9347eaae799113758167dcURL=http%3a%2f%2fwww.nosertomarket.com%2fpress%2fNoserAcademy09June2009FINAL.pdf

Looking forward to seeing you in Zurich this fall!

Best regards from Switzerland,
Joerg

--
Joerg Pleumann
Head of Android Development
Noser Engineering AG
Switzerland

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Noser Academy for Android

2009-06-24 Thread Joerg Pleumann

Hmm, seems the links got broken somehow. Sorry for that. The URLs
should look like this:

http://www.noseracademy.com

http://www.nosertomarket.com/press/NoserAcademy09June2009FINAL.pdf

Cheers,
Joerg

--
Joerg Pleumann
Head of Android Development
Noser Engineering AG
Switzerland

On Jun 24, 4:00 pm, Joerg Pleumann joerg.pleum...@gmail.com wrote:
 Hello everybody,

 I'd like to invite you to joining the first incarnation of the Noser Academy
 for Android. It will take place September 3-4 2009 in Zurich, Switzerland.
 The event is meant to be a Commercialization Boot Camp and, as the name
 implies, mainly targeted at companies that want to use Android in a
 commercial context.

 Topics include application and service development as well as porting and
 customizing Android. The schedule and the list of speakers are not totally
 set in stone. We have some additional OHA speakers that we will announce
 soon, and we also welcome other companies to contribute talks to the event.

 You can find the Academy website here

 http://www.noseracademy.comhttps://webmail.noser.com/owa/redir.aspx?C=fd1b9862ea9347eaae79911375...

 and the official press release here

 http://www.nosertomarket.com/press/NoserAcademy09June2009FINAL.pdfhttps://webmail.noser.com/owa/redir.aspx?C=fd1b9862ea9347eaae79911375...

 Looking forward to seeing you in Zurich this fall!

 Best regards from Switzerland,
 Joerg

 --
 Joerg Pleumann
 Head of Android Development
 Noser Engineering AG
 Switzerland
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Security Exception - Browser.BOOKMARKS_URI !

2009-06-24 Thread Shibbs

Frankly speaking I don't know nor I have any evidence - Got this
permission over the net, tried it in my app and it works.
Do we go by the age old google saying that: If its not documented
then probably not use it as it would be removed in future SDK version

On Jun 24, 6:58 pm, Mark Murphy mmur...@commonsware.com wrote:
 Shibbs wrote:
  After a little googling I found the permission:

  uses-permission
  android:name=com.android.browser.permission.READ_HISTORY_BOOKMARKS/

  from:http://github.com/android/platform_packages_apps_browser/blob/0cb2af7...

  Just wondering why this permission is hidden or sort of hidden as its
  not available in drop down permission bar of Manifest.xml (using
 eclipse)

 Do you have any evidence to suggest it is part of the SDK?

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

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



[android-developers] Re: how to avoid the showing of prev,next buttons of MediaController

2009-06-24 Thread Marco Nelissen
According to
http://developer.android.com/reference/android/widget/MediaController.html,
they will not be shown unless you call setPrevNextListener(). Have you tried
not calling it?


On Wed, Jun 24, 2009 at 6:16 AM, manoj manojkumar.m...@gmail.com wrote:


 Hi,

 I have implemented media player with MediaController.

 Its working fine.

 Now I would like to show only fastbackward, fast forward, play/pause
 icons (omitting prev, next song buttons).

 Can any one please help me to do this.

 Thanks,
 Manoj.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: findviewbyid in service?

2009-06-24 Thread Marco Nelissen
Why do you need this? A service does not have a UI, so there should be no
need to get a View.


On Wed, Jun 24, 2009 at 1:19 AM, brilliant winger stw...@gmail.com wrote:


 HI!


 I develop an application.
 This don't use activity class.
 only use service class..

 I need method(findviewbyid). but service don't have this method.

 how to use?
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 avoid the showing of prev,next buttons of MediaController

2009-06-24 Thread manoj

HI Macro,

Thanks for your reply.

I haven't called the setPrevNextListener(). I am sure.

can you please try once and let me know whether it was shown or not.

Thanks,
Manoj.

On Jun 24, 7:29 pm, Marco Nelissen marc...@android.com wrote:
 According 
 tohttp://developer.android.com/reference/android/widget/MediaController...,
 they will not be shown unless you call setPrevNextListener(). Have you tried
 not calling it?



 On Wed, Jun 24, 2009 at 6:16 AM, manoj manojkumar.m...@gmail.com wrote:

  Hi,

  I have implemented media player with MediaController.

  Its working fine.

  Now I would like to show only fastbackward, fast forward, play/pause
  icons (omitting prev, next song buttons).

  Can any one please help me to do this.

  Thanks,
  Manoj.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: findviewbyid in service?

2009-06-24 Thread 2hill

What is it that you are trying to accomplish in you service?

You can build a view and have it called and built when service is
started.

More info please.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Strange ListView loading problems

2009-06-24 Thread Peter

No, getView() itself is quite simple. There are threads running while
getView() is being called, but no threads spawned inside getView().

On Jun 24, 8:24 am, Guru gurudut...@gmail.com wrote:
 Are you running any thread in the getView of the adapter?

 On Wed, Jun 24, 2009 at 2:04 PM, Peter pkana...@gmail.com wrote:

  I have a listview that is populated by a couple threads that pull in
  data from the network. Before that data comes in, there are some
  default values displayed. When the screen loads, there are 6 items
  displayed, each with the default data. The 1st (index 0) loads and is
  updated on the screen, and then number 6 (index 5) is updated with
  that same info. Then, item 2 (index 1) loads, and then item 5 (index
  4) mirrors that data. Then item 3 loads, then item 4 reloads with the
  correct data, then then item 5 with the correct data, then item 6.

  Why are items 5 and 6 briefly showing the data from other elements in
  the list? I can't figure out what in the world could be causing this.

 --
 Thanks and Regards
 Gurudutt P.S.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 avoid the showing of prev,next buttons of MediaController

2009-06-24 Thread manoj

Actually, I created a layout xml, and added the MediaController.

On Jun 24, 7:45 pm, manoj manojkumar.m...@gmail.com wrote:
 HI Macro,

 Thanks for your reply.

 I haven't called the setPrevNextListener(). I am sure.

 can you please try once and let me know whether it was shown or not.

 Thanks,
 Manoj.

 On Jun 24, 7:29 pm, Marco Nelissen marc...@android.com wrote:



  According 
  tohttp://developer.android.com/reference/android/widget/MediaController...,
  they will not be shown unless you call setPrevNextListener(). Have you tried
  not calling it?

  On Wed, Jun 24, 2009 at 6:16 AM, manoj manojkumar.m...@gmail.com wrote:

   Hi,

   I have implemented media player with MediaController.

   Its working fine.

   Now I would like to show only fastbackward, fast forward, play/pause
   icons (omitting prev, next song buttons).

   Can any one please help me to do this.

   Thanks,
   Manoj.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Security Exception - Browser.BOOKMARKS_URI !

2009-06-24 Thread Evan Charlton
Anything in the com.android.* package is a private API and you should not
rely on it as it could break in a future update.

Evan Charlton

On Jun 24, 2009 10:17 AM, Shibbs shibu.deva...@gmail.com wrote:


Frankly speaking I don't know nor I have any evidence - Got this
permission over the net, tried it in my app and it works.
Do we go by the age old google saying that: If its not documented
then probably not use it as it would be removed in future SDK version

On Jun 24, 6:58 pm, Mark Murphy mmur...@commonsware.com wrote:  Shibbs
wrote:   After a little...
  from:
http://github.com/android/platform_packages_apps_browser/blob/0cb2af7...

   Just wondering why this permission is hidden or sort of hidden as its
  not available in dro...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Security Exception - Browser.BOOKMARKS_URI !

2009-06-24 Thread Mark Murphy

Shibbs wrote:
 Do we go by the age old google saying that: If its not documented
 then probably not use it as it would be removed in future SDK version

Pretty much. That's particularly true for com.android.permission.*
values (or, for that matter, most things in the com.android.* namespaces).

Things that are public are (usually) android.* (minus the leading com.)
and are described in the SDK documentation.

Anything else can easily be broken in future releases.

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

_Android Programming Tutorials_ Version 1.0 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: RTP streaming with Cupcake

2009-06-24 Thread dindin

Can you share a little bit on what you are trying to do and how you
got it to work.

I have been trying to get some live streaming to work on Cupcake but
am still scratching my head on this one. Did you simply point the
source to an RTSP URI on the MediaPlayer object? What media codecs are
you using and what container on the server side? I ma not sure what
containers the Android platform supports for live delivery. Can it
take MPEG-TS data over RTP/RTSP?

Thanks.

-D


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: weird drawing on bitmap to canvas

2009-06-24 Thread sleith

hello...could anyone help?
thx

On Jun 23, 10:37 pm, sleith raysle...@gmail.com wrote:
 hi, i'm trying to draw bitmap in canvas.
 the bitmap is used to draw text and background using canvas (named
 canvasBitmap)
 but the text or background that are drown to bitmap is not displayed,
 as if it's out of bounds.
 i have to translate the canvasBitmap at some points to make it draw at
 right position.
 The problem is i don't know how many pixel i should translate to.

 here's the code example:

 public OnDraw(Canvas c){

   Paint mBackgroundPaint = new Paint();
   mBackgroundPaint.setColor(Color.RED);

   String mText = Testing;

   Paint mFontPaint = new Paint();
   mFontPaint.setColor(Color.WHITE);

   //setting rect
   Rect mBackgroundRect = new Rect();
   mFontPaint.getTextBounds(mText, 0, mText.length(), mBackgroundRect);

   //the bitmap to be drawn a text and backgroundRect
   Bitmap mBitmap = Bitmap.createBitmap(mBackgroundRect.width(),
                                 mBackgroundRect.height(), 
 Bitmap.Config.ARGB_);
   Canvas mCanvasBitmap = new Canvas(mBitmap);

   //draw text and background to bitmap
   mCanvasBitmap.drawColor(Color.CYAN);
   mCanvasBitmap.drawRect(mBackgroundRect, mBackgroundPaint);
   mCanvasBitmap.drawText(mText, 0, 0, mFontPaint);

   //draw bitmap to canvas
   c.drawBitmap(mBitmap, 0, 0, null);

 }

 this will only drawn Cyan color, the text and red background is not
 displayed
 i have to translate for example :
 mCanvasBitmap.translate(0, mBackgroundRect.height())

 to make it displayed (but not 100% correctly position)
 please help .
 thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Recreate PopupWindow onRestoreInstanceState

2009-06-24 Thread Romain Guy

parentView.post(new Runnable() {
  public void run() {
// show the popup
  }
});

On Wed, Jun 24, 2009 at 4:07 AM,
extrapedestrianextra.pedestr...@gmail.com wrote:

 Hello,

 My application has floating popup window (PopupWindow) that is
 successfully displayed on user click.

 When screen orientation is changed, everything is recreated and I want
 my Popup to remain visible.

 onRestoreInstanceState is called and my Popup function crashes whilst
 calling showAtLocation:

 View parentView = this.getCurrentFocus();
 if(parentView != null) {
    mPopup.showAtLocation(parentView, Gravity.BOTTOM, 0, 0);
 }

 LogCat saying:

 06-24 12:51:26.136: ERROR/AndroidRuntime(1123): Caused by:
 android.view.WindowManager$BadTokenException: Unable to add window --
 token null is not valid; is your activity running?
 06-24 12:51:26.136: ERROR/AndroidRuntime(1123):     at
 android.view.ViewRoot.setView(ViewRoot.java:384)
 06-24 12:51:26.136: ERROR/AndroidRuntime(1123):     at
 android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
 06-24 12:51:26.136: ERROR/AndroidRuntime(1123):     at
 android.view.WindowManagerImpl.addView(WindowManagerImpl.java:90)
 06-24 12:51:26.136: ERROR/AndroidRuntime(1123):     at
 android.widget.PopupWindow.invokePopup(PopupWindow.java:495)
 06-24 12:51:26.136: ERROR/AndroidRuntime(1123):     at
 android.widget.PopupWindow.showAtLocation(PopupWindow.java:393)


 My assumption is that Main Activity Window is not yet displayed (not
 yet created) so can not display popup.
 Where can I show this popup then? How do I catch event when activity
 is displayed.

 I can start popup again in this new session, but I would like it to be
 opened on screen orientation change.

 




-- 
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: Security Exception - Browser.BOOKMARKS_URI !

2009-06-24 Thread Shibbs

Thanks guys! - but as long as there is no other permission, I am left
with not much choice but to take that risk.
Anyone from google,
Would read browser history permission be available in future release?
Its kinda important for my app

On Jun 24, 8:08 pm, Mark Murphy mmur...@commonsware.com wrote:
 Shibbs wrote:
  Do we go by the age old google saying that: If its not documented
  then probably not use it as it would be removed in future SDK version

 Pretty much. That's particularly true for com.android.permission.*
 values (or, for that matter, most things in the com.android.* namespaces).

 Things that are public are (usually) android.* (minus the leading com.)
 and are described in the SDK documentation.

 Anything else can easily be broken in future releases.

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

 _Android Programming Tutorials_ Version 1.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Application Needed

2009-06-24 Thread bizzy401

I am in the Army

On Jun 23, 12:56 pm, Fred Grott(shareme) fred.gr...@gmail.com
wrote:
 I would imagine if you would mention your branch of service that might
 help in getting the help you require.

 Myself, I am a former Airman, USAF..1980s..

 Fred Grotthttp://mobilebytes.wordpress.com

 On Jun 22, 3:49 am,bizzy401bizzy...@gmail.com wrote:

  I am an instructor in the military.  I have an instructor evaluation
  coming up and I am looking for an application that might be able to
  help me out.  When I am instructing a class I have to ask a question
  every three to six minutes.  No more no less.  I was looking for an
  app that would vibrate in my pocket every four minutes.  Does anyone
  know of an app like this?

  Thank you very much for any help that is offered.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Application Needed

2009-06-24 Thread bizzy401

Wow, that would be awesome, except that my eval is on monday, but I
really appreciate it!!!

On Jun 23, 1:17 pm, Brian Cloutier brian.studios.andr...@gmail.com
wrote:
 While I do not know of such an app, if you give me a week or two I could
 write one for you.

 On Tue, Jun 23, 2009 at 9:56 AM, Fred Grott(shareme)
 fred.gr...@gmail.comwrote:



  I would imagine if you would mention your branch of service that might
  help in getting the help you require.

  Myself, I am a former Airman, USAF..1980s..

  Fred Grott
 http://mobilebytes.wordpress.com

  On Jun 22, 3:49 am, bizzy401 bizzy...@gmail.com wrote:
   I am an instructor in the military.  I have an instructor evaluation
   coming up and I am looking for an application that might be able to
   help me out.  When I am instructing a class I have to ask a question
   every three to six minutes.  No more no less.  I was looking for an
   app that would vibrate in my pocket every four minutes.  Does anyone
   know of an app like this?

   Thank you very much for any help that is offered.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Application Needed

2009-06-24 Thread bizzy401

I am new to google groups, where is the reference section?

On Jun 23, 8:47 pm, sm1 sergemas...@gmail.com wrote:
 I wrote a special app for this. It's free. It's called *)s) Repeat
 Vibrations*. In the Reference section. By simplecode.inc.

 Make sure you test it thoroughly before using it in class or during
 the evaluation. I wrote it today and i only tested it for an hour or
 so.

 Let us know how you did after the eval.

 serge

 On Jun 22, 4:49 am,bizzy401bizzy...@gmail.com wrote:

  I am an instructor in the military.  I have an instructor evaluation
  coming up and I am looking for an application that might be able to
  help me out.  When I am instructing a class I have to ask a question
  every three to six minutes.  No more no less.  I was looking for an
  app that would vibrate in my pocket every four minutes.  Does anyone
  know of an app like this?

  Thank you very much for any help that is offered.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Application Needed

2009-06-24 Thread bizzy401

Ok, the productivity sectionlol

On Jun 23, 8:52 pm, sm1 sergemas...@gmail.com wrote:
 I moved it to the Productivity section.
 serge

 On Jun 23, 8:47 pm, sm1 sergemas...@gmail.com wrote:

  I wrote a special app for this. It's free. It's called *)s) Repeat
  Vibrations*. In the Reference section. By simplecode.inc.

  Make sure you test it thoroughly before using it in class or during
  the evaluation. I wrote it today and i only tested it for an hour or
  so.

  Let us know how you did after the eval.

  serge

  On Jun 22, 4:49 am,bizzy401bizzy...@gmail.com wrote:

   I am an instructor in the military.  I have an instructor evaluation
   coming up and I am looking for an application that might be able to
   help me out.  When I am instructing a class I have to ask a question
   every three to six minutes.  No more no less.  I was looking for an
   app that would vibrate in my pocket every four minutes.  Does anyone
   know of an app like this?

   Thank you very much for any help that is offered.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Best approach for making one variable available in another activity / class

2009-06-24 Thread Christian S.

Just to confirm that this approach perfectly worked for me! Thanks
again!

On 22 Jun., 16:56, Christian S. schrott...@gmx.de wrote:
 Great - will try and let you know  Ch.

 On 22 Jun., 16:40, Sujay Krishna Suresh sujay.coold...@gmail.com
 wrote:



  //calling activity
  int count  = 0;
  //perform code for counting..
  Intent i = new Intent(Caller.this,Target.class);
  i.putExtra(count, count);
  startActivityForResult(i,0);

  //target class
  int count = getIntent().getIntExtra(count);

  On Mon, Jun 22, 2009 at 7:26 PM, Christian S. schrott...@gmx.de wrote:

   Sujay, thanks for this rapid response!!!

   Do you have a sample code to illustrate how this would be working ...?
   Thanks, Christian

   On 22 Jun., 15:29, Sujay Krishna Suresh sujay.coold...@gmail.com
   wrote:
'm not sure if this's the best approach...
if u r using intents to transfer control between the activities then i'd
advice u to try using the putExtra method of the Intent class...
u can read the extras in ur target activity by using
   getIntent.getExtras()
method... jus give it a try...
i hope this helps u...

On Mon, Jun 22, 2009 at 6:52 PM, Christian S. schrott...@gmx.de wrote:

 I have tried to understand for the past 2 days what is the best
 approach to making the value from a variable sitting in activity A (in
 my case, the int position used in OnListItemClick /
 OnItemSelectedListener) available in another activity B (which of
 course sits in another class). There may be the option to write the
 result of the OnListItemClick int position into a small SQLite DB -
 but that seems to be total overkill.

 Anybody could pls share the best approach with me?

 Thanks, Christian

--
Regards,
Sujay
P. J. O'Rourke
  http://www.brainyquote.com/quotes/authors/p/p_j_orourke.html
- If government were a product, selling it would be illegal.

  --
  Regards,
  Sujay
  Henny 
  Youngmanhttp://www.brainyquote.com/quotes/authors/h/henny_youngman.html
  - I told the doctor I broke my leg in two places. He told me to quit
  going
  to those places.- Zitierten Text ausblenden -

  - Zitierten Text anzeigen -- 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] Ubiquitous Social Networks

2009-06-24 Thread mboehmer

Hello,

social networks are nearly everywhere! Why should not we show social
information on the surface of our everyday environment, like the floor
for example? Drop me an email if your are interested in an Android
application for projector phones doing exactly this.

My current objective is to explore how displaying information from
social networks on public surfaces can increase social coherence. I am
conducting a survey for this and it would be great if you attend. It
only takes you 2-5 minutes.

You will find the survey at: http://tiny.cc/Y6okg

Thank you in advance!
Best regards


Matthias Böhmer
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 avoid the showing of prev,next buttons of MediaController

2009-06-24 Thread Marco Nelissen
If you have your own custom layout for the MediaController, then just remove
the prev/next buttons from it.


On Wed, Jun 24, 2009 at 7:59 AM, manoj manojkumar.m...@gmail.com wrote:


 Actually, I created a layout xml, and added the MediaController.

 On Jun 24, 7:45 pm, manoj manojkumar.m...@gmail.com wrote:
  HI Macro,
 
  Thanks for your reply.
 
  I haven't called the setPrevNextListener(). I am sure.
 
  can you please try once and let me know whether it was shown or not.
 
  Thanks,
  Manoj.
 
  On Jun 24, 7:29 pm, Marco Nelissen marc...@android.com wrote:
 
 
 
   According tohttp://
 developer.android.com/reference/android/widget/MediaController...,
   they will not be shown unless you call setPrevNextListener(). Have you
 tried
   not calling it?
 
   On Wed, Jun 24, 2009 at 6:16 AM, manoj manojkumar.m...@gmail.com
 wrote:
 
Hi,
 
I have implemented media player with MediaController.
 
Its working fine.
 
Now I would like to show only fastbackward, fast forward, play/pause
icons (omitting prev, next song buttons).
 
Can any one please help me to do this.
 
Thanks,
Manoj.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Application Needed

2009-06-24 Thread sm1

maybe the easiest way to get the app: with your phone, open the Market
app and do a search on simplecode. you'll see the app in a short list
and select it and install it. The app name is *)s) Repeat Vibrations*,
without the stars/asterisks.
serge
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: weird drawing on bitmap to canvas

2009-06-24 Thread MrChaz

setTextSize() and setStyle() need to be called on the Paint object I
think.

On Jun 23, 4:37 pm, sleith raysle...@gmail.com wrote:
 hi, i'm trying to draw bitmap in canvas.
 the bitmap is used to draw text and background using canvas (named
 canvasBitmap)
 but the text or background that are drown to bitmap is not displayed,
 as if it's out of bounds.
 i have to translate the canvasBitmap at some points to make it draw at
 right position.
 The problem is i don't know how many pixel i should translate to.

 here's the code example:

 public OnDraw(Canvas c){

   Paint mBackgroundPaint = new Paint();
   mBackgroundPaint.setColor(Color.RED);

   String mText = Testing;

   Paint mFontPaint = new Paint();
   mFontPaint.setColor(Color.WHITE);

   //setting rect
   Rect mBackgroundRect = new Rect();
   mFontPaint.getTextBounds(mText, 0, mText.length(), mBackgroundRect);

   //the bitmap to be drawn a text and backgroundRect
   Bitmap mBitmap = Bitmap.createBitmap(mBackgroundRect.width(),
                                 mBackgroundRect.height(), 
 Bitmap.Config.ARGB_);
   Canvas mCanvasBitmap = new Canvas(mBitmap);

   //draw text and background to bitmap
   mCanvasBitmap.drawColor(Color.CYAN);
   mCanvasBitmap.drawRect(mBackgroundRect, mBackgroundPaint);
   mCanvasBitmap.drawText(mText, 0, 0, mFontPaint);

   //draw bitmap to canvas
   c.drawBitmap(mBitmap, 0, 0, null);

 }

 this will only drawn Cyan color, the text and red background is not
 displayed
 i have to translate for example :
 mCanvasBitmap.translate(0, mBackgroundRect.height())

 to make it displayed (but not 100% correctly position)
 please help .
 thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 : Re : [android-developers] Re: How to catch BOOT_COMPLETED_ACTION from an IntentReceiver

2009-06-24 Thread GAYET Thierry
Okay for your information.

I have used class for a this BroadcatReceiver :


public class OnBootReceiverextends BroadcastReceiver 
{
private static final String TAG=BootstrapService; 
private BootstrapService mBootstrapService;

@Override
public void onReceive(Context context, Intent intent) 
{
Log.d(TAG,onReceive() ---ENTER---);
Log.d(TAG,Intent ACTION: +intent.getAction());
Log.d(TAG,Intent CATEGORIES ...);
SetString catSet=intent.getCategories();
IteratorString it=catSet.iterator();
while (it.hasNext()) 
{
Log.d(TAG,  +it.next());
} // WHILE
Log.d(TAG,Done.);
// This is broadcast once, after the system has finished booting.
if ( intent.getAction() == intent.ACTION_BOOT_COMPLETED )
{
mBootstrapService.AutostartService();
} // IF
Log.d(TAG,onReceive() ---EXIT-); 
} // onReceive
} // OnBootReceiver

And beside my second class that is launched by the previous one :


import android.app.Service;

//Need the following import to get access to the app resources, since this
//class is in a sub-package.
import com.OrangeLabs.BootstrapService.R;

// @brief Main class for the BootstrapService Android service
public class BootstrapService extends Service 
{
...

-- Is it correct 'cos i don't see the log information in logcat through DDMS ?
  Furthermore i don't see my package running in the DDMS listing ?
  (For information, the test with the OnBootReceiver is well working and is 
well launched)

And finaly my AndroidManifest.xml file :


?xml version=1.0 encoding=utf-8?

package=com.OrangeLabs.BootstrapService 
android:versionCode=1 
android:versionName=1.0
uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED /
uses-permission android:name=android.net.wifi.WIFI_STATE_CHANGED /  
application android:label=@string/app_name
receiver android:name=.OnBootReceiver
intent-filter
action android:name=android.intent.action.BOOT_COMPLETED /
/intent-filter
/receiver
receiver android:name=.OnWifiReceiver
intent-filter
action android:name=android.net.wifi.WIFI_STATE_CHANGED /
/intent-filter
/receiver
service android:enabled=true android:name=.BootstrapService /
/application
uses-sdk android:minSdkVersion=3/uses-sdk
/manifest


ps : another interesting link was : 
http://groups.google.com/group/android-developers/browse_thread/thread/8a0ebc433e1351a3
 

Cordialement


Thierry GAYET
NextInnovation.org
+33(0)663.849.589





De : Mark Murphy mmur...@commonsware.com
À : android-developers@googlegroups.com
Envoyé le : Mercredi, 24 Juin 2009, 15h02mn 52s
Objet : Re: Re : [android-developers] Re: How to catch BOOT_COMPLETED_ACTION 
from an IntentReceiver


GAYET Thierry wrote:
 First thanks for your quick reply. I have well found the code you told
 me about (OnBootReceiver).
 
 I have one more question 'cos i as i have said before i ma programming a
 service that i want to start when Android boot.
 
 My core class extends Service not  BroadcastReceiver. So may i extend
 more than one time. I mean to extends Service and BroadcastReceiver. for
 the same class ?
 
 Maybe i need to add a public class OnBootReceiver extends
 BroadcastReceiver inside my service project ? But if so how to link this
 second class with the service one ?

BOOT_COMPLETED must be received by a receiver element for a
BroadcatReceiver. You have no choice in the matter.

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

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



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



[android-developers] browser plugin development?

2009-06-24 Thread MikeDC

Are there any android focused tutorials for developing a plugin for
the browser?  I can find examples for webkit plugins but I want to try
developing a plugin that will access resources on the phone so there
is more to it than generic webkit requirements.

Also, after compiling a plugin how can I install it into the browser
on my phone?

thanks
Mike

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 dialog title and dialog background

2009-06-24 Thread Tonio™

Hey,

I'm facing a problem when trying to customize dialogs in my
application. Here is the description.

I have an activity louching a Dialog created as follow

protected Dialog onCreateDialog(int id) {
Dialog selectorDialog;
View layout = getLayoutInflater().inflate(R.layout.MyLayout,
(ViewGroup) findViewById(R.id.root_layout));
selectorDialog = new Dialog(this, R.style.MyLayout);
selectorDialog.addContentView(layout, new LayoutParams
(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
return selectorDialog;
}

For easy understanding MyLayout is a single line of Text (LinearLayout
+ TextView)
I use a custom theme :
style name=MyTheme parent=@android:style/Theme.Dialog
item name=android:windowBackground@drawable/MyBackground/
item
/style

The result is nice, I have MyBackground image set for my
selectorDialog but...
I have a blank space that correspond to the dialog title and I don't
want it !!!
(If i set selectorDialog.setTitle(Test); I can see Test written in
the undesired space...)

So I tried to set :

selectorDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);

But the displayed dialog looks like the same as when I use an
AlertDialog.Builder :

protected Dialog onCreateDialog(int id) {
Dialog selectorDialog;
View layout = getLayoutInflater().inflate(R.layout.MyLayout,
(ViewGroup) findViewById(R.id.root_layout));
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(layout);
selectorDialog = builder.create();
return selectorDialog;
}

In the first case : selectorDialog.requestWindowFeature
(Window.FEATURE_NO_TITLE);
I set MyTheme when creating the Dialog instance but it doesn't seem
that it takes effect.
I have no title... but not the custom Dialog background specified in
styles.xml

In the second case I can't figure (out) how to set the theme... and I
have the same result : no title but the standard Android AlertDialog
Theme.

I prospect in the platform (1.5) /res
And i Find  in themes.xml :

 item name=alertDialogStyle@android:style/AlertDialog/item

And in styles.xml :

style name=AlertDialog
item name=fullDark@android:drawable/popup_full_dark/item
item name=topDark@android:drawable/popup_top_dark/item
item name=centerDark@android:drawable/popup_center_dark/
item
item name=bottomDark@android:drawable/popup_bottom_dark/
item
item name=fullBright@android:drawable/popup_full_bright/
item
item name=topBright@android:drawable/popup_top_bright/
item
item name=centerBright@android:drawable/
popup_center_bright/item
item name=bottomBright@android:drawable/
popup_bottom_bright/item
item name=bottomMedium@android:drawable/
popup_bottom_medium/item
item name=centerMedium@android:drawable/
popup_center_medium/item
/style

I also tried to extend this AlerteDialog style but the attributes
fullDark, topDark, ... are not public so I can't override those
properties Moreover I dont want to override 10 properties I have a
single custom NinePathDrawable that fits perfectly for my dialog
background !!

Has one of you already manage to set a custom background for a custom
Dialog without having the useless title space displayed ?

Is there anyway to customize this by themes  styles ?

Thank you for your help.

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



[android-developers] Design

2009-06-24 Thread Andy_Sthml

This is mainly a design question :

My app connects to a server from where data is retrieved and presented
in a listview. Depending on user-selection different data is retreived
and filled in the list. A typical list item consists of a text string
of up to some 50 or 60 characters depending what the server returns.
Additionally, a small image icon is shown next to each string. The
server may return any number of items from 0 up to many hundred or
even thousands. It is possble to ask the server to iteratively return
subsets of the content. The images are actually links to http-
addresses, but I guess this still requires/allocates memory for the
listview by Android.

How do I design for efficiency and responsiveness, considering memory
consumption?
Are there any generic guide lines on how many list items, Strings or
Bytes to keep in memory?

On the one hand I would like to have as many items in the list as
possible - from a users perspective *all* items returned from the
server would be expected. On the other, sending many queries to the
server makes the app slower. I am not sure how to handle this
situation since I do not have a feel for what android can handle in
terms of memory.

Any ideas would be of help.


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



[android-developers] Re: Porting RDP (Remote Desktop Protocol) to Android -- questions

2009-06-24 Thread Hugo Wang
Is there any java rdp client ?  I suppose you can develop based on this?

2009/6/23 kirkbeaty kirkbe...@gmail.com


 Attempting to port RDP to Android ... saw someone had started this,
 Desktoid/Connectoid, but that effort seems to have stopped .. and I
 need this function immediately.   I have initial screen image of the
 Desktop displayed (with some local Android GUI expert's help) on the
 Android as a Bitmap.

 There are several calls that RDP does which I can not find equivalents
 in the Android GUI.   Those in the subject and others:

 drawGlyph, setClip, Cursor,  IndexColorModel, etc.

 Just to get the initial image was not without considerable effort ...
 little things like which Bitmap.Config was used was key ... seems it
 requires Bitmap.Config.RGB_565  (others did not work, and without
 understanding as to why ?).

 Willing to partner with any experts out there to get this completed.
 Think it a very useful utility.

 Of course, we need to have real ENTERPRISE WPA (even iPhone has this
 out of the box) to really make this complete (instead of doing it on
 emulator only :-)

 Thanks for any assistance anyone can provide.
 Kirk Beaty
 kirkbe...@gmail.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] PhoneFactory.getDefaultPhone from apps other than PhoneApp

2009-06-24 Thread Naveen K

Hi,

I am trying to call PhoneFactory.getDefaultPhone from a new
application so that I can access its invokeOemRilRaw* functions. But
it gives me a  java.lang.RuntimeException:
PhoneFactory.getDefaultPhone must be called from Looper thread error.

Is this possible ? Or is this function dedicated for the PhoneApp
only ?

Thank you,
Naveen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Inserting Data into a Cursor?

2009-06-24 Thread nbadal

Hello, I'm looking for a way to insert data into a cursor that is
separate from the SQL database it retrieves the rest of the
information from.
Is there any way to to this, or is there a different way to add more
information to a list view item?

What I'm trying to do is to use a date column for each entry in the
list to calculate the number of days until that date (and then put
that number in the list item).
I know how to get the value, but I just cant find a way to put it into
the list without it being in the cursor.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Out of memory exceptions and difference between emulator and hardware (dev phone)

2009-06-24 Thread lakuad

Hi,
   I have read a couple of threads about Bitmap creation and release
using recycle() but still have a problem with an OOM when running my
app (that creates bitmaps) on hardware - the dev phone 1 in this case.
Multiple passes through my application screens work fine in the
emulator but performing the same actions on the device results in an
OOM exception almost immediately.
   At this point I would really like a deterministic way to replicate
the scenario on the emulator which I thought should be possible by
limiting its memory (though I did read somewhere that the emulator and
the dev phone 1 have the same default memory so this should be moot
but whatever) i.e. -memory 64, but I am having zero success.
   Am I using the correct emulator args to limit the memory and/or
what is the strategy for making the emulator exactly the same as the
device at least with respect to memory constraints/pressure?

thnx,
L.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 a AndroidManifest.xml for a service

2009-06-24 Thread julianc

This is just an observation but having CAPITALISATION in you're
package names is not going to help you in the longer term. All package
names should be lower case, Classes should start with and upper case
letter. Then its a lot easier to figure out which is which, and your
manifest (among other things) becomes a lot easier for you (and
others) to read. For and example just examine the package and class
names of the standard android libraries.


Regards,

J.

On Jun 23, 1:46 pm, GAYET Thierry thierry_ga...@yahoo.fr wrote:
 Hello,

 I have used the Eclipse IDE for starting an Android Service but i have one 
 problem with my AndroidManifest.xml file on the line of the service tag.

 Here is my AndroidManifest.xml :

     package=com.OrangeLabs.gbaAndroid.BootstrapService
     application
         activity class=.BootstrapService android:label=@string/app_name
             intent-filter
                 action android:value=android.intent.action.MAIN /
                 category android:value=android.intent.category.LAUNCHER /
             /intent-filter
         /activity
        service class=”.BootstrapService”/     -- my problem is here !!
     /application
 /manifest

 And my Service skeleton :

 package com.OrangeLabs.gbaAndroid.BootstrapService;

 import android.app.Notification;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
 import android.app.Service;
 import android.content.Intent;
 import android.os.Binder;
 import android.os.IBinder;
 import android.os.Parcel;
 import android.widget.Toast;

 //Need the following import to get access to the app resources, since this
 //class is in a sub-package.
 import com.OrangeLabs.gbaAndroid.BootstrapService.R;

 // @brief Main class for the BootstrapService Android service
 public class BootstrapService extends Service
 {
     // Actions to perform when service is started.
     @Override
     public void onStart(Intent intent, int startId)
     {
         // Test the TelephonyManager API (can we have an access to the 
 authenfication
         // function buildin the sim/usim card

         // Create the shared memory used between the bootstrap client and the
         // application in link with a NAF server

         // Check and wait until the WIFI become usable

     } // onStart

     // Initialize variables, get references to GUI objects
     @Override
     public void onCreate()
     {

     } // onCreate
     @Override
     public IBinder onBind(Intent intent)
     {

         return null;
     } // onBind

 } // BootstrapService

 Is there a place where i can view / download some services sample ?

 Regards

 Thierry GAYET
 NextInnovation.org
 +33(0)663.849.589

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Dueling Activities Over the Intent's Hand in Marriage

2009-06-24 Thread Ryan

There have been many posts concerning developers attempting to extend
or overwrite Android's default applications: contacts, home, etc.
These often end in an explanation of the user prompt that allows the
user to decide upon the default activity to handle the intent. I
understand and agree with the reasoning behind protecting these
essential applications and alerting the user to any changes, but I
believe there are so many questions about this topic because the
system in place for setting a new default activity seems rigid and
unfinished. It makes sense to have a user select from a list of
similar activities when opening up something like an image editing/
viewing app, and perhaps selecting a favorite default, but to prompt a
user for every activity in a larger application, such as user-
interface overhaul, would be cumbersome for a user; in addition, it
could have unintended consequences if a user only accepted some of the
application's activities, but not others.

Something like a default activity list that could be selected or
rejected upon installation of the application would seem to be a
better solution. This sort of bundling could also be used when
switching back to the initial default applications (e.g. if one is
reverted, the rest are reverted, and the application itself is
notified of this activity in some way). So, I guess my question is
whether or not something similar to this solution is being developed
or if there's another answer to this problem?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Dueling Activities Over the Intent's Hand in Marriage

2009-06-24 Thread Ryan

There have been many posts concerning developers attempting to extend
or overwrite Android's default applications: contacts, home, etc.
These often end in an explanation of the user prompt that allows the
user to decide upon the default activity to handle the intent. I
understand and agree with the reasoning behind protecting these
essential applications and alerting the user to any changes, but I
believe there are so many questions about this topic because the
system in place for setting a new default activity seems rigid and
unfinished. It makes sense to have a user select from a list of
similar activities when opening up something like an image editing/
viewing app, and perhaps selecting a favorite default, but to prompt a
user for every activity in a larger application, such as user-
interface overhaul, would be cumbersome for a user; in addition, it
could have unintended consequences if a user only accepted some of the
application's activities, but not others.

Something like a default activity list that could be selected or
rejected upon installation of the application would seem to be a
better solution. This sort of bundling could also be used when
switching back to the initial default applications (e.g. if one is
reverted, the rest are reverted, and the application itself is
notified of this activity in some way). So, I guess my question is
whether or not something similar to this solution is being developed
or if there's another answer to this problem?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Mouse Events in Browser

2009-06-24 Thread Evan Ruff

Nothing on this? Is it really not possible?

E

On Jun 17, 6:49 pm, Evan Ruff evan.r...@gmail.com wrote:
 Hey guys,

 I was wondering if there was a way to use the mouse events in the
 Android Browser or in the Webview? I'd like to have mousedown/mouseup
 but if I could get drag events that would be great!

 Anyway to do this?

 Thanks!

 Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Inserting Data into a Cursor?

2009-06-24 Thread Marco Nelissen
You can have your own CursorAdapter, and in its bindView do whatever
calculations and data mapping you need.


On Tue, Jun 23, 2009 at 7:19 PM, nbadal ladabk...@gmail.com wrote:


 Hello, I'm looking for a way to insert data into a cursor that is
 separate from the SQL database it retrieves the rest of the
 information from.
 Is there any way to to this, or is there a different way to add more
 information to a list view item?

 What I'm trying to do is to use a date column for each entry in the
 list to calculate the number of days until that date (and then put
 that number in the list item).
 I know how to get the value, but I just cant find a way to put it into
 the list without it being in the cursor.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: browser plugin development?

2009-06-24 Thread Mark Murphy

MikeDC wrote:
 Are there any android focused tutorials for developing a plugin for
 the browser?  I can find examples for webkit plugins but I want to try
 developing a plugin that will access resources on the phone so there
 is more to it than generic webkit requirements.

AFAIK, you cannot develop WebKit plugins for normal Android app
distribution. You can create plugins as part of the firmware (see
http://source.android.com), and you may be able to once the NDK is
available for native development.

 Also, after compiling a plugin how can I install it into the browser
 on my phone?

Right now, you can't, except perhaps on a rooted device.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Inserting Data into a Cursor?

2009-06-24 Thread nbadal

So if I wanted to intercept the date data from the database, then do
my calculations, then send that number back out to a textview in the
list item, what would I need to do?

On Jun 24, 10:07 am, Marco Nelissen marc...@android.com wrote:
 You can have your own CursorAdapter, and in its bindView do whatever
 calculations and data mapping you need.



 On Tue, Jun 23, 2009 at 7:19 PM, nbadal ladabk...@gmail.com wrote:

  Hello, I'm looking for a way to insert data into a cursor that is
  separate from the SQL database it retrieves the rest of the
  information from.
  Is there any way to to this, or is there a different way to add more
  information to a list view item?

  What I'm trying to do is to use a date column for each entry in the
  list to calculate the number of days until that date (and then put
  that number in the list item).
  I know how to get the value, but I just cant find a way to put it into
  the list without it being in the cursor.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Inserting Data into a Cursor?

2009-06-24 Thread Mark Murphy

nbadal wrote:
 Hello, I'm looking for a way to insert data into a cursor that is
 separate from the SQL database it retrieves the rest of the
 information from.

You do not insert into Cursors. You insert into the SQLiteDatabase or
ContentProvider or other source of the Cursor.

 Is there any way to to this, or is there a different way to add more
 information to a list view item?

Override bindView() in your Adapter and pour in the additional
information per row.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Mouse Events in Browser

2009-06-24 Thread Mark Murphy

Evan Ruff wrote:
 Nothing on this? Is it really not possible?

Few mobile phones have mice. You are probably looking for touch events
or gestures:

http://developer.android.com/reference/android/view/GestureDetector.html

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Inserting Data into a Cursor?

2009-06-24 Thread nbadal

Would something like this work?

@Override
public void bindView(View view, Context context, Cursor cursor) {
TextView daysUntil = (TextView) view.findViewById(R.id.daysuntil);

String days = /* Calculations Here */

daysUntil.setText(days);


super.bindView(view, context, cursor);
}

On Jun 24, 10:13 am, nbadal ladabk...@gmail.com wrote:
 So if I wanted to intercept the date data from the database, then do
 my calculations, then send that number back out to a textview in the
 list item, what would I need to do?

 On Jun 24, 10:07 am, Marco Nelissen marc...@android.com wrote:



  You can have your own CursorAdapter, and in its bindView do whatever
  calculations and data mapping you need.

  On Tue, Jun 23, 2009 at 7:19 PM, nbadal ladabk...@gmail.com wrote:

   Hello, I'm looking for a way to insert data into a cursor that is
   separate from the SQL database it retrieves the rest of the
   information from.
   Is there any way to to this, or is there a different way to add more
   information to a list view item?

   What I'm trying to do is to use a date column for each entry in the
   list to calculate the number of days until that date (and then put
   that number in the list item).
   I know how to get the value, but I just cant find a way to put it into
   the list without it being in the cursor.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Mouse Events in Browser

2009-06-24 Thread Evan Ruff

LOL! Touche Mr. Murphy.

I was referring to the OnMouseDown, OnMouseUp, OnMouseMove family of
events in the browser. Are there Android Browser Equivalents that I'm
just missing?

Thanks!

Evan

On Jun 24, 1:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 Evan Ruff wrote:
  Nothing on this? Is it really not possible?

 Few mobile phones have mice. You are probably looking for touch events
 or gestures:

 http://developer.android.com/reference/android/view/GestureDetector.html

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

 Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Inserting Data into a Cursor?

2009-06-24 Thread Mark Murphy

nbadal wrote:
 Would something like this work?
 
 @Override
 public void bindView(View view, Context context, Cursor cursor) {
 TextView daysUntil = (TextView) view.findViewById(R.id.daysuntil);
 
 String days = /* Calculations Here */
 
 daysUntil.setText(days);
 
 
 super.bindView(view, context, cursor);
 }

I'd do the super.bindView() before putting in your overriding value, to
be safe, but otherwise I suspect that will work.

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Mouse Events in Browser

2009-06-24 Thread Mark Murphy

Evan Ruff wrote:
 I was referring to the OnMouseDown, OnMouseUp, OnMouseMove family of
 events in the browser. Are there Android Browser Equivalents that I'm
 just missing?

Ah. I thought you were referring to the SDK events, not WebKit.

A consulting colleague of mine did some investigation on that point a
while back:

http://groups.google.com/group/android-developers/browse_thread/thread/b9e24e2b05f39c5a/81292b608623f643

Note that this would have been Android 1.0 or 1.1, so there may be some
changes in this for Android 1.5.

Also, on the companion StackOverflow post, there's a comment from
somebody indicating that the standard onMouseDown and such should be
working:

http://stackoverflow.com/questions/475674/what-javascript-events-are-available-to-webkit-on-android

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Inserting Data into a Cursor?

2009-06-24 Thread nbadal

Alright, Thanks for the help!

On Jun 24, 10:24 am, Mark Murphy mmur...@commonsware.com wrote:
 nbadal wrote:
  Would something like this work?

  @Override
  public void bindView(View view, Context context, Cursor cursor) {
      TextView daysUntil = (TextView) view.findViewById(R.id.daysuntil);

      String days = /* Calculations Here */

      daysUntil.setText(days);

      super.bindView(view, context, cursor);
  }

 I'd do the super.bindView() before putting in your overriding value, to
 be safe, but otherwise I suspect that will work.

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

 Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Design

2009-06-24 Thread Yusuf T. Mobile

Hi Andy. Some ideas are:
- implement the simplest design first (i.e., load everything into
memory) and profile early and often
- iff (if and only if) and wherre (where and only where - I made that
one up:) it croaks, some possible optimizations are:
- don't put thousands of items on one list. Sublists may be an
alternative.
- prefetch and cache data - especially the images, rather than
loading them real-time from URLs. Loading everything is in theory the
most efficient, but may make the user wait at first, which ruins
responsiveness. Depending on the data characterization and use cases,
you will have to find a happy medium.
- reuse objects rather than incur the cost of memory allocation
and GC. For example, if you have a custom list item class, only create
as many as are needed to display on the screen, and update their data
as the user scrolls up and down, rather than creating lots of new ones
and abandoning old ones as the user scrolls.
- don't use XML, it has many advantages, but bandwidth and parsing
efficiency are not among them. Use a streaming (rather than tree)
parser, with a compressed protocol. Google's protobuf may be an
option.
- load and decompress in a non-UI thread. You don't have to wait
until everything is loaded and decompressed to show something, you can
do so selectively depending on what the user is looking at and may
soon be looking at.



Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.







On Jun 23, 2:06 pm, Andy_Sthml andreas.sc...@gmail.com wrote:
 This is mainly a design question :

 My app connects to a server from where data is retrieved and presented
 in a listview. Depending on user-selection different data is retreived
 and filled in the list. A typical list item consists of a text string
 of up to some 50 or 60 characters depending what the server returns.
 Additionally, a small image icon is shown next to each string. The
 server may return any number of items from 0 up to many hundred or
 even thousands. It is possble to ask the server to iteratively return
 subsets of the content. The images are actually links to http-
 addresses, but I guess this still requires/allocates memory for the
 listview by Android.

 How do I design for efficiency and responsiveness, considering memory
 consumption?
 Are there any generic guide lines on how many list items, Strings or
 Bytes to keep in memory?

 On the one hand I would like to have as many items in the list as
 possible - from a users perspective *all* items returned from the
 server would be expected. On the other, sending many queries to the
 server makes the app slower. I am not sure how to handle this
 situation since I do not have a feel for what android can handle in
 terms of memory.

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



[android-developers] Skins / themes in app drawer

2009-06-24 Thread David Carson

ok there's one app who is a big offender here - I think anyone who
uses it will know which one I mean - its in the top paid apps - all
the skins appear in the app drawer.

And yet I can sort of understand why he's done it - because you have a
choice of either including these lines in AndroidManifest.xml or not :
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter

If you do, app can be launched and is in app drawer.
If you don't, app can't be launched and is not in app drawer.

What would be most useful is the inbetween, i.e. app can be launched
and is not in app drawer. I've played around with all variations in
xml file and nothing achieves this behavior.

Publishers want skin packs to be launchable, so that when people
download them wondering what they are, they can include some info
directing you to a website or better still, straight to the main
product in the market.

But its inconsiderate to customers to fill up their app drawers with
stuff that is just skin packs / themes.

I don't think there is a solution to this, but I think its an issue
that Android need to address.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Using Picture recording creates bad memory allocation

2009-06-24 Thread David Carson

I use this approach for my main game loop because surface view is
jerky and drawing direct to image misses the double buffer effects, so
different parts of my image update at different times.

Picture.beginRecording works very smoothly, but DDMS indicates bad
memory allocation from the beginRecording method.

Canvas canvas = picture.beginRecording(320, 480);
canvas.draw
picture.endRecording();

I tracked the issue down to this line in the Picture.beginRecording
method :
 59 mRecordingCanvas = new RecordingCanvas(this, ni);

Hence no surprise about the allocation. But does this mean that there
is no way to use the Picture object in a game loop without causing
memory leaks / slowdown?

Kind of makes the whole Picture class redundant if there's no way
around this ...


http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=graphics/java/android/graphics/Picture.java;h=bbb2dbfa6abdf48b63ddfacc07fa2a7914a06e83;hb=cupcake

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



[android-developers] Android tab not appearing in Eclipse

2009-06-24 Thread Morice

Hi all,

I installed ADT plug-in in Eclipse 3.4(Ganymede)...Under installed
software,it shows,
=Android DDMS
=Android Development tools
When I checked Window-Preferences,there is no Android tab.There is no
Android under Projects tab also...
I can build applications through command line without using
eclipse...So I think my Java is right.

Please help me,

Thanks in advance,
Morice

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 make a custom View having it's height = width ?

2009-06-24 Thread Tonio™

Hi guy,

I'm trying to make my custom view looks like a square...
I'm putting my view in a linear layout like this :

LinearLayout
- Header view
- square view (my custom view)
- footer view

With the screen orientation set to Portrait *I would like my square
view to have height the same as it's width.
My custom view extends View class and override the onDraw method...

I can't figure out how to tell my view to take height=width within the
linear layout.
Is it possible using onLayout, onsizeChanged, onMeasure
And what should i do with this method

In onMeasure I guess I should tell that measuredHeight should be the
same as measureWidth wich should be equals to the linearLayout
width... but How can I be aware at this time (onMeasure) of the width
of my contentLayout (linearLayout) ?

Thx

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Repo error

2009-06-24 Thread Sivan

Dear All,

I am new to Git  Repo.

I am trying to download the Android source code using the below
command from my Fedora machine

repo init -u git://android.git.kernel.org/platform/manifest.git

I am getting following error

/root/bin/repo: line 1: !DOCTYPE: No such file or directory
/root/bin/repo: line 2: syntax error near unexpected token `'
'root/bin/repo: line 2: `HTMLHEADTITLEError Message/TITLE

Any one please help me.

Thanks in advance
Regards
Sivan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 reconnects all the time while in background mode

2009-06-24 Thread othy74

I'm facing the same issue. Without manual intervention (switching wi-
fi off and on again) it can sometimes take several hours for wi-fi to
reestablish itself.

Setting 'Wi-Fi sleep policy' to 'never' also does not seem to help.

I assume this is the same as issue 2059. Any update on 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 at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   >