Re: [android-developers] How can I draw nice connections between two points in Android?

2011-03-30 Thread Mike Bear
I tried the second with images, and it works well...

Thanks,
Mike

On Wed, Mar 30, 2011 at 1:00 PM, Kristopher Micinski krismicin...@gmail.com
 wrote:

 I'm sure both solutions are *possible*...

 Implementation? Depends on what you want. Images would give you more
 prettiness, right? But maybe if you just had lines it would be more light
 weight.

 What's the purpose of it though, that might help give a better answer (or
 point you in a better direction perhaps).

 Kris

 On Wed, Mar 30, 2011 at 12:55 AM, Mike Bear android.xi...@gmail.comwrote:

 Hi Kris and all,

 As my understanding, there are maybe two possible solutions:
 1. draw points by points, to render a connection like lightning (or river)
 between the two points p1 and p2.
  2. draw image to between the two points; in the image, we can draw what
 we want.

 Do you think both solutions are possible, and if they are, which one is
 easier from implementation perspective?

 Thanks,
 Mike

 On Wed, Mar 30, 2011 at 12:27 PM, Kristopher Micinski 
 krismicin...@gmail.com wrote:

 I mean, you could either do it yourself by making a lightning bolt with
 lines, or something nice like that. Or you can probably load a picture into
 memory and rotate / morph it. Did you mean shapes that were actual images,
 or something more like dotted lines (setting the pen differently) or curves?

 But is there built in Android support for something like
 drawRiver(p1,p2)? I'm not sure, but I don't think so.

 Kris

 On Tue, Mar 29, 2011 at 11:40 PM, android.xi...@gmail.com 
 android.xi...@gmail.com wrote:

 For simplification, there are two points in the Canvas, p1 (x1, y1)
 and p2(x2, y2).
 I want to connect the two points with some kind of connections, which
 is not the drawLine function.
 In the connection, there are much nice effects (much beautiful) than
 only a simple line, for example, the connection between the two points
 are like the lighting, or looks like a river.

 Is there are any possibility to implement the effects?

 Thanks in advance.

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


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


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


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


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

[android-developers] Re: Root status to application

2011-03-30 Thread FrankG
Hello !

IMHO A rooted device will not be enough for several
things, often you would also need to sign the app with the platform
key of the particular device. Means such an app can not be portable in
my
eyes.

Good luck ! Frank


On 29 Mrz., 21:19, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 29 March 2011 19:59, Pent supp...@apps.dinglisch.net wrote:

I am trying to build an application which can be much more useful if it
  can
be run as a root application. Is der a way to provide root status to an
application.

   Only on rooted devices.

  While we're on the subject, anyone know a good means to determine if
  root is possible without actually attempting to do something that
  needs root ?

 OSMonitor is open source and features extra actions on rooted devices. You
 may want simply to dig in sources:http://code.google.com/p/android-os-monitor/

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: AdMod in a Surfaceview

2011-03-30 Thread ko5tik
AdMob SDK 4.0.2 ( well, now it's google admob SDK )  was really buggy,
so I just downgraded back to older
admob version.   Now there is 4.0.4, which claims to have fixed bugs
arising from accessing widgets by wrong thread

On Mar 27, 2:55 am, Kevina k.a.j.adege...@gmail.com wrote:
 Hi all,

 I have an activity, say MainActivity which uses a SurfaceView called
 GameView as layout.
 The activity contains:
 SetContentView(GameView);

 That all works great, but now I want to integrate AdMod which leads to
 lots of crashes. I've been trying to fix it in a lot of different ways
 but after 7 hours it's still not working. What I basically want is my
 AdMod view on the bottom of my screen while being able to play my
 game. (Like angry birds but then different orientation).

 If you'd like more information, please ask. I'll take a look tomorrow,
 first some sleep :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Use one handler for multiple activties

2011-03-30 Thread Nand
Hi,
I have two activties(one list view and one normal view which is
launched when an item is selected from list) in my application. I have
a background thread whihc is started when the appplication is launched
which gets data from the network conitnuously and post it to the UI
using handler. But I have two user interfaces/layouts. How can I
update the two UIs using one handler? If not possible then how to
implement two handlers? If I use two handlers then how to decide in
the background to post data to the proper handler?

Regards,
Nand

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] crypto DES File

2011-03-30 Thread Marcin Orlowski
On 29 March 2011 23:00, jaafar zbeiba jaafarinformati...@gmail.com wrote:

 What is the encryption and decryption DES of file


Google is broken out there?
http://en.wikipedia.org/wiki/Data_Encryption_Standard

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] opengl: Loading textures in another thread

2011-03-30 Thread Jump
Hello
I am trying to load and bind textures in another thread while the rendering 
thread is showing a loading screen. 

I am trying to create a shared context and set that to the current then do 
all the work and then set the context of the rendering thread back to 
current. 
This is the code in my loading thread (AsyncTask):

   EGL egl = EGLContext.getEGL();

EGLContext context = null;

EGLContext sharedContext = null;


   EGL10 egl10 = (EGL10)egl;  

context = egl10.eglGetCurrentContext();

sharedContext = egl10.eglCreateContext(egl10.eglGetCurrentDisplay(), 
mEglConfig, context, null);

  javax.microedition.khronos.egl.EGLSurface drawSurface = 
egl10.eglGetCurrentSurface(EGL10.EGL_DRAW);

javax.microedition.khronos.egl.EGLSurface readSurface = 
egl10.eglGetCurrentSurface(EGL10.EGL_READ);

  egl10.eglMakeCurrent(egl10.eglGetCurrentDisplay(), drawSurface, 
readSurface, sharedContext);


// Load and bind textures


   mGL.glFlush();


   egl10.eglMakeCurrent(egl10.eglGetCurrentDisplay(), drawSurface, 
readSurface, context);



Right now I am stuck om eglGetCurrentSurface throws a 
IllegalArgumentException.


Any pointers would be appreciated.

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: Root status to application

2011-03-30 Thread Pent
 IMHO A rooted device will not be enough for several
 things,

A rooted device will be enough for several things :-)

Pent

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Root status to application

2011-03-30 Thread Pent
 OSMonitor is open source and features extra actions on rooted devices. You
 may want simply to dig in sources:http://code.google.com/p/android-os-monitor/

Very useful, thanks!

Pent

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do i upload the file from android mobile to public server

2011-03-30 Thread snehalal gangadharam
hi ,

i have debuged the code, input stream is null, unable to connect the server.

the same code is woking fine in java . i have given  network permissions
too.

uses-permission android:name=*android.permission.ACCESS_NETWORK_STATE*/
uses-permission

uses-permission android:name=*android.permission.CHANGE_NETWORK_STATE*/
uses-permission



can we upload the files through HTTP.

is HTTP Client able to upload the file to  public server.

Thanks in advance

regards
Sneha.

On Sat, Mar 26, 2011 at 5:17 AM, Nicholas Johnson
metthejohn...@gmail.comwrote:

 I believe the first error that is causing your program to crash is located
 here:

 03-25 10:33:36.980: ERROR/AndroidRuntime(301): java.lang.NullPointerException
 03-25 10:33:36.980: ERROR/AndroidRuntime(301): at 
 com.example.uplaod.MyUpload$1.upload(MyUpload.java:146)


 Check out line 146 in MyUpload. Set a breakpoint just before it, run your 
 program in Debug mode, and figure out why you're trying to access a Null 
 pointer.

 --Nick

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


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

[android-developers] forde to open the Launcher, not the last Activity

2011-03-30 Thread guiridemeer
I would like to force my app to go to the launcher when i clik on it
in the Home Screen

I am in any activity of my app and i click HOME button and go to the
Home Screen, If i click on my launcher then i always go to the last
activity where i clicked HOME button, instead of my launcher activity

I have tried with launch modes, with android:clearTaskOnLaunch, with
android:finishOnTaskLaunch and they never work!!!

Android always starts with the lastActivity onRestart() method instead
of my launcher activity.

How can i do that please? I need your help:

this is my code in the manifest:

activity android:name=.cem.activity.LanzadorCeM
android:label=@string/app_cem_name 
android:icon=@drawable/
aprocor3
intent-filter android:label=@string/textLanzadorCeM
action 
android:name=android.intent.action.MAIN /
category 
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] forde to open the Launcher, not the last Activity

2011-03-30 Thread Marcin Orlowski
On 30 March 2011 11:03, guiridemeer guiridem...@gmail.com wrote:


 I am in any activity of my app and i click HOME button and go to the
 Home Screen, If i click on my launcher then i always go to the last
 activity where i clicked HOME button, instead of my launcher activity


Aside from technical aspect of your problem - you got in-app button that you
want to behave the same way hardware home button? What you want this feature
duplicated for?

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 implement live wallpaper?

2011-03-30 Thread a a
the live wallpaper in the desktop is an activity or a picture?

If it is a activity, how can i set the activity on the desktop?

else if it is a picture, how can i let the picture with animation?

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


Re: [android-developers] How implement live wallpaper?

2011-03-30 Thread Marcin Orlowski
On 30 March 2011 11:43, a a harvey.a...@gmail.com wrote:

 the live wallpaper in the desktop is an activity or a picture?
 If it is a activity, how can i set the activity on the desktop?
 else if it is a picture, how can i let the picture with animation?


Why do not you try to spend at least a single minute doing your homework
right? Do googling on subject, do RTFM, do a peek in SDK's samples folder
*before* you start to ask answered questions...


Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

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

Re: [android-developers] How implement live wallpaper?

2011-03-30 Thread a a
i am so sorry about disturb you, because i am a beginner android, sorry.

2011/3/30 Marcin Orlowski webnet.andr...@gmail.com:
 On 30 March 2011 11:43, a a harvey.a...@gmail.com wrote:

 the live wallpaper in the desktop is an activity or a picture?
 If it is a activity, how can i set the activity on the desktop?
 else if it is a picture, how can i let the picture with animation?

 Why do not you try to spend at least a single minute doing your homework
 right? Do googling on subject, do RTFM, do a peek in SDK's samples folder
 *before* you start to ask answered questions...


 Marcin Orlowski

 Tray Agenda - keep you daily schedule handy...
 WebnetMobile on Facebook and Twitter


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

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


[android-developers] Android 3.0-Tabhost

2011-03-30 Thread Jayanthi
Hi,
 I need sample code for Tab host in android honeycomb can anyone
please help me

Thanks in Advance

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


[android-developers] Re: getSharedPreferences for a wallpaper

2011-03-30 Thread mac-systems
I do not understood your question quite right i think.

So, where is the benefit that u want to access the prefs. in the loop
instead get a callback when their change ?

- Jens

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Layout help

2011-03-30 Thread Neilz
Ok, I'll try again - it was a Sunday after all :-)


Basically all I'm after is a LinearLayout sitting in the center of the
screen, that I can scroll horizontally from one item to the next,
using a finger scroll, rather than just buttons.

Any help with this really appreciated.

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


Re: [android-developers] How implement live wallpaper?

2011-03-30 Thread String
On Wednesday, March 30, 2011 10:55:19 AM UTC+1, harvey wrote:

i am so sorry about disturb you, because i am a beginner android, sorry.


*Especially* if you're a beginner, you should be reading the docs before 
posting wide-open questions here. For example:
http://developer.android.com/resources/articles/live-wallpapers.html

http://developer.android.com/resources/articles/live-wallpapers.html
String 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Changing ImageView's image

2011-03-30 Thread Raghav Sood
Hi everyone,

I have an ImageView who's image I need to chenge on touch.The ImageView's
src is set through XML. My code is as follows:

public class abc extends Activity {
// Create an anonymous implementation of OnClickListener
private OnClickListener match1 = new OnClickListener() {
public void onClick(View v) {

};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ImageView button = (ImageView)findViewById(R.id.l1m1);
// Register the onClick listener with the implementation above
button.setOnClickListener(match1);

}


}

What do I put in the onclick event to change the ImageView's image?

Thanks

-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.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

Re: [android-developers] Changing ImageView's image

2011-03-30 Thread Mark Murphy
setImageResource() or similar methods:

http://developer.android.com/reference/android/widget/ImageView.html

On Wed, Mar 30, 2011 at 7:01 AM, Raghav Sood raghavs...@gmail.com wrote:
 Hi everyone,

 I have an ImageView who's image I need to chenge on touch.The ImageView's
 src is set through XML. My code is as follows:

 public class abc extends Activity {
     // Create an anonymous implementation of OnClickListener
     private OnClickListener match1 = new OnClickListener() {
         public void onClick(View v) {

         };

     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
     ImageView button = (ImageView)findViewById(R.id.l1m1);
         // Register the onClick listener with the implementation above
         button.setOnClickListener(match1);

     }


 }

 What do I put in the onclick event to change the ImageView's image?

 Thanks

 --
 Raghav Sood
 http://www.raghavsood.com/
 http://www.androidappcheck.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



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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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] Well displayed in portrait but not in landscape

2011-03-30 Thread Alaeddine Ghribi
Hi,
I developped a small app, it has 3 EditTexts and 2 buttons, in
portrait all the items are well displayed, but in landscape, the right
button(reset) doesn't take the extreme right position! here is my
XML(in RelativeLayout):

EditText android:id=@+id/consom2 android:layout_width=fill_parent
android:layout_below=@id/consom1
  android:layout_height=wrap_content android:textSize=18sp
  android:numeric=integer|decimal
  android:hint=@string/cons
   /EditText


Button
android:text=Calculer
android:id=@+id/button
android:layout_below=@id/consom2
android:layout_alignParentLeft=true
android:layout_height=wrap_content
android:layout_width=wrap_content
/Button
Button
android:text=Reset
android:id=@+id/button2
android:layout_below=@id/consom2
android:layout_alignParentRight=true
android:layout_height=wrap_content
android:layout_width=wrap_content 
 /Button

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Well displayed in portrait but not in landscape

2011-03-30 Thread Mark Murphy
Use Hierarchy Viewer to examine your layout and determine where you
are going wrong:

http://developer.android.com/guide/developing/debugging/debugging-ui.html

(note that this is also available as an Eclipse perspective, Hierarchy View)

On Wed, Mar 30, 2011 at 8:22 AM, Alaeddine Ghribi
alaeddineghr...@gmail.com wrote:
 Hi,
 I developped a small app, it has 3 EditTexts and 2 buttons, in
 portrait all the items are well displayed, but in landscape, the right
 button(reset) doesn't take the extreme right position! here is my
 XML(in RelativeLayout):

 EditText android:id=@+id/consom2 android:layout_width=fill_parent
 android:layout_below=@id/consom1
      android:layout_height=wrap_content android:textSize=18sp
      android:numeric=integer|decimal
      android:hint=@string/cons
   /EditText


 Button
    android:text=Calculer
    android:id=@+id/button
    android:layout_below=@id/consom2
    android:layout_alignParentLeft=true
    android:layout_height=wrap_content
    android:layout_width=wrap_content
 /Button
 Button
    android:text=Reset
    android:id=@+id/button2
    android:layout_below=@id/consom2
    android:layout_alignParentRight=true
    android:layout_height=wrap_content
    android:layout_width=wrap_content 
  /Button

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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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] Double lifecycle sequence from landscape to portrait

2011-03-30 Thread Giorgio Vespucci
Remark: posted a question to
http://stackoverflow.com/questions/5484108/android-double-lifecycle-sequence-from-landscape-to-portrait.
RSVP there. Thank you

Hi everybody

I'm monitoring an Activity lifecycle to learn more on it, so I put a
Log.d()call in almost every method of the cycle.

I'm watching particularly the sequence:

[A]onSaveInstanceState() - onPause() - onStop() - onDestroy() -
onStart() - [B]onRestoreInstanceState()

http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle

Switching a 2.2 Froyo emulator with Ctrl-F11 from *portrait to landscape* I
can see *one* round from [A] to [B].

What is strange to me is that switching back *from landscape to portrait* I
can see *two* round from [A] to [B].

onSaveInstanceState() - onPause() - onStop() - onDestroy() - onStart()
- onRestoreInstanceState()

onSaveInstanceState() - onPause() - onStop() - onDestroy() - onStart()
- onRestoreInstanceState()

This is creating me lots of issues in saving/restoring the activity state.
Using a 2.3.3 Gingerbread emulator the sequence runs only once. But 2.3.3
emulator has a known bug that prevents it from rotating correctly!

StackOverflow user @Reflog told me that
Rotation in emulator is different from Accelerator rotation. It actually
simulates an open-keyboard. These are two different events, which cause two
different lify-cycle flows.

According to Using the Android
Emulatorhttp://developer.android.com/guide/developing/devices/emulator.htmlthere
exist only Ctrl-F11/F12 to Swith to previous/next layout
orientation.
Is it not an Accelerator rotation key? How can be it emulated?
What are this different lifecycle flows?

Thank you
-- 
Giorgio Vespucci
giorgio [dot] vespucci [at] gmail [dot] com
Skype, Twitter, Slideshare: gvespucci
http://xpermanwalking.blogspot.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: Well displayed in portrait but not in landscape

2011-03-30 Thread Alaeddine Ghribi
And how to add the XMl file to the Hierarchy View ?
And can it solve the problem ?
Thank you :).

On 30 mar, 13:28, Mark Murphy mmur...@commonsware.com wrote:
 Use Hierarchy Viewer to examine your layout and determine where you
 are going wrong:

 http://developer.android.com/guide/developing/debugging/debugging-ui

 (note that this is also available as an Eclipse perspective, Hierarchy View)

 On Wed, Mar 30, 2011 at 8:22 AM, Alaeddine Ghribi









 alaeddineghr...@gmail.com wrote:
  Hi,
  I developped a small app, it has 3 EditTexts and 2 buttons, in
  portrait all the items are well displayed, but in landscape, the right
  button(reset) doesn't take the extreme right position! here is my
  XML(in RelativeLayout):

  EditText android:id=@+id/consom2 android:layout_width=fill_parent
  android:layout_below=@id/consom1
       android:layout_height=wrap_content android:textSize=18sp
       android:numeric=integer|decimal
       android:hint=@string/cons
    /EditText

  Button
     android:text=Calculer
     android:id=@+id/button
     android:layout_below=@id/consom2
     android:layout_alignParentLeft=true
     android:layout_height=wrap_content
     android:layout_width=wrap_content
  /Button
  Button
     android:text=Reset
     android:id=@+id/button2
     android:layout_below=@id/consom2
     android:layout_alignParentRight=true
     android:layout_height=wrap_content
     android:layout_width=wrap_content 
   /Button

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

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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: Well displayed in portrait but not in landscape

2011-03-30 Thread Mark Murphy
On Wed, Mar 30, 2011 at 8:36 AM, Alaeddine Ghribi
alaeddineghr...@gmail.com wrote:
 And how to add the XMl file to the Hierarchy View ?

You don't add the XMl file to the Hierarchy View ?.

You use the Hierarchy View tool to inspect your layout as it is
running in your activity to determine where you are going wrong.

Please read the documentation for more information:

http://developer.android.com/guide/developing/debugging/debugging-ui.html

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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] Binder Invocation to an Incorrect Interface

2011-03-30 Thread Jake Colman

ACRA just reported that my application crashed with the above error.  I
googled the error and nothing seemed relevant to my situation.

The crash occurred on the creation of a PendingIntent and it was
executing in an IntentService class.

This is the relevant section of code:

  Intent i = new Intent( this, ZmanimList.class );
  PendingIntent pi = PendingIntent.getActivity( this, 0, i, 0 );

What would cause getActivity() to fail with this error?  Is there any
other information I should provide to help figure this out?

Thanks.

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] sublist

2011-03-30 Thread jaafar zbeiba
thx but it just a list and I do not know or square sublist

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Sip Communicator

2011-03-30 Thread Alexei Telles
I'm missing answer e-mails.
Changing my membership option and opening a new post about SIP.

On Mar 18, 1:34 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 16 March 2011 02:01, Alexei Telles alexeitel...@gmail.com wrote:

  I'm starting android development and in my first project I need to
  make Sip Communicator running on Android.

 People usually start with hello world type of things. What is you general
 experience with SIP?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] SIP

2011-03-30 Thread Alexei Telles
I think it's a little off-topic, but if someone has some experience
with it and could give me some help I appreciate.

I need a SIP softphone to run on Android with zRTP protocol.
I found CSipSimple, an open-source, C software.
In my tests works fine, but I need one built on Java.

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] How to Create a 1x1 Widget Frame?

2011-03-30 Thread Jake Colman

I suppose that this is more of a graphics question than an Android SDK
question but maybe I can get some help anyway.

I downloaded the 2x1 widget frame from the Developers Guidelines page.
This frame scales to 1x1 without an issue if I set the
minHeight/minWidget parameters accordingly in the providers file.

My problem is that the widget appears to have margins that are getting
in my way and the background is opaque.

How can I remove the margins from that widget (I want to display my text
centered horizontally and vertically but need more display area) and how
do I change the background to make it translucent?

I am working on a Ubuntu VirtualBox and tried working with Gimp but
could not figure anything out.

Can anyone point me in the right direction or, better yet, just point me
to a proper .png that I can use?

Thanks.

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Well displayed in portrait but not in landscape

2011-03-30 Thread Alaeddine Ghribi
Thank you for your response, i now know what i have to do = just run
the app in the emulator and go to the hierarchy View.
I have however an error:
[2011-03-30 13:42:40 - hierarchyviewer]Unable to debug device
emulator-5554

Why ?
Thanks .

On 30 mar, 13:40, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 8:36 AM, Alaeddine Ghribi

 alaeddineghr...@gmail.com wrote:
  And how to add the XMl file to the Hierarchy View ?

 You don't add the XMl file to the Hierarchy View ?.

 You use the Hierarchy View tool to inspect your layout as it is
 running in your activity to determine where you are going wrong.

 Please read the documentation for more information:

 http://developer.android.com/guide/developing/debugging/debugging-ui

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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: Well displayed in portrait but not in landscape

2011-03-30 Thread Mark Murphy
Perhaps you are running Eclipse and trying to use the command-line
hierarchyviewer program. Either use the Hierarchy View perspective in
Eclipse, or shut down Eclipse when you run hierarchyviewer.

Beyond that, I have no suggestions.

On Wed, Mar 30, 2011 at 9:33 AM, Alaeddine Ghribi
alaeddineghr...@gmail.com wrote:
 Thank you for your response, i now know what i have to do = just run
 the app in the emulator and go to the hierarchy View.
 I have however an error:
 [2011-03-30 13:42:40 - hierarchyviewer]Unable to debug device
 emulator-5554

 Why ?
 Thanks .

 On 30 mar, 13:40, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 8:36 AM, Alaeddine Ghribi

 alaeddineghr...@gmail.com wrote:
  And how to add the XMl file to the Hierarchy View ?

 You don't add the XMl file to the Hierarchy View ?.

 You use the Hierarchy View tool to inspect your layout as it is
 running in your activity to determine where you are going wrong.

 Please read the documentation for more information:

 http://developer.android.com/guide/developing/debugging/debugging-ui

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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] Amazon Market Reporting

2011-03-30 Thread Spiral123
Is it just me, or is anyone else getting the message: Access to
reports is temporarily unavailable at this time. Please try again
later.?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Transparent InputConnection?

2011-03-30 Thread Dmitry Golubovsky
Hi,

Is there an example of/tutorial on maximally transparent subclass of
BaseInputConnection? Android 2.0 if that matters.

All I need is to pass a key event to the target view on any alpha or
digit or special character soft key pressed, bypassing any built-in
text editing capabilities.

This is perhaps a generalization of my earlier question about
KEYCODE_DEL (I got a suggestion for this one on another forum that the
problem lies in the input connection), but it looks like input of
digits does not work properly either: I just want to have a
transparent input method.

Thanks.

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


Re: [android-developers] Changing ImageView's image

2011-03-30 Thread Raghav Sood
Hi Mark,

Thanks. I have already tried that. The code I used was:
button.setImageResource(Drawable m1s.png);

That  didn't work. Is there something wrong or am i using the wrong part of
the api.

On Wed, Mar 30, 2011 at 4:52 PM, Mark Murphy mmur...@commonsware.comwrote:

 setImageResource() or similar methods:

 http://developer.android.com/reference/android/widget/ImageView.html

 On Wed, Mar 30, 2011 at 7:01 AM, Raghav Sood raghavs...@gmail.com wrote:
  Hi everyone,
 
  I have an ImageView who's image I need to chenge on touch.The ImageView's
  src is set through XML. My code is as follows:
 
  public class abc extends Activity {
  // Create an anonymous implementation of OnClickListener
  private OnClickListener match1 = new OnClickListener() {
  public void onClick(View v) {
 
  };
 
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  ImageView button = (ImageView)findViewById(R.id.l1m1);
  // Register the onClick listener with the implementation above
  button.setOnClickListener(match1);
 
  }
 
 
  }
 
  What do I put in the onclick event to change the ImageView's image?
 
  Thanks
 
  --
  Raghav Sood
  http://www.raghavsood.com/
  http://www.androidappcheck.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



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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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




-- 
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.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

Re: [android-developers] Amazon Market Reporting

2011-03-30 Thread Justin Giles
Same here, and from what I saw over the first week, there was obviously
something broken with their reporting.

On Wed, Mar 30, 2011 at 8:47 AM, Spiral123 cumis...@gmail.com wrote:

 Is it just me, or is anyone else getting the message: Access to
 reports is temporarily unavailable at this time. Please try again
 later.?

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

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

Re: [android-developers] Changing ImageView's image

2011-03-30 Thread Mark Murphy
On Wed, Mar 30, 2011 at 9:54 AM, Raghav Sood raghavs...@gmail.com wrote:
 Thanks. I have already tried that. The code I used was:
 button.setImageResource(Drawable m1s.png);

 That  didn't work. Is there something wrong or am i using the wrong part of
 the api.


setImageResource() takes an image resource (e.g., R.drawable.my_image).

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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] How to Create a 1x1 Widget Frame?

2011-03-30 Thread Kostya Vasilyev

Jake,

If you need to remove the margins - well, remove the margins. They are 
in the image, should be easy with any graphics program, preferably you 
would make the image itself take a larger portion of the canvas.


Using negative values for padding or margins are, AFAIK, not supported 
(which would be another way, if it was possible).


As for transparency, those template backgrounds definitely have 
transparency in them. If it's not showing up, perhaps you have other 
images or view attributes that get in the way, or it could be that you 
saved them with transparency disabled.


Finally, you might want to make a 1x1 background yourself, so it doesn't 
have to be scaled at runtime, and that your widget looks more crisp. A 
nine-patch drawable would let you share the background between 1x1 and 
other sizes.


-- Kostya

30.03.2011 17:28, Jake Colman пишет:

I suppose that this is more of a graphics question than an Android SDK
question but maybe I can get some help anyway.

I downloaded the 2x1 widget frame from the Developers Guidelines page.
This frame scales to 1x1 without an issue if I set the
minHeight/minWidget parameters accordingly in the providers file.

My problem is that the widget appears to have margins that are getting
in my way and the background is opaque.

How can I remove the margins from that widget (I want to display my text
centered horizontally and vertically but need more display area) and how
do I change the background to make it translucent?

I am working on a Ubuntu VirtualBox and tried working with Gimp but
could not figure anything out.

Can anyone point me in the right direction or, better yet, just point me
to a proper .png that I can use?

Thanks.




--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] Binder Invocation to an Incorrect Interface

2011-03-30 Thread Mark Murphy
Can you post the full stack trace? That's a rather odd error message,
and I'd like to see a bit more context.

On Wed, Mar 30, 2011 at 9:02 AM, Jake Colman col...@ppllc.com wrote:

 ACRA just reported that my application crashed with the above error.  I
 googled the error and nothing seemed relevant to my situation.

 The crash occurred on the creation of a PendingIntent and it was
 executing in an IntentService class.

 This is the relevant section of code:

  Intent i = new Intent( this, ZmanimList.class );
  PendingIntent pi = PendingIntent.getActivity( this, 0, i, 0 );

 What would cause getActivity() to fail with this error?  Is there any
 other information I should provide to help figure this out?

 Thanks.

 --
 Jake Colman -- Android Tinkerer

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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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] Amazon Market Reporting

2011-03-30 Thread String
Yep, it's been down since yesterday for me. I contacted them about some of 
the reporting discrepancies late last week, and got a generic We are 
looking into this response. Just teething problems, I assume, but hopefully 
they'll have it straightened out soon.

String

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Device Administration the same as OMA DM support?

2011-03-30 Thread Hank
I know with 2.2, Android includes an API for Device Administration. I
am wondering if having the Device Administration API was the same as
having OMA DM support?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Well displayed in portrait but not in landscape

2011-03-30 Thread Alaeddine Ghribi
I succeed to run Hierarchy View, but don't understand how to know
where is the problem !

On 30 mar, 14:40, Mark Murphy mmur...@commonsware.com wrote:
 Perhaps you are running Eclipse and trying to use the command-line
 hierarchyviewer program. Either use the Hierarchy View perspective in
 Eclipse, or shut down Eclipse when you run hierarchyviewer.

 Beyond that, I have no suggestions.

 On Wed, Mar 30, 2011 at 9:33 AM, Alaeddine Ghribi









 alaeddineghr...@gmail.com wrote:
  Thank you for your response, i now know what i have to do = just run
  the app in the emulator and go to the hierarchy View.
  I have however an error:
  [2011-03-30 13:42:40 - hierarchyviewer]Unable to debug device
  emulator-5554

  Why ?
  Thanks .

  On 30 mar, 13:40, Mark Murphy mmur...@commonsware.com wrote:
  On Wed, Mar 30, 2011 at 8:36 AM, Alaeddine Ghribi

  alaeddineghr...@gmail.com wrote:
   And how to add the XMl file to the Hierarchy View ?

  You don't add the XMl file to the Hierarchy View ?.

  You use the Hierarchy View tool to inspect your layout as it is
  running in your activity to determine where you are going wrong.

  Please read the documentation for more information:

 http://developer.android.com/guide/developing/debugging/debugging-ui

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version
  1.9.2 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

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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] problem for button

2011-03-30 Thread jaafar zbeiba
hello I have a problem in my code when I type the password and I click
enter it shows me an exception message
1 class main for password
package com.tutomobile.android.listView;




import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

import android.app.Activity;

import android.os.Bundle;

import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnKeyListener;

import android.widget.Button;
import android.widget.EditText;


import android.widget.Toast;



public class main extends Activity implements OnClickListener,
OnKeyListener {
/** Called when the activity is first created. */
   /*Display display=null;*/
EditText password;
Button ok;


public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
password= (EditText)findViewById(R.id.password);
ok= (Button)findViewById(R.id.ok);

ok.setOnClickListener(this);
password.setOnClickListener(this);

final String TESTSTRING = new String(1234);

  // # Write a file to the disk #
  /* We have to use the openFileOutput()-method
   * the ActivityContext provides, to
   * protect your file from others and
   * This is done for security-reasons.
   * We chose MODE_WORLD_READABLE, because
   *  we have nothing to hide in our file */
  FileOutputStream fOut;
  try {
 fOut = openFileOutput(fichier.txt,
MODE_WORLD_READABLE);

  OutputStreamWriter osw = new OutputStreamWriter(fOut);

  // Write the string to the file
  osw.write(TESTSTRING);
  /* ensure that everything is
   * really written out and close */
  osw.flush();
  osw.close();
  } catch (FileNotFoundException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
  }
  // # Read the file back in #
  catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
  }



}
   /*final EditText nameField = (EditText)
findViewById(R.id.editText);  */


   public void sendFeedback(View button) {


String name1 =password.getText().toString();
   /* System.out.print(name1=+name1);*/
 //nameField.getText().toString();
try {
FileInputStream fIn = openFileInput(fichier.txt);
 InputStreamReader isr = new InputStreamReader(fIn);
 /* Prepare a char-Array that will
  * hold the chars we read back in. */
 char[] inputBuffer = new char[name1.length()];
 // Fill the Buffer with data from the file

isr.read(inputBuffer);


String readString = new String(inputBuffer);


 if (readString.equals(name1)){
 Toast.makeText(this,Mot de passe
correct,Toast.LENGTH_SHORT).show();
  Tutoriel5_Android aa=new Tutoriel5_Android();
  aa.showDialog(BIND_AUTO_CREATE);
 } else{
  Toast.makeText(this,Mot de passe
Incorrect,Toast.LENGTH_SHORT).show();

 // Do click handling here
  }
 } catch (IOException e) {
  Toast.makeText(this,Une erreur est
survenue,Toast.LENGTH_SHORT).show();

e.printStackTrace();
 }
}


   @Override
   public boolean onKey(View arg0, int arg1, KeyEvent arg2) {
  // TODO Auto-generated method stub
  return false;
   }


   @Override

  public void onClick(View v) {
sendFeedback(ok);
}
}

public class Tutoriel5_Android extends Activity {

   private ListView maListViewPerso;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

//Récupération de la listview créée dans le fichier
main.xml
maListViewPerso = (ListView)
findViewById(R.id.listviewperso);

//Création de la ArrayList qui nous permettra de remplire
la listView
ArrayListHashMapString, String listItem = new
ArrayListHashMapString, String();

//On déclare la HashMap qui contiendra les informations
pour un item
HashMapString, String map;

//Création d'une HashMap pour insérer les informations du
premier item de notre listView
map = new HashMapString, 

[android-developers] SSL Load

2011-03-30 Thread bob
Is there an easy way to silently load an SSL page in Android?

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: Well displayed in portrait but not in landscape

2011-03-30 Thread Alaeddine Ghribi
I don't know how but the problem is solved :) ( :\ ) !
Thank you for your help :).

On 30 mar, 15:20, Alaeddine Ghribi alaeddineghr...@gmail.com wrote:
 I succeed to run Hierarchy View, but don't understand how to know
 where is the problem !

 On 30 mar, 14:40, Mark Murphy mmur...@commonsware.com wrote:







  Perhaps you are running Eclipse and trying to use the command-line
  hierarchyviewer program. Either use the Hierarchy View perspective in
  Eclipse, or shut down Eclipse when you run hierarchyviewer.

  Beyond that, I have no suggestions.

  On Wed, Mar 30, 2011 at 9:33 AM, Alaeddine Ghribi

  alaeddineghr...@gmail.com wrote:
   Thank you for your response, i now know what i have to do = just run
   the app in the emulator and go to the hierarchy View.
   I have however an error:
   [2011-03-30 13:42:40 - hierarchyviewer]Unable to debug device
   emulator-5554

   Why ?
   Thanks .

   On 30 mar, 13:40, Mark Murphy mmur...@commonsware.com wrote:
   On Wed, Mar 30, 2011 at 8:36 AM, Alaeddine Ghribi

   alaeddineghr...@gmail.com wrote:
And how to add the XMl file to the Hierarchy View ?

   You don't add the XMl file to the Hierarchy View ?.

   You use the Hierarchy View tool to inspect your layout as it is
   running in your activity to determine where you are going wrong.

   Please read the documentation for more information:

  http://developer.android.com/guide/developing/debugging/debugging-ui

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

   _The Busy Coder's Guide to *Advanced* Android Development_ Version
   1.9.2 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

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version
  1.9.2 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] problem for button

2011-03-30 Thread Marcin Orlowski
On 30 March 2011 16:24, jaafar zbeiba jaafarinformati...@gmail.com wrote:

 hello I have a problem in my code when I type the password and I click
 enter it shows me an exception message


did you read log you quoted?


03-30 13:55:06.493: ERROR/AndroidRuntime(257): Uncaught handler:
 thread main exiting due to uncaught exception
03-30 13:55:06.513: ERROR/AndroidRuntime(257):
 java.lang.IllegalArgumentException: A*ctivity#onCreateDialog did not
 create a dialog for id 1*


Learn how to debug your own code yourself - that's helpful if you want to
write more. If unsure, plant breakpoints on each line in suspicoius code and
check where it crashes

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] SSL Load

2011-03-30 Thread Marcin Orlowski
On 30 March 2011 16:41, bob b...@coolgroups.com wrote:

 Is there an easy way to silently load an SSL page in Android?


And not silently means what exactly?

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Import/Export data file

2011-03-30 Thread Alaeddine Ghribi
Hi,
I built an app that calculates fuel consumption, my data are well
stored in a file, however, i often flash my phone and want to add the
import-export feature on it !
How can i make this ?
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: Amazon Appmarket is now open!

2011-03-30 Thread Krischik Martin
On 25 Mrz., 21:07, Fernando Cassia fcas...@gmail.com wrote:
 On Fri, Mar 25, 2011 at 4:26 AM, Krischik Martin

 martin.krisc...@noser.com wrote:
  Did you actually read the terms and conditions for developers and
  suppliers? Or are you just an Amazon-Fanboy believing that is must be
  good because it is from mighty Amazon?

 Luckily for us with an interest in Java, Opera has just launched its
 own Mobile App Store, supporting Blackberry, Windows Mobile, Android,
 Symbian, and Java ME, the latter which Google continues to pretend
 doesn´t exist.

Actually it is a franchise of Handango/Pocketgear. But this even
better as my apps are available by another channel without the need of
yet another upload and without the need to create yet another set of
marketing material.

So yes that is pretty cool.

Martin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Amazon Appmarket is now open!

2011-03-30 Thread Krischik Martin
On Mar 29, 4:19 pm, Kevin TeslaCoil Software ke...@teslacoilsw.com
wrote:
  Opera has just launched its own Mobile App Store

 And instead of contacting developers to get them to submit their apps
 before launch, Opera just populated it with pirated software... Not a
 good way to gain developer support or credibility.

You are badly informed: The opera shop is a franchise of Handago/
Pocketgear and all the software is legitimate.  Which I consider even
better as I did not need to upload my software yet again.

So no worry, if you found your apps there you will be paid.

Martin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Working With Multiple Widget Sizes

2011-03-30 Thread Jake Colman

My app uses an IntentService to update the widget's remote view.  I am
now working on adding support for multiple widget size with the smaller
widget using a different layout than the larger.  Is there a way for my
IntentService to determine which widget size it is being asked to update
so that it knows which layout to specify when it constructs the remote
view?

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Working With Multiple Widget Sizes

2011-03-30 Thread Kostya Vasilyev
As far as Android is concerned, IntentService knows nothing about home 
screen widgets.


Since you know which widget receivers' onUpdate was called, pass this 
information to the service (e.g. by setting an intent extra).


-- Kostya

30.03.2011 19:10, Jake Colman пишет:

My app uses an IntentService to update the widget's remote view.  I am
now working on adding support for multiple widget size with the smaller
widget using a different layout than the larger.  Is there a way for my
IntentService to determine which widget size it is being asked to update
so that it knows which layout to specify when it constructs the remote
view?




--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Re: Amazon Appmarket is now open!

2011-03-30 Thread Krischik Martin
On Mar 29, 7:09 pm, Kevin TeslaCoil Software ke...@teslacoilsw.com
wrote:

 Some more details, it was WidgetLocker 1.2.2, which is from July 2010
 and several versions out of date. It was named WidgetLockr (Pirate
 spelling?). It was an unmodified APK signed by me, the one I had
 posted to the Android Market (no LVL at that time).

Now this is interesting — I did not know the Pirates are that
unabashed. Of corse that can happen with any shop where you did not
upload the app yourself. So no need to bash Opera for it.

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


Re: [android-developers] Re: Amazon Appmarket is now open!

2011-03-30 Thread Kostya Vasilyev

I see that Handago offers paid apps for Android, with trial period feature.

Anyone know what kind of licensing scheme / library is behind this?

Do they just point to Market for downloads (like AppBrain, etc.) or have 
their own solution (like AndroidPIT)?


-- Kostya

30.03.2011 19:10, Krischik Martin пишет:

On Mar 29, 4:19 pm, Kevin TeslaCoil Softwareke...@teslacoilsw.com
wrote:

Opera has just launched its own Mobile App Store

And instead of contacting developers to get them to submit their apps
before launch, Opera just populated it with pirated software... Not a
good way to gain developer support or credibility.

You are badly informed: The opera shop is a franchise of Handago/
Pocketgear and all the software is legitimate.  Which I consider even
better as I did not need to upload my software yet again.

So no worry, if you found your apps there you will be paid.

Martin




--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] Import/Export data file

2011-03-30 Thread Marcin Orlowski
On 30 March 2011 16:57, Alaeddine Ghribi alaeddineghr...@gmail.com wrote:

 Hi,
 I built an app that calculates fuel consumption, my data are well
 stored in a file, however, i often flash my phone and want to add the
 import-export feature on it !
 How can i make this ?


You keep your data set in file not DB? Then just copy it to SD card.


Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Import/Export data file

2011-03-30 Thread Mark Murphy
On Wed, Mar 30, 2011 at 12:08 PM, Marcin Orlowski
webnet.andr...@gmail.com wrote:
 On 30 March 2011 16:57, Alaeddine Ghribi alaeddineghr...@gmail.com wrote:

 Hi,
 I built an app that calculates fuel consumption, my data are well
 stored in a file, however, i often flash my phone and want to add the
 import-export feature on it !
 How can i make this ?

 You keep your data set in file not DB? Then just copy it to SD card.

I recommend closing your SQLiteDatabase and SQLiteOpenHelper objects
first and otherwise making sure you are not in the middle of some
database operations before making the copy.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: Import/Export data file

2011-03-30 Thread Alaeddine Ghribi
I thinked about this function, i just copy the file in a directory in
the SDCARD and then to import just copy the file to /data/data/...
But how doing it ?
Thanks.

On 30 mar, 17:08, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 30 March 2011 16:57, Alaeddine Ghribi alaeddineghr...@gmail.com wrote:

  Hi,
  I built an app that calculates fuel consumption, my data are well
  stored in a file, however, i often flash my phone and want to add the
  import-export feature on it !
  How can i make this ?

 You keep your data set in file not DB? Then just copy it to SD card.

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: totally 2d

2011-03-30 Thread Dianne Hackborn
I can't tell you what is acceptable.  Ultimately you are the judge of
that, and it depends very much on what you are doing.

On Mon, Mar 28, 2011 at 2:11 AM, Kostya Vasilyev kmans...@gmail.com wrote:

 What about Tegra 2 based phones that run Android 2.x?

 That's about half the number of pixels compared to the Xoom. Is their
 rendering performance acceptable? Specifically, in 2d games, UI animations?

 -- Kostya

 28.03.2011 9:58, Dianne Hackborn пишет:

  (Some background -- the number of pixels on the screens of the devices
 Android runs on has generally been growing significantly faster than the CPU
 and bus speeds. This has made the limitations of software rendering
 increasingly noticeable. The Tegra 2 tablets are basically the point where
 this came to a head, and required that the 2d drawing API be hardware
 accelerated in order to get acceptable performance.)



 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com


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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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: Import/Export data file

2011-03-30 Thread Alaeddine Ghribi
Yes, i'm just using a file to store data, but how can i copy the file
in data/data/. to the SDCARD? How doing it in JAVA/Android ?

On 30 mar, 17:08, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 30 March 2011 16:57, Alaeddine Ghribi alaeddineghr...@gmail.com wrote:

  Hi,
  I built an app that calculates fuel consumption, my data are well
  stored in a file, however, i often flash my phone and want to add the
  import-export feature on it !
  How can i make this ?

 You keep your data set in file not DB? Then just copy it to SD card.

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Import/Export data file

2011-03-30 Thread Marcin Orlowski
On 30 March 2011 18:19, Alaeddine Ghribi alaeddineghr...@gmail.com wrote:

 Yes, i'm just using a file to store data, but how can i copy the file
 in data/data/. to the SDCARD? How doing it in JAVA/Android ?


http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory%28%29
http://www.google.pl/search?q=how+to+copy+files+java

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Import/Export data file

2011-03-30 Thread Alaeddine Ghribi
Thank for your answer, and i know how to use io files.
But i'm asking how to specify the location of the file in import and
export operations ?

On 30 mar, 17:22, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 12:19 PM, Alaeddine Ghribi

 alaeddineghr...@gmail.com wrote:
  Yes, i'm just using a file to store data, but how can i copy the file
  in data/data/. to the SDCARD? How doing it in JAVA/Android ?

 Standard Java file I/O.

 If you are new to Java, I recommend spending some time learning Java
 outside of Android first. Here is a blog post with a list of Java
 topics that Android developers need to know before getting into
 Android:

 http://commonsware.com/blog/2010/08/02/java-good-parts-version.html

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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: Import/Export data file

2011-03-30 Thread Mark Murphy
On Wed, Mar 30, 2011 at 12:19 PM, Alaeddine Ghribi
alaeddineghr...@gmail.com wrote:
 Yes, i'm just using a file to store data, but how can i copy the file
 in data/data/. to the SDCARD? How doing it in JAVA/Android ?

Standard Java file I/O.

If you are new to Java, I recommend spending some time learning Java
outside of Android first. Here is a blog post with a list of Java
topics that Android developers need to know before getting into
Android:

http://commonsware.com/blog/2010/08/02/java-good-parts-version.html

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: Use one handler for multiple activties

2011-03-30 Thread lbendlin
you don't bring the data to the activity. The activity is getting (fetching) 
the data when needed.  There is no point in updating a UI that is not 
visible.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: dialogs in android and orientation change...

2011-03-30 Thread sdphil
that demo is not calling showDialog() in onCreate until you click on a
button.  in my case, i'm doing it automatically based on some
condition.

On Mar 29, 7:43 pm, Dianne Hackborn hack...@android.com wrote:
 Here is an API demo showing how to do this:

 http://developer.android.com/resources/samples/ApiDemos/src/com/examp...

 It doesn't have the behavior you describe, so I wonder if there is something
 else going on in your code?









 On Tue, Mar 29, 2011 at 10:58 AM, sdphil phil.pellouch...@gmail.com wrote:
  okay, this is officially driving me crazy.

  I have an Activity and in onCreate() if some condition is true, I want
  to pop up a dialog and inform the user.

  public void onCreate() {
     
     
     if (condition is true)
         showDialog(42);
     
  }

  And I put in the appropriate code in onCreateDialog and
  onPrepareDialog - no problem, everything is working fine.

  The issue is if I change screen orientation, it destroys the activity
  and re-creates it.  Fine.  But in doing that, it goes into onCreate
  and calls showDialog(42) again, which causes onCreateDialog and
  onPrepareDialog to be called again.  Then it seems like the underlying
  system is trying to remember that I had a dialog up when i did the
  screen orientation so it calls onCreateDialog and onPrepareDialog a
  second time!  I can save an instance of the dialog id in
  onSaveInstanceState() and restore it in onRestoreInstanceState(), but
  it seems like onRestoreInstanceState() doesn't get called until
  *after* onCreate is called, which means, it's going to make that call
  to showDialog(42) again.  What's the best place to show dialogs after
  an activity has come up such that screen orientation changes won't
  cause multiple onCreateDialogs/onPrepareDialog calls to be made?

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  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


Re: [android-developers] forde to open the Launcher, not the last Activity

2011-03-30 Thread lbendlin
 

android:launchMode=*singleTask
* 

android:alwaysRetainTaskState=*true
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: dialogs in android and orientation change...

2011-03-30 Thread Dianne Hackborn
Er.  You are saying you are calling showDialog in your activity's onCreate?
 Then I think that is your answer -- you are showing it *again* when the
activity is re-created.

On Wed, Mar 30, 2011 at 9:30 AM, sdphil phil.pellouch...@gmail.com wrote:

 that demo is not calling showDialog() in onCreate until you click on a
 button.  in my case, i'm doing it automatically based on some
 condition.

 On Mar 29, 7:43 pm, Dianne Hackborn hack...@android.com wrote:
  Here is an API demo showing how to do this:
 
  http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
 
  It doesn't have the behavior you describe, so I wonder if there is
 something
  else going on in your code?
 
 
 
 
 
 
 
 
 
  On Tue, Mar 29, 2011 at 10:58 AM, sdphil phil.pellouch...@gmail.com
 wrote:
   okay, this is officially driving me crazy.
 
   I have an Activity and in onCreate() if some condition is true, I want
   to pop up a dialog and inform the user.
 
   public void onCreate() {
  
  
  if (condition is true)
  showDialog(42);
  
   }
 
   And I put in the appropriate code in onCreateDialog and
   onPrepareDialog - no problem, everything is working fine.
 
   The issue is if I change screen orientation, it destroys the activity
   and re-creates it.  Fine.  But in doing that, it goes into onCreate
   and calls showDialog(42) again, which causes onCreateDialog and
   onPrepareDialog to be called again.  Then it seems like the underlying
   system is trying to remember that I had a dialog up when i did the
   screen orientation so it calls onCreateDialog and onPrepareDialog a
   second time!  I can save an instance of the dialog id in
   onSaveInstanceState() and restore it in onRestoreInstanceState(), but
   it seems like onRestoreInstanceState() doesn't get called until
   *after* onCreate is called, which means, it's going to make that call
   to showDialog(42) again.  What's the best place to show dialogs after
   an activity has come up such that screen orientation changes won't
   cause multiple onCreateDialogs/onPrepareDialog calls to be made?
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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: Import/Export data file

2011-03-30 Thread Alaeddine Ghribi
This one is perfect:
http://www.roseindia.net/java/beginners/CopyFile.shtml
I just don't know how to specify the location of the import/export
operations, where to copy and where to past :\ !
Thank you for your help.

On 30 mar, 17:26, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 30 March 2011 18:19, Alaeddine Ghribi alaeddineghr...@gmail.com wrote:

  Yes, i'm just using a file to store data, but how can i copy the file
  in data/data/. to the SDCARD? How doing it in JAVA/Android ?

 http://developer.android.com/reference/android/os/Environment.html#ge...http://www.google.pl/search?q=how+to+copy+files+java

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Import/Export data file

2011-03-30 Thread Alaeddine Ghribi
This one is perfect:
http://www.roseindia.net/java/beginners/CopyFile.shtml
I just don't know how to specify the location of the import/export
operations, where to copy and where to past :\ !
Thank you for your help.

On 30 mar, 17:26, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 30 March 2011 18:19, Alaeddine Ghribi alaeddineghr...@gmail.com wrote:

  Yes, i'm just using a file to store data, but how can i copy the file
  in data/data/. to the SDCARD? How doing it in JAVA/Android ?

 http://developer.android.com/reference/android/os/Environment.html#ge...http://www.google.pl/search?q=how+to+copy+files+java

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Transparent InputConnection?

2011-03-30 Thread Dianne Hackborn
I don't understand what you are asking.  If you want to not let any editing
to happen, just implement an InputConnection that doesn't do anything.  If
there is something different than that which you are looking for...  well
you'll just need to implement the operations on InputConnection to whatever
it is you want.

You say all you need is to pass a key event...  but the point of
InputConnection is to *not* operate in key events.  If you just want raw key
events, don't implement an InputConnection.  (There is compatibility code
that turns operations into raw key events for apps that don't support input
connections.)

On Wed, Mar 30, 2011 at 6:49 AM, Dmitry Golubovsky golubov...@gmail.comwrote:

 Hi,

 Is there an example of/tutorial on maximally transparent subclass of
 BaseInputConnection? Android 2.0 if that matters.

 All I need is to pass a key event to the target view on any alpha or
 digit or special character soft key pressed, bypassing any built-in
 text editing capabilities.

 This is perhaps a generalization of my earlier question about
 KEYCODE_DEL (I got a suggestion for this one on another forum that the
 problem lies in the input connection), but it looks like input of
 digits does not work properly either: I just want to have a
 transparent input method.

 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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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

Re: [android-developers] Device Administration the same as OMA DM support?

2011-03-30 Thread Dianne Hackborn
It is not an implementation of OMA DM.

On Wed, Mar 30, 2011 at 7:20 AM, Hank hwang...@gmail.com wrote:

 I know with 2.2, Android includes an API for Device Administration. I
 am wondering if having the Device Administration API was the same as
 having OMA DM support?

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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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

Re: [android-developers] Android 3.0-Tabhost

2011-03-30 Thread Dianne Hackborn
For Android 3.0, the recommended practice is the action bar and fragments.

On Wed, Mar 30, 2011 at 3:04 AM, Jayanthi jaia...@gmail.com wrote:

 Hi,
 I need sample code for Tab host in android honeycomb can anyone
 please help me

 Thanks in Advance

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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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: How to Create a 1x1 Widget Frame?

2011-03-30 Thread Jake Colman

Actually, I am pretty sure that it is a 9-patch drawable, since the name
widget_frame.9.png.

Here is a(nother) dumb question: what app can I use to do this editing.
I didn't see anything in Gimp (using Ubuntu) that would allow me to set
or modify any margins.  Nor did I see anything about transparency.

Looking again at Widget Design Guidelines page I see that they posted
size-specific .psd files.  If that's the case, it means that it is NOT
where I got my widget_frame 9-patch.

 KV == Kostya Vasilyev kmans...@gmail.com writes:

   KV Jake,

   KV If you need to remove the margins - well, remove the
   KV margins. They are in the image, should be easy with any graphics
   KV program, preferably you would make the image itself take a larger
   KV portion of the canvas.

   KV Using negative values for padding or margins are, AFAIK, not
   KV supported (which would be another way, if it was possible).

   KV As for transparency, those template backgrounds definitely have
   KV transparency in them. If it's not showing up, perhaps you have
   KV other images or view attributes that get in the way, or it could
   KV be that you saved them with transparency disabled.

   KV Finally, you might want to make a 1x1 background yourself, so it
   KV doesn't have to be scaled at runtime, and that your widget looks
   KV more crisp. A nine-patch drawable would let you share the
   KV background between 1x1 and other sizes.

   KV -- Kostya

   KV 30.03.2011 17:28, Jake Colman пишет:
I suppose that this is more of a graphics question than an Android SDK
question but maybe I can get some help anyway.

I downloaded the 2x1 widget frame from the Developers Guidelines page.
This frame scales to 1x1 without an issue if I set the
minHeight/minWidget parameters accordingly in the providers file.

My problem is that the widget appears to have margins that are getting
in my way and the background is opaque.

How can I remove the margins from that widget (I want to display my text
centered horizontally and vertically but need more display area) and how
do I change the background to make it translucent?

I am working on a Ubuntu VirtualBox and tried working with Gimp but
could not figure anything out.

Can anyone point me in the right direction or, better yet, just point me
to a proper .png that I can use?

Thanks.


   KV -- 
   KV Kostya Vasilyev -- http://kmansoft.wordpress.com

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

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] dialogs in android and orientation change...

2011-03-30 Thread TreKing
On Tue, Mar 29, 2011 at 12:58 PM, sdphil phil.pellouch...@gmail.com wrote:

 public void onCreate() {


if (condition is true)
showDialog(42);

 }


Change to:

public void onCreate(Bundle bundle)
{
   
   //  bundle is null on first start, non-null on restart
   if (condition is true  bundle == null)
   showDialog(42);
   
}

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

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

[android-developers] Re: Binder Invocation to an Incorrect Interface

2011-03-30 Thread Jake Colman
 MM == Mark Murphy mmur...@commonsware.com writes:

   MM Can you post the full stack trace? That's a rather odd error
   MM message, and I'd like to see a bit more context.

java.lang.SecurityException: Binder invocation to an incorrect interface
at android.os.Parcel.readException(Parcel.java:1218)
at android.os.Parcel.readException(Parcel.java:1206)
at 
android.app.ActivityManagerProxy.getIntentSender(ActivityManagerNative.java:2053)
at android.app.PendingIntent.getActivity(PendingIntent.java:195)
at 
com.jnc.zmanminder.ZMUpdateService.buildUpdate(ZMUpdateService.java:84)
at 
com.jnc.zmanminder.ZMUpdateService.onHandleIntent(ZMUpdateService.java:187)
at 
android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:30)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.os.HandlerThread.run(HandlerThread.java:60)

The code at line 84 in the buildUpdate method corresponds to this:

   PendingIntent pi = PendingIntent.getActivity( this, 0, i, 0 );



-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Import/Export data file

2011-03-30 Thread Kostya Vasilyev

30.03.2011 20:31, Alaeddine Ghribi пишет:

This one is perfect:
http://www.roseindia.net/java/beginners/CopyFile.shtml
I just don't know how to specify the location of the import/export


http://developer.android.com/guide/topics/data/data-storage.html#filesExternal

-- Kostya


operations, where to copy and where to past :\ !
Thank you for your help.

On 30 mar, 17:26, Marcin Orlowskiwebnet.andr...@gmail.com  wrote:

On 30 March 2011 18:19, Alaeddine Ghribialaeddineghr...@gmail.com  wrote:


Yes, i'm just using a file to store data, but how can i copy the file
in data/data/. to the SDCARD? How doing it in JAVA/Android ?

http://developer.android.com/reference/android/os/Environment.html#ge...http://www.google.pl/search?q=how+to+copy+files+java

Regards,
Marcin Orlowski

*Tray Agendahttp://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebookhttp://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Re: Working With Multiple Widget Sizes

2011-03-30 Thread Jake Colman
 KV == Kostya Vasilyev kmans...@gmail.com writes:

   KV As far as Android is concerned, IntentService knows nothing about
   KV home screen widgets.

   KV Since you know which widget receivers' onUpdate was called, pass
   KV this information to the service (e.g. by setting an intent
   KV extra).

Correct.  The IntentService has to do the following to gain access to
the RemoteView:

  RemoteViews views = new RemoteViews( context.getPackageName(),
R.layout.thelayoutname );

But the value R.layout is dependent on which widget receiver is
triggering the IntentService.  The IntentService does have to know
something about home screen widget since it has to know which widget to
update with the populated remote view.  I was hoping maybe the
AppWidgetManager would be able to tell me something or that there would
be some other trick.

I guess I can extend my Broadcast Receiver so that each onUpdate method
adds a piece of information to the Intent.  I had been thinking that I
needed two Intents; I forgot that I could just pass data as an extra.

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Binder Invocation to an Incorrect Interface

2011-03-30 Thread Mark Murphy
:: shrug ::

Beats me. I thought I might learn something from the source code, but
I got nuthin'.

On Wed, Mar 30, 2011 at 12:42 PM, Jake Colman col...@ppllc.com wrote:
 MM == Mark Murphy mmur...@commonsware.com writes:

   MM Can you post the full stack trace? That's a rather odd error
   MM message, and I'd like to see a bit more context.

 java.lang.SecurityException: Binder invocation to an incorrect interface
        at android.os.Parcel.readException(Parcel.java:1218)
        at android.os.Parcel.readException(Parcel.java:1206)
        at 
 android.app.ActivityManagerProxy.getIntentSender(ActivityManagerNative.java:2053)
        at android.app.PendingIntent.getActivity(PendingIntent.java:195)
        at 
 com.jnc.zmanminder.ZMUpdateService.buildUpdate(ZMUpdateService.java:84)
        at 
 com.jnc.zmanminder.ZMUpdateService.onHandleIntent(ZMUpdateService.java:187)
        at 
 android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:30)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:123)
        at android.os.HandlerThread.run(HandlerThread.java:60)

 The code at line 84 in the buildUpdate method corresponds to this:

   PendingIntent pi = PendingIntent.getActivity( this, 0, i, 0 );



 --
 Jake Colman -- Android Tinkerer

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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: dialogs in android and orientation change...

2011-03-30 Thread sdphil
brilliant!  thanks.  sometimes you can't see what's right in front of
your face!  thanks!

On Mar 30, 9:44 am, TreKing treking...@gmail.com wrote:
 On Tue, Mar 29, 2011 at 12:58 PM, sdphil phil.pellouch...@gmail.com wrote:
  public void onCreate() {
     
     
     if (condition is true)
         showDialog(42);
     
  }

 Change to:

 public void onCreate(Bundle bundle)
 {
    
    //  bundle is null on first start, non-null on restart
    if (condition is true  bundle == null)
        showDialog(42);
    

 }

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

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


[android-developers] Android: VoiceRecognition View Customization?

2011-03-30 Thread Mike
I'm using the sample code for Voice recognition
(VoiceRecognition.java) from the Android SDK Tools. I'm able to get
the Speak Now View to appear. Is there any way to customize that
view? For example, the buttons are the default silver and rollover is
yellow.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Create a 1x1 Widget Frame?

2011-03-30 Thread Kostya Vasilyev

30.03.2011 20:40, Jake Colman пишет:

Actually, I am pretty sure that it is a 9-patch drawable, since the name
widget_frame.9.png.


Good.


Here is a(nother) dumb question: what app can I use to do this editing.
I didn't see anything in Gimp (using Ubuntu) that would allow me to set
or modify any margins.  Nor did I see anything about transparency.


Anything really - Photoshop, Gimp...

There is no such thing as margins in a PNG file, understood as some 
numeric value you can enter somewhere (at least not for Android).


A raster image has certain size, so many pixels across and so many 
pixels down. If it has transparent areas on the sides/top/bottom, then 
those would show up as margins when this image is used in an application.


What you need to do, is edit the file and make the transparent areas 
smaller, and/or the non-transparent area larger.


For a nine-patch drawable, you also need to leave one extra row / column 
on pixels on each of four sides, and draw black pixels that tell Android 
how to resize it. Without this, it's not really a nine-patch. You can do 
this in the same image editing program, or use Draw9Patch from the SDK:


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


Looking again at Widget Design Guidelines page I see that they posted
size-specific .psd files.  If that's the case, it means that it is NOT
where I got my widget_frame 9-patch.


The standard widget frames are in Photoshop format, not nine-patches. 
They are not very useful anyway, as they only fit well on an HVGA screen 
(320 by 480).


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] Re: Binder Invocation to an Incorrect Interface

2011-03-30 Thread Kostya Vasilyev
Could just be someone with non-standard, buggy firmware. I, too, see 
weird ones like that from time to time.


-- Kostya

30.03.2011 20:54, Mark Murphy пишет:

:: shrug ::

Beats me. I thought I might learn something from the source code, but
I got nuthin'.



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] Transparent InputConnection?

2011-03-30 Thread Dimitry Golubovsky
Dianne,

Since the Squeak VM which I am porting to Android takes care of
editing text itself (by means of Morphic widgets), I just need to pass
events from every touch of soft keyboard to the View in focus. No
special handling for backspace/numbers/nothing.

The input connection I currently have (inherited from the parent
project, I haven't touched it yet) is at its current revision, here:

http://tinyurl.com/4628qth

With this implementation I have working input for letters, and some
special characters, but no input for digits and backspace.

There also is a code in the View implementation (also inherited):

public boolean onCheckIsTextEditor() {
   return true;
}

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
   if(!onCheckIsTextEditor()) return null;
   return new SqueakInputConnection(this, false);
}

Should I just return null from onCreateInputConnection (or return
false from onCheckIsTextEditor)?

Thank you.

On Wed, Mar 30, 2011 at 12:41 PM, Dianne Hackborn hack...@android.com wrote:
 I don't understand what you are asking.  If you want to not let any editing
 to happen, just implement an InputConnection that doesn't do anything.  If
 there is something different than that which you are looking for...  well
 you'll just need to implement the operations on InputConnection to whatever
 it is you want.
 You say all you need is to pass a key event...  but the point of
 InputConnection is to *not* operate in key events.  If you just want raw key
 events, don't implement an InputConnection.  (There is compatibility code
 that turns operations into raw key events for apps that don't support input
 connections.)

-- 
Dimitry Golubovsky

Anywhere on the Web

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ListView leaks memory

2011-03-30 Thread ivan
I have read copious posts on this, but no solution.  After using MAT
extensively on an ApiDemo list view sample, I am ABSOLUTELY convinced
that the ListView/ListActivity is leaking memory.


import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class TmpTestActivity extends ListActivity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setListAdapter(new MyListAdapter(this));
}

@Override
protected void onDestroy()
{
super.onDestroy();
final MyListAdapter mla =
(MyListAdapter)getListView().getAdapter();
mla.onDestroy();

// here I tried setting the activity's contained ListView's
onItemClickListener to null

getListView().setOnItemClickListener(null);
getListView().focusableViewAvailable(null);
}

private static class MyListAdapter extends BaseAdapter {

public void onDestroy()
{
mContext = null;
}

public MyListAdapter(Context context) {
mContext = context;
}

public int getCount() {
return mStrings.length;
}

@Override
public boolean areAllItemsEnabled() {
return false;
}

@Override
public boolean isEnabled(int position) {
return !mStrings[position].startsWith(-);
}

public Object getItem(int position) {
return position;
}

public long getItemId(int position) {
return position;
}

public View getView(int position, View convertView, ViewGroup
parent) {
TextView tv;
if (convertView == null) {
tv = (TextView) LayoutInflater.from(mContext).inflate(
 
android.R.layout.simple_expandable_list_item_1, parent, false);
} else {
tv = (TextView) convertView;
}
tv.setText(mStrings[position]);
return tv;
}

private Context mContext;

private String[] mStrings = {
--,
--,
Abbaye de Belloc,
Abbaye du Mont des Cats,
Abertam,
--,
Abondance,
--,
Ackawi,
Acorn,
Adelost,
Affidelice au Chablis,
Afuega'l Pitu,
Airag,
--,
Airedale,
Aisy Cendre,
--,
Allgauer Emmentaler,
Alverca,
Ambert,
American Cheese,
Ami du Chambertin,
--,
--,
Anejo Enchilado,
Anneau du Vic-Bilh,
Anthoriro,
--,
--
};
}
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Samsung-Specific Media Player Errors

2011-03-30 Thread k7k0
Same here, some samsung users are complaining about not being able to play 
streamed mp3 files
Here's some logcat 

V/PVPlayer( 2384):   data source = 
http://static.uloops.net/banks/4d93305e8f6f4_21122393.mp3
V/PlayerDriver( 2384): Send player code: 3
V/PlayerDriver( 2384): handleSetDataSource
V/PlayerDriver( 2384): handleSetDataSource- scanning for extension
E/( 2384): III Inside Constructor of 
PVMFMemoryBufferWriteDataStreamImpl
V/PlayerDriver( 2384): CommandCompleted
V/PlayerDriver( 2384): Completed command PLAYER_SET_DATA_SOURCE status=1
V/PVPlayer( 2384): run_init s=0, cancelled=0
V/PlayerDriver( 2384): Send player code: 6
V/PlayerDriver( 2384): release string is 2.2 len 3
V/PlayerDriver( 2384): HandleInformationalEvent: 26
V/PlayerDriver( 2384): HandleInformationalEvent: type=26 UNHANDLED
E/MediaPlayerService( 2384): Client::notify In
E/MediaPlayer(18147): message received msg=200, ext1=1, ext2=26
W/MediaPlayer(18147): info/warning (1, 26)
E/MediaPlayer(18147): callback application
E/MediaPlayer(18147): back from callback
V/PlayerDriver( 2384): CommandCompleted
V/PlayerDriver( 2384): Completed command PLAYER_INIT status=-1
E/PlayerDriver( 2384): Command PLAYER_INIT completed with an error or info 
-1
E/MediaPlayerService( 2384): Client::notify In
E/MediaPlayer(18147): message received msg=100, ext1=1, ext2=-1
E/MediaPlayer(18147): error (1, -1)
E/MediaPlayer(18147): callback application
E/MediaPlayer(18147): back from callback
V/PVPlayer( 2384): run_set_video_surface s=-2147483648, cancelled=0
V/PlayerDriver( 2384): HandleInformationalEvent: 27
W/PlayerDriver( 2384): PVMFInfoErrorHandlingComplete
I/MediaPlayer(18147): Info (1,26)
E/MediaPlayer(18147): Error (1,-1)
V/MediaPlayer-JNI(18147): reset

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

Re: [android-developers] ListView leaks memory

2011-03-30 Thread Mark Murphy
On Wed, Mar 30, 2011 at 1:06 PM, ivan istas...@gmail.com wrote:
 I have read copious posts on this, but no solution.  After using MAT
 extensively on an ApiDemo list view sample, I am ABSOLUTELY convinced
 that the ListView/ListActivity is leaking memory.

And your proof of this is... what, exactly?

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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] ListView leaks memory II

2011-03-30 Thread ivan
I accidentally posted that last one before I was done.

I have read copious posts on this, but no solution.  After using MAT
extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
convinced that the ListView/ListActivity is leaking memory.  I say
this because I can see every instance I've created persisting in
memory -- regardless of forcing a garbage collection.  To repeat copy
the code below into a project, create another simple Activity and go
back and forth between the two a few times.  Then in DDMS force a GC
and dump the heap hprof file.  Open the OQL tab in MAT and type the
following query select * from com.package name.TmpTestActivity and
run... you'll notice multiple instances of TmpTestActivity in memory.

Here's my code:


import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class TmpTestActivity extends ListActivity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setListAdapter(new MyListAdapter(this));
}

@Override
protected void onDestroy()
{
super.onDestroy();
final MyListAdapter mla =
(MyListAdapter)getListView().getAdapter();
mla.onDestroy();

// here I tried setting the activity's contained ListView's
onItemClickListener to null
// since it references an anonymous non-static inner private
class ... see source for ListActivity
getListView().setOnItemClickListener(null);
}

// Here I made the simple Adapter a static inner class to avoid
implicitly referencing the outer class
private static class MyListAdapter extends BaseAdapter {

// I also created an onDestroy function to release the
reference to the outer class's context
public void onDestroy()
{
mContext = null;
}

public MyListAdapter(Context context) {
mContext = context;
}

public int getCount() {
return mStrings.length;
}

@Override
public boolean areAllItemsEnabled() {
return false;
}

@Override
public boolean isEnabled(int position) {
return !mStrings[position].startsWith(-);
}

public Object getItem(int position) {
return position;
}

public long getItemId(int position) {
return position;
}

public View getView(int position, View convertView, ViewGroup
parent) {
TextView tv;
if (convertView == null) {
tv = (TextView) LayoutInflater.from(mContext).inflate(
 
android.R.layout.simple_expandable_list_item_1, parent, false);
} else {
tv = (TextView) convertView;
}
tv.setText(mStrings[position]);
return tv;
}

private Context mContext;

private String[] mStrings = {
--,
--,
Abbaye de Belloc,
Abbaye du Mont des Cats,
Abertam,
--,
Abondance,
--,
Ackawi,
Acorn,
Adelost,
Affidelice au Chablis,
Afuega'l Pitu,
Airag,
--,
Airedale,
Aisy Cendre,
--,
Allgauer Emmentaler,
Alverca,
Ambert,
American Cheese,
Ami du Chambertin,
--,
--,
Anejo Enchilado,
Anneau du Vic-Bilh,
Anthoriro,
--,
--
};
}
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ListView leaks memory

2011-03-30 Thread ivan
Mark,

I accidentally posted this before I was done... please see my second
post with the same title and II appended.

Sorry about the confusion.

On Mar 30, 11:10 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 1:06 PM, ivan istas...@gmail.com wrote:
  I have read copious posts on this, but no solution.  After using MAT
  extensively on an ApiDemo list view sample, I am ABSOLUTELY convinced
  that the ListView/ListActivity is leaking memory.

 And your proof of this is... what, exactly?

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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] ListView leaks memory II

2011-03-30 Thread Mark Murphy
On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
 I accidentally posted that last one before I was done.

 I have read copious posts on this, but no solution.  After using MAT
 extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
 convinced that the ListView/ListActivity is leaking memory.  I say
 this because I can see every instance I've created persisting in
 memory -- regardless of forcing a garbage collection.  To repeat copy
 the code below into a project, create another simple Activity and go
 back and forth between the two a few times.  Then in DDMS force a GC
 and dump the heap hprof file.  Open the OQL tab in MAT and type the
 following query select * from com.package name.TmpTestActivity and
 run... you'll notice multiple instances of TmpTestActivity in memory.

Has onDestroy() been called on the multiple instances of
TmpTestActivity in memory?

If not, they are not leaked. Android just hasn't kicked them out of
RAM yet. That is perfectly normal behavior.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: Amazon Appmarket is now open!

2011-03-30 Thread Krischik Martin
On Mar 30, 5:27 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 I see that Handago offers paid apps for Android, with trial period feature.

 Anyone know what kind of licensing scheme / library is behind this?

That is up to you. The offer the ability to upload two version of the
app, one for the try and one as full version. For the Symbian version
of one of my apps I hobbled some features using the compiler pre-
processor. But for Android I thought it to much work (No
preprocessor).

 Do they just point to Market for downloads (like AppBrain, etc.) or have
 their own solution (like AndroidPIT)?

They have their own solution since 2001 ;-) . But beware: while the
Symbian version of my app sells ok (for a Symbian app) the sales for
Android are abysmal (I hope it gets better now Opera joined). Offer
your app so the pirates can't (as we just learned they might) but
don't put much effort into it.

Martin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ListView leaks memory II

2011-03-30 Thread ivan
onDestory has been called every time, which I've tested with a break
point .

On Mar 30, 11:23 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
  I accidentally posted that last one before I was done.

  I have read copious posts on this, but no solution.  After using MAT
  extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
  convinced that the ListView/ListActivity is leaking memory.  I say
  this because I can see every instance I've created persisting in
  memory -- regardless of forcing a garbage collection.  To repeat copy
  the code below into a project, create another simple Activity and go
  back and forth between the two a few times.  Then in DDMS force a GC
  and dump the heap hprof file.  Open the OQL tab in MAT and type the
  following query select * from com.package name.TmpTestActivity and
  run... you'll notice multiple instances of TmpTestActivity in memory.

 Has onDestroy() been called on the multiple instances of
 TmpTestActivity in memory?

 If not, they are not leaked. Android just hasn't kicked them out of
 RAM yet. That is perfectly normal behavior.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 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: ListView leaks memory II

2011-03-30 Thread Kostya Vasilyev

Are you running the app in the debugger?

30.03.2011 21:28, ivan пишет:

onDestory has been called every time, which I've tested with a break
point .

On Mar 30, 11:23 am, Mark Murphymmur...@commonsware.com  wrote:

On Wed, Mar 30, 2011 at 1:18 PM, ivanistas...@gmail.com  wrote:

I accidentally posted that last one before I was done.
I have read copious posts on this, but no solution.  After using MAT
extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
convinced that the ListView/ListActivity is leaking memory.  I say
this because I can see every instance I've created persisting in
memory -- regardless of forcing a garbage collection.  To repeat copy
the code below into a project, create another simple Activity and go
back and forth between the two a few times.  Then in DDMS force a GC
and dump the heap hprof file.  Open the OQL tab in MAT and type the
following query select * from com.package name.TmpTestActivity and
run... you'll notice multiple instances of TmpTestActivity in memory.

Has onDestroy() been called on the multiple instances of
TmpTestActivity in memory?

If not, they are not leaked. Android just hasn't kicked them out of
RAM yet. That is perfectly normal behavior.

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

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



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
In addition, I've read that the leak doesn't occur while the app is
running in a non-debug session.  This is not the case with my
experiments.  I see the leak regardless.

On Mar 30, 11:28 am, ivan istas...@gmail.com wrote:
 onDestory has been called every time, which I've tested with a break
 point .

 On Mar 30, 11:23 am, Mark Murphy mmur...@commonsware.com wrote:

  On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
   I accidentally posted that last one before I was done.

   I have read copious posts on this, but no solution.  After using MAT
   extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
   convinced that the ListView/ListActivity is leaking memory.  I say
   this because I can see every instance I've created persisting in
   memory -- regardless of forcing a garbage collection.  To repeat copy
   the code below into a project, create another simple Activity and go
   back and forth between the two a few times.  Then in DDMS force a GC
   and dump the heap hprof file.  Open the OQL tab in MAT and type the
   following query select * from com.package name.TmpTestActivity and
   run... you'll notice multiple instances of TmpTestActivity in memory.

  Has onDestroy() been called on the multiple instances of
  TmpTestActivity in memory?

  If not, they are not leaked. Android just hasn't kicked them out of
  RAM yet. That is perfectly normal behavior.

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version
  1.9.2 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] Find storage directories?

2011-03-30 Thread Nathan
Some user would like to choose which of their many storage cards my
app puts data on. IE internal vs external storage cards.

I'd like to help them do this without screwing up. I don't think most
users will be advanced enough to type in the linux path.

GetExternalStorageDirectory will give you one storage. It's what I'm
using now and will give you the internal storage card or the external
storage card, depending on the device. Is there a good way to query
for more storage locations?

So far I think the answer is no.

Nathan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do the drop down ads like in the weather channel app work?

2011-03-30 Thread pawpaw17
Does anyone serve ads like in the weather channel app that, when
clicked, expand from about 60 px height
to 240 px? MMA lists this as an emerging mobile standard. Curious if
anyone has integrated a 3rd party
ad source that services these types of ads if the know-how for
expanding to a larger in-app view has
to hardwired into the app? Is it possible to do this without writing
specific app-side code to present the
larger version of the ad?

Very best everyone

pawpaw17

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Import/Export data file

2011-03-30 Thread Alaeddine Ghribi
Always here M.Kostya ;),
Anyway, this guide shows how to store the saved file in the SDCARD?
With the choose of the storage location ? And the import location ?
And no need to see this code? 
http://www.roseindia.net/java/beginners/CopyFile.shtml

Thank you.


On 30 mar, 17:49, Kostya Vasilyev kmans...@gmail.com wrote:
 30.03.2011 20:31, Alaeddine Ghribi пишет:

  This one is perfect:
 http://www.roseindia.net/java/beginners/CopyFile.shtml
  I just don't know how to specify the location of the import/export

 http://developer.android.com/guide/topics/data/data-storage.html#file...

 -- Kostya









  operations, where to copy and where to past :\ !
  Thank you for your help.

  On 30 mar, 17:26, Marcin Orlowskiwebnet.andr...@gmail.com  wrote:
  On 30 March 2011 18:19, Alaeddine Ghribialaeddineghr...@gmail.com  wrote:

  Yes, i'm just using a file to store data, but how can i copy the file
  in data/data/. to the SDCARD? How doing it in JAVA/Android ?
 http://developer.android.com/reference/android/os/Environment.html#ge...

  Regards,
  Marcin Orlowski

  *Tray Agendahttp://bit.ly/trayagenda* - keep you daily schedule handy...
  WebnetMobile on *Facebookhttp://webnetmobile.com/fb/* and
  *Twitterhttp://webnetmobile.com/twitter/
  *

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

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


Re: [android-developers] Find storage directories?

2011-03-30 Thread Mark Murphy
On Wed, Mar 30, 2011 at 1:39 PM, Nathan critter...@crittermap.com wrote:
 Some user would like to choose which of their many storage cards my
 app puts data on. IE internal vs external storage cards.

 I'd like to help them do this without screwing up. I don't think most
 users will be advanced enough to type in the linux path.

 GetExternalStorageDirectory will give you one storage. It's what I'm
 using now and will give you the internal storage card or the external
 storage card, depending on the device. Is there a good way to query
 for more storage locations?

 So far I think the answer is no.

The answer is no -- no other storage locations are part of the SDK,
and you have no idea if they are usable, even if you find them.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 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: Import/Export data file

2011-03-30 Thread Kostya Vasilyev
The link you posted explains how to copy a file from one location to 
another.


The link to developer.android.com explains where to copy the file to, as 
well as some other points.


You just need to combine those two :)

-- Kostya

30.03.2011 21:41, Alaeddine Ghribi пишет:

Always here M.Kostya ;),
Anyway, this guide shows how to store the saved file in the SDCARD?
With the choose of the storage location ? And the import location ?
And no need to see this code? 
http://www.roseindia.net/java/beginners/CopyFile.shtml

Thank you.


On 30 mar, 17:49, Kostya Vasilyevkmans...@gmail.com  wrote:

30.03.2011 20:31, Alaeddine Ghribi пишет:


This one is perfect:
http://www.roseindia.net/java/beginners/CopyFile.shtml
I just don't know how to specify the location of the import/export

http://developer.android.com/guide/topics/data/data-storage.html#file...

-- Kostya










operations, where to copy and where to past :\ !
Thank you for your help.
On 30 mar, 17:26, Marcin Orlowskiwebnet.andr...@gmail.comwrote:

On 30 March 2011 18:19, Alaeddine Ghribialaeddineghr...@gmail.comwrote:

Yes, i'm just using a file to store data, but how can i copy the file
in data/data/. to the SDCARD? How doing it in JAVA/Android ?

http://developer.android.com/reference/android/os/Environment.html#ge...
Regards,
Marcin Orlowski
*Tray Agendahttp://bit.ly/trayagenda* - keep you daily schedule handy...
WebnetMobile on *Facebookhttp://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

--
Kostya Vasilyev --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Problems with ListView

2011-03-30 Thread Kevin Anthony
I have a nested listview to display information about TV shows
first the Root listview shows the TV show name
when you click on the show name, you get a list of Episodes for the
show, including a title,  episode number, and episode name
if you click on a show, it opens up another activity

I have two problems, first, if you open one of the Show Names, you can
click on the episodes and it handles it properly.  However if you
close that show, and open a second, you can no longer click on
episodes, even earlier ones, that worked.

Here is the BaseExpandableListAdapter Implementation:


public class MyExpandableListAdapter extends BaseExpandableListAdapter
{

private ArrayListString groups = new ArrayListString();
private ArrayListArrayListArrayListString children = new
ArrayListArrayListArrayListString();
private LayoutInflater mInflater;

public MyExpandableListAdapter(Context context) {
groups.clear();
mInflater = LayoutInflater.from(context);
for (int i = 0; i  group.size(); i++) {
groups.add(group.get(i));
}
int k = 0;
for (int i = 0; i  group.size(); i++) {
ArrayListArrayListString outer = new
ArrayListArrayListString();
while ((k  videoName.size())
 
(videoName.get(k).equals(groups.get(i {
ArrayListString inner = new 
ArrayListString();
inner.add(videoName.get(k));
inner.add(videoEpsNumber.get(k));
inner.add(videoEpsName.get(k));
inner.add(videoLocation.get(k));
outer.add(inner);
k++;
}
children.add(outer);
}
}

public Object getChild(int groupPosition, int childPosition) {
return children.get(groupPosition).get(childPosition);
}

public long getChildId(int groupPosition, int childPosition) {
return childPosition;
}

public int getChildrenCount(int groupPosition) {
return children.get(groupPosition).size();
}

public TextView getGenericView() {
// Layout parameters for the ExpandableListView
AbsListView.LayoutParams lp = new 
AbsListView.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT, 64);

TextView textView = new TextView(VideoList.this);
textView.setLayoutParams(lp);
// Center the text vertically
textView.setGravity(Gravity.CENTER_VERTICAL | 
Gravity.LEFT);
// Set the text starting position
textView.setPadding(86, 0, 0, 0);
return textView;
}

public View getChildView(int groupPosition, int childPosition,
boolean isLastChild, View convertView, 
ViewGroup parent) {

ViewHolder holder;
if (convertView == null) {
convertView = 
mInflater.inflate(R.layout.listview, null);
holder = new ViewHolder();
holder.title = (TextView) convertView
.findViewById(R.id.TextView01);
holder.number = (TextView) convertView
.findViewById(R.id.TextView02);
holder.name = (TextView) convertView
.findViewById(R.id.TextView03);
convertView.setTag(holder);
} else {
convertView.setClickable(true);
holder = (ViewHolder) convertView.getTag();
}


holder.title.setText(children.get(groupPosition).get(childPosition)
.get(0));
holder.number.setText(children.get(groupPosition)
.get(childPosition).get(1));

holder.name.setText(children.get(groupPosition).get(childPosition)
.get(2));

return convertView;
   

[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
Also, I'm using Android SDK build 8 (2.2).

On Mar 30, 11:37 am, ivan istas...@gmail.com wrote:
 In addition, I've read that the leak doesn't occur while the app is
 running in a non-debug session.  This is not the case with my
 experiments.  I see the leak regardless.

 On Mar 30, 11:28 am, ivan istas...@gmail.com wrote:

  onDestory has been called every time, which I've tested with a break
  point .

  On Mar 30, 11:23 am, Mark Murphy mmur...@commonsware.com wrote:

   On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
I accidentally posted that last one before I was done.

I have read copious posts on this, but no solution.  After using MAT
extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
convinced that the ListView/ListActivity is leaking memory.  I say
this because I can see every instance I've created persisting in
memory -- regardless of forcing a garbage collection.  To repeat copy
the code below into a project, create another simple Activity and go
back and forth between the two a few times.  Then in DDMS force a GC
and dump the heap hprof file.  Open the OQL tab in MAT and type the
following query select * from com.package name.TmpTestActivity and
run... you'll notice multiple instances of TmpTestActivity in memory.

   Has onDestroy() been called on the multiple instances of
   TmpTestActivity in memory?

   If not, they are not leaked. Android just hasn't kicked them out of
   RAM yet. That is perfectly normal behavior.

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

   _The Busy Coder's Guide to *Advanced* Android Development_ Version
   1.9.2 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: SSL Load

2011-03-30 Thread bob
A web browser popping up.

On Mar 30, 9:53 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 30 March 2011 16:41, bob b...@coolgroups.com wrote:

  Is there an easy way to silently load an SSL page in Android?

 And not silently means what exactly?

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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   3   >