[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: How to build EditText view like that in Android Market where "X" button appears for clearing text?

2009-09-27 Thread Jack Ha

Try:

Drawable x = getResources().getDrawable(R.drawable.x);
x.setBounds(0, 0, x.getIntrinsicWidth(), x.getIntrinsicHeight());
mEditText.setCompoundDrawables(null, null, x, null);


--
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 27, 7:20 am, mjc147  wrote:
> I want to build a very simple view which looks exactly like the top
> section of the Android Market search activity (i.e. search EditText
> view and search button). Ideally I'd like it to look EXACTLY the same.
> Maybe there is some layout XML and/or code I can reuse?
>
> Writing it fresh is also fine but I am not clear how to get the "X"
> button (which appears inside the EditText view when the user enters
> some text) functionality. That's there to allow the user to quickly
> clear the text.
>
> Any tips?
--~--~-~--~~~---~--~~
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: sendBroadcast compile error

2009-09-17 Thread Jack Ha

sendBroadcast() is part of the Context class.

--
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, 12:11 am, Tim  wrote:
> Im really new to android development (and java in general), and I seem
> to have run into a design issue.
>
> Background:
>   Im working on an application that automatically turns the speaker
> phone on when you are on a call and lay the phone down on a flat
> surface.
>   Since this is my first real android app, I am building it as I
> learn.  Right now it isn't even running as a service.
>   I have broken the app down so far, into an activity, a phone state
> listener, and a sensor listener.  From the phone state listener, I am
> trying to send the sensor listener a notification that the phone is
> active (thus if the sensor listener detects it is lying flat then it
> should turn on the speaker phone).
>
> But I get an error when I try to compile my code
>
> Code Snippet:
> package org.pythonistas.AutoConference;
>
> import android.telephony.PhoneStateListener;
> import android.telephony.TelephonyManager;
> import android.content.Intent;
> import android.content.Context;
>
> public class PhoneListener extends PhoneStateListener {
>     protected static final String CALL_STATE_CHANGE =
> "org.pythonistas.AutoConference.intent.action.CALL_STATE_CHANGE";
>     protected static final String CALL_STATE_EXTRA = "callState";
>     private Intent intent = new Intent(CALL_STATE_CHANGE);
>     private Leveler myLevel = null;
>     private CallReceiver myReceiver = null;
>     public PhoneListener(){
>         myLevel = new Leveler();
>         myReceiver = new CallReceiver(myLevel);
>     }
>
>     public void onCallStateChanged(int state, String incomingNumber)
>     {
>         super.onCallStateChanged(state, incomingNumber);
>
>         switch(state)
>             {
>             case TelephonyManager.CALL_STATE_IDLE:
>                 intent.putExtra(CALL_STATE_EXTRA,false);
>                 sendBroadcast(intent);
>                 break;
>             case TelephonyManager.CALL_STATE_OFFHOOK:
>                 intent.putExtra(CALL_STATE_EXTRA,true);
>                 sendBroadcast(intent);
>                 break;
>             }
>     }
>
> }
>
> Compile Error:
>     [javac] Compiling 3 source files to /Users/SourceCode/android/
> projects/AutoConference/bin/classes
>     [javac] /Users/SourceCode/android/projects/AutoConference/src/org/
> pythonistas/AutoConference/PhoneListener.java:27: cannot find symbol
>     [javac] symbol  : method sendBroadcast(android.content.Intent)
>     [javac] location: class
> org.pythonistas.AutoConference.PhoneListener
>     [javac]             sendBroadcast(intent);
>     [javac]                 ^
>     [javac] /Users/SourceCode/android/projects/AutoConference/src/org/
> pythonistas/AutoConference/PhoneListener.java:31: cannot find symbol
>     [javac] symbol  : method sendBroadcast(android.content.Intent)
>     [javac] location: class
> org.pythonistas.AutoConference.PhoneListener
>     [javac]             sendBroadcast(intent);
>     [javac]                 ^
>     [javac] 2 errors
>
> Any help and/or guidance would be greatly appreciated.  I have also
> posted my code on git  (http://github.com/tedwards/AutoConference )
--~--~-~--~~~---~--~~
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: Which version of Android?

2009-09-17 Thread Jack Ha

Eclipse 3.5 (Galileo) should work but you can download Eclipse 3.4
(Ganymede) from here:

http://www.eclipse.org/downloads/packages/release/ganymede/sr2

--
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 15, 11:28 am, oregonduckman  wrote:
> The 1.5 installation notes refer to Eclipse 3.3 (Europa) or Eclipse
> 3.4 (Ganymede). When I looked on Eclipse website I could not find a
> reference to either version, can someone point me to the correct
> version of Eclipse that will work with the 1.5 SDK?
>
> 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: Android application enable handset

2009-09-16 Thread Jack Ha

http://en.wikipedia.org/wiki/Android_(operating_system)#Hardware_products_running_Android

--
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, 3:10 am, Ajaz Ahmed  wrote:
> Hi,
>
> Can any one send me the list of android application enable handset, where i
> can install my android application?
> want to know about company,model  ??
>
> Regards!
--~--~-~--~~~---~--~~
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 Emulator suddenly won't boot...

2009-09-16 Thread Jack Ha

Have you looked at the "adb logcat" output?

--
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, 5:10 am, furby  wrote:
> I had the 1.5 android emulator starting from Eclipse perfectly
> nicely until yesterday when it suddenly won't finish booting. I
> haven't installed anything new (Running it on Windows Vista - i know,
> uck, but I'm waiting for Win 7 to hurry up), haven't even changed the
> java code I am trying to run...
>
> The emulator starts up, get's to the point where it shows "Android"
> with the nice lighting effect that goes from left to right over it and
> then just stays in that state. Last night I tested it by starting it
> up, going out to the living room, watching two hour long episodes of
> the first series of Doctor Who, and then coming back in (Essentially
> giving it 1.5 hours to do it's stuff) - it was still stuck in that
> state
>
> Any ideas what I did wrong?
--~--~-~--~~~---~--~~
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 in Eclipse - package name problem - please help

2009-09-16 Thread Jack Ha

It seems likes your AndroidManifest.xml file is corrupted. Make sure
there are no spaces before this line:



--
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, 6:31 am, Mimi  wrote:
> Thank you so much for your response and info, Raphael.
>
> How can I change the Navigotor view to Java namespaces?
>
> Under the package explorer, View Menu/Package Presentation, I changed
> the selection from flat to hierarchical and the reverse. It did not
> have an impact on the presenation of "com.mimi.App". It is still
> hierarchical. Other projects in the same workspace all displayed
> 'flat' when it comes to "com.mimi.App" and were not affected by the
> changtes of the selection either.
>
> The parse error that I am having on my Manifest file is:
>
> [2009-09-15 17:11:49 -
> com.android.ide.eclipse.common.project.AndroidManifestParser] Parser
> exception for /Simple Flashlight/AndroidManifest.xml: The processing
> instruction target matching "[xX][mM][lL]" is not allowed.
>
> I think I did move this whole Project folder from one dir to another
> when I was organizing my folders. If that is the culprit, I donnot
> know why that is and how to fix it.
>
> Any ideas on my error above? Tips, hints and suggestions would be
> greatly appreciated.
>
> Many Thanks...Mimi
>
> On Sep 15, 7:46 pm, Raphael  wrote:
>
> > First check that you're not using the Navigator view instead (which
> > shows files, not Java namespaces).
>
> > In the package explorer, click on the "View Menu" (a little triangle
> > just above the scrollbar in the explorer view. Select Package
> > Presentation and change it from flat to hierarchical, or the reverse.
>
> > R/
>
> > On Tue, Sep 15, 2009 at 4:06 PM, Mimi  wrote:
>
> > > As I was coding, building and testing my Android App merrily along, it
> > > seemed all of a sudden, the parsing/compile failed. Error is on the
> > > Manifest complaining that a file could not be found in the package
> > > "mimi.package.newApp".
>
> > > What I found out under the Ecplise Explorer was that the
> > > "com.mimi.package" package name was no longer a string but got
> > > fragmented as folders i.e. "src/com/mimi/package". Same with "gen/com/
> > > mimi/package".
>
> > > I must have done something unintentionally to cause this but what is
> > > it? Any ideas and suggestions would be greatly appreciated.
>
> > > Many Thanks...Mimi
>
>
--~--~-~--~~~---~--~~
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-16 Thread Jack Ha

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] Re: MediaPlayer pause and seek

2009-09-15 Thread Jack Ha

seekTo() is an asynchronuous call and the actual seek operation may
take a while to finish. If an OnSeekCompleteListener has been
registered beforehand via setOnSeekCompleteListener
(OnSeekCompleteListener), it will get called.

--
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 15, 4:01 am, manigault  wrote:
> Hi i want to be able to pause the MediaPlayer and then seek to given
> position.
> I do the following : mPlayer.pause() - > mPlayer.seekTo(myPosition); -> 
> mPlayer.start();but the player start playing from the position the
>
> pause was called;
> Can i use seekTo after when i paused the player ?
--~--~-~--~~~---~--~~
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 change text in a Button

2009-09-15 Thread Jack Ha

Please refer to the Android Developer Guide.

button.setText()

--
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 15, 9:34 am, cellurl  wrote:
> Hi,
>
> On the fly, I want to change the text shown in a Button.
>
> Q: How do I do that.
>
> My teacher held me back a year from Android school ;-)
> (newbie again)
> jim
--~--~-~--~~~---~--~~
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 add my own menu item into the already existing menu in the sms application

2009-09-15 Thread Jack Ha

Here is an example and you probably can make it to work with SMS.

http://www.anddev.org/viewtopic.php?p=25639

--
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 15, 5:13 am, Oskar  wrote:
> Hi,
>
> I would like to add my own menu item into the already existing menu in
> the sms application.
>
> E.g when the user is reading a sms and highlights an attached link to
> a web page and pressing menu. Is it then possible for me to add my own
> menu item in this already existing menu. I would like to use the
> attached link and send it to my application when selecting my menu
> item from the already existing SMS menu.
>
> I would appreciate very much if someone could give me some hints
> regarding what I need and how to get started. Maybe such things are
> described somewhere?
>
> 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: MapView : Don't show the labels

2009-09-12 Thread Jack Ha

It is currently not supported.

--
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 10, 4:59 am, waterbed  wrote:
> Hello,
>
> In Google maps the user can remove the labels (I mean street and town
> names), when he chooses the satellite view.
> I would like to do the same thing with a MapView object in Android,
> but I don't find a setter like setShowLabel(boolean).
>
> Could anyone help me to do this?
>
> Best regards.
>
> Thomas
--~--~-~--~~~---~--~~
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: ADT Plugin for Eclipse

2009-09-12 Thread Jack Ha

What did you see on the right pane when you clicked on Eclipse-
>Preferences->Android?

--
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 10, 10:00 pm, David Kebo  wrote:
> I run snow leopard ans installed Eclipse + the ADT Plugin for Eclipse.
> When I try to create a new project in Eclipse in shows "the location
> of the android sdk has not been setup".
> I go to the Eclipe > Preferences tab > Android, but I cannot find the
> SDK location.
>
> Any help please ?
--~--~-~--~~~---~--~~
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: Populate spinner

2009-09-12 Thread Jack Ha

You need to use an adapter to provide the data for the spinner. You
will get an UnsupportedOperationException exception if you call
Spinner.addView().

--
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 Aug 13, 12:47 pm, "tinyang"  wrote:
> Here is a webpage with a menu.add() 
> example:http://www.brighthub.com/mobile/google-android/articles/28673.aspx
>
> This example is what I am referring to with menu.add().
>
> -Original Message-
> From: android-beginners@googlegroups.com 
> [mailto:android-beginn...@googlegroups.com] On Behalf Of Jack Ha
> Sent: Thursday, August 13, 2009 2:32 PM
> To: Android Beginners
> Subject: [android-beginners] Re: Populate spinner
>
> Can you be more specific on what you mean "menu.add()"?
>
> --
> Jack Ha
> Open Source Development Center
> ・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 Aug 13, 11:55 am, "tinyang"  wrote:
> > Is the only way to populate a spinner to use an array, or can
> > something like the menu.add() be used?
>
> > --
> > :-)
>
> > P Please don't print this e-mail unless you really need to.
>
> No virus found in this incoming message.
> Checked by AVG -http://www.avg.com
> Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 8/12/2009 
> 6:12 PM
--~--~-~--~~~---~--~~
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 receive general IO events ?

2009-09-12 Thread Jack Ha

Maybe FileObserver is what you are looking for:

http://developer.android.com/reference/android/os/FileObserver.html

--
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 10, 11:26 am, daemonserj  wrote:
> Hello All!
> Is it possible to be notified about general IO in system ?
> For example I want to receive some file reading events and blinking
> with some indicator...
--~--~-~--~~~---~--~~
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: Basic App -- not working

2009-09-12 Thread Jack Ha

You must specify the layout_width and layout_height attributes for the
EditText.

android:layout_width="fill_parent"
android:layout_height="wrap_content"
--
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 11, 9:03 am, Felix Oghina  wrote:
> I went through the NotePad tutorials and got the minimum hang of it.
> Unfortunately, when I tried creating my own application, I failed.
> Here's my main class file:
>
> package com.tastekid.TasteKid;
>
> import android.app.Activity;
> import android.os.Bundle;
>
> public class TasteKid extends Activity {
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>     }
>
> }
>
> Here's main.xml:
>
> 
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     >
>                          android:id="@+id/search_input"
>         />
> 
>
> When I try to start the app on the emulator I get an "The application
> TasteKid (process com.tastekid.TasteKid) has stopped unexpectedly.
> Please try again." with a "Force close" button. I have absolutely no
> idea what I am doing wrong :-(
--~--~-~--~~~---~--~~
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: ColorStateList creation

2009-09-12 Thread Jack Ha

You can do something like:

XmlResourceParser xpp=Resources.getSystem().getXml
(R.color.mycolor);
ColorStateList csl = ColorStateList.createFromXml(getResources(),
xpp);

where R.color.mycolor is your XML resource file.

--
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 12, 4:21 am, manigault  wrote:
> I want to create color state list from xml file containing a selector.
> From the documentation its seems that i have to use static
> ColorStateList createFromXml(Resources r, XmlPullParser parser) but i
> can't figure out what parameters to pass. I guess i can use :
> XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
> XmlPullParser parser = factory.newPullParser();
> to obtain the parser but what about the xml file that i want to parse.
> 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: Security framework available on android??

2009-09-10 Thread Jack Ha

Assuming this is what you are looking for:

http://developer.android.com/guide/topics/security/security.html

--
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 9, 9:46 pm, Sudeep Jha  wrote:
> Which security framework is available or can be ported to
> android ?
>
> Warm Regards,
> Sudeep
--~--~-~--~~~---~--~~
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: error in installing .apk file

2009-09-10 Thread Jack Ha

You don't need to specify "file://"

new File("/sdcard/DCIM/Opi.apk")

--
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 10, 1:00 am, Mahsa M  wrote:
> Hi all
> I have a code to install one apk file in my sdcard,
>
>         Intent intent = new Intent(Intent.ACTION_VIEW);
>         Log.e("test","test");
>         intent.setDataAndType(Uri.fromFile(new
> File("file:///sdcard/DCIM/Opi.apk")),
> "application/vnd.android.package-archive");
>         Log.e("test2","test2");
>         startActivity(intent);
>
> but I got the error on emulator that say parser can not pars your data,I was
> wondering if any body can help me,
>
> thanks,
> Mahsa
--~--~-~--~~~---~--~~
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: Spinners

2009-09-10 Thread Jack Ha

Remove the following line:

testSpinner.setBackgroundColor(Color.BLUE);

--
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 9, 2:19 am, EverettG  wrote:
> I am creating a Spinner but when it displays in the Emulator it does
> not display any sort of arrow to let the user know to click on it. If
> you click on it, it works properly and you can choose from the items.
> I have looked through Internet resources and three books but cannot
> seem to find an answer to this. Here are my files:
> spinner.xml:
> 
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     >
>            android:id="@+id/testSpinner"
>       android:layout_width="fill_parent"
>       android:layout_height="wrap_content"
>       android:drawSelectorOnTop="true"
>     />
>            android:id="@+id/enableToggleButton"
>       android:layout_width="fill_parent"
>       android:layout_height="wrap_content"
>       android:text="Set enable toggle"
>     />
>            android:id="@+id/changeColorButton"
>       android:layout_width="fill_parent"
>       android:layout_height="wrap_content"
>       android:text="Change Spinner Background Color"
>     />
> 
>
> arrays.xml
> 
> 
>   
>     Jan
>     Feb
>     Mar
>     Apr
>     May
>     Jun
>     Jul
>     Aug
>     Sep
>     Oct
>     Nov
>     Dec
>   
> 
>
> TestSpinner.java
> package com.aapg.AndroidViews;
>
> import android.app.Activity;
> import android.graphics.Color;
> import android.os.Bundle;
> import android.view.View;
> import android.widget.ArrayAdapter;
> import android.widget.Button;
> import android.widget.Spinner;
>
> public class TestSpinner extends Activity
> {
>   private int spinnerBackgroundColor = Color.BLUE;
>   //private static final String[] MONTHS = new String[]
>           //
> {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};
>
>   @Override
>   public void onCreate(Bundle savedInstanceState)
>   {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.spinner);
>
>         //Get a reference to the Spinner.
>         final Spinner testSpinner = (Spinner)findViewById(R.id.testSpinner);
>         testSpinner.setBackgroundColor(Color.BLUE);
>         //Set up the ArrayAdapter.
>         //ArrayAdapter arrayAdapter = new ArrayAdapter(this,
>                         //android.R.layout.simple_spinner_item, MONTHS);
>         ArrayAdapter arrayAdapter =
> ArrayAdapter.createFromResource(this,
>                         R.array.months, android.R.layout.simple_spinner_item);
>         //Set up the DropDownViewResource.
>         arrayAdapter.setDropDownViewResource
> (android.R.layout.simple_spinner_dropdown_item);
>         //Attach the Spinner to the ArrayAdapter.
>         testSpinner.setAdapter(arrayAdapter);
>
>         final Button enableToggleButton = (Button)findViewById
> (R.id.enableToggleButton);
>         enableToggleButton.setOnClickListener(new Button.OnClickListener()
>         {
>           public void onClick(View v)
>           {
>                 changeEnabled(testSpinner);
>           }//onClick().
>         });//Button.setOnClickListener().
>
>         final Button changeColorButton = (Button)findViewById
> (R.id.changeColorButton);
>         changeColorButton.setOnClickListener(new Button.OnClickListener()
>         {
>           public void onClick(View v)
>           {
>                 changeSpinnerBackgroundColor(testSpinner);
>           }//onClick().
>         });//Button.setOnClickListener().
>   }//onCreate().
>
>   public void changeEnabled(Spinner testSpinner)
>   {
>         if(testSpinner.isEnabled())
>         {
>       testSpinner.setEnabled(false);
>         }//if(testSpinner.isEnabled()).
>         else
>         {
>       testSpinner.setEnabled(true);
>         }//else.
>   }//changeEnabled(Spinner testSpinner2).
>
>   public void changeSpinnerBackgroundColor(Spinner testSpinner)
>   {
>         if(spinnerBackgroundColor == Color.BLUE)
>         {
>           testS

[android-beginners] Re: Streched Spinner

2009-09-04 Thread Jack Ha

Try:

SpinnerAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_item, cities);
adapter.setDropDownViewResource
(android.R.layout.simple_spinner_dropdown_item);


--
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 4, 3:55 pm, AlexDemers  wrote:
> Hi, I have 3 spinners: 2 using a strings.xml and the third one is
> binded with a SpinnerAdapter:
>
> SpinnerAdapter adapter = new ArrayAdapter(this,
> android.R.layout.simple_spinner_dropdown_item, cities);
> spinner.setAdapter(adapter);
>
> For some odd reason, I get a streched spinner and a radio button
> inside the box:http://imgur.com/eRdek.png
>
> I tried changing to simple_spinner_dropdown_item to
> simple_spinner_item but when I see the list of selectable values, each
> of them is really thin and hard to chose with the 
> finger:http://imgur.com/7I05G.png
>
> How can I correct this behaviour?
--~--~-~--~~~---~--~~
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: easy stuff please reply

2009-09-03 Thread Jack Ha

Have you tried using PrintWriter?

--
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 3, 9:33 pm, kapnk...@gmail.com wrote:
> i checked this but it takes string as a parameter but write as a charactor
> only in the file.so again space is there.
>
> On Thu, Sep 3, 2009 at 7:35 PM, Justin Anderson 
> wrote:
>
> > Why not use one of the methods from OutputStreamWriter that takes a string
> > as a parameter?
> >http://developer.android.com/reference/java/io/OutputStreamWriter.html
>
> > --
> > There are only 10 types of people in the world...
> > Those who know binary and those who don't.
> > --
>
> > On Thu, Sep 3, 2009 at 6:15 AM, kapil.k  wrote:
>
> >> hello guys i am writing the data in text file with help of
>
> >>  fos = new FileOutputStream(file);
> >>               out1 =new OutputStreamWriter(fos);
> >>               out=new DataOutputStream(fos);
> >>               String Dpass = new String ("1008");
>
> >>               out.writeChars(Dpass);
>
> >> but in file due to char it is leaving space after each charactor.so
> >> how should i store so the will be no sapce.
>
> >> also which api should i used to delete containt of the file?
>
> >> thank you
>
>
--~--~-~--~~~---~--~~
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 export data to excel?

2009-09-01 Thread Jack Ha

You can query the data from the database and then write the data into
a CSV file.

--
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 Aug 31, 11:13 pm, JUN  wrote:
> Hello all,
>
>   I want to export sqlite data to excel format in android? how to do
> it? 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: Map view

2009-09-01 Thread Jack Ha

Take a look at some of the Map tutorials here:

http://www.anddev.org/viewforum.php?f=18

--
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 1, 3:49 am, Sasi Kumar  wrote:
> Can any one help to create map view with a marker.
>
> When we are clicking marker it should display info window.
>
> By clicking that info window it shoul goto another layout.
>
> Ple. reply me.
>
> 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: Sdcard error

2009-09-01 Thread Jack Ha

Did you run the emulator?

--
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 1, 12:51 am, Alok  wrote:
> Hi guys,
> I created an SDCARD using command
> mksdcard 2048M sdcard
> This created an SDCARD in the tools directory
> Now when i tried to add an MP# file to it
> adb push "D:\..\abc.mp3" /sdcard
> It gives error
> error: device not found
> What am i missing ??
> Thanks ,
> 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: sdk help

2009-08-31 Thread Jack Ha

Android API reference is located here:

   /docs/reference/packages.html

Also check out the Developer Guide:

   /docs/guide/index.html

where  is the directory where you installed the Android
SDK.

They are also available online:

http://developer.android.com/index.html

--
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 Aug 30, 10:18 pm, "kapil.k"  wrote:
> hello ,
> i will sound very basic but i really dont know.where do we see the
> android sdk help about its all classes n api n its sample
> application.i installed it on xp but i doesnt found any in my android
> folder.looking forward to your reply
--~--~-~--~~~---~--~~
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: App just for Android beginners

2009-08-26 Thread Jack Ha

Useful app...Thanks!

--
Jack Ha
Open Source Development Center
・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 Aug 21, 12:47 pm, Andrei  wrote:
> Guys,
>
> I wrote app for Android phone that can help you to learn Android /
> plan your next App.
> It is FREE and searchable app for all Android API documentation.
> It works off-line, no need for connection.
> Give it a try.
> Search for DroiDoc on Market on your phone
> 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: failed to locate packages - Eclipse IDE

2009-08-26 Thread Jack Ha

In Eclipse, go to your project properties and select Java Build Path.
Then select the Libraries tab and you can add your external jar file
there.

--
Jack Ha
Open Source Development Center
・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 Aug 26, 1:47 am, Belik77  wrote:
> Hi,
>
> I am developing an application and i have importaed a JAVA file that
> uses several packages that my Eclipse does not recognize:
>
> import javax.xml.transform.*;
> import javax.xml.transform.stream.StreamResult;
> import javax.xml.transform.dom.DOMSource;
>
> this is the code, that is not compiled:
> //Transform and write the Document to the stream
>             TransformerFactory tf = TransformerFactory.newInstance();
>             Transformer tr = tf.newTransformer();
>             Source input = new DOMSource(xmlDoc);
>             Result output = new StreamResult(out);
>             tr.transform(input, output);
>             out.flush();
>             out.close();
>
> what should i need to install and how, so my SDK will be compatible?
>
> Thanks allot for your help.
> Eli.
--~--~-~--~~~---~--~~
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: Add one butten in a tab

2009-08-26 Thread Jack Ha

Take a look at this link:

http://jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/

--
Jack Ha
Open Source Development Center
・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 Aug 25, 3:39 am, Chri  wrote:
> hi!
>
> I just started with android and now i have a problem!
> I want to add a button in a tab. In time I just can show text and i don
> ´t know how i add this button!
>
> my code is:
> in the .xml file:
>
> 
> http://schemas.android.com/apk/res/android";
>     android:id="@android:id/tabhost"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     >
>              android:orientation="vertical"
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent">
>                      android:id="@android:id/tabs"
>             android:layout_width="fill_parent"
>             android:layout_height="wrap_content" />
>                      android:id="@android:id/tabcontent"
>             android:layout_width="fill_parent"
>             android:layout_height="fill_parent">
>                              android:id="@+id/textview1"
>                 android:layout_width="fill_parent"
>                 android:layout_height="fill_parent"
>                 android:text="Tickets" />
>                              android:id="@+id/textview2"
>                 android:layout_width="fill_parent"
>                 android:layout_height="fill_parent"
>                 android:text="Tasks" />
>                              android:id="@+id/textview3"
>                 android:layout_width="fill_parent"
>                 android:layout_height="fill_parent"
>                 android:text="Settings" />
>         
>     
> 
>
> and my .java file:
>
> package com.example.workingcodes;
>
> import android.app.TabActivity;
> import android.os.Bundle;
> import android.widget.TabHost;
>
> public class WorkingCodes extends TabActivity {
>     /** Called when the activity is first created. */
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>
>         TabHost mTabHost = getTabHost();
>
>         mTabHost.addTab(mTabHost.newTabSpec("tab_test1").setIndicator
> ("Tickets").setContent(R.id.textview1));
>         mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator
> ("Tasks").setContent(R.id.textview2));
>         mTabHost.addTab(mTabHost.newTabSpec("tab_test3").setIndicator
> ("Settings").setContent(R.id.textview3));
>
>         mTabHost.setCurrentTab(2);
>
>     }
>
> }
>
> I want a button in the third tab! How i do this?! plz help!
>
> wkr chri
--~--~-~--~~~---~--~~
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: installing the android sdk

2009-08-24 Thread Jack Ha

The WST plugin should already be included in most Eclipse IDE
packages.

--
Jack Ha
Open Source Development Center
・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 Aug 22, 9:31 am, nmharleyrider  wrote:
> In the instructions for installing Eclipse 3.4 ganymede and the
> android sdk , it is stated in step 6 that you need the WST plugin
> mentioned earlier in this page.  Yet I have searched for an hour
> including all the links in this section and cannot find any reference
> regarding how to install the WST plugin.   Help please, and thanks in
> advance.
> nmharleyrider
--~--~-~--~~~---~--~~
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: Flash based games on Android

2009-08-21 Thread Jack Ha

The following links should help you get started on game development:

Getting Started in Android Game Development
http://www.rbgrn.net/content/54-getting-started-android-game-development

Writing Real-Time Games for Android
http://code.google.com/events/io/sessions/WritingRealTimeGamesAndroid.html

--
Jack Ha
Open Source Development Center
・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 Aug 21, 6:45 am, Maxood  wrote:
> I want to develop and application that will be a clone of flash based
> online game. I need to know what resources would i require as a
> beginner. I like to start off with small games. Please let let me know
> about tutorials, articles, books, etc.
>
> Thanks,
> Maxood
--~--~-~--~~~---~--~~
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: Flash based games on Android

2009-08-21 Thread Jack Ha

The Android SDK doesn't support Flash yet.

--
Jack Ha
Open Source Development Center
・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 Aug 21, 6:49 am, Maxood  wrote:
> Please also tell me how can i integrate a flash app on android. Can i
> do that in the first place. I have also come to know that android
> supports flash 10.
>
> On Aug 21, 6:45 pm, Maxood  wrote:
>
> > I want to develop and application that will be a clone of flash based
> > online game. I need to know what resources would i require as a
> > beginner. I like to start off with small games. Please let let me know
> > about tutorials, articles, books, etc.
>
> > Thanks,
> > Maxood
>
>
--~--~-~--~~~---~--~~
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 runnin Hello World Programme

2009-08-19 Thread Jack Ha

It seems like you are running your program as Android JUnit Test as
opposed to Android Application.

--
Jack Ha
Open Source Development Center
・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 Aug 19, 11:43 am, kapil  wrote:
>  hi there, i m trying to run " Hello World " programme , problem i am
> facing is the following error when i run the programme :
> " ERROR: Application does not specify a
> android.test.InstrumentationTestRunner instrumentation or does not
> declare uses-library android.test.runner "
>
> before this it was givin java nullpointerexception error . i've just
> formatted my mashine n b4 formatting i was not havin any problem in
> runnin the programme.
>
> Thanks in advance,
> Kapil
--~--~-~--~~~---~--~~
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: Comparing different dates

2009-08-19 Thread Jack Ha

The year specified in setYear() should be the year since 1900. That
said, it should be 109 (2009-1900) instead of 2009.

--
Jack Ha
Open Source Development Center
・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 Aug 18, 5:01 pm, Stephen Lebed  wrote:
> How would I compare the current date against a date I've set to
> determine if today is before or after the set date?
>
> I've tried the following, but its not working
>
> Date endTime;
> {
> endTime = new Date();
> endTime.setMonth(11);
> endTime.setYear(2009);
>
> }
>
> Date trialTime;
> {
> trialTime = new Date();
> trialTime.getMonth();
> trialTime.getYear();
>
> }
>
> boolean test = endTime.before(trialTime);
>
> Any help is greatly appreciated.
--~--~-~--~~~---~--~~
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: Delete Note does not work in the Notepadv2 example

2009-08-19 Thread Jack Ha

onCreateContextMenu() is being used for performing a "long-
clicked" (at least 2 seconds) on the item.

--
Jack Ha
Open Source Development Center
・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 Aug 18, 12:06 am, Belik77  wrote:
> Hi all,
>
> I am new to android developing. I am very pleased with the tutorials
> that google add to the developer site. it is very clear and easy to
> learn.
>
> I am now going trough the Notepad Tutorial and I have problem with the
> second exercise. Notepadv2.
>
> after i have done all the steps, and run the application, i do not see
> the "Delete Note" menu item. I have only the "Add Note" menue item.
> (it does not work even in the Notepadv2Solution project!)
>
> Also, I do not understand why we use the method: "public boolean
> onCreateContextMenu" to add the "Delete Note" menu item whereas we
> used other method to add the "Add Note" menu item.
>
> I have tried to debug the application and noticed that basically the
> application does not enter into the "public boolean
> onCreateContextMenu" method and thus probably, it does not add the
> "Delete Note" menu item.
>
> Thanks allot for your help.
> Eli.
--~--~-~--~~~---~--~~
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: Cannot see my HTC Magic via DDMS to take screenshot

2009-08-19 Thread Jack Ha

Did you install the USB driver?

--
Jack Ha
Open Source Development Center
・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 Aug 19, 7:49 am, kidhermes  wrote:
> Back from holiday. Still not solved... :o(
> Same at home under Vista. And you?
>
> On Jul 31, 7:48 pm, NataliaPC  wrote:
>
> > Hikidhermes
>
> > Have you solved your problem?
> > I've the same issue.
>
>
--~--~-~--~~~---~--~~
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: Populate spinner

2009-08-13 Thread Jack Ha

Can you be more specific on what you mean "menu.add()"?

--
Jack Ha
Open Source Development Center
・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 Aug 13, 11:55 am, "tinyang"  wrote:
> Is the only way to populate a spinner to use an array, or can something like
> the menu.add() be used?
>
> --
> :-)
>
> P Please don't print this e-mail unless you really need to.
--~--~-~--~~~---~--~~
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: Overlay events not go to MapView

2009-08-13 Thread Jack Ha

Are you calling MapView.setOnTouchListener()?

Have you tried extending MapView and overriding onTouchEvent()?

--
Jack Ha
Open Source Development Center
・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 Aug 12, 11:11 pm, ron  wrote:
> Hi,
>
> I have created an Overlay on a MapView and I want that when the "edit"
> mode is on, I can drag stuff on the Overlay but the underlying google
> map will not receive those touch events. How can I do that?
> I tried to create a custom view and override functions like
> dispatchTouchEvent when is in "edit" mode but that will also block
> touch events from going to the Overlay also.. how events are
> dispatched in Android?
>
> thanks.
> Ron
--~--~-~--~~~---~--~~
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: Solution Related to emulator

2009-08-13 Thread Jack Ha

What's the issue? Did you set up the AVD properly?

--
Jack Ha
Open Source Development Center
・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 Aug 12, 11:34 pm, Rauf Ahmad  wrote:
> I have the solution of problem related to android emulator problem.
> "I'm trying to get the HelloAndroid app up and running. I can run the
> emulator from the command line just fine, but there seems to be an
> issue from running it within eclipse when i'm ready to launch my app.
> I tried searching for some of these terms and found no luck, anybody
> else with this issue or some advice? "
>
> The solution is go to "Run Dialogue Box" then "Target" and check the
> "Emulator" as "Manual" and every
>
> when you run the Application the new Emulator will Launched. the
> Problem will Solve
--~--~-~--~~~---~--~~
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 VM for Windows5 Mobile

2009-08-13 Thread Jack Ha

I suggest to ask this question on the android-porting group instead.

--
Jack Ha
Open Source Development Center
・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 Aug 12, 11:41 pm, Rauf Ahmad  wrote:
> plz Tell me that how i can install the Application in Windows5
> mobile
--~--~-~--~~~---~--~~
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: Beginner problem with TabHost

2009-08-13 Thread Jack Ha
Where did it crash? Stack trace?

--
Jack Ha
Open Source Development Center
・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 Aug 13, 7:23 am, Tuftux  wrote:
> Hey guys !
> I'm quite new to Android. I followed the official TabHost tuto but I
> modified the XML template to display a LinearLayout wich contain a
> textView instead of a simple TextView (much easeier to handle when
> there's more than a simple text in a tab). But when I start the
> program it crashes. Here's the XML Layout :
> 
>          xmlns:android="http://schemas.android.com/apk/res/android";
>     android:orientation="vertical"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent" >
>                                          android:orientation="vertical"
>                 android:layout_width="fill_parent"
>                 android:layout_height="fill_parent" >
>                                                          android:id="@android:id/tabs"
>                                 android:layout_width="fill_parent"
>                                 android:layout_height="wrap_content" />
>                                                                                  android:id="@android:id/tabcontent"
>                                         android:layout_width="fill_parent"
>                                         android:layout_height="fill_parent" >
>                                                                                                          
> android:orientation="vertical"
>                                                         android:id="@+id/tab1"
>                                                         
> android:layout_width="fill_parent"
>                                                         
> android:layout_height="fill_parent">
>
>                                                                                                                                        
>   android:src="@drawable/header"
>                                                                               
>   android:layout_width="wrap_content"
>                                                                               
>   android:layout_height="wrap_content" />
>
>                                                                         
>                                                                                
>   android:layout_width="fill_parent"
>                                                                               
>   android:layout_height="wrap_content"
>                                                                               
>   android:text="@string/HelloOuverta"/>
>                                                 
>
>                                                                                                          
> android:orientation="vertical"
>                                                         android:id="@+id/tab2"
>                                                         
> android:layout_width="fill_parent"
>                                                         
> android:layout_height="fill_parent" >
>
>                                                                                                                          
> android:layout_width="fill_parent"
>                                                                 
> android:layout_height="wrap_content"
>                                                                 
> android:text="@string/Idea" />
>
>                                                 
>                                                 
>                 
> 
>
> Many 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: Simple Google Maps App

2009-08-13 Thread Jack Ha

You will find quite a few tutorials at this link as well:

http://www.anddev.org/viewforum.php?f=18

--
Jack Ha
Open Source Development Center
・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 Aug 12, 11:33 pm, Maxood  wrote:
> I like to develop a simple Google maps application.
>
> Please let me know any tutorial available
>
> Thank you,
> Maqsood
--~--~-~--~~~---~--~~
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: Could not find XXXX.apk!

2009-08-13 Thread Jack Ha

Try "Project->Clean..." and make sure "Project->Build Automatically"
is on.

What version of Java are you using?

--
Jack Ha
Open Source Development Center
・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 Aug 13, 12:49 am, Junaid Kirkire  wrote:
> Guys, I am new to Android and I have installed Android SDK
> windows-1.5_r3 and I am using Eclipse Ganymede.  I have also installed
> the ADT plugin through Help-->Software Updates.
>
> I followed the 'Hello World' tutorial and when I run it in Eclipse
> IDE, the following error is generated.
>
> [2009-08-13 13:12:39 - HelloWorld] --
> [2009-08-13 13:12:39 - HelloWorld] Android Launch!
> [2009-08-13 13:12:39 - HelloWorld] adb is running normally.
> [2009-08-13 13:12:39 - HelloWorld] Could not find HelloWorld.apk!
>
> Please help me fix this problem.
>
> 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: Play Audio File (stored in files directory)

2009-08-13 Thread Jack Ha

Use Environment.getExternalStorageDirectory().

--
Jack Ha
Open Source Development Center
・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 Aug 12, 11:45 pm, Ankit Shah  wrote:
> Thanks chinchin.
>
> I would like to to store audio file (wav file) in SD Card programmatic
> (at runtime).
>
> In my application when user clicks on "Download" button it will
> downloads audio file and should stores in SD Card. Right now able to
> download audio file from server and also able to store in files folder
> (i.e "/data/data/com.myapp/files/a.wav") but i would like to store
> this file in SD Card.
>
> Any pointer or help on this would be greatly appreciated.
>
> Thank You.
--~--~-~--~~~---~--~~
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 can I use methods from an activity in other activities

2009-08-12 Thread Jack Ha

As the error indicated, your final htest variable is not initialized.

You probably should move those set* functions into a separate utility
class.

--
Jack Ha
Open Source Development Center
・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 Aug 12, 1:38 am, Hamed3d  wrote:
> Basically, I have two different Activities, one of them has 2 member
> functions which I want to use them in other activities.
>
> so here in Splash class activity, I referenced to Htest class:
>
> private final Htest htest;
> htest.setNoTitle();
>
> but I get this error: The blank final field hsudoku may not have been
> initialized
>
> Please look at the following code and u will see what I mean.
>
> here is the activity which has two member functions
>
> public class Htest extends Activity implements OnClickListener{
>
>   �...@override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>
>         setNoTitle();     //no Title
>         setFullscreen(); //Full screen
>
>         setContentView(R.layout.main);
>
>         }
>
>     }
>
>     public void setFullscreen() {
>
>        getWindow().setFlags
> (WindowManager.LayoutParams.FLAG_FULLSCREEN,
>        WindowManager.LayoutParams.FLAG_FULLSCREEN);
>     }
>
>     public void setNoTitle() {
>         requestWindowFeature(Window.FEATURE_NO_TITLE);
>     }
>
> }
>
> now here is another activity which I want to reference to those member
> functions
>
> public class Splash extends Activity {
>
>        private final Htest htest; //reference to Htest class
>
>        private Splash_view splashview;
>
>        public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>
>        htest.setNoTitle(); // this gives me this error:  The blank
> final field hsudoku may not have been initialized
>
>         //splashview
>
>         splashview = new Splash_view(this);
>         setContentView(splashview);
>         splashview.requestFocus();
>
> }
>
>
--~--~-~--~~~---~--~~
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 data to text file using eclipse

2009-08-11 Thread Jack Ha

Context.openFileOutput() opens a private file associated with this
Context's application package for writing and the name of the file to
open can not contain path separators.

Try this:

   try {
   File root = Environment.getExternalStorageDirectory();
   if (root.canWrite()){
   File f = new File(root, "test.txt");
   FileWriter fw = new FileWriter(f);
   BufferedWriter out = new BufferedWriter(fw);
   out.write("Hello world");
   out.close();
   }
   } catch (IOException e) {
   }

--
Jack Ha
Open Source Development Center
・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 Aug 11, 1:57 pm, Saeed  wrote:
> Hi everyone,
>
> I am trying to save data to my google phone G1. I am able to create
> the text file in sdcard by using the following code in eclipse :
>
> //++
> try {
>                 FileWriter f = new FileWriter("/sdcard/test.txt");
>         } catch (IOException e) {
>                 // TODO Auto-generated catch block
>                 e.printStackTrace();
>         }
> //+
>
> but I am not able to save any data to the created file. I found this
> code from "http://www.anddev.org/working_with_files-t115.html"; which
> says I can write to text file by running this code.
>
> //+++
> try { // catches IOException below
>           final String TESTSTRING = new String("hello");
>
>           FileOutputStream fOut = openFileOutput("/sdcard/test.txt",
>
> MODE_WORLD_READABLE);
>           OutputStreamWriter osw = new OutputStreamWriter(fOut);
>
>           // Write the string to the file
>           osw.write(TESTSTRING);
>           // ensure that everything is
>           // really written out and close
>           osw.flush();
>           osw.close();
>
>       } catch (IOException ioe) {
>           ioe.printStackTrace();
>      }
> //+
>
> I run it but I do not see any change in my file.
> first, I thought my problem is permission to file. The permission
> setting on my phone is:
>
> data        :   drwxrwx--x
> sdcard    :   d---rwxrwx
> system    :   drwxr-xr-x
>
> would you please help me in either in correcting the code or finding a
> way to save data into text file (saved in sdcard or the phone) in
> eclipse environment
>
> 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: WifiReceiver not part of SDK 1.5???

2009-08-11 Thread Jack Ha

Make sure you have the following line in your AndroidManifest file.



--
Jack Ha
Open Source Development Center
・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 Aug 11, 10:55 am, Abhi  wrote:
> Hi Jack,
>
> posting my reply again... dunno where my previous post went.
>
> I have the complete code now but the app force closes on my emulator.
> Is it because the emulator doesn't support WiFi apps? and force closes
> when it tries to scan for networks? I thought the emulator would just
> get stuck at the Starting Scan phase but wouldn't crash... correct?
>
> Abhi
>
> On Aug 11, 11:41 am, Jack Ha  wrote:
>
> > WifiReceiver is not part of the SDK.
>
> > Are you referring to the following example? You'll see WifiReceiver
> > extends BroadcastReceiver.
>
> >    http://www.androidsnippets.org/snippets/9/
>
> > --
> > Jack Ha
> > Open Source Development Center
> > ・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 Aug 11, 6:37 am, Abhi  wrote:
>
> > > I don't see this in the list of WiFi classes on the latest
> > > documentation found 
> > > herehttp://developer.android.com/reference/android/net/wifi/package-summa...
>
> > > I am refering to a WifiScanner code (snippet below) to scan wireless
> > > networks
>
> > > public class WifiTester extends Activity {
> > >     TextView mainText;
> > >     WifiManager mainWifi;
> > >     WifiReceiver receiverWifi;
> > >     List wifiList;
> > >               ...
>
> > > and it gives me an error in Eclipse saying 'WifiReceiver cannot be
> > > resolved to a type'. Any help would be appreciated.
>
> > > Please also let me knw how to replace the part of code that has
> > > WifiReceiver in it with any of the existing classes.
>
> > > Thanks,
>
> > > Abhi- 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: trying to download latest, but the downloaded doc reports it's not the latest

2009-08-11 Thread Jack Ha

There is already a bug report filed against it.

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

--
Jack Ha
Open Source Development Center
・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 Aug 10, 4:46 pm, "Curtis."  wrote:
> Hi all,
>
> excuse the doutbless newbie question .. but a quick scan of the FAQ
> didn't turn up a pertinent answer.
>
> I've downloaded 2 version of the dev kit now:
>
> http://developer.android.com/sdk/1.5_r2/index.htmlhttp://developer.android.com/sdk/1.5_r3/index.html
>
> When I download and unpack, and look at RELEASE_NOTES.html in the top
> level directory there's a big screaming message that goes like:
>
> "Android 1.1 SDK, Release 1
> February 2009
>
> This is NOT the current Android SDK release.
> Download the current Android SDK
> The sections below provide an overview of the SDK package.
>
> For more information on this SDK release, read the Release Notes."
>
> Is this message just incorrect and needs fixing, or are the files I'm
> downloading with 1.5 in the title really just 1.1 dev kits?
>
> yours confusedly..
> Curtis.
--~--~-~--~~~---~--~~
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: Camera Preview on Emulator

2009-08-11 Thread Jack Ha

The emulator doesn't support camera emulation. You may want to check
out this link:

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

--
Jack Ha
Open Source Development Center
・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 Aug 11, 5:23 am, swapnil kamble  wrote:
> Hi,
> I want to preview my camera on emulator. I have also written small app for
> that. But it only show black and white squares and gray square moving. Does
> anybody has any idea about this ?
>
> Thanks in advance,
> Swapnil
--~--~-~--~~~---~--~~
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: WifiReceiver not part of SDK 1.5???

2009-08-11 Thread Jack Ha

WifiReceiver is not part of the SDK.

Are you referring to the following example? You'll see WifiReceiver
extends BroadcastReceiver.

http://www.androidsnippets.org/snippets/9/


--
Jack Ha
Open Source Development Center
・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 Aug 11, 6:37 am, Abhi  wrote:
> I don't see this in the list of WiFi classes on the latest
> documentation found 
> herehttp://developer.android.com/reference/android/net/wifi/package-summa...
>
> I am refering to a WifiScanner code (snippet below) to scan wireless
> networks
>
> public class WifiTester extends Activity {
>     TextView mainText;
>     WifiManager mainWifi;
>     WifiReceiver receiverWifi;
>     List wifiList;
>               ...
>
> and it gives me an error in Eclipse saying 'WifiReceiver cannot be
> resolved to a type'. Any help would be appreciated.
>
> Please also let me knw how to replace the part of code that has
> WifiReceiver in it with any of the existing classes.
>
> Thanks,
>
> Abhi
--~--~-~--~~~---~--~~
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: prting procedure for Android on SMDK2440 board

2009-08-10 Thread Jack Ha

This question is more suitable for the android-porting group.

--
Jack Ha
Open Source Development Center
・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 Aug 10, 10:04 pm, prasad NSRS  wrote:
> Hi
>   with reference to the posting on the google group of <
> android-beginners@googlegroups.com>,
> Internet Access on ANDROID  as it is mentioned like* am working on SMDK2440
> board. Android is up and running on the
> target platform*. and as iam also working for the same but i want some
> support like how to make to work android on the SMDK2440 boardcan anyone
>  please provide me the *Procedure to Load ANDROID OS on to the SMDK2440
> board*.?and supported links if any..and is there any toolchains specific for
> doing this...? please help me in this regard...
>
> --
> Regards,
> prasadNSRS
> +91 9393858787
--~--~-~--~~~---~--~~
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: Struggling with google maps

2009-08-10 Thread Jack Ha

Try changing your class name from "Map" to something else as it might
cause conflict with the Android Map class.

--
Jack Ha
Open Source Development Center
・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 Aug 9, 11:17 pm, trostum  wrote:
> I start my main activity and open the menu. When i click on the map
> menu i try to launch my mapactivity with the following code:
>
> startActivity(new Intent(this, Map.class));
>
> Then my Map class looks like this:
>
> public class Map extends MapActivity {
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.map);
>
>     }
>
>     protected boolean isRouteDisplayed() {
>         return false;
>     }
>
> }
>
> I get the following stacktrace:
>
> W/KeyCharacterMap(  931): No keyboard for id 0
> W/KeyCharacterMap(  931): Using default keymap: /system/usr/keychars/
> qwerty.kcm.bin
> I/ActivityManager(  574): Displayed activity
> com.deffing.android.jibba/.ShowCounty: 3551 ms
> W/dalvikvm(  931): Class resolved by unexpected DEX: Lcom/deffing/
> android/jibba/Map;(0x43734c18):0x1917a0 ref [Lcom/google/android/maps/
> MapActivity;] Lcom/google/androi
> d/maps/MapActivity;(0x43734c18):0x187680
> W/dalvikvm(  931): Unable to resolve superclass of Lcom/deffing/
> android/jibba/Map; (62)
> W/dalvikvm(  931): Link of class 'Lcom/deffing/android/jibba/Map;'
> failed
> D/AndroidRuntime(  931): Shutting down VM
> W/dalvikvm(  931): threadid=3: thread exiting with uncaught exception
> (group=0x4000fe70)
> E/AndroidRuntime(  931): Uncaught handler: thread main exiting due to
> uncaught exception
> E/AndroidRuntime(  931): java.lang.NoClassDefFoundError:
> com.deffing.android.jibba.Map
> E/AndroidRuntime(  931):        at
> com.deffing.android.jibba.ShowCounty.onOptionsItemSelected
> (ShowCounty.java:103)
> E/AndroidRuntime(  931):        at
> android.app.Activity.onMenuItemSelected(Activity.java:2085)
> E/AndroidRuntime(  931):        at
> com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected
> (PhoneWindow.java:820)
> E/AndroidRuntime(  931):        at
> com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:
> 139)
> E/AndroidRuntime(  931):        at
> com.android.internal.view.menu.MenuBuilder.performItemAction
> (MenuBuilder.java:813)
> E/AndroidRuntime(  931):        at
> com.android.internal.view.menu.IconMenuView.invokeItem
> (IconMenuView.java:519)
> E/AndroidRuntime(  931):        at
> com.android.internal.view.menu.IconMenuItemView.performClick
> (IconMenuItemView.java:122)
> E/AndroidRuntime(  931):        at android.view.View.onTouchEvent
> (View.java:3828)
> E/AndroidRuntime(  931):        at android.widget.TextView.onTouchEvent
> (TextView.java:6291)
> E/AndroidRuntime(  931):        at android.view.View.dispatchTouchEvent
> (View.java:3368)
> E/AndroidRuntime(  931):        at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
> E/AndroidRuntime(  931):        at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
> E/AndroidRuntime(  931):        at
> com.android.internal.policy.impl.PhoneWindow
> $DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
> E/AndroidRuntime(  931):        at android.view.ViewRoot.handleMessage
> (ViewRoot.java:1525)
> E/AndroidRuntime(  931):        at android.os.Handler.dispatchMessage
> (Handler.java:99)
> E/AndroidRuntime(  931):        at android.os.Looper.loop(Looper.java:
> 123)
> E/AndroidRuntime(  931):        at android.app.ActivityThread.main
> (ActivityThread.java:3948)
> E/AndroidRuntime(  931):        at
> java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime(  931):        at java.lang.reflect.Method.invoke
> (Method.java:521)
> E/AndroidRuntime(  931):        at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:782)
> E/AndroidRuntime(  931):        at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> E/AndroidRuntime(  931):        at dalvik.system.NativeStart.main
> (Native Method)
> E/AndroidRuntime(  931): Caused by: java.lang.IllegalAccessError:
> cross-loader access from pre-verified class
> E/AndroidRuntime(  931):        at dalvik.system.DexFile.defineClass
> (Native Method)
> E/AndroidRuntime(  931):        at dalvik.system.DexFile.loadClass
> (DexFile.java:193)
> E/AndroidRuntime(  931):        at
> dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
> E/AndroidRuntime(  931):        at java.lang.ClassLoader.l

[android-beginners] Re: Need code sample for double lon= loc.getLongitude();

2009-08-10 Thread Jack Ha

Location is just a class representing a geographic location.

You need to do something like this:

LocationManager lm = (LocationManager)getSystemService
(Context.LOCATION_SERVICE);
List providers = lm.getAllProviders();
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
locationListener);
Location loc = lm.getLastKnownLocation
(LocationManager.GPS_PROVIDER);
if (loc != null) {
// loc.getLatitude()
// loc.getLongitude()
}

private final LocationListener locationListener = new
LocationListener() {
public void onLocationChanged(Location newloc) {}
public void onProviderDisabled(String provider) {}
public void onProviderEnabled(String provider) {}
public void onStatusChanged(String provider, int status,
Bundle extras) {}
};

Note: The getLastKnownLocation() method will return null until the
provider you specify has gotten at least one update.

--
Jack Ha
Open Source Development Center
・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 Aug 10, 10:55 am, cellurl  wrote:
> Thanks for that. I just want one fix one time, not updates. I will try
> LM, but why can't I use vanilla Location like the API says?
> (My question is more of a learning one, if there is a more appropriate
> Class, why shouldn't I use it?)
> Everyone says GPS is a battery hog, so I just want to get a fix and
> turn it off as quickly as possible.
> -jp
>
> Location        A class representing a geographic location sensed at a
> particular time (a "fix").
> LocationManager         This class provides access to the system location
> services.
>
> On Aug 10, 12:25 am, Jack Ha  wrote:
>
> > You need to use the LocationManager:
>
> >     lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
>
> > --
> > Jack Ha
> > Open Source Development Center
> > ・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 Aug 9, 9:22 pm, cellurl  wrote:
>
> > > From GPS, I am trying to get latitude longitude, bearing and speed.
> > > Just a one time snapshot.
>
> > > My code is 
> > > here:http://code.google.com/p/speedlimit/source/browse/#svn/trunk/Speedlim...
>
> > > Pblm:
> > > The "loc" is always 0.
>
> > > Q: Must I initialize the GPS provider somehow??
> > > Any complete code snippet most welcomed...
>
> > > -excerpt from Speedlimit.java---
>
> > >          Gps gps = new Gps();
> > >          gps.doit();
>
> > > --Gps.java
>
> > > package org.speedlimit;
>
> > > import android.app.Activity;
> > > import android.location.Location;
>
> > > public class Gps extends Activity
> > > {
> > >    private Location loc;
>
> > >     public void doit() {
>
> > >         if (loc != null) {
> > >                 double lat= loc.getLatitude();
> > >                 double lon= loc.getLongitude();
> > >         }
> > >     }}
>
> > > --
>
>
--~--~-~--~~~---~--~~
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: Need code sample for double lon= loc.getLongitude();

2009-08-09 Thread Jack Ha

You need to use the LocationManager:

lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);

--
Jack Ha
Open Source Development Center
・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 Aug 9, 9:22 pm, cellurl  wrote:
> From GPS, I am trying to get latitude longitude, bearing and speed.
> Just a one time snapshot.
>
> My code is 
> here:http://code.google.com/p/speedlimit/source/browse/#svn/trunk/Speedlim...
>
> Pblm:
> The "loc" is always 0.
>
> Q: Must I initialize the GPS provider somehow??
> Any complete code snippet most welcomed...
>
> -excerpt from Speedlimit.java---
>
>          Gps gps = new Gps();
>          gps.doit();
>
> --Gps.java
>
> package org.speedlimit;
>
> import android.app.Activity;
> import android.location.Location;
>
> public class Gps extends Activity
> {
>    private Location loc;
>
>     public void doit() {
>
>         if (loc != null) {
>                 double lat= loc.getLatitude();
>                 double lon= loc.getLongitude();
>         }
>     }}
>
> --
--~--~-~--~~~---~--~~
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: Struggling with google maps

2009-08-09 Thread Jack Ha

Which line in the code that caused the exception? Can you post the
complete stack trace here?

--
Jack Ha
Open Source Development Center
・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 Aug 9, 2:20 pm, trostum  wrote:
> Hi.
>
> I was following this 
> tutorial:http://mobiforge.com/developing/story/using-google-maps-android
> on creating map activities, Now i am unable to understand why my
> application crashes. I get a NoClassDefFoundError and that exception
> is caused by a  Caused by: java.lang.IllegalAccessError: cross-loader
> access from pre-verified class.
>
> Now i have added the  android:name="com.google.android.maps" /> as a child element to my
> aplication and
>  android:name="android.permission.ACCESS_FINE_LOCATION"> permission> and
> 
> as children of the Manifest element.
>
> My avd is running on api level 4 with the google apis.
>
> What is wrong? i have searched the web, but nnot found a solution to
> my problem.
>
> Appreciate any thoughts or comments on what might be wrong
--~--~-~--~~~---~--~~
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: Accelerometer and dpad

2009-08-09 Thread Jack Ha

The accelerometer supports three axes of rotation: forward-backward,
left-right, and up-down.

Take a look at his sensor simulator:

http://code.google.com/p/openintents/wiki/SensorSimulator

--
Jack Ha
Open Source Development Center
・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 Aug 6, 3:37 pm, Steeler  wrote:
> I want to include accelerometer support in my app, but the
> documentation seemed pretty spotty. How many axes of rotation does the
> accelerometer support, and how do you differentiate between the axes?
>
> Also, do *any* current Android phones actually have a dpad? The
> emulator's not as useful as it could be if it doesn't have any
> emulation of the accelerometer (if it does, please let me know) and
> has a dpad instead of the real-life trackball.
--~--~-~--~~~---~--~~
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 share data between the program that launches the thread and the thread itself?

2009-08-09 Thread Jack Ha

You may declare pippo outside of onCreate(). Appropriate locking is
needed for shared variable.

--
Jack Ha
Open Source Development Center
・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 Aug 7, 2:43 am, Android Beginner  wrote:
> Sorry... must be a very easy question... otherwise I would't be a real
> Android Beginner... :-)
>
> How to share the variable pippo between the program that launches the
> thread and the thread itself?
>
> @Override
> public void onCreate() {
>         super.onCreate();
>         int pippo = 5;
>         new Timer().scheduleAtFixedRate(new TimerTask() {
>                 public void run() {pippo;
>         };};},0,1000);
>
> This is the result of the compiler...
>
> "Cannot refer to a non-final variable pippo inside an inner class
> defined in a different method."
>
> Many thanks in advance.
> Regards
>
> Android Beginner
--~--~-~--~~~---~--~~
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: setLayoutParams on a TextView prevents TextView from being displayed

2009-08-09 Thread Jack Ha

Add the following line in your code:

results_table.setColumnShrinkable(0, true);

And comment out the descripton_e.setLayoutParams() line as your
mentioned.

--
Jack Ha
Open Source Development Center
・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 Aug 8, 1:52 pm, Stu  wrote:
> I'm populating a TableLayout with TableRows containing a TextView
> each. I want the TextViews to FILL_PARENT width and WRAP_CONTENT on
> the height.
>
> If I don't specify any LayoutParams for the TextView then it shows up
> in the emulator all on one line going off the screen on the right.
>
> If I specify some LayoutParams like the ones below then absolutely no
> text shows up whatsoever:
>
> description_element.setLayoutParams(new LayoutParams
> (LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
>
> I'll paste the relevant code (it gets looped over for a number of
> JSONObjects)
>
> //CODE BEGINS HERE
> // Create a new TableRow element.
> TableRow description_row = new TableRow(this);
> description_row.setLayoutParams(new LayoutParams
> (LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
>
> // Create the new textview for the list and style it.
> TextView description_e = new TextView(this);
> description_e.setLayoutParams(new LayoutParams
> (LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
> description_e.setText(description);
> description_e.setPadding(0, 3, 0, 1);
>
> // Put the TextView into the row and the row into the table.
> description_row.addView(description_e);
> results_table.addView(description_row, new TableLayout.LayoutParams(
>         LayoutParams.FILL_PARENT,
>         LayoutParams.WRAP_CONTENT));
> //CODE ENDS HERE
>
> That code results in the none of the TextViews showing up.
>
> Commenting the descripton_e.setLayoutParams line results in single-
> line TextViews that overshoot the screen width.
>
> Adding something like description_e.setWidth(240) results in the
> TextView being multiple lines, but obviously at a fixed width, which
> isn't really much use to me.
>
> Has anyone encountered this before, or does anyone have any ideas/
> suggestions?
>
> I'll post my layout file below in case that has anything to do with
> it:
>
> 
> http://schemas.android.com/apk/res/
> android"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     android:stretchColumns="0"
>     android:padding="10sp">
>     
>                          android:id="@+id/showName" />
>     
>              android:layout_width="fill_parent">
>                          android:id="@+id/resultsScrollView"
>                 android:layout_width="fill_parent"
>                 android:layout_height="wrap_content"
>                 android:layout_span="2">
>                                          android:id="@+id/showResults"
>                         android:layout_width="fill_parent"
>                         android:layout_height="wrap_content">
>                 
>         
>         
> 
>
> Any help or suggestions will be thankfully received as this is driving
> me crazy!
--~--~-~--~~~---~--~~
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: plz send me example of startActivityForResult in android

2009-08-09 Thread Jack Ha

Take a look at the notepad tutorial:

http://developer.android.com/guide/tutorials/notepad/notepad-ex2.html

--
Jack Ha
Open Source Development Center
・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 Aug 8, 8:23 am, saurabh sinha  wrote:
> plz send me example of startActivityForResult in android
--~--~-~--~~~---~--~~
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 Move an Image Using Finger Touch

2009-08-07 Thread Jack Ha

You can take a look at this tutorial.

http://www.anddev.org/viewtopic.php?p=11603

--
Jack Ha
Open Source Development Center
・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 Aug 7, 11:24 am, Hamed3d  wrote:
> Hi there,
>
> I am trying to move an image using finger touch.I tried to find a
> tutorial or sample code for it but I couldn't find anything. Could
> anyone please help me out here? Thanks in advanced...
--~--~-~--~~~---~--~~
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: Adding view resource

2009-08-02 Thread Jack Ha

The error shown in Eclipse should tell you which resource is missing.
Double check the resources under the res folder.

If possible, please post your code and indicate where the problem is.

--
Jack Ha
Open Source Development Center
・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 Jul 30, 1:57 pm, rizn108  wrote:
> there is a problem with  .java code.
> it gives an error when i build it i am using eclipse.
> it says for a resource id that is not in project i have taken the code
> from internet .
> how can i add a resource id that has view type data structure.
--~--~-~--~~~---~--~~
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: camera preview problem

2009-08-02 Thread Jack Ha

Remove the 'android:permission="android.permission.CAMERA"' attribute
from the application tag and add the following line in your manifest
file:



--
Jack Ha
Open Source Development Center
・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 Jul 30, 3:29 pm, chuu  wrote:
> Hi,
>
> I would like to try the camera preview function. I create a new
> project, copy the sample code (CameraPreview.java) from ApiDemo, and
> run on HTC G1. Nothing appear. The logcat shows:
>
> I/ActivityManager(   56): Starting activity: Intent { flags=0x1000
> comp={com.example.camerapreview/
> com.example.camerapreview.CameraPreview} }
> W/ActivityManager(   56): Permission Denial: starting Intent
> { flags=0x1000 comp={com.example.camerapreview/
> com.example.camerapreview.CameraPreview} } from null (pid=-1, uid=-1)
> requires android.permission.CAMERA
> D/AndroidRuntime( 9049): Shutting down VM
> W/dalvikvm( 9049): threadid=3: thread exiting with uncaught exception
> (group=0x4000fe70)
> E/AndroidRuntime( 9049): Uncaught handler: thread main exiting due to
> uncaught exception
> E/AndroidRuntime( 9049): *** EXCEPTION IN SYSTEM PROCESS.  System will
> crash.
>
> My manifest is
> 
> http://schemas.android.com/apk/res/android";
>       package="com.example.camerapreview"
>       android:versionCode="1"
>       android:versionName="1.0">
>      android:permission="android.permission.CAMERA">
>                            android:label="@string/app_name">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
>         
>     
>     
> 
>
> Could anyone give me a hint what's wrong?
--~--~-~--~~~---~--~~
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: help around using accelerometer sensor

2009-08-02 Thread Jack Ha

You are referring to a very old version of the docs.

Take a look at SensorManager.getSensorList() in:

http://developer.android.com/reference/android/hardware/SensorManager.html

--
Jack Ha
Open Source Development Center
・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 Jul 31, 8:12 am, Abhi  wrote:
> hi,
>
> i have been trying to create an app using the accelerometer sensor in
> SDK 1.5.
>
> i am using the Sensor class and tried using the getSupportedSensors()
> method to get a list of supported sensors. But it gives an error
> saying 'The method is undefined for the type Sensor'. Any idea how to
> work around this?
>
> here is the link to the android developers 
> guidehttp://lampwww.epfl.ch/~linuxsoft/android/android-m3-rc22a/docs/refer...()
>
> thanks,
>
> Abhi
--~--~-~--~~~---~--~~
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 convert XML into java code ?

2009-07-27 Thread Jack Ha

Add the following line after "ListView myTextView = new ListView
(this);"

myTextView.setId(android.R.id.list);


--
Jack Ha
Open Source Development Center
・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 Jul 26, 3:44 am, RainBow  wrote:
> Hi,
>
> I am trying to use the LinearLayout class directly in my code , rather
> than using XML.
>
> If I use the XML code, it works fine.
>
> However, if I supply my own code in OnCreate() of ListActivity-derived
> class, it crashes.
>
> Here is the XML code and corresponding Java code that I wanna write.
> Could someone tell me whats wrong with my code?
>
> // XML Code : This works just fine
>
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent">
>
>                   android:layout_width="fill_parent"
>             android:layout_height="fill_parent"
>             android:drawSelectorOnTop="false"/>
>
>     
>
> // Corresponding Java Code : this crashes at setContentView() call:
>
>         LinearLayout ll = new LinearLayout(this);
>         ll.setOrientation(LinearLayout.VERTICAL);
>
>         ListView myTextView = new ListView(this);
>
>         int lHeight = LinearLayout.LayoutParams.FILL_PARENT;
>         int lWidth = LinearLayout.LayoutParams.WRAP_CONTENT;
>         ll.addView(myTextView, new LinearLayout.LayoutParams(lHeight,
> lWidth));
>
>         setContentView(ll); //<-- this line crashes
>
> Thanks,
> ~Viren
--~--~-~--~~~---~--~~
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: Multiple EditText fields per row

2009-07-26 Thread Jack Ha

Your layout file seems to work fine. I do see 4 EditText fields in the
second row.

--
Jack Ha
Open Source Development Center
・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 Jul 25, 6:46 pm, "Alex A."  wrote:
> Hi all,
>
> I started Android development this morning, and that's pretty much
> what I was doing all day :)
> It's very exciting and Eclipse plug in is so easy to use!!! Here's a
> little problem that I ran into with XML.
>
> Trying to put 4 EditText fields in one row of a TableLayout as
> follows:
>
> -
>                  android:layout_height="fill_parent"
>                 android:layout_width="fill_parent"
>                 android:id="@+id/MainTable"
>                 xmlns:android="http://schemas.android.com/apk/res/android";>
>
>                  android:id="@+id/Row1"
>                 android:layout_width="wrap_content"
>                 android:layout_height="wrap_content">
>
>              android:id="@+id/label1"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:text="@string/first"/>
> 
>
>                  android:id="@+id/Row2"
>                 android:layout_width="wrap_content"
>                 android:layout_height="wrap_content">
>
>              android:id="@+id/inputField1"
>         android:layout_column="0"
>         android:layout_width="30dip"
>         android:layout_height="wrap_content"
>         android:padding="3dip"/>
>
>              android:id="@+id/inputField2"
>         android:layout_column="1"
>         android:layout_width="30dip"
>         android:layout_height="wrap_content"
>         android:padding="3dip"/>
>
>              android:id="@+id/inputField3"
>         android:layout_column="2"
>         android:layout_width="30dip"
>         android:layout_height="wrap_content"
>         android:padding="3dip"/>
>
>              android:id="@+id/inputField4"
>         android:layout_column="3"
>         android:layout_width="30dip"
>         android:layout_height="wrap_content"
>         android:padding="3dip"/>
> 
>
> 
>
> -
>
> But what this results in is just one EditText field (the first one)
> taking up the whole second row.
> What I need is all 4 entry fields in one row.
> What is the problem here?
> Any help is appreciated.
>
> Alex
--~--~-~--~~~---~--~~
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: Spinner Data Trouble

2009-07-23 Thread Jack Ha

Take a look at the Spinner1 example in ApiDemos.

--
Jack Ha
Open Source Development Center
・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 Jul 23, 7:01 am, Skeniver  wrote:
> I suppose I would need to bind the Adapter to the Spinner, wouldn't
> I... Just noticed that. So while that would help, it still doesn't
> work... It is force closing...
>
> It runs through all the code shown, but my Eclipse debugging skills
> aren't up to scratch yet, so I don't know really where it is going
> wrong... Any help would be most appreciated.
>
> Thanks again!
>
> On Jul 23, 2:32 pm, Skeniver  wrote:
>
> > Hi there
>
> > I am a teach-yourself-Android beginner, and this is my first post...
>
> > I am trying to fill a spinner with a few strings. The layout on its
> > own runs fine, and the code as I have it runs fine, but the spinner
> > involved is not showing the data in the String array... Here is the
> > code:
>
> > public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
> >         setContentView(R.layout.main);
>
> >         ArrayList users = new ArrayList();
> >         ArrayAdapter aa = new ArrayAdapter(this,
> > R.layout.main, R.id.SpinAccount, users);
>
> >         users.add("Neil");
> >         users.add("Amy");
>
> >         aa.notifyDataSetChanged();
>
> >         TextView balA = (TextView)findViewById(R.id.TextBalA);
> >         balA.setText("1.00");
> >     }
>
> > Where have I gone wrong/what am I missing!
>
> > 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: What is the "package name" and the "Create Activity" in wizard of new project (eclipse)

2009-07-22 Thread Jack Ha

Please take a look at the HelloWorld tutorial:

http://developer.android.com/guide/tutorials/hello-world.html

--
Jack Ha
Open Source Development Center
・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 Jul 22, 4:57 am, Carlos Maldonado 
wrote:
> Hi, im really newbie to java.
> I know some php and c# and want to start to program for android
> phones.
>
> I get stuck in the very first steps. I already have an eclipse ide
> with the sdk and the android plugin, but when i try to made a new
> project it ask me for two things that i have no idea what means.
>
> Package name (force)
> Create Activity (optional)
>
> Searching by internet i found that is the same that in java, but i
> dont know a lot of java, so...
>
> ¿any help?
>
> By the way, if you know any online tutorial for dummys to get starting
> to java oriented to android, it would be nice.
>
> Thanks for your time and sorry for my english, im spanish :)
--~--~-~--~~~---~--~~
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:

2009-07-21 Thread Jack Ha

Please refer to the documentation.

--
Jack Ha
Open Source Development Center
・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 Jul 21, 8:22 am, saurabh sinha  wrote:
> I want to know the difference between intent and intent-filter in android
> I am just confusing the difference between intent and intent-filter
--~--~-~--~~~---~--~~
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:

2009-07-21 Thread Jack Ha

The purpose of TextSwitcher is to animate a text label on screen such
that whenever its setText() function is called, it animates the
existing text out and animates the new text in.

--
Jack Ha
Open Source Development Center
・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 Jul 21, 7:33 am, saurabh sinha  wrote:
> I have attached textswicher
> what is role of textswitcher and its purpose
> in what situation we use textswitcher
> what is viewswitcher.viewFactory
>
> plz check my example on your emulator and back email with response
>
>  TextSwitcher.rar
> 40KViewDownload
--~--~-~--~~~---~--~~
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: XML Documentatin?

2009-07-20 Thread Jack Ha

Try http://developer.android.com/reference/android/R.styleable.html

--
Jack Ha
Open Source Development Center
・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 Jul 20, 1:56 pm, Micah  wrote:
> Another page that contains some information 
> ishttp://developer.android.com/reference/android/R.attr.htmlwhich
> appears to list all XML attributes for all elements.  Unfortunately,
> this list doesn't include any information about which elements the
> attribute goes with.  Thickness attribute, for example, is meant to be
> used with  and it
> doesn't make much sense in a LinearLayout element  android:thickness="3.5sp">.
>
> Note: To avoid confusion I am still searching for an answer if anyone
> has one.  I'm just trying to keep this thread updated on what I learn
> in case someone else ends up googling for XML Documentation like I
> did.
>
> On Jul 20, 1:49 pm, Micah  wrote:
>
> > The documentation 
> > athttp://developer.android.com/guide/topics/resources/available-resourc...
> > appears to be what I'm looking for except it's incomplete.  It doesn't
> > contain information about the  tag, and I'm not sure what else
> > is missing. :(
>
> > On Jul 20, 1:36 pm, Micah  wrote:
>
> > > When working with android XML files there are a bunch of tags
> > > available such as TextView, shape, alpha, set, menu, LinearLayout,
> > > etc.  Where can I find a list of all of the tags available along with
> > > (ideally) documentation on what they are used for and what attributes
> > > are available for them?  Searching the reference documentation 
> > > athttp://developer.android.com/reference/packages.htmldoesn'tturnup
> > > any useful results, it only seems to return results for the various
> > > Java classes.
>
> > > An example of what I'm looking for is the shape tag.  Based on
> > > examples, It can have solid, stroke and padding tags within it as well
> > > as an android:sahpe attribute which can be "line" and maybe other
> > > things (I don't know what else).  So where can I find documentation on
> > > what tags are valid within a  block and what attributes
> > > are valid on a shape?  If I look at the the ShapeDrawable Java class
> > > (http://developer.android.com/reference/android/graphics/drawable/
> > > ShapeDrawable.html) I can see some attributes, but android:shape
> > > attribute isn't listed yet it's used in one of the examples.  I am not
> > > even sure if ShapeDrawable is the same as  or not. :/
>
> > > At this point I would be even interested in the definitions in code
> > > form (perhaps and XML Schema file or something so I at least know what
> > > I can type and then I can play around with it to figure out exactly
> > > what it does.
>
>
--~--~-~--~~~---~--~~
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: Hello MapView tutorial

2009-07-20 Thread Jack Ha

Did you see any errors in logcat?

Make sure you have the following line in the manifest file:

  

Can you post your source file and manifest file here?

--
Jack Ha
Open Source Development Center
・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 Jul 20, 9:46 am, Neilz  wrote:
> Yes, everything is in place as specified in the tutorial.
>
> On Jul 20, 4:34 pm, Jack Ha  wrote:
>
> > Did you obtain the Maps Api key and insert that in "android:apiKey" in
> > the layout file? Also make sure that your application has requested
> > the INTERNET permission.
>
> > --
>
>
--~--~-~--~~~---~--~~
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: Hello MapView tutorial

2009-07-20 Thread Jack Ha

Did you obtain the Maps Api key and insert that in "android:apiKey" in
the layout file? Also make sure that your application has requested
the INTERNET permission.

--
Jack Ha
Open Source Development Center
・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 Jul 20, 8:12 am, Neilz  wrote:
> Hi all. I've worked my way through all the tutorials, and the Maps one
> is now the only one I can't get working.
>
> http://developer.android.com/guide/tutorials/views/hello-mapview.html
>
> I've followed the instructions, but when the application starts up I
> get the following message:
>
> Sorry! The application HelloMapView has stopped unexpectedly. Please
> try again.
>
> I'm not getting any clues as to why. Does anyone have any ideas what
> may be wrong, or how I can get some better debug output for this?
>
> Many 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: Hello Tutorials - Gallery Example

2009-07-17 Thread Jack Ha

What's the error message?

obtainStyledAttributes() is defined in android.content.Context

You might consider cleaning the project and rebuild.

--
Jack Ha
Open Source Development Center
・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 Jul 16, 2:21 pm, Neilz  wrote:
> Hi Jack, thanks for your response.
>
> It still doesn't compile... what is the method obtainStyledAttributes
> ()? This doesn't resolve.
>
> On Jul 16, 4:15 pm, Jack Ha  wrote:
>
> > Create a file called attrs.xml and place the following in it:
>
> > 
> > 
> >     
> >         
> >     
> > 
>
> > Then replace the code in ImageAdapter with the following:
>
> >     TypedArray a = obtainStyledAttributes
> > (R.styleable.default_gallery);
> >     mGalleryItemBackground = a.getResourceId(
> >         R.styleable.default_gallery_android_galleryItemBackground, 0);
>
> > --
> > Jack Ha
> > Open Source Development Center
> > ・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 Jul 16, 6:30 am, Neilz  wrote:
>
> > > Hi all. I tried thisexample(http://developer.android.com/guide/
> > > tutorials/views/hello-gallery.html) and found the compilation problems
> > > which having done some searching I see that many other people have
> > > found the same thing.
>
> > > No one seems to have found a solution to this. It would be great if
> > > someone involved could update thisexample, or provide clear
> > > instructions on how to get it working - as it would be a nice feature
> > > to try out. The problem stems from the 'styleable' attribute of the
> > > following line:
>
> > > public ImageAdapter(Context c) {
> > >         mContext = c;
> > >         TypedArray a = obtainStyledAttributes
> > > (android.R.styleable.Theme);
> > >         mGalleryItemBackground = a.getResourceId(
> > >                 android.R.styleable.Theme_galleryItemBackground, 0);
> > >         a.recycle();
> > >     }
>
> > > 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: Hello Tutorials - Gallery Example

2009-07-16 Thread Jack Ha

Create a file called attrs.xml and place the following in it:









Then replace the code in ImageAdapter with the following:

TypedArray a = obtainStyledAttributes
(R.styleable.default_gallery);
mGalleryItemBackground = a.getResourceId(
R.styleable.default_gallery_android_galleryItemBackground, 0);

--
Jack Ha
Open Source Development Center
・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 Jul 16, 6:30 am, Neilz  wrote:
> Hi all. I tried this example (http://developer.android.com/guide/
> tutorials/views/hello-gallery.html) and found the compilation problems
> which having done some searching I see that many other people have
> found the same thing.
>
> No one seems to have found a solution to this. It would be great if
> someone involved could update this example, or provide clear
> instructions on how to get it working - as it would be a nice feature
> to try out. The problem stems from the 'styleable' attribute of the
> following line:
>
> public ImageAdapter(Context c) {
>         mContext = c;
>         TypedArray a = obtainStyledAttributes
> (android.R.styleable.Theme);
>         mGalleryItemBackground = a.getResourceId(
>                 android.R.styleable.Theme_galleryItemBackground, 0);
>         a.recycle();
>     }
>
> 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: Question about HelloMapDemo

2009-07-14 Thread Jack Ha

Make sure you set the "android:apiKey" value appropriately for the
MapView in your layout file.

--
Jack Ha
Open Source Development Center
・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 Jul 14, 1:23 am, iñaki  wrote:
> Hi, i have the next question with api demo hello map.
>
> I try to execute this example based in
> \docs\guide\tutorials\views\hello-mapview.html but when activity start don t
> show any map...
> This is the log:
> 07-14 08:18:39.669: INFO/MapActivity(791): Handling network change
> notification:CONNECTED
> 07-14 08:18:39.688: ERROR/MapActivity(791): Couldn't get connection factory
> client
> 07-14 08:18:39.829: WARN/IInputConnectionWrapper(611): showStatusIcon on
> inactive InputConnection
> 07-14 08:18:41.928: INFO/ActivityManager(568): Displayed activity
> com.HelloMap/.HelloMap: 57892 ms
>
> I have a key generated with keytool...
>
> The java only is:
>  public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.mapview);
>     }
>
>     @Override
>     protected boolean isRouteDisplayed() { return false; }
>
> }
>
> Anybody help me ?
>
> 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: android.location requestLocationUpdates only calls onLocationChanged once

2009-07-09 Thread Jack Ha

Your code seems to work fine. Your Toast notification does pop up when
location changes. Do you have "Enable GPS satellites" setting on?

--
Jack Ha
Open Source Development Center
・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 Jul 9, 7:23 am, Andrew Gee  wrote:
> On Jul 7, 11:39 pm, kartheek karthikeya 
> wrote:
>
> > no it will chanhe , yo can see by by loading kml file into ddms and
> > press play button in  bellow the kml table.yo can the locaton was
> > moving and your location chnged method is called for testing hat put
> > log in on location changed
>
> Thanks for the response but,
>
> The location does not change in the emulator. I have even tried using
> the Google Maps application.
>
> Any other ideas?
--~--~-~--~~~---~--~~
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: Camera issue that i dont understand (PreviewCallBack/PictureCallback)

2009-07-08 Thread Jack Ha

You might need to create a thread to perform your image processing
since the lifetime of the data is limited. That said, you probably
need to create a copy of the byte[] buffer from onPreviewFrame() into
the thread you created prior to processing. You probably already aware
that the preview format is semi-planar YUV420.

--
Jack Ha
Open Source Development Center
・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 Jul 8, 2:47 am, Tinuz  wrote:
> Hi guys,
>
> I have this little thing regarding the camera.
> Why is the byte array in PreviewCallBack different then the byte array
> in PictureCallback?
> The byte array data in the previewCallback is the data i need but i
> cant seem to acces this.
>
> I implemented a PreviewCallback and set the byte[] data into a manager
> but that causes a out of memory.
> There must be a way to access this in a nice way.
>
> Any thoughts on how to get the byte array i want?
>
> Thanks in advance,
> Martijn
--~--~-~--~~~---~--~~
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: Adding a view to a viewgroup

2009-07-07 Thread Jack Ha
Your Court.onDraw() function will not get called by default for
efficiency. You need to call setWillNotDraw(false) to enable it.

--
Jack Ha
Open Source Development Center
・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 Jul 7, 5:30 am, Carl  wrote:
> I'm trying to do some simple UI stuff in a game (Basketball).
>
> I've created my own Court class (which extends ViewGroup) and I want
> to add a Ball (extends View) to the court.
>
> Unfortunately my ball doesn't show up on the court, and in fact the
> court doesn't draw either.
>
> What have I done wrong?
>
> package test.com;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.view.ViewGroup.LayoutParams;
> import android.widget.FrameLayout;
> import android.widget.LinearLayout;
>
> public class test extends Activity
> {
>         /** Constants */
>         final int FPAR = LinearLayout.LayoutParams.FILL_PARENT;
>
>         private FrameLayout main;
>
>         /** Called when the activity is first created. */
>         @Override
>         public void onCreate(Bundle savedInstanceState)
>         {
>                 super.onCreate(savedInstanceState);
>                 this.addContentView(new Court(this), new LayoutParams(FPAR, 
> FPAR));
>         }
>
> }
>
> package test.com;
>
> import android.content.Context;
> import android.graphics.Canvas;
> import android.graphics.Color;
> import android.graphics.Paint;
> import android.graphics.Rect;
> import android.view.ViewGroup;
>
> public class Court extends ViewGroup
> {
>         // court dimensions
>         private int height = 0;
>         private int width = 0;
>         private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
>
>         // ball
>         Ball ball;
>
>         public Court(Context context)
>         {
>                 super(context);
>         }
>
>         @Override
>         public void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
>         {
>                 super.onMeasure(widthMeasureSpec, heightMeasureSpec);
>
>                 // fix the sizes here
>                 height = this.getMeasuredHeight();
>                 width = this.getMeasuredWidth();
>                 this.layout(0, 0, width, height);
>
>                 // create a new ball
>                 ball = new Ball(this, 100, 100, 20, Color.RED);
>
>                 // put a ball on the court
>                 this.addView(ball);
>         }
>
>         @Override
>         public void onDraw(Canvas canvas)
>         {
>                 paint.setColor(Color.RED);
>                 Rect rect = new Rect(this.getLeft(), this.getTop(), width, 
> height);
>                 canvas.drawRect(rect, paint);
>                 // tell the ball to draw itself
>                 ball.draw(canvas);
>         }
>
>         @Override
>         protected void onLayout(boolean changed, int l, int t, int r, int b)
>         {
>                 // TODO Auto-generated method stub
>         }
>
> }
>
> package test.com;
>
> import android.graphics.Canvas;
> import android.graphics.Paint;
> import android.view.MotionEvent;
> import android.view.View;
>
> public class Ball extends View
> {
>         private int x;
>         private int y;
>         private int r;
>         private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
>
>         public Ball(Court court, int x, int y, int r, int color)
>         {
>                 super(court.getContext());
>                 mPaint.setColor(color);
>                 this.x = x;
>                 this.y = y;
>                 this.r = r;
>                 this.layout(this.x, this.y, this.x + (r * 2), this.y + (2 * 
> r));
>                 this.setOnTouchListener(this.ballTouchListener);
>         }
>
>         private OnTouchListener ballTouchListener = new OnTouchListener()
>         {
>                 @Override
>                 public boolean onTouch(View view, MotionEvent event)
>                 {
>                         // get the location of the click
>                         int X = (int)event.getRawX();
>                         int Y = (int)event.getRawY();
>
>                         Ball ball = (Ball)view;
>
>                         // do stuff, depending on what type of touch motion 
> is occurring
>                         switch (event.getAction())
>                         {
>                                 case MotionEvent.ACTION_DOWN:
>       

[android-beginners] Re: Is there any method to showAlert?

2009-07-06 Thread Jack Ha

You can use AlertDialog.Builder:

new AlertDialog.Builder(this)
.setTitle("Error")
.setMessage("my error message')
.setPositiveButton("OK", null)
.show();

--
Jack Ha
Open Source Development Center
・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 Jul 2, 11:02 pm, 伟伟  wrote:
> Hey everybody, I am writing a simply dial program, first I compare the phone
> number inputed with a pattern, if not match show some alert. but it seems
> that the showAlert method is not avalibal anymore. is there other method to
> alert the user?
--~--~-~--~~~---~--~~
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 is not detecting my new android phone

2009-07-04 Thread Jack Ha

Did you turn on "USB debugging"?

Settings->Applications->Development->USB debugging

--
Jack Ha
Open Source Development Center
・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 Jul 4, 1:25 pm, N3vik  wrote:
> Anyone got any ideas?
>
> Thanks
> Kevin
>
> On Jul 2, 9:35 am, N3vik  wrote:
>
> > Hi
>
> > I have two G1 phone's, the first one got wet and no longer gets a
> > signal so I had to buy another :(
>
> > My problem is adb does not detect my new phone :(  It can detect my
> > old phone ok, but not the new one.
>
> > Running "adb devices" with my old phone connected shows my old phone,
> > but with my new phone I just get an empty list.
>
> > I'm using Windows Vista.  Before people tell me to install the USB
> > drivers, I've already done that.  And I've tried "adb kill-server".
> > And I've restarted the phone and computer many times.  And yes, "USB
> > debugging" is ticked in the settings of my new phone.  And, like I
> > said, it is detecting my old broken phone ok.
>
> > Any ideas?  Please help!
> > Kevin
>
>
--~--~-~--~~~---~--~~
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: Getting images to appear in the Gallery

2009-07-02 Thread Jack Ha

If your photo data is a Bitmap, you can use the following code segment
to insert the photo and it should appear in the Gallery.

String uriString =
MediaStore.Images.Media.insertImage(getContentResolver(),
photo_bitmap, "title", "description");

Uri uri = Uri.parse(uriString);


--
Jack Ha
Open Source Development Center
・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 Jul 2, 7:44 pm, Jonathan Daugherty  wrote:
> Hi all,
>
> I'm working on a program that acquires camera captures and I'd like
> them to appear in the Gallery.  I'm storing them on the SD card
> alongside pictures stored by the native camera application and I've
> verified with "adb shell" that the images are physically present, but
> when I open the Gallery I don't see the ones I've captured with my own
> application.  Any thoughts?  The storage URI I'm using to store the
> images is:
>
>   android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI
>
> I use this code to insert into the ContentProvider:
>
>   ContentValues values = new ContentValues();
>   values.put(Media.TITLE, filename);
>   values.put(Media.DESCRIPTION, "Image capture by camera");
>   Uri uri = getContentResolver().insert(EXTERNAL_CONTENT_URI, values);
>
> And later I open an OutputStream to that URI and save the photo data.
>
> Thanks!
>
> --
>   Jonathan Daugherty
--~--~-~--~~~---~--~~
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: CheckBox enabled/disabled reality check

2009-07-02 Thread Jack Ha

setEnabled(false) works fine for CheckBox. What version of SDK are you
using? Can you post your code here?

--
Jack Ha
Open Source Development Center
・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 Jul 2, 6:18 pm, Beth Mezias  wrote:
> Hello,
> I want to switch a button out of my UI in favor of a CheckBox object.
>  However, the enable = false parameter in my layout does not seem to have
> any effect on a CheckBox!  My plan is to code the CheckBox to be enabled
> when certain other objects are valid.  With a button object, the grayness
> and the lack of response to clicks is clear and obvious.  When I use
> a CheckBox and set it to be disabled it has no effect.  The object is drawn
> the same way with true as it is drawn with false in the enabled/setClickable
> parameter, the callbacks for the touch events work the same, the
> object continues to respond to onClick and onCheckedChange events when it is
> supposed to be disabled.  This looks like a bug to me.
>
> Has anybody got the setEnabled(false) or setClickable(false) methods working
> on a CheckBox?  Any workaround or explanation would be helpful.
>
> Thanks and regards,
> Beth
>
> --
>
> Rita Rudner <http://www.brainyquote.com/quotes/authors/r/rita_rudner.html>
> - "I was a vegetarian until I started leaning toward the sunlight."
--~--~-~--~~~---~--~~
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: Activity / Screen rotation relationship

2009-07-02 Thread Jack Ha
When you switch from portrait to landscape mode or vice-versa, your
activity's onDestroy() and onCreate() will be called.

--
Jack Ha
Open Source Development Center
・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 Jul 2, 7:13 am, csyperski  wrote:
> I have a very simple app activity within an app where there is a
> single Buttton and an Edit Text used for a user to enter a pin code.
> Here is my issue, everything works great if the app is kept in
> portrait mode, but if the screen is rotated to landscape mode it seems
> like another instance of the activity is being pushed onto the stack,
> because if you enter the valid pin code the activity does a:
>
> setResult( RESULT_OK );
> finish();
>
> But returns to (what seems) another instance of the same activity but
> with the text field cleared.  Maybe I am just not understanding that
> is happening in the activity lifecycle here, if someone could shed
> some light?  Below is the bulk of the code:
>
> private SharedPreferences prefs;
> private String strPin;
>
>     protected void onCreate(Bundle savedInstanceState)
>     {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.andpinlogin);
>         prefs =  PreferenceManager.getDefaultSharedPreferences
> (this);
>
>             Button btn = (Button)findViewById(R.id.Button01);
>             btn.setOnClickListener(this);
>
>             strPin = prefs.getString("pin", "");
>     }
>
>         @Override
>         public void onClick(View arg0)
>         {
>                 if( arg0 instanceof Button )
>                 {
>                         EditText txt = 
> (EditText)findViewById(R.id.EditText01);
>                         if ( txt != null )
>                         {
>                                 String strText = txt.getText().toString();
>                                 if ( strText != null )
>                                 {
>                                         if ( 
> strText.trim().compareToIgnoreCase(strPin)==0)
>                                         {
>                                                 setResult( RESULT_OK );
>                                                 finish();
>                                         }
>                                         else
>                                         {
>                                                 Toast.makeText(this, "Invalid 
> pin code", Toast.LENGTH_LONG).show
> ();
>                                         }
>                                 }
>                         }
>
>                 }
>         }
>
> Thanks again to anyone that can help me out!
--~--~-~--~~~---~--~~
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 files

2009-07-01 Thread Jack Ha

Hi Luca,

You may want to take a look at the VideoViewDemo and MediaPlayerDemo
sample apps that are part of ApiDemos.

--
Jack Ha
Open Source Development Center
・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 Jul 1, 2:26 am, Luca  wrote:
> Hi,
>
> I am trying to play a video file using the following code:
>
> MediaPlayer mp = MediaPlayer.create(v.getContext(), R.raw.myvideo);
> mp.start();
>
> I have tried both an mp4 file and a 3gp file. But when the file plays
> I can hear it but I cannot see it... Do I have to do something else to
> give it a surface to render upon? I have followed the instructions in
> the dev guide but to no avail.
>
> 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: How can I detect a Landscape and portrait mode in Android?

2009-06-28 Thread Jack Ha

getResources().getConfiguration().orientation

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

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


On Jun 26, 6:05 am, hani  wrote:
> How can I know a Landscape and portrait mode in Android
> programmatically?
> When I flip on or off using G1, the Android recall onCreate method.
> When it happens, how can I know the mode ?
> Is there any API in Activity to know the mode?
> The below method is not called automatically.
>
> public void onConfigChanges(Configuration newConfig)
> public void onConfigurationChanged(Configuration newConfig)
>
> 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: How to test Sipdroid using an emulator?

2009-06-28 Thread Jack Ha

Assuming you've already downloaded the SipDroid source (not apk).

http://code.google.com/p/sipdroid/source/checkout

In Eclipse,

1. Select the File->Import menu item
2. Expand the "General" group and select "Existing Projects into
Workspace"
3. Click on the Next button
4. Make sure the "Select root directory" checkbox is selected
5. Click on the "Browse..." button, navigate to your SipDroid
project folder and select it

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

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


On Jun 27, 6:16 am, Personality  wrote:
> Thank you for your response. But intention is to run the application using
> the ADT plugin in Eclipse (which includes the emulator). How do I add this
> application package as an Eclipse project? I think if I can succeed to that
> point- then I can complete the work.
>
> On Sat, Jun 27, 2009 at 8:11 AM, Nicholas Radford 
> > wrote:
> > assuming you have a .apk file
> > adb install 
>
> > example
>
> > adb install myPackage.apk
>
> > This will require the emulator to have been started, and no android devices
> > connected via usb.
>
> > On Fri, Jun 26, 2009 at 2:57 AM, Personality  wrote:
>
> >> Hello. I have downloaded Sipdroid and I want to test how it works so that
> >> I can learn some of the skills that have been used in its development. The
> >> problem is- I cannot load the program into the Android emulator. While I
> >> know how to create a new folder myself and work with the emulator, how can 
> >> I
> >> load this program into the emulator? (FYI: I am using emulator within
> >> Eclipse).
>
> >> Please assist...
--~--~-~--~~~---~--~~
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: Issues with Hello World

2009-06-08 Thread Jack Ha

Do you see any error messages in the Console?


--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

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



On Jun 6, 7:03 pm, Fahd  wrote:
> Hi All,
>
> I am following the hello world example and when I run it through
> eclipse, the emulater starts showing android...
> then it comes in to the system and asks me to press menu to unlock.
> When I do it, it justs unlocks but there no helloworld or application
> window, just the normal android desktop! Am I missing somthing??
>
> Following is the code I am running (which is the copy of the example)
>
> package com.example.helloandroid;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
>
> public class HelloAndroid extends Activity {
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> TextView tv = new TextView(this);
> tv.setText("Hello, Android");
> setContentView(tv);
> //setContentView(R.layout.main);
> }
>
> }
>
> Why isnt the helloworld window coming?? Any help plss
>
> Fahd
--~--~-~--~~~---~--~~
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: Setting up AVD?

2009-06-05 Thread Jack Ha

Have you installed Java on your machine? You need to make sure java is
your PATH or the JAVA_HOME environment variable is defined.

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

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



On Jun 4, 6:32 am, "alexanderwigm...@googlemail.com"
 wrote:
> Hey all.
> (I'm using windows vista)
> I'm trying to create the hello word app.
>
> I set my cmd enviromental variable to the android SDK location, (C:
> \Android\android-sdk-windows-1.5_r2)
> In cmd I paste the following:
> "android create avd --target 2 --name my_avd"
> Then  I get the following error:
>
> Microsoft Windows [Version 6.0.6001]
> Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
>
> C:\Users\Alex>android create avd --target 2 --name my_avd
> 'java' is not recognized as an internal or external command,
> operable program or batch file.
>
> "C:\users\alex... Just noticed that, shouldn't it be? c:\android?
--~--~-~--~~~---~--~~
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: sdk version

2009-06-03 Thread Jack Ha

Assuming you are using Windows. In Eclipse, click on Windows-
>Preferences. Then click on Android in the left pane and it will show
you the SDK Location on the right pane. Android is usually unpacked in
a directory called android-sdk-windows-. The  number
indicates which SDK version your Eclipse is using.

Hope that helps.

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

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



On Jun 4, 12:02 pm, "MMC2"  wrote:
> Yes but my question is can the version be checked at a later time or do you
> have to rely on the memory of the person who installed it.
>
> Mike
>
> - Original Message -
> From: "Jack Ha" 
> To: "Android Beginners" 
> Sent: Wednesday, June 03, 2009 11:46 AM
> Subject: [android-beginners] Re: sdk version
>
> > When you set up your SDK Location in Eclipse, you should know which
> > SDK version you are using.
>
> > --
> > Jack Ha
> > Open Source Development Center
> > ・T・ ・ ・Mobile・ stick together
>
> > The views, opinions and statements in this email are those of the
> > author solely in their individual capacity, and do not necessarily
> > represent those of T-Mobile USA, Inc.
>
> > On Jun 3, 6:39 am, MMC2  wrote:
> >> I am using Android and Eclipse. How can I check which version of the
> >> android SDK that is installed?
>
>
--~--~-~--~~~---~--~~
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: sdk version

2009-06-03 Thread Jack Ha

When you set up your SDK Location in Eclipse, you should know which
SDK version you are using.

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

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


On Jun 3, 6:39 am, MMC2  wrote:
> I am using Android and Eclipse. How can I check which version of the
> android SDK that is installed?
--~--~-~--~~~---~--~~
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: Where do i put Audio Files.

2009-05-25 Thread Jack Ha (T-Mobile USA)

How big are your audio files?

You should be able to place them in the res/raw folder and get to them
with:

getResources().openRawResource(R.raw.);


--
Jack Ha
Open Source Development Center
・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 May 25, 10:21 pm, Freshman  wrote:
> Hi guys,
>
> I am new to android and i need to play list of audio files in my
> application.
> but i am bit confused where to put all the audio files as its large in
> size.
>
> any help/info regarding this greatly appreciated.
>
> many thax,
> Freshman
--~--~-~--~~~---~--~~
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: Intent.ACTION_SEND with SMS or Email

2009-05-25 Thread Jack Ha (T-Mobile USA)

You won't be able to do that since EXTRA_TEXT will override sms_body.

You can always implement your own chooser by getting a list of
activities from the system that supports ACTION_SEND.

Intent sendIntent = new Intent(Intent.ACTION_SEND, null);
sendIntent.addCategory(Intent.CATEGORY_DEFAULT);
sendIntent.setType("text/plain");
PackageManager pm = getPackageManager();
List activityList = pm.queryIntentActivities
(sendIntent, 0);

--
Jack Ha
Open Source Development Center
・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 May 25, 7:51 am, "mars.martian"  wrote:
> Hi, I'm using a Chooser to let the use send text through Messaging or
> possible Email/Gmail but I am having problems specifying a Messaging
> version of the text, right now my code looks like:
>
> Intent msg = new Intent(Intent.ACTION_SEND);
> msg.setType("text/plain");
> msg.putExtra(Intent.EXTRA_TEXT, "email body");
> msg.putExtra(Intent.EXTRA_SUBJECT, "email subject");
> msg.putExtra("sms_body", "sms body");
> startActivity(Intent.createChooser(msg, "chooser title"));
>
> with this code, the Messaging app can be launched but will default to
> the message "email body" rather than the preferred "sms body". My
> instinct is to have separate actions to the user for sending an email
> or an sms. Is there anything else to do?
--~--~-~--~~~---~--~~
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: Open txt file from res/raw

2009-05-25 Thread Jack Ha (T-Mobile USA)

Is there a specific reason why you would like to convert it to a File?


--
Jack Ha
Open Source Development Center
・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 May 25, 10:57 am, kaloer  wrote:
> Hi,
> How do I read a txt-file from the res/raw-directory? Is it possible to
> get the file's directory, or how do I add it as a File? I guess I
> should do something like this:
>
> Resources myResources = getResources();
> File myFile = new File(myResources.openRawResource(R.raw.myFile);
>
> But it returns an InputStream. Is it possible to convert this to a
> File, or get it's directory?
>
> Thank you very much,
> //Kaloer
--~--~-~--~~~---~--~~
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: TextView scrolling

2009-05-22 Thread Jack Ha (T-Mobile USA)

You can put your TextView inside a ScrollView and modify your code as
follows:


for( int x = 1; x < 100; x++ )
{
outputField.append( x + "\n" );
scrollView.post(new Runnable() {
public void run() {
scrollView.smoothScrollBy(0, 60);
}
    });
}


--
Jack Ha
Open Source Development Center
・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 May 22, 10:35 am, Greg Donald  wrote:
> On Wed, May 20, 2009 at 9:21 PM, Greg Donald  wrote:
> > How do I make my TextView scroll as I append new lines?  Here's my
> > code that doesn't work yet:
>
> > final TextView outputField = (TextView) findViewById( R.id.outputTextView );
>
> > outputField.setMovementMethod( ScrollingMovementMethod.getInstance() );
>
> > for( int x = 1; x < 100; x++ )
> > {
> >  outputField.append( x + "\n" );
> >  outputField.scrollTo( 0, x * 60 );
> > }
>
> > Do I need to repaint or redraw or something?
>
> Anyone?
>
> --
> Greg Donaldhttp://destiney.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: is there alternative to SimpleCursorAdapter?

2009-05-22 Thread Jack Ha (T-Mobile USA)

You can create your own Adapter class (by extending BaseAdapter) and
do your formatting in the getView() function.


--
Jack Ha
Open Source Development Center
・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 May 21, 11:01 am, Kent Yip  wrote:
> i have the code below which almost done everything i wanted, but i want to
> be able to alter one of the field(KEY_TIME) to a more readable format.
>
> because the value in column KEY_TIME is gonna be in milliseconds, simply
> displaying the large value is not ready to user.
>
> private void fillData() {
>
>         Cursor notes= mDbHelper.fetchAllNotes();
>         startManagingCursor( tasksCursor );
>
>         String[] from = new String[] {ToDoDbAdapter.KEY_TITLE,
>                                       ToDoDbAdapter.KEY_LABEL,
>                                       ToDoDbAdapter.KEY_NOTE,
>                                       ToDoDbAdapter.KEY_TIME};
>         int[] to = new int[] {R.id.task, R.id.label, R.id.note, R.id.time};
>
>         SimpleCursorAdapter noteAdapter =
>             new SimpleCursorAdapter( this, R.layout.list_row, notes, from,
> to);
>
>         setListAdapter( noteAdapter );
>
>     }// end fillData() method
>
> 
>
> i want to try something like this
>
>         for(notes.moveToFirst(); notes.isAfterLast(); notes.moveToNext()){
>             // do all the formatting i want to each fields
>             // add it to the list
>         }
>
> then set the adapter, the list has to be selectable for editing.
>
> is simply don't get how to tie the list with the cursor adapter and the
> list_row.xml i prepared
>
> please help me out with some example
--~--~-~--~~~---~--~~
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: Where is MapView JavaDoc

2009-05-22 Thread Jack Ha (T-Mobile USA)

http://code.google.com/android/add-ons/google-apis/


--
Jack Ha
Open Source Development Center
・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 May 22, 8:28 am, arnouf  wrote:
> Hi all,
>
> Can you tell me where I can find the Javadoc for
> com.google.android.maps.* package?
--~--~-~--~~~---~--~~
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: Modal Window

2009-05-21 Thread Jack Ha (T-Mobile USA)

If I understand your question correctly, just specify the following
attribute for your activity in the AndroidManifest.xml file:

android:theme="@android:style/Theme.Dialog"


--
Jack Ha
Open Source Development Center
・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 May 21, 10:36 pm, RTX  wrote:
> Hi Guys
> please help
>
> im trying to implement a modal window with activity
> instead of a fullscreen activity
>
> i saw something with window manager and inflate
> but i didnt get it
>
> any chance anyone allready got that
>
> 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: Phone number from URI

2009-05-21 Thread Jack Ha (T-Mobile USA)

You can do something like the following:

Uri uri = Uri.parse("content://contacts/phones/1");
Cursor c = managedQuery(uri, null, null, null, null);

if (c.moveToFirst()) {
do {

// c.getString(1) is the phone #

} while (c.moveToNext());
    }


--
Jack Ha
Open Source Development Center
・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 May 21, 8:19 pm, Ambarish  Malpani  wrote:
> Hi Guys,
>  I have a URI for a phone number. Something like: 
> content://contacts/phones/687
>
> How do I get the actual phone number from this URI?
>
> Thanks,
> Ambarish
--~--~-~--~~~---~--~~
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: Exception in Code

2009-05-21 Thread Jack Ha (T-Mobile USA)

There are a couple of problems in your onResume() function.

1. It should call super.onResume()

2. Change

LocationManager manager = (null);
getSystemService(Context.LOCATION_SERVICE);

   to

LocationManager manager = (LocationManager)getSystemService
(Context.LOCATION_SERVICE);


And make sure you request the following permission in your
AndroidManifest.xml file.





--
Jack Ha
Open Source Development Center
・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 May 21, 6:11 am, Gopal  wrote:
> I have try the code But i am facing from this exception:
> Firstly thanks for the code:
> And thanks in Advance:
>
> Please give me the correct direction where i am wrong please help me.
>
> My code is :
> .java
> package org.apache.sms;
> import android.app.Activity;
> import android.content.Context;
> import android.location.Location;
> import android.location.LocationListener;
> import android.location.LocationManager;
> import android.os.Bundle;
> import android.view.View;
> import android.widget.LinearLayout;
> import android.widget.TextView;
> import android.widget.LinearLayout.LayoutParams;
>
>  public class SMSApp extends Activity {
>private TextView messageView;
>
>public class WhereamiLocationListener implements LocationListener {
>
>  public void onLocationChanged(Location location) {
>if (location != null) {
>  messageView.setText(location.toString());
>}
>  }
>
>  public void onProviderDisabled(String provider) {
>// TODO Auto-generated method stub
>
>  }
>
>  public void onProviderEnabled(String provider) {
>// TODO Auto-generated method stub
>
>  }
>
>  public void onStatusChanged(String provider, int status, Bundle
>  extras) {
>// TODO Auto-generated method stub
>
>  }
>
> }
>@Override
>   public void onResume() {
>WhereamiLocationListener listener = new WhereamiLocationListener
> ();
> LocationManager manager = (null);
> getSystemService(Context.LOCATION_SERVICE);
>
> long updateTimeMsec = 1000L;
>  manager.requestLocationUpdates
> (LocationManager.GPS_PROVIDER,
>  updateTimeMsec, 500.0f,
>  listener);
>  manager.requestLocationUpdates
> (LocationManager.NETWORK_PROVIDER,
>   updateTimeMsec, 500.0f,
> listener);
>}
>
>@Override
>   public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(makeContentView());
>   }
>
>  private View makeContentView() {
> LinearLayout panel = new LinearLayout(this);
> panel.setLayoutParams(new LayoutParams
> (LayoutParams.WRAP_CONTENT,
> LayoutParams.WRAP_CONTENT));
> panel.setOrientation(LinearLayout.VERTICAL);
> panel.addView(makeMessageView());
> return panel;
>  }
>
>   private View makeMessageView() {
> messageView = new TextView(this);
> messageView.setText("Loading...");
> return messageView;
>   }
>
>   private void updateWithNewLocation(Location location) {
>   String latLongString;
>if (location != null) {
>  double lat = location.getLatitude();
>  double lng = location.getLongitude();
>  latLongString = "Lat: " + lat + "\nLng: " + lng;
>} else {
>  latLongString = "No Location Found";
>}
>messageView.setText("Your Current Location is:\n" +
> latLongString);
>  }
>}
> 
> *---
>
> .manifest file
> 
>
> http://schemas.android.com/apk/res/android";
>
>   package="org.apache.sms"
>
>   android:versionCode="1"
>
>   android:versionName="1.0.0">
>
> 
>
> 
>   android:label="@string/app_name">
>
> 
>
> 
>
>  android:name="android.intent.category.LAUNCHER" />
>
> 
>
> 
>  permission>
>

[android-beginners] Re: Emulator launch error in HelloAndroid tutorial

2009-05-07 Thread Jack Ha (T-Mobile USA)

Have you installed JDK on your machine? If not, you can download it
from here:

http://java.sun.com/javase/downloads/index.jsp

--
Jack Ha
Open Source Development Center
・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 May 7, 6:07 am, Dennis Christy  wrote:
> When I type the following into the cmd prompt:
> c:\...android-sdk-windows-1.5_r1\tools>android
> It gives me the following message:
> 'java' is not recognized as an internal or external command, operable
> program or batch file
>
> On Thu, May 7, 2009 at 5:49 AM, Sean Hodges 
> wrote:
>
>
>
>
>
> > You may need to set your JAVA_HOME environment variable.
>
> > What is the exact error you're getting?
>
> > On Thu, May 7, 2009 at 1:40 PM, Dennis Christy 
> > wrote:
> > > I'm sorry, I did not explain my problem completely. I just want to create
> > > the AVD so I can run the tutorial. Opening the terminal window in Vista
> > does
> > > not allow me to type in the create avd command, even though I have
> > changed
> > > the directory to the tools directory in the sdk. It tells me it cannot
> > run a
> > > Java app.
> > > I just want to create the AVD in whatever way I can. How do I do it?
>
> > > On Thu, May 7, 2009 at 5:20 AM, Marcos Lobo  wrote:
>
> > >> Hi,
>
> > >> To open a terminal in Windows Vista:
>
> > >> Click on "Start button" and type on the text area next command: cmd
>
> > >> The "cmd" open the terminal
>
> > >> Cheers.
>
> > >> 2009/5/7 Dennis Christy 
>
> > >>> I get the following error in attempting to run the HelloAndroid
> > tutorial:
> > >>> "Failed to find an AVD compatible with target 'Android 1.5', Launch
> > >>> aborted"
>
> > >>> I have read the documention and the emails in re this problem, and I
> > see
> > >>> the fix is to create an AVD by opening a terminal window and typing
> > >>> "android create avd --target 1--name myavd"
> > >>> however I cannot figure out how to open a terminal window in Windows
> > >>> Vista
>
> > >>> --
> > >>> Dennis Christy
>
> > >> --
> > >> Un saludo.
>
> > >> --
> > >> Dennis Christy
>
> --
> Dennis Christy
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   >