[android-beginners] Re: How to build EditText view like that in Android Market where "X" button appears for clearing text?

2009-09-28 Thread mjc147

To answer my own question...

Use TextView.setCompoundDrawables(null, null, null, null) to hide the
cross.

Next thing is to detect when the cross is pressed on.

Currently I do this:

mEditText.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
if (mEditText.getCompoundDrawables()[2] == null) {
// cross is not being shown so no need to handle
return false;
}
if (event.getAction() != MotionEvent.ACTION_DOWN) {
// only respond to the down type
return false;
}
if (event.getX() > mEditText.getMeasuredWidth() -
mEditText.getPaddingRight() - x.getIntrinsicWidth()) {
mEditText.setText("");
return true;
}
else {
return false;
}
}
});

This works but feels rather messy to me. Also, I'm not sure about the
mEditText.getPaddingRight()...

Is there a better way?

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



[android-beginners] Re: How to build EditText view like that in Android Market where "X" button appears for clearing text?

2009-09-28 Thread Mark Murphy

mjc147 wrote:
> To answer my own question...
> 
> Use TextView.setCompoundDrawables(null, null, null, null) to hide the
> cross.
> 
> Next thing is to detect when the cross is pressed on.
> 
> Currently I do this:
> 
> mEditText.setOnTouchListener(new OnTouchListener() {
>   public boolean onTouch(View v, MotionEvent event) {
>   if (mEditText.getCompoundDrawables()[2] == null) {
>   // cross is not being shown so no need to handle
>   return false;
>   }
>   if (event.getAction() != MotionEvent.ACTION_DOWN) {
>   // only respond to the down type
>   return false;
>   }
>   if (event.getX() > mEditText.getMeasuredWidth() -
> mEditText.getPaddingRight() - x.getIntrinsicWidth()) {
>   mEditText.setText("");
>   return true;
>   }
>   else {
>   return false;
>   }
>   }
> });
> 
> This works but feels rather messy to me. Also, I'm not sure about the
> mEditText.getPaddingRight()...
> 
> Is there a better way?

Possibly, now that you sent the screenshot (thanks!). BTW, what you are
seeing may be part of the HTC Sense UI -- it's certainly not what you
get in ordinary Android.

Regardless, here is how I would proceed to try to get this to work:

Step #1: Keep your current Drawable code, but replace your X with a 100%
transparent image of the same size. There might be a better way to
accomplish this step, but I can't think of one off the top of my head.
Basically, I am guessing that if you type a lot into that field on your
Hero, the text does not wind up under the X, so you need a placeholder
to keep the text to the left.

Step #2: Wrap your EditText in a RelativeLayout. Put whatever layout
rules you presently have on the EditText (layout_width, etc.) on the
RelativeLayout, and set the EditText to be fill_parent/fill_parent for
width/height.

Step #3: In the same RelativeLayout, *after* the EditText in the XML,
add an ImageView with your X, with layout_alignParentLeft="true" and
enough paddingRight to have it positioned properly. RelativeLayout, like
FrameLayout, supports "vertically" stacking widgets, so by having your
ImageView be after the EditText in the XML, it will "float" over the
EditText and be visible/touchable.

Step #4: Add an OnTouchListener to the ImageView in your code.

A variation on this approach would be to use the X image in Step #1 and
a transparent View in Step #3. This is the old "hot-spot" trick from a
byegone programming era -- a background provides the image and you have
something floating over top where things are touchable. If you specify a
View with background=#, it should be invisible, and if you
size/position it properly, it will sit over top your X. It's a bit more
difficult to debug, though you could temporarily use a translucent
background (say, #22FF for a slight red effect) until you get the
hot-spot positioned properly.

These approaches have the advantage of avoiding the OnTouchListener
calculations you are doing in the EditText, which might have problems if
EditText changes behavior in future releases. On the other hand, these
approaches add a few more widgets and therefore take up a bit more memory.

If the X appears to actually "click" when tapped on your Hero, then they
may be using an ImageButton with a custom set of backgrounds rather than
an ImageView. That is also possible to implement independently but gets
decidedly more painful.

Once I get my hands on an HTC Sense-ible device, I may try to cook up
some canned widgets to offer some of their looks, like this one, in
plug-and-play form.

A question for you: does this "X" effect show up in places other than
the Android Market search app on your Hero? Thanks!

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

_Android Programming Tutorials_ Version 1.0 Available!

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



[android-beginners] Re: How to build EditText view like that in Android Market where "X" button appears for clearing text?

2009-09-28 Thread mjc147

I'll refrain from saying "Wow, thanks Mark!" because you probably get
that all the time :)

I just looked at a bunch of apps that came with the Hero and the only
one other than the Market using this cross, is Google Maps. I couldn't
see anything like that in Internet, People, Mail, Google Talk or
Messages apps.

Out of interest, my EditText is single line so when the text is longer
than the width of the widget it simply scrolls away to the left as you
would hope/expect. In other words, there is no reshifting of the cross
- when using the code I posted previously.

In the Market app, when you press on the cross, it changes to a
lighter shade of grey giving you the chance to drag away (and so
cancel).

I think its a really nice way of allowing the user to clear the text,
so if you do make a canned widget, I'm sure it will be hugely popular.

Here's wishing they add a flag to EditText in 2.0...

On Sep 28, 3:53 pm, Mark Murphy  wrote:
> mjc147 wrote:
> > To answer my own question...
>
> > Use TextView.setCompoundDrawables(null, null, null, null) to hide the
> > cross.
>
> > Next thing is to detect when the cross is pressed on.
>
> > Currently I do this:
>
> > mEditText.setOnTouchListener(new OnTouchListener() {
> >    public boolean onTouch(View v, MotionEvent event) {
> >            if (mEditText.getCompoundDrawables()[2] == null) {
> >                    // cross is not being shown so no need to handle
> >                    return false;
> >            }
> >            if (event.getAction() != MotionEvent.ACTION_DOWN) {
> >                    // only respond to the down type
> >                    return false;
> >            }
> >            if (event.getX() > mEditText.getMeasuredWidth() -
> > mEditText.getPaddingRight() - x.getIntrinsicWidth()) {
> >                    mEditText.setText("");
> >                    return true;
> >            }
> >            else {
> >                    return false;
> >            }
> >    }
> > });
>
> > This works but feels rather messy to me. Also, I'm not sure about the
> > mEditText.getPaddingRight()...
>
> > Is there a better way?
>
> Possibly, now that you sent the screenshot (thanks!). BTW, what you are
> seeing may be part of the HTC Sense UI -- it's certainly not what you
> get in ordinary Android.
>
> Regardless, here is how I would proceed to try to get this to work:
>
> Step #1: Keep your current Drawable code, but replace your X with a 100%
> transparent image of the same size. There might be a better way to
> accomplish this step, but I can't think of one off the top of my head.
> Basically, I am guessing that if you type a lot into that field on your
> Hero, the text does not wind up under the X, so you need a placeholder
> to keep the text to the left.
>
> Step #2: Wrap your EditText in a RelativeLayout. Put whatever layout
> rules you presently have on the EditText (layout_width, etc.) on the
> RelativeLayout, and set the EditText to be fill_parent/fill_parent for
> width/height.
>
> Step #3: In the same RelativeLayout, *after* the EditText in the XML,
> add an ImageView with your X, with layout_alignParentLeft="true" and
> enough paddingRight to have it positioned properly. RelativeLayout, like
> FrameLayout, supports "vertically" stacking widgets, so by having your
> ImageView be after the EditText in the XML, it will "float" over the
> EditText and be visible/touchable.
>
> Step #4: Add an OnTouchListener to the ImageView in your code.
>
> A variation on this approach would be to use the X image in Step #1 and
> a transparent View in Step #3. This is the old "hot-spot" trick from a
> byegone programming era -- a background provides the image and you have
> something floating over top where things are touchable. If you specify a
> View with background=#, it should be invisible, and if you
> size/position it properly, it will sit over top your X. It's a bit more
> difficult to debug, though you could temporarily use a translucent
> background (say, #22FF for a slight red effect) until you get the
> hot-spot positioned properly.
>
> These approaches have the advantage of avoiding the OnTouchListener
> calculations you are doing in the EditText, which might have problems if
> EditText changes behavior in future releases. On the other hand, these
> approaches add a few more widgets and therefore take up a bit more memory.
>
> If the X appears to actually "click" when tapped on your Hero, then they
> may be using an ImageButton with a custom set of backgrounds rather than
> an ImageView. That is also possible to implement independently but gets
> decidedly more painful.
>
> Once I get my hands on an HTC Sense-ible device, I may try to cook up
> some canned widgets to offer some of their looks, like this one, in
> plug-and-play form.
>
> A question for you: does this "X" effect show up in places other than
> the Android Market search app on your Hero? Thanks!
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/co

[android-beginners] Re: How to build EditText view like that in Android Market where "X" button appears for clearing text?

2009-09-28 Thread Mark Murphy

mjc147 wrote:
> I'll refrain from saying "Wow, thanks Mark!" because you probably get
> that all the time :)

That depends on whether what I'm saying is what somebody wants to hear.
But, thanks!

> I just looked at a bunch of apps that came with the Hero and the only
> one other than the Market using this cross, is Google Maps. I couldn't
> see anything like that in Internet, People, Mail, Google Talk or
> Messages apps.

Hm...OK. I would have expected broader use. Thanks for the info!

> Here's wishing they add a flag to EditText in 2.0...

That's not out of the question. HTC contributes lots of code to Android.
Whether or not this is considered truly part of "HTC Sense" would
probably dictate whether HTC offered it to the core Android team.

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

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

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



[android-beginners] Reading sensor values directly at regular intervals rather than using onSensorChanged(SensorEvent evt)

2009-09-28 Thread bmcc

Gentlemen,

Up until now I have been using SensorEventListener.onSensorChanged
(SensorEvent evt) to obtain data values from the on board sensors (G1)
whenever a sensor event occurs (snippet below). However, what I really
want to be able to do is read the values of the sensors at a regular
intervals, at say a frequency of 0.1s rather than reacting to the
triggered event (for DSP purposes). Is there a way of reading the
sensor values directly without having to use/wait for onSensorChanged
() ?

Many thanks in advance.


--

Snippet - currently using onSensorChanged(SensorEvent evt):

SensorManager sman = (SensorManager) getSystemService
(Context.SENSOR_SERVICE);
List accelerometer = sman.getSensorList
(Sensor.TYPE_ACCELEROMETER);
Sensor myAccelerometer = accelelerometer.get(0);

sman.registerListener(new SensorEventListener() {

public void onAccuracyChanged(Sensor arg0, int arg1) {

}

public void onSensorChanged(SensorEvent evt) {

// read new sensor values
accelTextView.setText("X-accel: " + 
evt.values[0] + "\n" + "Y-
accel: "
+ evt.values[1] + "\n" + 
"Z-accel: " + evt.values[2]);
accelTextView.invalidate();


// sleep for a bit
   try {
Thread.sleep(10);
} catch (Exception ex) {
accelTextView.setText("Erk!");
}
}

}, myAccelerometer, SensorManager.SENSOR_DELAY_UI);

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



[android-beginners]

2009-09-28 Thread saurabh sinha

hello I hve problem working with attrs.xml in values in android
can u any one suggest me how to use attrs.xml

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



[android-beginners] two way mirrors in trial room

2009-09-28 Thread ashi raheel

This site is specially designed for those people who feel tired while
surfing internet or during work on internet. You can enjoy your time
here. Hope you all like and send your best comments to update site.

http://itstime2enjoy.blogspot.com/2009/08/beware-of-two-way-mirrors-in-trial.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] android service repaint

2009-09-28 Thread lei

I just found postInvalidate() does not paint the view immediately, is
there a method like serviceRepaint() in J2ME ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: android service repaint

2009-09-28 Thread Mark Murphy

lei wrote:
> I just found postInvalidate() does not paint the view immediately, is
> there a method like serviceRepaint() in J2ME ?

Nothing paints anything "immediately" in Android.

All GUI events (e.g., setting the text on a TextView) are put on a
message queue. Those events are only then processed when you return from
whatever callback you are in and let the UI thread go back to processing
those events on the queue.

If you explain a bit more about what effect you are trying to achieve,
we may be able to give you more guidance.

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

_Beginning Android_ from Apress Now Available!

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



[android-beginners] Possible to use same object in a Service?

2009-09-28 Thread Oskar

Hi,

I have a service (extends service) that has an object called mailbox.
Every time i enter my service via an intent I would like to use the
same object to call some put and get methods. I don't want the object
to reload from scratch every time I enter the service.

Is this possible?

Example code would be very appreciated.

Thanks.

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



[android-beginners] Re: ListView Urgent Help Req :)

2009-09-28 Thread Justin Anderson
Typically you won't get much of a response when the word "urgent" is in your
tittle...


--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Sun, Sep 27, 2009 at 11:00 PM, Alok Kulkarni  wrote:

> Any takers ?
>
>
> On Mon, Sep 28, 2009 at 12:44 AM, Alok Kulkarni wrote:
>
>> By the text should be scrollable i mean It should be like Marquee of HTML
>> ..
>> thanks :)
>>
>>
>> On Mon, Sep 28, 2009 at 12:40 AM, Alok  wrote:
>>
>>> Hi guys,
>>> I am developing a music application where there will be almost 30 to
>>> 35 lists .
>>> Example ..
>>> A list on page one say albums , artists  etc etc
>>> Then if you select one list item say Albums , you go on a new page
>>> with Album list, when u click on one album listitem , u enter song
>>> list.. that way .
>>> each list item has an image associated with it . And the text for the
>>> listitem may be 2 lines per item. And the text should be scrollable.
>>> Now my idea is to create a generic list which is common to all the
>>> listview screens.
>>> At runtime i should be able to pass the contents of each list to this
>>> generic class.
>>> What approach should i take? Can a XML layout solve this purpose..
>>> Please give me some guidelines. Reuse is my main aim.. And for each
>>> listitem i should be able to handle click listeners..
>>> Please give me some guidelines.
>>> Thanks in advance,
>>> Alok.
>>>
>>
>>
>
> >
>

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



[android-beginners] Playing video in Android not showing the video, playing sound only with a still image

2009-09-28 Thread Shobhit Kasliwal

Hi
I am new to android.
I am creating an application to run the video file.
The application is running fine but the only problem I am getting
is ...it is playing the sound with an image instead of complete
video.
Can anybody help me on this...

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



[android-beginners] Running camera in emulator using computer's webcam

2009-09-28 Thread Shobhit Kasliwal

Hello Everyone

Can anybody tell me how can I run the camera in the emulator using my
computer's webcam.

Urgent help needed...

Thanks in Advance.


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



[android-beginners] Re: Playing video in Android not showing the video, playing sound only with a still image

2009-09-28 Thread Mark Murphy

Shobhit Kasliwal wrote:
> Hi
> I am new to android.
> I am creating an application to run the video file.
> The application is running fine but the only problem I am getting
> is ...it is playing the sound with an image instead of complete
> video.
> Can anybody help me on this...

I would start with sample code and a sample file that works, then go
from there.

Besides the ones in the ApiDemos in your SDK, here are two other sample
apps:

http://github.com/commonsguy/cw-advandroid/tree/master/Media/Video/
http://github.com/commonsguy/vidtry

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

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

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



[android-beginners] Re: Running camera in emulator using computer's webcam

2009-09-28 Thread Mark Murphy

Shobhit Kasliwal wrote:
> Can anybody tell me how can I run the camera in the emulator using my
> computer's webcam.

You can't, AFAIK.

You can use Tom Gibara's wrapper classes that allow you to switch
between the built-in camera and a camera from some other source, if you
do not need the full features of the actual Android Camera class:

http://www.tomgibara.com/android/camera-source

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

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

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



[android-beginners] Re: startActivityForResult problem...

2009-09-28 Thread Tikoze

Anyone have any ideas?

On Sep 26, 8:44 am, Justin Anderson  wrote:
> *> "That is definitely a puzzling behaviour, I suspect the fact you have no
> content view is probably the cause."*
>
> I tried giving it a LinearLayout but the result was the same.
>
> *> "Is there any reason why you need the second activity? "*
>
> I'm doing this as a way to have both free and paid (or rather, donate)
> versions of the same app using the same code-base.  My second activity
> returns an MD5 hash of a secret key.  When the first activity gets the
> result back it checks it to see if it should run in free mode or paid
> (donate) mode.  I got the idea from the Documents to Go app.  Of course, I
> have no idea how they accomplished this feat... I'm just trying to get the
> same results.  If there is a better way to do something like this I would be
> willing to try that.
>
> *> "Activities are supposed to be used to display a new screen, processing
> data in the background is usually performed in an ASyncTask or similar
> runnable class."*
>
> While this is probably true in most cases, my activity uses the NoDisplay
> theme, which, according to the docs is for Activities that don't display a
> UI because they finish themselves before being resumed.  This is exactly
> what my second activity does.  As an aside, I have also tried this without
> having that theme and the results are the same.
>
> Thanks,
> Justin
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
> On Sat, Sep 26, 2009 at 4:34 AM, Sean Hodges 
> wrote:
>
> > That is definitely a puzzling behaviour, I suspect the fact you have no
> > content view is probably the cause.
>
> > Is there any reason why you need the second activity? Activities are
> > supposed to be used to display a new screen, processing data in the
> > background is usually performed in an ASyncTask or similar runnable class.
>
> > On Sep 26, 2009 8:45 AM, "MagouyaWare"  wrote:
>
> > I have an activity that needs to start another activity in the
> > onCreate method.  The second activity doesn't have a UI, it just
> > processes some data (very quickly) and returns it via setResult.
>
> > The problem I am having is that it looks like the onActivityResult
> > method from my first activity is called before the second activity has
> > finished!
>
> > I put in some Toast notifications to be sure, but the order that the
> > notifications appear is as follows:
> > - onCreate for Activity1 (just before calling startActivityForResult
> > to launch Activity2)
> > - onActivityResult for Activity1
> > - onCreate for Activity2
>
> > Has anyone else run into this problem?  I have not been able to find
> > anything about this issue on these forums or on google.
>
> > Thanks in advance,
> > Justin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Help with UI XML

2009-09-28 Thread moazzamk

Hi,

I need to create a view in GridView which will have a checkbox over an
image (on the bottom right corner). so, when someone selects that
image, the checkbox is checked. I know I will have to create a custom
adapter but how do I write the XML for the cell?

Thanks in advance,

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



[android-beginners] Re: ListView Urgent Help Req :)

2009-09-28 Thread Alok Kulkarni
Ok.. i will repost it :P

On Mon, Sep 28, 2009 at 6:45 PM, Justin Anderson wrote:

> Typically you won't get much of a response when the word "urgent" is in
> your tittle...
>
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
>
>
> On Sun, Sep 27, 2009 at 11:00 PM, Alok Kulkarni wrote:
>
>> Any takers ?
>>
>>
>> On Mon, Sep 28, 2009 at 12:44 AM, Alok Kulkarni wrote:
>>
>>> By the text should be scrollable i mean It should be like Marquee of HTML
>>> ..
>>> thanks :)
>>>
>>>
>>> On Mon, Sep 28, 2009 at 12:40 AM, Alok  wrote:
>>>
 Hi guys,
 I am developing a music application where there will be almost 30 to
 35 lists .
 Example ..
 A list on page one say albums , artists  etc etc
 Then if you select one list item say Albums , you go on a new page
 with Album list, when u click on one album listitem , u enter song
 list.. that way .
 each list item has an image associated with it . And the text for the
 listitem may be 2 lines per item. And the text should be scrollable.
 Now my idea is to create a generic list which is common to all the
 listview screens.
 At runtime i should be able to pass the contents of each list to this
 generic class.
 What approach should i take? Can a XML layout solve this purpose..
 Please give me some guidelines. Reuse is my main aim.. And for each
 listitem i should be able to handle click listeners..
 Please give me some guidelines.
 Thanks in advance,
 Alok.

>>>
>>>
>>
>>
>>
>
> >
>

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



[android-beginners] Re: ListView Urgent Help Req :)

2009-09-28 Thread moazzamk

You will need to make a custom adapter for the listview and populate
your list using that , but yes, it is possible.

- Moazzam
http://moazzam-khan.com/



On Sep 28, 9:15 am, Justin Anderson  wrote:
> Typically you won't get much of a response when the word "urgent" is in your
> tittle...
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
> On Sun, Sep 27, 2009 at 11:00 PM, Alok Kulkarni  wrote:
> > Any takers ?
>
> > On Mon, Sep 28, 2009 at 12:44 AM, Alok Kulkarni wrote:
>
> >> By the text should be scrollable i mean It should be like Marquee of HTML
> >> ..
> >> thanks :)
>
> >> On Mon, Sep 28, 2009 at 12:40 AM, Alok  wrote:
>
> >>> Hi guys,
> >>> I am developing a music application where there will be almost 30 to
> >>> 35 lists .
> >>> Example ..
> >>> A list on page one say albums , artists  etc etc
> >>> Then if you select one list item say Albums , you go on a new page
> >>> with Album list, when u click on one album listitem , u enter song
> >>> list.. that way .
> >>> each list item has an image associated with it . And the text for the
> >>> listitem may be 2 lines per item. And the text should be scrollable.
> >>> Now my idea is to create a generic list which is common to all the
> >>> listview screens.
> >>> At runtime i should be able to pass the contents of each list to this
> >>> generic class.
> >>> What approach should i take? Can a XML layout solve this purpose..
> >>> Please give me some guidelines. Reuse is my main aim.. And for each
> >>> listitem i should be able to handle click listeners..
> >>> Please give me some guidelines.
> >>> Thanks in advance,
> >>> Alok.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Listview help

2009-09-28 Thread Alok

Hi guys,
I am developing a music application where there will be almost 30 to
35 lists .
Example ..
A list on page one say albums , artists  etc etc
Then if you select one list item say Albums , you go on a new page
with Album list, when u click on one album listitem , u enter song
list.. that way .
each list item has an image associated with it . And the text for the
listitem may be 2 lines per item. And the text should be scrollable.
(Like Marquee)
Now my idea is to create a generic list which is common to all the
listview screens.
At runtime i should be able to pass the contents of each list to this
generic class.
What approach should i take? Can a XML layout solve this purpose..
Please give me some guidelines. Reuse is my main aim.. And for each
listitem i should be able to handle click listeners..
Please give me some guidelines.
Thanks in advance,
Alok.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: ListView Urgent Help Req :)

2009-09-28 Thread Alok Kulkarni
Ok.. So  XML layout file will do the job ?I will work on it ! THANKS
anyways... Any other detailed explaination or snippet will do hell good :)]
Thanks..

On Mon, Sep 28, 2009 at 7:38 PM, moazzamk  wrote:

>
> You will need to make a custom adapter for the listview and populate
> your list using that , but yes, it is possible.
>
> - Moazzam
> http://moazzam-khan.com/
>
>
>
> On Sep 28, 9:15 am, Justin Anderson  wrote:
> > Typically you won't get much of a response when the word "urgent" is in
> your
> > tittle...
> >
> > --
> > There are only 10 types of people in the world...
> > Those who know binary and those who don't.
> > --
> >
> > On Sun, Sep 27, 2009 at 11:00 PM, Alok Kulkarni 
> wrote:
> > > Any takers ?
> >
> > > On Mon, Sep 28, 2009 at 12:44 AM, Alok Kulkarni  >wrote:
> >
> > >> By the text should be scrollable i mean It should be like Marquee of
> HTML
> > >> ..
> > >> thanks :)
> >
> > >> On Mon, Sep 28, 2009 at 12:40 AM, Alok  wrote:
> >
> > >>> Hi guys,
> > >>> I am developing a music application where there will be almost 30 to
> > >>> 35 lists .
> > >>> Example ..
> > >>> A list on page one say albums , artists  etc etc
> > >>> Then if you select one list item say Albums , you go on a new page
> > >>> with Album list, when u click on one album listitem , u enter song
> > >>> list.. that way .
> > >>> each list item has an image associated with it . And the text for the
> > >>> listitem may be 2 lines per item. And the text should be scrollable.
> > >>> Now my idea is to create a generic list which is common to all the
> > >>> listview screens.
> > >>> At runtime i should be able to pass the contents of each list to this
> > >>> generic class.
> > >>> What approach should i take? Can a XML layout solve this purpose..
> > >>> Please give me some guidelines. Reuse is my main aim.. And for each
> > >>> listitem i should be able to handle click listeners..
> > >>> Please give me some guidelines.
> > >>> Thanks in advance,
> > >>> Alok.
> >
>

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



[android-beginners] Re: Can i fetch the latest image from gallery taken from camera ?

2009-09-28 Thread moazzamk

A quick search on google gave me this link:
http://2008.hfoss.org/Tutorial:Creating_a_Camera_Application

- Moazzam
http://moazzam-khan.com

On Sep 24, 7:05 am, wahib  wrote:
> HI ! I want to fetch the latest image taken from camera into my code
> and then can do manipulation on it. Being a newbie i dont know how to
> get hold of that image .. and secondly how to read that image into my
> code. I guess i have to use content providers but how?? plz guide me
> with a sample code. I'll be so thankful to u ppl.
>
> Regards,
> wahib
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Emulator view in Eclipse

2009-09-28 Thread moazzamk

Press F11 key when you are in eclipse. It *should* start the emulator.

- Moazzam
http://moazzam-khan.com


On Sep 22, 3:57 pm, stanlick  wrote:
> I configured a new machine today running Galileo and the Android ADT
> plug-in.  When I run a new project as Android Application everything
> seems to work fine, except I never see the emulator!  I see its PID
> but nothing visual.  I can kill the PID and start the emulator from
> the command prompt.  Any idea what is going on inEclipse?  Also,
> should there be an emulator view under Window -> Show View?  There is
> none.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Emulator view in Eclipse

2009-09-28 Thread Michael Dorin

I ran into this...
Don't remember where, but there is some parameter
for configuring the emulator...and if it is visible by defaultFor
some reason
it is not set to visible.

Can anybody else add?

Look through emulator configurations.

-Mike

On Tue, Sep 22, 2009 at 2:57 PM, stanlick  wrote:
>
> I configured a new machine today running Galileo and the Android ADT
> plug-in.  When I run a new project as Android Application everything
> seems to work fine, except I never see the emulator!  I see its PID
> but nothing visual.  I can kill the PID and start the emulator from
> the command prompt.  Any idea what is going on in Eclipse?  Also,
> should there be an emulator view under Window -> Show View?  There is
> none.
>
> >
>

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



[android-beginners] Re: Running camera in emulator using computer's webcam

2009-09-28 Thread shobhit kasliwal
Thanks for Replying mark.
I tried using these wrapper classes but no luck.
Might be I am doing something wrong
Can you please give me link or tutorial which tells me the step by step
procedure to run the camera from a remote source
That would be a great help for me

Thanks
Shobhit

On Mon, Sep 28, 2009 at 8:48 AM, Mark Murphy wrote:

>
> Shobhit Kasliwal wrote:
> > Can anybody tell me how can I run the camera in the emulator using my
> > computer's webcam.
>
> You can't, AFAIK.
>
> You can use Tom Gibara's wrapper classes that allow you to switch
> between the built-in camera and a camera from some other source, if you
> do not need the full features of the actual Android Camera class:
>
> http://www.tomgibara.com/android/camera-source
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Development Wiki: http://wiki.andmob.org
>
> >
>


-- 
Shobhit Kasliwal
Application Developer Intern
Liventus Designs
3400 Dundee Rd Northbrook IL 60062
skasli...@liventus.com
office: 847-291-1395 ext. 192
Cell: (309) 826 4709

Ted Turner   -
"Sports is like a war without the killing."

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



[android-beginners] Re: Possible to use same object in a Service?

2009-09-28 Thread Jeffrey Blattman




not possible that i am aware of. the service, your objects, and classes
(including static objects) can be kicked from memory at any point ...
by design. if every app did what you are trying to do, the larger
system would suffer. 

without knowing why you want to keep the object in memory, it's hard to
suggest other approaches.

On 9/28/09 6:09 AM, Oskar wrote:

  
Hi,

I have a service (extends service) that has an object called mailbox.
Every time i enter my service via an intent I would like to use the
same object to call some put and get methods. I don't want the object
to reload from scratch every time I enter the service.

Is this possible?

Example code would be very appreciated.

Thanks.

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

  


-- 





[android-beginners] sdcard mounted ok, but get "Unable to open trace file '/sdcard/x.trace", why?

2009-09-28 Thread javahollic

hi,
Using x86_64/EclipseGalileo/ADT0.9.3/SDK1.6r1,  here is the use case:

- create a blank sdcard with 'mksdcard -l empty 128M emptysdcard'
- create Google APIS 1.6 compatible Virtual Device, using the above
sdcard
- start virtual device
- observe virtual device checking out sdcard image
- observe via DDMS FileExplorer the director structure:
sdcard/d---rwxr-x
   LOST.DIR d---rwxr-x
- upload app, which is successful
- run app, which fails, last few log entries are:
09-26 17:43:48.010: DEBUG/MountListener(600): handleEvent
volume_unmounted:/sdcard
09-26 17:43:48.090: DEBUG/MountListener(600): handleEvent
volume_checking:/sdcard
09-26 17:43:50.620: INFO/vold(550): Sucessfully mounted vfat
filesystem 179:0 on /sdcard (safe-mode on)
09-26 17:43:50.620: DEBUG/MountListener(600): handleEvent
volume_mounted:/sdcard
09-26 17:43:51.970: VERBOSE/MediaProvider(759): /sdcard volume ID:
419633178
09-26 17:44:27.451: INFO/dalvikvm(872): TRACE STARTED: '/sdcard/
x.trace' 8192KB
09-26 17:44:27.451: ERROR/dalvikvm(872): Unable to open trace file '/
sdcard/x.trace': Permission denied

huh? how does /sdcard get a permission of "d---rwxr-x", what is sdcard
"safe-mode", how can I make it owner writeable (assuming that is the
problem I see)?

Cheers,
andy

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



[android-beginners] Re: Can i install 'barcode scanning app' on emulator ???

2009-09-28 Thread Rana

I need suggestion for building a barcode Application

On Sep 24, 5:23 pm, wahib  wrote:
> Hi !! I want to make a simple barcode scanning app using Intents. The
> problem is that i dont have a phone and i
> have to test all thing on emulator. Can anyone share how i can get
> 'barcode scanning .apk file' ?? so that i can install it on my
> emulator. I am really stuck with it. plz help.
>
> Regards,
> wahib

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



[android-beginners] language

2009-09-28 Thread Arlen

I would like to use MyTouch to surf Farsi web sites but it can not
display persian characters.
how can i add farsi language on android ?
Thankyou

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



[android-beginners] can't change chronometer time format

2009-09-28 Thread Adolfo Bulfoni

Hi guys,
I'm new to Android dev. and probably this question might be silly but
I haven't find a good answer by googling the web. I want to display a
chronometer and two buttons (Start and Stop) in a LinearLayout view.
Is it possible to specify a format different from "0:00"? I want to
have a format similar to "0:00:00.0" (like format available on
iPhone). Using setFormat does change the format, but I'm suspecting
it's not the right way to proceed: infact you can insert what string
you want (even a name...) and the system will display it, but of
course clicking start or stop won't produce any effect on it.
I've posted the source code.. can you help me? Thanks!!


main.xml:


http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>







class com.example.helloandroid.HelloAndroid.java

package com.example.helloandroid;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Chronometer;

public class HelloAndroid extends Activity {
private boolean started = false;


   /** Called when the activity is first created. */
   @Override
  public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   this.setContentView(R.layout.main);
   final Chronometer chronometer = (Chronometer) this.findViewById
(R.id.chronometer);

   Log.d("HelloAndroid", "Value of getFormat() is: "+
(chronometer.getFormat()));



   final Button startButton = (Button) findViewById
(R.id.startButton);
   startButton.setOnClickListener(new View.OnClickListener() {
   public void onClick(View v) {
   if(!started){
   Log.d("Hello Android", "start button clicked");
   started = true;

   chronometer.start();
   }
   }
   });


   final Button stopButton = (Button) findViewById
(R.id.stopButton);
   stopButton.setOnClickListener(new View.OnClickListener() {
   public void onClick(View v) {
   if(started){
   Log.d("Hello Android", "stop button clicked");
   started = false;
   chronometer.stop();
   }
   }
   });
   }
}

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



[android-beginners] Using adb on Debian with Samsung i7500

2009-09-28 Thread Olivier Guilyardi

Hi,

I'm developing an app on Debian stable aka Lenny and I just can't
connect to my Samsung i7500 (Galaxy) with adb. I've googled a lot
about it, tried all sort of udev rules (using the correct vendor id),
a patched version of adb, restarted udev, killed adb server, etc... It
just won't work.

Anyone successful with this?

--
  Olivier

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



[android-beginners] connect to wifi from Program

2009-09-28 Thread musunee md
Hi all,

How another available wifi can be connected from program once other network
is down?
I got stuck in choosing from availabe wifi after 1 n/w is down.


Thanks!

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



[android-beginners] Developing barcode Application

2009-09-28 Thread Rana

Dear, I want to develop a barcode application. How i start? If I get
some instruction then it will be easy to me.

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



[android-beginners] Installing K9 email client

2009-09-28 Thread Masoom

Hello everyone,

Here is my situation:

I needed to perform some modifications on K9 email client as part of
my course. So, I installed K9.apk file using Run option in windows.
But I was unaware that .apk file does not allow me to change/see the
source code. Thus I had to check out source code from the website
using SVN. In order to see my changes in the emulator, I needed to run
the check out source code in the eclipse. But since I had already
installed a K9 email client in the first place, eclipse prompted me to
first uninstall that. So I did uninstall .apk file from the emulator
itself.
Now finally, when I try to run the source code of K9 client, it showed
me following error:

[2009-09-26 18:32:32 - emailclient] --
[2009-09-26 18:32:32 - emailclient] Android Launch!
[2009-09-26 18:32:32 - emailclient] adb is running normally.
[2009-09-26 18:32:32 - emailclient] No Launcher activity found!
[2009-09-26 18:32:32 - emailclient] The launch will only sync the
application package on the device!
[2009-09-26 18:32:32 - emailclient] Performing sync
[2009-09-26 18:32:32 - emailclient] Automatic Target Mode: launching
new emulator with compatible AVD 'my_avd'
[2009-09-26 18:32:32 - emailclient] Launching a new emulator with
Virtual Device 'my_avd'
[2009-09-26 18:32:39 - emailclient] New emulator found: emulator-5554
[2009-09-26 18:32:39 - emailclient] Waiting for HOME
('android.process.acore') to be launched...
[2009-09-26 18:33:49 - emailclient] HOME is up on device
'emulator-5554'
[2009-09-26 18:33:49 - emailclient] Uploading emailclient.apk onto
device 'emulator-5554'
[2009-09-26 18:33:50 - emailclient] Installing emailclient.apk...
[2009-09-26 18:34:38 - emailclient] Application already exists.
Attempting to re-install instead...
[2009-09-26 18:34:45 - emailclient] Re-installation failed due to
different application signatures.
[2009-09-26 18:34:45 - emailclient] You must perform a full uninstall
of the application. WARNING: This will remove the application data!
[2009-09-26 18:34:45 - emailclient] Please execute 'adb uninstall
com.android.email' in a shell.
[2009-09-26 18:34:45 - emailclient] Launch canceled!

After learning from previous posts and what people had recommended to
do in such situations, I tried to do two things:

1) On the emulator itself, I tried to remove the package file i.e
com.android.email from /dev tools/package browser/com.andorid.email.
But all the time it displays: "com.andorid.development process ended
unexpectedly, please try again later"

2) Second thing which I tried was, in the run command in windows, I
tried to execute "adb uninstall com.andorid.email" which displayed
error as "Failure".

Let me know what can be done in this situation.

Thanks and Kind Regards,
Masoom

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



[android-beginners] How can I prevent the background from fading out when I show a dialog?

2009-09-28 Thread Christian

Hi,

how can I prevent the background from fading out when I show a dialog.
I am
showing a picture on a surface in the dialog taking from the camera.
And
when the background fades out the picture in the dialog on the surface
is
fading out too. Can I prevent the background from fading out while
showing a
dialog?

Thanks in advance.

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



[android-beginners] Re: remove apllication from emulator prob

2009-09-28 Thread Masoom

Hi Mark,

Here is the situation:
Initially, I had install k9.apk file using commands. Then I
uninstalled it from the emulator (setting/applications/manage
applications) because I wanted k9 client source code through SVN
checkout.
Now when I run the code from eclipse, I get these errors:

[2009-09-25 17:31:01 - emailclient] Uploading emailclient.apk onto
device 'emulator-5554'
[2009-09-25 17:31:03 - emailclient] Installing emailclient.apk...
[2009-09-25 17:31:45 - emailclient] Application already exists.
Attempting to re-install instead...
[2009-09-25 17:31:51 - emailclient] Re-installation failed due to
different application signatures.
[2009-09-25 17:31:51 - emailclient] You must perform a full uninstall
of the application. WARNING: This will remove the application data!
[2009-09-25 17:31:51 - emailclient] Please execute 'adb uninstall
com.android.email' in a shell.
[2009-09-25 17:31:51 - emailclient] Launch canceled!

I have tried 2 of the things:

First, in run command I tried to uninstall the package:
adb uninstall com.android.email
but it says "Failure"

Second, on the emulator: menu/dev tools/package browser/i tried to
delete the package com.android.email
But it says, com.android.development ended unexpectedly

I hope you can help with this>>>

Thanks,
Masoom

On Sep 4, 7:50 am, "Mark Murphy"  wrote:
> > i want to remove application from emulator
> > i am useing
> > adb shell in tool derectory
> > i got
> > #
> > then i used
> > # cd /data/app
> > #
>
> > here i am not getting any .apk files on emulator?so is the path is not
> > same or any other way to remove files
>
> You do not remove applications from any Android device or emulator that way.
>
> You can use the Settings application to manage applications on the
> emulator the same way as you do on the device. Or, you can use the 
> adbuninstallcommand:
>
> adbuninstallyour.package.name.here
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html

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



[android-beginners] Problem with ADT plugin in Eclipse Galileo

2009-09-28 Thread sbruno74

Hello all,

I installed the ADT plugin successfully and actually worked on
tutorials. But, after having installed Google Web Tool Kit and App
Engine plugins, All related Android menus and options are gone. So, I
can no longer create any Android project and any web tool kit project
in fact. It is as if those plugins were not installed.

I checked the install software menu, and when I select the
repositories for the Google and Android plugins, it says they are
already installed. I just noticed that Eclipse no longer loads the ADT
plugin when starting, and I can't find how to have them started.

I wonder if eclipse starts any plugin at all, except the core eclipse
and java needed. What's weird is that I can't seem to find any
corresponding entries for those plugins in the plugin folder of my
eclipse galileo distribution.

Please help, as I am blocked from working on any Android or web tool
kit related project!!

Thanks,
Stéphane

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



[android-beginners] Can I get the camera information on emulator?

2009-09-28 Thread hengxin...@gmail.com

   hello to all
   I want to get the camera infomation on emulator and transmit it to
another android phone ! what should I do ? give me some examples or
some suggestion Thanks a lot ! (I can transmit it  witm xmppService)

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



[android-beginners] Re: Problem with ADT plugin in Eclipse Galileo

2009-09-28 Thread Stéphane Bruno
Updating the issue. I just verified: I deleted the .eclipse folder in my
home folder and I went through the installation of the ADT plugin again from
scratch. But, after installing the Google plugins for eclipse (for appengine
and web toolkit), all Android references disappear and am unable to create
an Android project, and so forth.
It is as if the ADT plugin and the Google plugins cannot coexist in Eclipse


I am using eclipse 3.5 (Galileo).

Stéphane

On Sun, Sep 27, 2009 at 12:33 PM, sbruno74  wrote:

> Hello all,
>
> I installed the ADT plugin successfully and actually worked on
> tutorials. But, after having installed Google Web Tool Kit and App
> Engine plugins, All related Android menus and options are gone. So, I
> can no longer create any Android project and any web tool kit project
> in fact. It is as if those plugins were not installed.
>
> I checked the install software menu, and when I select the
> repositories for the Google and Android plugins, it says they are
> already installed. I just noticed that Eclipse no longer loads the ADT
> plugin when starting, and I can't find how to have them started.
>
> I wonder if eclipse starts any plugin at all, except the core eclipse
> and java needed. What's weird is that I can't seem to find any
> corresponding entries for those plugins in the plugin folder of my
> eclipse galileo distribution.
>
> Please help, as I am blocked from working on any Android or web tool
> kit related project!!
>
> Thanks,
> Stéphane

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



[android-beginners] adb installer on Ubuntu

2009-09-28 Thread gmseed

Hi

I developed a first Hello-World adnroid application and was wanting to
install on my HTC Hero device.

I connected the device, enabled "Unknown sources" in "Applications
Settings" and typed:

adb -d install "...path to file..."

and get back:

"device not found"

Does anyone know how to upload apps to an android device when using
Ubuntu?

Thanks

Graham

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



[android-beginners] HelloMapView coming up with empty tiles

2009-09-28 Thread Clayton

I'm having trouble getting the HelloMapView to work.  I have the Maps
API key that I got from, submitting the androiddebugkey, in the
main.xml but my HelloMapView comes up in the emulator with empty
tiles, no map.  The GoogleMaps app works on the emulator but my app
doesn't work.  What am I missing?

Here's my manifest

http://schemas.android.com/apk/res/android";
  package="com.example"
  android:versionCode="1"
  android:versionName="1.0">















My main.xml

http://schemas.android.com/apk/res/
android"
android:id="@+id/mainlayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >




Here's my HelloMapView class:

package com.example;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ZoomControls;

public class HelloMapView extends MapActivity {

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

}

@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}

Thanks in advance,
Clayton

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



[android-beginners] Re: Emulator in Eclipse IDE

2009-09-28 Thread Markus

I also had problems with Swedish characters in my Docs and Settings
username path. Put the AVD somewhere else.

/Markus

On 20 Sep, 08:20, Roman  wrote:
> There are also problems with name of the path. Don't use cyrillic
> symbols or complicated name, specify path in command line:
>
> android create avd -n my_avd -t 1 -p f:\avd
>
> On Sep 17, 8:43 pm, ichpa  wrote:
>
>
>
> > Hi,
>
> > I have the same error. I tried to run emulator with Eclipse and
> > Command Line without success.
>
> > Unfortunately, the solutions above do not work.
>
> > Any others ideas ?
>
> > On 17 sep, 07:33, Raphael  wrote:
>
> > > Seems like it.
> > > Please try one of the following:
>
> > > - run the "android" tool UI, select your AVD and select the "repair"
> > > button if enabled.
>
> > > or on the command line
>
> > > $ android update avd --name your_avd_name
>
> > > R/
>
> > > On Wed, Sep 16, 2009 at 8:14 AM, Jack Ha  wrote:
>
> > > > It seems like your AVD's config.ini file is missing the image.sysdir.*
> > > > entries. Have you tried to create another AVD file and launch the
> > > > emulator with that?
>
> > > > --
> > > > Jack Ha
> > > > Open Source Development Center
> > > > ・T・ ・ ・Mobile・ stick together
> > > > The coverage you need at the price you want
>
> > > > The views, opinions and statements in this email are those of
> > > > the author solely in their individual capacity, and do not
> > > > necessarily represent those of T-Mobile USA, Inc.
>
> > > > On Sep 16, 7:38 am, "mic.ger...@gmail.com" 
> > > > wrote:
> > > >> Hi,
> > > >> I have a problem when I try to launch an AVD in Eclipse.
> > > >> It never starts and I obtain this error message :
>
> > > >> [2009-09-16 16:24:41 - Emulator]emulator: ERROR: no search paths found
> > > >> in this AVD's configuration.
> > > >> [2009-09-16 16:24:41 - Emulator]Weird, the AVD's config.ini file is
> > > >> malformed. Try re-creating it.
>
> > > >> I obtain the same error with the 1.5r3 and 1.6r1 SDK.
>
> > > >> Thank you for your help.
> > > >> Michaël

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



[android-beginners] Issue about EditText

2009-09-28 Thread f0rzan

Hello!
I having a problem to write text in a EditText input. My EditText
input is in a diffrent layout from a tabview.
Is there someone else that knowing about this issue?

When I try to make a input in my EditText the maker automatically
moves to one of my tabs in the tabview below, thats make it impossible
to write in the EditText input.


  Regards

 .-  forzan

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



[android-beginners] Motorola Krave zn4 run on android?

2009-09-28 Thread candyman

As most of you know the Moto Krave zn4 runs on linux, but is it
possible to run android on this device?

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



[android-beginners] Launcher with parameters

2009-09-28 Thread Jun2k97

Hello,

I am very new to android sdk, so I am sure that my question will be a
bit simple.

I want to create a piece of code that allow me to do the next:

1 Core program with a textfield and a feature to create customized
shortcuts. These shortcuts may contain parameters. Each time you
launch the shortcut, the textfield would be filled with these
parameters.

Its something like in astrid, that allows you to create shortcuts to
customized tasks lists.

Am I clear? May be I haven't explained it very well. I hope some one
can help me.

Thank you in advance.

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



[android-beginners] Re: Trouble passing a KML file to the DDMS Location Emulator

2009-09-28 Thread tarek.attia

Hey,,Did you know how to do tht,,i'm facing the same
problem?,,,

Please anybody Help me out

On Aug 20, 8:44 pm, AKA  wrote:
> I'm sure this must be a simple/dumb thing I'm doing wrong, as I'm
> unable to find anyone else posting about this problem...so, my
> apologies in advance if this is a stupid question.
>
> Basically, I'm trying to send mock location data to the Android
> Emulator via the DDMS application. I can successfully send locations
> one by one, using the "Manual Location" tab in DDMS. However, I can't
> get *any* KML files to even show up in DDMS when I load them...I have
> tried many different KML files, including the simple example files
> provided by Google.
>
> I am pretty sure I am doing something wrong, as I am quite new to
> Android. For example, I can't even get the DDMS window built in to
> Eclipse to show me the location-spoofing screen. I am running DDMS
> from the console.
>
> Thanks in advance for any help you might be able to offer!
>
> Best,
>
> AKA

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



[android-beginners] Saving calculator result problem

2009-09-28 Thread bgoody

Hi. I am trying to hack this bit of code to save the results of a
calculation to disk but it says that the variable (txt) cannot be
resolved.
Any ideas!

private void handleEquals(int newOperator) {
if (hasChanged) {
switch (operator) {
case 1:
num = num + Double.parseDouble(txtCalc.getText().toString());
break;
case 2:
num = num - Double.parseDouble(txtCalc.getText().toString());
break;
case 3:
num = num * Double.parseDouble(txtCalc.getText().toString());
break;
case 4:
num = num / Double.parseDouble(txtCalc.getText().toString());
break;
}

String txt = Double.toString(num);
txtCalc.setText(txt);
txtCalc.setSelection(txt.length());

readyToClear = true;
hasChanged = false;

}

FileOutputStream fOut = openFileOutput
("samplefile.txt",MODE_WORLD_READABL E);
OutputStreamWriter osw = new OutputStreamWriter(fOut);
osw.write(txt);
osw.flush();
fOut.close();
osw.close();
operator = newOperator;

}

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



[android-beginners] Re: remove apllication from emulator prob

2009-09-28 Thread Mark Murphy

Masoom wrote:
> Hi Mark,
> 
> Here is the situation:
> Initially, I had install k9.apk file using commands. Then I
> uninstalled it from the emulator (setting/applications/manage
> applications) because I wanted k9 client source code through SVN
> checkout.
> Now when I run the code from eclipse, I get these errors:
> 
> [2009-09-25 17:31:01 - emailclient] Uploading emailclient.apk onto
> device 'emulator-5554'
> [2009-09-25 17:31:03 - emailclient] Installing emailclient.apk...
> [2009-09-25 17:31:45 - emailclient] Application already exists.
> Attempting to re-install instead...
> [2009-09-25 17:31:51 - emailclient] Re-installation failed due to
> different application signatures.
> [2009-09-25 17:31:51 - emailclient] You must perform a full uninstall
> of the application. WARNING: This will remove the application data!
> [2009-09-25 17:31:51 - emailclient] Please execute 'adb uninstall
> com.android.email' in a shell.
> [2009-09-25 17:31:51 - emailclient] Launch canceled!
> 
> I have tried 2 of the things:
> 
> First, in run command I tried to uninstall the package:
> adb uninstall com.android.email
> but it says "Failure"
> 
> Second, on the emulator: menu/dev tools/package browser/i tried to
> delete the package com.android.email
> But it says, com.android.development ended unexpectedly
> 
> I hope you can help with this

Create a fresh AVD and use it, thereby getting rid of all of the wedged
code:

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

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

Android App Developer Training: http://commonsware.com/training.html

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



[android-beginners] Re: adb installer on Ubuntu

2009-09-28 Thread Mark Murphy

gmseed wrote:
> Hi
> 
> I developed a first Hello-World adnroid application and was wanting to
> install on my HTC Hero device.
> 
> I connected the device, enabled "Unknown sources" in "Applications
> Settings" and typed:
> 
> adb -d install "...path to file..."
> 
> and get back:
> 
> "device not found"
> 
> Does anyone know how to upload apps to an android device when using
> Ubuntu?

Generally, you need to adjust your udev rules:

http://developer.android.com/guide/developing/device.html#setting-up

Some people have to try different numbers than the 51-android.rules the
documentation suggests. Also, the instructions shown there are for HTC
devices; different manufacturers will have different rules.

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

Android App Developer Training: http://commonsware.com/training.html

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



[android-beginners] Re: Listview help

2009-09-28 Thread Yusuf Saib (T-Mobile USA)

You can do this with an XML layout. If the three lists look different
(for example, album has a picture and three rows of text, song has no
picture and two rows of text, etc.), then make three xml files that
describe the layouts. Setting the click listener is straightforward
and is covered in various ListView tutorials. When the user clicks on
an item, then get the appropriate ListView, load it with data
(ArrayAdapter works well) and display it (setContentView is one way).



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



On Sep 28, 7:09 am, Alok  wrote:
> Hi guys,
> I am developing a music application where there will be almost 30 to
> 35 lists .
> Example ..
> A list on page one say albums , artists  etc etc
> Then if you select one list item say Albums , you go on a new page
> with Album list, when u click on one album listitem , u enter song
> list.. that way .
> each list item has an image associated with it . And the text for the
> listitem may be 2 lines per item. And the text should be scrollable.
> (Like Marquee)
> Now my idea is to create a generic list which is common to all the
> listview screens.
> At runtime i should be able to pass the contents of each list to this
> generic class.
> What approach should i take? Can a XML layout solve this purpose..
> Please give me some guidelines. Reuse is my main aim.. And for each
> listitem i should be able to handle click listeners..
> Please give me some guidelines.
> Thanks in advance,
> Alok.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Motorola Krave zn4 run on android?

2009-09-28 Thread Jeffrey Blattman




as far as i can tell it doesn't run linux. regardless, running linux is
one thing, having an android dist for that hardware is completely
different.

On 9/26/09 9:32 PM, candyman wrote:

  
As most of you know the Moto Krave zn4 runs on linux, but is it
possible to run android on this device?

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

  


-- 





[android-beginners] HTC Hero

2009-09-28 Thread Eros Stein
Hi everyone.
Does anyone know if there are differences between the G2 and Hero.
Software differences.
Will the app I wrote for G2 work the same way on a Hero?

Thanks.

-- 
Eros Eduardo Stein
Técnico de Informática / Em breve analista.
USE >> http://www.ekaaty.org
http://www.erosstein.info

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



[android-beginners] Re: HTC Hero

2009-09-28 Thread andrea antonello

Hi, I wrote one with the 1.5 sdk that works with gps and gravitometer
and several thikngs and it works with no problem.

Andrea

On Mon, Sep 28, 2009 at 9:16 PM, Eros Stein  wrote:
> Hi everyone.
> Does anyone know if there are differences between the G2 and Hero.
> Software differences.
> Will the app I wrote for G2 work the same way on a Hero?
>
> Thanks.
>
> --
> Eros Eduardo Stein
> Técnico de Informática / Em breve analista.
> USE >> http://www.ekaaty.org
> http://www.erosstein.info
>
> >
>

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



[android-beginners] Re: HTC Hero

2009-09-28 Thread Jeffrey Blattman




android apps are write once run anywhere (in theory).

On 9/28/09 12:16 PM, Eros Stein wrote:
Hi everyone.
Does anyone know if there are differences between the G2 and Hero. 
Software differences.
Will the app I wrote for G2 work the same way on a Hero?
  
Thanks.
  
-- 
Eros Eduardo Stein
Técnico de Informática / Em breve analista.
USE >> http://www.ekaaty.org
  http://www.erosstein.info
  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 
Groups "Android Beginners" group. 
To post to this group, send email to android-beginners@googlegroups.com
  
To unsubscribe from this group, send email to 
android-beginners-unsubscr...@googlegroups.com 
For more options, visit this group at 
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---
  


-- 





[android-beginners] Re: Saving calculator result problem

2009-09-28 Thread Yusuf Saib (T-Mobile USA)

txt is declared inside your "if (hasChanged) {" scope. Then you use it
after the corresponding "}".


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



On Sep 27, 10:02 am, bgoody  wrote:
> Hi. I am trying to hack this bit of code to save the results of a
> calculation to disk but it says that the variable (txt) cannot be
> resolved.
> Any ideas!
>
> private void handleEquals(int newOperator) {
> if (hasChanged) {
> switch (operator) {
> case 1:
> num = num + Double.parseDouble(txtCalc.getText().toString());
> break;
> case 2:
> num = num - Double.parseDouble(txtCalc.getText().toString());
> break;
> case 3:
> num = num * Double.parseDouble(txtCalc.getText().toString());
> break;
> case 4:
> num = num / Double.parseDouble(txtCalc.getText().toString());
> break;
>
> }
>
> String txt = Double.toString(num);
> txtCalc.setText(txt);
> txtCalc.setSelection(txt.length());
>
> readyToClear = true;
> hasChanged = false;
>
> }
>
> FileOutputStream fOut = openFileOutput
> ("samplefile.txt",MODE_WORLD_READABL E);
> OutputStreamWriter osw = new OutputStreamWriter(fOut);
> osw.write(txt);
> osw.flush();
> fOut.close();
> osw.close();
> operator = newOperator;
>
>
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: HTC Hero

2009-09-28 Thread Jonas Petersson

Jeffrey Blattman wrote:
> android apps are write once run anywhere (in theory).

Technically, yes. However, my experience is that many Hero users expect 
apps to also LOOK like most of the apps that come with their Hero from 
the start and since HTC has significantly altered the look&feel an app 
that looks "normal" on the G1/G2 may very well be considered "ugly" on 
the Hero.

I've had one Hero user rate one of my apps with a single star just 
because of this (even though he claimed the app did everything he 
expected). Sure, I could dismiss this user as ignorant, but don't we all 
hope that every single noob should own an android? As Hero is the most 
common android around here, I decided to alter the way my app looks. 
Ideally there should be a way to skin all apps the same, but alas it is 
not there yet. Maybe we can hope for 2.0?

Best / Jonas

> On 9/28/09 12:16 PM, Eros Stein wrote:
>> Hi everyone.
>> Does anyone know if there are differences between the G2 and Hero.
>> Software differences.
>> Will the app I wrote for G2 work the same way on a Hero?



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



[android-beginners] Re: Listview help

2009-09-28 Thread Alok Kulkarni
Thanks
Yusuf :)

On Tue, Sep 29, 2009 at 12:36 AM, Yusuf Saib (T-Mobile USA) <
yusuf.s...@t-mobile.com> wrote:

>
> You can do this with an XML layout. If the three lists look different
> (for example, album has a picture and three rows of text, song has no
> picture and two rows of text, etc.), then make three xml files that
> describe the layouts. Setting the click listener is straightforward
> and is covered in various ListView tutorials. When the user clicks on
> an item, then get the appropriate ListView, load it with data
> (ArrayAdapter works well) and display it (setContentView is one way).
>
>
>
> Yusuf Saib
> Android
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
>
>
> On Sep 28, 7:09 am, Alok  wrote:
> > Hi guys,
> > I am developing a music application where there will be almost 30 to
> > 35 lists .
> > Example ..
> > A list on page one say albums , artists  etc etc
> > Then if you select one list item say Albums , you go on a new page
> > with Album list, when u click on one album listitem , u enter song
> > list.. that way .
> > each list item has an image associated with it . And the text for the
> > listitem may be 2 lines per item. And the text should be scrollable.
> > (Like Marquee)
> > Now my idea is to create a generic list which is common to all the
> > listview screens.
> > At runtime i should be able to pass the contents of each list to this
> > generic class.
> > What approach should i take? Can a XML layout solve this purpose..
> > Please give me some guidelines. Reuse is my main aim.. And for each
> > listitem i should be able to handle click listeners..
> > Please give me some guidelines.
> > Thanks in advance,
> > Alok.
> >
>

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



[android-beginners] Re: Can i install 'barcode scanning app' on emulator ???

2009-09-28 Thread wahib haq

hey Rana !! I am also working on this task for now a long time :S. The
thing is if you have a phone than its pretty simple and quick but with
emulator its tough. The basic thing is you need to get know how of
Zxing library which is used for encoding and decoding stuff. Rite now
i am able to test the decoding of a stored barcode image  but i am
unable to integrate it with camera. to get started ..

http://code.google.com/p/zxing/wiki/GettingStarted
http://code.google.com/p/zxing/wiki/InterestingLinks

There are two methods. a) to install barcode application & use it
intents in your app
b) To write your own app and functions of decoding and encoding

hope it helps you out. If you find smthing worthy to share. Then share
with me plz. I am a newbie to android !!

Regards,
wahib

On 9/27/09, Rana  wrote:
>
> I need suggestion for building a barcode Application
>
> On Sep 24, 5:23 pm, wahib  wrote:
>> Hi !! I want to make a simple barcode scanning app using Intents. The
>> problem is that i dont have a phone and i
>> have to test all thing on emulator. Can anyone share how i can get
>> 'barcode scanning .apk file' ?? so that i can install it on my
>> emulator. I am really stuck with it. plz help.
>>
>> Regards,
>> wahib
>
> >
>


-- 
Wahib-ul-haq

Communications Engineering Student,
NUST, Pakistan.
www.sizzlotech.com

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



[android-beginners] Re: connect to wifi from Program

2009-09-28 Thread Roman ( T-Mobile USA)

When you get disconnected (use networkInfo.getDetailedState() to get
current network state), the API getDetailedState() should tell you
that you are disconnected. Try to scan for available networks
executing

   mWifiMgr = (WifiManager)mContext.getSystemService
(mWifiService);
   mWifiMgr.startScan();

Also implement a broadcast receiver which acts on scan results. For
example add to your onReceive method


 if(intent.getAction().equals
(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)){

  //Loop through the scan result and get the capability (which
authentication,key management, ...)
  //select a result where the network is open (I assume you don't have
key management information)
  //create a WifiConfiguration
  //add the WifiConfiguration to your WifiMgr using addNetwork
  //enable your new WifiConfiguration using mWifiMgr.enableNetwork


 }

The last step should result in a network state change which you can
capture again in your context receiver.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Sep 27, 6:12 pm, musunee md  wrote:
> Hi all,
>
> How another available wifi can be connected from program once other network
> is down?
> I got stuck in choosing from availabe wifi after 1 n/w is down.
>
> Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Can i fetch the latest image from gallery taken from camera ?

2009-09-28 Thread wahib haq

hi !! I dnt get anything required from this tutorial. This was a code
to run camera application and it has nthing to do with the retreiving
of gallery images. I need smthing else to help me out :S

well, thanks

On 9/28/09, moazzamk  wrote:
>
> A quick search on google gave me this link:
> http://2008.hfoss.org/Tutorial:Creating_a_Camera_Application
>
> - Moazzam
> http://moazzam-khan.com
>
> On Sep 24, 7:05 am, wahib  wrote:
>> HI ! I want to fetch the latest image taken from camera into my code
>> and then can do manipulation on it. Being a newbie i dont know how to
>> get hold of that image .. and secondly how to read that image into my
>> code. I guess i have to use content providers but how?? plz guide me
>> with a sample code. I'll be so thankful to u ppl.
>>
>> Regards,
>> wahib
> >
>


-- 
Wahib-ul-haq

Communications Engineering Student,
NUST, Pakistan.
www.sizzlotech.com

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



[android-beginners] Re: HTC Hero

2009-09-28 Thread Eros Stein
So basiclly my app will run the same as in G1/G2, but with a different
visual, right?
About the look, is there any laf to make my app look like all Hero's apps?

Thanks again.

On Mon, Sep 28, 2009 at 4:40 PM, Jonas Petersson wrote:

>
> Jeffrey Blattman wrote:
> > android apps are write once run anywhere (in theory).
>
> Technically, yes. However, my experience is that many Hero users expect
> apps to also LOOK like most of the apps that come with their Hero from
> the start and since HTC has significantly altered the look&feel an app
> that looks "normal" on the G1/G2 may very well be considered "ugly" on
> the Hero.
>
> I've had one Hero user rate one of my apps with a single star just
> because of this (even though he claimed the app did everything he
> expected). Sure, I could dismiss this user as ignorant, but don't we all
> hope that every single noob should own an android? As Hero is the most
> common android around here, I decided to alter the way my app looks.
> Ideally there should be a way to skin all apps the same, but alas it is
> not there yet. Maybe we can hope for 2.0?
>
>Best / Jonas
>
> > On 9/28/09 12:16 PM, Eros Stein wrote:
> >> Hi everyone.
> >> Does anyone know if there are differences between the G2 and Hero.
> >> Software differences.
> >> Will the app I wrote for G2 work the same way on a Hero?
>
>
>
> >
>


-- 
Eros Eduardo Stein
Técnico de Informática / Em breve analista.
USE >> http://www.ekaaty.org
http://www.erosstein.info

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



[android-beginners] Re: HTC Hero

2009-09-28 Thread Jeffrey Blattman




yes. my understanding is that the motorola cliq is doing something
similar  ... android, but with an altered front end. it sent a chill
down my spine. IMHO, these companies should be putting effort into
android to improve its theme mechanism until it can cover their needs.
then we should be able to install the hero theme, or the cliq theme on
any phone.

now, maybe motorola / htc would not license use of the theme on other
phones, but it should be possible technically.



On 9/28/09 12:40 PM, Jonas Petersson wrote:

  
Jeffrey Blattman wrote:
  
  
android apps are write once run anywhere (in theory).

  
  
Technically, yes. However, my experience is that many Hero users expect 
apps to also LOOK like most of the apps that come with their Hero from 
the start and since HTC has significantly altered the look&feel an app 
that looks "normal" on the G1/G2 may very well be considered "ugly" on 
the Hero.

I've had one Hero user rate one of my apps with a single star just 
because of this (even though he claimed the app did everything he 
expected). Sure, I could dismiss this user as ignorant, but don't we all 
hope that every single noob should own an android? As Hero is the most 
common android around here, I decided to alter the way my app looks. 
Ideally there should be a way to skin all apps the same, but alas it is 
not there yet. Maybe we can hope for 2.0?

			Best / Jonas

  
  
On 9/28/09 12:16 PM, Eros Stein wrote:


  Hi everyone.
Does anyone know if there are differences between the G2 and Hero.
Software differences.
Will the app I wrote for G2 work the same way on a Hero?
  

  
  


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

  


-- 





[android-beginners] Re: Can we take pictures without setting a camera preview?

2009-09-28 Thread wahib haq

Hi ROmain !! is the picture size normal ?? I am working on a simple
barcode app using emulator only :S. Well when i take picture its saved
as a thumbnail or u can say 25% of original size. I want to see
preview. If your code working well than plz share .. and tell me what
changes to make to show preview !! I'll be very thankful.

Regards,
wahib

On 9/25/09, Romain Vallet  wrote:
>
> After some more tests, I can call the takePicture method without
> firing an exception. I don't call the startPreview method before
> taking the picture. All pictures taken with this method are black,
> though.
> Any ideas?
>
> On 22 sep, 16:08, Romain Vallet  wrote:
>> Hi,
>> I'm writing a program that needs to take pictures with the camera, but
>> I don't need a preview. Everything I tried without setting a preview
>> display ended in errors of the type "Unable to create media player".
>> Do the camera really need a preview display or is there a way to take
>> pictures without one?
>>
>> Thanks,
>> Romain.
> >
>


-- 
Wahib-ul-haq

Communications Engineering Student,
NUST, Pakistan.
www.sizzlotech.com

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



[android-beginners] Re: startActivityForResult problem...

2009-09-28 Thread Tikoze

One thing that may be pertinent is that the two apps are in different
packages...  I don't think that this should make a difference, but
just thought I would point this out in case I am mistaken.

Thanks,
Justin

On Sep 28, 7:51 am, Tikoze  wrote:
> Anyone have any ideas?
>
> On Sep 26, 8:44 am, Justin Anderson  wrote:
>
> > *> "That is definitely a puzzling behaviour, I suspect the fact you have no
> > content view is probably the cause."*
>
> > I tried giving it a LinearLayout but the result was the same.
>
> > *> "Is there any reason why you need the second activity? "*
>
> > I'm doing this as a way to have both free and paid (or rather, donate)
> > versions of the same app using the same code-base.  My second activity
> > returns an MD5 hash of a secret key.  When the first activity gets the
> > result back it checks it to see if it should run in free mode or paid
> > (donate) mode.  I got the idea from the Documents to Go app.  Of course, I
> > have no idea how they accomplished this feat... I'm just trying to get the
> > same results.  If there is a better way to do something like this I would be
> > willing to try that.
>
> > *> "Activities are supposed to be used to display a new screen, processing
> > data in the background is usually performed in an ASyncTask or similar
> > runnable class."*
>
> > While this is probably true in most cases, my activity uses the NoDisplay
> > theme, which, according to the docs is for Activities that don't display a
> > UI because they finish themselves before being resumed.  This is exactly
> > what my second activity does.  As an aside, I have also tried this without
> > having that theme and the results are the same.
>
> > Thanks,
> > Justin
>
> > --
> > There are only 10 types of people in the world...
> > Those who know binary and those who don't.
> > --
>
> > On Sat, Sep 26, 2009 at 4:34 AM, Sean Hodges 
> > wrote:
>
> > > That is definitely a puzzling behaviour, I suspect the fact you have no
> > > content view is probably the cause.
>
> > > Is there any reason why you need the second activity? Activities are
> > > supposed to be used to display a new screen, processing data in the
> > > background is usually performed in an ASyncTask or similar runnable class.
>
> > > On Sep 26, 2009 8:45 AM, "MagouyaWare"  wrote:
>
> > > I have an activity that needs to start another activity in the
> > > onCreate method.  The second activity doesn't have a UI, it just
> > > processes some data (very quickly) and returns it via setResult.
>
> > > The problem I am having is that it looks like the onActivityResult
> > > method from my first activity is called before the second activity has
> > > finished!
>
> > > I put in some Toast notifications to be sure, but the order that the
> > > notifications appear is as follows:
> > > - onCreate for Activity1 (just before calling startActivityForResult
> > > to launch Activity2)
> > > - onActivityResult for Activity1
> > > - onCreate for Activity2
>
> > > Has anyone else run into this problem?  I have not been able to find
> > > anything about this issue on these forums or on google.
>
> > > Thanks in advance,
> > > Justin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: launch app from an app

2009-09-28 Thread Shude Zheng
Hi, Justin,

Can I use similar function call Home using startActivity() in the child
application. Do not use the Home button. Because I want keep the child
application alive and directly back to home.

Thanks,

Shude

On Tue, Sep 22, 2009 at 5:14 PM, Shude Zheng  wrote:

> Thanks, Justin.
>
> This is what I want to know.
>
> Shude
>
>   On Tue, Sep 22, 2009 at 3:59 PM, Justin Anderson 
> wrote:
>
>> Yes you can do that.  I have a program on the market, AppSwipe!, that
>> essentially does only that. The Dev Guide states:
>>
>> "The general mechanism to start a new activity if its not running— or to
>> bring the activity stack to the front if is already running in the
>> background— is the to use the NEW_TASK_LAUNCH flag in the startActivity()
>> call."
>>
>> This is found on this page:
>> http://developer.android.com/guide/appendix/faq/framework.html#4
>>
>> Thanks,
>> Justin
>>
>> --
>> There are only 10 types of people in the world...
>> Those who know binary and those who don't.
>> --
>>
>>
>>   On Tue, Sep 22, 2009 at 2:47 PM, Shude Zheng wrote:
>>
>>> Thanks, Justin,
>>>
>>> I have fixed the crash. But I still have some questions.
>>>
>>> I have two my own applications, for example, Parent and Child. There is
>>> button in Parent applicaiton to launch Child. It uses the ApplicationInfo
>>> code get the name and activity of Child and uses startActivity() to launch
>>> Child. Child will run. At that time the Parent is atill alive at
>>> background. The Child Uses similar function. it will launch the Parent. But
>>> at that time Parent is still alive. Can I use atartActivity() to let the
>>> Parent run in front. The doc said atartActivity is for new activity.
>>>
>>> Shude
>>>
>>>   On Tue, Sep 22, 2009 at 10:25 AM, Justin Anderson <
>>> janderson@gmail.com> wrote:
>>>
 The following will get you a list of all applications on your phone as
 ApplicationInfo objects (assuming you have a Context object):

 PackageManager mgr = context.getPackageManager();
 ArrayList appList =
 (ArrayList)mgr.getInstalledApplications(0);

 Hope this helps,
 Justin

 --
 There are only 10 types of people in the world...
 Those who know binary and those who don't.
 --


   On Tue, Sep 22, 2009 at 1:36 AM, Sean Hodges <
 seanhodge...@googlemail.com> wrote:

> I think he's trying to launch the Youtube app
>
>  On Sep 22, 2009 7:29 AM, "Justin Anderson" 
> wrote:
>
> Are you trying to launch an activity that you created, or an arbitrary
> third party app?
>
> Thanks,
> Justin
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
> On Fri, Sep 18, 2009 at 7:46 AM, Abhi 
> wrote: > > > Hi, > > After se...
>
>
>
>



>>>
>>>
>>>
>>
>> >>
>>
>

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



[android-beginners] Re: launch app from an app

2009-09-28 Thread Justin Anderson
Technically you can do that, yes.

However, I would only do that if it is absolutely necessary and I would make
it very clear to the user that that is what you are doing.  Android Apps
have a very specific lifecycle, as defined in the Dev Guide, and users
expect that to be the way applications work.

They will get very annoyed if that is not followed unless it is for a very
good reason.  One particular example that is extremely irritating is when
applications override the default behavior of the back button.  If I press
the back button I am wanting to exit the app.  When that is not followed it
is very frustrating.

Thanks,
Justin

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Mon, Sep 28, 2009 at 2:39 PM, Shude Zheng  wrote:

> Hi, Justin,
>
> Can I use similar function call Home using startActivity() in the child
> application. Do not use the Home button. Because I want keep the child
> application alive and directly back to home.
>
> Thanks,
>
> Shude
>
> On Tue, Sep 22, 2009 at 5:14 PM, Shude Zheng  wrote:
>
>> Thanks, Justin.
>>
>> This is what I want to know.
>>
>> Shude
>>
>>   On Tue, Sep 22, 2009 at 3:59 PM, Justin Anderson > > wrote:
>>
>>> Yes you can do that.  I have a program on the market, AppSwipe!, that
>>> essentially does only that. The Dev Guide states:
>>>
>>> "The general mechanism to start a new activity if its not running— or to
>>> bring the activity stack to the front if is already running in the
>>> background— is the to use the NEW_TASK_LAUNCH flag in the startActivity()
>>> call."
>>>
>>> This is found on this page:
>>> http://developer.android.com/guide/appendix/faq/framework.html#4
>>>
>>> Thanks,
>>> Justin
>>>
>>> --
>>> There are only 10 types of people in the world...
>>> Those who know binary and those who don't.
>>> --
>>>
>>>
>>>   On Tue, Sep 22, 2009 at 2:47 PM, Shude Zheng wrote:
>>>
 Thanks, Justin,

 I have fixed the crash. But I still have some questions.

 I have two my own applications, for example, Parent and Child. There is
 button in Parent applicaiton to launch Child. It uses the ApplicationInfo
 code get the name and activity of Child and uses startActivity() to launch
 Child. Child will run. At that time the Parent is atill alive at
 background. The Child Uses similar function. it will launch the Parent. But
 at that time Parent is still alive. Can I use atartActivity() to let the
 Parent run in front. The doc said atartActivity is for new activity.

 Shude

   On Tue, Sep 22, 2009 at 10:25 AM, Justin Anderson <
 janderson@gmail.com> wrote:

> The following will get you a list of all applications on your phone as
> ApplicationInfo objects (assuming you have a Context object):
>
> PackageManager mgr = context.getPackageManager();
> ArrayList appList =
> (ArrayList)mgr.getInstalledApplications(0);
>
> Hope this helps,
> Justin
>
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
>
>   On Tue, Sep 22, 2009 at 1:36 AM, Sean Hodges <
> seanhodge...@googlemail.com> wrote:
>
>> I think he's trying to launch the Youtube app
>>
>>  On Sep 22, 2009 7:29 AM, "Justin Anderson" 
>> wrote:
>>
>> Are you trying to launch an activity that you created, or an arbitrary
>> third party app?
>>
>> Thanks,
>> Justin
>> --
>> There are only 10 types of people in the world...
>> Those who know binary and those who don't.
>> --
>>
>> On Fri, Sep 18, 2009 at 7:46 AM, Abhi 
>> wrote: > > > Hi, > > After se...
>>
>>
>>
>>
>
>
>



>>> >>>
>>>

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



[android-beginners] problem installing a .apk file

2009-09-28 Thread wahib

hi ! I am a newbie and wanna install a barcode app on emulator. The
app is moseycode and i have its .apk file. when i run 'adb install
' in command prompt this error is displayed ..

FAILURE [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

i dnt know why this error is here !! :S plz help

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



[android-beginners] Re: problem installing a .apk file

2009-09-28 Thread Jack Ha

Run "adb logcat" and you should see the error message:

W/PackageParser(  582): /data/app/vmdl43410.tmp (at Binary XML file
line #10):  does not specify android:name

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together
The coverage you need at the price you want

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



On Sep 28, 2:26 pm, wahib  wrote:
> hi ! I am a newbie and wanna install a barcode app on emulator. The
> app is moseycode and i have its .apk file. when i run 'adb install
> ' in command prompt this error is displayed ..
>
> FAILURE [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> i dnt know why this error is here !! :S plz help
>
> Regards,
> wahib
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: HTC Hero

2009-09-28 Thread Eros Stein
Thank you all for the infos.

Best regards.

On Mon, Sep 28, 2009 at 5:05 PM, Jeffrey Blattman <
jeffrey.blatt...@gmail.com> wrote:

>  yes. my understanding is that the motorola cliq is doing something
> similar  ... android, but with an altered front end. it sent a chill down my
> spine. IMHO, these companies should be putting effort into android to
> improve its theme mechanism until it can cover their needs. then we should
> be able to install the hero theme, or the cliq theme on any phone.
>
> now, maybe motorola / htc would not license use of the theme on other
> phones, but it should be possible technically.
>
>
>
>
> On 9/28/09 12:40 PM, Jonas Petersson wrote:
>
> Jeffrey Blattman wrote:
>
>
>  android apps are write once run anywhere (in theory).
>
>
>  Technically, yes. However, my experience is that many Hero users expect
> apps to also LOOK like most of the apps that come with their Hero from
> the start and since HTC has significantly altered the look&feel an app
> that looks "normal" on the G1/G2 may very well be considered "ugly" on
> the Hero.
>
> I've had one Hero user rate one of my apps with a single star just
> because of this (even though he claimed the app did everything he
> expected). Sure, I could dismiss this user as ignorant, but don't we all
> hope that every single noob should own an android? As Hero is the most
> common android around here, I decided to alter the way my app looks.
> Ideally there should be a way to skin all apps the same, but alas it is
> not there yet. Maybe we can hope for 2.0?
>
>   Best / Jonas
>
>
>
>  On 9/28/09 12:16 PM, Eros Stein wrote:
>
>
>  Hi everyone.
> Does anyone know if there are differences between the G2 and Hero.
> Software differences.
> Will the app I wrote for G2 work the same way on a Hero?
>
>
>  >
>
>
>
> --
>



-- 
Eros Eduardo Stein
Técnico de Informática / Em breve analista.
USE >> http://www.ekaaty.org
http://www.erosstein.info

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

<>

[android-beginners] Re: Developing barcode Application

2009-09-28 Thread niksbin

Hi,

Try this link:

http://scan.jsharkey.org/

Sincerely,
Nikhil

On Sep 27, 5:16 am, Rana  wrote:
> Dear, I want to develop a barcode application. How i start? If I get
> some instruction then it will be easy to me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Playing video in Android not showing the video, playing sound only with a still image

2009-09-28 Thread shobhit kasliwal
Hi mark

I tried the DemoApi's that come's with the sdk but still no luck.
I am still getting a still image with audio if I try to run teh Wmv file and
for 3gp and mp4 I am not getting anything.
I am not geting what the problem is...??
Can you help me


Thanks

On Mon, Sep 28, 2009 at 8:46 AM, Mark Murphy wrote:

>
> Shobhit Kasliwal wrote:
> > Hi
> > I am new to android.
> > I am creating an application to run the video file.
> > The application is running fine but the only problem I am getting
> > is ...it is playing the sound with an image instead of complete
> > video.
> > Can anybody help me on this...
>
> I would start with sample code and a sample file that works, then go
> from there.
>
> Besides the ones in the ApiDemos in your SDK, here are two other sample
> apps:
>
> http://github.com/commonsguy/cw-advandroid/tree/master/Media/Video/
> http://github.com/commonsguy/vidtry
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Development Wiki: http://wiki.andmob.org
>
> >
>


-- 
Shobhit Kasliwal
Application Developer Intern
Liventus Designs
3400 Dundee Rd Northbrook IL 60062
skasli...@liventus.com
office: 847-291-1395 ext. 192
Cell: (309) 826 4709

Jonathan Swift
- "May you live every day of your life."

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



[android-beginners] Re: remote app commands sent via http

2009-09-28 Thread HTN

The code worked perfectly. Thanks for the help.

On Sep 27, 2:46 pm, Jeffrey Blattman 
wrote:
> no, there's a default read timeout. the only thing i noticed wrong was
> that you were writing to URL itself to the stream.
>
> On 9/27/09 11:42 AM, HTN wrote:
>
>
>
>
>
> > Seems like I was on the right track as I had url.openconnection. Is
> > the ReadTimout portion what I was doing wrong?
>
> > I'll try the code out when I get back home tomorrow. Thanks for the
> > help.
>
> > On Sep 27, 2:21 pm, Jeffrey Blattman
> > wrote:
>
> >> nah. first, he said that the endpoint wants GET params, and you are
> >> opening with POST method below. you don't need to write data to the
> >> stream. the data is passed to the endpoint as GET params.
>
> >> if you just want to pass the get params, it's enough to just call
> >> openConnection(). depending on how the endpoint returns a response, you
> >> can check the response code with getResponseCode(), or you can read a
> >> data response (XML, JSON, etc) by calling getInputStream(). here's the
> >> simplest case,
>
> >>               URL url = new URL(urlString);
> >>               HttpURLConnection uc = (HttpURLConnection)
> >> url.openConnection();
> >>               uc.setReadTimeout(30 * 1000); // 30 seconds
>
> >>               if (uc.getResponseCode() != 200) {
> >>                   //TODO: handle error and return
> >>               }
>
> >>               reader = new BufferedReader(new
> >> InputStreamReader(uc.getInputStream(), "ISO-8859-1"), 8192);
> >>               while ((line = reader.readLine()) != null) {
> >>                   result.append(line);
> >>                   result.append('\n');
> >>               }
>
> >>               // result data is in "result"
>
> >> On 9/27/09 11:07 AM, Alok Kulkarni wrote:
>
> >>> This works
> >>> URL url = new URL(serverURL);
>
> >>>              // open the conncetion
> >>>              HttpURLConnection connection =
> >>> (HttpURLConnection)url.openConnection();
>
> >>>              // Let the run-time system (RTS) know that we want input.
> >>>              connection.setDoInput(true);
> >>>              // Let the RTS know that we want to do output
> >>>              connection.setDoOutput(true);
> >>>              // No caching, we want the real thing
> >>>              connection.setUseCaches(false);
> >>>              // set the content type property
> >>>              connection.setRequestProperty("Content-type",strContenttype);
>
> >>>              // set request method
> >>>              connection.setRequestMethod("POST");
> >>>              // create the post body to send
> >>>              String content = credDevPair.toString();
> >>>              Log.i("Request ... ",content);
> >>>              DataOutputStream printout = new DataOutputStream (
> >>> connection.getOutputStream () );
>
> >>>              // send the data
> >>>              printout.writeBytes(content);
> >>>              printout.flush();
> >>>              printout.close();
>
> >>> On Sun, Sep 27, 2009 at 11:25 PM, HTN >>> >  wrote:
>
> >>>      It's through GET parameters. I can type in the following command in a
> >>>      browser's URL box and it works:
> >>>    
> >>> http://192.168.0.12/output_format=xml&DeviceNum=13&action=SetTarget&n...
> >>>      
> >>> 
>
> >>>      I'm used to sending commands through TCP sockets so I'm sure what's
> >>>      the best way to send a URL command. I'm guessing the "opening" a URL
> >>>      part isn't adequate.
>
> >>>      On Sep 26, 8:49 pm, Jeffrey Blattman >>>      >
> >>>      wrote:
> >>>      >  you are opening a URL, then writing that URL to the stream you
> >>>      open at
> >>>      >  the URL. that's probably not what you wanted. what's the URL,
> >>>      and what
> >>>      >  is the "command" you are trying to pass? how does the endpoint
> >>>      accept
> >>>      >  the command? by reading POST data? through GET parameters?
>
> >>>      >  On 9/25/09 7:31 PM, HTN wrote:
>
> >>>      >  >  I'm developing a remote app that sends commands via http.
> >>>      Normally I
> >>>      >  >  type in a link in a browser and the command will work. With
> >>>      Android, I
> >>>      >  >  would like it to work with a press of a button. I tried the
> >>>      following
> >>>      >  >  code and it didn’t work:
>
> >>>      >  >               URL url = new URL(urlString);
>
> >>>      >  >                URLConnection connection = url.openConnection();
> >>>      >  >                connection.setDoOutput(true);
>
> >>>      >  >                OutputStreamWriter out = new OutputStreamWriter
> >>>      >  >  (connection.getOutputStream());
> >>>      >  >              out.write(urlString);
> >>>      >  >              out.close();
>
> >>>      >  >  "urlstring" is the http command link.
>
> >>>      >  >  Any ideas? Am I on the wrong track? I'm confu

[android-beginners] Re: real-time audio transfer over Wi-Fi

2009-09-28 Thread kevin j

This is helpful. I wouldn't call what I'm doing Voip, though it is
similar. Without going through the Internet, I want to send audio or
data to a nearby Wi-Fi enabled PC. I don't need to mix the two,
because I'm only sending one type at a time. Would the SDK Voip
services still apply to this situation, ie, will the SDK support this
type of Voip?


On Sep 21, 12:39 pm, "Roman ( T-Mobile USA)"  wrote:
> Android gives you the support to doreal timeaudio (Voip) on SDK
> level.
>
> As a good example check out the app SipDroid. If you mix Voip traffic
> with data traffic,
> you might get a different audio quality overWifi. The reason is that
> normal data traffic has different traffic characteristics then Voip
> overWifi.
>
> You will find research papers on this topic which talk about mixing
> different traffic types on aWifinetwork.
>
> --
> Roman Baumgaertner
> Sr. SW Engineer-OSDC
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Sep 20, 7:14 pm, kevin j  wrote:
>
>
>
> > I would like to know if the following application is possible given
> > the currently available tools and OS services. I want to send audio
> > from the microphone inreal-timeover Wi-Fi to a Windows desktop
> > application. I also want to send data which represents what screen
> > icons have been tapped. I want to receive audio and data the same way
> > - using Wi-Fi.
>
> > Sincerely,
>
> > Kevin J- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: HTC Hero

2009-09-28 Thread Chi Kit Leung
They are using same version of Android and even the hardware specifications
are similar identical.
Only it has SenseUI in front end.
I don't think there will be any different between those two phones

On Tue, Sep 29, 2009 at 9:22 AM, Eros Stein  wrote:

> Thank you all for the infos.
>
> Best regards.
>
> On Mon, Sep 28, 2009 at 5:05 PM, Jeffrey Blattman <
> jeffrey.blatt...@gmail.com> wrote:
>
>> yes. my understanding is that the motorola cliq is doing something
>> similar  ... android, but with an altered front end. it sent a chill down my
>> spine. IMHO, these companies should be putting effort into android to
>> improve its theme mechanism until it can cover their needs. then we should
>> be able to install the hero theme, or the cliq theme on any phone.
>>
>> now, maybe motorola / htc would not license use of the theme on other
>> phones, but it should be possible technically.
>>
>>
>>
>>
>> On 9/28/09 12:40 PM, Jonas Petersson wrote:
>>
>> Jeffrey Blattman wrote:
>>
>>
>> android apps are write once run anywhere (in theory).
>>
>>
>> Technically, yes. However, my experience is that many Hero users expect
>> apps to also LOOK like most of the apps that come with their Hero from
>> the start and since HTC has significantly altered the look&feel an app
>> that looks "normal" on the G1/G2 may very well be considered "ugly" on
>> the Hero.
>>
>> I've had one Hero user rate one of my apps with a single star just
>> because of this (even though he claimed the app did everything he
>> expected). Sure, I could dismiss this user as ignorant, but don't we all
>> hope that every single noob should own an android? As Hero is the most
>> common android around here, I decided to alter the way my app looks.
>> Ideally there should be a way to skin all apps the same, but alas it is
>> not there yet. Maybe we can hope for 2.0?
>>
>>  Best / Jonas
>>
>>
>>
>> On 9/28/09 12:16 PM, Eros Stein wrote:
>>
>>
>> Hi everyone.
>> Does anyone know if there are differences between the G2 and Hero.
>> Software differences.
>> Will the app I wrote for G2 work the same way on a Hero?
>>
>>
>>
>> --
>>
>
>
>
> --
> Eros Eduardo Stein
> Técnico de Informática / Em breve analista.
> USE >> http://www.ekaaty.org
> http://www.erosstein.info
>
> >
>


-- 
Regards,
Michael Leung
http://www.itblogs.info
http://www.michaelleung.info

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

<>