[android-beginners] Re: Having a lot of problems finding the documentation (e.g. about sendevent)

2009-05-11 Thread rk

Hi Kent Yip,

I found that your post is really useful to the beginners. But here we
can see only mini no of key codes. when you look at the keyevent.java
file you can see a lot of keycodes in that. why those key codes are
not available in this. Can you please tell me where can I find these
key code mappings and list in the Android Source code.

thanks
raj
On Apr 22, 5:21 pm, a druid klausf...@gmail.com wrote:
 Just a tiny comment.

 getevent outputs the event values in hexadecimal.
 sendevent on the other hand seems to expect decimal values.

 In my first tests this was, where I stumbled.

 On Apr 21, 10:02 pm, Kent Yip yes...@gmail.com wrote:



  thank swarup for the insight

  i was able to look at theeventsfrom emulator, the keycode i different than
  defined in frameworks/base/core/java/android/view/KeyEvent.java

  all i can say is keycode for emulator and real device maybe different.

  and i am using SDK version:android-sdk-windows-1.1_r1

  here is how to use: sendevent

  command format: sendevent device type code value

  [command]     [device]             [type]    [code]   [value]
  sendevent    /dev/input/event0    1          229      1

  /dev/input/event0 is the device to send it to

  [type] 1 is unknow for me ( maybe code for physical button on device )

  [code] 229 is the MENU button of the emulator

  [value] 1 is keydown or press down ( for keyup or up use 0 )

  i wrote a batch file forsendingthe event to the device like below:

  adb -s emulator-5554 shell sendevent /dev/input/event0 1 229 1
  adb -s emulator-5554 shell sendevent /dev/input/event0 1 229 0

  have to use the follow command to simulate a pressing of button ( aka
  pressing down then let go )

  Key Name                 CODE
  MENU                       229
  HOME                       102
  BACK (back button)    158
  CALL (call button)       231
  END (end call button)  107

  now keyboard shown on the emulator

  Key Name                 CODE
  1                               2
  2                               3
  3                               4
  4                               5
  5                               6
  6                               7
  7                               8
  8                               9
  9                               10
  0                               11
  q                               16
  w                               17
  e                               18
  r                                19
  t                                20
  y                               21
  u                               22
  i                                23
  o                               24
  p                               25
  a                               30
  s                               31
  d                               32
  f                                33
  g                               34
  h                               35
  j                                36
  k                               37
  l                                38
  DEL (delete key)        14
  SHIFT (shift key)        42
  z                               44
  x                               45
  c                               46
  v                               47
  b                               48
  n                               49
  m                              50
  . (period)                    52
  return (enter key)        28
  Lt Alt (Left ALT key)    56
  SYM                         127
  @                             215
  Spc (Space key)        57
  /                               53
  , (comma)                 51
  Rt Alt (Right ALT key) 100
  Pwr ( Power on/off )     116

  On Tue, Apr 21, 2009 at 1:49 AM, swarup me.s...@gmail.com wrote:

   1) study the output of 'adb shell getevent', get high level idea of
   different parameters of keyevent.
   2) look at source code of getevent, sendevent command.
   3) also another command might interest you: input

   P.S.: if you do not know the source code locations, then follow the
   below gitweb path:

   [platform/system/core.git] /toolbox/sendevent.c
   [platform/system/core.git] /toolbox/getevent.c
   [platform/frameworks/base.git] /cmds/input/src/com/android/commands/
   input/Input.java

   On Apr 20, 4:33 pm, a druid klausf...@gmail.com wrote:
Hi Kent,

Thanks for your answer.
I already saw the documentation for monkey.
However this presses keys randomly.

What I wanted to do is to programatically (via adb shell, or via a
service like vnc server for PCs) pressing non random keys.

The simple first example, that I'd like to try is:
press (and release) the up button once.

I did not find any pointers explaining how to do this:

There seems to be a adb-shell command named 'sendevent', but I found
no documentation at all about the
event types / event numbers etc, that I should provide.

On Apr 17, 7:08 pm, Kent Yip yes...@gmail.com wrote:

 Perhaps this link will 

[android-beginners] Re: Problem with SQLite database, accessing the table

2009-05-11 Thread moazzamk

Use a different database name and see if that helps (since it will run
your onCreate() method). You can also try changing the name of the
table to something else (like user_options) and see if that works. I
wonder if options is an internal keyword used by SQLite.

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

On May 7, 1:42 pm, Glen Humphrey glendon.humphr...@gmail.com wrote:
 It looks to me like your program tries to fetch from the options table
 before it has been created.

 On May 7, 2:28 am, mic.ger...@gmail.com mic.ger...@gmail.com
 wrote:

  Hi all,
  I am developing an application that need a database (store username
  and password) and when I try to access to it I obtain those errors in
  the logCat :

  05-07 09:02:17.194: ERROR/AndroidRuntime(520): Uncaught handler:
  thread main exiting due to uncaught exception
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):
  android.database.sqlite.SQLiteException: no such table: options: ,
  while compiling: SELECT DISTINCT _id, title, body FROM options WHERE
  _id=0
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.database.sqlite.SQLiteProgram.native_compile(Native Method)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.database.sqlite.SQLiteProgram.compile(SQLiteProgram.java:110)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.database.sqlite.SQLiteProgram.init(SQLiteProgram.java:59)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.database.sqlite.SQLiteQuery.init(SQLiteQuery.java:48)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.database.sqlite.SQLiteDirectCursorDriver.query
  (SQLiteDirectCursorDriver.java:49)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.database.sqlite.SQLiteDatabase.rawQueryWithFactory
  (SQLiteDatabase.java:1017)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.database.sqlite.SQLiteDatabase.queryWithFactory
  (SQLiteDatabase.java:905)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:863)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  com.android.application.MonkeySMS.OptionDb.fetchOption(OptionDb.java:
  84)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  com.android.application.MonkeySMS.Option$1.onClick(Option.java:70)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.View.performClick(View.java:2129)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.View.onTouchEvent(View.java:3543)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.widget.TextView.onTouchEvent(TextView.java:4664)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.View.dispatchTouchEvent(View.java:3198)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  com.android.internal.policy.impl.PhoneWindow
  $DecorView.superDispatchTouchEvent(PhoneWindow.java:1593)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
  (PhoneWindow.java:1089)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.app.Activity.dispatchTouchEvent(Activity.java:1871)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  com.android.internal.policy.impl.PhoneWindow
  $DecorView.dispatchTouchEvent(PhoneWindow.java:1577)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.view.ViewRoot.handleMessage(ViewRoot.java:1140)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.os.Handler.dispatchMessage(Handler.java:88)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.os.Looper.loop(Looper.java:123)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  android.app.ActivityThread.main(ActivityThread.java:3739)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  java.lang.reflect.Method.invokeNative(Native Method)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  java.lang.reflect.Method.invoke(Method.java:515)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
  (ZygoteInit.java:739)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
  05-07 09:02:17.213: ERROR/AndroidRuntime(520):     at
  dalvik.system.NativeStart.main(Native Method)

  

[android-beginners] Re: Get alarms from Alarm Clock application

2009-05-11 Thread moazzamk

You can create your own alarms and sort of get them back. Here's how I
did it : http://moazzam-khan.com/blog/?p=157

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

On May 7, 5:12 pm, kaloer mkal...@gmail.com wrote:
 Yep, I could guess that :-) But thank you for the answer..

 On 7 Maj, 21:14, Jack Ha (T-Mobile USA) jack...@t-mobile.com
 wrote:

  Sorry for my earlier typo. What I meant was that you are NOT able to
  do that.

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

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

  On May 7, 11:01 am, kaloer mkal...@gmail.com wrote:

   Okay thank you, I'll look at it ..

   On 7 Maj, 18:45, Jack Ha (T-Mobile USA) jack...@t-mobile.com
   wrote:

As far as I know, you are able to do that since the Alarm Clock app
doesn't expose those specific intents.

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

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

On May 7, 5:55 am, kaloer mkal...@gmail.com wrote:

 Hi,

 Is it possible to access the alarms from the Alarm Clock application,
 so i can use them in my application?  And can I create an alarm in my
 application, which is visible in the Alarm Clock app?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: Problem with SQLite database, accessing the table

2009-05-11 Thread Arnaud Weber
isn't options a forbidden name for a table??
it's like a table called delete or select...
select * from select...

you should definitely try with another tablename.

2009/5/11 moazzamk moazz...@gmail.com


 Use a different database name and see if that helps (since it will run
 your onCreate() method). You can also try changing the name of the
 table to something else (like user_options) and see if that works. I
 wonder if options is an internal keyword used by SQLite.

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

 On May 7, 1:42 pm, Glen Humphrey glendon.humphr...@gmail.com wrote:
  It looks to me like your program tries to fetch from the options table
  before it has been created.
 
  On May 7, 2:28 am, mic.ger...@gmail.com mic.ger...@gmail.com
  wrote:
 
   Hi all,
   I am developing an application that need a database (store username
   and password) and when I try to access to it I obtain those errors in
   the logCat :
 
   05-07 09:02:17.194: ERROR/AndroidRuntime(520): Uncaught handler:
   thread main exiting due to uncaught exception
   05-07 09:02:17.213: ERROR/AndroidRuntime(520):
   android.database.sqlite.SQLiteException: no such table: options: ,
   while compiling: SELECT DISTINCT _id, title, body FROM options WHERE
   _id=0
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.database.sqlite.SQLiteProgram.native_compile(Native Method)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.database.sqlite.SQLiteProgram.compile(SQLiteProgram.java:110)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.database.sqlite.SQLiteProgram.init(SQLiteProgram.java:59)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.database.sqlite.SQLiteQuery.init(SQLiteQuery.java:48)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.database.sqlite.SQLiteDirectCursorDriver.query
   (SQLiteDirectCursorDriver.java:49)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.database.sqlite.SQLiteDatabase.rawQueryWithFactory
   (SQLiteDatabase.java:1017)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.database.sqlite.SQLiteDatabase.queryWithFactory
   (SQLiteDatabase.java:905)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:863)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   com.android.application.MonkeySMS.OptionDb.fetchOption(OptionDb.java:
   84)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   com.android.application.MonkeySMS.Option$1.onClick(Option.java:70)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.View.performClick(View.java:2129)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.View.onTouchEvent(View.java:3543)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.widget.TextView.onTouchEvent(TextView.java:4664)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.View.dispatchTouchEvent(View.java:3198)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   com.android.internal.policy.impl.PhoneWindow
   $DecorView.superDispatchTouchEvent(PhoneWindow.java:1593)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
   (PhoneWindow.java:1089)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.app.Activity.dispatchTouchEvent(Activity.java:1871)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   com.android.internal.policy.impl.PhoneWindow
   $DecorView.dispatchTouchEvent(PhoneWindow.java:1577)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.view.ViewRoot.handleMessage(ViewRoot.java:1140)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.os.Handler.dispatchMessage(Handler.java:88)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.os.Looper.loop(Looper.java:123)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   android.app.ActivityThread.main(ActivityThread.java:3739)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   java.lang.reflect.Method.invokeNative(Native Method)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   java.lang.reflect.Method.invoke(Method.java:515)
   05-07 09:02:17.213: ERROR/AndroidRuntime(520): at
   

[android-beginners] Re: how to override onDraw of view.

2009-05-11 Thread Vinay

Thanks raphael
i looked the code of snake project in the sdk
i got the idea to create the custom control... which matches my
requirement.


On May 9, 9:32 am, Raphael r...@android.com wrote:
 Since you are a beginner, a tip to easily view the samples in Eclipse:
 - open File  New  Android Project wizard
 - select the platform Android 1.5
 - select Use existing source then Browse next to it.
 - select the sample's directory.
 - The wizard fills all the settings for you.

 R/

 On Fri, May 8, 2009 at 9:30 PM, Raphael r...@android.com wrote:
  Please look at SDK/platform/android-1.5/samples/LunarLander -- it does
  that and should be easy to understand.

  There are also various custom View in the ApiDemoes sample code.

  R/

  On Thu, May 7, 2009 at 11:31 AM, Vinay vinay@gmail.com wrote:

  Hi All,

  I want to override onDraw fuction of a view object which is declared
  in the XML file

  in my XML file i have created a relative layout with in that i created
  a view for that view i want to override ondraw ... because i want
  to draw on that view.  can i override the ondraw  yes means
  how can i
  Thanks in advance

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



[android-beginners] Call Ended listener

2009-05-11 Thread Kaiwalya

Hi,

What type of listener should be implemented for getting call ended
event ? and is it possible to retrieve  the information  associated
with the call (for which we will get call ended event )  (such as ,
phone number, duration, direction [i/o] etc..)

Thanks,
Kaiwalya

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



[android-beginners] Failed to install Repo

2009-05-11 Thread kzhao

I cannot install Repo. I tried the command
curl http://android.git.kernel.org/repo ~/bin/repo, but the
downloaded repo is a HTML file.

cat ./bin/repo
!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title404 Not Found/title
/headbody
h1Not Found/h1
pThe requested URL /repo was not found on this server./p
/body/html

The URL http://android.git.kernel.org/repo cannot be found. Is this
URL have been changed? How do I install the Repo?

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] Low performance using SurfaceView, touchMode and OptionMenu

2009-05-11 Thread hubert

Hi,

I'm recently working on android application and i can not deal with
performance issues. My app is based on SurfaceView, I use separate
thread like in lunar lander. My problems starts when i use
onTouchEvent and onCreateOptionMenu. I created a test application,
which does nothing other drawing FPS on canvas. It shows up to 60 fps,
some times 40-50 when i don't interact in it.  Another case - i start
the same application, i have about 60 fps. Then I open option menu and
it slow down to 40 fps, i touch the screen and another drop to about
20 fps. If i stop touch the screen fps increase to about 40 some times
50 but not to 60. Sometimesi have the case that app runs with 60 fps,
i start option menu and touch the scren and I have 60 fps as on
beginning. I have no ideas why is this happens. If anyone has any
idea, please reply.

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



[android-beginners] Creating and manipulating custom Views

2009-05-11 Thread John Gunderman

I am writing a simple chess application for Android. I am curious as
to best practices for working with custom Views. What I have done so
far for the GUI is make a ChessView that inherits from View. I would
like to draw the chess board on a ChessView, and then make each square
of the board respond to a touchpad press in its area. So my two
questions are:

1. How do I draw the chess squares onto a ChessView?

2. How do I get the squares recognize key presses in their area?

Also, is this even the right strategy to use? Thanks for any help you
can offer.

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



[android-beginners] Integrating application with the google Calendar

2009-05-11 Thread hedlund

Hi,

I'm in the process of writing an application for android that is
intended to work closely with the google calendar. I have some
questions that I haven't managed to find answers for yet though:

1) If I have my application  talk to the calendar using the Google
Calendar APIs, and have it add/edit/remove events fromt he calendar,
will this require the adroid-phone to have access to the network while
I'm doing this, or does the calendar work well in offline mode as
well? If I add an event and I don't have contact with my mobile
network provider, will it still be added to the calendar on my mobile
phone and then be synched when the phone regains access to the
network?

2) Is it possible to add special entries to my google calendar that
can launch my application when accessed on an android phone, passing
in information from the entry?

Thanks

/Johan

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



[android-beginners] SDK 1.5 and NMEA files

2009-05-11 Thread Abir

Hi everyone, I am using the new 1.5 SDK and I am trying to extract
NMEA files but I failed:
I tried to do this:

C:\AndroidSDK\toolsadb pull data/misc/location/gps/nmea C:\Android

and I got this error:
remote object 'data/misc/location/gps/nmea' does not exist

I am thinking that there is no such folder location.

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: Android 1.5 SDK now available

2009-05-11 Thread tearse...@yahoo.com

I just installed Android 1.5 SDK on a Windows box using Eclipse
Ganymede version 3.4.  I follow the installation document until it
said go to Preference.  There was no Android option on the left
pane in Eclipse's Preference Section.  But there is one for DDMS and
when I click on that, it gave me an error:

Unable to create the selected preference page.

java.lang.UnsupportedClassVersionError

When selecting the Details button, I get:

Unable to create the selected preference page.
com/android/ide/eclipse/ddms/preference/PreferencePage (Unsupported
major.minor version 49.0)

??  Now what?  Can I still proceed with my installation to use this
with Eclipse?  I tried to uninstall and re-install Android from
Eclipse.  Same error.  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: Does this exist? Emulator for running Windows Mobile (ARM, xScale, etc) apps on Android

2009-05-11 Thread lbcoder

This would be a major undertaking. You can look at the wine project
for running windoze apps on linux, it would take something like that.
Really not feasible.

On May 8, 2:10 pm, jknox jk...@trisoft.com wrote:
 On May 8, 7:59 am, sssdeecee connelly.sh...@gmail.com wrote:



  But I was thinking if one could run their Windows mobile apps on
  an Android based phone, it would help to increase it's popularity.
  Personally, I have invested a lot in such apps (both purchased and
  coded).

  Does an emulator exist? Is anyone working on one?

 I'm not aware of an emulator as such.  Until fairly recently Appforge
 existed, which let you port your visual basic WM apps (sort of) to
 other platforms.  But Oracle bought and destroyed that option.

 Anyone got any other ideas for porting Visual Studio app code to
 Android?  [Or to Symbian or Palm OS, for that matter.]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email 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 create and open an SQLite database? (Based on NotePad tutorial)

2009-05-11 Thread senthil kumar
http://www.AWSurveys.com/HomeMain.cfm?RefID=pikaasohttp://www.awsurveys.com/HomeMain.cfm?RefID=pikaaso


The link above is quite useful..nothing to lose ...zero investment
...and spending a little time you can start earning  atleast 25 dollars
easily to begin with and thereafter that its upto your efforts. Best to try.
cheers

   Sam


On Sun, May 10, 2009 at 1:50 AM, AJ warhawk...@charter.net wrote:


 D'oh!  Wow, can't believe I missed that... my first time using SQLite
 here, in case that wasn't already obvious.  :p

 The database gets created now.  Thank you very much!  A few follow-up
 questions:

 - Where do these error logs you speak of live?  What exactly are adb
 logcat and DDMS?
 - How does a DATE datatype get converted from MySql into SQLite?
 Text?  Blob?
 - sqlite.org is down at the moment, so I'll search around for other
 examples, but what are the main differences between MySQL and SQLite
 regarding INSERT statements?

 You're awesome - thanks again!

 On May 8, 7:23 am, Mark Murphy mmur...@commonsware.com wrote:
  AJ wrote:
   Here's the full onCreate() function.  Seems like standard SQL syntax
   to me?
 
  What was the error you got? You can get the error log from adb logcat or
  DDMS. It should tell you what SQLite or Android did not like.
 
   public void onCreate(SQLiteDatabase db) {
 db.execSQL(CREATE TABLE IF NOT EXISTS 
  + DATABASE_TABLE_USER
  +  (userID INT PRIMARY KEY, name
 VARCHAR(40),
 
  There is no VARCHAR in SQLite.
 
  http://www.sqlite.org/datatype3.html
 
  +  birthdate DATETIME,
 
  There is no DATETIME in SQLite.
 
  +  weight INT(3), heightInches INT,
 
  +  smoking BOOLEAN DEFAULT
 'FALSE',
  +  school BOOLEAN DEFAULT 'FALSE',
 
  +  reading BOOLEAN DEFAULT
 'FALSE',
  +  religion BOOLEAN DEFAULT
 'FALSE',
  +  dating BOOLEAN DEFAULT
 'FALSE'););
 
  There is no BOOLEAN in SQLite.
 
  db.execSQL(CREATE TABLE IF NOT EXISTS 
  + DATABASE_TABLE_ACH
  +  (achID INT PRIMARY KEY
 AUTO-INCREMENT, 
 
  AUTOINCREMENT has no hyphen in SQLite.
 
  http://www.sqlite.org/lang_createtable.html
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://twitter.com/commonsguy
 
  Android App Developer Training:http://commonsware.com/training.html
 


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



[android-beginners] Android Game: AirAttack, follow my blog!

2009-05-11 Thread TjerkW

Hello Everybody!

For anyone that is interested in following the development of my
Android Game: AirAttack,
i have started a blog where you can follow the development:

http://airattackandroid.wordpress.com

So if you are interested, check it out!
You can also follow me on twitter:
http://www.twitter.com/tjerkw

Greetings!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email 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: youtube on android

2009-05-11 Thread lbcoder

You could just use the youtube application... hardly seems
constructive to develop what already exists.


On May 8, 12:31 am, ebin ebinjose...@gmail.com wrote:
 Hi All,

 We are developing an android based media player.
 I want to develop an application to playback youtube videos on
 android. I came to know (from the
 below mentioned link) that adobe demostrated flash player for android,
 but they haven't released the code yet.

 http://www.androidauthority.com/index.php/2008/11/17/flash-player-on-...

 Is there an alternative way to playback youtube video's on android ?
 Is there an application that supports flash content playback on
 android already (though I couldn't find any on android market or
 related sites) or any development work is underway ?

 Thanks in advance,

 Ebin.

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



[android-beginners] Problem with ArrayAdapter...

2009-05-11 Thread Phanikumar

Hello all,
  I am trying to use ArrayAdapter to search from a list of values
stored in arrays.xml with AutoComplete feature.

I read the data from the arrays.xml but can not get it to
AutoComplete. I get the following error message:

The constructor ArrayAdapter(new View.OnClickListener(){}, int, String
[]) is undefined

Please let me know what is it that i am doing wrong.

here's the code:


final Button buttons = (Button) findViewById(R.id.search);
buttons.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Perform action on click Search
astate=SEARCH_VIEW;
setContentView(R.layout.search_layout);

//Countries has a list of countries
Resources res = getResources();
Countries = res.getStringArray(R.array.countries);

//Now try to search using AutoComplete()
ArrayAdapterString adapter = new ArrayAdapter(this,
android.R.layout.simple_dropdown_item_1line,
Countries);
AutoCompleteTextView textView = (AutoCompleteTextView)
findViewById(R.id.edit);
textView.setAdapter(adapter);
}
});



any inputs and comments are appreciated.

Regards,
Phanikumar

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



[android-beginners] Knowledge of Android?

2009-05-11 Thread meca

Hi,

For a study we have been looking for android developers. We have now
increased our target audience and are now also looking for developers
in the UK that are considering to develop application on the Android
platform and have experience of iphone application development!

The Luleå University of Technology, Sweden, together with the
University of Manchester, UK, is about to start a study on developer
experience.

We are looking for people that either are considering to develop or
have already developed application(s) on the Android platform.
The research process includes face-to-face and online sessions during
the beginning of June.

If you would like to participate in one of the sessions that would
take a maximum of 2 hours of your time, please contact us at:
ca...@prontocommunication.se
Voucher will be offered to the participants.

Best Regards,
Carin Lundin, Pronto Communication

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



[android-beginners] InetAddress giving Unknown host on own application

2009-05-11 Thread mars.martian

Hi,
I am using InetAddress to open a URL on an application that is running
on the Android emulator (version 1.5) but InetAddress has been giving
me an Unknown host error.

I tried changing the host to a few different websites but each time I
get the same error.
examples taken from the console:
05-11 14:55:04.076: INFO/InetAddress(801): Unknown host google.com,
throwing UnknownHostException
05-11 15:17:36.017: INFO/InetAddress(759): Unknown host yahoo.com,
throwing UnknownHostException

I can access both yahoo.com and google.com from the web browser on the
Android fine and to my knowledge, I am not behind a proxy. I ran
ping on the terminal with both hostnames, and their IPs were shown.

what could be the problem?

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



[android-beginners] resource manager LayerDrawable problem

2009-05-11 Thread Chris

I have a LayerDrawable consisting of 4 Drawables each representing a
PNG. I get layers to change to different Drawables as desired, but
only a few times. Then debugging will throw an OutOfMemoryError. It's
as if the resource manager is not garbage-collecting once I replace
each drawable. What am I mssing?

Resources resources = getResouces();
Drawable layer;
Drawable[] layers = new Drawable[4]

// Initialize the array of layers, omitted layer.setBounds(...) for
readability
layer = resources.getDrawable(R.drawable.graphic_1_a);
layers[1] = layer;
layer = resources.getDrawable(R.drawable.graphic_2_a);
layers[2] = layer;
layer = resources.getDrawable(R.drawable.graphic_3_a);
layers[3] = layer;
layer = resources.getDrawable(R.drawable.graphic_4_a);
layers[4] = layer;

// Apply the array to a LayerDrawable
LayerDrawable layerDrawable = new LayerDrawable(layers);

// Now changing a layer will work
layer = resources.getDrawable(R.drawable.graphic_1_b);
layers[1] = layer;

// But then, ZygoteInit$MethodAndArgsCaller.run() throws
OutOfMemoryError
layer = resources.getDrawable(R.drawable.graphic_3_b);
layers[3] = layer;

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



[android-beginners] problems getting the emulator to run

2009-05-11 Thread iplaywithjelly

Im having problems getting the emulator to run.

I enter the command prompt ...emulator -data C:\ then it starts
exactly as ive seen it in numerous videos but then the error report
window pops up, emulator.exe has encountered a problem and needs to
close..

Does anyone know why this is and how to fix it?

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



[android-beginners] Sleep screen or screen saver

2009-05-11 Thread Mondain

Does anyone here have information about making an application into a
screen saver in the new Cupcake release? I've seen the home screen
widgets but I would prefer a higher level of integration with the
device. Here is my first app which I would like to use as my
screensaver.

http://gregoire.org/2009/05/06/my-first-android-application/

Thanks,
Paul

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email 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 Linux-ey is Android?

2009-05-11 Thread lbcoder

The terminal in android is able to run any console-based linux
executables you like, as long as they are compiled for the ARM CPU.

Despite the claim, the underlying linux os is not crippled. You are
free to install any additional components that you like -- most like
busybox for executables. The kernel can be recompiled to support
whatever additional drivers/features you like.

And despite the claims that suggest that android is not free, that
is an absolute lie. The sourcecode is available for anyone who wants
it. Any changes you like to make, you are free to.

If you're interested in running gnome/kde/whatever, realize that it is
NOT a welded issue, it is a RESOURCE issue... you simply don't have
the memory/cpu/disk_capacity/disk_speed/screen_resolution required to
make good use of those. Plenty have done it though, and its not that
hard: 
http://www.phonedog.com/cell-phone-research/blog/g1-running-ubuntu-with-full-desktop-environment.aspx

As for being locked out of root... this is true, however, most
consumers are idiots who shouldn't have admin access anyways --
they'll just screw it up, return it, and tell everyone how terrible
their experience was (even though it was their own fault for doing
something they watched on youtube). Its not difficult to get root if
you want it, or you could buy an ADP1, the developer phone, which
ships with root access enabled.


On May 7, 11:43 pm, Lou louis.e...@gmail.com wrote:
 If you mean, How similar is (what we're calling) Android in spirit to
 gnu/Linux? The answer is not very. The Android desktop is welded
 and locked onto a very crippled underlying linux os. Google and the
 other corporate overlords of Android have gone to great lengths to
 keep the average user from gaining root access to the underlying
 platform, much less allowing the average user to swap the Android
 veneer for a Gnome or KDE frontend or create applications that are
 outside of the Dalvik VM.

 The bottom line: Android is not free- no more than the iPhone OS is or
 one of Micro$ofts Oses.

 Good luck, have fun...but don't expect too much!

 On May 7, 5:35 pm, Disconnect dc.disconn...@gmail.com wrote:

  Although the first part of the answer is perfect :) 

  On Thu, May 7, 2009 at 5:16 PM, Mark Murphy mmur...@commonsware.com wrote:

How many of the freedoms that we've gotten used to using other Linux
frontends (desktops), such as xfce, Gnome, KDE are available with
the Android frontend?

   As many as there are for TiVo, Linksys routers, or other appliances based
   on Linux.

   In other words, none that are officially supported, but you are welcome to
   try to hack whatever you want. All you need is a device capable of
   accepting alternative firmware.

Is it possible to run ANY simple linux apps from
a terminal window in an Android device?

   What terminal window?

  The one you get from the market, or as part of the AOSP core android build
  :)

  (Sorry, couldn't resist.)



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email 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 create an Oval Gradient ?

2009-05-11 Thread Steeve

Hi everybody !

Gradient types available in the GradientDrawable class are :
- LINEAR_GRADIENT
- RADIAL_GRADIENT
- SWEEP_GRADIENT

If I draw an Oval shape, how can I fill it with an Oval gradient ?

Thanx...
Steeve

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



[android-beginners] not able to get the ArrayAdapter with AutoComplete View work

2009-05-11 Thread Phanikumar Bhamidipati
Hi all
  I am a beginner trying to display a list of strings from arrays.xml using
AutoCompleteView when a button is pressed. But some how i end up getting
error code:
The constructor ArrayAdapter(new View.OnClickListener(){}, int, String[])
is undefined .

the following is the code that i am using.

--

final Button buttons = (Button) findViewById(R.id.search);
buttons.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Perform action on click Search
astate=SEARCH_VIEW;
setContentView(R.layout.search_layout);

Resources res = getResources();
setCountries(res.getStringArray(R.array.countries));

ArrayAdapterString adapter = new ArrayAdapter(this,
android.R.layout.simple_dropdown_item_1line,
Countries);
AutoCompleteTextView textView = (AutoCompleteTextView)
findViewById(R.id.edit);
textView.setAdapter(adapter);
}
});
--

please let me know what is going wrong and any help/comments would be
appreciated.

-- 

Phanikumar

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



[android-beginners] Knowledge of Android?

2009-05-11 Thread meca

Hi,

For a study we have been looking for android developers. We have now
increased our target audience and are now also looking for developers
in the UK that are considering to develop application on the Android
platform and have experience of iphone application development!

The Luleå University of Technology, Sweden, together with the
University of Manchester, UK, is about to start a study on developer
experience.

We are looking for people that either are considering to develop or
have already developed application(s) on the Android platform.
The research process includes face-to-face and online sessions during
the beginning of June.

If you would like to participate in one of the sessions that would
take a maximum of 2 hours of your time, please contact us at:
ca...@prontocommunication.se
Voucher will be offered to the participants.

Best Regards,
Carin Lundin, Pronto Communication

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



[android-beginners] Developing Android Apps

2009-05-11 Thread rookee1...@googlemail.com

Hello,

I download the 1.5r1 SDK and Eclipse with ADT. So I tried the
following tutorial:

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

Seems to be simple...

But when I startet the Application I get these log output.

[2009-05-11 13:20:21 - HelloAndroid] --
[2009-05-11 13:20:21 - HelloAndroid] Android Launch!
[2009-05-11 13:20:21 - HelloAndroid] adb is running normally.
[2009-05-11 13:20:21 - HelloAndroid] Performing
com.exmaple.helloandroid.HelloAndroid activity launch
[2009-05-11 13:20:21 - HelloAndroid] Automatic Target Mode: launching
new emulator with compatible AVD 'test'
[2009-05-11 13:20:21 - HelloAndroid] Launching a new emulator with
Virtual Device 'test'
[2009-05-11 13:20:22 - HelloAndroid] New emulator found: emulator-5554
[2009-05-11 13:20:22 - HelloAndroid] Waiting for HOME
('android.process.acore') to be launched...
[2009-05-11 13:21:24 - HelloAndroid] HOME is up on device
'emulator-5554'
[2009-05-11 13:21:24 - HelloAndroid] Uploading HelloAndroid.apk onto
device 'emulator-5554'
[2009-05-11 13:21:24 - HelloAndroid] Installing HelloAndroid.apk...
[2009-05-11 13:21:34 - HelloAndroid] Success!
[2009-05-11 13:21:34 - HelloAndroid] Starting activity
com.exmaple.helloandroid.HelloAndroid on device
[2009-05-11 13:21:37 - HelloAndroid] ActivityManager: Starting: Intent
{ comp={com.exmaple.helloandroid/
com.exmaple.helloandroid.HelloAndroid} }

So if I read the output correct, I should wait 1 minute and seconds to
test my application. Should that be a joke by google? Which developer
could work so??? This is a reason for me NOT to develop for the
android system.

Does anybody other information or takes it by everybody so long?

Thanks for 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] Notepad Example 1 Trouble

2009-05-11 Thread jpsarje...@googlemail.com

Hi

I'm fairly experienced with Java but am used to working in the
Netbeans IDE so thought I'd take my first venture into Eclipse and
start on some Android development now I've got the Magic :D

Figured I'd start off with the tutorials and finished up example 1
perfectly or so I thought.

However it won't run as there is apparently errors in my code. There
is a red cross next to the com.android.demo.notepad1 package in the
explorer yet there isn't a red cross next to either Notepadv1.java or
NotesDbAdapter.java and no errors in the code of either java class.

So after staring at it for a while and not getting anywhere I loaded
up the Notepadv1 solution project and I have the same errors with
that.

I'm assuming it must be a problem with the IDE but don't really know
where to start when it comes to eclipse.

Any help would be much appreciated.
James

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



[android-beginners] setBuiltInZoomControls and debugging problems

2009-05-11 Thread Tim

Hi!

I've started a new google android project and I want to add zoom
controls to my map. Supposedly that should work like this:

mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);

Unfortunately that doesn't work. I do have the mapView, but when I try
to set the defaulzoomcontrols it gives me errors. When I try to debug
Eclipse tell me:

Source not found.

I can't see what's going wrong and I don't know how to fix that Source
not found error. I've tried adding some seemingly relevant directories
and/or namespaces via Edit source lookup path, but that's mostly
guesswork and doens't work anyway.

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



[android-beginners] Call Ended Event and Associated Information

2009-05-11 Thread Kaiwalya

Hi,

What type of listener should be implemented for getting call ended
event ? and is it possible to retrieve  the information  associated
with the call (for which we will get call ended event )  (such as ,
phone number, duration, direction [i/o] etc..)

Thanks,
Kaiwalya

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



[android-beginners] Re: Developing Android Apps

2009-05-11 Thread Mark Murphy

 I download the 1.5r1 SDK and Eclipse with ADT. So I tried the
 following tutorial:

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

 Seems to be simple...

 But when I startet the Application I get these log output.

 [2009-05-11 13:20:21 - HelloAndroid] --
 [2009-05-11 13:20:21 - HelloAndroid] Android Launch!
 [2009-05-11 13:20:21 - HelloAndroid] adb is running normally.
 [2009-05-11 13:20:21 - HelloAndroid] Performing
 com.exmaple.helloandroid.HelloAndroid activity launch
 [2009-05-11 13:20:21 - HelloAndroid] Automatic Target Mode: launching
 new emulator with compatible AVD 'test'
 [2009-05-11 13:20:21 - HelloAndroid] Launching a new emulator with
 Virtual Device 'test'
 [2009-05-11 13:20:22 - HelloAndroid] New emulator found: emulator-5554
 [2009-05-11 13:20:22 - HelloAndroid] Waiting for HOME
 ('android.process.acore') to be launched...
 [2009-05-11 13:21:24 - HelloAndroid] HOME is up on device
 'emulator-5554'
 [2009-05-11 13:21:24 - HelloAndroid] Uploading HelloAndroid.apk onto
 device 'emulator-5554'
 [2009-05-11 13:21:24 - HelloAndroid] Installing HelloAndroid.apk...
 [2009-05-11 13:21:34 - HelloAndroid] Success!
 [2009-05-11 13:21:34 - HelloAndroid] Starting activity
 com.exmaple.helloandroid.HelloAndroid on device
 [2009-05-11 13:21:37 - HelloAndroid] ActivityManager: Starting: Intent
 { comp={com.exmaple.helloandroid/
 com.exmaple.helloandroid.HelloAndroid} }

 So if I read the output correct, I should wait 1 minute and seconds to
 test my application. Should that be a joke by google? Which developer
 could work so??? This is a reason for me NOT to develop for the
 android system.

 Does anybody other information or takes it by everybody so long?

It takes a while to start the emulator, just as it takes a while to boot
the device, or boot a Windows PC. Leave your emulator running, and it
should not be a problem.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-beginners] Re: Get preferences from xml/preferences.xml

2009-05-11 Thread kaloer

Hi, thank for your help,

I have tried the getBaseContext() method, but I get my application
stops unexpectedly. When I debug, I get a RuntimeExeption before I get
to the SharedPreferences [...] code. This is what the Debug window
says:

DalvikVM[localhost:8609]
Thread [3 main] (Suspended (exception RuntimeException))

ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord)
line: 2194

ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord)
line: 2284
ActivityThread.access$1800(ActivityThread, ActivityThread
$ActivityRecord) line: 112
ActivityThread$H.handleMessage(Message) line: 1692
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3948
Method.invokeNative(Object, Object[], Class, Class[], Class, 
int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 782
ZygoteInit.main(String[]) line: 540
NativeStart.main(String[]) line: not available [native method]
Thread [13 Binder Thread #2] (Running)
Thread [11 Binder Thread #1] (Running)

//Kaloer

On 11 Maj, 19:52, Cass Surek cass.su...@gmail.com wrote:
 You could get the context by calling getBaseContext().

 Please be more specific on what exactly does not work as your problem
 might be in another place.

 Cass

 On May 11, 5:28 pm, kaloer mkal...@gmail.com wrote:

  Hi,

  How do I get the preferences from the preferences.xml file? I have
  tried with this code:
  SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences
  (this);

  but it does not work. I think the error is coursed by the use of the
  Context this, because the preferences are set by an other class. How
  can I access this preferences?

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



[android-beginners] Re: Notepad Example 1 Trouble

2009-05-11 Thread Michaël Gerber
Hi,
you have to delete all the files starting with ._ in the notepadv1 (or
notepadv1Solution) folder and in the subfolder.
Because those files are created with mac os and don't work otherwise.
For example you have .classpath and ._.classpath, delete the second.
For me it worked.
Michaël

2009/5/10 jpsarje...@googlemail.com jpsarje...@googlemail.com


 Hi

 I'm fairly experienced with Java but am used to working in the
 Netbeans IDE so thought I'd take my first venture into Eclipse and
 start on some Android development now I've got the Magic :D

 Figured I'd start off with the tutorials and finished up example 1
 perfectly or so I thought.

 However it won't run as there is apparently errors in my code. There
 is a red cross next to the com.android.demo.notepad1 package in the
 explorer yet there isn't a red cross next to either Notepadv1.java or
 NotesDbAdapter.java and no errors in the code of either java class.

 So after staring at it for a while and not getting anywhere I loaded
 up the Notepadv1 solution project and I have the same errors with
 that.

 I'm assuming it must be a problem with the IDE but don't really know
 where to start when it comes to eclipse.

 Any help would be much appreciated.
 James

 


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



[android-beginners] Re: Failed to install Repo

2009-05-11 Thread Michaël Gerber
Hi,
have you tried this :


To clone one of these trees, install
git, and run:

git clone git://android.git.kernel.org/ + project path.

To clone the entire platform, install

repo, and run:

mkdir mydroid

cd mydroid

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

repo sync

For more information about
git, see an
overview, the
tutorial
or the
man pages.

information finded on http://android.git.kernel.org/

Michaël


2009/5/11 kzhao kunzha...@gmail.com


 I cannot install Repo. I tried the command
 curl http://android.git.kernel.org/repo ~/bin/repo, but the
 downloaded repo is a HTML file.

 cat ./bin/repo
 !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
 htmlhead
 title404 Not Found/title
 /headbody
 h1Not Found/h1
 pThe requested URL /repo was not found on this server./p
 /body/html

 The URL http://android.git.kernel.org/repo cannot be found. Is this
 URL have been changed? How do I install the Repo?

 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: Custom library for android

2009-05-11 Thread paul.turchenko

Anyone?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email 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: Get preferences from xml/preferences.xml

2009-05-11 Thread Cass Surek

I had to roll back to version 1.1 due to not being able to use the
emulator with sensors, but this works fine for me :


  private void getPrefs(){

 SharedPreferences sharedPref =
PreferenceManager.getDefaultSharedPreferences(this);

 this.prefsAudioEnabled = sharedPref.getBoolean
(audio_enabled, true);

 }


Placed within the main activity of my application.

What is right before the call to the prefs? That could be the culprit.

Cass


On May 11, 7:18 pm, kaloer mkal...@gmail.com wrote:
 Hi, thank for your help,

 I have tried the getBaseContext() method, but I get my application
 stops unexpectedly. When I debug, I get a RuntimeExeption before I get
 to the SharedPreferences [...] code. This is what the Debug window
 says:

 DalvikVM[localhost:8609]
         Thread [3 main] (Suspended (exception RuntimeException))
                 
 ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord)
 line: 2194
                 
 ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord)
 line: 2284
                 ActivityThread.access$1800(ActivityThread, ActivityThread
 $ActivityRecord) line: 112
                 ActivityThread$H.handleMessage(Message) line: 1692
                 ActivityThread$H(Handler).dispatchMessage(Message) line: 99
                 Looper.loop() line: 123
                 ActivityThread.main(String[]) line: 3948
                 Method.invokeNative(Object, Object[], Class, Class[], Class, 
 int,
 boolean) line: not available [native method]
                 Method.invoke(Object, Object...) line: 521
                 ZygoteInit$MethodAndArgsCaller.run() line: 782
                 ZygoteInit.main(String[]) line: 540
                 NativeStart.main(String[]) line: not available [native method]
         Thread [13 Binder Thread #2] (Running)
         Thread [11 Binder Thread #1] (Running)

 //Kaloer

 On 11 Maj, 19:52, Cass Surek cass.su...@gmail.com wrote:

  You could get the context by calling getBaseContext().

  Please be more specific on what exactly does not work as your problem
  might be in another place.

  Cass

  On May 11, 5:28 pm, kaloer mkal...@gmail.com wrote:

   Hi,

   How do I get the preferences from the preferences.xml file? I have
   tried with this code:
   SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences
   (this);

   but it does not work. I think the error is coursed by the use of the
   Context this, because the preferences are set by an other class. How
   can I access this preferences?

   Thank you,
   //Kaloer


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



[android-beginners] Re: Get preferences from xml/preferences.xml

2009-05-11 Thread kaloer

Yeah, thank you very much!
It works now. I simply made a method like yours in the main method..

//Kaloer

On 11 Maj, 22:43, Cass Surek cass.su...@gmail.com wrote:
 I had to roll back to version 1.1 due to not being able to use the
 emulator with sensors, but this works fine for me :

   private void getPrefs(){

          SharedPreferences sharedPref =
 PreferenceManager.getDefaultSharedPreferences(this);

          this.prefsAudioEnabled = sharedPref.getBoolean
 (audio_enabled, true);

      }

 Placed within the main activity of my application.

 What is right before the call to the prefs? That could be the culprit.

 Cass

 On May 11, 7:18 pm, kaloer mkal...@gmail.com wrote:

  Hi, thank for your help,

  I have tried the getBaseContext() method, but I get my application
  stops unexpectedly. When I debug, I get a RuntimeExeption before I get
  to the SharedPreferences [...] code. This is what the Debug window
  says:

  DalvikVM[localhost:8609]
          Thread [3 main] (Suspended (exception RuntimeException))
                  
  ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord)
  line: 2194
                  
  ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord)
  line: 2284
                  ActivityThread.access$1800(ActivityThread, ActivityThread
  $ActivityRecord) line: 112
                  ActivityThread$H.handleMessage(Message) line: 1692
                  ActivityThread$H(Handler).dispatchMessage(Message) line: 99
                  Looper.loop() line: 123
                  ActivityThread.main(String[]) line: 3948
                  Method.invokeNative(Object, Object[], Class, Class[], 
  Class, int,
  boolean) line: not available [native method]
                  Method.invoke(Object, Object...) line: 521
                  ZygoteInit$MethodAndArgsCaller.run() line: 782
                  ZygoteInit.main(String[]) line: 540
                  NativeStart.main(String[]) line: not available [native 
  method]
          Thread [13 Binder Thread #2] (Running)
          Thread [11 Binder Thread #1] (Running)

  //Kaloer

  On 11 Maj, 19:52, Cass Surek cass.su...@gmail.com wrote:

   You could get the context by calling getBaseContext().

   Please be more specific on what exactly does not work as your problem
   might be in another place.

   Cass

   On May 11, 5:28 pm, kaloer mkal...@gmail.com wrote:

Hi,

How do I get the preferences from the preferences.xml file? I have
tried with this code:
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences
(this);

but it does not work. I think the error is coursed by the use of the
Context this, because the preferences are set by an other class. How
can I access this preferences?

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



[android-beginners] Re: Developing Android Apps

2009-05-11 Thread Ivan Soto
You don't have to close the emulator before every run.

Ivan Soto Fernandez
Web Developer
http://ivansotof.com



On Mon, May 11, 2009 at 5:23 AM, rookee1...@googlemail.com 
rookee1...@googlemail.com wrote:


 Hello,

 I download the 1.5r1 SDK and Eclipse with ADT. So I tried the
 following tutorial:

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

 Seems to be simple...

 But when I startet the Application I get these log output.

 [2009-05-11 13:20:21 - HelloAndroid] --
 [2009-05-11 13:20:21 - HelloAndroid] Android Launch!
 [2009-05-11 13:20:21 - HelloAndroid] adb is running normally.
 [2009-05-11 13:20:21 - HelloAndroid] Performing
 com.exmaple.helloandroid.HelloAndroid activity launch
 [2009-05-11 13:20:21 - HelloAndroid] Automatic Target Mode: launching
 new emulator with compatible AVD 'test'
 [2009-05-11 13:20:21 - HelloAndroid] Launching a new emulator with
 Virtual Device 'test'
 [2009-05-11 13:20:22 - HelloAndroid] New emulator found: emulator-5554
 [2009-05-11 13:20:22 - HelloAndroid] Waiting for HOME
 ('android.process.acore') to be launched...
 [2009-05-11 13:21:24 - HelloAndroid] HOME is up on device
 'emulator-5554'
 [2009-05-11 13:21:24 - HelloAndroid] Uploading HelloAndroid.apk onto
 device 'emulator-5554'
 [2009-05-11 13:21:24 - HelloAndroid] Installing HelloAndroid.apk...
 [2009-05-11 13:21:34 - HelloAndroid] Success!
 [2009-05-11 13:21:34 - HelloAndroid] Starting activity
 com.exmaple.helloandroid.HelloAndroid on device
 [2009-05-11 13:21:37 - HelloAndroid] ActivityManager: Starting: Intent
 { comp={com.exmaple.helloandroid/
 com.exmaple.helloandroid.HelloAndroid} }

 So if I read the output correct, I should wait 1 minute and seconds to
 test my application. Should that be a joke by google? Which developer
 could work so??? This is a reason for me NOT to develop for the
 android system.

 Does anybody other information or takes it by everybody so long?

 Thanks for 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: Get preferences from xml/preferences.xml

2009-05-11 Thread Cass Surek

Glad to be of help. Good luck. :)
Cass

On May 11, 9:59 pm, kaloer mkal...@gmail.com wrote:
 Yeah, thank you very much!
 It works now. I simply made a method like yours in the main method..

 //Kaloer

 On 11 Maj, 22:43, Cass Surek cass.su...@gmail.com wrote:

  I had to roll back to version 1.1 due to not being able to use the
  emulator with sensors, but this works fine for me :

    private void getPrefs(){

           SharedPreferences sharedPref =
  PreferenceManager.getDefaultSharedPreferences(this);

           this.prefsAudioEnabled = sharedPref.getBoolean
  (audio_enabled, true);

       }

  Placed within the main activity of my application.

  What is right before the call to the prefs? That could be the culprit.

  Cass

  On May 11, 7:18 pm, kaloer mkal...@gmail.com wrote:

   Hi, thank for your help,

   I have tried the getBaseContext() method, but I get my application
   stops unexpectedly. When I debug, I get a RuntimeExeption before I get
   to the SharedPreferences [...] code. This is what the Debug window
   says:

   DalvikVM[localhost:8609]
           Thread [3 main] (Suspended (exception RuntimeException))
                   
   ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord)
   line: 2194
                   
   ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord)
   line: 2284
                   ActivityThread.access$1800(ActivityThread, ActivityThread
   $ActivityRecord) line: 112
                   ActivityThread$H.handleMessage(Message) line: 1692
                   ActivityThread$H(Handler).dispatchMessage(Message) line: 
   99
                   Looper.loop() line: 123
                   ActivityThread.main(String[]) line: 3948
                   Method.invokeNative(Object, Object[], Class, Class[], 
   Class, int,
   boolean) line: not available [native method]
                   Method.invoke(Object, Object...) line: 521
                   ZygoteInit$MethodAndArgsCaller.run() line: 782
                   ZygoteInit.main(String[]) line: 540
                   NativeStart.main(String[]) line: not available [native 
   method]
           Thread [13 Binder Thread #2] (Running)
           Thread [11 Binder Thread #1] (Running)

   //Kaloer

   On 11 Maj, 19:52, Cass Surek cass.su...@gmail.com wrote:

You could get the context by calling getBaseContext().

Please be more specific on what exactly does not work as your problem
might be in another place.

Cass

On May 11, 5:28 pm, kaloer mkal...@gmail.com wrote:

 Hi,

 How do I get the preferences from the preferences.xml file? I have
 tried with this code:
 SharedPreferences prefs = 
 PreferenceManager.getDefaultSharedPreferences
 (this);

 but it does not work. I think the error is coursed by the use of the
 Context this, because the preferences are set by an other class. How
 can I access this preferences?

 Thank you,
 //Kaloer


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



[android-beginners] setVisibility crashes (on some objects)

2009-05-11 Thread jknox

I am trying to use the visibility property to change the screen
display when certain events occur.  [Okay, it's not elegant, but...
G]  First few tries, and things went okay.  I then added another
TextView and another EditText object.  To simply, let's just consider
a couple of the TextView object, txtModbox and txtFilenam.

EditText
android:id=@+id/txtModbox
android:layout_width=wrap_content
android:layout_height=wrap_content
android:singleLine=false
android:layout_x=10px
android:layout_y=170px

/EditText
EditText
android:id=@+id/txtFilenam
android:layout_width=wrap_content
android:layout_height=wrap_content
android:singleLine=false
android:layout_x=100px
android:layout_y=120px

/EditText


and in the Java:

private EditText txtModbox;
private EditText txtFilenam;

and
txtModbox.setVisibility(View.INVISIBLE);
//txtFilenam.setVisibility(View.INVISIBLE);

If I comment out the txtFilenam INVISIBLE line, the emulator crashes
with a Sorry.  The application has stopped unexpectedly... and
Eclipse show a lost connection.  Eclipse is ver 3.4.2.  and I believe
the Android SDK is current (downloaded a week or so ago).

Any ideas???   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: setVisibility crashes (on some objects)

2009-05-11 Thread Romain Guy
Your EditText is null. You first need to find that EditText in your
hierarchy by using findViewById:

txtModbox = findViewById(R.id.txtModbox);
txtModbox.setVisibility(View.GONE);

On Mon, May 11, 2009 at 3:06 PM, jknox jk...@trisoft.com wrote:


 I am trying to use the visibility property to change the screen
 display when certain events occur.  [Okay, it's not elegant, but...
 G]  First few tries, and things went okay.  I then added another
 TextView and another EditText object.  To simply, let's just consider
 a couple of the TextView object, txtModbox and txtFilenam.

 EditText
 android:id=@+id/txtModbox
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:singleLine=false
 android:layout_x=10px
 android:layout_y=170px
 
 /EditText
 EditText
 android:id=@+id/txtFilenam
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:singleLine=false
 android:layout_x=100px
 android:layout_y=120px
 
 /EditText


 and in the Java:

private EditText txtModbox;
private EditText txtFilenam;

 and
txtModbox.setVisibility(View.INVISIBLE);
//txtFilenam.setVisibility(View.INVISIBLE);

 If I comment out the txtFilenam INVISIBLE line, the emulator crashes
 with a Sorry.  The application has stopped unexpectedly... and
 Eclipse show a lost connection.  Eclipse is ver 3.4.2.  and I believe
 the Android SDK is current (downloaded a week or so ago).

 Any ideas???   Thanks...
 



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email 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: setVisibility crashes (on some objects)

2009-05-11 Thread jknox



On May 11, 5:16 pm, Romain Guy romain...@google.com wrote:
 Your EditText is null. You first need to find that EditText in your
 hierarchy by using findViewById:

 txtModbox = findViewById(R.id.txtModbox);
 txtModbox.setVisibility(View.GONE);

I have that set for Modbox, and it works.  It's the other one that
causes the crash.  [I will double check and make sure I have a
findViewById for it as well.]  Thanks...

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



[android-beginners] Dreaded Stopped Unexpectedly

2009-05-11 Thread Kevin J. Brooks

I am trying to bring up a Preferences screen.  Here is the XML for the
screen.

?xml version=1.0 encoding=utf-8?
PreferenceScreen 
xmlns:android=http://schemas.android.com/apk/res/android;
EditTextPreference 
android:key=weight
android:title=@string/weightlbltxt
android:defaultValue=145
/
ListPreference
android:title=@string/genderlbltxt
android:entries=@array/genders
android:defaultValue=Male
/
ListPreference
android:title=string/alarmlbltxt
android:entries=@array/alarms
android:defaultValue=None
/
EditTextPreference
android:key=BAC
android:title=@string/baclbltxt
android:defaultValue=0.08
/
Button android:id=@+id/btnSetDone
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_centerHorizontal=true
android:text=@string/donetxt
/
/PreferenceScreen

Here is the matching Java:

package com.parisj13.trackmydrinks;

import android.content.Context;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;

public class Settings extends PreferenceActivity implements
OnClickListener {

@Override
protected void onCreate(Bundle savedInstanceState){
super .onCreate(savedInstanceState);
addPreferencesFromResource(R.layout.settings);
//setContentView(R.layout.settings);
}
@Override
public void onClick(View v) {
finish();
}

public static int GetWeight(Context context){
return PreferenceManager.getDefaultSharedPreferences(context)
.getInt(weight, 145);
}

public static String GetGender(Context context){
return  PreferenceManager.getDefaultSharedPreferences(context)
.getString(gender, Male);
}

public static String GetAlarm(Context context){
return PreferenceManager.getDefaultSharedPreferences(context)
.getString(alarm, None);
}

public static int GetBAC(Context context){
return PreferenceManager.getDefaultSharedPreferences(context)
.getInt(BAC, 145);
}
}

Manifest Entry:

activity android:name=.Settings
android:label=@string/app_name
/activity

The code that launches the Settings screen:

if(v.getId() == R.id.btnSettings){
i = new Intent(this, Settings.class);
startActivity(i);
return;
}



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email 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: Dreaded Stopped Unexpectedly

2009-05-11 Thread Mark Murphy

It would really help if you would examine, and possibly include in these
emails, the Java stack trace from the Android log with these exceptions.
You can view the Android log via adb logcat or DDMS.

 I am trying to bring up a Preferences screen.  Here is the XML for the
 screen.

 ?xml version=1.0 encoding=utf-8?
 PreferenceScreen
   xmlns:android=http://schemas.android.com/apk/res/android;
   EditTextPreference
   android:key=weight
   android:title=@string/weightlbltxt
   android:defaultValue=145
   /
   ListPreference
   android:title=@string/genderlbltxt
   android:entries=@array/genders
   android:defaultValue=Male
   /
   ListPreference
   android:title=string/alarmlbltxt
   android:entries=@array/alarms
   android:defaultValue=None
   /
   EditTextPreference
   android:key=BAC
   android:title=@string/baclbltxt
   android:defaultValue=0.08
   /
   Button android:id=@+id/btnSetDone
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:layout_centerHorizontal=true
   android:text=@string/donetxt
   /
 /PreferenceScreen

Try getting rid of the Button.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-beginners] Re: youtube on android

2009-05-11 Thread ebin jose
Hi,

Could you please point me to such an application.
None of my search returned a favorable result.

Thanks in advance.

Thanks,
Ebin


On Sat, May 9, 2009 at 12:05 AM, lbcoder lbco...@gmail.com wrote:


 You could just use the youtube application... hardly seems
 constructive to develop what already exists.


 On May 8, 12:31 am, ebin ebinjose...@gmail.com wrote:
  Hi All,
 
  We are developing an android based media player.
  I want to develop an application to playback youtube videos on
  android. I came to know (from the
  below mentioned link) that adobe demostrated flash player for android,
  but they haven't released the code yet.
 
  http://www.androidauthority.com/index.php/2008/11/17/flash-player-on-...
 
  Is there an alternative way to playback youtube video's on android ?
  Is there an application that supports flash content playback on
  android already (though I couldn't find any on android market or
  related sites) or any development work is underway ?
 
  Thanks in advance,
 
  Ebin.

 


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