[android-developers] minSdkVersion and real devices

2009-06-21 Thread BlackLight

Hello.

I have a game that uses simple gui. I can lunch it on any emulator and
on my device. I'm setting minSdkVersion in xml to 1. If I will
publish my paid app on market, will devices with ver1.5 be able to
download and lunch my app? Emulators work fine, game doesn't use any
system features.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to listen for 'Enter Key is press' Event

2009-06-21 Thread n179911

Hi,

I have a view and setOnClickListener to be my code.
My code get invoked when I move my mouse to the view and click.
But how what do i need to register so that it will invoke my code when
I navigate the focus (using up/down keys) and it has orange foreground
and press ENTER key?

Thank you.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Sad day with SQLiteDatabase.rawQuery

2009-06-21 Thread Hamy

Could someone please help me spot the bug here? Mainly, I can never
seem to find a value once it has been stored in the database (I am
100% positive that the value is there). I can store it the first time,
but the cursor in my findVenue() method (see below) never has any
data. :-(

If I do not try to use replaced ? marks, and instead write a raw
string that is then used as my query, it works perfectly. It does not
work with prepared statements. I would really like to use the ? marks
to help avoid SQL security issues (and I am frustrated that they do
not work). Also, I would like to be able to see the text of my SQL
query somewhere before I execute it, if that is possible.

Thanks,
Ham

PS - I am tired, so if I am leaving out some required info, let me
know

package org.blah.database;

import java.util.ArrayList;
import java.util.Iterator;

import org.blah.HTMLoader;
import org.blah.Venue;
import org.blah.database.Columns;
import org.blah.database.OpenHelper;
import org.blah.database.Tables;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteConstraintException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;
import android.util.Log;

public class InsertUniqueVenue {
private static final String tag = HTMLoader.tag;
private static final String pre = InsertUniqueVenue: ;
private static SQLiteDatabase database_ = null;

public InsertUniqueVenue(Context c) {
if (database_ == null) {
OpenHelper oh = OpenHelper.getOpenHelper(c);
database_ = oh.getWritableDatabase();
}
}

public long insertOrFindVenue(Venue v) {
ContentValues values = new ContentValues();
values.put(Columns.V_NAME, v.getName());
values.put(Columns.V_STREET, v.getStreet());
values.put(Columns.V_CITY, v.getCity());
values.put(Columns.V_STATE, v.getState());
values.put(Columns.V_ZIP, v.getZip());

long rowid;
try {
rowid = database_.insertOrThrow(Tables.VENUES, null, 
values);
Log.v(tag, pre + Venue inserted - id  + rowid);
} catch (SQLiteConstraintException e) {
Log.w(tag, pre + Venue insert failed, already exists);
Log.w(tag, pre + Venue:);
Log.w(tag, pre + v.toString());
Log.w(tag, pre + Attempting to find);
rowid = findVenue(v);
}

if (rowid == -1) {
Log.e(tag, pre + Venue not inserted or found.);
Log.e(tag, pre + Something went badly);
}

return rowid;
}

/**
 * Checks if a venue exists. Does not use the Location, or the rowId,
as
 * this should never be called with a venue that we already know
exists.
 * This is mainly used for loading the database with new venues
 *
 * @param v
 * @return the id if the venue exists in the database, or -1
otherwise
 */
private long findVenue(Venue v) {
StringBuffer sql = new StringBuffer(SELECT  + 
Columns.COLUMN_ID
+  FROM  + Tables.VENUES +  WHERE ?=?);
ArrayListString values = new ArrayListString();
values.add(Columns.V_NAME);
values.add(v.getName());

if (v.getStreet() != ) {
sql.append( AND ?=?);
values.add(Columns.V_STREET);
values.add(v.getStreet());
}

if (v.getCity() != ) {
sql.append( AND ?=?);
values.add(Columns.V_CITY);
values.add(v.getCity());
}

if (v.getState() != ) {
sql.append( AND ?=?);
values.add(Columns.V_STATE);
values.add(v.getState());
}

if (v.getZip() != ) {
sql.append( AND ?=?);
values.add(Columns.V_ZIP);
values.add(v.getZip());
}

String[] stringValues = new String[values.size()];
IteratorString it = values.iterator();
int i = 0;
while (it.hasNext())
stringValues[i++] = it.next();

Cursor cursor = database_.rawQuery(sql.toString(), 
stringValues);

if (cursor.getCount() != 0)
return cursor.getLong(cursor


[android-developers] Re: Any way to get current time or time zone from Address or long/lat pair?

2009-06-21 Thread Maps.Huge.Info (Maps API Guru)

I believe you can get time zone info using the coordinate from
geonames.org. Check their site to be sure.

-John Coryat
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: minSdkVersion and real devices

2009-06-21 Thread Raphael

On Sat, Jun 20, 2009 at 11:12 PM, BlackLightblacklight1...@gmail.com wrote:

 Hello.

 I have a game that uses simple gui. I can lunch it on any emulator and
 on my device. I'm setting minSdkVersion in xml to 1. If I will
 publish my paid app on market, will devices with ver1.5 be able to
 download and lunch my app? Emulators work fine, game doesn't use any
 system features.

Yes they will.
But if you put version=1 then please be sure to use the SDK for 1.0.

In other words: please put minSdkVersion to the value matching the
*actual* SDK you are developing with: 1.1 is version 2 and 1.5 is
version 3. You can create AVDs/emulators for these versions.

R/

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: minSdkVersion and real devices

2009-06-21 Thread BlackLight

Thanks.

I'm using 1.5_r2. It allows to select only between 1.1 and 1.5. Before
1.5_r2 I used 1.0_r1 (updated several weeks ago) and I have phone with
os 1.0.

 Yes they will.
 But if you put version=1 then please be sure to use the SDK for 1.0.

 In other words: please put minSdkVersion to the value matching the
 *actual* SDK you are developing with: 1.1 is version 2 and 1.5 is
 version 3. You can create AVDs/emulators for these versions.

It means that I must set version to 2 even I don't use any new
features (just bc I upgraded sdk to 1.5_r2)? I'd like to allow to run
my app on any phone (1.0, 1.1, 1.5) from market. Please, reply.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: CameraPreview: Out of memory

2009-06-21 Thread Shirish

This is because of its trying to attach the camera client with camera
service with out deatching the previous one.

If you know the scenario when this exception occur then I can help you
more.

Thanks,
-Shirish
On Jun 17, 6:23 pm, Boshik bos...@gmail.com wrote:
 Hi,

 After a few weeks on market with my app (Ghosts AR) I found few
 interesting issues coming from the users who installed the program. On
 some of the devices my application fails with exception:

 java.lang.RuntimeException:Outofmemory
         at android.hardware.Camera.native_setup(Native Method)
         at android.hardware.Camera.init(Camera.java:82)
         at android.hardware.Camera.open(Camera.java:64)

 Strange that I'm personally never got it on my G1 (1.5 firmware).

 Any ideas?

 Thanks,
 Alex
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: A2DP bluetooth e riproduzione a scatti (music cut)

2009-06-21 Thread azanutta

what's that link? the bug reporting page of android?
i've registered this new bug long ago, but noone seems interested in
fixing it... (-.-;)

On 15 Giu, 00:03, Marco Nelissen marc...@android.com wrote:
 On Sat, Jun 13, 2009 at 6:35 AM, azanuttaazanu...@gmail.com wrote:

   anA2DPbug of managing the bluetooth by android!
  i've got the jabra bluetooth headset to listen  the music wirelessly
  but i've got the same problem, a mute jump of the song that in worste
  cases are one every 2 seconds!!
  it maybe depends on how much  other android processes drain the phone
  resources, because i've seen that if i use simultaneoussly also the
  GPS with maps or mytracks, and the browser over 3g... the music
  becomes... well ... imbarassing...
  hope that the bug will fixed soon =(

 http://b.android.com
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: CameraPreview: Out of memory

2009-06-21 Thread Shirish

If you put the system.gc() every place then your system performance
will degrade.

On Jun 17, 8:32 pm, Sahil Arora sahilz...@gmail.com wrote:
 Hi,
 I had an application where i would navigate from
 step1: camera preview
 step2: to an activity
 step3: and again back to camera preview.

 on going from step 1 to step 2 the camera object is set to null and
 garbage collector is now supposed to take care of its deletion... but if
 i navigate back to step 3 in less time (2-4 sec) it happens that i get a
 crash out of memory.

 Remedy :: put System.gc() to explicitly call garbage collector wherever u do
 null for heavy objects.

 Hope it helps.

 Ciao.



 On Wed, Jun 17, 2009 at 6:53 PM, Boshik bos...@gmail.com wrote:

  Hi,

  After a few weeks on market with my app (Ghosts AR) I found few
  interesting issues coming from the users who installed the program. On
  some of the devices my application fails with exception:

  java.lang.RuntimeException: Out of memory
         at android.hardware.Camera.native_setup(Native Method)
         at android.hardware.Camera.init(Camera.java:82)
         at android.hardware.Camera.open(Camera.java:64)

  Strange that I'm personally never got it on my G1 (1.5 firmware).

  Any ideas?

  Thanks,
  Alex- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Permissions for Android Dev Phone 1

2009-06-21 Thread Delta Foxtrot
2009/6/20 Andrew andrewr...@gmail.com

 As far as I know the ADP and the retail G1/G2/... behave the same way
 if there is anything in the manifest which is a security risk or else
 the application will just install without any questions.


Even if an app doesn't ask for any permissions a dialog box is still show
regardlessly and the user has to hit ok.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application (.apk) Size

2009-06-21 Thread Delta Foxtrot
2009/6/20 Streets Of Boston flyingdutc...@gmail.com

 It wil be smaller than the heap size limit per apps
 Not true. :=)
 I could imagine creating an app of 50MBytes. 2MBytes worth of code and
 48MBytes worth of resources (images/assets/etc.). And if these
 resources are not loaded all at once, it should work.

 Of course, who would download such a big app to his/her phone..?


Given the right circumstance it's easy for some games to exceed that kind of
limit with graphics and additional media files, it's just stupid to think in
2008/2009 that limiting a phone to 64M of space for apps and it's resources
would be acceptable and almost no one would exceed those limitation,
although even the amount of ram that comes with the G1 is what I'd consider
to be on the low side of acceptance.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: new dev device

2009-06-21 Thread Delta Foxtrot
2009/6/20 Andrei gml...@gmail.com


 When can we expect new unlocked dev device for developers? Anybody?
 May be Magic


The Roger's magic can be rooted and unlocked etc :)

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is running applications from shell disabled?

2009-06-21 Thread Delta Foxtrot
2009/6/20 Lewis Z. lzh...@gmail.com


 Yes, I did.


Make sure you aren't trying to run it on a partition that is flagged not to
execute.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: lock data usage to email

2009-06-21 Thread Delta Foxtrot
2009/6/20 canistel canis...@gmail.com


 Is it possible to lock down the phone so that the only data usage is
 email? I don't even mind if the email has to be manually send /
 received; due to the small amount of data I have on my plan, I just
 don't ever want to use edge / 3g for anything other then email data.
 Once I'm on wifi then other data is fine.


If you have root access to your device you can install iptables to block all
access to all apps except the app you want to access data via specific
interfaces

There is a number of ways the logic could go here, but iptables is your best
bet to be honest.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Live traffic events as icons on a map

2009-06-21 Thread Lex

Hi everyone,

I am developing a prototype application which features basic
navigation (updating of own location on the map) and displays live
traffic events as traffic sign icons on the map. The traffic events
will be fetched from a server over a UDP connection. (I haven't
implemented this as I don't have the traffic message specs yet).

The idea is to display traffic events in real-time and also delete
them when they have expired. I figured out that what I need for this
is one or more ItemizedOverlays with dynamic items. I found this post,

http://groups.google.com/group/android-developers/browse_thread/thread/818ed0c29de35376/7f9dd604317958c4?lnk=gstq=updating+own+location+overlay#7f9dd604317958c4

which seems to be similar to my application. So the circular process
is:
1. fetch traffic data from server
2. populate an ItemizedOverlay object containing traffic events
3. update the map accordingy when the items in the overlay have
changed

Apparently in the MapView (or Map Activity?) I need some sort of a
listener for changes in the ItemizedOverlay object. What is the best
practice for doing this?

Thanks, Lex
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Change SeekBar Thumb image after onCreate

2009-06-21 Thread Protocol-X

I am having some difficulty changing the image for the SeekBar Thumb
after it has been created.
I want the SeekBar to have a different Thumb image at 25, 50,  75,
but when i try to change it via setThumb() it disappears.

I tried to Override the drawableStateChanged  verifyDrawable but run
into the same issue.  I have also tried disabling cache and no
luck...  Could anyone show me an example or point me in the correct
direction if im not on the right track?


Thanks you
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Help: canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);

2009-06-21 Thread mnish

I have initialized paint now. The nullpointerexception is solved by
this. But i still can't see any line on the map. As you said I have to
attach the canvas to the view or so. I have read the links you
supplied. But I dont understand it. I need to use the MapView and draw
lines on it. How can i do this. Could you please show me in a simple
way how i can do this?

thank you

On Jun 21, 4:55 am, Marco Nelissen marc...@android.com wrote:
 The problem is those last two lines:    canvas = new Canvas();
     canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);

 That creates a new Canvas, then draws in to it. The problem with that is
 that the Canvas isn't attached to anything, so you're essentially drawing
 in to something that is not visible.
 You should probably have a look 
 at:http://developer.android.com/reference/android/view/View.html#onDraw(...)

 On Sat, Jun 20, 2009 at 7:14 PM, nEx.Software 
 justin.shapc...@gmail.comwrote:



  In your code, I am not seeing anywhere that you have initialized
  paint. That would be the first place I'd look.

  On Jun 20, 5:50 pm, mnish twan...@gmail.com wrote:
   Hello,
   I have a problem with drawing lines between two points on google map.
   I get nullpointerexception on this line of code:
   canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);

   I know this is a very basic thing, but I don't know not much about it
   and I really really need your help.

    here is were i call this method:

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

                   linearLayout = (LinearLayout)
  findViewById(R.id.zoomview);
                   mapView = (MapView) findViewById(R.id.mapview);
                   mapView.setBuiltInZoomControls(on);
                   mapOverlays = mapView.getOverlays();
                   drawable =
  this.getResources().getDrawable(R.drawable.circle);
                   itemizedoverlay = new HelloItemizedOverlay(drawable);
                   Projection projection = mapView.getProjection();

                   Double lat1 = 30.342833*1E6, lon1 = -91.719033*1E6;
                   Double lat2 = -37.5262180*1E6, lon2 = 175.8060710*1E6;
                   point1 = new GeoPoint(lat1.intValue(), lon1.intValue());
                   point2 = new GeoPoint(lat2.intValue(), lon2.intValue());
                   p1 = new Point();
                   p2 = new Point();
                   projection.toPixels(point1, p1);
                   projection.toPixels(point2, p2);
                   canvas = new Canvas();
                   canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);

           }

   Any help is more than welcome.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] A simple application which sends location to server.

2009-06-21 Thread c6bro

Hi ALL,

I’m developing a Fleet Management application in PHP which tracks
location of all cars and shows up in a web browser.

I have also developed a little app for the android which will send the
location / time to the server when I press the button ???

I need to be able to do the following

Have a start up page with the following:

Website URL field: e.g http://www..co.uk/logtracking.php
Frequency field:e.g  6 (Seconds)
Start/Stop button.

When you click the Start button it will send the location, time and
any other fields to the web address inputted. I will collect these
using php with my tracking application

The app will be able to be closed and run in the background until you
click the stop button.

If the internet is down it would take a log and send them one up
again.. 

This is a really simple app. Just for my use whilst I test my tracking
Application.

Can anybody guide me on the best way to do this ? Or better still give
me a price on writing it for me.

My knowledge on Android is very limited.

Heres what I have done so far:

It simply send the location stuff when i click a button.



package sendLocation.android.com;
import java.net.URLEncoder;
import java.text.DateFormat;

import sendLocation.android.com.GetStuffFromWeb;

import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
import android.widget.Toast;

public class SendLocation extends Activity {
LocationManager lm = null;
Location loc = null;
public static final String TAG = LOQUERIO;
private LocationListener locationListener;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
lm = (LocationManager) getSystemService
(Context.LOCATION_SERVICE);
locationListener = new MyLocationListener();
lm.requestLocationUpdates
(LocationManager.GPS_PROVIDER, 0, 0,
locationListener);
}
private void initActivity() {



loc = lm.getLastKnownLocation(gps);
if (loc == null) {
Log.e(mylocation, failed to determine my
location);
} else {



Log.i(mylocation, loc.toString());



//TextView text = (TextView) findViewById
(R.id.lblTest);
//text.setText(loc.toString());


GetStuffFromWeb textResult = new
GetStuffFromWeb(); //initiate the Class
 textResult.setURL(http://www.theURL.com/
live.php?id=+loc.toString()); //set the URL
 String theResults = textResult.retrieve();
 TextView text3 = (TextView) findViewById
(R.id.lblTest3);
 text3.setText(theResults);

}





}



@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
menu.add(0, 27, 0, GetLocation).setIcon(
android.R.drawable.ic_menu_add);
return true;
}
@Override
public boolean onMenuItemSelected(int featureId, MenuItem
item) {
switch (item.getItemId()) {
case 27:
initActivity();
return true;
}
return super.onMenuItemSelected(featureId, item);
}
private class MyLocationListener implements LocationListener
{
public void onLocationChanged(Location loc) {
// Called when the location has changed.
Log.d(TAG, === MinhaLocalizacaoListener
onLocationChanged);
if (loc != null) {
Toast.makeText(
getBaseContext(),
Location changed :
Lat:  + loc.getLatitude()
+ 
Lng:  + loc.getLongitude(),

Toast.LENGTH_SHORT).show();


//HERE HERE HERE 

[android-developers] Re: Retrieving Records from a created Database and put it in a SPINNER

2009-06-21 Thread Georgy

Thanks Hamy,,

but when I try to chmod the device's database, I am getting operation
not permitted.

I tried several ways, I am having permission problems.  anything I
could do from the device itself?

On Jun 20, 12:18 pm, Hamy hamilt...@gmail.com wrote:
 Typically, to get a database on your computer from either the
 emulator, or the actual device, the commands go something like this
 for me

  adb shell

 $ su
 # cd /data/data/my.package.name/databases
 # ls
 my_database.db
 # chmod 777 my_database.db
 # exit
 $ exit

  adb pull /data/data/my.package.name/my_database.db ~/my_database.db

 For the pull, I am on linux, so my destination path looks like ~/blah.
 On windows, mark is correct - it should look something like C:/asdf
 Naturally, the file my_database.db does not exist locally (that is, on
 the computer) before this command, so it is created if it is not
 there. The su command at the beginning simply allows you to change
 directories and list directories more easily, it is not required.
 Without su, you could do cd /data and a list (ls) would likely fail,
 citing permission problems

 Thanks,
 Hamy

 On Jun 19, 3:02 pm, Georgy georgearna...@gmail.com wrote:

  if not could you please give me an example of

  adb pull remote local

  I can't figure out the destination of my files..

  thanks

  On Jun 19, 3:51 pm, Georgy georgearna...@gmail.com wrote:

   Is there anyway to do so from DDMS without dealing with the security
   issues of the device? I was able to do that using the emulator on
   Eclipse and not the command prompt.  Anyway to deal with the device
   database from Eclipse (DDMS) ?

   thanks

   On Jun 19, 3:09 pm, Mark Murphy mmur...@commonsware.com wrote:

 on another matter, I want to see my database, I rezlied that I do not
 have the persmission to see it from the device, how can I see it from
 the emulator on Eclipse? I read the documentation and on the MS DOS
 prompt after writing adb -s emulator5554 shell and trying to connect
 to the database it can't find it and I can't see it  on the project
 explorer in Eclipse?

 any ideas?

Use the adb pull command:

   http://developer.android.com/guide/developing/tools/adb.html#copyfiles

--
Mark Murphy (a Commons Guy)http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sad day with SQLiteDatabase.rawQuery

2009-06-21 Thread Mark Murphy

Hamy wrote:
 Could someone please help me spot the bug here? Mainly, I can never
 seem to find a value once it has been stored in the database (I am
 100% positive that the value is there). I can store it the first time,
 but the cursor in my findVenue() method (see below) never has any
 data. :-(
 
 If I do not try to use replaced ? marks, and instead write a raw
 string that is then used as my query, it works perfectly. It does not
 work with prepared statements. I would really like to use the ? marks
 to help avoid SQL security issues (and I am frustrated that they do
 not work). Also, I would like to be able to see the text of my SQL
 query somewhere before I execute it, if that is possible.

snip

   StringBuffer sql = new StringBuffer(SELECT  + 
 Columns.COLUMN_ID
   +  FROM  + Tables.VENUES +  WHERE ?=?);

Try only using a ? on the right-hand side and see if it works for you.

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

_Android Programming Tutorials_ Version 0.95 Available!

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to develop a tiny background application with no UI

2009-06-21 Thread GAYET Thierry
Hi, i am asking about the development of an Android application that must work 
in backgroup (so no user interface).

Usually my application extend to the activity class that manage all the 
application process.

Maybe i can avoid any setContentView() that won't display anything but i don't 
want any icon !!

 Cordialement


Thierry GAYET
NextInnovation.org
+33(0)663.849.589



  
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to customize the setting menu and my own items

2009-06-21 Thread GAYET Thierry
Hi, for personal purpose i am looking for the way to customize tht setting menu 
by adding my own items on it ?

How to do it ? Is it possible without changing any security options ?

 Cordialement


Thierry GAYET
NextInnovation.org
+33(0)663.849.589



  
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Change drawing order of children

2009-06-21 Thread Deren

Why isn't is possible to manually set the drawing order of views? It
seems like a pretty big restriction. Is there any thought behind this
or is it just not implemented yet? (to set the
FLAG_USE_CHILD_DRAWING_ORDER). Not being able to set the drawing order
is too bad when it comes to animations :(
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] listview click problem

2009-06-21 Thread tstanly

hi all,

i have a listview as bellow,

---
Google
---
Yahoo!
--

if i want to go to the Google,
just click the Google of the list,
but it just active when i click on the word Google
because i wish can click anywhere if it's click on the same raw of
Google word

but now i must click on the word(Google or Yahoo!),
how can solve??

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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: A simple application which sends location to server.

2009-06-21 Thread Delta Foxtrot
2009/6/21 c6bro ch...@upload.co.uk

 Website URL field: e.g http://www..co.uk/logtracking.php
 Frequency field:e.g  6 (Seconds)
 Start/Stop button


Any particular reason for 6s intervals?


 The app will be able to be closed and run in the background until you
 click the stop button.


You most likely don't want to use an activity for the GPS/upload side of
things, you would make an activity that started and stopped a service.


 If the internet is down it would take a log and send them one up
 again.. 


The easiest way I've found to do this, is you just have a ListArray of a
custom object, the object just stores the values you need, and then you can
push new values onto the end of the ListArray and pop them off as they are
accepted for upload. Also do batch uploads instead of one value at a time,
it can be very time consuming uploading one value at a time and waiing for a
response from the remote end.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to develop a tiny background application with no UI

2009-06-21 Thread Delta Foxtrot
2009/6/21 GAYET Thierry thierry_ga...@yahoo.fr

 Hi, i am asking about the development of an Android application that must
 work in backgroup (so no user interface).

 Usually my application extend to the activity class that manage all the
 application process.


You don't want to use Activity, you want to make a service.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Catching AudioRecord exception when not processing fast enough

2009-06-21 Thread Keith Wiley

bump

On Jun 19, 10:08 am, Keith Wiley kbwi...@gmail.com wrote:
 In the Eclipse log I can clearly see a warning pop up (something about
 buffer overflow) every time I don't read from the AudioRecord buffer
 fast enough and consequently miss a chunk of audio samples.  Is there
 any way I can detect that notification programatically so I know
 exactly when I have missed a chunk?

 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android 1.5 SDK, Release 2 -- TelephonyManager

2009-06-21 Thread alexdonnini

Hi Liam,

You need to have Android libraries in your project's Libraries build
path (this means that you need to have the Android project source
accessible from your IDE (e.g. Eclipse), and then make sure that the
Android libraries precede the Android SDK library in the build order.

I hope this helps.

Alex

On Jun 17, 4:29 am, Ne0 liamjamesalf...@googlemail.com wrote:
 As you can probably tell, i am new to android development and rusty on
 java. I have just had a quick look at cellfinder and its importing
 com.android.internal packages, how do you do this? As the SDK
 android.jar doesn't allow access to internal packages.

 This lack of understanding is no doubt due to one of the black holes
 in my memories of java, shouldn't have had so many beers over the last
 5 years!! ;-)

 Liam

 On Jun 17, 9:13 am, Ne0 liamjamesalf...@googlemail.com wrote:

  Thanks Alex, i will look into it.

  On Jun 16, 5:55 pm, alexdonnini alexdonn...@ieee.org wrote:

   Liam,


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to add dependencies with Android packet

2009-06-21 Thread GAYET Thierry
Hi, if i have well remember among my previous reading, one package may contain 
only one application.

 
I would like to know if it is possible to add dependencies between package. 

I would like to make a package that include an application but this package use 
a service that i have written before. This service is another Android package. 
I need to link the Myapplication.apk with MyService.apk.

I can display a message to the user that inform to install the package expected 
but is there exist another process to do it ?

Cordialement


Thierry GAYET
NextInnovation.org
+33(0)663.849.589



  
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] sensor event and augmented reality

2009-06-21 Thread RS

Could somebody (Mathias Agopian alias pixelflinger perhaps) please
tell me how to use information from sensor for augmented reality
stuff.
Sorry am not much into graphics stuff but I did try my part to figure
stuff out with help of documentation.
Didn't miss the note:
Note: It is preferable to use getRotationMatrix() in conjunction
with remapCoordinateSystem() and getOrientation()  to compute these
values; while it may be more expensive, it is usually more accurate.


Tried both. With the above method roll is always negative (in radians)
of the roll returned by orientation sensor event. Not the real problem
though as these are in the same +/-90 range but negative/opposite.
One of these goes against the definition of roll in android
documentation.

I have the camera on landscape mode and did try with and without the
suggestion:
# Using the camera (Y axis along the camera's axis) for an augmented
reality application where the rotation angles are needed :
remapCoordinateSystem(inR, AXIS_X, AXIS_Z, outR); 

Yet no luck. Got a few lessons on quaternions etc. But am sure it is
much easier than the mess am getting into.

Say, orientation sensor event returns yaw, pitch  roll in say eO[]
What are the next steps to get rotation matrix that I could use in
opengl to rotate a augmented scene overlapping the camera preview?

Thanks and regards
RS

ps:
I have used Matrix.setRotateEulerM (m, eO[0], eO[1], eO[2]); // tried
with negatives too.
I have also tried other events (eA and eM) to eO through;
SensorManager.getRotationMatrix(mR, mI, eA, eM);
and then remap as suggested etc.


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ExifInterface and libexif

2009-06-21 Thread Augustin.CL


Does anyone have any ideas?

On Jun 19, 8:24 pm, Augustin.CL iamaugus...@gmail.com wrote:
 Dear All,
         Currently, I want to fix the camera apk to make the image
 attached the GPS information. But I find there are some problems.
         1. First, we can't change the exif information. According 
 tohttp://code.google.com/p/android/issues/detail?id=2415, I modified
 some codes of libexif(external/jhead/main.c). Now, it will show the
 GPS information.

         2.But, when I try to modify the gps information of EXIF, I
 failed to update this information to that image.

 My questions is How I could use the ExifInterface.java of Camera app
 to change the Exif information.

 Please give me some advices. Thanks in advanced.

 BTW, Does ExifInterface.java use the android/external/jhead/main.c
 over JNI?

 Best regards,
 Augustin.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: CameraPreview: Out of memory

2009-06-21 Thread Timothy F

Are you calling the release method on the camera?

On Jun 21, 5:10 am, Shirish ashir...@gmail.com wrote:
 If you put the system.gc() every place then your system performance
 will degrade.

 On Jun 17, 8:32 pm, Sahil Arora sahilz...@gmail.com wrote:



  Hi,
  I had an application where i would navigate from
  step1: camera preview
  step2: to an activity
  step3: and again back to camera preview.

  on going from step 1 to step 2 the camera object is set to null and
  garbage collector is now supposed to take care of its deletion... but if
  i navigate back to step 3 in less time (2-4 sec) it happens that i get a
  crash out of memory.

  Remedy :: put System.gc() to explicitly call garbage collector wherever u do
  null for heavy objects.

  Hope it helps.

  Ciao.

  On Wed, Jun 17, 2009 at 6:53 PM, Boshik bos...@gmail.com wrote:

   Hi,

   After a few weeks on market with my app (Ghosts AR) I found few
   interesting issues coming from the users who installed the program. On
   some of the devices my application fails with exception:

   java.lang.RuntimeException: Out of memory
          at android.hardware.Camera.native_setup(Native Method)
          at android.hardware.Camera.init(Camera.java:82)
          at android.hardware.Camera.open(Camera.java:64)

   Strange that I'm personally never got it on my G1 (1.5 firmware).

   Any ideas?

   Thanks,
   Alex- Hide quoted text -

  - Show quoted text -- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Help: canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);

2009-06-21 Thread Marco Nelissen
You can't attach your own Canvas to the view, you need to draw in to the
view's existing canvas. You'd normally do that by deriving from the class
and implementing onDraw().You could also try drawing in to a transparent
view on top of the MapView, though I'm not sure how that would work with
touch events.



On Sun, Jun 21, 2009 at 5:45 AM, mnish twan...@gmail.com wrote:


 I have initialized paint now. The nullpointerexception is solved by
 this. But i still can't see any line on the map. As you said I have to
 attach the canvas to the view or so. I have read the links you
 supplied. But I dont understand it. I need to use the MapView and draw
 lines on it. How can i do this. Could you please show me in a simple
 way how i can do this?

 thank you

 On Jun 21, 4:55 am, Marco Nelissen marc...@android.com wrote:
  The problem is those last two lines:canvas = new Canvas();
  canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);
 
  That creates a new Canvas, then draws in to it. The problem with that is
  that the Canvas isn't attached to anything, so you're essentially
 drawing
  in to something that is not visible.
  You should probably have a look at:
 http://developer.android.com/reference/android/view/View.html#onDraw(...)
 
  On Sat, Jun 20, 2009 at 7:14 PM, nEx.Software justin.shapc...@gmail.com
 wrote:
 
 
 
   In your code, I am not seeing anywhere that you have initialized
   paint. That would be the first place I'd look.
 
   On Jun 20, 5:50 pm, mnish twan...@gmail.com wrote:
Hello,
I have a problem with drawing lines between two points on google map.
I get nullpointerexception on this line of code:
canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);
 
I know this is a very basic thing, but I don't know not much about it
and I really really need your help.
 
 here is were i call this method:
 
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
 
linearLayout = (LinearLayout)
   findViewById(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(on);
mapOverlays = mapView.getOverlays();
drawable =
   this.getResources().getDrawable(R.drawable.circle);
itemizedoverlay = new HelloItemizedOverlay(drawable);
Projection projection = mapView.getProjection();
 
Double lat1 = 30.342833*1E6, lon1 = -91.719033*1E6;
Double lat2 = -37.5262180*1E6, lon2 =
 175.8060710*1E6;
point1 = new GeoPoint(lat1.intValue(),
 lon1.intValue());
point2 = new GeoPoint(lat2.intValue(),
 lon2.intValue());
p1 = new Point();
p2 = new Point();
projection.toPixels(point1, p1);
projection.toPixels(point2, p2);
canvas = new Canvas();
canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);
 
}
 
Any help is more than welcome.
 


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to add dependencies with Android packet

2009-06-21 Thread Mark Murphy

GAYET Thierry wrote:
 Hi, if i have well remember among my previous reading, one package may
 contain only one application.
  
 I would like to know if it is possible to add dependencies between package.

Oh, how I wish we could.

 I can display a message to the user that inform to install the package
 expected but is there exist another process to do it ?

Unfortunately, no, your solution is as good as it gets today, AFAIK.

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

Need help for your Android OSS project? http://wiki.andmob.org/hado

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



[android-developers] Populating a Spinner from another Spinner Dynamically

2009-06-21 Thread Georgy

Hello,

I am trying to populate a spinner depending on another spinner's
selected item, my code is the following:

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


final Dbadapter db = new Dbadapter(this);  // This creates an
instance of the database in this class

 // Initialization of the 1st spinner
final Spinner s = (Spinner) findViewById(R.id.spinner);
ArrayAdapter adapter = ArrayAdapter.createFromResource(
this, R.array.universities,
android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource
(android.R.layout.simple_spinner_dropdown_item);
s.setAdapter(adapter);

 // Initialization of the 2nd spinner
String[] array = {Select Building Here};
final Spinner s2 = (Spinner) findViewById(R.id.spinner2);
db.open();
final Cursor cur = db.getAllTitles();
String[] columns = new String[]{building,locode};
SimpleCursorAdapter cadapter = new SimpleCursorAdapter(this,
android.R.layout.simple_spinner_item, cur,
   columns, new int[] {android.R.id.text1});
cadapter.setDropDownViewResource
(android.R.layout.simple_spinner_dropdown_item);
s2.setAdapter(cadapter);


   // When user selects a university
   s.setOnItemSelectedListener(new OnItemSelectedListener() {

@Override
public void onItemSelected(AdapterView? arg0, View 
arg1,
int arg2, long arg3) {
  //Get the selected university
   String selectedItemString = (String) 
s.getSelectedItem();
   System.out.println
(Uni: !+selectedItemString);

  if(selectedItemString .equals(Old Dominion 
University))
  {
   oduspinner();

  }

  else
  {
   nospinner();
  }

}

@Override
public void onNothingSelected(AdapterView? arg0) {
// TODO Auto-generated method stub
}

   });

// When user selects a university
s2.setOnItemSelectedListener(new OnItemSelectedListener()  {

@Override
public void onItemSelected(AdapterView? arg0, View 
arg1,
int arg2, long arg3) {

   System.out.println(Entered 2nd
spinner!);
   String selected=  (String) 
s2.getSelectedItem();
   System.out.println(Entered 2nd
spinner!+ selected);


}

@Override
public void onNothingSelected(AdapterView? arg0) {
// TODO Auto-generated method stub

}


   });



 }


what is intriguing me is that the first spinner onitemselection works
perfectly  ( I can see the values in LogCat) then when I change
selection of the 2nd spinner I am gettging an error on this line:
String selected=  (String) s2.getSelectedItem(); So the compiler gets
insisde then onItemSelected function of the 2nd spinner but throws an
Handler exceltion on s2.getSelectedItem()

why? it works perfectly for the 1st spinner.

please help,
 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Copy SQL lite Database to Device (and not emulator)

2009-06-21 Thread Georgy

my only way to do it was to dump the database and get the code and
insert it in the database to build it on the fly just like Burton
Miller suggested.

I think this is not the best approach and could slow things down
tremendously

On Jun 20, 4:51 pm, burton miller burton.mil...@gmail.com wrote:
 this was not possible in previous versions of the os - maybe it is
 now.

 up until now, you have three options:
 1) build db on the fly
 2) put db in assets, then copy it to db directory when you first run
 (2x space).
 3) install db from internet as a secondary installation

 if things have changed - then i'll rewrite one of my apps!

 On Jun 19, 12:43 pm, Georgy georgearna...@gmail.com wrote:

  Hello

  I have an SQL lite database that I am trying to copy to the device. I
  was able to copy it to the emulator easily using DDMS however with the
  protection in the device, I cannot access the database files from the
  DDMS perspective.

  I read many attempts here but couldn't find an easy solution.

  Is there any way to attach the database (let's say named 'proj') and
  replace the currently created database proj in he device files?

  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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] running an native app as root

2009-06-21 Thread Simon

I was trying to run an added native application inside the framework,
which should be executed by a JNI impl which I included to
libandroid_runtime. So far so bad.

I used servial approches to run a command:

- ret=execl(myapp, myapp , NULL);

- property_set(ctl.start,myapp)

I copied myapp to /system/bin/myapp to ensure that it will be in the
path. But what ever I did it was never executed. I checkt the uid for
the JNI process wihich is always   system(1000).

Does anyone know a solution for this problem?

Greeting Simon

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to trap search button in emulator?

2009-06-21 Thread Casper Bang

In creating a HTC Magic skin for the Android emulator, I am unable to
map the search button in a layout file. It does not appear to be
possible, the KeyInfo constants inside skin_file.c contains all other
control buttons such as home, back and menu (soft-left).

I'm tempted to file a bug report, but surely there's a reason I am not
aware of for why it's left out already?!

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Emulator Camera Issues in 1.5

2009-06-21 Thread Scott

I too had this problem, but I found a work around by toggling off
the Orientation setting under Sound  display.  My assumption
was that the SensorManager is conflicting with the Camera's desire
to be in Landscape mode, just a guess, but the with that setting
off I was able to test my apps using the camera. Scott

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Attempt to include a core VM class in something other...

2009-06-21 Thread SPD

newbie here, but I'm getting this error and I still don't have a
solution.  This snippy little note from Google is NOT useful.
Especially since eclipse (the standard, advertised, google method for
developing apps) does not allow you to add --core-library to the build
line. Anyways, enough complaining.  I'm actually getting two errors.

SDK 1.5 app previously on SDK 1.0 running fine.

[2009-06-19 10:23:31 - appname]
trouble processing java/awt/font/NumericShaper.class:
[2009-06-19 10:23:31 - appname]
Attempt to include

Except that there's no file named NumericShaper.class, anywhere, in
any code, I'm using nor including.  I've only got one jar file in my
classpath

?xml version=1.0 encoding=UTF-8?
classpath
classpathentry excluding=images/|android/util/ kind=src
path=src/
classpathentry kind=src path=gen/
classpathentry kind=lib path=C:/android-sdk-windows-1.5_r2/
platforms/android-1.5/android.jar/
classpathentry kind=output path=bin/
/classpath

And no source code other than that jar file refers to
NumericShaper.class.

Any ideas?

SPD.

On Jun 3, 4:19 pm, markdsievers mark.siev...@gmail.com wrote:
 Root cause was two android jars on the classpath...Yes it is a silly
 error, cant help but be a little dissapointed that this problem
 manifested itself like this

 On Jun 3, 10:40 pm, Mark Murphy mmur...@commonsware.com wrote:

  markdsievers wrote:
   Just a bump...Same situation, upgrading Android and have ended up with
   this problem. Someone in the next cubicle has the same project
   working, so will post the solution shortly...

  The error message is fairly self-explanatory in terms of what to do,
  though the better answer is to not try adding classes in the java.* or
  javax.* namespaces.

  In the OP's case, if I am reading their stack trace correctly, they were
  trying to add java.security.cert.CertPathParameters, perhaps from Apache
  Harmony, and Android's build tools will not appreciate that. In part,
  that is because Android 1.5 already has an implementation of this interface.

  You can use classes pulled from Harmony, but you need to modify them
  (and the code that uses them) to put them in another namespace.

  Bear in mind that if you do follow the error message's instructions and
  use --core-library to attempt to get past this message, your application
  may break in future versions of Android, if they happen to include the
  same class you're trying to load and the implementations are not compatible.

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

  Warescription: Three Android Books, Plus Updates, $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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] No ringtones in the emulator?

2009-06-21 Thread Lukas Zapletal

Hello,

I want to test ringtones of my application if it works in the emulator
but it seems the emulator has no ringtones provided. I am unable to
select one - the list in the setting is empty.

Whats wrong?

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Earn Money With Cashmails Without Invest

2009-06-21 Thread Ashraful Islam
Hello,

I want to tell you about a great site I found. They pay you to read e-mail,
visit web sites and much more.

It's free to join and easy to sign up! CLICK THIS

LINK TO VISIT: *http://cashmails.org/pages/index.php?refid=ashrafulislam *

Thank you.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: fullscreen doesn't hide Status Bar in Android SDK 1.5 R2

2009-06-21 Thread vinc...@eklaireur.com

Ok Guys,
I did have the same issue

i found out my mistake, you have to define the thme within the
activity tag

android:theme=@android:style/Theme.NoTitleBar.Fullscreen

V



On 11 juin, 14:00, Mark Murphy mmur...@commonsware.com wrote:
 Shyam Dasgupta wrote:
  can somebody atleast confirm whether they face this issue with 1.5
  SDK, please? anybody who can test a fullscreen theme in 1.5 SDK?

 Fullscreen definitely hides the status bar in 1.5.

 android:theme=@android:style/Theme.NoTitleBar.Fullscreen

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

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

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



[android-developers] Re: How do you handle orientation change for a Cupcake widget?

2009-06-21 Thread 2hill

I believe you add a folder into your res called layout-land and
include your layout as you wish the landscape to be.
hope that helps!

On Jun 19, 9:35 am, Blake B. bbuckle...@yahoo.com wrote:
 Hi,
     Maybe I'm missing something obvious, but how do you handle
 orientation changes for a Cupcake desktop widget?
     When it is initially created, the onUpdate() method of my
 AppWidgetProvider calls views.setOnClickPendingIntent(buttonID,
 pendingIntent) to register for my button events, but when the
 orientation changes, new buttons are created and I don't have an
 opportunity to re-register the onClick listeners. What is the proper
 way to do this?

 Thanks,
 Blake

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] webkit.plugin samples

2009-06-21 Thread amir

hello
i am tring to develop a plugin for the android browser.
can any one provide a link for examples about that.

Thank you very much

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Flow or Multiline layout?

2009-06-21 Thread Sebastian

Is there a way to do a linear layout with multiple lines?

I want to lay out a variable set of buttons with variable labels, so
I'd like to use a layout that works as a simple horizontal
LinearLayout, but with multiple lines, so the buttons spill into a
second (or third) line if they don't fit on the first one.

Something like this:

[Button 1] [abc] [123] [another]
[more buttons] [xyz] [one more]

I looked all over the docs and couldn't find any. Maybe I overlooked
something, or maybe someone has written an alternative?

Thanks,
   Sebastian


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] SOAP envelop not being created for response from seam server

2009-06-21 Thread Charlie

Hi Guys,

I am trying to connect to webservices in jboss(using seam) from a
google android phone. So far, I implemented all the necessary beans
and android classes. Unfortunately, I am getting an exception on the
server side after the request is dispatched from the android emulator,
java.lang.IllegalArgumentException: Cannot create SOAP envelope from:
methodCall. I have tried everything I can but to no success. On the
other hand, when I try to connect to the service from SOAP UI,
everything works great. Please if you have any clue, help! Thanks a
lot in advance.

Interface
[code]

package de.iu.soko.web.webservice;

import javax.ejb.Remote;


@Remote
public interface SokoServiceRemote {


public String hello();
}
[/code]


Stateless Web Service Facade
[code]

package de.iu.soko.web.webservice;

import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.security.Identity;

@Stateless
@WebService(name = SokoService, serviceName = SokoService)
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Name(sokoServiceCallHandler)
public class SokoService implements SokoServiceRemote {

@Logger
private Log log;

@In(required=true)
Identity identity;



@WebMethod
public String hello(){

return Hello from a seam component;
}
}

[/code]



standard-ws-config xml file
[code][/code]
jaxws-config xmlns=urn:jboss:jaxws-config:2.0

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:javaee=http://java.sun.com/xml/ns/javaee;

xsi:schemaLocation=urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd

endpoint-config

config-nameSeam WebService Endpoint/config-name

pre-handler-chains

javaee:handler-chain

javaee:protocol-bindings##SOAP11_HTTP
/javaee:protocol-bindings

javaee:handler

javaee:handler-nameSOAP Request 
Handler/javaee:handler-name

javaee:handler-
classorg.jboss.seam.webservice.SOAPRequestHandler
/javaee:handler-class

/javaee:handler

/javaee:handler-chain

/pre-handler-chains

/endpoint-config

/jaxws-config



entries in web.xml

[code][/code]

filter
 filter-nameSeam Context Filter/filter-name
 filter-classorg.jboss.seam.web.ContextFilter/filter-class
  /filter

  filter-mapping
 filter-nameSeam Context Filter/filter-name
 url-pattern/test/url-pattern
  /filter-mapping



servlet-mapping
  servlet-nameAndroidService/servlet-name
  url-pattern/androidService/url-pattern
 /servlet-mapping
 servlet
  servlet-nameAndroidService/servlet-name
  servlet-classde.iu.soko.web.webservice.SokoService/servlet-class
 /servlet



SOAP UI request
[code]
POST http://sylar:8080/soko-web/androidService?wsdl HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: 
User-Agent: Jakarta Commons-HttpClient/3.1
Host: sylar:8080
Content-Length: 219

soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/
envelope/ xmlns:web=http://webservice.web.soko.iu.de/;
   soapenv:Header/
   soapenv:Body
  web:hello/
   /soapenv:Body
/soapenv:Envelope

[/code]




SOAP UI Response
[code]
env:Envelope xmlns:env=http://schemas.xmlsoap.org/soap/envelope/;
   env:Header
  seam:conversationId xmlns:seam=http://www.jboss.org/seam/
webservice21/seam:conversationId
   /env:Header
   env:Body
  web:helloResponse xmlns:web=http://
webservice.web.soko.iu.de/
 returnHello from a seam component/return
  /web:helloResponse
   /env:Body
/env:Envelope

[/code]



The Exception
[code]

java.lang.IllegalArgumentException: Cannot create SOAP envelope from:
methodCall
at org.jboss.ws.core.soap.SOAPEnvelopeImpl.init
(SOAPEnvelopeImpl.java:70)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build
(EnvelopeBuilderDOM.java:124)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build
(EnvelopeBuilderDOM.java:96)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage
(MessageFactoryImpl.java:262)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage
(MessageFactoryImpl.java:185)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest
(RequestHandlerImpl.java:389)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest
(RequestHandlerImpl.java:272)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost
(RequestHandlerImpl.java:189)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest
(RequestHandlerImpl.java:122)
at org.jboss.wsf.stack.jbws.EndpointServlet.service

[android-developers] Multi View

2009-06-21 Thread Hendrawan

Please some one can help me, where i can get example code for multi
view programming in android.
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Trying to receive the ACTION_PROVIDER_CHANGED intent from the gmail app

2009-06-21 Thread Wiebbe

I have been trying to catch the ACTION_PROVIDER_CHANGED intent to use
and see how many unread emails there are still left. According to the
documentation you can receive the action to these data.

Documentation:
Broadcast Action: Some content providers have parts of their namespace
where they publish new events or items that the user may be especially
interested in. For these things, they may broadcast this action when
the set of interesting items change. For example, GmailProvider sends
this notification when the set of unread mail in the inbox changes.

But somehow my catching code is never hit, when i replace the Intent
Action with something like ACTION_TIME_TICK or another one, it works
perfectly, but this one never seems to hit.

I know the intent is being broadcasted looking at the LogCat, but i am
still never able to receive it.

06-20 15:35:52.726: INFO/gmail-ls(130): Sending notification intent:
Intent { action=android.intent.action.PROVIDER_CHANGED data=content://
gmail-ls/unread/^i type=gmail-ls (has extras) }


Has anyone had this same problem or has found a work around?

The (partial) code i am using is as followed:

@Override
public void onStart(Intent intent, int startId) {
// Build the widget update for today
Log.i(GMAILNOT, Service started);

registerReceiver(mGmailNotInfoReceiver, new IntentFilter
(Intent.ACTION_PROVIDER_CHANGED));
}

private BroadcastReceiver mGmailNotInfoReceiver = new
BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {

Log.i(GMAILNOT, intent.toString());

 String action = intent.getAction();
 if (Intent.ACTION_PROVIDER_CHANGED.equals(action)) {
 Uri dataURI= intent.getData();
 String dataURIPath=dataURI.getPath();
 Log.i(GMAILNOT, dataURIPath);
 }
}
   };

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: no classfiles specified and Conversion to Dalvik format failed with error 1

2009-06-21 Thread Jiri Danek

Check this: http://www.anddev.org/viewtopic.php?p=22705

You have to simply reload the project in Eclipse. Click on the project
in the Package explorer on the left and press F5(reload)

On 15 čvn, 02:12, xerberus bastian.seiff...@gmail.com wrote:
 Hi Guys,

 I have a working(Released) project that needs some updating. The
 Project was created with SDK 1.1 on Windows and Ecplise 3.4.
 A couple months ago i moved away from Windows to Mac and installed all
 tools on the mac including Android SDK 1.1. Everything was working
 fine at that time.

 I never bothered compiling the project against SDK 1.5 as the program
 was running fine on a 1.5 Device.
 But now i need to do some changes and installed SDK 1.5, following the
 installation guideline (http://developer.android.com/sdk/1.5_r1/
 upgrading.html#UpdateYourProjects).

 So I build my project against  SDK 1.1 (as suggested) and failed with
 the following error messages :
 - no classfiles specified
 - Conversion to Dalvik format failed with error 1

 I receive the same error if I compile with SDK 1.5 (clean + build).

 First i thought there is something wrong with my code but could not
 find anything.
 After that I tried the example JetBoy and received the same error.
 Using Fix Project Properties was without effect for booth projects.

 I am kind of clueless right know and happy for any suggestion

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Parsing SOAP request

2009-06-21 Thread fifi

I would like to parse a soap envelope using KSOAP2 how can  Istart I
am new and I tried the following code but i couldnot. Also I would
like to display the parsed elements on the screen?Thanks

package parsingsteps;

import java.io.*;
import org.ksoap2.SoapEnvelope;
import org.kxml2.io.KXmlParser;
import org.xmlpull.v1.XmlPullParserException;

/**
 *
 * @author fa00064
 */
public class ParsingSteps {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
try{
   // String msg=helloWorld!/hello;
String msg = SOAP-ENV:Envelope  + xmlns:SOAP-ENV=\http://
www.w3.org/2001/12/soap- envelope\  + xmlns:xsi=\http://www.w3.org/
2001/XMLSchema-instance\  +xmlns:xsd=\http://www.w3.org/2001/
XMLSchema\ gt; +
 SOAP-ENV:Body +
 result +
 message xsi:type=\xsd:string\Hello World/message +
 /result +
 /SOAP-ENV:Body +
 /SOAP-ENV:Envelope;


  //  byte[] in= msg.getBytes();

KXmlParser parser=new KXmlParser();
parser.setInput(new StringReader(msg));
   SoapEnvelope soapenvelope= new SoapEnvelope
(SoapEnvelope.VER12);
//soapenvelope.parse(parser);
soapenvelope.parseBody(parser);


  }
catch (IOException e) {
   System.out.println(Error reading URI:  + e.getMessage
());
} catch (XmlPullParserException e) {
  System.out.println(Error in parsing:  + e.getMessage
());
}
  //  String result=parser.getName();
//System.out.println(result);
}
}

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Parsing SOAP Envelope

2009-06-21 Thread feda al-shahwan
I created small program to parse envelope but I got the following error

Error in parsing: name expected (position:START_TAG SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://www.w3.org/2001/12/soap- envelope' xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='
http://www.w3.org/2001/XMLSchema'@1:175 in java.io.stringrea...@c17164)
BUILD SUCCESSFUL (total time: 2 seconds)
How Can I solve it knowing that the code is:

package parsingsteps;
import java.io.*;
import org.ksoap2.SoapEnvelope;
import org.kxml2.io.KXmlParser;
import org.xmlpull.v1.XmlPullParserException;
/**
 *
 * @author fa00064
 */
public class ParsingSteps {
/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
try{
 //  String msg=helloWorld!/hello;
   String msg = SOAP-ENV:Envelope  + xmlns:SOAP-ENV=\
http://www.w3.org/2001/12/soap- envelope\  + xmlns:xsi=\
http://www.w3.org/2001/XMLSchema-instance\http://www.w3.org/2001/XMLSchema-instance/
 
+xmlns:xsd=\http://www.w3.org/2001/XMLSchema\http://www.w3.org/2001/XMLSchema/
gt; +
 SOAP-ENV:Body +
 result +
 message xsi:type=\xsd:string\Hello World/message +
 /result +
 /SOAP-ENV:Body +
 /SOAP-ENV:Envelope;

KXmlParser parser=new KXmlParser();
parser.setInput((Reader)new StringReader(msg));
   SoapEnvelope soapenvelope= new SoapEnvelope(SoapEnvelope.VER12);
//soapenvelope.parse(parser);
soapenvelope.parseBody(parser);

  }
catch (IOException e) {
   System.out.println(Error reading URI:  + e.getMessage());
} catch (XmlPullParserException e) {
  System.out.println(Error in parsing:  + e.getMessage());
}
  //  String result=parser.getName();
//System.out.println(result);
}
}

Can Any one solve the problem?

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android XML-RPC to JBoss Seam Enterprise Application....cannot Create SOAP Envelope Exception

2009-06-21 Thread Charlie

filteHi Guys,

I am trying to connect to webservices in jboss(using seam) from a
google android phone. So far, I implemented all the necessary beans
and android classes. Unfortunately, I am getting an exception on the
server side after the request is dispatched from the android emulator,
java.lang.IllegalArgumentException: Cannot create SOAP envelope from:
methodCall. I have tried everything I can but to no success. On the
other hand, when I try to connect to the service from SOAP UI,
everything works great. Please if you have any clue, help! Thanks a
lot in advance.

Interface
[code]

package de.iu.soko.web.webservice;

import javax.ejb.Remote;


@Remote
public interface SokoServiceRemote {


public String hello();
}
[/code]


Stateless Web Service Facade
[code]

package de.iu.soko.web.webservice;

import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.security.Identity;

@Stateless
@WebService(name = SokoService, serviceName = SokoService)
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Name(sokoServiceCallHandler)
public class SokoService implements SokoServiceRemote {

@Logger
private Log log;

@In(required=true)
Identity identity;



@WebMethod
public String hello(){

return Hello from a seam component;
}
}

[/code]



standard-ws-config xml file
[code][/code]
jaxws-config xmlns=urn:jboss:jaxws-config:2.0

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:javaee=http://java.sun.com/xml/ns/javaee;

xsi:schemaLocation=urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd

endpoint-config

config-nameSeam WebService Endpoint/config-name

pre-handler-chains

javaee:handler-chain

javaee:protocol-bindings##SOAP11_HTTP
/javaee:protocol-bindings

javaee:handler

javaee:handler-nameSOAP Request 
Handler/javaee:handler-name

javaee:handler-
classorg.jboss.seam.webservice.SOAPRequestHandler
/javaee:handler-class

/javaee:handler

/javaee:handler-chain

/pre-handler-chains

/endpoint-config

/jaxws-config



entries in web.xml

[code][/code]

filter
 filter-nameSeam Context Filter/filter-name
 filter-classorg.jboss.seam.web.ContextFilter/filter-class
  /filter

  filter-mapping
 filter-nameSeam Context Filter/filter-name
 url-pattern/test/url-pattern
  /filter-mapping



servlet-mapping
  servlet-nameAndroidService/servlet-name
  url-pattern/androidService/url-pattern
 /servlet-mapping
 servlet
  servlet-nameAndroidService/servlet-name
  servlet-classde.iu.soko.web.webservice.SokoService/servlet-class
 /servlet



SOAP UI request
[code]
POST http://sylar:8080/soko-web/androidService?wsdl HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: 
User-Agent: Jakarta Commons-HttpClient/3.1
Host: sylar:8080
Content-Length: 219

soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/
envelope/ xmlns:web=http://webservice.web.soko.iu.de/;
   soapenv:Header/
   soapenv:Body
  web:hello/
   /soapenv:Body
/soapenv:Envelope

[/code]




SOAP UI Response
[code]
env:Envelope xmlns:env=http://schemas.xmlsoap.org/soap/envelope/;
   env:Header
  seam:conversationId xmlns:seam=http://www.jboss.org/seam/
webservice21/seam:conversationId
   /env:Header
   env:Body
  web:helloResponse xmlns:web=http://
webservice.web.soko.iu.de/
 returnHello from a seam component/return
  /web:helloResponse
   /env:Body
/env:Envelope

[/code]



The Exception
[code]

java.lang.IllegalArgumentException: Cannot create SOAP envelope from:
methodCall
at org.jboss.ws.core.soap.SOAPEnvelopeImpl.init
(SOAPEnvelopeImpl.java:70)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build
(EnvelopeBuilderDOM.java:124)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build
(EnvelopeBuilderDOM.java:96)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage
(MessageFactoryImpl.java:262)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage
(MessageFactoryImpl.java:185)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest
(RequestHandlerImpl.java:389)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest
(RequestHandlerImpl.java:272)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost
(RequestHandlerImpl.java:189)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest
(RequestHandlerImpl.java:122)
at org.jboss.wsf.stack.jbws.EndpointServlet.service

[android-developers] Re: How to listen for 'Enter Key is press' Event

2009-06-21 Thread 2hill

To get the orange foreground you need to describe the in the xml as
focusable. Then add the corresponding focused drawable. when the user
runs over it the resources will pull the focused drawable. Hope that
helps!

On Jun 21, 1:25 am, n179911 n179...@gmail.com wrote:
 Hi,

 I have a view and setOnClickListener to be my code.
 My code get invoked when I move my mouse to the view and click.
 But how what do i need to register so that it will invoke my code when
 I navigate the focus (using up/down keys) and it has orange foreground
 and press ENTER key?

 Thank you.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: NP API Plugin

2009-06-21 Thread amir

Did you find a solution for this problem?  (adding a plugin to the
browser).

can any one provide some links for examples on how to build a plugin
in android? how to run it with the webkit?

On 10 יוני, 14:30, MIND GAME lovekhanna04...@gmail.com wrote:
 please suggest way to install npapipluginin tobrowseror to be
 loded by web view.
 how to modify the device firmware.

 On May 29, 11:07 pm, Mark Murphy mmur...@commonsware.com wrote:



  Migol wrote:
   Does any know how to install NPplugininto Android'sbrowser?

  You can't install any plugins toBrowser, except by modifying the device
  firmware.

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

  _Android Programming Tutorials_ Version 0.95 Available!-הסתר טקסט מצוטט-

 -הראה טקסט מצוטט-

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Exporting android project as a shared jarfile under Eclipse

2009-06-21 Thread Paul Turchenko

Hi there. I have exactly the same problem. I've tried to ask silimar
question here about a month ago, but noone managed to give me a proper
answer. It seems like google restricts programmers from creating their
own android libraries.

On Jun 20, 10:19 am, nick.titatingmembr...@googlemail.com
nick.titatingmembr...@googlemail.com wrote:
 Hi,

 I've factored out some common code into an Android project, which
 (certainly under Eclipse) is required to have an AndroidManifest.xml.

 If I export this shared code as a jarfile and link it to my main
 project, the Davik compiler gives an error about a duplicate manifest.
 If I don't include the mainifest, Davik gives an error that the
 manifest is missing.

 Any helpful suggestions would be appreciated.

 Nick.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Copy SQL lite Database to Device (and not emulator)

2009-06-21 Thread Georgy

How can I dump my database to make it build on the fly?

BEGIN TRANSACTION;
CREATE TABLE android_metadata (locale TEXT);
INSERT INTO android_metadata VALUES('en_US');
CREATE TABLE 'olddominionuniversity' (_id integer primary key
autoincrement, university text not null, building text not null,
locode text not null);
INSERT INTO olddominionuniversity VALUES(1,'Old Dominion
University','Kaufman Hall','IDEA-7TCL');
INSERT INTO olddominionuniversity VALUES(2,'Old Dominion
University','Perry Library','RE3S-XR5T');
DELETE FROM sqlite_sequence;
INSERT INTO sqlite_sequence VALUES('olddominionuniversity',2);
CREATE TABLE harvarduniversity (
_id INTEGER,
university TEXT,
building TEXT,
locode TEXT
);
INSERT INTO harvarduniversity VALUES('_id','Harvard','Building
1','TBA');
COMMIT;


I tried to put it as a string and execute it but I get all sorts of
error. When I did line by line, it worked, but I am talking bout a
HUGE database

On Jun 21, 1:47 pm, Georgy georgearna...@gmail.com wrote:
 my only way to do it was to dump the database and get the code and
 insert it in the database to build it on the fly just like Burton
 Miller suggested.

 I think this is not the best approach and could slow things down
 tremendously

 On Jun 20, 4:51 pm, burton miller burton.mil...@gmail.com wrote:

  this was not possible in previous versions of the os - maybe it is
  now.

  up until now, you have three options:
  1) build db on the fly
  2) put db in assets, then copy it to db directory when you first run
  (2x space).
  3) install db from internet as a secondary installation

  if things have changed - then i'll rewrite one of my apps!

  On Jun 19, 12:43 pm, Georgy georgearna...@gmail.com wrote:

   Hello

   I have an SQL lite database that I am trying to copy to the device. I
   was able to copy it to the emulator easily using DDMS however with the
   protection in the device, I cannot access the database files from the
   DDMS perspective.

   I read many attempts here but couldn't find an easy solution.

   Is there any way to attach the database (let's say named 'proj') and
   replace the currently created database proj in he device files?

   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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Capture the Android's browser HTTP petitions

2009-06-21 Thread psaltamontes

@Alexey :

What's the meaning of git?

@ Hamy :

¡ I needed this line :) ! - resp.getEntity().writeTo(bao);

I'm sure that the code that you are put help me a lot.

@ Raphael :

I used Google before put my question here.

If you search this -- 
http://www.google.com/search?q=set+proxy+for+android+web+browser

The information that Google found is about change the general/main
proxy, I only want redirect the browser's traffic.

Thank you people.

On 21 jun, 00:56, Raphael r...@android.com wrote:
 On Fri, Jun 19, 2009 at 7:57 AM, psaltamontesmcg2...@gmail.com wrote:

  Yes, I want to say request :), sorry , I need improve my English.

  I don't want my application modify the settings of the browser, the
  idea is that the user configure the proxy of the browser and install
  my application. This application is a service that listen theHTTP
  requests and send to the Internet.

 This might help:
  http://www.google.com/search?q=set+proxy+for+android+web+browser

 R/



  I want capture theHTTPrequest and modify the headers because, in the
  header, I put a number to identify the client that connect to my
  webserver, doing this, the user don't have to put an user name and a
  password. I have written the code to do this, in PC works, but in
  Android I don't know how to get this behaviour.

  How can I do?

  On 18 jun, 21:14, Mark Murphy mmur...@commonsware.com wrote:
   I need capture the Android's browserHTTPpetitions.

  I think you mean request, not petition.

   In PC to capture theHTTPpetitions is easy, I change the browser
   configuration, I put localhost and a port () and it's works. But,
   in Android I don't know how to change the browser configuration.

  I would be rather surprised if they allowed applications to adjust the
  proxy server settings of the browser application. That would be a way for
  spyware to attack the user.

  For the emulator, you can set up a proxy server from outside the emulator
  environment itself:

 http://developer.android.com/guide/developing/tools/emulator.html#proxy

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to listen for 'Enter Key is press' Event

2009-06-21 Thread n179911

Thanks. I would like to know how to listen for 'Enter Pressed' Key
event for my view?


On Sun, Jun 21, 2009 at 6:09 AM, 2hilldead2h...@gmail.com wrote:

 To get the orange foreground you need to describe the in the xml as
 focusable. Then add the corresponding focused drawable. when the user
 runs over it the resources will pull the focused drawable. Hope that
 helps!

 On Jun 21, 1:25 am, n179911 n179...@gmail.com wrote:
 Hi,

 I have a view and setOnClickListener to be my code.
 My code get invoked when I move my mouse to the view and click.
 But how what do i need to register so that it will invoke my code when
 I navigate the focus (using up/down keys) and it has orange foreground
 and press ENTER key?

 Thank you.

 


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] AlertDialog not showing with keyboard closed, sensor on, and in landscape mode

2009-06-21 Thread Ty

Hi, I am having an issue with an alert dialog that does not show when
I am in landscape mode with the physical keyboard closed.  My activity
is set to sensor and when I move it to landscape it works great except
for when I try to show the dialog.

I have walked through all of this and it does the dialog.show without
any errors.  It just does not show it.  If I open the keyboard it
works just fine.

Is there anyway (hack or not) to get around this issue?  If I cannot
get around this issue I will have to turn the sensor off but since I
have a texting app I would rather give my users the ability to type
with the on screen keyboard in landscape mode.

Any help is appreciated.  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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What SensorManager.getOrientation returns?

2009-06-21 Thread yoshitaka tokusho

Thank you for replying, Serge. I have known exactly what api document
says about this method.
But after some times of trial to figure out what it means, finally I
realized values[] is in radian and this is everything what I needed to
know...

On Jun 15, 6:01 pm, sm1 sergemas...@gmail.com wrote:
 It's still June 15. Here's what is in the documentation:

 athttp://developer.android.com/reference/android/hardware/SensorManager...[],
 float[])

 you'll find:

 public static float[] getOrientation (float[] R, float[] values)

 Computes the device's orientation based on the rotation matrix.
 When it returns, the array values is filled with the result:
 values[0]: azimuth, rotation around the Z axis.
 values[1]: pitch, rotation around the X axis.
 values[2]: roll, rotation around the Y axis.
 Parameters
 R       rotation matrix see getRotationMatrix(float[], float[], float[],
 float[]).
 values  an array of 3 floats to hold the result.
 Returns
 The array values passed as argument.

 Regards,
 serge

 On Jun 15, 5:29 pm, yoshitaka tokusho ytoku...@gmail.com wrote:



  Is there no body here, or is my question too silly?

  On Jun 15, 6:53 am, yoshitaka tokusho ytoku...@gmail.com wrote:

   Hi all,

   Simply what I have to suppose SensorManager.getOrientation()'s return
   values are? I expected getOrientation returns yaw/pitch/roll values in
   degrees like SensorEvent dose when callback returned. But all I can
   get is some strenge floating number something about between -3.0 and
   +3.0. Would someone knowledgeable teach me what it is?

   Any help will be so appreciated.- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to listen for 'Enter Key is press' Event

2009-06-21 Thread Ty

Pretty sure you need to override the onKeyDown method

Example:

   @Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_DEL:
case KeyEvent.KEYCODE_ENTER:
 // do some stuff
return true;
}

return super.onKeyDown(keyCode, event);
}


On Jun 21, 2:55 pm, n179911 n179...@gmail.com wrote:
 Thanks. I would like to know how to listen for 'Enter Pressed' Key
 event for my view?

 On Sun, Jun 21, 2009 at 6:09 AM, 2hilldead2h...@gmail.com wrote:

  To get the orange foreground you need to describe the in the xml as
  focusable. Then add the corresponding focused drawable. when the user
  runs over it the resources will pull the focused drawable. Hope that
  helps!

  On Jun 21, 1:25 am, n179911 n179...@gmail.com wrote:
  Hi,

  I have a view and setOnClickListener to be my code.
  My code get invoked when I move my mouse to the view and click.
  But how what do i need to register so that it will invoke my code when
  I navigate the focus (using up/down keys) and it has orange foreground
  and press ENTER key?

  Thank you.


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android Support

2009-06-21 Thread Mr.No

thx :)


On 19 Jun., 17:12, Mark Murphy mmur...@commonsware.com wrote:
  how do i get Support from the Android-Team?

 As an ordinary person, ask questions on these Android Google Groups. The
 core Android team, and other people in the Android community, try to
 answer many of them.

 If you are an employee with an Open Handset Alliance member, you may have
 additional ways to interact with the core Android team, but that would be
 a question for your manager.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Flow or Multiline layout?

2009-06-21 Thread Romain Guy

There's no such layout by default but it's pretty easy to write one.

On Sat, Jun 20, 2009 at 4:41 PM, Sebastiansdelm...@gmail.com wrote:

 Is there a way to do a linear layout with multiple lines?

 I want to lay out a variable set of buttons with variable labels, so
 I'd like to use a layout that works as a simple horizontal
 LinearLayout, but with multiple lines, so the buttons spill into a
 second (or third) line if they don't fit on the first one.

 Something like this:

 [Button 1] [abc] [123] [another]
 [more buttons] [xyz] [one more]

 I looked all over the docs and couldn't find any. Maybe I overlooked
 something, or maybe someone has written an alternative?

 Thanks,
   Sebastian


 




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

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

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



[android-developers] Re: Exporting android project as a shared jarfile under Eclipse

2009-06-21 Thread Streets Of Boston

You can't create shared libraries like that.

You can link your Android's Eclipse project up to 'regular' JARs
(Project build path). When deploying, the classes in these jars will
be 'dalviked' and these classes will be deployed with your app on the
phone.

You can link your Android's Eclipse project to another Android's
Eclipse project. If you deploy the first one, the other one is
deployed automatically (when using Eclipse).

However, you can't create (shared) jars out of Android Eclipse
projects.

On Jun 21, 3:35 pm, Paul Turchenko paul.turche...@gmail.com wrote:
 Hi there. I have exactly the same problem. I've tried to ask silimar
 question here about a month ago, but noone managed to give me a proper
 answer. It seems like google restricts programmers from creating their
 own android libraries.

 On Jun 20, 10:19 am, nick.titatingmembr...@googlemail.com



 nick.titatingmembr...@googlemail.com wrote:
  Hi,

  I've factored out some common code into an Android project, which
  (certainly under Eclipse) is required to have an AndroidManifest.xml.

  If I export this shared code as a jarfile and link it to my main
  project, the Davik compiler gives an error about a duplicate manifest.
  If I don't include the mainifest, Davik gives an error that the
  manifest is missing.

  Any helpful suggestions would be appreciated.

  Nick.- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Intent.FLAG_ACTIVITY_NEW_TASK

2009-06-21 Thread n179911

Hi,

What is the meaning of 'addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);' in
the following code?

Intent  intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(url));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);

I don't see any difference with or without that line of code.

Thank you.

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ANR related to KeyDispatchingTimedOut while running monkey

2009-06-21 Thread sujoydas1...@gmail.com

Hi All,

Can anybody explain to me why do we get ANR with Annotation:
KeyDispatchingTimedOut. From the logcat, I can deduce that the
WindowsManager is sending the keyevent to a particular view. And I am
handling all the potential resource intensive jobs in a child thread.

This ANR occurs while I am running monkey with a throttle value of
300.

I need some insight into KeyDispatchingTimedOut.

Regards,

SD
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: minSdkVersion and real devices

2009-06-21 Thread Raphael

On Sun, Jun 21, 2009 at 1:51 AM, BlackLightblacklight1...@gmail.com wrote:

 Thanks.

 I'm using 1.5_r2. It allows to select only between 1.1 and 1.5. Before
 1.5_r2 I used 1.0_r1 (updated several weeks ago) and I have phone with
 os 1.0.

 Yes they will.
 But if you put version=1 then please be sure to use the SDK for 1.0.

 In other words: please put minSdkVersion to the value matching the
 *actual* SDK you are developing with: 1.1 is version 2 and 1.5 is
 version 3. You can create AVDs/emulators for these versions.

 It means that I must set version to 2 even I don't use any new
 features (just bc I upgraded sdk to 1.5_r2)? I'd like to allow to run
 my app on any phone (1.0, 1.1, 1.5) from market. Please, reply.

I just meant that you should check for yourself that your app works on
a device or emulator running with version 1 before advertising your
app as such. There is no policy to enforce that, it's just common
sense. You can use either your 1.0 device or the emulator from 1.0_r1
to do that.

R/


 


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Does anyone make video recording work at Android 1.5?

2009-06-21 Thread cindy

do you have any simple sample code for video recording?

Thanks!

Cindy
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] sqlite: no such column name SQLITEexception

2009-06-21 Thread Logik

I went through the notepad tutorial to help understand sqlite a bit
better
So now I am trying to utilize what has allready been written for this,
in my
own database


I will actually post my code so someone may be able to pick out what
is wrong

This is the error i get:
06-21 19:57:35.511: ERROR/AndroidRuntime(796): Caused by:
android.database.sqlite.SQLiteException: no such column: name: , while
compiling: SELECT _id, name, description, retailprice, image FROM
products

This is the method its faulting on in Class: DbAdapter
public Cursor fetchAllProducts() {

return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID,
KEY_NAME,
KEY_DESCRIPTION, KEY_RETAILPRICE, KEY_IMAGE}, null,
null, null, null, null);
}

if you think the error is somewhere else, then I can post more later
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sqlite: no such column name SQLITEexception

2009-06-21 Thread Marco Nelissen
As the error message says: you are trying to get a column called 'name', but
there is no such column in your database.

On Sun, Jun 21, 2009 at 6:07 PM, Logik yaros...@gmail.com wrote:


 I went through the notepad tutorial to help understand sqlite a bit
 better
 So now I am trying to utilize what has allready been written for this,
 in my
 own database


 I will actually post my code so someone may be able to pick out what
 is wrong

 This is the error i get:
 06-21 19:57:35.511: ERROR/AndroidRuntime(796): Caused by:
 android.database.sqlite.SQLiteException: no such column: name: , while
 compiling: SELECT _id, name, description, retailprice, image FROM
 products

 This is the method its faulting on in Class: DbAdapter
public Cursor fetchAllProducts() {

return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID,
 KEY_NAME,
KEY_DESCRIPTION, KEY_RETAILPRICE, KEY_IMAGE}, null,
 null, null, null, null);
}

 if you think the error is somewhere else, then I can post more later
 


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Intent.FLAG_ACTIVITY_NEW_TASK

2009-06-21 Thread ylx_presid...@hotmail.com

We can see the use of Intent.FLAG_ACTIVITY_NEW_TASK in intent.java
file:
If set, this activity will become the start of a new task on this
 * history stack.  A task (from the activity that started it to
the
 * next task activity) defines an atomic group of activities that
the
 * user can move to.  Tasks can be moved to the foreground and
background;
 * all of the activities inside of a particular task always remain
in
 * the same order.
If you only have one activity for your task, there will be no
difference; If you have more activities, you will see the difference.

thanks!

On 6月22日, 上午6时50分, n179911 n179...@gmail.com wrote:
 Hi,

 What is the meaning of 'addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);' in
 the following code?

 Intent  intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(url));
 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 context.startActivity(intent);

 I don't see any difference with or without that line of code.

 Thank you.
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] HTC Magic DPAD_CENTER is not working

2009-06-21 Thread shotwave

Hi, I have got a bunch of questions why image capture does not work
with the trackball click on HTC Magic. Here is the code, which works
on G1 phone

private FocusCameraListener1 focusCameraListener1 = new
FocusCameraListener1();
private FocusCameraListener2 focusCameraListener2 = new
FocusCameraListener2();

@Override
public boolean onKeyDown(final int keyCode, final KeyEvent event) {
if (inited) {
if (event.getRepeatCount()  2) {
if (keyCode == KeyEvent.KEYCODE_FOCUS) {
camera.autoFocus(focusCameraListener1);
return true;
} else if (keyCode == KeyEvent.KEYCODE_CAMERA 
|| keyCode ==
KeyEvent.KEYCODE_DPAD_CENTER) {
inited = false;


if (focused) {
capture();
} else {

camera.autoFocus(focusCameraListener2);
}

return true;
}
}
}
return super.onKeyDown(keyCode, event);
}

private class FocusCameraListener1 implements ICameraListener {
@Override
public void onPictureTaken(final byte[] data) {
}

@Override
public void onAutoFocus(final boolean success) {
if (success) {
afView.setImageResource(R.drawable.af);
focused = true;
} else {
afView.setImageBitmap(null);
focused = false;
}
}
}

private class FocusCameraListener2 implements ICameraListener {
@Override
public void onPictureTaken(final byte[] data) {
}

@Override
public void onAutoFocus(final boolean success) {
if (success) {
capture();
}
}
}

Basically what I am trying to do is to use the autofocus feature
whenever possible (if the user pressed the focus key or if the user
pressed the camera key). Once the autofocus was completed successfully
the camera will capture an image.

I am out of ideas what could be wrong here, pls 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: No ringtones in the emulator?

2009-06-21 Thread ylx_presid...@hotmail.com

Start your emulator with -sdcard para, and copy one music to your
vitual sd card. In music, open the music, and set it as ringtone.

This way can add one music to your phone ringtone list. But I never
try add one to Notification Ringtone list.
thanks!

On 6月20日, 上午5时52分, Lukas Zapletal luka...@zapletalovi.com wrote:
 Hello,

 I want to test ringtones of my application if it works in the emulator
 but it seems the emulator has no ringtones provided. I am unable to
 select one - the list in the setting is empty.

 Whats wrong?
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: override AnalogClock

2009-06-21 Thread sunita


Then how to add the second hand to the existing analog clock???

 Also I tried with my drawables but the alignments and position of the
minute and hour hand are not proper.



On Jun 21, 10:18 am, Jeff Sharkey jshar...@android.com wrote:
  Is there any way or workaround so that we can add our custom analog
  clock at the home screen widget?

 You can still customize the clock drawables, but would need to use the
 AnalogClock class as provided by the framework.

 --
 Jeff Sharkey
 jshar...@android.com
--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HTC Magic DPAD_CENTER is not working

2009-06-21 Thread Marco Nelissen
You didn't say what actually goes wrong. Are you not getting the DPAD_CENTER
event at all, is it not repeating the same as on a G1, or something else?
One thing that looks a little suspicious is that in onKeyDown when it
receives DPAD_CENTER, you set 'inited' to false, which would then prevent
you from ever executing any of the other code in onKeyDown again.


On Sun, Jun 21, 2009 at 8:33 PM, shotwave shotw...@gmail.com wrote:


 Hi, I have got a bunch of questions why image capture does not work
 with the trackball click on HTC Magic. Here is the code, which works
 on G1 phone

private FocusCameraListener1 focusCameraListener1 = new
 FocusCameraListener1();
private FocusCameraListener2 focusCameraListener2 = new
 FocusCameraListener2();

@Override
public boolean onKeyDown(final int keyCode, final KeyEvent event) {
if (inited) {
if (event.getRepeatCount()  2) {
if (keyCode == KeyEvent.KEYCODE_FOCUS) {

  camera.autoFocus(focusCameraListener1);
return true;
} else if (keyCode ==
 KeyEvent.KEYCODE_CAMERA || keyCode ==
 KeyEvent.KEYCODE_DPAD_CENTER) {
inited = false;


if (focused) {
capture();
} else {

  camera.autoFocus(focusCameraListener2);
}

return true;
}
}
}
return super.onKeyDown(keyCode, event);
}

private class FocusCameraListener1 implements ICameraListener {
@Override
public void onPictureTaken(final byte[] data) {
}

@Override
public void onAutoFocus(final boolean success) {
if (success) {
afView.setImageResource(R.drawable.af);
focused = true;
} else {
afView.setImageBitmap(null);
focused = false;
}
}
}

private class FocusCameraListener2 implements ICameraListener {
@Override
public void onPictureTaken(final byte[] data) {
}

@Override
public void onAutoFocus(final boolean success) {
if (success) {
capture();
}
}
}

 Basically what I am trying to do is to use the autofocus feature
 whenever possible (if the user pressed the focus key or if the user
 pressed the camera key). Once the autofocus was completed successfully
 the camera will capture an image.

 I am out of ideas what could be wrong here, pls 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Wi Fi connection

2009-06-21 Thread kalyan simhan
hi all..
can anyone please tell me as how to connect to a secured wireless
network programmatically.. im able to detect and list the available
networks but how do i connect to it giving a password.. please help!!
Thanks in advance!

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Parsing SOAP request

2009-06-21 Thread Desu Vinod Kumar
Hi  everyone

i am looking for soap web services in android. my hand also will help to u


actually i need to connect the PHP soap web services in android

i need to get the response from the PHP server and should return it in xml
format.

can any body give me suggestions regarding this

i have tried some small code but it is unexpectedly quiting

if any android runtime errors in log cat is any problem

how can i clear that android runtime errors in log cat what i am getting ...

Here is my code

protected void onCreate(Bundle icicle)
{

super.onCreate(icicle);

// SOAP Request for the FindServiceSOAP.GetRatingInfo web service
String soapRequestXML = ?xml version=\1.0\ encoding=\utf-8\?\n +
soap:Envelope xmlns:soap=\
http://schemas.xmlsoap.org/soap/envelope/\;  +
   xmlns:xsi=\
http://www.w3.org/2001/XMLSchema-instance\;  +
   xmlns:xsd=\
http://www.w3.org/2001/XMLSchema\;\n +
getRating xmlns=\http://tempuri.org\;\n
+
/getRating\n +
  /soap:Body\n +
/soap:Envelope;


String url = http://www.hasdhs.com/ask.php;;
HttpClient client = new HttpClient();

PostMethod postMethod = new PostMethod(url);

 // Construct a SOAP request by hand
StringBuffer request = new StringBuffer();
request.append(soapRequestXML);

postMethod.setRequestBody(request.toString());
postMethod.setRequestHeader(Content-Type,text/xml; charset=utf-8);
postMethod.setRequestHeader(SOAPAction,
 \http://tempuri.org\;);

int statusCode = 0;
try {
statusCode = client.executeMethod(postMethod);
} catch (IOException e) {
Log.d(ReverseGeoCoder, e.toString(), e);
}

 // Parse the SOAP Response
MyContentHandler myContentHandler = new MyContentHandler();
try {
SAXParser parser = SAXParserFactory.newInstance().newSAXParser();

} catch (Exception e) {
Log.d(ISizzle, e.toString(), e);
}

// Display the response details.
List list = myContentHandler.getRating();
String[] items = new String[list.size()];
for (int i = 0; i  list.size(); i++)
{
MyContentHandler.GetRating rating = (MyContentHandler.GetRating)
list.get(i);
}
 // Show the data in the list view
ListView listView = (ListView) findViewById(R.id.data);
listView.setAdapter(new ArrayAdapterString(this,
android.R.layout.simple_list_item_1,
items));
postMethod.releaseConnection();
}

}
thanks in advance

On Sat, Jun 20, 2009 at 8:08 PM, fifi fa.alshah...@gmail.com wrote:


 I would like to parse a soap envelope using KSOAP2 how can  I start   I
 am new and I tried the following code but i couldnot. Also I would
 like to display the parsed elements on the screen?Thanks

 package parsingsteps;

 import java.io.*;
 import org.ksoap2.SoapEnvelope;
 import org.kxml2.io.KXmlParser;
 import org.xmlpull.v1.XmlPullParserException;

 /**
  *
  * @author fa00064
  */
 public class ParsingSteps {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
try{
   // String msg=helloWorld!/hello;
String msg = SOAP-ENV:Envelope  + xmlns:SOAP-ENV=\http://
 www.w3.org/2001/12/soap- envelope\  + xmlns:xsi=\http://www.w3.org/
 2001/XMLSchema-instance http://www.w3.org/%0A2001/XMLSchema-instance\ 
 +xmlns:xsd=\http://www.w3.org/2001/
 XMLSchema\ gt; +
 SOAP-ENV:Body +
 result +
 message xsi:type=\xsd:string\Hello World/message +
 /result +
 /SOAP-ENV:Body +
 /SOAP-ENV:Envelope;


  //  byte[] in= msg.getBytes();

KXmlParser parser=new KXmlParser();
parser.setInput(new StringReader(msg));
   SoapEnvelope soapenvelope= new SoapEnvelope
 (SoapEnvelope.VER12);
//soapenvelope.parse(parser);
soapenvelope.parseBody(parser);


  }
catch (IOException e) {
   System.out.println(Error reading URI:  + e.getMessage
 ());
} catch (XmlPullParserException e) {
  System.out.println(Error in parsing:  + e.getMessage
 ());
}
  //  String result=parser.getName();
//System.out.println(result);
}
 }

 



-- 
Regards
---
Desu Vinod Kumar
vinny.s...@gmail.com
09916009493

--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Wi Fi connection

2009-06-21 Thread Saurav Mukherjee
try this:

Intent i = new Intent(Settings.ACTION_WIFI_SETTINGS);
startActivity(i);

On Mon, Jun 22, 2009 at 10:39 AM, kalyan simhan kalyansim...@gmail.comwrote:

 hi all..
 can anyone please tell me as how to connect to a secured wireless
 network programmatically.. im able to detect and list the available
 networks but how do i connect to it giving a password.. please help!!
 Thanks in advance!

 


--~--~-~--~~~---~--~~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Intent.FLAG_ACTIVITY_NEW_TASK

2009-06-21 Thread Dianne Hackborn
Read here:

http://developer.android.com/guide/topics/fundamentals.html#acttask

(Actually if you haven't, you should read that entire doc.)

On Sun, Jun 21, 2009 at 3:50 PM, n179911 n179...@gmail.com wrote:


 Hi,

 What is the meaning of 'addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);' in
 the following code?

 Intent  intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(url));
 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 context.startActivity(intent);

 I don't see any difference with or without that line of code.

 Thank you.

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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

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



[android-developers] Re: ANR related to KeyDispatchingTimedOut while running monkey

2009-06-21 Thread Dianne Hackborn
You can look at /data/anr/traces.txt to find the stack crawl of you main
thread when the ANR happened.

On Sun, Jun 21, 2009 at 4:26 PM, sujoydas1...@gmail.com 
sujoydas1...@gmail.com wrote:


 Hi All,

 Can anybody explain to me why exactly do we get ANR with Annotation:
 KeyDispatchingTimedOut. I know from the logs, that the WindowsManager
 is sending a keyevent to a View and I am also handling all the
 potential resource intensive jobs in a child thread. If I am correct,
 I think ANR occurs for a keyEvent if the response doesn't occur within
 5 seconds. Do you guys think, something else is going on.

 Below is an excerpt of the logcat:


 

 06-21 17:09:31.617   324   324 I ActivityThread: Publishing provider
 drm: com.android.providers.drm.DrmProvider
 06-21 17:09:31.828   324   324 I ActivityThread: Publishing provider
 media: com.android.providers.media.MediaProvider
 06-21 17:09:32.248   119   119 V BlurEmailEngine: onLowMemory() called
 06-21 17:09:32.539   324   324 V MediaProvider: Attached volume:
 internal
 06-21 17:09:35.48748   107 W WindowManager: Key dispatching timed
 out sending to null
 06-21 17:09:35.51848   107 W WindowManager: Dispatch state:
 {{KeyEvent{action=0 code=82 repeat=0 meta=0 scancode=0 mFlags=8} to
 Window{43ab92a0 com.motorola.blur.alarmclock/
 com.motorola.blur.alarmclock.AlarmClock paused=false} @ 1245622170321
 lw=Window{43ab92a0 com.motorola.blur.alarmclock/
 com.motorola.blur.alarmclock.AlarmClock paused=false}
 lb=android.os.binderpr...@4399c6d8 fin=false gfw=true ed=true tts=0
 wf=false fp=false mcf=Window{43a77c60 com.motorola.blur.alarmclock/
 com.motorola.blur.alarmclock.SetAlarm paused=false}}}
 06-21 17:09:35.51848   107 I WindowManager: focus null mToken is
 null at event dispatch!
 06-21 17:09:35.51848   107 W WindowManager: Current state:
 {{KeyEvent{action=1 code=82 repeat=0 meta=0 scancode=0 mFlags=8} to
 null @ 1245622175520 lw=null lb=null fin=true gfw=true ed=true tts=0
 wf=false fp=false mcf=Window{43a77c60 com.motorola.blur.alarmclock/
 com.motorola.blur.alarmclock.SetAlarm paused=false}}}
 06-21 17:09:35.87948   107 I ActivityManager: ANR (application not
 responding) in process: com.motorola.blur.alarmclock
 06-21 17:09:35.87948   107 I ActivityManager: Annotation:
 keyDispatchingTimedOut
 06-21 17:09:35.87948   107 I ActivityManager: CPU usage:
 06-21 17:09:35.87948   107 I ActivityManager: Load: 5.58 / 2.42 /
 0.92
 06-21 17:09:35.87948   107 I ActivityManager: CPU usage from
 9262ms to 254ms ago:
 06-21 17:09:35.87948   107 I ActivityManager:   system_server: 24%
 = 8% user + 15% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.motorola.blur.alarmclock: 21% = 9% user + 12% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.motorola.blur.service.main: 6% = 2% user + 4% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.android.inputmethod.latin: 6% = 1% user + 4% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.motorola.blur.home: 5% = 2% user + 2% kernel
 06-21 17:09:35.87948   107 I ActivityManager:   adbd: 3% = 0% user
 + 3% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.motorola.atcommand: 3% = 2% user + 0% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.motorola.blur.service.blur: 2% = 1% user + 1% kernel
 06-21 17:09:35.87948   107 I ActivityManager:   com.android.phone:
 2% = 1% user + 1% kernel
 06-21 17:09:35.87948   107 I ActivityManager:   kswapd0: 2% = 0%
 user + 2% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.motorola.android.vvm: 2% = 1% user + 1% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.voxmobili.sync.MobileBackup: 2% = 1% user + 0% kernel
 06-21 17:09:35.87948   107 I ActivityManager:   mediaserver: 1% =
 0% user + 0% kernel
 06-21 17:09:35.87948   107 I ActivityManager:
 com.qo.android.moto: 1% = 0% user + 0% kernel



 **

 I am handling all the key events in a separate thread.

 Regards,

 SD





 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at

[android-developers] Re: running an native app as root

2009-06-21 Thread Dianne Hackborn
You should post such questions on android-porting; this group is for
programming with the SDK,  (That said, if you are really trying to run as
root, it isn't easy -- the system intentionally runs very few things as
root.  The easiest thing to do is implement your code as a shell comment,
and run it from the shell after doing an su.)

On Fri, Jun 19, 2009 at 10:10 AM, Simon simon.joe...@googlemail.com wrote:


 I was trying to run an added native application inside the framework,
 which should be executed by a JNI impl which I included to
 libandroid_runtime. So far so bad.

 I used servial approches to run a command:

 - ret=execl(myapp, myapp , NULL);

 - property_set(ctl.start,myapp)

 I copied myapp to /system/bin/myapp to ensure that it will be in the
 path. But what ever I did it was never executed. I checkt the uid for
 the JNI process wihich is always   system(1000).

 Does anyone know a solution for this problem?

 Greeting Simon

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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

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