[android-developers] Re: How can native C++ application starting Andorid application

2008-09-11 Thread hackbod

We aren't saying this isn't supported just to give you a challenge,
but because the kind of stuff you are doing is not supported, and you
can expect it to break across any changes to the system since you are
using non-public features.  As such, this isn't something we are going
to help you do.  You can start a thread on Android Internals about
hacking on the system like this, but this group is not an appropriate
place for such discussion.

On Sep 10, 1:18 pm, Anshul [EMAIL PROTECTED] wrote:
 Dianne,

 I understand that native code is not supported by Android at this time
 but i did find a lot of examples that lets us run say a basic hello
 world program in C on Android simulator. We already have an app
 running in the linux space on the Android phone and would like it to
 somehow start an android app.

 Or is there any way we can start and stop an android app automatically
 without manually gointo to the menu. I found out that we could have a
 reviever listening for BOOT_COMPLETED event and then can start a
 service. We can at that time start a socket and then communicate with C
 ++ app using sockets and instruct the android app to close itself when
 work is done. We would like to restart the andopird app again without
 having to restart the phone. So listening to  the BOOT completed event
 will work only one time unless we restart the phone every time.

 Thanks a lot for your help.
 -Anshul

 On Sep 10, 12:10 am, hackbod [EMAIL PROTECTED] wrote:

  Native code is not supported at this time.

  On Sep 9, 5:38 pm, Anshul [EMAIL PROTECTED] wrote:

   Hello everyone,

   I wanted to find out if there is any way for a native applicaion
   written in C/C++ can start an android app. From this group I could
   find answers to how to run a native app on the Andorid simulator and
   also how to start an android app through adb shell (am start -n test/
   test.HelloWorld).

   Is there any way I can call say a system command in C++ native app and
   pass the am command I passed to the adb shell to start the android
   HelloWorld app?
   Somethin like:

   System (am start -n test/test.HelloWorld);

   or any other way.

   Thanks
   -Anshul- Hide quoted text -

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



[android-developers] Re: how to remove a view

2008-09-11 Thread hackbod

setContentView() replaces any existing views.  If you want finer-
grained control, you can setContentView() a top-level layout manager,
which you can then add and remove views in as you desire.

On Sep 10, 2:40 pm, Billsen [EMAIL PROTECTED] wrote:
 Hi,

 How to remove a view added by addContentView method?

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



[android-developers] Re: M5 - 0.9 Issue about file creation

2008-09-11 Thread Tyler Ernst

Thanks!  I had the same problem.

On Aug 20, 8:45 am, roland [EMAIL PROTECTED] wrote:
 Just found the problem is i didn't delete old package folder which is
 compiled with the M5. Everything works fine now.

 On 20 août, 17:00, roland [EMAIL PROTECTED] wrote:

  In my application, i saved downloaded files from server in the package
  directory which means data/data/com.../downloadFile/file. I just
  found my method didn' work anymore in 0.9 SDK.

  private void StreamToFile(String stream, String filePath){
          File file = new File(filePath);
          FileOutputStream fos;
          try{
                  fos = new FileOutputStream(file);
                  DataOutputStream dos = new DataOutputStream(fos);
                  dos.writeBytes(stream);
                  Log.i(info, file create ok +filePath);
          }
          catch (FileNotFoundException e)
          {e.printStackTrace();}
          catch (IOException e)
          {e.printStackTrace();}

  }

  I got a FileNotFoundException, it's weird this method works in M5.

  So i change it, i create the directory and file by using the mkdirs()
  and createNewFile() :
  private void StreamToFile(String stream, String filePath){
          String path = filePath.substring(0, filePath.lastIndexOf(/) + 1);
          String fileName = filePath.substring(filePath.lastIndexOf(/) + 1);
          File directory = new File(path);
          if (!directory.exists()) {
                  Log.i(info, mkdirs +directory.mkdirs());
                  Log.i(info, directory +directory.exists());
          }
          File file = new File(directory, fileName);
          FileOutputStream fos;
          try{
                  file.createNewFile();
                  fos = new FileOutputStream(file);
                  DataOutputStream dos = new DataOutputStream(fos);
                  dos.writeBytes(stream);
          }
          catch (FileNotFoundException e)
          {e.printStackTrace();}
          catch (IOException e)
          {e.printStackTrace();}

  }

  mkdirs() return always false, is that mean we couldn't create
  directory in data? But i tried in console, it works with command line.
  I'm confused, anyone has idea?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Regarding view onKeyDown issue...

2008-09-11 Thread Wesley Sagittarius

hi,

I created a view and then I setFocusable(true) for the key press
purpose...

but,
some how when I key on   case KeyEvent.KEYCODE_DPAD_CENTER
it seem like have a problem to map key or get the key...

it show(at logcat):
09-11 07:32:58.130: WARN/KeyCharacterMap(299): No keyboard for id 0
09-11 07:32:58.130: WARN/KeyCharacterMap(299): Using default keymap: /
system/usr/keychars/qwerty.kcm.bin

may I know is there anything I miss out??



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



[android-developers] Unknown Exception???

2008-09-11 Thread Wesley Sagittarius

hi,

while my app is running...
but something suddenly got some weird exception show in logcat...
even it does not quit my app...
but I would like to know what is regards...

FYI, my app does not dealing with any sqldb thing at all...

Exception Show as below...


09-11 07:42:37.688: ERROR/Database(50): Error inserting
tag=WAKELOCK:ActivityManager-Launch sum=5651.366 count=3 using INSERT
INTO stats(tag, sum, count) VALUES(?, ?, ?);
09-11 07:42:37.727: ERROR/Database(50): Error inserting
tag=WAKELOCK:KEEP_SCREEN_ON_FLAG sum=18.128 count=1 using INSERT INTO
stats(tag, sum, count) VALUES(?, ?, ?);
09-11 07:42:37.738: ERROR/Database(50): Failure 8 (attempt to write a
readonly database) on 0x23c7b0 when executing 'BEGIN EXCLUSIVE;'
09-11 07:42:37.758: ERROR/Database(50): Error executing BEGIN
EXCLUSIVE;
09-11 07:42:37.798: ERROR/WakeLockHistory(50): Error reporting wake
lock statistics
09-11 07:42:37.798: ERROR/WakeLockHistory(50):
android.database.sqlite.SQLiteException: attempt to write a readonly
database: BEGIN EXCLUSIVE;
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:
1336)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:
342)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteCursor.commitUpdates(SQLiteCursor.java:
284)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.AbstractCursor.commitUpdates(AbstractCursor.java:436)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.server.checkin.CheckinProvider.insertStats(CheckinProvider.java:
262)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
159)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentProvider.bulkInsert(ContentProvider.java:373)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentProvider
$Transport.bulkInsert(ContentProvider.java:144)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentResolver.bulkInsert(ContentResolver.java:360)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
com.android.server.WakeLockHistory.run(WakeLockHistory.java:410)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Handler.handleCallback(Handler.java:542)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Handler.dispatchMessage(Handler.java:86)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Looper.loop(Looper.java:123)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.HandlerThread.run(HandlerThread.java:60)
09-11 07:42:37.828: ERROR/Database(50): Failure 8 (attempt to write a
readonly database) on 0x23c7b0 when executing 'BEGIN EXCLUSIVE;'
09-11 07:42:37.828: ERROR/Database(50): Error executing BEGIN
EXCLUSIVE;
09-11 07:42:37.869: ERROR/Checkin(50): Can't update stat:
CRASHES_REPORTED
09-11 07:42:37.869: ERROR/Checkin(50):
android.database.sqlite.SQLiteException: attempt to write a readonly
database: BEGIN EXCLUSIVE;
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:
1336)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:
342)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteCursor.commitUpdates(SQLiteCursor.java:
284)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.AbstractCursor.commitUpdates(AbstractCursor.java:436)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insertStats(CheckinProvider.java:
262)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
159)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentProvider$Transport.insert(ContentProvider.java:
139)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentResolver.insert(ContentResolver.java:335)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.provider.Checkin.updateStats(Checkin.java:220)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insertCrash(CheckinProvider.java:
289)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
161)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentProvider$Transport.insert(ContentProvider.java:
139)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentResolver.insert(ContentResolver.java:335)
09-11 07:42:37.869: ERROR/Checkin(50): at

[android-developers] Unknown Exception???

2008-09-11 Thread Wesley Sagittarius

hi,

while my app is running...
but something suddenly got some weird exception show in logcat...
even it does not quit my app...
but I would like to know what is regards...

FYI, my app does not dealing with any sqldb thing at all...

Exception Show as below...


09-11 07:42:37.688: ERROR/Database(50): Error inserting
tag=WAKELOCK:ActivityManager-Launch sum=5651.366 count=3 using INSERT
INTO stats(tag, sum, count) VALUES(?, ?, ?);
09-11 07:42:37.727: ERROR/Database(50): Error inserting
tag=WAKELOCK:KEEP_SCREEN_ON_FLAG sum=18.128 count=1 using INSERT INTO
stats(tag, sum, count) VALUES(?, ?, ?);
09-11 07:42:37.738: ERROR/Database(50): Failure 8 (attempt to write a
readonly database) on 0x23c7b0 when executing 'BEGIN EXCLUSIVE;'
09-11 07:42:37.758: ERROR/Database(50): Error executing BEGIN
EXCLUSIVE;
09-11 07:42:37.798: ERROR/WakeLockHistory(50): Error reporting wake
lock statistics
09-11 07:42:37.798: ERROR/WakeLockHistory(50):
android.database.sqlite.SQLiteException: attempt to write a readonly
database: BEGIN EXCLUSIVE;
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:
1336)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:
342)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteCursor.commitUpdates(SQLiteCursor.java:
284)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.AbstractCursor.commitUpdates(AbstractCursor.java:436)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.server.checkin.CheckinProvider.insertStats(CheckinProvider.java:
262)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
159)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentProvider.bulkInsert(ContentProvider.java:373)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentProvider
$Transport.bulkInsert(ContentProvider.java:144)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentResolver.bulkInsert(ContentResolver.java:360)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
com.android.server.WakeLockHistory.run(WakeLockHistory.java:410)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Handler.handleCallback(Handler.java:542)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Handler.dispatchMessage(Handler.java:86)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Looper.loop(Looper.java:123)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.HandlerThread.run(HandlerThread.java:60)
09-11 07:42:37.828: ERROR/Database(50): Failure 8 (attempt to write a
readonly database) on 0x23c7b0 when executing 'BEGIN EXCLUSIVE;'
09-11 07:42:37.828: ERROR/Database(50): Error executing BEGIN
EXCLUSIVE;
09-11 07:42:37.869: ERROR/Checkin(50): Can't update stat:
CRASHES_REPORTED
09-11 07:42:37.869: ERROR/Checkin(50):
android.database.sqlite.SQLiteException: attempt to write a readonly
database: BEGIN EXCLUSIVE;
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:
1336)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:
342)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteCursor.commitUpdates(SQLiteCursor.java:
284)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.AbstractCursor.commitUpdates(AbstractCursor.java:436)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insertStats(CheckinProvider.java:
262)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
159)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentProvider$Transport.insert(ContentProvider.java:
139)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentResolver.insert(ContentResolver.java:335)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.provider.Checkin.updateStats(Checkin.java:220)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insertCrash(CheckinProvider.java:
289)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
161)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentProvider$Transport.insert(ContentProvider.java:
139)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentResolver.insert(ContentResolver.java:335)
09-11 07:42:37.869: ERROR/Checkin(50): at

[android-developers] Unknown Exception???

2008-09-11 Thread Wesley Sagittarius

hi,

while my app is running...
but something suddenly got some weird exception show in logcat...
even it does not quit my app...
but I would like to know what is regards...

FYI, my app does not dealing with any sqldb thing at all...

Exception Show as below...


09-11 07:42:37.688: ERROR/Database(50): Error inserting
tag=WAKELOCK:ActivityManager-Launch sum=5651.366 count=3 using INSERT
INTO stats(tag, sum, count) VALUES(?, ?, ?);
09-11 07:42:37.727: ERROR/Database(50): Error inserting
tag=WAKELOCK:KEEP_SCREEN_ON_FLAG sum=18.128 count=1 using INSERT INTO
stats(tag, sum, count) VALUES(?, ?, ?);
09-11 07:42:37.738: ERROR/Database(50): Failure 8 (attempt to write a
readonly database) on 0x23c7b0 when executing 'BEGIN EXCLUSIVE;'
09-11 07:42:37.758: ERROR/Database(50): Error executing BEGIN
EXCLUSIVE;
09-11 07:42:37.798: ERROR/WakeLockHistory(50): Error reporting wake
lock statistics
09-11 07:42:37.798: ERROR/WakeLockHistory(50):
android.database.sqlite.SQLiteException: attempt to write a readonly
database: BEGIN EXCLUSIVE;
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:
1336)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:
342)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.sqlite.SQLiteCursor.commitUpdates(SQLiteCursor.java:
284)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.database.AbstractCursor.commitUpdates(AbstractCursor.java:436)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.server.checkin.CheckinProvider.insertStats(CheckinProvider.java:
262)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
159)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentProvider.bulkInsert(ContentProvider.java:373)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentProvider
$Transport.bulkInsert(ContentProvider.java:144)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.content.ContentResolver.bulkInsert(ContentResolver.java:360)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
com.android.server.WakeLockHistory.run(WakeLockHistory.java:410)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Handler.handleCallback(Handler.java:542)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Handler.dispatchMessage(Handler.java:86)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.Looper.loop(Looper.java:123)
09-11 07:42:37.798: ERROR/WakeLockHistory(50): at
android.os.HandlerThread.run(HandlerThread.java:60)
09-11 07:42:37.828: ERROR/Database(50): Failure 8 (attempt to write a
readonly database) on 0x23c7b0 when executing 'BEGIN EXCLUSIVE;'
09-11 07:42:37.828: ERROR/Database(50): Error executing BEGIN
EXCLUSIVE;
09-11 07:42:37.869: ERROR/Checkin(50): Can't update stat:
CRASHES_REPORTED
09-11 07:42:37.869: ERROR/Checkin(50):
android.database.sqlite.SQLiteException: attempt to write a readonly
database: BEGIN EXCLUSIVE;
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:
1336)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:
342)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.sqlite.SQLiteCursor.commitUpdates(SQLiteCursor.java:
284)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.database.AbstractCursor.commitUpdates(AbstractCursor.java:436)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insertStats(CheckinProvider.java:
262)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
159)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentProvider$Transport.insert(ContentProvider.java:
139)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentResolver.insert(ContentResolver.java:335)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.provider.Checkin.updateStats(Checkin.java:220)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insertCrash(CheckinProvider.java:
289)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.server.checkin.CheckinProvider.insert(CheckinProvider.java:
161)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentProvider$Transport.insert(ContentProvider.java:
139)
09-11 07:42:37.869: ERROR/Checkin(50): at
android.content.ContentResolver.insert(ContentResolver.java:335)
09-11 07:42:37.869: ERROR/Checkin(50): at

[android-developers] Re: Regarding view onKeyDown issue...

2008-09-11 Thread Wesley
ya... FYI, most of the times it happen is after I Invoke Touch screen
event... the onKeyDown seem not work because of the warning...
why???

any one know???


wesley.

On Thu, Sep 11, 2008 at 3:41 PM, Wesley Sagittarius [EMAIL PROTECTED]wrote:


 hi,

 I created a view and then I setFocusable(true) for the key press
 purpose...

 but,
 some how when I key on   case KeyEvent.KEYCODE_DPAD_CENTER
 it seem like have a problem to map key or get the key...

 it show(at logcat):
 09-11 07:32:58.130: WARN/KeyCharacterMap(299): No keyboard for id 0
 09-11 07:32:58.130: WARN/KeyCharacterMap(299): Using default keymap: /
 system/usr/keychars/qwerty.kcm.bin

 may I know is there anything I miss out??



 Wesley.
 


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



[android-developers] Re: Mock Location Provider [SOLVED+IMPROVED]

2008-09-11 Thread Stefan Handschuh

Hi Justin,

the interesting enhancement wasn't the journey, but it was the
interpolation of route-points. One may now make a road of 2 points and
the mock-provider can make a route of arbitrary many points out of these
two.
So if one has a straight route between 2 cities, the provider creates a
smooth route between the cities.


Stefan


Am Dienstag, den 09.09.2008, 11:21 -0700 schrieb Justin (Google
Employee):
 Thanks Stefan, for providing the additional route. I just included a
 trivial one and the hope is that users will input what ever route data
 source makes sense for them.
 
 In the future I might work on enhancing the program to include a set
 of routes to choose from and the ability to just specify different
 data sources like a URL, file path, or content provider.
 
 Cheers,
 Justin
 Android Team @ Google
 
 On Sep 3, 9:56 am, Stefan Handschuh [EMAIL PROTECTED] wrote:
  I somehow improved Justins code.
 
  Seehttp://pastebin.com/m1f06415f
 
  It has now a New-York based journey (longer than before) and the
  time-interval between each points can be set so that the update inveral
  (set to 500ms) can be arbitraryly small (see line 177)
 
  @Justin: if you like it, please include it in you zip-file
 
   I just posted some code 
   athttp://groups.google.com/group/android-developers/web/mock_provider.zip
   that implements a mock location provider. This runs entirely in the
   emulator, so it should work across all platforms. It allows you to
   specify a set of coordinates and will the just loop through them
   forever. This could easily be adapted to read data from a file, URL,
   etc. As Stefan points out 
   onhttp://groups.google.com/group/android-developers/browse_frm/thread/2...
   , its important to set the time value on the Location you pass to the
   location service. If a new Location has the same time value as the
   previous one the LocationManager received, the location won't be
   updated.
 
   You should be able to compile this, install it on the emulator, run
   it, and then see the location change in Maps application.
 
   Hopefully this puts it all together and resolves issues that many have
   been encountering.
 
   Cheers,
   Justin
   Android Team @ Google
  


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



[android-developers] drawLine is broken

2008-09-11 Thread sahn0

Consider two ways to draw a rectangle:

//-
int x=10;
int y=10;
int w=2;
int h=2;

canvas.drawRect(x,y,x+w,y+h,p); // (1)

float[] lines=new float[]{
x,y,x+w,y,
x+w,y,x+w,y+h,
x+w,y+h,x,y+h,
x,y+h,x,y
};

canvas.drawLines(lines,p); // (2)
//-

You may think that they both produce same rectagle, but you would be
wrong.
Call (2) draws a rectangle without bottom-right pixel. (Call (1) draws
rectangle correctly.)

This is because drawLine doesn't draw endpoint's pixel. So
drawLine(0,0,2,0) draws 2 pixels, not three. Hence the missing pixel
at the bottom-right (drawLines also sorts points, so bottom line is
drawn from (x,y+h) to (x+w,y+h)).

This behaviour is different from J2ME's  J2SE's, where drawLine
always draws both endpoints, and drawing rectange with drawLine
produces same result as drawRect.

The question is: is this a bug?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How float coordinates are mapped to pixels (rounded)?

2008-09-11 Thread sahn0

How exactly float coordinates are mapped to pixels (provided that
there is no transformation)?
I guess they are rounded in a good old fashion way: (int)
(floatCoordiate+0.5f). Am I correct?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How float coordinates are mapped to pixels (rounded)?

2008-09-11 Thread Mike Reed

Correct

On Sep 11, 2008, at 8:27 AM, sahn0 wrote:


How exactly float coordinates are mapped to pixels (provided that
there is no transformation)?
I guess they are rounded in a good old fashion way: (int)
(floatCoordiate+0.5f). Am I correct?



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



[android-developers] Re: drawLine is broken

2008-09-11 Thread Mike Reed

Might be a bug. Can you put a more complete code snippet (including  
how the paint (p) was setup) into the bug?

thanks,
mike

On Sep 11, 2008, at 8:20 AM, sahn0 wrote:


Consider two ways to draw a rectangle:

//-
int x=10;
int y=10;
int w=2;
int h=2;

canvas.drawRect(x,y,x+w,y+h,p); // (1)

float[] lines=new float[]{
x,y,x+w,y,
x+w,y,x+w,y+h,
x+w,y+h,x,y+h,
x,y+h,x,y
};

canvas.drawLines(lines,p); // (2)
//-

You may think that they both produce same rectagle, but you would be
wrong.
Call (2) draws a rectangle without bottom-right pixel. (Call (1) draws
rectangle correctly.)

This is because drawLine doesn't draw endpoint's pixel. So
drawLine(0,0,2,0) draws 2 pixels, not three. Hence the missing pixel
at the bottom-right (drawLines also sorts points, so bottom line is
drawn from (x,y+h) to (x+w,y+h)).

This behaviour is different from J2ME's  J2SE's, where drawLine
always draws both endpoints, and drawing rectange with drawLine
produces same result as drawRect.

The question is: is this a bug?



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



[android-developers] Re: drawLine is broken

2008-09-11 Thread sahn0

Yes, p is Paint object set up as follows:

Paint p=new Paint();
p.setColor(0xFF80);
p.setStyle(Paint.Style.STROKE);

Style.STROKE is needed for drawRect to actually draw rect, issue with
right-bottom pixel shows itself independently of Style.

On 11 сент, 19:48, Mike Reed [EMAIL PROTECTED] wrote:
 Might be a bug. Can you put a more complete code snippet (including  
 how the paint (p) was setup) into the bug?

 thanks,
 mike

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



[android-developers] Re: Using the ItemizedOverlay and OverlayItem

2008-09-11 Thread Guillaume Perrot

I also manually draw titles but I have problem with ordering them
because when calling super(), all bubbles are drawn at once, then (or
before) I can draw info window. What I want to do is draw a bubble
(super.draw) then an info window then another bubble then another info
window etc
It would be great to have a draw method in OverlayItem class to
override...

On 4 sep, 17:35, Chris Chiappone [EMAIL PROTECTED] wrote:
 I had to manually draw those inside the onTap method.

 On Thu, Sep 4, 2008 at 3:51 AM, Guillaume Perrot



 [EMAIL PROTECTED] wrote:

  OK overlay items are drawn with the setBounds trick.
  But overlay title or snippet is never drawn even if we tap on it. How
  to use these overlay items fields ?

  On Sep 3, 12:09 pm, Peter Stevenson [EMAIL PROTECTED] wrote:
  Chris Chiappone wrote:
   Marcel,

   Thanks for that seems to work as you described.  The only thing that
   doesn't seem right is the way the map draws the markers shadow.  Any
   idea on how to correct that.

   Thanks.

   On Mon, Sep 1, 2008 at 2:03 PM, marcel-182 [EMAIL PROTECTED] wrote:

   Hi everyone,

   I finally got this thing working. Just set the bounds of the marker to
   be drawn and that's it!

   Sample:
   Drawable defaultMarker =
   getResources().getDrawable(R.drawable.map_marker_red);
   defaultMarker.setBounds(0, 0, defaultMarker.getIntrinsicWidth(),
   defaultMarker.getIntrinsicHeight());
   mMapView.getOverlays().add(new DemoOverlay(defaultMarker)); //
   DemoOverlay is of course an ItemizedOverlay

   I made a small demo showing one OverlayItem and how to handle tap-
   events. If someone is interested:
  http://www.marcelp.info/2008/09/01/android-itemizedoverlay-demo/

   Regards, Marcel

  try changing

  private GeoPoint mRandomPoint = new GeoPoint(5309691, 8851933);
  to some thing like this
  currentPoint = new GeoPoint((int) (-43.2973 * 100), (int) (172.5929
  * 100));
  the map is draw much faster

  peter

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



[android-developers] Re: drawLine is broken

2008-09-11 Thread Mike Reed

The general confusion is that the android graphics geometry is center- 
line based, and consistent at all matrix transformations, while J2ME  
linedrawing is more pen based.

As an example, when android draws a line, it basically constructs a  
rectangle about the line, by moving parallel to the line by 1/2 the  
strokeWidth. If there is no fancy Join (e.g. Square or Round), no  
outset is performed on the line's ends. So for the line (0,0) (0,2),  
it constructs the rectangle

// assuming the strokeWidth is 1.0
 left = 0
 top = -1/2
 right = 2
 bottom = 1/2

and then tries to fill the rectangle, using the standard of rounding  
each coordinate to an int via (int)(coord + 0.5) // for positive coords

That said, in your example, the strokeWidth is 0, which is a special  
value meaning hairline. This is pretty close to 1.0, but will draw  
slightly differently at times, but much faster. (aside: hairline  
stroking always draws 1-pixel wide, regardless of the matrix on the  
canvas).

Stroking rectangles in hairline mode does a little extra work to be  
nice to try to hit all of the corners, even if the normal hairline  
drawLine path would have missed it.

But back to center-line geometry. The upshot really is, if you want to  
trivially predict what pixels will be hit for stroking, put your  
geometry on 1/2 pixel boundaries. Then when I outset by 1/2 the  
strokeWidth, the center-line pixel will always get hit.

mike

On Sep 11, 2008, at 9:12 AM, sahn0 wrote:


Yes, p is Paint object set up as follows:

Paint p=new Paint();
p.setColor(0xFF80);
p.setStyle(Paint.Style.STROKE);

Style.STROKE is needed for drawRect to actually draw rect, issue with
right-bottom pixel shows itself independently of Style.

On 11 сент, 19:48, Mike Reed [EMAIL PROTECTED] wrote:
 Might be a bug. Can you put a more complete code snippet (including
 how the paint (p) was setup) into the bug?

 thanks,
 mike




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



[android-developers] Re: drawLine is broken

2008-09-11 Thread Mike Reed

/* oops, the rect example I gave is for (0,0) (2,0) */

On Sep 11, 2008, at 9:27 AM, Mike Reed wrote:


The general confusion is that the android graphics geometry is center-
line based, and consistent at all matrix transformations, while J2ME
linedrawing is more pen based.

As an example, when android draws a line, it basically constructs a
rectangle about the line, by moving parallel to the line by 1/2 the
strokeWidth. If there is no fancy Join (e.g. Square or Round), no
outset is performed on the line's ends. So for the line (0,0) (0,2),
it constructs the rectangle

// assuming the strokeWidth is 1.0
 left = 0
 top = -1/2
 right = 2
 bottom = 1/2

and then tries to fill the rectangle, using the standard of rounding
each coordinate to an int via (int)(coord + 0.5) // for positive coords

That said, in your example, the strokeWidth is 0, which is a special
value meaning hairline. This is pretty close to 1.0, but will draw
slightly differently at times, but much faster. (aside: hairline
stroking always draws 1-pixel wide, regardless of the matrix on the
canvas).

Stroking rectangles in hairline mode does a little extra work to be
nice to try to hit all of the corners, even if the normal hairline
drawLine path would have missed it.

But back to center-line geometry. The upshot really is, if you want to
trivially predict what pixels will be hit for stroking, put your
geometry on 1/2 pixel boundaries. Then when I outset by 1/2 the
strokeWidth, the center-line pixel will always get hit.

mike

On Sep 11, 2008, at 9:12 AM, sahn0 wrote:


Yes, p is Paint object set up as follows:

Paint p=new Paint();
p.setColor(0xFF80);
p.setStyle(Paint.Style.STROKE);

Style.STROKE is needed for drawRect to actually draw rect, issue with
right-bottom pixel shows itself independently of Style.

On 11 сент, 19:48, Mike Reed [EMAIL PROTECTED] wrote:
 Might be a bug. Can you put a more complete code snippet (including
 how the paint (p) was setup) into the bug?

 thanks,
 mike







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



[android-developers] Re: drawLine is broken

2008-09-11 Thread Mike Reed

In some ways, android.graphics renders more like Quartz/PostScript  
than like QuickDraw/AWT

On Sep 11, 2008, at 9:41 AM, sahn0 wrote:


Thanks for the explanation.
Now I need to comprehend it :)

On 11 сент, 20:28, Mike Reed [EMAIL PROTECTED] wrote:
 /* oops, the rect example I gave is for (0,0) (2,0) */

 On Sep 11, 2008, at 9:27 AM, Mike Reed wrote:

 The general confusion is that the android graphics geometry is center-
 line based, and consistent at all matrix transformations, while J2ME
 linedrawing is more pen based.

 As an example, when android draws a line, it basically constructs a
 rectangle about the line, by moving parallel to the line by 1/2 the
 strokeWidth. If there is no fancy Join (e.g. Square or Round), no
 outset is performed on the line's ends. So for the line (0,0) (0,2),
 it constructs the rectangle

 // assuming the strokeWidth is 1.0
  left = 0
  top = -1/2
  right = 2
  bottom = 1/2

 and then tries to fill the rectangle, using the standard of rounding
 each coordinate to an int via (int)(coord + 0.5) // for positive  
 coords

 That said, in your example, the strokeWidth is 0, which is a special
 value meaning hairline. This is pretty close to 1.0, but will draw
 slightly differently at times, but much faster. (aside: hairline
 stroking always draws 1-pixel wide, regardless of the matrix on the
 canvas).

 Stroking rectangles in hairline mode does a little extra work to be
 nice to try to hit all of the corners, even if the normal hairline
 drawLine path would have missed it.

 But back to center-line geometry. The upshot really is, if you want to
 trivially predict what pixels will be hit for stroking, put your
 geometry on 1/2 pixel boundaries. Then when I outset by 1/2 the
 strokeWidth, the center-line pixel will always get hit.

 mike

 On Sep 11, 2008, at 9:12 AM, sahn0 wrote:

 Yes, p is Paint object set up as follows:

 Paint p=new Paint();
 p.setColor(0xFF80);
 p.setStyle(Paint.Style.STROKE);

 Style.STROKE is needed for drawRect to actually draw rect, issue with
 right-bottom pixel shows itself independently of Style.

 On 11 сент, 19:48, Mike Reed [EMAIL PROTECTED] wrote:

 Might be a bug. Can you put a more complete code snippet (including
 how the paint (p) was setup) into the bug?

 thanks,
 mike



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



[android-developers] Re: Removal of javax.microedition.lcdui.Graphics

2008-09-11 Thread JT

I would refrain from using any javax.microedition.* classes.

You can set alignment via android.graphics.Paint.Align, however it
does not have the same top/bottom feature as J2ME.
http://code.google.com/android/reference/android/graphics/Paint.Align.html

On Sep 10, 8:51 pm, Sudha [EMAIL PROTECTED] wrote:
 I was using M5 .Now I switched my application to SDK 0.9.
 I am getting the error on eclipse that
 the import  javax.microedition.lcdui.Graphics cannot be resolved.
 In my program I am using the
 Graphics.TOP|Grpahics.LEFT.

 Can any one help me to find
 whether that option is removed , why and anywhere else it is
 implemented ?
 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Layout like android's Home Screen

2008-09-11 Thread Kavi

Hello,

I am currently using a View Flipper to create views on the fly and
allow the user to move between views by performing a fling action on
the screen. But the way it currently works is that after the fling
action is performed, the changing of the view is triggered which uses
a move in and move out animation.

What i want to have is something like the home screen of android where
the user can see the new view while he is trying to drag/scroll the
screen.
I want a view that the user can just drag to either go to the right or
the left side and the views on either side can be a part of the
current view or can be new views that are inflated at runtime.

Does anybody know how to implement this?

Thoughts?

Thanks

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



[android-developers] Re: Removal of javax.microedition.lcdui.Graphics

2008-09-11 Thread Mike Reed

True, android.graphics does not have the top/bottom feature, but with  
Paint.getFontMetrics(), you can compute all sorts of interesting  
vertical metrics for the font, and apply them to the baseline.

mike

On Sep 11, 2008, at 10:24 AM, JT wrote:


I would refrain from using any javax.microedition.* classes.

You can set alignment via android.graphics.Paint.Align, however it
does not have the same top/bottom feature as J2ME.
http://code.google.com/android/reference/android/graphics/Paint.Align.html

On Sep 10, 8:51 pm, Sudha [EMAIL PROTECTED] wrote:
 I was using M5 .Now I switched my application to SDK 0.9.
 I am getting the error on eclipse that
 the import  javax.microedition.lcdui.Graphics cannot be resolved.
 In my program I am using the
 Graphics.TOP|Grpahics.LEFT.

 Can any one help me to find
 whether that option is removed , why and anywhere else it is
 implemented ?
 Thanks



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



[android-developers] Re: Layout like android's Home Screen

2008-09-11 Thread Peli

I had thought the Android home screen was a single big view, as it is
one big background image that spans across the three slices, and the
icons on top are positioned individually (note that they scroll faster
than the background).

If I were to code it, I would displace the coordinates of all views in
the AbsoluteLayout by the coordinate shifts obtained through
onTouchEvent, and use some Handler for the final fling. I don't know
if there is a more elegant way to do it within the Android framework,
or how it is actually done for the home screen.

Peli

On Sep 11, 4:51 pm, Kavi [EMAIL PROTECTED] wrote:
 Hello,

 I am currently using a View Flipper to create views on the fly and
 allow the user to move between views by performing a fling action on
 the screen. But the way it currently works is that after the fling
 action is performed, the changing of the view is triggered which uses
 a move in and move out animation.

 What i want to have is something like the home screen of android where
 the user can see the new view while he is trying to drag/scroll the
 screen.
 I want a view that the user can just drag to either go to the right or
 the left side and the views on either side can be a part of the
 current view or can be new views that are inflated at runtime.

 Does anybody know how to implement this?

 Thoughts?

 Thanks

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



[android-developers] Re: Layout like android's Home Screen

2008-09-11 Thread Romain Guy

The Home screen is made of two layers:
- The background (or Workspace) that shows the image; this layer
scrolls and draws the wallpaper with a different scroll value.
Workspace behaves more or less like a simplified horizontal layout
- The screens (or CellLayouts) that display the icons; this layer is
made of 3 CellLayout side by side. CellLayout is a custom grid-like
layout.

We definitely did not use an AbsoluteLayout and nor should you. The
fling is implemented using a VelocityTracker, a Scroller and regular
View.scroll methods.

On Thu, Sep 11, 2008 at 8:10 AM, Peli [EMAIL PROTECTED] wrote:

 I had thought the Android home screen was a single big view, as it is
 one big background image that spans across the three slices, and the
 icons on top are positioned individually (note that they scroll faster
 than the background).

 If I were to code it, I would displace the coordinates of all views in
 the AbsoluteLayout by the coordinate shifts obtained through
 onTouchEvent, and use some Handler for the final fling. I don't know
 if there is a more elegant way to do it within the Android framework,
 or how it is actually done for the home screen.

 Peli

 On Sep 11, 4:51 pm, Kavi [EMAIL PROTECTED] wrote:
 Hello,

 I am currently using a View Flipper to create views on the fly and
 allow the user to move between views by performing a fling action on
 the screen. But the way it currently works is that after the fling
 action is performed, the changing of the view is triggered which uses
 a move in and move out animation.

 What i want to have is something like the home screen of android where
 the user can see the new view while he is trying to drag/scroll the
 screen.
 I want a view that the user can just drag to either go to the right or
 the left side and the views on either side can be a part of the
 current view or can be new views that are inflated at runtime.

 Does anybody know how to implement this?

 Thoughts?

 Thanks

 - Kavik
 




-- 
Romain Guy
www.curious-creature.org

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



[android-developers] Re: Question of displaying a ProgressDialog in a joined thread

2008-09-11 Thread Romain Guy

By calling join() on the UI thread, you are blocking the UI thread.
It's as if you were not using a background thread. That's why the
ProgressDialog cannot be displayed.

On Thu, Sep 11, 2008 at 3:06 AM, roland [EMAIL PROTECTED] wrote:

 Hello, i have a question of displaying a ProgressDialog by joining the
 threads. In my application, i will synchronize data with the server,
 and remove the synchronized data from database. The synchronization
 takes long time, so i decide to display a progressdialog during this
 process. Of course i use a new thread to deal the synchronization,
 here is what i use for the first time:

 syncProgressDialog = ProgressDialog.show(Function.getContext(),
 Please wait..., Synchronizing application's data..., true, false);

 new Thread(new Runnable() {
public void run() {
synchronize();
syncProgressDialog.dismiss();
}
 }).start();

 removeData();

 The problem i met with this solution is the main thread didn't launch
 this thread immediately, it called the removeData before the new
 Thread. Apparently the main thread don't wait the new Thread finishes
 before execute the following method. So i changed this solution to :

 syncProgressDialog = ProgressDialog.show(Function.getContext(),
 Please wait..., Synchronizing application's data..., true, false);

 Thread thread = new Thread(new Runnable() {
public void run() {
synchronize();
syncProgressDialog.dismiss();
}
 });
 thread.start();
 try {
thread.join();
 }
 catch (InterruptedException e) {
e.printStackTrace();
 }

 removeData();

 I used the join method to wait the end of synchronize thread before
 removeData, there is another problem comes, the ProgressDialog didn't
 display on the screen. I tried use handler:

 Thread thread = new Thread(new Runnable() {
public void run() {
synchronize();
handler.post(new Runnable() {
public void run() {
removeDialog();
}
});
}
 });

 private void removeDialog() {
syncProgressDialog.dismiss();
 }

 Nothing changed, could anyone show me a sample code to display the
 ProgressDialog in a joined thread or tell me which part i didn't
 implemented correctly.


 




-- 
Romain Guy
www.curious-creature.org

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



[android-developers] Re: Layout like android's Home Screen

2008-09-11 Thread Peli

 The fling is implemented using a VelocityTracker, a Scroller and regular
 View.scroll methods.

Wow.. I totally was not aware of VelocityTracker and Scroller. It
looks very useful, and I guess this could have saved me a lot of
headache.. Is there any (API) demo for how to use them?

Peli

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



[android-developers] Re: sqlite3?

2008-09-11 Thread Ed Burnette

I tried taking the /system/bin/sqlite3 from the M5 version and
installing it into 0.9_beta but it didn't work. I ran the M5-rc15
emulator with -wipe-data, used adb pull to get the program, ran the
0.9_beta emulator with -wipe-data, ran adb remount to make /system
read write, used adb push to upload sqlite3 to /system/bin, used adb
shell chmod 777 /system/bin/sqlite3 to make it executable, and then
tried to run it in an adb shell. Unfortunately it just returned
immediately with no errors or output.

When you say this will be fixed in the next release do you mean (a)
that the Android system image will include a working /system/bin/
sqlite3 that you can run with adb shell (like M5 had), or do you mean
(b) that there will be a Windows (or Linux or Mac) binary installed on
the development computer as part of the SDK?

Also... is there an issue number for tracking this? A quick search
didn't turn up one.

Thanks,
--Ed

On Aug 19, 11:09 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 It seems windows sdk is missing tools/sqlite3 which will be fixed in the
 next release. For the time being if you use Linux, you will find
 tools/sqlite3.

 On Tue, Aug 19, 2008 at 7:31 PM, Brad Larson [EMAIL PROTECTED] wrote:

  I'm using windows, although I have access to a linux box if that is
  needed

  On Aug 19, 5:27 pm, Megha Joshi [EMAIL PROTECTED] wrote:
   Which OS are you using?

   On Tue, Aug 19, 2008 at 3:15 PM, Brad Larson [EMAIL PROTECTED] wrote:

Thank you for the reply Magha.  I can't find anything related to
sqlite in the tools directory.  Could you please provide more
information?

Thanks!
-Brad

On Aug 19, 4:52 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 You cab use sqlite3 from the sdk tools directory directly...

 On Tue, Aug 19, 2008 at 2:26 PM, Brad Larson [EMAIL PROTECTED]
  wrote:

  Has the sqlite3 command line tool been removed from 0.9beta?  I
  haven't been able to find anything in the documentation, but I do
  get
  sqlite3: not found from the shell.  This was a useful debug tool...
  if
  it has been removed, is there anything to replace it?

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



[android-developers] Eclipse Emulator Question

2008-09-11 Thread Rich Tretola
I have the samples setup within Eclipse 3.4 and the emulator will launch on
the samples but it doesn't do anything except show ANDROID_ on screen. I
have tried it on both my Mac and PC and get the same results. Any ideas?

Rich

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



[android-developers] Ways to capture the content of the screen / inject keypresses?

2008-09-11 Thread Malcolm Reynolds

Hello all,

I hope this isn't a stupid question, but I've looked through the API
reference and can't seem to find what I'm looking for..

Basically I am wondering if there is any way to, from a background
application, save the current contents of the screen as a Bitmap, and
if there is a way to inject keypresses into the current running
application (again, with a background application doing the
injecting). I notice there are constants called INJECT_EVENTS and
READ_FRAME_BUFFER in the android.Manifest.permisssion class, which
sound like the facility is available to do what I need, but I can't
see where in the main API you can perform these tasks. Can anyone
point me in the right direction, or are these constants part of the
internals of android, and so not available for regular apps to use?

If anyone is familiar with RIM's Blackberry API, then essentially I am
looking for an equivalent to their method Display.screenshot() and to
the class EventInjector, plus its various inner classes.

Thanks in advance!

Malcolm

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



[android-developers] Re: ListView - If you have a item that can focus you can select the Item

2008-09-11 Thread Pau

Thanks Mark, I'll try it.

On 10 sep, 20:07, Mark Murphy [EMAIL PROTECTED] wrote:
  This is my problem:
  My application has a ListView and every row has a TextView and a
  Checkbox.
  Checkboxes work correctly, but TextViews can't be selected and thus
  onListItemClick method is never called.
  I need the two functions. What can I do?

 Use a context menu instead of onListItemClick() on the TextViews.

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

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



[android-developers] New activity

2008-09-11 Thread EMA

Hi,

I've an application whose flow should be like this:

1) Start Activity to listen to some telephony events
2) On receive of these events, display a menu to
3) get user input on the menu
4) perform some action
5) done go back to 1

I do this by creating a listener of events in Activity A. On receipt
of Events I start a new activity for
showing Menu. But I find that menu doesn't wait for user inputs and
goes off immediately.

I've not implemented any onPause() or onResume().

May I know what should be done?



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



[android-developers] Looking for Android Developer in NYC and SF

2008-09-11 Thread Product Designer

We are a product design studio with offices in New York and San
Francisco looking to hire 2-3 developers ASAP for a project destined
for World Mobile Congress in Barcelona this February. It's a very cool
product.

Please email [EMAIL PROTECTED] for details.

Thanks,

Andrew.

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



[android-developers] Re: How to re-use the photo picker activity in my application

2008-09-11 Thread Nickname

*** HELP ***

I followed Cheryl Sedota's sample code to reuse photo picker activity.
The activity showed up, but... there is no photos to verify it.

Can anyone please teach me WHERE and HOW to MAUNUALLY add photos to
Android repository so that Android photo pick activity can pick??

Thanks! Thanks!!!

On Sep 10, 2:41 pm, Nickname [EMAIL PROTECTED] wrote:
 It seems I have missed this stuff, which is what i desperately need!

 Where can I find the documentation on this photo picker activity?

 Thanks for any information!!

 On Aug 29, 12:49 pm, Cheryl Sedota [EMAIL PROTECTED] wrote:

  Hi, I have some code that attempts to invoke thephotopickeractivity
  for result.  I can successfully launch thephotopickeractivity, but
  my activity does not receive a result at all (onActivityResult() is
  never called).  Can anyone help?  Thanks!!! - Cheryl

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

          Button button = (Button) findViewById(R.id.pick_button);
          button.setOnClickListener(new View.OnClickListener()
          {

              @Override
              public void onClick(View view)
              {
                  Log.i(TAG, Trying to start thephotopicker
  activity);

                  Intent photoPickerIntent = new
  Intent(Intent.ACTION_PICK);
                  // Intent photoPickerIntent = new
                  // Intent(Intent.ACTION_GET_CONTENT);
                  photoPickerIntent.setType(image/*);
                  startActivityForResult(photoPickerIntent, 1);

              }
          });
       }

      @Override
      protected void onActivityResult(int i, int j, Intent intent)
      {
          super.onActivityResult(i, j, intent);

          // TODO: figure out why this method never gets invoked
          Log.i(TAG, Got the result:  + intent.getDataString());
      }

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



[android-developers] Problems applying animation to SurfaceView

2008-09-11 Thread drjunior

When I apply an animation to my SurfaceView, the animation does not
start.
I have to implement Animation methods to put animation working!!!???

Best Regards,
Diogo Júnior
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: getFromLocation not returning street names

2008-09-11 Thread Megha Joshi
2008/9/7 Huebi [EMAIL PROTECTED]


 I am just wondering why the Geocoder does not return street names if I
 do reverse geocoding. Will that be added somewhen? Will it be
 available in the final version used on the phones?


The street names will be added soon to the resultsmostly they be added
by the time devices launched.


 


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



[android-developers] Re: What the heck is a task ?

2008-09-11 Thread Justin

Guillaume,

This is a really excellent question and there's a document written to
cover the application model that talks about tasks that you can read at
http://code.google.com/android/intro/appmodel.html . After looking over
over that, please come back with any specific questions you have.

In terms of launch modes and Intent flags, remember, most of the time, the
default behavior is what you want. Try without setting launch modes or
flags and only then if it doesn't work as you want, start worrying about
these things.

Cheers,
Justin
Android Team @ Google

Original Message Follows:

From: Guillaume Perrot [EMAIL PROTECTED]
Subject: [android-developers] What the heck is a task ?
Date: Wed, 10 Sep 2008 08:17:45 -0700 (PDT)

In several parts of the API is mentioned the term task:
* the singleTask activity launch mode,
* a flag to use with intent,
* other activity manifest flags
* getTaskID in Activity
* ActivityManager.RunningTaskInfo
and so on...

I checked the documentation but I didn't found any clear definition of
what is exactly a task.

I have several issues with relaunching activities with the desired
state and onNewIntent not called and I think it's because I don't
understand what is a task and how to manage this...

Someone can provide a definition a task and how to manage them ?



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



[android-developers] ContentView gets all screwed up after making phone call

2008-09-11 Thread kingkung

In my content view, I have built in the ability to call a number via
the Dialer when the user presses the CALL button.  The call works
fine, but when I back out of the Dialer and go back into my
application, the views and the redrawing mechanisms are completely
screwed up, and the application is unusable.

For instance, when I select one of my ImageButtons, the image usually
magnifies by 25%, but when I do this after entering the dialer app,
the image enlarges but the frame stays the exact same, meaning that I
only see a small section of the enlarged view.  Also, when I press the
RIGHT button, my ListView should display different text (as it does
pre-Dialer), but it fails to do so post-Dialer... it doesn't do
anything at the moment.

Just wondering if there's anything that causes this to occur and
whether or not they may be fixed.  Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ContentView gets all screwed up after making phone call

2008-09-11 Thread kingkung

Eh, never mind, refreshing the screen on onStart() seems to have fixed
it for now, though I thought those lifecycle methods were less for UI
and more for reloading content/state variables...

On Sep 11, 11:30 am, kingkung [EMAIL PROTECTED] wrote:
 In my content view, I have built in the ability to call a number via
 the Dialer when the user presses the CALL button.  The call works
 fine, but when I back out of the Dialer and go back into my
 application, the views and the redrawing mechanisms are completely
 screwed up, and the application is unusable.

 For instance, when I select one of my ImageButtons, the image usually
 magnifies by 25%, but when I do this after entering the dialer app,
 the image enlarges but the frame stays the exact same, meaning that I
 only see a small section of the enlarged view.  Also, when I press the
 RIGHT button, my ListView should display different text (as it does
 pre-Dialer), but it fails to do so post-Dialer... it doesn't do
 anything at the moment.

 Just wondering if there's anything that causes this to occur and
 whether or not they may be fixed.  Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mouse Gesture for Navigation?

2008-09-11 Thread Kavi

You can use the android.view.GestureDetector to detect gestures on a
view.

First, you can implement the GestureListener interface.
Second, you can create an instance of gesturedetector for your
activity, and in your activity's onTouch method, call the gesture
detector's instance's onTouchEvent method.
and That's it.

Then, you can detect all sorts of events like fling, scroll, touchDown
etc.

public class YourActivity implements OnTouchListener,
OnGestureListener
{

onCreate()
{
GestureDetector gd = new GestureDetector(this);

 // Set the ontouchListener for your View.
}

public boolean onTouch(View v, MotionEvent event)
{
return gd.onTouchEvent(event);
}

// You can write your code to do whatever whenever your view sees
anyone of the below events triggered on your view.

@Override
public boolean onDown(MotionEvent e)
{
// TODO Auto-generated method stub
return true;
}

@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float
velocityX,
float velocityY)
{

}

@Override
public void onLongPress(MotionEvent e)
{
// TODO Auto-generated method stub
}

@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float
distanceX,
float distanceY)
{
// TODO Auto-generated method stub
// previous.setText(Scroll);
return false;
}

@Override
public void onShowPress(MotionEvent e)
{
// TODO Auto-generated method stub
}

@Override
public boolean onSingleTapUp(MotionEvent e)
{
// TODO Auto-generated method stub
return false;
}


I hope it helps.

- Kavik

On Sep 11, 12:53 pm, Mark Hansen [EMAIL PROTECTED] wrote:
 I was wondering if this is easily implementable with the current
 SDK... basically I'd like to use a hold and drag left or right for
 navigation.

 So if the user wanted to change say a page they would hold their
 finger down and then push left or right.

 I know there's a Firefox extension that calls this mouse gestures, but
 didn't know if anything was built in that could handle this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Layout like android's Home Screen

2008-09-11 Thread Kavi

 Wow.. I totally was not aware of VelocityTracker and Scroller. It
 looks very useful, and I guess this could have saved me a lot of
 headache.. Is there any (API) demo for how to use them?

You might want to have a look at the android.view.GestureDetector for
your Views.
You can detect all sorts of gestures on your views using this.


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



[android-developers] Re: Code working in standalone java; doesnot work in android (android-sdk-windows-0.9_beta)

2008-09-11 Thread haig

Hi Stunti,

I still am receiving errors, but it is slightly different:  Host is
unresolved: www.google.com:443
Any thoughts?


On Sep 9, 7:34 am, stunti [EMAIL PROTECTED] wrote:
 You need to modify the code of gdata.
 The certificates used by HttpURLConnection are not available to
 validate the hostname during a SSL connexion.
 A small workaround below.
 around line 332 in com.google.gdata.client.http.HttpGDataRequest

 You might also want to disable GZIP compression as it seems to messed
 up the content for the XML parser.
 I don't know if it will be fized within the next release.

     HttpsURLConnection uc = (HttpsURLConnection)
 requestUrl.openConnection();
     uc.setHostnameVerifier( new X509HostnameVerifier(){
                 @Override
                 public boolean verify(String host, SSLSession session) {
                         // TODO Auto-generated method stub
                         return true;
                 }

                 @Override
                 public void verify(String host, SSLSocket ssl) throws 
 IOException {
                         // TODO Auto-generated method stub
                 }

                 @Override
                 public void verify(String host, X509Certificate cert)
                                 throws SSLException {
                         // TODO Auto-generated method stub
                 }

                 @Override
                 public void verify(String host, String[] cns, String[] 
 subjectAlts)
                                 throws SSLException {
                         // TODO Auto-generated method stub
                 }
     });

 On Sep 8, 5:24 am, haig [EMAIL PROTECTED] wrote:



  I am having similar problems, hope someone can help.

  In my example, myService is a GoogleService

  GoogleService myService = new GoogleService(blogger, exampleCo-
  exampleApp-1);

  Standalone client works fine, but not in my android app.

  Error from logcat:

   com.google.gdata.util.AuthenticationException: Error connecting with
  login URI
       at
  com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(Unknown
  Source)
       at
  com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(Unknown
  Source)
       at
  com.google.gdata.client.GoogleService.setUserCredentials(Unknown
  Source)
       at
  com.google.gdata.client.GoogleService.setUserCredentials(Unknown
  Source)
       at com.travelrecorder.network.Blogger.publish_post(Blogger.java:
  32)
       at com.travelrecorder.network.AlarmService_Service
  $1.run(AlarmService_Service.java:71)
       at java.lang.Thread.run(Thread.java:914)
   Caused by: java.io.IOException: Hostname www.google.com was not
  verified
       at
  org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.getSecureSocket(HttpConnection.java:
  169)
       at
  org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection
  $HttpsEngine.connect(HttpsURLConnection.java:398)
       at
  org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection...
  1129)
       at
  org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection.getOutputStream(HttpsURLConnect...
  262)
       at
  com.google.gdata.client.GoogleAuthTokenFactory.makePostRequest(Unknown
  Source)
       ... 7 more

  On Aug 25, 1:40 pm, Justin (Google Employee) [EMAIL PROTECTED]
  wrote:

   You didn't answer what type myService is here.

   Cheers,
   Justin
   Android Team @ Google- Hide quoted text -

 - Show quoted text -

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



[android-developers] Re: sqlite3?

2008-09-11 Thread Megha Joshi
2008/9/11 Ed Burnette [EMAIL PROTECTED]


 I tried taking the /system/bin/sqlite3 from the M5 version and
 installing it into 0.9_beta but it didn't work. I ran the M5-rc15
 emulator with -wipe-data, used adb pull to get the program, ran the
 0.9_beta emulator with -wipe-data, ran adb remount to make /system
 read write, used adb push to upload sqlite3 to /system/bin, used adb
 shell chmod 777 /system/bin/sqlite3 to make it executable, and then
 tried to run it in an adb shell. Unfortunately it just returned
 immediately with no errors or output.


I don't think you can upload sqlite3 to adb shell and make it work.
But you should be able to add sqlite3 in tools dir to 0.9 windows sdk from
the previous m5 sdk.
Or you could download sqlite3 windows binary from the web.


 When you say this will be fixed in the next release do you mean (a)
 that the Android system image will include a working /system/bin/
 sqlite3 that you can run with adb shell (like M5 had), or do you mean
 (b) that there will be a Windows (or Linux or Mac) binary installed on
 the development computer as part of the SDK?



Yes both.  Sorry for not being specific enough.


 Also... is there an issue number for tracking this? A quick search
 didn't turn up one.


There is an internal bug for tracking this... it will be fixed in the next
release.


 Thanks,
 --Ed

 On Aug 19, 11:09 pm, Megha Joshi [EMAIL PROTECTED] wrote:
  It seems windows sdk is missing tools/sqlite3 which will be fixed in the
  next release. For the time being if you use Linux, you will find
  tools/sqlite3.
 
  On Tue, Aug 19, 2008 at 7:31 PM, Brad Larson [EMAIL PROTECTED] wrote:
 
   I'm using windows, although I have access to a linux box if that is
   needed
 
   On Aug 19, 5:27 pm, Megha Joshi [EMAIL PROTECTED] wrote:
Which OS are you using?
 
On Tue, Aug 19, 2008 at 3:15 PM, Brad Larson [EMAIL PROTECTED]
 wrote:
 
 Thank you for the reply Magha.  I can't find anything related to
 sqlite in the tools directory.  Could you please provide more
 information?
 
 Thanks!
 -Brad
 
 On Aug 19, 4:52 pm, Megha Joshi [EMAIL PROTECTED] wrote:
  You cab use sqlite3 from the sdk tools directory directly...
 
  On Tue, Aug 19, 2008 at 2:26 PM, Brad Larson [EMAIL PROTECTED]
 
   wrote:
 
   Has the sqlite3 command line tool been removed from 0.9beta?  I
   haven't been able to find anything in the documentation, but I
 do
   get
   sqlite3: not found from the shell.  This was a useful debug
 tool...
   if
   it has been removed, is there anything to replace it?
 
   Thanks,
   Brad
 


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



[android-developers] Re: Eclipse Emulator Question

2008-09-11 Thread Megha Joshi
Can you post your logcat output?

2008/9/11 Rich Tretola [EMAIL PROTECTED]

 I have the samples setup within Eclipse 3.4 and the emulator will launch on
 the samples but it doesn't do anything except show ANDROID_ on screen. I
 have tried it on both my Mac and PC and get the same results. Any ideas?

 Rich

 


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



[android-developers] Re: Problems applying animation to SurfaceView

2008-09-11 Thread hackbod

Using animations with SurfaceView is not recommended.  I'm not sure
you seeing it not work at all, but even if it did something the result
would probably not be all that great since SurfaceView is essentially
an overlay so you would effectively be trying to animate a separate
surface/overlay within your view hierarchy.

On Sep 11, 10:44 am, drjunior [EMAIL PROTECTED] wrote:
 When I apply an animation to my SurfaceView, the animation does not
 start.
 I have to implement Animation methods to put animation working!!!???

 Best Regards,
 Diogo Júnior
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Ways to capture the content of the screen / inject keypresses?

2008-09-11 Thread hackbod

For security reasons, applications are not allowed to get screen shots
of the display or inject key events in to other applications.

On Sep 11, 3:48 am, Malcolm Reynolds [EMAIL PROTECTED]
wrote:
 Hello all,

 I hope this isn't a stupid question, but I've looked through the API
 reference and can't seem to find what I'm looking for..

 Basically I am wondering if there is any way to, from a background
 application, save the current contents of the screen as a Bitmap, and
 if there is a way to inject keypresses into the current running
 application (again, with a background application doing the
 injecting). I notice there are constants called INJECT_EVENTS and
 READ_FRAME_BUFFER in the android.Manifest.permisssion class, which
 sound like the facility is available to do what I need, but I can't
 see where in the main API you can perform these tasks. Can anyone
 point me in the right direction, or are these constants part of the
 internals of android, and so not available for regular apps to use?

 If anyone is familiar with RIM's Blackberry API, then essentially I am
 looking for an equivalent to their method Display.screenshot() and to
 the class EventInjector, plus its various inner classes.

 Thanks in advance!

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



[android-developers] Re: Code working in standalone java; doesnot work in android (android-sdk-windows-0.9_beta)

2008-09-11 Thread haig

The getRequestConnection method that was modified
http://pastebin.com/f5efc9f0d

Error:
http://pastebin.com/f6f115f2d

On Sep 11, 11:40 am, haig [EMAIL PROTECTED] wrote:
 Hi Stunti,

 I still am receiving errors, but it is slightly different:  Host is
 unresolved:www.google.com:443
 Any thoughts?

 On Sep 9, 7:34 am, stunti [EMAIL PROTECTED] wrote:

  You need to modify the code of gdata.
  The certificates used by HttpURLConnection are not available to
  validate the hostname during a SSL connexion.
  A small workaround below.
  around line 332 in com.google.gdata.client.http.HttpGDataRequest

  You might also want to disable GZIP compression as it seems to messed
  up the content for the XML parser.
  I don't know if it will be fized within the next release.

  HttpsURLConnection uc = (HttpsURLConnection)
  requestUrl.openConnection();
  uc.setHostnameVerifier( new X509HostnameVerifier(){
  @Override
  public boolean verify(String host, SSLSession session) {
  // TODO Auto-generated method stub
  return true;
  }

  @Override
  public void verify(String host, SSLSocket ssl) throws 
  IOException {
  // TODO Auto-generated method stub
  }

  @Override
  public void verify(String host, X509Certificate cert)
  throws SSLException {
  // TODO Auto-generated method stub
  }

  @Override
  public void verify(String host, String[] cns, String[] 
  subjectAlts)
  throws SSLException {
  // TODO Auto-generated method stub
  }
  });

  On Sep 8, 5:24 am, haig [EMAIL PROTECTED] wrote:

   I am having similar problems, hope someone can help.

   In my example, myService is a GoogleService

   GoogleService myService = new GoogleService(blogger, exampleCo-
   exampleApp-1);

   Standalone client works fine, but not in my android app.

   Error from logcat:

com.google.gdata.util.AuthenticationException: Error connecting with
   login URI
at
   com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(Unknown
   Source)
at
   com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(Unknown
   Source)
at
   com.google.gdata.client.GoogleService.setUserCredentials(Unknown
   Source)
at
   com.google.gdata.client.GoogleService.setUserCredentials(Unknown
   Source)
at com.travelrecorder.network.Blogger.publish_post(Blogger.java:
   32)
at com.travelrecorder.network.AlarmService_Service
   $1.run(AlarmService_Service.java:71)
at java.lang.Thread.run(Thread.java:914)
Caused by: java.io.IOException: Hostname www.google.com was not
   verified
at
   org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.getSecureSocket(HttpConnection.java:
   169)
at
   org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection
   $HttpsEngine.connect(HttpsURLConnection.java:398)
at
   org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection...
   1129)
at
   org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection.getOutputStream(HttpsURLConnect...
   262)
at
   com.google.gdata.client.GoogleAuthTokenFactory.makePostRequest(Unknown
   Source)
... 7 more

   On Aug 25, 1:40 pm, Justin (Google Employee) [EMAIL PROTECTED]
   wrote:

You didn't answer what type myService is here.

Cheers,
Justin
Android Team @ Google- Hide quoted text -

  - Show quoted text -

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



[android-developers] Developing Wi-Fi applications in the emulator

2008-09-11 Thread Bradley Kite

Hi all,

I would like to develop an application that makes use of the wifi API
(android.net.wifi.*).

Is there any way that I can test my application within the emulator?

At the moment I am getting this error:

E/WifiService(   46): Failed to load Wi-Fi driver.

Which I kind of expected, as the emulator doesn't actually contain any
wifi hardware.

Are there any hacks/tweaks I can make to QEMU that can make it present
an emulated piece of wifi hardware to the android device driver?

Is any body else also trying to use the wifi API's and has solved this problem?

Many thanks in advance
--
Brad

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



[android-developers] Re: Ways to capture the content of the screen / inject keypresses?

2008-09-11 Thread PowerGUI

Hello,
  I am developing such program,called android-screenshots,
yes,for security reasons,that is just for android developers only,I
think so too.
 the android-screenshots programs will be avaiable after waiting
for a few more days.

Best Regards
PowerGUI
-
Android DotPhone Team
http://www.dotphone.org/english/
http://groups.google.com/group/android-dotphone/

On 9月11日, 下午3时03分, hackbod [EMAIL PROTECTED] wrote:
 For security reasons, applications are not allowed to get screen shots
 of the display or inject key events in to other applications.

 On Sep 11, 3:48 am, Malcolm Reynolds [EMAIL PROTECTED]
 wrote:

  Hello all,

  I hope this isn't a stupid question, but I've looked through the API
  reference and can't seem to find what I'm looking for..

  Basically I am wondering if there is any way to, from a background
  application, save the current contents of the screen as a Bitmap, and
  if there is a way to inject keypresses into the current running
  application (again, with a background application doing the
  injecting). I notice there are constants called INJECT_EVENTS and
  READ_FRAME_BUFFER in the android.Manifest.permisssion class, which
  sound like the facility is available to do what I need, but I can't
  see where in the main API you can perform these tasks. Can anyone
  point me in the right direction, or are these constants part of the
  internals of android, and so not available for regular apps to use?

  If anyone is familiar with RIM's Blackberry API, then essentially I am
  looking for an equivalent to their method Display.screenshot() and to
  the class EventInjector, plus its various inner classes.

  Thanks in advance!

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



[android-developers] Re: MediaRecord Audio - working example? / raw data stream onPictureTaken()? / Bug in Pictures application?

2008-09-11 Thread Megha Joshi
008/9/9 code_android_festival_way [EMAIL PROTECTED]


 Thank you for you answer. I've added the additional parameter to the
 values and this works now. But the problem with the restart and the
 lose of meta information is still there. At the moment I am recording
 something and the meta information is added to the database which can
 be seen in the music app. But after restarting the emulator the meta
 information is gone and I dont really know why.


Could you try adding the file to a playlist before restarting the emulator ?



 Regards!

 On 8 Sep., 23:09, Megha Joshi [EMAIL PROTECTED] wrote:
  You need to add this to the contentvalues:
 
  values.put(MediaStore.Audio.Media.IS_MUSIC, 1);
 
  if you want the newly added files to appear in the Album, Artists
 sections
  of the Music app.
 
  2008/9/8 code_android_festival_way [EMAIL PROTECTED]
 
 
 
   I got a problem with the audio recording. I am able to record audio
   and play the recorded file with the music app.
 
   This looks like this:
 
  http://img.skitch.com/20080908-m5yaiyqh7jugcub5p5pmmna2ee.jpg
 
   You can see that the meta information is available. But the only point
   where the audio file shows up is in the recently added music playlist.
   In the artist or album section I cant find anything.
 
   Now I'm restarting the emulator and get the following result in the
   music app:
 
  http://img.skitch.com/20080908-825exr6mcqt82dm2idkwpwa7xh.jpg
 
   You can see that the recorded file is showing up now in the Artist
   column but without the meta information. I am able to play the file
   which looks like this:
 
  http://img.skitch.com/20080908-jsgf8yghnkdg8241rsqyweje78.jpg
 
   But even there the meta information is lost.
 
   Here is my code for adding the values:
 
  http://paste.pocoo.org/show/fMHzaLRCwEG49qAkpvYh/
 
   Here is my code for recording:
 
  http://paste.pocoo.org/show/P6UWFE2rtj0qIB1dh9vQ/
 
   So I dont really know what I'm doing wrong here.
 
   I'm really looking forward getting some kind of help from you.
 
   Regards!
 
   09-08 11:09:29.035: ERROR/MediaPlayerService(25): Couldn't open fd for
   content://media/external/audio/media/33
 
   On 2 Sep., 22:35, code_android_festival_way
   [EMAIL PROTECTED] wrote:
Thank you very much for offering the sample code.
 
On 2 Sep., 22:16, Megha Joshi [EMAIL PROTECTED] wrote:
 
  Please refer to theaudioRecording sample code at the link below:
  http://groups.google.com/group/android-developers/files
 
 2008/8/31 code_android_festival_way [EMAIL PROTECTED]
 
  Did you get theAudiorecording managed right now?
 
  I'm getting the same error again after adding all the fields. It
   would
  be pretty nice to have a working example. Because from the docs I
  can't decide which fields are required and which are just
 optional.
 
  Regards!
 
  On 28 Aug., 07:16, Reto Meier [EMAIL PROTECTED] wrote:
   Hi Justin,
 I've tried explicitly including the display name (and artist
 and
   album) into the new ContentValue but still end up with exactly
 the
   same error on the ContentResolver.insert call.
 
   On Aug 27, 10:56 pm, Justin (Google Employee) 
 [EMAIL PROTECTED]
   wrote:
 
 Error:
 
 08-24 19:27:18.675: ERROR/Database(178): Error inserting
  title=Content
 Creation No.5 date_added=1219598838 _display_name=
 album_id=2
 title_key=  -  E  C  O  1  C  O -
 K  1  )  O  9  E  C C  E  „   artist_id=3 using INSERT
   INTO
 audio_meta(title, date_added, _display_name, album_id,
   title_key,
 artist_id) VALUES(?, ?, ?, ?, ?, ?);
 
From the error it jumps out at me that you're not setting
MediaStore.Audio.Media.DISPLAY_NAME, which seems like its
   required.
Also, are you setting the ALBUM_ID and ARTIST_ID somehow or
 are
   they
encoded in the URI you're using?
 
Cheers,
Justin
Android Team @ Google
 
On Aug 24, 3:20 pm, code_android_festival_way
 
[EMAIL PROTECTED] wrote:
 I've got two questions.
 
 1)
 Is there a working example for recordingaudiowith the
  MediaRecorder?
 At the moment I'm using the following setup but it doesnt
 work:
 
http://paste.pocoo.org/show/83242/
 
 Error:
 
 08-24 19:27:18.675: ERROR/Database(178): Error inserting
  title=Content
 Creation No.5 date_added=1219598838 _display_name=
 album_id=2
 title_key=  -  E  C  O  1  C  O -
 K  1  )  O  9  E  C C  E  „   artist_id=3 using INSERT
   INTO
 audio_meta(title, date_added, _display_name, album_id,
   title_key,
 artist_id) VALUES(?, ?, ?, ?, ?, ?);
 
 I've tried the example provided in the docs (Media API) but
   that
 doesn't work at all. It would be nice if someone could
 provide
   a
 working example.
 
 2)
 Is it normal that the raw data stream 

[android-developers] Quick database row editor in Android 0.9 SDK

2008-09-11 Thread Jeffrey Sharkey

For several Android projects I've needed a quick way of editing
database rows without building an entire GUI. In the 0.9 SDK, we saw
the introduction of the Preferences framework for storing simple
application data, along with the PreferenceActivity family of classes
for rapidly creating editable GUIs with almost zero effort.  Wouldn't
it be awesome if we could edit database rows just as easily?

http://www.jsharkey.org/blog/2008/09/11/quick-database-row-editor-in-android-09-sdk/

This is a hack at best, using the Preferences framework to edit
database rows, but it works pretty well and offers rapid GUI
development.  I think the Preferences framework itself might use
databases for its normal storage, so Google might generalize this
family of classes in future SDKs.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] WebView display nothing with TabHost

2008-09-11 Thread elephantbug

Hi,

The WebView shows nothing the very first time, however, if you switch
to other TAB and return back, everything is displayed.

Here is my XML file:
++
?xml version=1.0 encoding=utf-8?

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical
android:gravity=center

TabHost
android:id=@android:id/tabhost
android:layout_width=fill_parent
android:layout_height=wrap_content

TabWidget
android:id=@android:id/tabs
android:layout_width=wrap_content
android:layout_height=wrap_content/

FrameLayout
android:id=@android:id/tabcontent
android:layout_width=fill_parent
android:layout_height=450px
android:paddingTop=60px

LinearLayout
android:id=@+id/legal_layout
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=400px

ScrollView
android:id=@+id/scroll
android:layout_width=fill_parent
android:layout_height=350px
android:background=@drawable/silver

WebView
android:id=@+id/legal_view
android:layout_width=fill_parent
android:layout_height=350px
android:minHeight=350dp
android:textColor=@drawable/dark
android:padding = 3dip
android:paddingLeft = 3dip
android:paddingRight = 3dip
android:paddingTop = 3dip
android:paddingBottom = 3dip
android:text=test/
/ScrollView

LinearLayout
android:orientation=horizontal
android:layout_width=fill_parent
android:layout_height=wrap_content
android:paddingTop = 3dip
android:gravity=center

Button
android:id = @+id/button_accept
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/button_accept_text/

Button
android:id = @+id/button_cancel
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/button_cancel_text/

/LinearLayout

/LinearLayout
/FrameLayout
/TabHost

/LinearLayout



here is part of my code for onCreate:

//load gloabl asset
loadAllLegalText();

//init the view
setContentView(R.layout.legal);

tabHost = (TabHost) findViewById(android.R.id.tabhost);
tabHost.setup();

legalText = (WebView)findViewById(R.id.legal_view);
legalText.getSettings().setJavaScriptEnabled(true);
legalText.loadData(TOC, mimeType, encoding);

Resources rs = getResources();
tabHost.addTab(tabHost.newTabSpec(TAG_LEGAL_TOC)

.setIndicator(rs.getText(R.string.legal_tab_indicator_toc))
.setContent(R.id.legal_layout));

tabHost.addTab(tabHost.newTabSpec(TAG_LEGAL_NOTICE)

.setIndicator(rs.getText(R.string.legal_tab_indicator_legal))
.setContent(R.id.legal_layout));

tabHost.addTab(tabHost.newTabSpec(TAG_LEGAL_PRIVACY)

.setIndicator(rs.getText(R.string.legal_tab_indicator_privacy))
.setContent(R.id.legal_layout));

..
//set focus
tabHost.setOnTabChangedListener(this);
tabHost.setCurrentTabByTag(TAG_LEGAL_TOC);


+++

There is one thread about WebView display nothing and I tried their
suggestion, none works...

Anyone has any clue? or it is Android's bug.

http://code.google.com/p/android/issues/detail?id=678
http://www.mail-archive.com/android-developers@googlegroups.com/msg02420.html

--elephantbug

--~--~-~--~~~---~--~~
You received 

[android-developers] Re: Eclipse Emulator Question

2008-09-11 Thread Rich Tretola
Megha,

All is fine now. I just didn't realize that the emulator took so long to
boot up.

Rich

On Thu, Sep 11, 2008 at 4:38 PM, Megha Joshi [EMAIL PROTECTED] wrote:

 Can you post your logcat output?

 2008/9/11 Rich Tretola [EMAIL PROTECTED]

 I have the samples setup within Eclipse 3.4 and the emulator will launch
 on the samples but it doesn't do anything except show ANDROID_ on screen. I
 have tried it on both my Mac and PC and get the same results. Any ideas?

 Rich




 


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



[android-developers] Re: WebView display nothing with TabHost

2008-09-11 Thread Mark Murphy

elephantbug wrote:
 The WebView shows nothing the very first time, however, if you switch
 to other TAB and return back, everything is displayed.

Don't put WebView in a ScrollView. It does its own scrolling.

I don't know if that is your problem, but it is worth a try.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Warescription: All titles, revisions,  ebook formats, just $35/year

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



[android-developers] apps

2008-09-11 Thread beflok

I wanted to make an application to run a poker site but im not sure
even where to start. Is there maybe a template you would know that
could run just an exe file through adroid?

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



[android-developers] SoundRecordingAPISample to save audio in Internal Storage

2008-09-11 Thread haig

I have looked at the SoundRecording API example, and it can save audio
to an sdcard.

I would like to save the audio in internal storage, like /data/data/
package/files/.

Is there a reason why this might not be possible? Any tips will help

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



[android-developers] Re: SoundRecordingAPISample to save audio in Internal Storage

2008-09-11 Thread Megha Joshi
The recommended practice is to only store : ringtones, alarm and
notification sound audio files in internal storage. Rest of the media files
should be stored on sdcard.

2008/9/11 haig [EMAIL PROTECTED]


 I have looked at the SoundRecording API example, and it can save audio
 to an sdcard.

 I would like to save the audio in internal storage, like /data/data/
 package/files/.

 Is there a reason why this might not be possible? Any tips will help

 


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



[android-developers] Re: Mouse Gesture for Navigation?

2008-09-11 Thread Mark Hansen

Can this be implemented on a ListView?  I've got a listview that takes
up the whole screen, so I'd like to be able to detect this on the
ListView itself.

Thanks for the insight though, looks straight forward on a regular
view.

On Sep 11, 3:25 pm, Kavi [EMAIL PROTECTED] wrote:
 You can use the android.view.GestureDetector to detect gestures on a
 view.

 First, you can implement the GestureListener interface.
 Second, you can create an instance of gesturedetector for your
 activity, and in your activity's onTouch method, call the gesture
 detector's instance's onTouchEvent method.
 and That's it.

 Then, you can detect all sorts of events like fling, scroll, touchDown
 etc.

 public class YourActivity implements OnTouchListener,
 OnGestureListener
 {
     
     onCreate()
     {
         GestureDetector gd = new GestureDetector(this);

          // Set the ontouchListener for your View.
     }

     public boolean onTouch(View v, MotionEvent event)
     {
         return gd.onTouchEvent(event);
     }

 // You can write your code to do whatever whenever your view sees
 anyone of the below events triggered on your view.

     @Override
     public boolean onDown(MotionEvent e)
     {
         // TODO Auto-generated method stub
         return true;
     }

     @Override
     public boolean onFling(MotionEvent e1, MotionEvent e2, float
 velocityX,
             float velocityY)
     {

     }

     @Override
     public void onLongPress(MotionEvent e)
     {
         // TODO Auto-generated method stub
     }

     @Override
     public boolean onScroll(MotionEvent e1, MotionEvent e2, float
 distanceX,
             float distanceY)
     {
         // TODO Auto-generated method stub
         // previous.setText(Scroll);
         return false;
     }

     @Override
     public void onShowPress(MotionEvent e)
     {
         // TODO Auto-generated method stub
     }

     @Override
     public boolean onSingleTapUp(MotionEvent e)
     {
         // TODO Auto-generated method stub
         return false;
     }

 I hope it helps.

 - Kavik

 On Sep 11, 12:53 pm, Mark Hansen [EMAIL PROTECTED] wrote:

  I was wondering if this is easily implementable with the current
  SDK... basically I'd like to use a hold and drag left or right for
  navigation.

  So if the user wanted to change say a page they would hold their
  finger down and then push left or right.

  I know there's a Firefox extension that calls this mouse gestures, but
  didn't know if anything was built in that could handle this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: apps

2008-09-11 Thread Megha Joshi
2008/9/11 beflok [EMAIL PROTECTED]


 I wanted to make an application to run a poker site but im not sure
 even where to start. Is there maybe a template you would know that
 could run just an exe file through adroid?


Can you explain a bit more, its not clear what you are trying to do. Do you
have a website that you want to view on android?
Or do you have an exe? You can't run a non-android exe ..you will have to
port your code to android.



 


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



[android-developers] Re: apps

2008-09-11 Thread beflok


 Can you explain a bit more, its not clear what you are trying to do. Do you
 have a website that you want to view on android?
 Or do you have an exe? You can't run a non-android exe ..you will have to
 port your code to android.

well it would be just a regular exe. a regular windows xp exe. not
sure if thats even possible but im new to this just started using
eclipse too.

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



[android-developers] Re: apps

2008-09-11 Thread Megha Joshi
2008/9/11 beflok [EMAIL PROTECTED]



  Can you explain a bit more, its not clear what you are trying to do. Do
 you
  have a website that you want to view on android?
  Or do you have an exe? You can't run a non-android exe ..you will have to
  port your code to android.

 well it would be just a regular exe. a regular windows xp exe. not
 sure if thats even possible but im new to this just started using
 eclipse too.


You cannot run windows exe on android.


 


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



[android-developers] Re: WebView display nothing with TabHost

2008-09-11 Thread elephantbug

Mark,

I tried that. The problem still persists...

I even tried to some simple Html in onCreate method... nothing
displayed at all..

On Sep 11, 4:18 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 elephantbug wrote:
  The WebView shows nothing the very first time, however, if you switch
  to other TAB and return back, everything is displayed.

 Don't put WebView in a ScrollView. It does its own scrolling.

 I don't know if that is your problem, but it is worth a try.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Warescription: All titles, revisions,  ebook formats, just $35/year

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



[android-developers] Re: WebView display nothing with TabHost

2008-09-11 Thread dai

elephantbug, what kind of web page are you trying to display? Perhaps
http://www.google.com?

If you do try to show web pages using javascript like...above page,
you have to set-on javascript.

/** enabling js manually */
webView.getSettings().setJavaScriptEnabled(true);

hope this helps


On 9月12日, 午前10:50, elephantbug [EMAIL PROTECTED] wrote:
 Mark,

 I tried that. The problem still persists...

 I even tried to some simple Html in onCreate method... nothing
 displayed at all..

 On Sep 11, 4:18 pm, Mark Murphy [EMAIL PROTECTED] wrote:

  elephantbug wrote:
   The WebView shows nothing the very first time, however, if you switch
   to other TAB and return back, everything is displayed.

  Don't put WebView in a ScrollView. It does its own scrolling.

  I don't know if that is your problem, but it is worth a try.

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  Warescription: All titles, revisions,  ebook formats, just $35/year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Does getLocationFromName work in 0.9?

2008-09-11 Thread plusminus

Btw, the Geocoder works really awesome!

Grats to the Android Dev Team!


On 8 Sep., 23:42, plusminus [EMAIL PROTECTED] wrote:
 Devices are getting closer and closer :(

 On 6 Sep., 16:49, Megha Joshi [EMAIL PROTECTED] wrote:

  You are right,getFromLocationName() with bounding box returns a empty list
  ...it is a bug...and will be fixed in the next release.

  2008/9/6 [EMAIL PROTECTED] [EMAIL PROTECTED]

   Sorry to bump, but does this work for anyone?

   On Sep 3, 10:59 am, [EMAIL PROTECTED]
   [EMAIL PROTECTED] wrote:
Does anyone know if getLocationFromName (with a bounding box) works in
0.9? I can use the simpler version just fine:

public ListAddressgetFromLocationName(String locationName, int
maxResults)

When I use the version that accepts a bounding box, I always get a
null result:
public ListAddressgetFromLocationName(String locationName, int
maxResults, double lowerLeftLatitude, double lowerLeftLongitude,
double upperRightLatitude, double upperRightLongitude)

Has anyone successfully used it?


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