[android-beginners] Hierarchy Viewer

2009-09-17 Thread manigault

I try to use Hierarchy Viewer tool and for the simulator it works fine
but for the real phone it doesn't. When i started the real device is
listed in the section with the devices but when i press start server
the server doesn't start, no logs on the console also.
--~--~-~--~~~---~--~~
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: Manifest file

2009-09-17 Thread senrooy

In which cases I can modify this file? I have done some basic android
applications but I didn't modify this file and applications worked
fine. For what reason we should modify this file?

On Sep 17, 4:06 pm, Mark Murphy mmur...@commonsware.com wrote:
 senrooy wrote:
  I am new to android. I am using SDK and eclipse with ADT plug-ins for
  the first time. I want to know what is the significance of the
  AndroidManifest.xml file which is created automatically when we create
  an android project.

 There is a Web page in the Android documentation that covers this:

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

  Can we modify this file for any reason?

 You can modify it when you need to. If you are using Eclipse, it may
 make some modifications for you, but other changes you may need to make
  yourself.

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

 _Android Programming Tutorials_ Version 1.0 In Print!
--~--~-~--~~~---~--~~
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: Terminate call programmatically

2009-09-17 Thread Ajaz Ahmed
Thank you!


On Thu, Sep 17, 2009 at 4:12 PM, Mark Murphy mmur...@commonsware.comwrote:


 Ajaz Ahmed wrote:
  Hi,
 
  Can any one tell me how can i hangup/terminate call programmatically?
  With the help of intent.

 1. Please do not cross-post. Post to a single list only, and only post
 to another list if you do not get a response in a reasonable period of
 time (e.g., 1 day).

 2. You cannot hangup/terminate call programmatically from an SDK
 application.

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

 _Android Programming Tutorials_ Version 1.0 In Print!

 


--~--~-~--~~~---~--~~
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] SMS Receiver

2009-09-17 Thread King of Camelot

So I was playing around with some sample code I found on the net for
receiving SMS in your app when I noticed that the sample was using the
deprecated android.telephony.gsm.SmsMessage. I figured it'd be a
simple change to make it use android.telephony.SmsMessage instead so I
changed the import and everything compiled just fine.

However, when I ran the app, it crashed when an SMS was received.
After playing around with it for quite a while I can not seem to
figure out why it doesn't work with the changed import.

Here's the code in question (not my code, it was in a sample online,
but I don't have the URL):

public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();

Object messages[] = (Object[]) bundle.get(pdus);
SmsMessage smsMessage[] = new SmsMessage[messages.length];
for (int n = 0; n  messages.length; n++) {
smsMessage[n] = SmsMessage.createFromPdu((byte[]) messages
[n]);
}

// show first message
Toast toast = Toast.makeText(context,
Received SMS: + smsMessage[0].getDisplayOriginatingAddress
(), Toast.LENGTH_LONG);
toast.show();
}

One bit I did notice was that the non-deprecated SmsMessage class does
not have a public constructor, which seemed to give the creation of
the SmsMessage array some problems. However, even after removing
everything except the SmsMessage.createFromPdu line the app was still
crashing.

Does anyone have any insight into what's different between the two
SmsMessage classes that is causing this?

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: Development Phone

2009-09-17 Thread pro

Thanks Mark,

First google seems to ran out of stock for dev phone, and if I recall
the site instruction does not quite explain - rooting or whatever
needed, third for some of us are already buried down to bargain
basement so ebay or other sites seems to be logical alternatives :)

Is there any pointer for rooting technique? What does it mean?  ---
I know how to get going with openmoko, but for unlocked commercial
phone I would love to hack a bit, so that I can build the kernel and
infrastructure and flush it, so any link to any rooting technique.

For the emulator, then there must be a way to tell the canvas sizes
( i.e 360x480  or something )???

-pro

On Sep 17, 3:00 am, Mark Murphy mmur...@commonsware.com wrote:
 pro wrote:

  I'm also very new to Android. And I would like to have the following -

  1) I want to add and / or del any apps I want to - For this just any
  phone would do it? Or I need an unlocked one?

 All existing Android devices allow you to install third party
 applications and remove those third party applications.

  2) I would also like to craft part of OS and / or base framework - For
  this, Is it enough to have an unlocked phone ? I'm getting a T mobile
  G1 unlocked, is it fine for (2)?

 You can either get an actual developer phone (ADP1 or Google Ion) that
 allows for firmware flashing, or you can get a consumer phone and use
 the various rooting techniques.

  3) I think the emulator should allow us to test out various form
  factors, since it might not be possible to buy and test all available
  phones out there...

 It does, for the form factors that are officially supported by Android.

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

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



[android-beginners] Re: Development Phone

2009-09-17 Thread AngelOD

On Sep 16, 1:31 pm, Mark Murphy mmur...@commonsware.com wrote:
 I have seen no evidence that HTC makes firmware upgrades available
 directly. They always handle that through whoever distributed the device
 (e.g., T-Mobile for the T-Mobile myTouch3G version of the Magic). So, if
 you got your device from your carrier, I would expect the carrier will
 say when and how to upgrade it, assuming they support such an upgrade.

Erm.. Normally you definitely know what you're talking about, but in
this case, I'll have to say you really don't. Sorry. :)

HTC released an update to the Hero firmware less than a week ago. It's
not the 1.6 release, obviously, but it -does- goes to show that they -
do- make upgrades, instead of relying on the carriers to do that.
Proof would be here..

Europe: http://www.htc.com/europe/SupportViewNews.aspx?dl_id=671news_id=254
Nordic: http://www.htc.com/dk/SupportViewNews.aspx?dl_id=671news_id=254

From what I can see there's no such upgrade for the Hero in the US...
I dunno, maybe the carriers have made different rules for their
phones? After all, they -did- give the HTC Hero a silly name. ;)

Btw, love your books! ^^

- Tristan Bendixen
--~--~-~--~~~---~--~~
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] captured image is strected to fit it to the screen

2009-09-17 Thread Sriniamul Senthil

Hi,

I captured a image in landscape mode [keyboard is not hidden], and i am in 
preview screen and I close the keyboard. I observed that the image captured is 
streched to fit to screen in a portrait mode.

Where does this aspect ratio is maintained in a framework ?

Thanks  Regards,
S.Sriniamul


  Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew

--~--~-~--~~~---~--~~
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: Development Phone

2009-09-17 Thread pro

Thank you very much. That covers my questions.

-pro

On Sep 17, 5:55 am, Jeffrey Blattman jeffrey.blatt...@gmail.com
wrote:
 On 9/16/09 8:32 PM, pro wrote:

  I'm also very new to Android. And I would like to have the following -

  1) I want to add and / or del any apps I want to - For this just any
  phone would do it? Or I need an unlocked one?

 unlocked means it is not tied to a particular provider, so that is
 irrelevant to the question. you can normally add / remove any apps you
 want on a standard android phone.

 i've heard that if your phone is rooted (google if you don't know what
 that means), then you can only add non-copy protected apps. my phone is
 rooted and i've never found an app that won't install, so i'm not sure
 if this not true anymore or if no one chooses to copy protect their apps. 2) 
 I would also like to craft part of OS and / or base framework - For
  this, Is it enough to have an unlocked phone ? I'm getting a T mobile
  G1 unlocked, is it fine for (2)?

 you need a rooted phone to patch / install a new OS. yes, the G1 from
 t-mobile is fine. you'll need to go through the rooting process. 3) I think 
 the emulator should allow us to test out various form
  factors, since it might not be possible to buy and test all available
  phones out there...

 http://www.android.encke.net/

  -pro

 --
--~--~-~--~~~---~--~~
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: Development Phone

2009-09-17 Thread Mark Murphy

AngelOD wrote:
 On Sep 16, 1:31 pm, Mark Murphy mmur...@commonsware.com wrote:
 I have seen no evidence that HTC makes firmware upgrades available
 directly. They always handle that through whoever distributed the device
 (e.g., T-Mobile for the T-Mobile myTouch3G version of the Magic). So, if
 you got your device from your carrier, I would expect the carrier will
 say when and how to upgrade it, assuming they support such an upgrade.
 
 Erm.. Normally you definitely know what you're talking about, but in
 this case, I'll have to say you really don't. Sorry. :)
 
 HTC released an update to the Hero firmware less than a week ago. It's
 not the 1.6 release, obviously, but it -does- goes to show that they -
 do- make upgrades, instead of relying on the carriers to do that.
 Proof would be here..
 
 Europe: http://www.htc.com/europe/SupportViewNews.aspx?dl_id=671news_id=254
 Nordic: http://www.htc.com/dk/SupportViewNews.aspx?dl_id=671news_id=254

IIRC, this thread originated with inquiring about upgrading Android
versions, and I see no upgrades on HTC's site that would do that. For
example, AFAIK, the HTC Dream was sold in Europe before Android 1.5
shipped, but the only download for it is an HTC Sync Upgrade, which does
not sound like Android 1.5.

So, you are correct that I made a broader-than-necessary claim in the
above-quoted passage. I apologize to anyone I confused.

If you can find evidence that HTC ships ROM upgrades that include
Android version upgrades (e.g., 1.5), let me know!

 From what I can see there's no such upgrade for the Hero in the US...
 I dunno, maybe the carriers have made different rules for their
 phones?

I suspect that is the case. US mobile carriers, at least, seem to play
by different rules than European carriers, for better and for worse.

 Btw, love your books! ^^

Thanks!

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

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

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



[android-beginners] Re: Development Phone

2009-09-17 Thread Chris Stratton

On Sep 17, 8:55 am, Jeffrey Blattman jeffrey.blatt...@gmail.com
wrote:

 unlocked means it is not tied to a particular provider, so that is
 irrelevant to the question. you can normally add / remove any apps you
 want on a standard android phone.

I don't think you will be able to remove the applications that ship
with the phone unless you build and flash new system images, and for
that you will need root or a bootloader that lets you flash unsigned
firmware.
--~--~-~--~~~---~--~~
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: Terminate call programmatically

2009-09-17 Thread Mark Murphy

Chris Stratton wrote:
 On Sep 17, 7:12 am, Mark Murphy mmur...@commonsware.com wrote:
 
 2. You cannot hangup/terminate call programmatically from an SDK
 application.
 
 Can you turn off the radio / enter airplane mode?   Or will that only
 pop up a dialog for the user?

I think you can programmatically enter airplane mode through
Settings.System, though I have not tried it. However, to hang up a phone
call, going into airplane mode is a bit aggressive -- you take out WiFi,
Bluetooth, and perhaps GPS (not sure if airplane mode affects that).

In terms of turning off just the GSM/CDMA radio...there might be a way,
but I don't know how.

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

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

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



[android-beginners] Re: Terminate call programmatically

2009-09-17 Thread Chris Stratton

On Sep 17, 7:12 am, Mark Murphy mmur...@commonsware.com wrote:

 2. You cannot hangup/terminate call programmatically from an SDK
 application.

Can you turn off the radio / enter airplane mode?   Or will that only
pop up a dialog for 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: Development Phone

2009-09-17 Thread Jeffrey Blattman




yes you are right.

On 9/17/09 8:03 AM, Chris Stratton wrote:

  
On Sep 17, 8:55am, Jeffrey Blattman jeffrey.blatt...@gmail.com
wrote:

  
  
unlocked means it is not tied to a particular provider, so that is
irrelevant to the question. you can normally add / remove any apps you
want on a standard android phone.

  
  
I don't think you will be able to remove the applications that ship
with the phone unless you build and flash new system images, and for
that you will need root or a bootloader that lets you flash unsigned
firmware.
--~--~-~--~~~---~--~~
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] Unknown host www.google.com (was Re: debug.keystore is missing)

2009-09-17 Thread Jeffrey Blattman




after changing the SDK directory back and forth, the SDK was reloaded
and the debug.keystore was created. now i'm back to the unknown host
exception for google,

09-17 11:16:07.003: INFO/InetAddress(756): Unknown host www.google.com,
throwing UnknownHostException

repeated over and over.

On 9/17/09 10:44 AM, Jeffrey Blattman wrote:

  
today i started a new eclipse project. setup the map activity, and used
the same API key as my other projects. map was blank, and oddly, in the
logs i see unknown host exceptions from google.com. i tested the
browser, and google.com resolves fine.
  
after re-creating my API key with no success still, i uninstalled ADT
from eclipse and removed ~/.android, removed from AVD. then the
reverse, install the ADT, and create a new AVD.
  
however, now ~/.android doesn't contain debug.keystore. there must be a
keystore somewhere, as my apps still launch, but any map view fails ...
this time no unknown host exception, just no map (typical of having an
invalid API key). 
  
?
  
i should note that i upgraded to 1.5r3 at some point in the recent
past.
yes keytool is in my path.
  
  -- 
  


-- 





[android-beginners] Re: Unknown host www.google.com (was Re: debug.keystore is missing)

2009-09-17 Thread Jeffrey Blattman




ugh. never mind. permissions?

On 9/17/09 11:17 AM, Jeffrey Blattman wrote:

  
after changing the SDK directory back and forth, the SDK was reloaded
and the debug.keystore was created. now i'm back to the unknown host
exception for google,
  
09-17 11:16:07.003: INFO/InetAddress(756): Unknown host www.google.com,
throwing UnknownHostException
  
repeated over and over.
  
On 9/17/09 10:44 AM, Jeffrey Blattman wrote:
  

today i started a new eclipse project. setup the map activity, and used
the same API key as my other projects. map was blank, and oddly, in the
logs i see unknown host exceptions from google.com. i tested the
browser, and google.com resolves fine.

after re-creating my API key with no success still, i uninstalled ADT
from eclipse and removed ~/.android, removed from AVD. then the
reverse, install the ADT, and create a new AVD.

however, now ~/.android doesn't contain debug.keystore. there must be a
keystore somewhere, as my apps still launch, but any map view fails ...
this time no unknown host exception, just no map (typical of having an
invalid API key). 

?

i should note that i upgraded to 1.5r3 at some point in the recent
past.
yes keytool is in my path.

-- 

  
  
  -- 
  


-- 





[android-beginners] Crash when trying to add to dictionary within a Dialog

2009-09-17 Thread Horchata Factory

I have a custom dialog which contains an EditText control in it. If I
type something inside it, do a long press, and choose to add the word
to the dictionary, it crashes with this exception:

09-17 18:03:35.765: WARN/dalvikvm(994): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): Uncaught handler:
thread main exiting due to uncaught exception
09-17 18:03:35.775: ERROR/AndroidRuntime(994):
android.util.AndroidRuntimeException: Calling startActivity() from
outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK
flag. Is this really what you want?
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.app.ApplicationContext.startActivity(ApplicationContext.java:
627)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.content.ContextWrapper.startActivity(ContextWrapper.java:236)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.widget.TextView.onTextContextMenuItem(TextView.java:6961)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.widget.TextView$MenuHandler.onMenuItemClick(TextView.java:
6853)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:
133)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
com.android.internal.view.menu.MenuBuilder.performItemAction
(MenuBuilder.java:813)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
com.android.internal.view.menu.MenuDialogHelper.onClick
(MenuDialogHelper.java:120)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
com.android.internal.app.AlertController$AlertParams$3.onItemClick
(AlertController.java:884)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.widget.AdapterView.performItemClick(AdapterView.java:283)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.widget.ListView.performItemClick(ListView.java:3132)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.widget.AbsListView$PerformClick.run(AbsListView.java:1620)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.os.Handler.handleCallback(Handler.java:587)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.os.Handler.dispatchMessage(Handler.java:92)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.os.Looper.loop(Looper.java:123)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
android.app.ActivityThread.main(ActivityThread.java:3948)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
java.lang.reflect.Method.invokeNative(Native Method)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
java.lang.reflect.Method.invoke(Method.java:521)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-17 18:03:35.775: ERROR/AndroidRuntime(994): at
dalvik.system.NativeStart.main(Native Method)

Is there a way to have a custom dialog with an EditText that won't
throw an exception when the user adds a word to the dictionary? I know
I can remove that option if I set the inputType to textEmailAddress,
but in my case, I must set inputType to textPersonName
--~--~-~--~~~---~--~~
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: About ERROR: unknown virtual device name: 'myavd'

2009-09-17 Thread Bruno Cordeiro

Mr Ducrohet,

  Thank, this solution worked for me!!

On 25 ago, 20:41, Xavier Ducrohet x...@android.com wrote:
 I see that you have changed the location of the user folders (in S:
 instead of C:)

 When the user location is not the default one, we have seen some cases
 where windows reports the location of the user folder differently
 depending on which API you use (the command line tool and Eclipse use
 a Java API, while the emulator use a windows C++ API).

 You can override the behavior of both by declaring an environment
 variable called ANDROID_SDK_HOME
 Make it point to your HOME folder (S:\Documents and Settings\Phoenix\
 in this case) and both the emulator and the java based tools will read
 and write into the same folder.

 Xav



 On Tue, Aug 25, 2009 at 6:21 AM, Phoenixphoenixsen...@gmail.com wrote:

  I also have the same error.

  I've tried creating the AVD on the command line and via the gui in the
  Eclipse plugin.  Both created the AVD with no problems, but the
  emulator still cannot find it.

  I've tried running with the configuration set to Automatic, and to
  Manual and manually selecting Launch a new Android Virtual Device and
  checking the box next to 'my_avd', and the emulator still cannot find
  it.  I know it exists, I can see it in S:Documents and Settings
  \Phoenix\.android\avd\my_avd.avd

  I've tried stopping and re-starting the ADB server, stopping and re-
  starting Eclipse... nothing has fixed it.

  This is on a new setup, just set up today.  Eclipse Galileo, Android
  SDK 1.5_r3 for Windows, on XP.

  The complete console:
  [2009-08-25 06:11:11 - HelloAndroid] --
  [2009-08-25 06:11:11 - HelloAndroid] Android Launch!
  [2009-08-25 06:11:11 - HelloAndroid] adb is running normally.
  [2009-08-25 06:11:11 - HelloAndroid] Performing
  com.example.helloandroid.HelloAndroid activity launch
  [2009-08-25 06:11:11 - HelloAndroid] Automatic Target Mode: Preferred
  AVD 'my_avd' is not available. Launching new emulator.
  [2009-08-25 06:11:11 - HelloAndroid] Launching a new emulator with
  Virtual Device 'my_avd'
  [2009-08-25 06:11:12 - Emulator] emulator: ERROR: unknown virtual
  device name: 'my_avd'
  [2009-08-25 06:11:12 - Emulator] emulator: could not find virtual
  device named 'my_avd'

 --
 Xavier Ducrohet
 Android Developer Tools Engineer
 Google Inc.

--~--~-~--~~~---~--~~
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] srollbarSize ignored

2009-09-17 Thread Konstantin Burov

Hello, I have trouble when trying to change scroll bar size, here is
example:

ScrollView android:layout_width=fill_parent
android:layout_height=fill_parent android:layout_weight=1
android:scrollbarStyle=insideInset 
android:background=@drawable/
blue_border
android:layout_marginTop=20dip android:scrollbarSize=20dip
LinearLayout android:layout_width=fill_parent
android:layout_height=fill_parent 
android:orientation=vertical

/LinearLayout
/ScrollView

For some reason the android:scrollbarSize=20dip is ignored. Does
anybody knows what's the reason?

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] Error : No embedded stylesheet instruction for file

2009-09-17 Thread Mabel

Hi,

I am trying to build a simple application that prints a hello world
While trying to run I get the following error.

Also a new file  named Strings.out.xml is formed. Kindly let me what
would be the problem.

23:47:52,968 INFO  [main] Main  -
javax.xml.transform.TransformerFactory=null
23:47:52,971 INFO  [main] Main  - java.endorsed.dirs=C:\Program Files
\Java\jre6\lib\endorsed
23:47:52,983 INFO  [main] Main  - launchFile: C:\Mabel_Drive\Projects
\Android_workspace\.metadata\.plugins
\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
23:47:53,062 FATAL [main] Main  - No embedded stylesheet instruction
for file: file:/C:/Mabel_Drive/Projects/Android_workspace/Sudoku/res/
values/strings.xml
org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No
embedded stylesheet instruction for file: file:/C:/Mabel_Drive/
Projects/Android_workspace/Sudoku/res/values/strings.xml
at
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform
(JAXPSAXProcessorInvoker.java:225)
at
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform
(JAXPSAXProcessorInvoker.java:186)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main
(Main.java:73)
Caused by:
org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No
embedded stylesheet instruction for file: file:/C:/Mabel_Drive/
Projects/Android_workspace/Sudoku/res/values/strings.xml
at
org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform
(JAXPSAXProcessorInvoker.java:214)
... 2 more

--~--~-~--~~~---~--~~
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] Setting up an Android development environment on a Mac

2009-09-17 Thread oregonduckman

I am running OSX 10.5.8 and am new to Android/Eclipse/Java and need
help choosing the correct versions of Android/Eclipse SDK/IDE/Java SDK
to install.

--~--~-~--~~~---~--~~
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] Unable to stop Emulator from commandline in linux

2009-09-17 Thread Smruti

Hi,
I am unable to stop the emulator from command prompt.Can
anyone please help me in this.
I am using Linux Fedora 9.0 version and Adroid SDK Version is
1.1, Ant 1.6.5.
To start the emulator I have used following steps.
Open a terminal and go to android-sdk-linux_x86-1.1_r1/tools
and type emulator .after typing emulator ,press ENTER key.
 It will launch a Android Emulator in port 5554.
 Now my concern is to stop the Emulator which is running.I
have tried with opening another terminal and run kill -9 (process Id
for emulator running) which is not working. On click of  cross
symbol to close emulator is hanging the system and Keyboard is not
responding at all.Please help me to avoid forceful shutdown of the
system everytime just to stop an emulator.

Thanks,
Smruti


--~--~-~--~~~---~--~~
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] Open socket through gprs

2009-09-17 Thread Borut

Hi


I need to connect to a certain server with a socket connection. No
problem, that's the easy part.

The problem is that a socket should be done exclusively through gprs
connection, not through wifi.

So, is it possible to force a socket connection to be opened through
gprs signal even though a wifi is also enabled and active at the same
time?

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

2009-09-17 Thread dharmaraja.thangaraj
Hi,
 
http://developer.android.com/index.html is the prefered site for
Android.
 
you can get some tutorials at:
http://developer.android.com/guide/tutorials/hello-world.html 
 
---
Dharma,
Wipro Tech - BDC



From: android-beginners@googlegroups.com
[mailto:android-beginn...@googlegroups.com] On Behalf Of Niamathullah
sharief
Sent: Sunday, September 13, 2009 5:48 PM
To: android-beginners@googlegroups.com; maqs...@salsoft.net
Subject: [android-beginners] Re: Android tutorial


Hi maxood,

  I am not working anywhere. Just i am learning myself. Planning to
learn and develop in android. So could you please help me?








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



[android-beginners] Re: Camera Button Broadcast Receiver Problem...

2009-09-17 Thread Pradeep Kaushik
Hi Tikoze,
 You can very easily implement this feature.

Just have a simple receiver to receive the same intent as the camera that
is:

android.intent.action.CAMERA_BUTTON

In that receiver class start your required activity as required.

And, in the corresponding AndroidManifest.xml of your application declare
the receiver as below:


receiver android:name=*.TestReceiver*

intent-filter android:priority=*1*

action android:name=*android.intent.action.CAMERA_BUTTON */

/intent-filter
/receiver

The priority field tells Android to first choose the activity with the
higher priority. I have used a very large value. Maybe even a smaller value
will work.

Also, in your receiver in the first line of your onReceive itself add the
following line:

abortBroadcast();

This will set a flag to abort the broadcast so nobody else will receive it
after you.

So, by setting the priority you are telling Android to choose your receiver
first and by abortBroadcast you are cancelling the broadcast for Camera so
it wont open at all.

Hope this helps.

Thanks and Regards,

Pradeep Kaushik

Thanks and Regards
Pradeep.N.Kaushik.
Sent from New Delhi, DL, India

On Wed, Sep 16, 2009 at 9:36 AM, Tikoze janderson@gmail.com wrote:


 Obviously I understand that the ability to do that could cause some
 developers to abuse it...  And of course I would not like another
 application to unregister things that my app listens for (if it
 occurred without the user's knowledge).

 As an example, I have used an application called Task Switcher.  I
 don't know how the developer does it, but he provides a setting that
 makes his app (and only his app) launch when the camera button is
 pressed.  He lets the user know what will happen and verifies they
 want to proceed.  I found this ability very useful and handy.

 I am developing an application very similar to Task Switcher and want
 to provide the same option to launch my app from the camera button.  I
 would just prefer that the default camera didn't launch before my
 app... It makes it look like my app launched the camera and then
 itself and is very unprofessional-looking.

 Again, if any one knows how to do this, I would be very grateful.

 On Sep 15, 5:11 pm, Jeffrey Blattman jeffrey.blatt...@gmail.com
 wrote:
   seems unlikely (but i have no idea really). you wouldn't think you
 would
  have control over the intents that other apps can listen for / act upon.
  how would you like it if some other app came along and unregistered your
  app from that intent?
 
  On 9/15/09 3:40 PM, Tikoze wrote:
 
   Since there is no guarantee as to the order that applications will be
   notified, it is almost like I would have to find some way to
   unregister everything else that is listening for the camera button...
   Given Android's security measures, is that even possible?
 


--~--~-~--~~~---~--~~
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 access wireless toggle functionality

2009-09-17 Thread Bartłomiej Nowak
2009/9/14 Carl vapor.trail@gmail.com


 Hello all,

 I would like to create an application that allows the user to quickly
 toggle wireless connections ON/OFF. I found the API for wi-fi
 (android.net.wifi.WifiManager) but I am not able to find any API for
 Bluetooth and airplane modes.
 Do you have any idea where I can find such APIs or how can I have
 access to the switching functionality?

 Regards

 carl

 


--~--~-~--~~~---~--~~
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] Zxing integration is not working out :(

2009-09-17 Thread wahib

Hi. I am a newbie and trying to decode a barcode image stored in res
folder. I am using this code.

package com.example.barcodescan;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.widget.TextView;

import com.google.zxing.MonochromeBitmapSource;
import com.google.zxing.MultiFormatReader;
import com.google.zxing.qrcode.QRCodeReader;


public class barcodescan extends Activity {
/** Called when the activity is first created. */
private TextView tv;
com.google.zxing.Result result;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

tv = (TextView) findViewById(R.id.text);
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.bar2);



MultiFormatReader reader1 = new MultiFormatReader(); //for all
barcode formats
QRCodeReader reader = new QRCodeReader(); //only for QRCode
format

try
{

result = reader1.decode(new MonochromeBitmapSource(bitmap));

tv.setText(result.getText());

}
catch(Exception e)
{
tv.setText(within catch block);
}

}

}

but there is error when i uses MonochromeBitmapSource constructor. the
error is Cannot instantiate the type MonochromeBitmapSource. I dont
know how to solve it. at few sites i found using
YUVMonochromeBitmapSource but its not available in
com.example.zxing. !! I am confused. plz help

--~--~-~--~~~---~--~~
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: Development Phone

2009-09-17 Thread Bartłomiej Nowak
2009/9/16 Rafa Perfeito rafa.perfe...@gmail.com

 No T-Mobile for me. TMN from Portugal...But that means that the carrier
 itself enables the update?

 On Wed, Sep 16, 2009 at 12:23 PM, Mark Murphy mmur...@commonsware.comwrote:


 Rafa Perfeito wrote:
  I have an HTC Magic from a carrier. Can i update to
  1.6? How? Through the carrier?

 T-Mobile has not yet announced plans for Android 1.6 for any of their
 devices. At some point, in all likelihood, they will make such an
 announcement.

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

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





 --
 Cumprimentos,

 Hugo Rafael Augusto


 


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



[android-beginners] How does one change androids default language

2009-09-17 Thread kirti kaul

Hi,

Is there any way by which we can change the android's default langauge
from english to some other langauge,say french or japanese

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] Is there a Calendar View that I can use?

2009-09-17 Thread RobGThai

I'm not very good with English, I'll try to explain anyway. Sorry in
advance.

I wanted to create an Application that display calendar.
Basically, I'll store the date of the appointment in the DB, no
problem.
The display is on the other hand, I have no idea if there's a View or
something that I can call to handle the display.

I want to display the application in Monthly format(to begin with)
with Day(Mon, Tue, Wed, ...) on top, just like the default Calendar
application on the phone.
Then clicking on any date would bring up details or event on that
particular date. There I can add or remove the event on that date.

To sum up my question, I would like to know.
1. If there's such a thing that would aid me in the development?

If there is not then
2. What should I look at to help getting me start the development?
3. Is there a view that's good for the table look and feel in the
calendar? Is TableLayout suitable for what I'm doing?
4. Is there a nice tutorial about Calendar and such?

P.S. Is this kind of question belong in this Beginners group or the
Developers group?

Thank you very much.

--~--~-~--~~~---~--~~
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] video streaming from a URL

2009-09-17 Thread mar_novice

Can anyone give some sample code on how to play video from a URL? and
also kindly provide a live url. Thanks.

-mar_novice

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



[android-beginners] HTC Hero connection problem causes USB device ID to change from 0bb4:0c01 to 0bb4:0c02.

2009-09-17 Thread Chris Dew

I just wanted to post this, it took me three hours to get adb to list
my phone...

http://www.finalcog.com/htc-hero-android-adb-0bb4-0c01-ubuntu-jaunty-0bb4-0c02-problem

Did anyone else have this problem?

Chris.

--~--~-~--~~~---~--~~
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] Which version of Android?

2009-09-17 Thread oregonduckman

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] How to run system cam in Android Simulator in Ubuntu

2009-09-17 Thread Sushant

I am not able to connect my PC camera with Android Simulator camera in
ecllipse on Ubuntu Machine.
Can somebody suggest me a solution for that.Please help me i was stuck
with these problem for long time

Sushant

--~--~-~--~~~---~--~~
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] sendBroadcast compile error

2009-09-17 Thread Tim

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] How To Programmatically Reboot The Phone

2009-09-17 Thread !oEL

Hi,

I'm trying to have the phone rebooted once a button is pressed.

Currently I'm doing something like this:

// _power is the button instance
_power.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {
Intent service = new Intent();
service.setAction(Intent.ACTION_REBOOT);

startService(service);
}
});

However, it does not seem to work.

Please help, thank you in advance.

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



[android-beginners] Re: About ERROR: unknown virtual device name: 'myavd'

2009-09-17 Thread Bartłomiej Nowak
2009/9/16 Nicolas Gramlich stoeps...@gmx.de


 Hi,

 just tried this again with the ADT 0.9.3 (downloaded today) and
 Android 1.6 r1 (also from today) and in the Virtual Devices-Window I
 can see my newly created AVD with a green checker to the left: A
 valid Android Virtual Device.

 ANDROID_SDK_HOME is properly set to C:\Users\nico; for user and
 system-environment variables.

 I can also see the emulator-image being properly created in C:\Users
 \nico\.android\avd\Emu_1_6.avd\userdata.img.

 I'm using Windows7 RC 64Bit with a 64 Bit JDK and Eclipse is running
 (or has to run) with its own 32 Bit JRE.

 Any ideas?


 On 27 Aug., 03:21, Xavier Ducrohet x...@android.com wrote:
  On Wed, Aug 26, 2009 at 4:21 AM, Phoenixphoenixsen...@gmail.com wrote:
 
   On Aug 25, 4:41 pm, Xavier Ducrohet x...@android.com wrote:
   I see that you have changed the location of the user folders (in S:
   instead of C:)
 
   There are user folders on both S: and C:.  Only the Desktop and My
   Documents special folders are on S:.  Everything else (including App
   Data) is on C:.  [The documents are shared between operating systems
   on different partitions]
 
   Android (or Eclipse?) has been the only thing to use S:.
 
   When the user location is not the default one, we have seen some cases
   where windows reports the location of the user folder differently
   depending on which API you use (the command line tool and Eclipse use
   a Java API, while the emulator use a windows C++ API).
 
   That would explain why the command line tools and Eclipse could see
   my_avd just fine, but the emulator could not find it.
 
   But, shouldn't Android be set up to use HOMEDRIVE/HOMEPATH?  Standard
   environment variables.
 
  I think there are difference on XP/Vista which makes using those hard
  to use (back in the previous SDK we were using LOCALAPPDATA but we
  ended up having the same problem).
 
  What we use on java is the user.home property setup by the VM. Looks
  like the Java VM thinks your home is in S:\...
  I look again into these 2 env variables and see if they could be used.
 
   Also, a single line in the installation instructions could have
   prevented this confusion.  When Android can see the AVD from the
   command line and the Eclipse gui, but not from the emulator, and no
   explanation is given (especially on the first test project), it's ...
   disheartening.
 
  I agree. We should at least have the emulator output a message saying
  where it's looking for the AVD and how to fix the problem if it's not
  where the AVDs are created.
 
   In any event, with the ANDROID_SDK_HOME variable set to the S:
   home (which is not the real home directory, that is on C:), the
   emulator now works.
 
  Well we don't want to go and set a permanent env on your machine. I
  guess we could but relying on existing standard env variables should
  be better. I mean, what happens if the user removes it or change the
  location of his/her home folder but doesn't update this?
 
  In any case we do need to find a solution.
 
  Xav
  --
  Xavier Ducrohet
  Android Developer Tools Engineer
  Google Inc.
 


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



[android-beginners] How to end a application completely?

2009-09-17 Thread FeatherElf

I'm new in the Android World.
I wanna that how to end a application completely?
And also,
I wanna how to only end a active alone?

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



[android-beginners] Re: Running the android emulator, easiest way?

2009-09-17 Thread dharmaraja.thangaraj


This is because, you may not installed JavaSDK or you may not set SDK
path (SDK/jdk/jre) in global variable PATH.
The easiest way is to install JavaSDK and copy the folder SDK/jdk/jre
to eclise folder you had installed.

-Original Message-
From: android-beginners@googlegroups.com
[mailto:android-beginn...@googlegroups.com] On Behalf Of izzy
Sent: Monday, September 14, 2009 6:44 AM
To: Android Beginners
Subject: [android-beginners] Running the android emulator, easiest way?


I just want to know, whats the easiest way to run the android emulator?.
I hate using the command line mainly because its gives me alot of
problems, and ive always had bad luck with it.

I keep getting this error after typing:

C:\android\android sdk\toolsandroid create avd

Just to test it without the variable or options or anything i get java
is not recognized as an internal or external command operable program or
batch file



--~--~-~--~~~---~--~~
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: Gallery view --- error

2009-09-17 Thread Justin Anderson
This has been answered several times in this forum... just do a search in
the group for Gallery.

I would also recommend reading this article as well.  You will usually get
more responses by following this advice, and the community page of the dev
guide recommends reading this before posting as well.

http://www.catb.org/~esr/faqs/smart-questions.html

Thanks,
Justin

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


On Wed, Sep 16, 2009 at 4:53 AM, dolly dolly.priyadarsh...@wipro.comwrote:


 I am new to android.

 I tried creating a gallery. I got an error  cannot resolve
 android.R.styleable in the line

 mGalleryItemBackground = a.getResourceId(
android.R.styleable.Theme_galleryItemBackground,
 0);

 Am I supposed to create a styleable directory in res and add something
 to it ? is that the correct approach?

 Actually, even without setting background, gallery works fine... still
 I jus wanted to know how i'm supposed to solve this error...

 Thanks and Regards,
 Dolly

 


--~--~-~--~~~---~--~~
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 Button Broadcast Receiver Problem...

2009-09-17 Thread Justin Anderson
Awesome!  I will try it tonight.  Not very foolproof but it should work in
most cases.  Apparently all I was missing was the priority.

Thanks for the help,
Justin

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


On Wed, Sep 16, 2009 at 12:07 AM, Pradeep Kaushik pra...@gmail.com wrote:

 Hi Tikoze,
  You can very easily implement this feature.

 Just have a simple receiver to receive the same intent as the camera that
 is:

 android.intent.action.CAMERA_BUTTON

 In that receiver class start your required activity as required.

 And, in the corresponding AndroidManifest.xml of your application declare
 the receiver as below:

 
 receiver android:name=*.TestReceiver*

 intent-filter android:priority=*1*

 action android:name=*android.intent.action.CAMERA_BUTTON */

 /intent-filter
 /receiver

 The priority field tells Android to first choose the activity with the
 higher priority. I have used a very large value. Maybe even a smaller value
 will work.

 Also, in your receiver in the first line of your onReceive itself add the
 following line:

 abortBroadcast();

 This will set a flag to abort the broadcast so nobody else will receive it
 after you.

 So, by setting the priority you are telling Android to choose your receiver
 first and by abortBroadcast you are cancelling the broadcast for Camera so
 it wont open at all.

 Hope this helps.

 Thanks and Regards,

 Pradeep Kaushik

 Thanks and Regards
 Pradeep.N.Kaushik.
 Sent from New Delhi, DL, India

 On Wed, Sep 16, 2009 at 9:36 AM, Tikoze janderson@gmail.com wrote:


 Obviously I understand that the ability to do that could cause some
 developers to abuse it...  And of course I would not like another
 application to unregister things that my app listens for (if it
 occurred without the user's knowledge).

 As an example, I have used an application called Task Switcher.  I
 don't know how the developer does it, but he provides a setting that
 makes his app (and only his app) launch when the camera button is
 pressed.  He lets the user know what will happen and verifies they
 want to proceed.  I found this ability very useful and handy.

 I am developing an application very similar to Task Switcher and want
 to provide the same option to launch my app from the camera button.  I
 would just prefer that the default camera didn't launch before my
 app... It makes it look like my app launched the camera and then
 itself and is very unprofessional-looking.

 Again, if any one knows how to do this, I would be very grateful.

 On Sep 15, 5:11 pm, Jeffrey Blattman jeffrey.blatt...@gmail.com
 wrote:
   seems unlikely (but i have no idea really). you wouldn't think you
 would
  have control over the intents that other apps can listen for / act upon.
  how would you like it if some other app came along and unregistered your
  app from that intent?
 
  On 9/15/09 3:40 PM, Tikoze wrote:
 
   Since there is no guarantee as to the order that applications will be
   notified, it is almost like I would have to find some way to
   unregister everything else that is listening for the camera button...
   Given Android's security measures, is that even possible?
 


--~--~-~--~~~---~--~~
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 oregonduck...@gmail.com 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] Center alignment in SDK 1.6

2009-09-17 Thread NicoToc

All,

I have a problem that appeared once I've upgraded to the SDK1.6

I wanted to align the top of a bubble with the center of my map.
Developing with 1.5, I've defined a RelativeLayout with a point (in
black on the screen) align in the center and the aligned my top of
bubble below this point. It worked perfectly.

But since my upgrade to 1.6, my top of bubble is aligned like if the
point was on top of my screen

http://picasaweb.google.com/nicolas.maynard/UntitledAlbum?feat=directlink

The white bubble should be under the black spot, not so high in the
screen.

here is the part of my xml. Thanks for your help

RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:id=@+id/map
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent 

com.google.android.maps.MapView
android:id=@+id/mapview
android:layout_width=fill_parent
android:layout_height=fill_parent
android:clickable=true
android:apiKey=0rwwU2ptJSox_u6Z5_Ugac2ddvqWvx8m59Ez1_w
/

ImageButton
android:id=@+id/button_new_place

android:background=@android:drawable/btn_default
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_alignTop=@id/mapview
android:src=@android:drawable/ic_input_add
android:layout_alignParentRight=true
android:layout_marginTop=2dip
android:layout_marginRight=2dip

/

LinearLayout
android:id=@+id/zoomview
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_centerHorizontal=true
android:layout_alignBottom=@id/mapview
/


View
android:id=@+id/center_screen
android:layout_centerInParent=true
android:layout_height=10dip
android:layout_width=10dip
android:visibility=visible
android:background=#33
/


ImageView
android:id=@+id/top_buble
android:background=@drawable/top_bubble
android:visibility=invisible
android:layout_centerHorizontal=true
android:layout_below=@id/center_screen
android:layout_height=wrap_content
android:layout_width=wrap_content
/
--~--~-~--~~~---~--~~
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-17 Thread The Bear

Hi furby,

I have had this problem too. I found it happens when your AVD isn't
selected when you click on Run As.. to run an application. Try this:

Right click on your project, select Run As...   Run Configurations...
click on the Target tab and under Select  preferred Android Virtual
Device for deployment  AVD Name make sure that one of your
emulators is selected.

See if that works :)

On 16 Sep, 13:10, furby wookie...@gmail.com 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: HelloAndroid app crashing

2009-09-17 Thread Justin Anderson
Look at the logcat info...

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


On Wed, Sep 16, 2009 at 5:30 AM, Kowshik Prakasam kows...@gmail.com wrote:

 Hi,

 I followed instructions to install Android SDK with Eclipse 3.4 (Mac OS X
 Version 10.5.7).

 I also created an AVD as per the instructions.
 However, when I try to run the Android Hello World App, I get the following
 error in Eclipse :

 'An internal error occurred during: Launching HelloAndroid.

 com.android.ddmlib.AndroidDebugBridge.getDevices()[Lcom/android/ddmlib/Device;'

 Screenshot attached.
 If somebody can decipher the problem, then please let me know.

 -Kowshik

 


--~--~-~--~~~---~--~~
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 timothy.edwa...@gmail.com 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: Android Emulator suddenly won't boot...

2009-09-17 Thread Timothy Collins
It turns out that the AVD was corrupted in some way. I had to delete it and
rebuild and all is good now...

On Thu, Sep 17, 2009 at 4:30 PM, The Bear bernard.mcca...@googlemail.comwrote:


 Hi furby,

 I have had this problem too. I found it happens when your AVD isn't
 selected when you click on Run As.. to run an application. Try this:

 Right click on your project, select Run As...   Run Configurations...
 click on the Target tab and under Select  preferred Android Virtual
 Device for deployment  AVD Name make sure that one of your
 emulators is selected.

 See if that works :)

 On 16 Sep, 13:10, furby wookie...@gmail.com 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: aapt is present - Hello, World application.

2009-09-17 Thread Lee Jarvis

Unfortunately it doesn't. I've realized I'm actually using the wrong
64-bit system (as the SDK was built for 32-bit) Arch Linux. I have
created a new topic for this discussion (to help searches)

Thanks for your replies
--~--~-~--~~~---~--~~
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 socket through gprs

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

Nope, this is currently not supported in the Android SDK.

You can change the platform code and write your own JNI API to use
this functionality.

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

On Sep 15, 1:34 am, Borut borut.daga...@gmail.com wrote:
 Hi

 I need to connect to a certain server with a socket connection. No
 problem, that's the easy part.

 The problem is that a socket should be done exclusively through gprs
 connection, not through wifi.

 So, is it possible to force a socket connection to be opened through
 gprs signal even though a wifi is also enabled and active at the same
 time?
--~--~-~--~~~---~--~~
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: Development Phone

2009-09-17 Thread brucko

I'll be the first to admit that I am a bit of a novice in the android
arena.

What I would like to bring to your attention is that there may well be
very good reasons as to why some pre-installed apps can be hard to
change.

I'm trying to import some devices into Australia, many of our
regulations are based on the US and Europe. If you change some of the
key software on a phone you may very well make it illegal to use that
phone. One key example would be the requirement we have to be able to
dial emergency numbers even when the screen is locked. Someones life
may depend on this functionality being intact. I have no idea what the
legal ramifications would be of making software available that did not
maintain this ability. However selling, giving or even loaning phones
with emergency dialing no longer enabled would certainly be an offense.
( Not saying you shouldn't replace these apps - just be careful)

...brucko

On Aug 29, 3:53 am, Chris Stratton cs07...@gmail.com wrote:
 On Aug 24, 9:09 am, Ran dahan...@gmail.com wrote:

  What is the benefit of working with ADP1 over the other Android
  phones ?

 Just to expand on what others have said:

 Cost seems comparable betwen a dev phone and a retail phone at full
 retail or plan price + termination fee, so it's really more a of a
 technical question.

 Reasons for a dev phone

 -sim unlocked (some such as tmobile may? do that if you pay full
 retail or eventually on a plan)
 -can change linux and system libraries
 -can change pre-installed applications
 -tmobile myfaves application sends periodic sms which costs money on
 any other network

 Reasons for _not_ getting a dev phone

 -only one older dev phone model generally available at present
 -dev phones can't buy paid applications from the market (including
 your own)
 -if you sell apps, you need to restrict yourself to the capabilities
 of your users phones (and test on such a device!)
 -various preinstalled proprietary applications missing (+/- depending
 on your interest)

 The not being able to change preinstalled applications is in my mind
 the least anticipated, and most annoying, problem.  There are many
 areas where very small decisions of questionable wisdom in default
 applications really hamper the user experience (even in the using it
 just to make calls sense), but these can't be very readily changed on
 a retail phone, particularly the parts most closely involved in the
 telephone functionality.

 As of this moment, I believe most of the retail phones are probably
 still shipping with an easily rooted linux kernel, but that probably
 will get closed up (already fixed in google's tree) and they will be
 limited until another hole is found.
--~--~-~--~~~---~--~~
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: Development on the MyTouch 3G

2009-09-17 Thread somatt

does that come with android

On Sep 14, 3:37 pm, Roman ( T-Mobile USA) roman.baumgaert...@t-
mobile.com wrote:
 If you are a fan of the G1 you will be also be a fan of the new
 Motorola cliq which comes with a keyboard.
 --
 Roman Baumgaertner
 Sr. SW Engineer-OSDC
 ·T· · ·Mobile· stick together
 The views, opinions and statements in this email are those of the
 author solely in their individual capacity, and do not necessarily
 represent those of T-Mobile USA, Inc.

 On Sep 14, 9:31 am, Matt som...@gmail.com wrote:

  I for one would never buy a phone without a keyboard.  MyTouch is ridiculous
  for exactly that reason.

  On Sep 13, 2009 9:27 PM, Roman ( T-Mobile USA) 

  roman.baumgaert...@t-mobile.com wrote:
   Well, a myTouch user isn't t likely to inadvertently write  applications

  that don't work without...
  Hm, he could ... but testing might me tough  :-)

  -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The
  views, opinions and st...

  On Sep 13, 8:17 pm, Chris Stratton cs07...@gmail.com wrote:  On Sep 13,
  9:45 pm, Roman ( T-Mobil...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] How does Gallery's Send Intent Work?

2009-09-17 Thread Mark Buchholz

I'm trying to setup an intent that allows users to share an Jpeg,
stored in the applications file cache.

Trying this:

Intent i = new Intent( Intent.ACTION_SEND );
i.putExtra( Intent.EXTRA_STREAM, uri );
i.setType( image/jpeg );
startActivity( Intent.createChooser( i, Where to share? ) );

It works for the eMail application, but not for any other app (like
Facebook or Twitdroid). Gallery supports them. Does anyone know, hoe
exactly Gallery does it?

Thanks for any help!
Mark

--~--~-~--~~~---~--~~
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] Read a HTML file with Java methods

2009-09-17 Thread françois graff

Hello developers,

I'm french, so I'm sorry for my english.
I would like to develope an application whose extracts some numbers
from a web site

In JAVA, I read the HTML file with this method :
---
public static String get(String adresse) {
String toreturn = null;
try {
URL url = new URL(adresse);
URLConnection uc = url.openConnection();
InputStream in = uc.getInputStream();
int c = in.read();
StringBuilder build = new StringBuilder();
while (c != -1) {
build.append((char) c);
c = in.read();
}
toreturn = build.toString();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return toreturn;
}
---

But it doesn't work in ANDROID.
the method return nothing.

thanks for your help.

--~--~-~--~~~---~--~~
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] Application closes when I try to convert String to Integer

2009-09-17 Thread rachana bedekar
Hi,
I need to perform mathematical  operation on the EditText's text. For that I
coverted text from the EditText to  String,  but when I further try to
covert Strint to Integer using parseInt - code doesn't show any bug, but the
emulator stops responding.

Can anyone give me a suggestion on this?

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] Free and Paid apps with same code-base???

2009-09-17 Thread MagouyaWare

Is there an easy way to have both free and paid applications that use
the same code-base?

I have just published my first application, which has both a free and
paid version.  However, in order to do that I had to make lots of
manual changes to my package.

Is there any way around this?

--~--~-~--~~~---~--~~
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] WebView Dimensions

2009-09-17 Thread Mostafa Muhammad

Hi,

   I'm trying to create a WebView with limited dimensions, I use XML
to create the view, It works correctly and the view is rendered with
the dimensions specified in the XML file, however, when I call loadUrl
() the WebView breaks out of any limitations and takes up the whole
screen.

Can I change this behavior? I want to create a Webview that is
slightly smaller than the full screen size.

Thanks

-Mostafa

--~--~-~--~~~---~--~~
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] Code protection

2009-09-17 Thread uknowwho

I have a stupid questions. Since Android code development is based on
Java, will my published application be easily decompiled and stolen? I
know you can obfuscate, but that doesn't sound too good to me.

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



[android-beginners] Re: Must have missed something...1.5-1.6

2009-09-17 Thread Vishwanath Kamath Pethri
I had also observed this issue...
Once i re-configured my avd selection, this issue was no more observed
As you said Xavier, this shouldn't be needed once you have set the target...
But this is a wierd issue what i have observed on updating from 1.5 to 1.6..

-Vishwa


On Wed, Sep 16, 2009 at 9:17 PM, Xavier Ducrohet x...@android.com wrote:


 Hmm this shouldn't have been needed. I'll try to reproduce it here.

 Xav

 On Wed, Sep 16, 2009 at 8:43 AM, Michael Dorin bsddo...@gmail.com wrote:
 
  Found it.
  I didn't re-do the run configuration for my project.
  Once I did that it started to work.
 
  -Mike
 
  On Wed, Sep 16, 2009 at 10:34 AM, Xavier Ducrohet x...@android.com
 wrote:
 
  I'm guessing this is Eclipse showing you that?
 
  If so, can you post your .log file (located in your workspace in the
  .metadata folder)
  (it may be big, try to only post the end of it, or whatever part
  contain the error)
 
  thanks
  xav
 
  On Wed, Sep 16, 2009 at 5:51 AM, Michael Dorin bsddo...@gmail.com
 wrote:
 
  I thought I followed all the instructions to update the SDK.
  I have updated a couple projects and no errors are shown.
  When I attempt to launch though, I get:
 
  'Launching ...' has encountered a problem.
  An internal error occurred during: Launching ... 
 
  java.lang.NullPointerException
 
  I am running on vista.
 
  Any ideas as to what I may have done wrong?
 
  -Mike
 
  
 
 
 
 
  --
  Xavier Ducrohet
  Android Developer Tools Engineer
  Google Inc.
 
  
 
 
  
 



 --
 Xavier Ducrohet
 Android Developer Tools Engineer
 Google Inc.

 


--~--~-~--~~~---~--~~
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: build path error (solved)

2009-09-17 Thread Indicator Veritatis

Hi. It might work for others. But are you expecting it to be useful
for any build path error, or did you see the exact words in the error
message, build path error?

On Sep 16, 11:34 am, jbrohan jbro...@gmail.com wrote:
 Hello
 I'm working with a new install of Eclipse and the 1.6 Android
 software. When I was trying out the Hello, Android example I got a
 Build Path error.

 After much thrutching around the error went away when I
  Select the HelloAndroid project
 choose Java Build Path
 Click the Android 1.5 checkbox

 Worked for me hope it works for you
 John

--~--~-~--~~~---~--~~
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: Math functions in Android - HELP

2009-09-17 Thread Lance Nanek

In addition to the standard class, Android does have a few functions
redone to be less accurate but better performing:

http://developer.android.com/reference/android/util/FloatMath.html

On Sep 16, 1:08 pm, Mark Murphy mmur...@commonsware.com wrote:
 GlennovitS wrote:
  Hey

  I'm about to make an app with some different math functions..

  How can I make a TAN, COS, and SIN function in andriod?. I dont know
  how to start on this..

  Please help me..

 Look at the Math class:

 http://developer.android.com/reference/java/lang/Math.html

 This is standard Java, nothing unique to Android.

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

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

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



[android-beginners] Re: About ERROR: unknown virtual device name: 'myavd'

2009-09-17 Thread robert.carlsson

Hi
I had the same problem and for me the problem the emulator and an
environment variable (HOMEPATH or USERPROFILE)
instead of the registry (like android-tool.)

I found the solution here:
http://forums.pragprog.com/forums/67/topics/2709

--~--~-~--~~~---~--~~
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 1.6 SDK is here!

2009-09-17 Thread cyl

I downloaded 1.6 and tried to run Voice Recognition app on the
emulator but got Recognizer not found. But 1.6 system image (at HTC
site) is not available yet.

So I could revert back to SDK 1.5 but the emulator (that comes with
SDK 1.5) will not work (wrt audio sampling rate) with 1.5 platform as
described here
http://www.mail-archive.com/android-disc...@googlegroups.com/msg11692.html
Is this problem fixed in the emulator that comes with 1.6?

Any workarounds you can suggest?

Thanks


On Sep 15, 6:22 pm, Xavier Ducrohet x...@android.com wrote:
 http://android-developers.blogspot.com/2009/09/android-16-sdk-is-here...

 Enjoy!
 --
 Xavier Ducrohet
 Android Developer Tools Engineer
 Google Inc.

--~--~-~--~~~---~--~~
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] AVD Not starting no Output

2009-09-17 Thread praveen

Hi

I am getting the following error while trying to start the AVD via
Eclipse.

emulator: ERROR: unknown virtual device name: 'my_avd'
emulator: could not find virtual device named 'my_avd'

Also running the hello world  as an Android app doesnt give any
output.

Thanks
Praveen

--~--~-~--~~~---~--~~
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] Unable to compile C application in Emulator

2009-09-17 Thread Smruti Pragyan Misra
Hi,
I have compiled a C application with ELDK4.1 for ARM.However when I
push it to Android and tried to run it on the shell,it fail.Please help me
with this.


Thanks N Regards,

Smruti Mishra

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



[android-beginners] How to connect to the internet behind proxy ?

2009-09-17 Thread rcy

Hi All,

Not recently I installed the android SDK for the first time. After
playing with the emulator I notice that I can’t log in to the internet
via the browser application.
I looked for a and found the following command : “emulator -avd em15 -
http-proxy proxy”

For the proxy I copy the prams’ from the browser (Tools  Internet
Option  Connection  Lan settings ) but still I can’t see any
WebPages via the browser.

Any suggestion ?

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] AutoCompleteTextView and ArrayAdapter with async update

2009-09-17 Thread ordrune

I have an AutoCompleteTextView using an ArrayAdapter for its data.  I
am trying to asynchronously update the ArrayAdapter, but if there is
text typed into the AutoCompleteTextView the ArrayAdapter will not
update until the text in the AutoCompleteTextView changes.

for example;

actv = AutoCompleteTextView
aa = ArrayAdapter

1) start the application
2) getCount on aa = 0
3) add on aa
4) getCount on aa = 1
5) type r into actv
6) getCount on aa = 1
7) add on aa
8) getCount on aa = 1
9) add on aa
10) getCount on aa = 1
11) type e into actv
12) getCount on aa = 3

How can I force an update of the data?  I am doing an async update
because I am getting the values to auto complete from a REST call.  I
even tested this manually just by adding two buttons to the Activity
along with the ACTV (one to show me the count and one to add an item).

I tried notifyDataSetChanged on the ArrayAdapter, but that doesn't
seem to do anything.

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: Unknown host www.google.com (was Re: debug.keystore is missing)

2009-09-17 Thread Bartłomiej Nowak
2009/9/17 Jeffrey Blattman jeffrey.blatt...@gmail.com

  ugh. never mind. permissions?


 On 9/17/09 11:17 AM, Jeffrey Blattman wrote:

 after changing the SDK directory back and forth, the SDK was reloaded and
 the debug.keystore was created. now i'm back to the unknown host exception
 for google,

 09-17 11:16:07.003: INFO/InetAddress(756): Unknown host www.google.com,
 throwing UnknownHostException

 repeated over and over.

 On 9/17/09 10:44 AM, Jeffrey Blattman wrote:

 today i started a new eclipse project. setup the map activity, and used the
 same API key as my other projects. map was blank, and oddly, in the logs i
 see unknown host exceptions from google.com. i tested the browser, and
 google.com resolves fine.

 after re-creating my API key with no success still, i uninstalled ADT from
 eclipse and removed ~/.android, removed from AVD. then the reverse, install
 the ADT, and create a new AVD.

 however, now ~/.android doesn't contain debug.keystore. there must be a
 keystore somewhere, as my apps still launch, but any map view fails ... this
 time no unknown host exception, just no map (typical of having an invalid
 API key).

 ?

 i should note that i upgraded to 1.5r3 at some point in the recent past.
 yes keytool is in my path.

 --


 --


 --


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

image/pnginline: qr-gmail.pngimage/png

[android-beginners] Re: Must have missed something...1.5-1.6

2009-09-17 Thread Vishwanath Kamath Pethri
Try setting the AVD from the Debug configuration for the selected project.
Then run/debug. This should solve your issue.

-Vishwa

On Wed, Sep 16, 2009 at 6:21 PM, Michael Dorin bsddo...@gmail.com wrote:


 I thought I followed all the instructions to update the SDK.
 I have updated a couple projects and no errors are shown.
 When I attempt to launch though, I get:

 'Launching ...' has encountered a problem.
 An internal error occurred during: Launching ... 

 java.lang.NullPointerException

 I am running on vista.

 Any ideas as to what I may have done wrong?

 -Mike

 


--~--~-~--~~~---~--~~
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] Best Game Implementation?

2009-09-17 Thread ThomasR

I have a game concept for my first true android game, but I am not
sure how to implement it. It is a side scrolling game, so almost every
element is moving each frame. Would it be best, from a resources
standpoint, to have one canvas for the entire screen redrawing every
frame or for each element to have its own canvas layered on top of
each other and manipulated individually? There seems to be trade offs
either way. I just don’t know what is best or most commonly accepted
method for games. I am super new at android development so please feel
free to go into detail if you need to. 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: Android 1.6 SDK is here!

2009-09-17 Thread jerkface

Also disappointed. Same useless bluetooth, same copout excuses from
the devs.

On Sep 16, 6:04 am, Neil neilb...@gmail.com wrote:
 I'm very disappointed that bluetooth still doesn't seem to be fixed.

 I'm specifically interested in these issues - not being able to use
 handsfree:http://code.google.com/p/android/issues/detail?id=2647http://code.google.com/p/android/issues/detail?id=2855

 Neil

 On Sep 16, 12:22 am, Xavier Ducrohet x...@android.com wrote:

 http://android-developers.blogspot.com/2009/09/android-16-sdk-is-here...

  Enjoy!
  --
  Xavier Ducrohet
  Android Developer Tools Engineer
  Google Inc.

--~--~-~--~~~---~--~~
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: Screen orientation

2009-09-17 Thread kirti kaul

You can also set the parameter in the manifest file as

 activity

 android:screenOrientation=landscape

or portrait,which anyway is by default

On Sep 16, 9:02 pm, Neilz neilhorn...@googlemail.com wrote:
 Thanks, all sorted :-)

 On Sep 16, 1:06 pm, Mark Murphy mmur...@commonsware.com wrote:



  Neilz wrote:
   How do I test screen orientation on the emulator please? Can I tell it
   to switch orientation just like you would on the real device?

  Windows/Linux: Ctrl-F12
  Mac with numeric keypad: 5 on the numeric keypad

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

  _Android Programming Tutorials_ Version 1.0 In Print!- 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] Package Problems following Notepad Tutorial in Eclipse for Android 1.5_r3: android.app not Included

2009-09-17 Thread Indicator Veritatis

I am trying to go through the Notepad Tutorial for Android 1.5_r3, but
I am getting stuck around Step 7 with the following error messages
that just won't go away:

The errors I get are:

1) ListActivity cannot be resolved to a type

and

2) 'The declared package  does not match the expected package
com.android.demo.notepad1.

Before writing this post, I tried Notepad1 eclipse package in the
search for this group, I didn't get anything.

I also tried Notepad tutorial eclipse package with nominally better
results, but I still see no answer for my problem.

Now I do also have to point out that when I followed the instructions
to press Ctl-Shift-O after typing ListActivity, I was surprised at the
packages that got included: they were two AWT packages only, nothing
from Android. Could this be the hint to what the problem is?

I was expecting to get the package that includes ListActivity, namely,
android.app, but no. Nor have I seen any other instructions in the
Tutorial (by this point, Step 7) that would include it.

BTW: only now I noticed: I am also getting an error in my Linux
Terminal window sometime after launching Eclipse: it reads, Error
Loading Preferences.


Matt J.


--~--~-~--~~~---~--~~
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] Analog clock

2009-09-17 Thread android learner

Hello everyone,
  I'm very new to android development and would really appreciate
any help. I am trying to implement a custom analog clock widget. The
default android analog clock has only hour and minute hands. I'm
trying to add a seconds hand and the day/date into the dial. I do not
think there is a way to achieve this using the existing analog clock
class. Does anyone have any idea how I could do this? Can I write my
own analog clock class (extends View)?
 Also, does any one know if there is a way to center a button
relative to another button in relative layout? I want one button at
the bottom (center aligned) of the other. The size of the button is
dynamic, so I cannot use any padding.

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] sms send

2009-09-17 Thread Saikat

How can I send a simple sms from my application? Which api I need to
use?

--~--~-~--~~~---~--~~
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: Stuck at starting Intent ??

2009-09-17 Thread Vishwanath Kamath Pethri
Have you mentioned the com.mimi.simpleflashlight.RedFlashlightActivity
class in your Manifest file?
- Vishwa

On Thu, Sep 17, 2009 at 12:05 AM, Mimi mimik...@gmail.com wrote:


 Dear all,

 I am stuck when running a simple App with this last message on my
 Console:

 [2009-09-16 14:24:49 - Simple Flashlight] ActivityManager: Starting:
 Intent { comp={com.mimi.simpleflashlight/
 com.mimi.simpleflashlight.RedFlashlightActivity} }

 This simple App worked before this run. Any ideas, hints, suggestions
 would be greatly appreciated.

 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: Screen orientation

2009-09-17 Thread Konstantin Burov
On Wed, Sep 16, 2009 at 8:46 PM, Neilz neilhorn...@googlemail.com wrote:

 On a more complex but related matter, I have a Maps app that loses the
 map when I change the orientation. My overlays and locations remain
 visible, but the map detail has gone leaving a plain blue screen (like
 it's over the sea, but it's not!). Any ideas where to start looking
 for the problem?


Seems that you have to read about instance states for activities.
Possibly you should store map details at instance state (Bundle) and use
them to restore map state on mode change.

--~--~-~--~~~---~--~~
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] Arayadapter only shows text when highlighted

2009-09-17 Thread Android_n00b

I have an arrayadapter which stores the names of the 12 months of the
year:
final String[] Months = new String[]
{January,February,March,April,May,June,July,August,
September,October,November,December};
ArrayAdapterString monthArray = new ArrayAdapterString(this,
android.R.layout.simple_list_item_1, Months);

I also have a textview where if I enter some text, the matching text
in the arrayadapter appears below the textbox.
final AutoCompleteTextView textView = (AutoCompleteTextView)
findViewById(R.id.testAutoComplete);
textView.setAdapter(monthArray);

For example, if I start typing the characters of January, I should see
the word January appear below the textbox (like how google suggest
works). So my program seems to be working, but when I start typing Jan
for example, a box appears below with the word January in it, but I
can only see the text when it is highlighted. So for some reason, the
text is the same colour as the background box(white in this case).
Anyone know why this is happening?

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] Alarm manager on boot only runs once?

2009-09-17 Thread bob

I'm trying to set up a service that gets started when the device
boots.  I see that service being started once in the logs but it never
seems to run again.  So the fact that I see it in the right after boot
up means that I am properly intercepting the boot up notification and
firing off the service and that everything is registered correctly in
the the manifest (DeviceBootReceiver and service.)

What I want to have happen is the service to be fired up, regardless
of whether the owning application is running periodically, say every 6
hours.  I'm able to fire up the services and run them from main.java
but obviously this only works if the user has the application in
memory.  Eventually the service will be garbage collected.  So I think
I'm doing something wrong here, but after a day of playing around
(even looking at android:process) can't seem to get it to work.

Any leads will earn a beer.

Thanks! and here's some code!

// this class gets the Boot Broadcast and supposedly :-) sets up the
Alarm Manger to run every 20 seconds and call DownloadAlarm Class.

public class DeviceBootReceiver extends BroadcastReceiver {
private static final String TAG= DeviceBootReceiver;
@Override
public void onReceive(Context context, Intent intent) {

Log.d(TAG, Starting the alarms from device boot receiver);
 Intent i  = new Intent(context, DownloadAlarm.class);
 PendingIntent sender = PendingIntent.getBroadcast(context,
0, i, 0);


 Log.d(TAG, Got bootup notice);
 // Schedule the alarm for every thirty seconds after the
first 15 second delay
 AlarmManager am = (AlarmManager)context.getSystemService
(Context.ALARM_SERVICE);
 am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
SystemClock.elapsedRealtime(), 2, sender);

}

}

Download Alarm Class listens for that pending intent and fires up the
service...

public class DownloadAlarm extends BroadcastReceiver
{


private static final String TAG= DownloadAlarm;

@Override
public void onReceive(Context context, Intent intent)
{
Log.d(TAG, Received intent for service: Starting app service);
 context.startService(new Intent(context, AppService.class));



}


--
 App service does some stuff...
public class AppService extends Service {

private static final String TAG= AppService;
@Override
public void onCreate() {
 Log.d(TAG, Started the app service);

Thread thr = new Thread(null, mTask, AppService);
thr.start();
}

@Override
public void onDestroy() {

}

/**
 * The function that runs in our worker thread
 */
Runnable mTask = new Runnable() {
public void run() {
try {
// Download files.
HttpClient httpclient =  new DefaultHttpClient();
  //Log.d(TAG, Attempting to load:+ mURL);
 HttpGet httpget = new HttpGet(http://www.yahoo.com;);
httpclient.getParams().setParameter
(http.socket.timeout, new Integer(1));
httpget.getParams().setParameter
(http.socket.timeout, new Integer(1));
 // Create a response handler

ResponseHandlerString responseHandler = new
BasicResponseHandler();



} catch (Exception e) {
Log.e(TAG, e.toString() + \n + Log.getStackTraceString
(e));
}

  File log=new File(Environment.getExternalStorageDirectory(),
AlarmLog.txt);

  try {
  BufferedWriter out=new BufferedWriter(new FileWriter
(log.getAbsolutePath(), true));

  out.write(new Date().toString());
  out.write(\n);
  out.close();
  }
  catch (IOException e) {
  Log.e(AppService, Exception appending to log file, e);
  }
Log.d(TAG, In thread);

// Done with our work...  stop the service!
AppService.this.stopSelf();
}
};

@Override
public IBinder onBind(Intent intent) {
return mBinder;
}



/**
 * This is the object that receives interactions from clients.
See RemoteService
 * for a more complete example.
 */
private final IBinder mBinder = new Binder() {

};

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



[android-beginners] Using the dev phone without a wireless carrier

2009-09-17 Thread Anil

Is it possible to use the dev phone without having a service contract
with any mobile carrier? I want to use the dev phone in a class to
teach app development using all the other features of the device
except for telephony. Is that possible?

Also, does anyone know of institutions that have classes that teach
app development using the Android platform?

--~--~-~--~~~---~--~~
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-17 Thread ichpa

Hi,

I have the same error. I tried to run emulator with Eclipse and
Command Line without success.

Unfortunately, the solutions above do not work.

Any others ideas ?

On 17 sep, 07:33, Raphael r...@android.com wrote:
 Seems like it.
 Please try one of the following:

 - run the android tool UI, select your AVD and select the repair
 button if enabled.

 or on the command line

 $ android update avd --name your_avd_name

 R/

 On Wed, Sep 16, 2009 at 8:14 AM, Jack Ha jack...@t-mobile.com wrote:

  It seems like your AVD's config.ini file is missing the image.sysdir.*
  entries. Have you tried to create another AVD file and launch the
  emulator with that?

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

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

  On Sep 16, 7:38 am, mic.ger...@gmail.com 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: Math functions in Android - HELP

2009-09-17 Thread Bartłomiej Nowak
2009/9/16 GlennovitS glennov...@gmail.com


 Hey

 I'm about to make an app with some different math functions..

 How can I make a TAN, COS, and SIN function in andriod?. I dont know
 how to start on this..

 Please 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] Routing audio to within the call

2009-09-17 Thread Ron Schnell

I've been following the new APIs as they come out, and I notice a few
different options on how to route media playback to the speaker,
bluetooth, earpiece, etc.  But I have never seen an option to route
media playback into an active telephone call. Am I correct that this
is impossible?  Any chance that it will become possible?

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: About ERROR: unknown virtual device name: 'myavd'

2009-09-17 Thread robert.carlsson

hmm. I answered you, but I cant see my post, so I'll try again .. in
short. I had the sam problem, found the solution here:

http://forums.pragprog.com/forums/67/topics/2709

--~--~-~--~~~---~--~~
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: Screen orientation

2009-09-17 Thread Konstantin Burov
On Wed, Sep 16, 2009 at 8:46 PM, Neilz neilhorn...@googlemail.com wrote:


 Hi all.

 How do I test screen orientation on the emulator please? Can I tell it
 to switch orientation just like you would on the real device?


Try Ctrl+F11

--~--~-~--~~~---~--~~
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: Analog clock

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

The Android platform source code has the analog clock source. I would
recommend you start there.


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


On Sep 17, 8:36 am, android learner android.lear...@gmail.com wrote:
 Hello everyone,
       I'm very new to android development and would really appreciate
 any help. I am trying to implement a custom analog clock widget. The
 default android analog clock has only hour and minute hands. I'm
 trying to add a seconds hand and the day/date into the dial. I do not
 think there is a way to achieve this using the existing analog clock
 class. Does anyone have any idea how I could do this? Can I write my
 own analog clock class (extends View)?
      Also, does any one know if there is a way to center a button
 relative to another button in relative layout? I want one button at
 the bottom (center aligned) of the other. The size of the button is
 dynamic, so I cannot use any padding.

 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: Best Game Implementation?

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

For tips on a side-scrolling game, I recommend this video from Google
IO: http://code.google.com/events/io/sessions/WritingRealTimeGamesAndroid.html



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


On Sep 16, 10:29 am, ThomasR thomas.r.sh...@gmail.com wrote:
 I have a game concept for my first true android game, but I am not
 sure how to implement it. It is a side scrolling game, so almost every
 element is moving each frame. Would it be best, from a resources
 standpoint, to have one canvas for the entire screen redrawing every
 frame or for each element to have its own canvas layered on top of
 each other and manipulated individually? There seems to be trade offs
 either way. I just don’t know what is best or most commonly accepted
 method for games. I am super new at android development so please feel
 free to go into detail if you need to. 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: sendBroadcast compile error

2009-09-17 Thread Tim

I saw that in the reference docs, but I still can't figure out how to
make use of it.
Just referencing Context doesn't work:
Context.sendBroadcast(intent);

compile:
[javac] Compiling 2 source files to /Users/SourceCode/android/
projects/AutoConference/bin/classes
[javac] /Users/SourceCode/android/projects/AutoConference/src/org/
pythonistas/AutoConference/PhoneListener.java:27: non-static method
sendBroadcast(android.content.Intent) cannot be referenced from a
static context
[javac] Context.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

I can't seem to find a way instantiate a copy of my activities
context.
I also don't really see a way to pass the context to the
PhoneListener, since it is created by startService:
package org.pythonistas.AutoConference;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;


public class PhoneBroadcaster extends BroadcastReceiver {
public void onReceive(Context context, Intent intent)
{
Intent phoneIntent = new Intent(context,
PhoneListener.class);
phoneIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startService(phoneIntent);
TelephonyManager tManager = (TelephonyManager)
context.getSystemService(Context.TELEPHONY_SERVICE);
PhoneListener pListener = new PhoneListener();
tManager.listen(pListener,
PhoneStateListener.LISTEN_CALL_STATE);
}

}




On Sep 17, 3:36 pm, Jack Ha jack...@t-mobile.com wrote:
 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 timothy.edwa...@gmail.com 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);
     

[android-beginners] Bluetooth and GPS switching from a widget

2009-09-17 Thread Vapor Trail

Thanks a lot Yusuf,
I would like to ask another question.
I am trying to switch ON/OFF the GPS and Bluetooth from a widget.
From http://groups.google.com/group/android-developers/browse_thread/thread/ab52d1a3a58b8179/e5acd3ffbeb9b51e?show_docid=e5acd3ffbeb9b51e
and other posts, I understand that from SDK 1.5, only launching by an
activity (startActivity(new
Intent(android.settings.LOCATION_SOURCE_SETTINGS));) we can have
access to the GPS ON/OFF toggle functionality.


For bluetooth, I could not find any relevant information, since it
looks like there is not much support for Bluetooth.
I was checking HTC hero (running 1.5 SDK), and it had widgets that
allow such operations. My question is if they are using their internal
APIs or there is some other way of switching GPS and Bluetooth
programmatically from a widget, in the standard SDK (I am using
Android 1.6 SDK).



Regards.
carl

On Tue, Sep 15, 2009 at 3:43 AM, Yusuf Saib (T-Mobile USA)
yusuf.s...@t-mobile.com javascript:_e({}, 'cvml',
'yusuf.s...@t-mobile.com'); wrote:

This fellow seems to have code that works:
http://www.mail-archive.com/android-beginners@googlegroups.com/msg06083.html



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



On Sep 13, 5:53 pm, Carl vapor.trail@gmail.com javascript:_e({},
'cvml', 'vapor.trail@gmail.com'); wrote:
 Hello all,

 I would like to create an application that allows the user to quickly
 toggle wireless connections ON/OFF. I found the API for wi-fi
 (android.net.wifi.WifiManager) but I am not able to find any API for
 Bluetooth and airplane modes.
 Do you have any idea where I can find such APIs or how can I have
 access to the switching functionality?

 Regards

 carl

--~--~-~--~~~---~--~~
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: Mark/Highlight/Select Text in WebView

2009-09-17 Thread treetop

I can highlight text by sending Shift key event with touch down
action now.
But I get nothing after calling javascript command window.getSelection
().
Any comment?
Thanks~

On 9月16日, 下午6時20分, treetop treetop.m...@gmail.com wrote:
 Hi,

 By using built-in browser on Magic or Hero, there is an function in
 menu called copy text.
 After clicking, we can touchmove to select a region.
 In WebView, how can we enable this function?
 Thanks!

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

So I am slowly learning more about the life cycles, and I figured out
what I was missing.  I ended up passing the context to the
PhoneListener class I made in construction:
public class PhoneBroadcaster extends BroadcastReceiver {
public void onReceive(Context context, Intent intent)
{
Intent phoneIntent = new Intent(context,
PhoneListener.class);
phoneIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startService(phoneIntent);
TelephonyManager tManager = (TelephonyManager)
context.getSystemService(Context.TELEPHONY_SERVICE);
PhoneListener pListener = new PhoneListener(context);
tManager.listen(pListener,
PhoneStateListener.LISTEN_CALL_STATE);
}

}


On Sep 17, 8:45 pm, Tim timothy.edwa...@gmail.com wrote:
 I saw that in the reference docs, but I still can't figure out how to
 make use of it.
 Just referencing Context doesn't work:
 Context.sendBroadcast(intent);

 compile:
     [javac] Compiling 2 source files to /Users/SourceCode/android/
 projects/AutoConference/bin/classes
     [javac] /Users/SourceCode/android/projects/AutoConference/src/org/
 pythonistas/AutoConference/PhoneListener.java:27: non-static method
 sendBroadcast(android.content.Intent) cannot be referenced from a
 static context
     [javac]             Context.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

 I can't seem to find a way instantiate a copy of my activities
 context.
 I also don't really see a way to pass the context to the
 PhoneListener, since it is created by startService:
 package org.pythonistas.AutoConference;

 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.telephony.PhoneStateListener;
 import android.telephony.TelephonyManager;

 public class PhoneBroadcaster extends BroadcastReceiver {
     public void onReceive(Context context, Intent intent)
     {
         Intent phoneIntent = new Intent(context,
                                         PhoneListener.class);
         phoneIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         context.startService(phoneIntent);
         TelephonyManager tManager = (TelephonyManager)
             context.getSystemService(Context.TELEPHONY_SERVICE);
         PhoneListener pListener = new PhoneListener();
         tManager.listen(pListener,
                         PhoneStateListener.LISTEN_CALL_STATE);
     }

 }

 On Sep 17, 3:36 pm, Jack Ha jack...@t-mobile.com wrote:

  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 timothy.edwa...@gmail.com 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)
       {
           

[android-beginners] Re: Application closes when I try to convert String to Integer

2009-09-17 Thread Naveen Krishna Ch
Try a code similar to this,

EditText priority =
(EditText)myAlertDialog.findViewById(R.id.priority_edit);
int x = Integer.parseInt(priority.getText().toString());

This works fine for me..

2009/9/16 rachana bedekar rachanabede...@gmail.com

 Hi,
 I need to perform mathematical  operation on the EditText's text. For that
 I coverted text from the EditText to  String,  but when I further try to
 covert Strint to Integer using parseInt - code doesn't show any bug, but the
 emulator stops responding.

 Can anyone give me a suggestion on this?

 Thanks!

 



-- 
Shine bright,
(: Naveen Krishna Ch :)

--~--~-~--~~~---~--~~
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: Screen orientation

2009-09-17 Thread Raphael

On Wed, Sep 16, 2009 at 8:21 PM, kirti kaul kirti.k...@wipro.com wrote:
 You can also set the parameter in the manifest file as
  activity
  android:screenOrientation=landscape
 or portrait,which anyway is by default

This will not help him test orientation changes.

R/

--~--~-~--~~~---~--~~
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: sms send

2009-09-17 Thread kapnkore
i think lot many threads about sms on this forum.n if you tried to search
with your question in google you will get lot many site.any way check this
one.
http://mobiforge.com/developing/story/sms-messaging-android
On Thu, Sep 17, 2009 at 10:43 AM, Saikat saikat0...@gmail.com wrote:


 How can I send a simple sms from my application? Which api I need to
 use?

 


--~--~-~--~~~---~--~~
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: AVD Not starting no Output

2009-09-17 Thread Raphael

Can you give us the output of the command:
$ android list avds

Thanks in advance,
R/

On Thu, Sep 17, 2009 at 9:06 AM, praveen spraveenit...@gmail.com wrote:

 Hi

 I am getting the following error while trying to start the AVD via
 Eclipse.

 emulator: ERROR: unknown virtual device name: 'my_avd'
 emulator: could not find virtual device named 'my_avd'

 Also running the hello world  as an Android app doesnt give any
 output.

 Thanks
 Praveen

 


--~--~-~--~~~---~--~~
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: Free and Paid apps with same code-base???

2009-09-17 Thread Raphael

Not yet. You can get around by extracting as much application logic as
possible in a java lib, but you still need basically two projects for
the android parts  resources.

If you're using Linux or a source control system like SVN you can
share or symlink your res dir however. It's far from ideal though.

R/

On Thu, Sep 17, 2009 at 1:39 AM, MagouyaWare magouyaw...@gmail.com wrote:

 Is there an easy way to have both free and paid applications that use
 the same code-base?

 I have just published my first application, which has both a free and
 paid version.  However, in order to do that I had to make lots of
 manual changes to my package.

 Is there any way around this?

 


--~--~-~--~~~---~--~~
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: AVD Not starting no Output

2009-09-17 Thread kapnkore
try to create new avd n start your allplication with new avd by choosing run
configaration.

On Thu, Sep 17, 2009 at 9:36 PM, praveen spraveenit...@gmail.com wrote:


 Hi

 I am getting the following error while trying to start the AVD via
 Eclipse.

 emulator: ERROR: unknown virtual device name: 'my_avd'
 emulator: could not find virtual device named 'my_avd'

 Also running the hello world  as an Android app doesnt give any
 output.

 Thanks
 Praveen

 


--~--~-~--~~~---~--~~
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 end a application completely?

2009-09-17 Thread kapnkore
Active only can be finished by useing the finish(); with help of this i
think you may also end your application completally

On Tue, Sep 15, 2009 at 7:55 AM, FeatherElf feather...@gmail.com wrote:


 I'm new in the Android World.
 I wanna that how to end a application completely?
 And also,
 I wanna how to only end a active alone?

 


--~--~-~--~~~---~--~~
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] Silently Block SMS

2009-09-17 Thread King of Camelot

Is it possible to silently block an SMS from the user? As far as I've
been able to tell an application can not hide an SMS from the whole
system, only not show it in the application itself. Is there any way
to stop a broadcast from telling other applications there is a new SMS?
--~--~-~--~~~---~--~~
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: change the angle of pixel

2009-09-17 Thread eldo jacob
Thank You  , i got the point but i needed to know whether the formulas used
has some more code to be added , so that the each pixel is rotated
accordingly .

On Tue, Sep 15, 2009 at 10:43 PM, Yusuf Saib (T-Mobile USA) 
yusuf.s...@t-mobile.com wrote:


 GY is set on the line that has GY = but not used on the right-hand
 side of the equation anywhere after that. There is no code that says,
 for example, B = GY + Y.



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



 On Sep 15, 1:24 am, eldo iameldoja...@gmail.com wrote:
  Hi all ,
 could someone help me with the below given code snippet.awarning
  persists in my application saying that vriable GY is never read . This
  warning results in an incorrect output . Could someone help me know if
  there is a change in the calculations to be done .
 
  int RY, GY, BY, RYY, GYY, BYY, R, G, B, Y;
  double angle = (3.14159d * (double)deg) / 180.0d;
  int S = (int)(256.0d * Math.sin(angle));
  int C = (int)(256.0d * Math.cos(angle));
 
  for (int y = 0; y  pich; y++)
  for (int x = 0; x  picw; x++)
  {
  int index = y * picw + x;
  int r = (pix[index]  16)  0xff;
  int g = (pix[index]  8)  0xff;
  int b = pix[index]  0xff;
  RY = (70 * r - 59 * g - 11 * b) / 100;
  GY = (-30 * r + 41 * g - 11 * b) / 100;
  BY = (-30 * r - 59 * g + 89 * b) / 100;
  Y = (30 * r + 59 * g + 11 * b) / 100;
  RYY = (S * BY + C * RY) / 256;
  BYY = (C * BY - S * RY ) / 256;
  GYY = (-51 * RYY - 19 * BYY) / 100;
  R = Y + RYY;
  R = (R  0) ? 0 : ((R  255) ? 255 : R);
  G = Y + GYY;
  G = (G  0) ? 0 : ((G  255) ? 255 : G);
  B = Y + BYY;
  B = (B  0) ? 0 : ((B  255) ? 255 : B);
  pix[index] = 0xff00 | (R  16) | (G  8) | B;
  }
 
  how can i get rid of the warning GY unread variable
 


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