[android-developers] Re: ant build wont include jars in libs/

2011-01-14 Thread allstars
oh
it turned out there's a change dex-helper in SDK/tools/ant/
main_rules.xml

I add a line fileset dir=${jar.libs.absolute.dir} includes=*.jar /

inside apply then it works now

sorry for bothering



On Jan 14, 12:00 pm, allstars allstars@gmail.com wrote:
 hi

 in older sdk
 if i build my project with ant
 it will include all the jars in the libs/ folder

 but in the latest sdk (2.3)
 now it cannot
 I try to do 'dexdump' to the classes.dex
 and it didnt include the classes in my jars located in libs/

 what should I do if I need to include jars in libs/ like before

 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] Document databases on Android

2011-01-14 Thread Mattias Svala
Hello!

I have been trying to find some document database that can run on an android 
phone. No luck so far.

I don't need any fancy replicating functionality, just the ability to store 
json documents and query them. Something like a MongoDB Light, if there was 
such a thing. Has anyone on this list seen anything like this running on 
Android?

:.:: mattias

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

Re: [android-developers] Document databases on Android

2011-01-14 Thread Marcin Orlowski
On 14 January 2011 09:38, Mattias Svala thebra...@gmail.com wrote:
 Hello!
 I have been trying to find some document database that can run on an android
 phone. No luck so far.
 I don't need any fancy replicating functionality, just the ability to store
 json documents and query them. Something like a MongoDB Light, if there was
 such a thing. Has anyone on this list seen anything like this running on
 Android?

This is what you have:
http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

Anything else you have to run yourself

-- 
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] Leave crashed app

2011-01-14 Thread lou
Hi !
I'm again here for one question.
Actually I'm programming an application with a lot of activities. For
now, they aren't all finished when the user is going to another.
Consequently, if this application crashes, others open activities
come back to front, and when the user's try to do something in ( click
on a button, for example ), I have some nullpointerexception, again
and again for all these activities.
My question : can we totally clear an application stack when one of
them activities crash?
Else what are best practices to avoid this matter?
Thanks a lot.
Louis C.

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


Re: [android-developers] Document databases on Android

2011-01-14 Thread Mattias Brändström
On Fri, Jan 14, 2011 at 9:46 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

 On 14 January 2011 09:38, Mattias Svala thebra...@gmail.com wrote:
  Hello!
  I have been trying to find some document database that can run on an
 android
  phone. No luck so far.
  I don't need any fancy replicating functionality, just the ability to
 store
  json documents and query them. Something like a MongoDB Light, if there
 was
  such a thing. Has anyone on this list seen anything like this running on
  Android?

 This is what you have:

 http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

 Anything else you have to run yourself


I'm perfectly OK with running something else if I could find something to
run.

:.:: mattias


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


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

Re: [android-developers] Re: Screen rotation with App Widgets loses onClick connection

2011-01-14 Thread Kostya Vasilyev
Each and every update you push to the wigdget with RemoteViews has to have
complete widget state, including all images, text, and pending intents.

There is no onUpdate on configuration changes. The home screen recreates
your widget, then takes the most recent RemoteViews and applies it to the
widget.

If your codes tries to update the widget incrementally, piece-by-piece, with
one RemoteViews specifying the intent, and another, repeated, update setting
some changing information, then you end up with the most recent RemoteViews
only having your changing text, but no PendingIntent.

This is very much unlike how Activities work, where the entire view
hierarchy is kept in memory for as long as the activity is on the screen
(and maybe longer).

-- Kostya

2011/1/14 Anbu anbu.ezhi...@gmail.com

 It is because, the widget becomes unresponsive when the display mode
 is changed from portrait to landscape. I had the same issue and I what
 I had done is for every RemoteView update I had send all the
 pendingintent to make it work

 On Jan 14, 4:26 pm, John Gaby jg...@gabysoft.com wrote:
  I have an App Widget on the Home screen which works fine until the
  screen is auto-rotated.  At that point, the onClick connection (set up
  via a call to setOnClickPendingIntent) is lost.  The only way I seem
  to be able to get it back is to delete the Widget from the Home screen
  and then add it back.  Is there some kind of message that tells me
  that the screen has rotated that I need to respond to (and reestablish
  the connection)?
 
  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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


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

Re: [android-developers] Send EXTRA data via PendingIntent problem.

2011-01-14 Thread Kostya Vasilyev
As far as I can tell, you are using the same appWidgetId for requestCode
when calling PendingIntent.getService.

-- Kostya


2011/1/14 Thirachart Rahong thirach...@gmail.com

 Hi I'm tried to send extra data via PendingIntent. I also got
 EXTRA_WIDGET_MODE value is  1

 What i'm doing wrong?

 This is my code

Intent intent = new Intent(context, UpdateService.class);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
 appWidgetId);
intent.putExtra(BaseConfigurationActivity.EXTRA_WIDGET_MODE,
 2);
// put appWidgetId here or intent will replace an intent of
 another widget
PendingIntent pendingIntent =
 PendingIntent.getService(context, appWidgetId, intent,
 PendingIntent.FLAG_UPDATE_CURRENT);
views.setOnClickPendingIntent(R.id.gridview_button,
 pendingIntent);

intent = new Intent(context, UpdateService.class);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
 appWidgetId);
intent.putExtra(BaseConfigurationActivity.EXTRA_WIDGET_MODE,
 1);
// put appWidgetId here or intent will replace an intent of
 another widget
pendingIntent = PendingIntent.getService(context, appWidgetId,
 intent, PendingIntent.FLAG_UPDATE_CURRENT);
views.setOnClickPendingIntent(R.id.listview_button,
 pendingIntent);

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

-- 
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] Drawables missing on 2.0

2011-01-14 Thread mliu
Hi,

Getting a RuntimeException with nested cause that points to resouce
not being found at path/to/resouce when inflating xml layout that
contains drawables on 2.0 (Testing on emulator, with reported problem
on real 2.0 device as well). When the drawable is removed, the layout
is loaded ok. This is not happening on 1.6, 2.0.1 or 2.2. We are using
2.2 sdk revision 2 to compile and package.

Also, when I look at the installed app in a 2.0 emulator, the app
launcher icon is missing as well. Don't have any special manifest
extras declared or anything. What is causing the missing drawables??

Anyone run into this?

Thanks,
Mike

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


[android-developers] Re: C++ exception support confusion

2011-01-14 Thread Indicator Veritatis
I thought it was pretty clear. What was not clear is how this comes to
be the case.

But nevertheless, I agree with Dave Turner that the wording could
stand some improvement: it is not at all obvious, for example, what he
means by saying on the one hand, that the system does not support
exceptions at all (there is nothing that supports exceptions within
the system), but on the other hand, that it is supported for 1.5+
devices.

Maybe he means that the system has the support, but the matching
libraries do not support it on 1.5 devices?

On Jan 13, 10:00 am, A Curtis ajcurti...@gmail.com wrote:
   support for C++ exceptions and RTTI is not available with Android 1.5 
   system
   images.

  Do you care about devices running Android 1.5 and older?

 It was not clear this was an Android 1.5 and older issue.

 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


Re: [android-developers] Drawables missing on 2.0

2011-01-14 Thread Marcin Orlowski
 Also, when I look at the installed app in a 2.0 emulator, the app
 launcher icon is missing as well. Don't have any special manifest
 extras declared or anything. What is causing the missing drawables??

Show your layout XML

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


Re: [android-developers] Re: Making a file world writeable

2011-01-14 Thread Mark Murphy
On Thu, Jan 13, 2011 at 10:05 PM, John Lussmyer johnlussm...@gmail.com wrote:
 So, all the documentation about making things World Writeable is a flat
 out lie?

No.

MODE_WORLD_WRITEABLE is available for a handful of methods on Context
(e.g., openFileOutput()) and for ParcelFileDescriptor (mostly used by
content providers, AFAIK). Ideally, there would be an equivalent
operation for standard Java file I/O within the area demarcated by
getFilesDir() -- I can only guess as to why setWritable() was dropped.

MODE_WORLD_WRITEABLE on a file is a really bad idea, for the same
security reasons that world-writable files are a bad idea in any
operating system.

Use any of the mechanisms that I outlined in a previous thread of
yours for inter-process communication on Android.

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

Android App Developer Books: http://commonsware.com/books

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


Re: [android-developers] Document databases on Android

2011-01-14 Thread Mark Murphy
On Fri, Jan 14, 2011 at 3:38 AM, Mattias Svala thebra...@gmail.com wrote:
 Hello!
 I have been trying to find some document database that can run on an android
 phone. No luck so far.
 I don't need any fancy replicating functionality, just the ability to store
 json documents and query them. Something like a MongoDB Light, if there was
 such a thing. Has anyone on this list seen anything like this running on
 Android?

CouchDB runs on Android.

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

Android App Developer Books: http://commonsware.com/books

-- 
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] Facebook Wall posting using Android SDK without using the Pop up.

2011-01-14 Thread Ajmer singh
Hi All,

I need to post text and link to the user face book wall,That's without using
an pop up.Currently the example included in the facebook Android SDK does
post to the wall using an WebView pop up.I need to post the same without a
popup.

Please anyone let me know how this can i done this.

-- 
Thanks and Regards
Ajmer Singh

-- 
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: Changing price in the Market

2011-01-14 Thread Russell DuRoss
Yes, I was trying to lower it from 99 cents to 50 cents.

On Jan 13, 8:38 pm, John Lussmyer johnlussm...@gmail.com wrote:
 Were you trying to lower it below $0.99?
 That seems to be the lowest price allowed.
 (Which is kind of annoying.  It's slightly above the whim level for
 purchases.)



 On Thu, Jan 13, 2011 at 5:34 PM, Russell DuRoss r2s...@gmail.com wrote:
  I have tried lowering the price of an app and it wouldn't let me.  I
  have not tried raising the price.- 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] BluetoothAdapter instance issue

2011-01-14 Thread bharath

Hi, I wrote a service for disabling the bluetooth dynamically. when I
try to call
BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter(); its
throwing me the error
java.lang.RuntimeException: Can't create handler inside thread that
has not called Looper.prepare()



Please let me know how can I resolve this issue.


Regards!
Bharath

-- 
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] Conversion to Dalvik format failed with error 1 when using jmDNS.jar

2011-01-14 Thread scott_ggle
Hi,

I hope someone can kindly provide me hint on eclipse error “Conversion
to Dalvik format failed with error 1″. I am building Android
application with an external jar -”jmDNS.jar”.
I have tried reboot and clean build with no help. I tried using
Android 2.3 and 2.2 SDK with latest jmDNS.jar 3.2.2. The later was add
in project as Referenced Libraries.

Thanks in advance.

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] passing object to CountDownTimer help

2011-01-14 Thread kylemac
I have an extended CountDownTimer class and I want to be able to pass
an object (ImageView).

The reason I am wanting to pass the object is because I will be
calling this several times wanting different images to change.

Code:
private void checkStatus() {

getStatus network = new getStatus(5000, 1000, iNetwork);
network.start();

getStatus email = new getStatus(5000, 1000, iEmail);
email.start();
}


public class getStatus extends CountDownTimer{
public getStatus(long millisInFuture, long countDownInterval,
ImageView img) {
super(millisInFuture, countDownInterval);
}

@Override
public void onFinish() {
img.setImageResource(R.drawable.i_green);
}

@Override
public void onTick(long millisUntilFinished) {
img.setImageResource(R.drawable.i_gray);
}
}

I'm getting an error stating that img cannot be resolved in both the
onFinsih() and onTick().

Thoughts?

-- 
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] Appeal to Android users with interest in DNA programming

2011-01-14 Thread Jared Tritz
Hello,

Please check out android app called Voice Your Vote - AHA Biolabs
free for download from the Android Market in the Education Section.

Jared

-- 
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: monkeyrunner - How to simulate long press

2011-01-14 Thread mlove
I found a solution for the press where you can just use lowercase
'down' and 'up' instead of the upper case 'DOWN' and 'UP'

I figured this out by looking at the source code for
MonkeyDevice.java.  Also the code has one bug in it for touch but
recompiled the source into the monkeyrunner.jar so that it works with
lowercase for touch as well.


I have posted the fixed jar here:

http://monkey.mikeloverme.com/monkeyrunner.jar

Hope this helps!

-Mlove


On Jan 4, 7:37 am, mlove mikelove...@gmail.com wrote:
 I am having the same issue.  Any help on the matter would be
 appreciated.

 On Dec 14 2010, 7:38 am, swarup me.s...@gmail.com wrote:



  Hi,
  any clue how to simulate long key press in MonkeyRunner? E.g. Long
  press on HOME key, or long press on list item to invoke context-
  sensitive-menu.
  I was expecting it should happen by the following code or similar
  code:

  device.press('KEYCODE_HOME','DOWN')

  but unfortunately only DOWN press also behaving like DOWN_AND_UP.
  There is no difference between these two.- 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] isFinishing() BadTokenException - very weird !!

2011-01-14 Thread Amico
hey,

I have a very weird behaviour, which I cant find its cause.
the last thing I do on onCreate() is to call a certain method.
in that method i use
**progressDialog = ProgressDialog.show(this, null, Registering with
Moish'd! server, true, false);**.
on the first run i get BadTokenException: Unable to add window on the
_progressDialog_ line.
the second run it passes it.
I read in forums that if the activity is in the middle of finish
process than it might cause such an excetion.
after a long debugging tests, i tried asking for isFinishing().
something odd accoured - before calling the method, **isFinishing()
returns false**.in the first line of the method I ask again and now
**isFinishing() returns true**.
how can it be ?!?  in the last line before entering a method its not
finishing and in the first line of the method its suddenly
finishing, when NOTHING is happening in between (certainly not
calling finish()).  anyone ?!?

-- 
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] Power Control Widget shown when my own Widget is updated by AppWidgetManager

2011-01-14 Thread ChemDroid
Hi,

when I manually update my widget via AppWidgetManager.updateAppWidget
my widget shows the power-control-widget for a short moment as seen in
this screenshot: 
http://forum.xda-developers.com/attachment.php?attachmentid=474576d=1293489008

You can see my sourcecode here: 
http://forum.xda-developers.com/showthread.php?t=890062

I can't see any error in my code, and I really can't find the reason
why the power-control-widget is shown.

Hopefully you can help me ;) Thanks a lot!

Regards,
ChemDroid

-- 
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] Make sure the surfaceView or associated SurfaceHolder has a valid Surface

2011-01-14 Thread Vic
I use OpenGL in LockScreen in android 2.2. When the device run in
LockScreen, it get the following error :
java.lang.IllegalArgumentException: Make sure the surfaceView or
associated SurfaceHolder has a valid Surface...

Does anyone know what's problem causes it? I guess the context of
LockScreen is different from the context of activty, so this reason
causes this problem. But I am not sure.

Thanks for helping

Vic

-- 
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] Solution Found: MyTouch4G ADB

2011-01-14 Thread elmejorpadresito
Hey djb,

I was having the same problem as you were and I found a simple
solution.
Assuming that you have already download the drivers from the Android
SDK
website proceed with the following step by step instructions:

1) Plug in your device and make sure it is not set on tethering (You
will most
likely get the information that it has failed to install properly)
1) Click the Start Button and type Device Manager on the search
box.
2) Open the Device Manager and locate the ADB icon. (It has a yellow
button on it).
3) Right Click on it and select Update Driver Software.
4) Select the Browse Option not Automatic.
5) Select Let me pick from a list of device drivers on my computer.
6) Select Show All Devices.
7) Select Have Disk...
8) Select Browse...
9) Look up for the google-usb_driver tab, select the
android_winusb.inf and press Open
10) Select the OK button. At this point it will warn you that the
driver is not signed,
please proceed to ignore it by selecting the Android ADB Interface
and clicking Next.
Ignore the following Warning(s) and continuing to installing the
driver.
12) And...EUREKA! You may now close the Device Manager and commence
to test your applications by using your MyTouch4G!

I hope it works as well as it did for me, best of luck!

Sincerely,
elmejorpadresito

-- 
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] path problems?

2011-01-14 Thread Boyd Speer
I am just trying to get started in Android development. I have installed 
eclipse, sdk manager, and several platforms, etc, created a virtual device for 
API level 8, etc. but I cannot get the helloworld tutorial to work. - neither 
the programmatic or the xml approach seems to work. the virtual device appears 
but the app never finishes loading. I get errors - 'Bundle URL not found at (a 
path...). The virtual device seems to be ok so my question is how is the 
project supposed to be situated in relation to Java and Android  folders??  
Sorry for such a basic inquiry but I am truly stumped by this...
thanks for any pointers...

B1

-- 
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] is it possible to setup HTC emulator in android sdk?

2011-01-14 Thread milind
hello all

i m new in android developing. and i want to know how to set up HTC
emulator in eclipse workspace.
right now i m using default emulator that provide by android sdk.

if any reference link or tutorial available please send me as
possible.

Thanks
Mind

-- 
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 handle two listviews in my activity

2011-01-14 Thread Ansha
I have two listviews in my activity. Now my problem is that I wanted
to move both of them together and with same distance, and vice
versa(in vertically)...and also i want to scroll the second listview
horizontally with out overlap the first one.
Thanks
Ansha

-- 
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 I can use JTwitter OAuth for my application in Android?

2011-01-14 Thread Arsal
I have searched a lot how to integrated Twitter for my app, I found
some material but it gives an error
I found this material.
http://www.winterwell.com/software/jtwitter/javadoc/winterwell/jtwitter/OAuthSignpostClient.html
And some one post the same error at here!
http://stackoverflow.com/questions/3200505
Can any one please help me. I will be thankful to you, if any one can
give a perfect example link of code, etc for Twitter in android
application. 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: Help me on AsyncTask

2011-01-14 Thread Jimmy hautelook
I'm guessing that you've restarted your async task again when you
clicked back.  If your intention was to run it again, make sure you
create a new instance every time.  Each instance of AsyncTask can only
be executed once.  if you executed more than once, you'll get an
exception.  Example:

# this is OK, because you are calling execute() on a new instance
every time

  public class MyActivity extends Activity {

 @Override
 public void onCreate(Bundle savedInstanceState) {
 new LongOperation.execute();
 }
  }



# this is NOT OK, because you are calling multiple execute() on the
same instance.

  public class MyActivity extends Activity {

 LongOperation task = new LongOperation();

 @Override
 public void onCreate(Bundle savedInstanceState) {
 task.execute(); // on click back or orientation change,
exception will occure
 }
  }


if you only want to run it once per activity, i would probably just
set a static variable flag within the the activity to check against
ever time when the AsyncTask is called. something like,


  public class MyActivity extends Activity {

 static Boolean flag=true;

 @Override
 public void onCreate(Bundle savedInstanceState) {
  if(flag) {
   new LongOperation.execute();
   flag= false;
  }
 }
  }

when you call finish() to destroy the activity, the flag will get
wiped out as well.  so the next time you start the same activity,
asynctask will executed again.


now, if you only want to run it once per application startup, you can
use the same strategy but save the static flag in your own
implementation of the application class.





On Jan 4, 2:18 am, Mystique joven.ch...@gmail.com wrote:
 Hi,

 I am doing someAsyncTaskthing and seems to work ok and after that I
 open another intent to display a listview.
 The thing is, if the user press the back key, it return to the caller
 intent showing the progress dialog and seems to be hanging there until
 it crash. What did I do wrong? I already do a dialog.dismiss()
 onPostExecute().

 Please help me out.

 Many thanks,
 CJ

     private class LongOperation extendsAsyncTaskString, Void,
 String {
         ProgressDialog dialog;

         @Override
         protected String doInBackground(String... params) {
                 // download something from the net and processing it.
                 // work perfectly
                 return null;
         }

         @Override
         protected void onPostExecute(String result) {
                 // execution of result of Long time consuming operation
                 // some processing from the information taken from the
 internet (doInBackground)
                 if (dialog.isShowing()) {
                 dialog.dismiss();
             }
         }

         /* (non-Javadoc)
          * @see android.os.AsyncTask#onPreExecute()
          */
         @Override
         protected void onPreExecute() {
         // Things to be done before execution of long running operation.
 For example showing ProgessDialog
                 dialog = ProgressDialog.show(Main.this, ,
                     Receiving data, true);
         }

         @Override
         protected void onProgressUpdate(Void... values) {
           // Things to be done while execution of long running
 operation is in progress. For example updating ProgessDialog
          }
     }

-- 
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] [Q] Question about Android basic that's a bit more about hardware than software

2011-01-14 Thread Kasch Litai
I am having a bit of confusion regarding the function of RAM and ROM
within the Android machine. For reference, I'll pick my phone, a
Motorola Droid (original), though I guess the question applies to all
Android machines.

I am trying to write an article on how Android memory is used, (and
once and for all what should we think about CompCache and Swap)  The
prototype is here:

http://forum.xda-developers.com/showthread.php?t=897823

I believe this thing is riddled with major technical errors, but I
can't find the actual information. My Google-fu is weak. I would
appreciate a technical review if any one want to comment there. In the
meanwhile, here's a few related questions.

According to Motorola specs on Motodev, it has 512MB of ROM, and 256MB
of RAM. From Eneas, I found the boot process explained (
http://www.androidenea.com/2009/06/android-boot-process-from-power-on.html
)

I guess my question is what exactly happens when Android loads a
program? And what's the ROM loaded with?

In the 512MB ROM, is 256MB ROM loaded with boot stuff and system
stuff, and the other 256MB for app storage? (Is that what DiskUsage
app sees?)

How do I read what's in RAM itself? I have CM612 loaded and I have
terminal so I can see Busybox output. Free doesn't tell me very
much. I can do ADB. Which rooted app tells me more? I tried both
AutoKiller and Auto Memory Manager, and they give very similar
outputs, but I'm not quite understanding them under processes.

What exactly is that free memory under Advanced Task Killer? (ATK
Froyo by ReChild)  It doesn't agree with the numbers I find under
free in Busybox.

How do I interpret that little bar graph at the bottom of Manage
Services? I figured red is system like gapps, acore, and so on, but
what is yellow and green? Is green the services and apps that can be
killed?

Can compcache and swap be activated together? Or are they mutually
exclusive?

Just how efficient is compcache?

Sorry for the messy questions. I seems there is no consensus on task
killers, compcache and swap. A lot of this stuff seem to be related by
anecdotes instead of actual technical info. 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: Amazon to Policy Android Market Place

2011-01-14 Thread SoftWyer
I agree with Phil, pricing is a key issue.

Furthermore, unless Amazon can get their app pre-installed onto devices, 
then it's going to be limited.  After all, not many people will know to go 
to the Market app to download another market app.

Also, I hope they don't make the mistake Apple just made with the crApp 
store for Macs.  You have to enter your credit card details to download free 
apps, no 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] REQUEST

2011-01-14 Thread Harshit Agrawal
HELLO SIR/MADAM

I am new in android. Please send me the complete code to get the row number
when I click on a item in LISTVIEW.


WITH REGARDS:
HARSHIT AGRAWAL

-- 
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: Camera picture taking memory error

2011-01-14 Thread Robert
Bumping again

I have the same issue... Looking at the JNI-layer both the
picturetaken and previewframe callbacks seem to end up running

JNICameraContext::copyAndPost

And that uses the size and buffer set by the call to
addCallbackBuffer Setting a large enough buffer able to hold both
preview-frames and encoded pictures solves the problem
You will only see the problem if the preview-frames are smaller than
an encoded picture... In my case I have a preview of 640x480 and 16bpp
-- 614400bytes the encoded pictures are roughly 1Mb ... -- No
callback!

Since one can never know how big the encoded pictures are (you can
only calculate an upper limit, if you expect the encoded image to be
smaller than RAW format)... So if you have a picture size of 8MPixels
and 24bit colors, you need to actually have 24MiB buffers allocated to
be sure overkill!

I really think that we should have two different methods to set
preview callback buffers and picture callback buffers.

i.e.
add: addPreviewCallbackBuffer and addPictureCallbackBuffer
deprecate: addCallbackBuffer

I also think that if the buffers are too small the JNI layer should
fallback to the old allocation-mode, print a warning, and return the
buffer anyway! Not discard it.

Regards // Robert

On Dec 14 2010, 11:14 pm, Stephen Lebed srle...@gmail.com wrote:
 In the app I'm working on, I'm using Camera.addCallbackBuffer and
 Camera.setPreviewCallbackWithBuffer to control the camera preview.
 BTW, this has been one of the best fixes in Froyo yet!  No more GC
 anymore!

 I'm trying to take a picture, and sometimes it works, saving the image
 to the sd card, and sometimes it doesn't.  When it doesn't work, the
 preview is frozen, but the app is still running.  For instance, I can
 still call up the menu. So its not locking up the app at all.  I've
 tracked it down to a memory allocation issue I believe.  It seems that
 the camera is using the buffers from the preview to store the picture
 data.  I could be wrong about this.  I've upped the memory buffers
 used in the addCallbackBuffer, and it seems it fix the problem, but
 shouldn't there be a seperate buffer for the snapped picture data?

 Is there a way to allocate a buffer for the Camera.takePictureCallback
 routine to store the data into?
 Is there a better way to make sure the Camera has enough memory to use
 the addCallbackBuffers and take a full size photo?
 Is anyone else experiencing this problem using the camera preview
 buffers and taking a full size picture?

 Any help is greatly appreciated.

 Best,
 Stephen Lebed
 Developer of 'On The Level' and 'SL DigiSlate'

-- 
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] TableLayout TableRows do not fit into screen. ImageView auto scaling.

2011-01-14 Thread Vadim Vohmjanin
Hi.

I have a problem. I want to create a TableLayout, with 7 TableRows.
Each TableRow contain 4 ImageViews in it in one row.

Problem is for now, i have only 4 TableRows drawn with ImageViews in
it. The last one 5th TableRow is shrinked to fit the space on the
screen that has left after drawing first 4 TableRows. 6th and 7th
TableRows are not drawn at all, since there is no space for them on
the screen left.

Question is: Is it possible to make ImageViews being auto scalable ,
so that all TableRows fit into screen.
Or make TableRows shrinkable, so that all TableRow heights are being
equal, so they all fit into the screen.
And then ImageViews fill in the table row.


?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=horizontal 

TableLayout android:id=@+id/TableLayout01
android:layout_height=fill_parent android:layout_width=fill_parent
android:shrinkColumns=* android:layout_marginLeft=8dp
android:hapticFeedbackEnabled=false android:longClickable=true
TableRow android:id=@+id/TableRow01
android:layout_height=match_parent
android:layout_width=wrap_content
ImageView android:id=@+id/image1 
android:background=@drawable/
a001
ImageView android:id=@+id/image2 
android:background=@drawable/
a002
ImageView android:id=@+id/image3 
android:background=@drawable/
a003
ImageView android:id=@+id/image4 
android:background=@drawable/
a004/ImageView
/TableRowTableRow android:layout_height=match_parent
android:layout_width=wrap_content android:id=@+id/TableRow02
ImageView android:id=@+id/image1 
android:background=@drawable/
a001
ImageView android:id=@+id/image2 
android:background=@drawable/
a002
ImageView android:id=@+id/image3 
android:background=@drawable/
a003
ImageView android:id=@+id/image4 
android:background=@drawable/
a004/ImageView
/TableRowTableRow android:layout_height=match_parent
android:layout_width=wrap_content android:id=@+id/TableRow03
ImageView android:id=@+id/image1 
android:background=@drawable/
a001
ImageView android:id=@+id/image2 
android:background=@drawable/
a002
ImageView android:id=@+id/image3 
android:background=@drawable/
a003
ImageView android:id=@+id/image4 
android:background=@drawable/
a004/ImageView
/TableRowTableRow android:layout_height=match_parent
android:layout_width=wrap_content android:id=@+id/TableRow04
ImageView android:id=@+id/image1 
android:background=@drawable/
a001
ImageView android:id=@+id/image2 
android:background=@drawable/
a002
ImageView android:id=@+id/image3 
android:background=@drawable/
a003
ImageView android:id=@+id/image4 
android:background=@drawable/
a004/ImageView
/TableRowTableRow android:layout_height=match_parent
android:layout_width=wrap_content android:id=@+id/TableRow05
ImageView android:id=@+id/image1 
android:background=@drawable/
a001
ImageView android:id=@+id/image2 
android:background=@drawable/
a002
ImageView android:id=@+id/image3 
android:background=@drawable/
a003
ImageView android:id=@+id/image4 
android:background=@drawable/
a004/ImageView
/TableRowTableRow android:layout_height=match_parent
android:layout_width=wrap_content android:id=@+id/TableRow06
ImageView android:id=@+id/image1 
android:background=@drawable/
a001
ImageView android:id=@+id/image2 
android:background=@drawable/
a002
ImageView android:id=@+id/image3 
android:background=@drawable/
a003
ImageView android:id=@+id/image4 
android:background=@drawable/
a004/ImageView
/TableRowTableRow android:layout_height=match_parent
android:layout_width=wrap_content android:id=@+id/TableRow07
ImageView android:id=@+id/image1 
android:background=@drawable/
a001
ImageView android:id=@+id/image2 
android:background=@drawable/
a002
ImageView android:id=@+id/image3 
android:background=@drawable/
a003
ImageView android:id=@+id/image4 
android:background=@drawable/
a004/ImageView
/TableRow
/TableLayout
/LinearLayout

-- 
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] Widget - NO API to find out Widget is in Foreground or Background. Any other Alternative API's to achieve this Functionality

2011-01-14 Thread Sam CR
How to find out Widget is in Foreground or Background. Anybody help me
how to find out when Widget is in Foreground or Background. As per my
knowledge there is NO API.

Please give some alternative approach to achieve this functionality.

Thanks in advance.

Sam CR

-- 
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 get Contact information in array

2011-01-14 Thread Arsalan
Im new to android development, im trying to retrieve contact list with
there name and phone numbers.i try following code :

 // Get a cursor over every contact.
  Cursor cursor = getContentResolver().query(People.CONTENT_URI,null,
null, null, null);
   // Let the activity manage the cursor lifecycle.
 startManagingCursor(cursor);
 // Use the convenience properties to get the index of the
columns
  int nameIdx = cursor.getColumnIndexOrThrow(People.NAME);
 int phoneIdx = cursor. getColumnIndexOrThrow(People.NUMBER);
String[] result = new String[cursor.getCount()];
  if (cursor.moveToFirst())
do {
   // Extract the name.
   String name = cursor.getString(nameIdx);
// Extract the phone number.
   String phone = cursor.getString(phoneIdx);
  result[cursor.getPosition()] = name + - + +  phone;
 } while(cursor.moveToNext());


this code should return an array with the all contacts name and its
phone number but this only return name of the contact and return NULL
in phone number,

Example Output:

 John - null

Please help me in this regards thats whats wrong in this code. Any
help in this regards will highly apreaciated, and its urgent 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] Grab phonebook-contacts via ContactsContract-API

2011-01-14 Thread L0rdAli3n
Hey,

I'm totally stuck with the ContactsContract-API. Point is that I want
only mess around with the Contacts saved in the local phonebook. But
it seems that every vendor but its own account_type for those
contacts.
And its even worse. The AccountManager isn't even aware of all
account_types?!?
For example on my HTC Desire with HTC Sense, the account_type all
local contacts are saved in is: com.htc.android.pcsc. But when I grab
a list of all available accounts from the AccountManager: This account
is not in the list!?
I also tested it on a Samsung Galaxy. Same here: The AccountManager is
not aware of the account_type used for local phonebookcontacts.

The whole story is that I wan't to write a app to sync my locale
phonebook with OpenXchange.

I guess I got that whole new ContactsContract-API wrong, but I don't
see any other way, then using RawContacts. Due to that I have to care
about the account_type, which is in fact a total mess.

Hopefully someone can point me in the right direction. Every hint is
highly appreciated.

-- 
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] Null Pointer Exception

2011-01-14 Thread sharad kumar
Hi,
I'm facing a problem with the Intent Null Pointer Exception
firstly i have Started first activity then second activity when i want
to come back to the second activity it's give the  Null Pointer
Exception ..
My First activity is

Intent screenIntent = new Intent(Main.this, TabHome.class);
screenIntent.setFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
startActivity(screenIntent);

Second is
Intent screencall = new Intent(ScreenAV.this, TabHome.class);
screencall.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(screencall);
finish();

-- 
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] Can I play a AAC strem which is in a FLV container?

2011-01-14 Thread Hari KJ
Hi,

I'm trying to build a radio player and the client is providing a
stream which is a FLV container with the audio being AAC

When I read the headers it shows up as audio/aacp.

I have tried all possible ways such as using the

1) Streaming through mediaplayer (Does not work)

2) Use the NPR mode of using a proxy stream (I get a broken pipe
exception)

3) Play it in chunks ( Plays but I need the SDCard and the playback is
not very great)

4) Use the GPL'd FAAD2 Library but I would have to pay the royalty fee

Can some one help me out on figuring this issue out.

The last option that I have is to have my client change the stream to
mp3 container (which I know that it works)

Regards,
Hari

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


Re: [android-developers] Conversion to Dalvik format failed with error 1 when using jmDNS.jar

2011-01-14 Thread Kumar Bibek
I guess, JMDNS uses a lot of classes in the javax package, that you would
not be able to compile with Android.

If you want to use only the JMDNS specific stuff, you can extract those
classes and add it to your project. That worked for me.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Fri, Jan 7, 2011 at 12:31 AM, scott_ggle sch...@comcast.net wrote:

 Hi,

 I hope someone can kindly provide me hint on eclipse error “Conversion
 to Dalvik format failed with error 1″. I am building Android
 application with an external jar -”jmDNS.jar”.
 I have tried reboot and clean build with no help. I tried using
 Android 2.3 and 2.2 SDK with latest jmDNS.jar 3.2.2. The later was add
 in project as Referenced Libraries.

 Thanks in advance.

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

-- 
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: Need help for Bluetooth Opp transfer broadcast messages

2011-01-14 Thread Ash
This is the code you are looking for. Browse through the code try to
figure-out which all events are useful for you.



http://codesearch.google.com/codesearch/p?hl=en#wr7bgCAJgcM/trunk/eclair/packages/apps/Bluetooth/src/com/android/bluetooth/opp/BluetoothOppNotification.javaq=android%20bluetooth%20clientoperationd=10

http://android.git.kernel.org/?p=platform/packages/apps/Bluetooth.git;a=tree;f=src/com/android/bluetooth/opp;h=52565989fbef04fd51d4c9332e48ca5c2a476f8e;hb=HEAD


On Jan 6, 2:50 pm, Suresh Chandra Pal sureshchandra...@gmail.com
wrote:
 Guys,

 I am still looking for some suggestion. Please help me out.

 On Tue, Jan 4, 2011 at 12:00 PM, Suresh Pal sureshchandra...@gmail.comwrote:









  Hi All,
  I am working on an application using bluetooth. I want to listen some
  events related to OPP receiving and sending.
  My main motive is to launch some application, when any file is
  received using bluetooth and want information of received file. I know
  for this OPP profile is used. So, I want to know whether there is any
  broadcast message, which is used to listen following bluetooth events:
  1. Start of File transfer using OPP
  2. Progress Information
  3. Completion of File Transfer
  4. Information related to received file.

  Please help me in this and let me know if above is not clear fully.

  Thanks,
  Suresh Pal
  LinkedIn:          http://www.linkedin.com/in/sapientsuresh
  Blogs:                http://www.sapientsuresh.blogspot.com
  Google Profile:  http://www.google.com/profiles/sapient.suresh

 --
 Thanks,
 Suresh Pal
 LinkedIn:          http://www.linkedin.com/in/sapientsuresh
 Blogs:                http://www.sapientsuresh.blogspot.com
 Google Profile:  http://www.google.com/profiles/sapient.suresh

-- 
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 access certificate from inside app

2011-01-14 Thread Yan Chen
Hi All,
I m trying to access an app's signature/certificate from it's inside,
so that when it runs, it can verify itself/do something with the
certificate.
I googled a bit, and found some code bellow:

Class c =  getClass();
ProtectionDomain pd = c.getProtectionDomain();
CodeSource cs = pd.getCodeSource();
Certificate[] signingCertificates = cs.getCertificates();
String st = signingCertificates[0].toString();

but here c.getProtectionDomain() returns null.

any other way to do it? Many 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] Accesing RILD without recompiling the whole Framework and OS image

2011-01-14 Thread Sebastian Ganame
Hi Dev Team,
 I would like to know if there's any way I can access the RILD
(for sending AT commands directly to the modem), even from outside the
Android Java Stack. I know that Phone Framework internal class would
give me access to do so, but of course we don't have access to it from
the SDK, then that's not a chance.
 However, if the RILD is the only one that communicates to the
radio, I was thinking that probably I can do that from outside the
Android Stack, going directly to the RIL daemon from a C++ application
perhaps.
 What I need is not to control SIM or place calls, but need
advance detailed radio parameters that the API is not exposing, and
are only retrievable thru AT Commands to radio.
 Regards,

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] Re: Need help for Bluetooth Opp transfer broadcast messages

2011-01-14 Thread Ash
This is the code you are looking for. Browse through the code try to
figure-out which all events are useful for you.



http://codesearch.google.com/codesearch/p?hl=en#wr7bgCAJgcM/trunk/eclair/packages/apps/Bluetooth/src/com/android/bluetooth/opp/BluetoothOppNotification.javaq=android%20bluetooth%20clientoperationd=10

http://android.git.kernel.org/?p=platform/packages/apps/Bluetooth.git;a=tree;f=src/com/android/bluetooth/opp;h=52565989fbef04fd51d4c9332e48ca5c2a476f8e;hb=HEAD


On Jan 6, 2:50 pm, Suresh Chandra Pal sureshchandra...@gmail.com
wrote:
 Guys,

 I am still looking for some suggestion. Please help me out.

 On Tue, Jan 4, 2011 at 12:00 PM, Suresh Pal sureshchandra...@gmail.comwrote:









  Hi All,
  I am working on an application using bluetooth. I want to listen some
  events related to OPP receiving and sending.
  My main motive is to launch some application, when any file is
  received using bluetooth and want information of received file. I know
  for this OPP profile is used. So, I want to know whether there is any
  broadcast message, which is used to listen following bluetooth events:
  1. Start of File transfer using OPP
  2. Progress Information
  3. Completion of File Transfer
  4. Information related to received file.

  Please help me in this and let me know if above is not clear fully.

  Thanks,
  Suresh Pal
  LinkedIn:          http://www.linkedin.com/in/sapientsuresh
  Blogs:                http://www.sapientsuresh.blogspot.com
  Google Profile:  http://www.google.com/profiles/sapient.suresh

 --
 Thanks,
 Suresh Pal
 LinkedIn:          http://www.linkedin.com/in/sapientsuresh
 Blogs:                http://www.sapientsuresh.blogspot.com
 Google Profile:  http://www.google.com/profiles/sapient.suresh

-- 
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: Media player problems with android 2.3 (gingerbread), I can't open a service connection....

2011-01-14 Thread Dennix
I'm also facing this problem with gingerbread. I created a costumized
music widget and I use that service to control music and get track
infos.
It works fine on 2.1 and 2.2 because the service
com.android.music.MediaPlaybackService is exported.

See manifest file in sorce code.
---
Froyo
  :
service android:name=com.android.music.MediaPlaybackService
android:exported=true /
 :
-
Gingerbread
:
service android:name=com.android.music.MediaPlaybackService
android:exported=false /
:
---

I don't want to make a new music playback service.
So, android team, is it possible another app use that service??

//Dennix

On 21 dez 2010, 06:38, Jaumard jimmy.aum...@gmail.com wrote:
 There is no way to do this in gingerbread?

 On 20 déc, 21:51, Mark Murphy mmur...@commonsware.com wrote:

  Please understand that this is not part of the Android SDK. According
  to the source code, it is not exported, and therefore is not available
  outside of its process.

  On Mon, Dec 20, 2010 at 3:43 PM, neuromit stuart.lay...@gmail.com wrote:
   I'm trying to setup a service connection to control the stock android
   media player. This works great under 2.1 and 2.2. However, when I
   tried to run my application on the 2.3 emulator my application crashes
   and I get the following error:

   ERROR/AndroidRuntime(466): Caused by: java.lang.SecurityException: Not
   allowed to bind to service Intent
   {cmp=com.android.music/.MediaPlaybackService }

   Have the permissions to bind to the IMediaServiceConnetion been
   revoked for gingerbread?

   Here is the code I'm running from my class that is a child of
   ServiceConnection

   Intent i = new Intent();
   i.setClassName(com.android.music,
   com.android.music.MediaPlaybackService);
   a.bindService(i, (ServiceConnection) this, 0);

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

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
  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] Another SMS Android problem

2011-01-14 Thread Thiago Mouço
I dont know english and i'm not developer too.
I'll try to pass my problem.

I received yesterday a sms from a friend but this sms was associated
with another contact (the text was correct). But that's just in the
notification.
when i opened the sms he appeared normal: text + sender.

It's the first time this happens.

I hope help you to fix the problems of Android.

And please... honeycomb fast here in Brazil. Attencion here please. I
still waiting Froyo here. =P

-- 
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: Media player problems with android 2.3 (gingerbread), I can't open a service connection....

2011-01-14 Thread Dennix
I'm also facing this problem. I created a costumized music widget and
I use that service to control music and get track infos.
It works fine on 2.1 and 2.2, but on 2.3 I can't bind to that service
because it's not exported

Looking manifest file in souce code I found:

--
Froyo
:
service android:name=com.android.music.MediaPlaybackService
android:exported=true /
:
--
Gingerbread
:
service android:name=com.android.music.MediaPlaybackService
android:exported=false /
:
--

So, android team, is it possible use that service?
I wouldn't like to create another playback service to my widget.

//Dennis



On 21 dez 2010, 06:38, Jaumard jimmy.aum...@gmail.com wrote:
 There is no way to do this in gingerbread?

 On 20 déc, 21:51, Mark Murphy mmur...@commonsware.com wrote:

  Please understand that this is not part of the Android SDK. According
  to the source code, it is not exported, and therefore is not available
  outside of its process.

  On Mon, Dec 20, 2010 at 3:43 PM, neuromit stuart.lay...@gmail.com wrote:
   I'm trying to setup a service connection to control the stock android
   media player. This works great under 2.1 and 2.2. However, when I
   tried to run my application on the 2.3 emulator my application crashes
   and I get the following error:

   ERROR/AndroidRuntime(466): Caused by: java.lang.SecurityException: Not
   allowed to bind to service Intent
   {cmp=com.android.music/.MediaPlaybackService }

   Have the permissions to bind to the IMediaServiceConnetion been
   revoked for gingerbread?

   Here is the code I'm running from my class that is a child of
   ServiceConnection

   Intent i = new Intent();
   i.setClassName(com.android.music,
   com.android.music.MediaPlaybackService);
   a.bindService(i, (ServiceConnection) this, 0);

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

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
  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] Debugging a Widget causes ANR

2011-01-14 Thread Salv0
Hi all :)
I'm trying to debug an AppWidget but I incurred in a problem :D If not
setting the breakpoint the widget works good without ANR and the
commands Log.v are executed flawlessly. Then I placed a breakpoint on
the top of the following method:

public void onReceive(Context context, Intent intent) {
Log.v(TAG, onReceive 1); // BP on this line
super.onReceive(context, intent);
String action = intent.getAction();

// Checks on action and computations ...

Log.v(TAG, onReceive 2);
updateWidget(context);
Log.v(TAG, onReceive 3);
}

The breakpoint stops the execution as expected but then the process
dies. The problem is that the breakpoint ( I guess xD ) cause an ANR
and the ActivityManager kills the process. That's the Log:

01-07 14:32:38.886: ERROR/ActivityManager(72): ANR in
com.salvo.wifiwidget
01-07 14:32:38.886: INFO/Process(72): Sending signal. PID: 475 SIG: 9
..
..
01-07 14:32:38.906: INFO/ActivityManager(72): Process
com.salvo.wifiwidget (pid   475) has died.

This cause the debug to stop. So the question is: there's a way to
debug the widget without incurring in the ANR?? thanks in advance for
the answers

-- 
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: Scrolling in HorizontalScrollView

2011-01-14 Thread prudhvi

http://www.codeshogun.com/blog/2009/04/16/how-to-implement-swipe-action-in-android/

theres a builtin widget called viewflipper.. could be usefull a lot.


On Dec 7 2010, 4:42 am, Arjun arjunf...@gmail.com wrote:
 Greetings,

 I have a linear layout inside a horizontal scroll view.  linear layout
 has n number of images.

 I am facing problem with horizontal scrolling, As soon as the user
 flings, depending upon the velocity the scroll view scrolls. But my
 requirement differs with the default horizontal scroll view
 scrolling.  My requirement is whatever may be the fling velocity
 user has to be shown the next three images depending upon the fling
 direction

 Hence I have extended Horizontal scroll view and override fling, such
 that I can scroll to the next three images, by specifying the number
 of pixels it should move horizontally using scrollTo(px,px);

 The above operation is not giving the expected behavior. Any thoughts
 on this would be really helpful.

 Thanks,
 Arjun.

-- 
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] got java.util.zip.ZipException: duplicate entry: com/.copyarea.db error when build

2011-01-14 Thread Makson Lee
Hi All,

for some reason we use IBM Rational ClearCase as our version control
tool, and it put a system file named .copyarea.db into each
directory of Android codebase, could someone tell me how to make
Android build system to ingore this file to avoid the following build
error?

target thumb C: dsprofile_get_3gpp_profiles = vendor/qcom/proprietary/
data/tests/ds_profile/src/dsprofile_get_3gpp_profiles.c
target thumb C: libdsprofile = vendor/qcom/proprietary/data/
ds_profile/src/ds_profile.c
target thumb C: libdsprofile = vendor/qcom/proprietary/data/
ds_profile/src/ds_profile_3gpp2.c
target thumb C: libdsprofile = vendor/qcom/proprietary/data/
ds_profile/src/ds_profile_3gpp2_qmi.c
target thumb C: libdsprofile = vendor/qcom/proprietary/data/
ds_profile/src/ds_profile_3gpp.c
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
java.util.zip.ZipException: duplicate entry: com/.copyarea.db
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:
163)
at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:
90)
at sun.tools.jar.Main.addFile(Main.java:608)
at sun.tools.jar.Main.create(Main.java:412)
at sun.tools.jar.Main.run(Main.java:142)
at sun.tools.jar.Main.main(Main.java:903)
make: *** [out/host/common/obj/JAVA_LIBRARIES/emmalib_intermediates/
javalib.jar] Error 1
make: *** Deleting file `out/host/common/obj/JAVA_LIBRARIES/
emmalib_intermediates/javalib.jar'
make: *** Waiting for unfinished jobs

-- 
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] H264 live streaming error on specific devices

2011-01-14 Thread John Lauser
Hello all,

Thanks in advance for any help you can provide.

Our application has a live video component that we use to stream our
TV channel. While testing on the Samsung Transform, I noticed that
when calling the live stream the audio can be heard but the video
never shows. When calling the stream from a gen 1 droid or DroidX,
everything works fine and both the audio and video play correctly . I
hooked the transform up to DDMS and noticed the following error
repeated about every second...

ERROR/PVOMXVidDecNode : Ln 1541 OMX_EventError nData1 -2147479541
nData2 0

The device details are:
Samsung Transform
Android OS: 2.1-update1
Build: ECLAIR.DI11

The live stream details:
H264 Baseline w/ AAC Audio 16kbps sample rate 44.1khz

Is the video decoder error specific to the device's capabilities or
could the way we have the h264 stream set up cause it? Both of the
droid devices that play it fine are running 2.2 if that helps at all.

Thanks again

John


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


Re: [android-developers] How to get Contact information in array

2011-01-14 Thread Kumar Bibek
Either you are not using the right column, or you don't have any phone
number for John.

Morever, this class is deprecated, and it might not work properly on
emulators/devices beyond 1.5. Use ContactsContract instead.
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Fri, Jan 7, 2011 at 3:27 PM, Arsalan arsalan...@yahoo.com wrote:

 Im new to android development, im trying to retrieve contact list with
 there name and phone numbers.i try following code :

  // Get a cursor over every contact.
  Cursor cursor = getContentResolver().query(People.CONTENT_URI,null,
 null, null, null);
   // Let the activity manage the cursor lifecycle.
 startManagingCursor(cursor);
 // Use the convenience properties to get the index of the
 columns
  int nameIdx = cursor.getColumnIndexOrThrow(People.NAME);
 int phoneIdx = cursor. getColumnIndexOrThrow(People.NUMBER);
String[] result = new String[cursor.getCount()];
  if (cursor.moveToFirst())
do {
   // Extract the name.
   String name = cursor.getString(nameIdx);
// Extract the phone number.
   String phone = cursor.getString(phoneIdx);
  result[cursor.getPosition()] = name + - + +  phone;
 } while(cursor.moveToNext());


 this code should return an array with the all contacts name and its
 phone number but this only return name of the contact and return NULL
 in phone number,

 Example Output:

  John - null

 Please help me in this regards thats whats wrong in this code. Any
 help in this regards will highly apreaciated, and its urgent 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] converting accelerometer output into the world's coordinates

2011-01-14 Thread Moustafa
Hi All,

I've been working in an Android project that makes use of
accelerometer values.

However the output of accelerometer is defined in terms of the phone's
coordinate system. but I need them to be in the world's coordinate
system ,,

does any body know a method to convert the output values of
acceleometer to be in terms of the world's coordinates ?

Regards,

Moustafa

-- 
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] launching link from email does not work

2011-01-14 Thread K.Nguyen
I have this link in an email
mycustomscheme://my.domain.name/mypathprefix
but clicking on it will give me the
Web page not available
The Web page at email:// might be temporarily down or it may have
moved permanently to a new web address.

Not sure where it's getting the email:// when I'm using mycustomscheme://

Anywho this is what I have in my manifest file:

activity android:name=.SplashScreen
  intent-filter
action android:name=android.intent.action.MAIN/action
category android:name=android.intent.category.LAUNCHER/
category
  /intent-filter
  intent-filter
action android:name=android.intent.action.VIEW /

category android:name=android.intent.category.DEFAULT /

category android:name=android.intent.category.BROWSABLE /

data
 android:scheme=mycustomscheme
 android:host=my.domain.name
 android:pathPrefix=mypathprefix/
  /intent-filter
/activity

I think that is all that needs to be done, but it's not working for
me, hope someone could 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


Re: [android-developers] Scrolling Time Picker Like in Alarms

2011-01-14 Thread Rishit Desai
How to bring that alarm's Time Picker (snapshot included) to use in my
Application..
I hope the Alarm's Time Picker is a Widget that can be used by my
Application.
Any help with reference/website/sample code/Whether that can be used or not,
would be great.

On Wed, Jan 5, 2011 at 2:13 AM, TreKing treking...@gmail.com wrote:

 On Sun, Jan 2, 2011 at 9:52 PM, Rishit rjdthegr...@gmail.com wrote:

 Any help is highly appreciated.


 With what, exactly?


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices


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




-- 
-Rishit Desai
--Live each day as if it were your last. And one day you will most certainly
be true.

-- 
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] Eclipse/ADT just not cutting it, need refined ide For androdi development!

2011-01-14 Thread indigo0086
I mean right now it's the only IDE for developing for android
efficiently.  I'm just finding that eclipse and adt are just barely
usable tools for android development (more eclipse than ADT of
course).  I've read where a few android developers have complained
that the tools have poor usability, are slow, and are just not
visually pleasing to use.  I can site the android layout editor
horribly formats xml, and eclipse doesn't automatically format it when
switching to xml edit view.  I think we need official tools solely for
android development instead of a plugin for an ide developed by the
community (none of which seem to be user experience experts either).
I just feel like it's a chore to develop in java as opposed to in
other languages mainly because of the ide tools 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


Re: [android-developers] Android GeoCoder Issue

2011-01-14 Thread narasimha venkat
Geocoder geocoder = new Geocoder(this, Locale.getDefault());
ListAddress addresses = geocoder.getFromLocation(lat, lng, 1);

using this code its working
On Sat, Jan 8, 2011 at 2:03 AM, Ankur Avlani ankuravl...@gmail.com wrote:

 Hi All,

 I am using android map api.  To plot overlays, for some address I need to
 get the lat lng values.  I user GeoCoder to get the lat lng values based on
 address.  I am passing the complete address with City, State and Zip.  But
 the interesting part is, the GeoCoder does not always returns the lat lng
 value for address.

 What I mean is, for some address it gets the lat lng, if i try again for
 the same address it wont get the lat lng address.

 Has anyone faced this issue?.  Any help is highly appreciated.

 Thanks,
 Ankur

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

-- 
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] Emulator too slow to start - DDK 8, Ubuntu 10.10, Eclipse 3.5.

2011-01-14 Thread schibbl
Hi,

I just started playing a bit with the Android SDK

Eclipse SDK

Version: 3.5.2
Build id: M20100211-1343

Intel(R) Pentium(R) Dual  CPU  T3400  @ 2.16GHz

-- 
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] Emulator too slow to start - ADT 8.0.1, Ubuntu 10.10, Eclipse 3.5.2

2011-01-14 Thread schibbl
Hi,

I just started playing a bit with the Android SDK. Testing the Hello
World program in emulator is not possible, because the Emulator just
shows the Android Logo and remains there for about an hour. I do not
have the patience to wait any longer for the emulator.
Does someone know what to tweak, set or fix to get the emulator into a
higher performance?

Hardware:
CPU: Intel(R) Pentium(R) Dual  CPU  T3400  @ 2.16GHz
RAM: 4,0 GB
Chipset: Intel ICH9
Graphics: IntelMobile 4 Series Chipset

System:
Ubuntu 10.10 - Linux tuxbook 2.6.35-24-generic-pae #42-Ubuntu SMP Thu
Dec 2 03:21:31 UTC 2010 i686 GNU/Linux

Eclipse SDK
Version: 3.5.2
Build id: M20100211-1343

Android Development Toolkit
Version: 8.0.1.v201012062107-82219

Thank you in advance,
schibbl

-- 
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 such table... message error in my android applications

2011-01-14 Thread ghi80
Hi,
I'm an italian android application publisher.
In my free and paid applications, i use database files.
I have database file with extension .sqlite. I change this extension
in .db.
I add the table android_metadata with the command CREATE TABLE
android_metadata (locale TEXT DEFAULT 'en_US') and then I add a
single row
in this table with the command INSERT INTO android_metadata VALUES
('en_US').
After these changes, I put the database files in my application assets
folder.
At the first use of the application, i copy these database files in
the filesystem device, in the folder /data/data/myapp/databases/.
This is the java code of the function that i use to copy file from
assets folder to filesystem device:

private void copyDataBase(String dbpath, String dbname) throws
IOException {
InputStream myInput = myContext.getAssets().open(dbname);
String outFileName = dbpath + dbname;
OutputStream myOutput = new FileOutputStream(outFileName);

byte[] buffer = new byte[1024];
int length;
while ((length = myInput.read(buffer))0){
myOutput.write(buffer, 0, length);
}

myOutput.flush();
myOutput.close();
myInput.close();
}

I try my application with Acer beTouch E400 (Android 2.1), HTC
Wildfire (Android 2.1) and Samsung GalaxyTab (Android 2.2) and i don't
have problems or errors (I prepare my application with target Android
2.2 and MinSDKVersion=4).
In the last fifteen days, i have received, in the application android
control panel, an error notice and 9 reports for the free application
(900 downloads) and an errore notice and 2 reports for the paid
applications (60 downloads).
The stack trace is the same: android.database.sqlite.SQLiteException:
no such table: tabella, while compiling: SELECT;
I think that the database file is in the filesystem device, but it is
damaged. The free application has received also many beautiful
comments and the same user buy many paid applications: so they work
correctly... i don't understand
How can i solve this problem? Are there some errors in my java code?
Can this kind of error depend from Android Market temporary download
problems or Android version or Android system update or kind of
device?
Thanks and sorry for my english...
Bye

-- 
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] Sample Keyboard - Popup characters

2011-01-14 Thread Mathieu
Hi everyone !

- I'm trying to modify a bit the sample soft keyboard.

I would like, on longKeyPress on a character, to allow the user to
choose in a selection of others characters.
For example, on a longKeyPress on a a, I would like to popup aàâ,
etc.

In the xml , I wrote this :
Key android:codes=119 android:keyLabel=a
android:popupCharacters=aàâ /
but it doesn't work.

If you have any idea, please answer !

Thanks in advance,
Mathieu

-- 
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] Calling an activity from a non-activity (but...)

2011-01-14 Thread Tux
Hi all,

I know this question has already been addressed but of what I read I
just saw it is possible but should be avoided and still do not know
how to do that.

I cannot change the activity method into a static class method because
I use getAppContext() and openFileInput/Output methods...So I need to
be able to call an activity from a non-activity class (already
extending something so I cannot extend activity there).

How do I do that? Cannot find anything interesting on Google, except
for ugly things...


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: First attempt at LVL Licensing

2011-01-14 Thread SoftWyer
I see the 'not market managed' message when testing applications and the 
user (as defined by the Google Mail ID used to access the market) is not in 
the list of exceptions.

It can take a while to sync the email addresses to whatever servers google 
uses, so you might need to wait 20 minutes or so.  Make sure that your email 
addresses have no spaces between them, just comma separated as I'm convinced 
this was stopping me testing a few days back ;-)

-- 
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's new in honeycomb?

2011-01-14 Thread Scott

 You may have seen the numerous developer blogs posts on preparing for larger
 screens and such. :)

I've thought about it and come up with two ways to better allow apps
to use that bigger real-estate.
A) Add a new Resource size (current: hdpi, mdpi, ldpi) such as an
'xhdpi' or 'tdpi' tag for tablet screen sizes (most likely option,
IMO, based on the Gingerbread changes to the status bar icons with the
addition of the -v9 suffix for those directories)
i) Very simple, and natural next step.
B) Allow nested activities to allow developers to quickly transition
their apps from smart-phone based to tablet-based. Then people could
easily transition apps to Tablet form factors.
i) Example: Have a listView of emails on the left that sends
intents to the right half of the screen to display those emails.
ii) Although it doesn't flow the regular way android applications
are architectured, I think it would quickly allow developers to make
their apps awesome for tablets without putting in a lot of man hours
to change their apps.
iii) Could be done by adding an extra piece of information to the
intent,  Much like a web page with multiple frames works.

Those were my guesses, but based on Dianne's answer, I think it's safe
to assume that A will come. All of the current blog posts encourage
developers to make use of the resource architecture that's been
implemented in Android.
screen geometry post: 
http://android-developers.blogspot.com/2010/09/screen-geometry-fun.html
Example blog post on uses-features in tablets and Google TV:
http://android-developers.blogspot.com/2010/10/five-steps-to-future-hardware-happiness.html

This is just my opinion, looking at the situation and such.

Hope this helps people also speculating about what Honeycomb will
bring.

Thanks for reading,
Scott MacWatters

-- 
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] Test case throws permission exception

2011-01-14 Thread javaxmlsoapdev
I am writing a test case to for reading phone contact list

public class ContactTest extends AndroidTestCase {

static final String LOG_TAG = ContactTest;
static final String TESTUSER_NAME = Test User;
static final String TESTUSER_NUMBER = 1234568909;
ContentResolver contentResolver;
Uri newPerson;



public void setUp() {
contentResolver = getContext().getContentResolver();

ContentValues person = new ContentValues();
person.put(ContactsContract.Contacts.DISPLAY_NAME,
TESTUSER_NAME );
person.put(ContactsContract.CommonDataKinds.Phone.NUMBER,
TESTUSER_NUMBER );

newPerson =
contentResolver.insert(ContactsContract.Contacts.CONTENT_URI,person);
}

In Manifest file I have following permissions defined
uses-permission android:name=android.permission.WRITE_CONTACTS/
uses-permission android:name=android.permission.READ_CONTACTS/

But while running the test it keeps throwing following permission
exception
java.lang.SecurityException: Permission Denial: writing
com.android.providers.contacts.ContactsProvider2 uri
content://com.android.contacts/contacts from pid=343, uid=10036
requires android.permission.WRITE_CONTACTS
at android.os.Parcel.readException(Parcel.java:1247)
at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
160)
at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
114)
at
android.content.ContentProviderProxy.insert(ContentProviderNative.java:
408)
at android.content.ContentResolver.insert(ContentResolver.java:587)
at com.aes.mobile.android.test.ContactTest.setUp(ContactTest.java:32)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:
520)
at android.app.Instrumentation
$InstrumentationThread.run(Instrumentation.java:1447)

Any idea?

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] [Q] What are the different protocols used for sending multimedia contents on phones

2011-01-14 Thread rahul
What are the different protocols used for sending multimedia contents
on phones

I know about MMS's mm1 to mm11,
but i'm looking for more answers.

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] Different divider-heights in expandablelistview?

2011-01-14 Thread Quark
Hi,

I was customizing the expandablelistview and noticed that the default
divider heights are different for every other group/child. I find this
to be quite annoying, especially since I'm customizing the dividers.
Is this normal behavior or is this a setting that can be changed?

Here are some links to screenshots of the 'problem' :

http://95.211.54.103/dividers1.png
http://95.211.54.103/dividers2.png

Kind regards,
Ivo

-- 
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 to send an SMS to multiple contacts.

2011-01-14 Thread Cbass
Trying to initiate an intent to send an SMS to multiple recipients
with the following code:

Intent smsIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
sms, destination, null));

However in the destination string say I have
555-555-,555-555-5556. The comma delimiter is working fine on a
Samsung vibrant. However, this will not work on a nexus 1. On the
nexus one i need to use a semicolon as the delimiter and then it
works. On the nexus one, if I use commas as the delimiter, it only
picks up the last phone number. If I use the semicolon, the nexus one
picks up all the phone numbers however, it then breaks the vibrant.
With the semicolon, the vibrant does not pick up any of the phone
numbers. Any insights?

-- 
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: GLIBC 2.11 needed for emulator in SDK 2.3 !!!!

2011-01-14 Thread ph1g
The work around may work for some folks, but certainly there are
people who can't, or don't want to risk, upgrade their machines. Can
we get this re-released linked against glibc6 = 2.10 please?

-Ben

On Dec 7 2010, 11:20 pm, DrBrain techcao...@gmail.com wrote:
 Just found a work-around solution:
 1. Add this repository: debhttp://security.ubuntu.com/ubuntulucid-
 security main to software sources (/etc/apt/sources.list)
 2. Start update aptitude: sudo apt-get update
 3. Start updatelibc6: sudo apt-get installlibc6

 Best Regards.

 On Dec 8, 11:07 am, jtoolsdev brianjto...@gmail.com wrote:







  Found out the QA machines at Android were upgraded to Lucid so they
  didn't catch the glibc thing.  They are hoping to issue a fix.

  On Dec 7, 2:22 pm, jtoolsdev brianjto...@gmail.com wrote:

   Same here on Ubuntu 9.10.  Hoses any development until there is a
   solution.  Looking at reported 2.3 errors popping developers may want
   to wait to update.

   On Dec 7, 6:56 am, Fred J fred.jea...@gmail.com wrote:

Same error on (Mandriva release 2010)

On 6 déc, 22:27, elpix1 elp...@gmail.com wrote:

 Hi,

 I updated the SDK for the Android 2.3 and the emulator is not
 running anymore because it needs GLIBC 2.11 and my
 system has 2.10 !
 It seems that the emulator is the only tool from the new
 SDK that requires 2.11 !

 ./emulator: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.11' not
 found (required by ./emulator)
         linux-gate.so.1 =  (0x00cf8000)
         libutil.so.1 = /lib/tls/i686/cmov/libutil.so.1 (0x003ae000)
         librt.so.1 = /lib/tls/i686/cmov/librt.so.1 (0x00851000)
         libpthread.so.0 = /lib/tls/i686/cmov/libpthread.so.0 
 (0x00724000)
         libm.so.6 = /lib/tls/i686/cmov/libm.so.6 (0x0017e000)
         libdl.so.2 = /lib/tls/i686/cmov/libdl.so.2 (0x00779000)
         libstdc++.so.6 = /usr/lib/libstdc++.so.6 (0x0023e000)
         libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x0011)
         libc.so.6 = /lib/tls/i686/cmov/libc.so.6 (0x003b2000)
         /lib/ld-linux.so.2 (0x00221000)

-- 
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] I need books and links to learn android basic programing

2011-01-14 Thread Nagarjuna
Hi all,

  This is nagarjuna, I have done my java(J2SE + J2EE) and I have
interest in developing ANDROID ..

So kindly pls help me to learn basics of android , pls suggest me some
websites or books or any videos online ,

please help me I am very much interest in andriod...


Thanking you alll

-- 
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] Soundpool.play() fails, returns 0, Playing From Widget

2011-01-14 Thread LysolPionex
I'm trying to get a sound to play from a widget. The code (below) is a
near copy of code from another project which successfully plays
sounds.  The sounds which I use work in other projects, and working
sounds from other projects also don't play in this project.

I think I just need a pair of fresh eyes.

Thanks for any insight!




  ...
public void onReceive(Context context, Intent intent){

  ...

  //for deciding which sound to play
  int soundToPlay;

  ...

   /**
* Play the sound *
**/
   //make a sound pool
   SoundPool soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC,
0);
   int soundID = soundPool.load(context, soundToPlay, 1);


  /
   * this shows soundPool.play() returning a 0  *
   /
   CharSequence text = soundID +  -  + soundPool.play(soundID, 1,
1, 1, -1, 1);
   int duration = Toast.LENGTH_SHORT;
   Toast toast = Toast.makeText(context, text, duration);
   toast.show();

  ...

-- 
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] Display bug with buttons (and others)

2011-01-14 Thread Jerome
Hi everyone,
I have something like that:

http://i.imgur.com/zHbW9.png

It's a screenshot from my Wildfire in 2.2 . I don't have this problem
in landscape orientation. I don't understand, it's a kind of gap in
lines drawing (and I also have the same problems with other kind of
views ...).

Can you help me with that?

-- 
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] http://mohammedkilani.com/morevideos.htm

2011-01-14 Thread yamadd yaahad
http://mohammedkilani.com/morevideos.htm

-- 
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 mute radio and route audio via bluetooth connection

2011-01-14 Thread Steve
Hi All,

While driving, if I receive an incoming call the car radio is
automatically muted and the incoming call is routed through to my car
radio.  All other applications require me to switch the radio mode to
Bluetooth Audio.

I'm curious if there is a way to simulate the default incoming call
functionality.  Specifically, I'd like to be able to have my
application interrupt, mute the radio, route it's audio through, then
when complete unmute the radio (the same as an incoming call does when
your car is setup with a mute wire).   The app works as expected other
than I can't hear any output unless the car is set to bluetooth
audio manually.

I haven't found much on the subject in my searches around the topic.
So far I've played with variations of following and had no luck:

AudioManager audioMan = (AudioManager)
getSystemService(Context.AUDIO_SERVICE);
audioMan.setStreamSolo(AudioManager.STREAM_VOICE_CALL, true);
audioMan.setBluetoothScoOn(true);
audioMan.setMode(AudioManager.MODE_IN_CALL);
ttsEngine.speak(Hello World, TextToSpeech.QUEUE_FLUSH, null);
audioMan.setStreamSolo(AudioManager.STREAM_VOICE_CALL, false);
audioMan.setMode(AudioManager.MODE_NORMAL);
audioMan.setBluetoothScoOn(false);

I've also included the following in the manifest file:

uses-permission
android:name=android.permission.MODIFY_AUDIO_SETTINGS/uses-
permission

Honestly, I'm not even sure if I'm even close to being on the right
track since all my attempts have resulted in code that doesn't break
anything but gets me no closer to the goal.

Any assistance here would be much appreciated.

thanks,
steve

-- 
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 API to find out Widget is in Foreground or Background. Any other Alternative API's to achieve this Functionality

2011-01-14 Thread Sam CR
NO API to find out Widget is Foreground or Background. Any other
Alternative API's to achieve this Functionality.
Can Anybody Help how to find out Widget is in Foreground or
Background.

I am trying so hard to find out Widget is visible or Hide in Home
screen. I am not using Android Default Home screen. We are using
Custom Home Screen.

-- 
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] POSDroid

2011-01-14 Thread Shanky
Dear All,
Have there been any traction into how Android can be used in POS
environments (Point of Sale)?
I am wondring if Android has any frameworks already in place for
facilitating easy portability of Legacy POS applications from other
platforms to Android or for facilitating easy development of nw POS
applications?

Looking forward for some response.

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: GLIBC 2.11 needed for emulator in SDK 2.3 !!!!

2011-01-14 Thread ph1g
Can we please get this re-released linked against libc6 = 2.10? Many
folks may be working off systems they can't upgrade or don't want to
risk upgrading.

Regards,
Ben

-- 
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] All Audio output to streaming

2011-01-14 Thread stéphane Herraiz
Hello,
I would like to streaming all my android audio output (Deezer, music
player, radio, etc...) .
In fact I want to send the phone audio to my home server speakers.
Do you have an idea to do that,
Thanks a lot in advance.

BR

-- 
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] Setting image to fill tab.

2011-01-14 Thread Clozecall
Hey all I've created Google's exmaple of a tab layout HelloTabWidget.
I know how to create my own icon to use instead of their grey and
white microphone, but I can't figure out how to make my custom icon
fill the entire tab. When the tab is selected it's a light grey with
my pic in the middle and when not selected its a dark grey with my pic
in the middle. I prefer to have my own pic fill the entire tab, and
for more knowledgeable; my own choice in color to fill the tab.

Someone on a different site tried helping me, but I haven't gotten a
response back, they said to use this, quote:

ImageView imgView = new ImageView(this);

// Use imgView.setImageDrawable(Drawable drawable) or
// imgView.setImageBitmap(Bitmap bitmap) to load
// the image you want into imgView

spec =
tabHost.newTabSpec(artists).setIndicator(imgView).setContent(intent);
I'm not sure if it's what you want but you can (in theory) use any
View class as the Indicator if ImageView doesn't work for you.

EDIT:

I tried...

BitmapDrawable bmd = new BitmapDrawable();
bmd = (BitmapDrawable)
res.getDrawable(R.drawable.ic_tab_artists_grey);
iv.setImageDrawable(bmd);

-end message.

I'm having trouble trying to use their method, I've tried putting:
BitmapDrawable bmd = new BitmapDrawable();  at the top of my code, and
for the tab:

intent = new Intent().setClass(this, ArtistsActivity.class);
spec = tabHost.newTabSpec (artists).bmd = (BitmapDrawable)
res.getDrawable(R.drawable.ic_tab_artists_grey);
iv.setImageDrawable(bmd);
.setContent(intent);
tabHost.addTab(spec);

but I keep getting a lot of errors.

-- 
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] Calling activity from Stub

2011-01-14 Thread Tux
Hi all,

I have a class extending  IPackageManager.Stub (does not really matter
here), the point is, I need to start an activity from this class.

I cannot do:

Intent i = new Intent();
i.setComponent(new ComponentName(packageNameString,
fullyQualifiedClassNameOfActivity ));
startActivity(i);

as my class is not an activity.

How can I do that? Btw i know I can pass the instance of the calling
activity of the non-activity class as a parameter, but I need
something else for design purposes.

So, to be clear, How can I call an activity from a non-activity
class?



-- 
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] Is there anyway to change notification bar to a launcher?

2011-01-14 Thread xvblack
just the title,is there anyway?

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


Re: [android-developers] Application Back button not working

2011-01-14 Thread Ajit Raut
Can you provide with more information especially regarding different
activities, tasks, launch modes and the flags. As far as Back Button is
concerned, check the tasks activity stack; looks like you are using
singleTop.

On Sun, Jan 9, 2011 at 12:02 AM, Abhishek Talwar 
r.o.b.i.n.abhis...@gmail.com wrote:

 Hi guys
 I made an application in my office and then i mailed it back to myself
 so that i could complete it on weekends.
 But a strange thing which has happened is that some part of the
 application is working and some are not.
 For ex the Back Button on other activities except the launcher
 activity is not working.
 Did i do something wrong or is it android SDK ??

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




-- 
Regards
Ajit Raut

-- 
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] using iText with Android

2011-01-14 Thread Rao Adnan
I like to use iText with Android to generate PDF. When I run my
andoird in emulator, I am getting following errors at run time:

01-08 23:37:34.719: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createGraphics
01-08 23:37:34.728: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createGraphics
01-08 23:37:34.738: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createGraphics
01-08 23:37:34.749: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createGraphics
01-08 23:37:34.759: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createGraphicsShapes
01-08 23:37:34.857: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createGraphicsShapes
01-08 23:37:34.888: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfPrinterGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createPrinterGraphics
01-08 23:37:34.897: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfPrinterGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createPrinterGraphics
01-08 23:37:34.919: ERROR/dalvikvm(622): Could not find class
'com.itextpdf.text.pdf.PdfPrinterGraphics2D', referenced from method
com.itextpdf.text.pdf.PdfContentByte.createPrinterGraphics


Although, the PDF utility class which I created work perfectly fine,
when runs as a regular Java application.

Appretiate your 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


Re: [android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 19 Topics

2011-01-14 Thread Chen, Yang


Sent from my Sony Ericsson Xperia.

android-developers+nore...@googlegroups.com 
android-developers+nore...@googlegroups.com编写:



  Today's Topic Summary

Group: http://groups.google.com/group/android-developers/topics

 *   Drawing on a canvas like normal VS OpenGl [2 Updates]
 *   Launching an application from a email. Is that possible? [1 Update]
 *   DNS WHOIS query support [2 Updates]
 *   First attempt at LVL Licensing [1 Update]
 *   About viewstubs [1 Update]
 *   How to stop ADB server [1 Update]
 *   What type of messaging would you use? [1 Update]
 *   HTTP parameter question [1 Update]
 *   Interaction with other apps [2 Updates]
 *   convert web page to pdf [2 Updates]
 *   How to access mail ? [2 Updates]
 *   Use wireless networks setting not always available? [1 Update]
 *   Can't Uninstall [1 Update]
 *   App Add-on [1 Update]
 *   Gingerbread BroadcastReceiver Issue [2 Updates]
 *   partial wakelock for 3G in Android [1 Update]
 *   Prevent application - after Factory Data reset [1 Update]
 *   Making cross-thread blocking/sync calls [1 Update]
 *   How to interrupt a blocking I/O operation? [1 Update]

 Topic: Drawing on a canvas like normal VS 
OpenGlhttp://groups.google.com/group/android-developers/t/a441292fc2094c4e

Tim tdh...@gmail.com Jan 08 04:52AM -0800 ^

 So I was just wondering is openGL better in terms of making a 2dgame. does
 it render faster then if I were to draw on a Canvas

I would definitely go with OpenGL. I've not used the canvas, but I
seriously doubt it is as fast, and definitely isn't as flexible. It
may be easier to use though if your game is simple (e.g. I would use
it for something like a board game).

Also, using OpenGL will let you easily port your game to other OSes
(except WP7).



David Turner di...@android.com Jan 08 04:25PM +0100 ^


 So I was just wondering is openGL better in terms of making a 2dgame. does
 it render faster then if I were to draw on a Canvas


It really depends on what you're doing.There are certain things that are
simply not possible or simply slower with OpenGL (e.g. high-quality
anti-aliased vector rendering being one of them). Also not all GLES
driver/chips are the same, and your performance may vary.

--



 Topic: Launching an application from a email. Is that 
possible?http://groups.google.com/group/android-developers/t/c84ce967b77abc75

sdphil phil.pellouch...@gmail.com Jan 08 07:12AM -0800 ^

okay, i finally got this to work, but it will only work if i use a
unique scheme. if I try to do it without a standard http scheme, then
i can't get it to work -- even if I specify mimeType.




 Topic: DNS WHOIS query 
supporthttp://groups.google.com/group/android-developers/t/d0ec6ef3ffd07aba

JAlexoid (Aleksandr Panzin) jalex...@gmail.com Jan 08 06:58AM -0800 ^




JAlexoid (Aleksandr Panzin) jalex...@gmail.com Jan 08 07:07AM -0800 ^

http://www.dnsjava.org/ might help.

Though, how it works on Android I don't know

Record [] records = new Lookup(android.com, Type.NS).run();
for (int i = 0; i  records.length; i++) {
MXRecord mx = (MXRecord) records[i];
System.out.println(Host  + mx.getTarget() +  has preference ,
mx.getPriority());
}





 Topic: First attempt at LVL 
Licensinghttp://groups.google.com/group/android-developers/t/1699b73b26e2667b

Neilz neilhorn...@gmail.com Jan 08 06:40AM -0800 ^

Hi all. I'm implementing this into my app and reading through the
docs.

As I understand it I should be able to add a test email address (the
one set up in my device) and it should return whatever response I set.
However, all I'm getting back is Application error: NOT_MARKET_MANAGED

Do I have to upload my app to the market for this to work? Currently
it isn't, but the docs seem to tell my that this isn't necessary for
test accounts.

Thanks.



 Topic: About 
viewstubshttp://groups.google.com/group/android-developers/t/e94c0c717d53c482

Pedro Duque pmdu...@gmail.com Jan 08 02:34PM ^

I'm trying to gasp viewstubs but I feel I'm missing something.

As I understand, a viewstub only exists in a hierarchy until inflated
or until made visible. After that is replaced by its referenced
layout. This behaviour makes impossible to reinflate a inflated
viewstub. Is this correct?

The behaviour I was looking for was to have several buttons that would
open diferente viewstubs. When I click a button it would deflate the
previous layout and inflate the new one but this only works the first
time... After that the viewstub is gone...



 Topic: How to stop ADB 
serverhttp://groups.google.com/group/android-developers/t/e43f3d97256d178a

Kumar Bibek coomar@gmail.com Jan 08 06:20AM -0800 ^

What do you mean by dynamically? From inside an app? What would you
try to do that?

Anyway, to shut down the adb server, you just have to use this
commands

adb kill-server
adb start-server

These are command line tools available for you to interact with adb.




 Topic: What type of messaging would you 

[android-developers] Make sure the surfaceView or associated SurfaceHolder has a valid Surface

2011-01-14 Thread Vic
I use OpenGL ES in LockScreen in android 2.2. When the device run in
LockScreen, it get the following error :
java.lang.IllegalArgumentException: Make sure the surfaceView or
associated SurfaceHolder has a valid Surface...

Does anyone know what's problem causes it? I guess the context of
LockScreen is different from the context of activty, so this reason
causes this problem. But I am not sure.

Thanks for your helping

-- 
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] OpenGL view background and buttons

2011-01-14 Thread Thomas
Is it possible to draw the background of an arbitrary view with opengl
and still be able to add standard things like buttons, text enty
fields, etc.
also, is it possible to have the image of a button drawn with opengl?
that is, function as a standard button but drawn with opengl?

im thinking these questions are long shots, but ill ask anyway as some
pretty neat stuff could be done with it.

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


[android-developers] Re: NFC Secure Element

2011-01-14 Thread gusdgg
Hi Nemik,

Please, could you tell me how do you enable the SMX in the nexus s
configuration and change the mode in the Nfcservice? So far, I can
read and write tags,

Regards
gusdgg

On 10 ene, 04:51, Ajith Kamath sjce.aj...@gmail.com wrote:
 Hi Nemik

 I'm running over the libnfc code.
 I can see these 4 files to be prominent for communication with SE

 phHciNfc_CE_A.c
 phHciNfc_CE_B.c

 I am thinking the above two might be used for R/W into SE from App
 Processor.
 And the below two is used for communication between NFC Controller and SE.

 phHciNfc_SWP.c
 phHciNfc_WI.c

 Please go through these files and let me know if I'm in right path.

 Regards,
 Ajith



 On Mon, Jan 10, 2011 at 11:44 AM, nemik ne...@nemik.net wrote:
  Ajith,

  According to
 http://discussion.forum.nokia.com/forum/showthread.php?199442-6212-de...
  the CN072 is a secure element in the Smart MX family. I'm not sure the
  same one is in the Nexus S, but I presume the one in there is at least
  very similar.

  Here is the info on it:
 http://www.nxp.com/acrobat_download2/other/identification/SFS107710.pdf

  I'm still trying to figure out how to get access to it as well, for
  reading or writing. I doubt there are any specific commands for it
  though, it just takes regular commands over ISO14443 just like other
  MiFare cards.

  On Jan 9, 11:31 pm, Ajith Kamath sjce.aj...@gmail.com wrote:
   Hi Nemik

   * I have small doubt with current implementation. Is SmartMX a Secure
   Element ?If so can you give me examples?
   * I have checked libnfc-nxp , enabling P2P parameter was  at
  phnfcconfig.h.
   what needs to be done to enable Secure element?
   what are MifarePlus, Desfire, Topaz . Is it a Card type or Secure
  Element?

   * Also where is the general read-write methods for entry of Secure
  element.
   All I can see is phLibNfc_SE.c is methods for getting list of secured
   element, selecting secure element, deselecting.
   * But method for exchange of data is not present. Can you tell me where
  can
   I find this?

   * In libnfc-nxp There are files like  phFriNfc_NdefMap.c,
   phFriNfc_MifareULMap.c,  phFriNfc_TopazMap.c, phFriNfc_TopazDynamicMap.c,
   phFriNfc_DesfireMap.c, phFriNfc_FelicaMap.c.
   Can you tell me what these files are used for. The current comments in
  the
   file do not provide sufficient information

   * I am trying to use Wired Mode, Hence phHciNfc_WI.c will be used to
   communicate between Controller and Secure element right?

   Please advice.

   Regards,
   Ajith

   Hi

    On Sun, Jan 9, 2011 at 1:00 AM, nemik ne...@nemik.net wrote:
I was able to enable a secure element the other day by messing around
with this external/libnfc-nxp library. I enabled SMX (SmartMX) in the
config headers, and upon booting and monitoring `adb logcat` during
boot I saw 1 secure elements (a SmartMX one) had been enabled. I was
then able to change the mode in NfcService.java to card emulation
mode.

The Nexus S is now emulating a MiFare Classic 4k card. However, I am
not able to read sectors from the card directly. I've been trying to
use the micmd tool to do that but things act pretty strangely. For
example, I tried to read block 0 and micmd tells me Could not read
the data block! Tag halted, reconnecting... but what's even stranger
is that at that point, 'adb logcat' shuts itself off. As if that read
command somehow interfered with USB or logging?
However trying `a` commands to authenticate in micmd always works for
some reason and it'll even pretent to write and persist data to
blocks; but of course that data never actually gets persisted to the
emulated card. Maybe this is a bug in micmd?

Does anyone know if the Nexus S hardware (or its PN544 NFC chipset)
even contains a hardware secure element like SmartMX? I tried also
enabling UICC but that didn't seem to work at all and NFC service
wouldn't even start in that case. Plus my SIM card is MANY years old
and not sure it'd even work...

Either way, I used libnfc.org's `nfc-mfclassic` tool to dump out the
contents of that emulated 4k card. It is here:
   http://pastebin.com/zKZ2ELcw

Seems to be entirely blank which is why I'm wondering if these aren't
some default values it would spit out anyway even if no SmartMX module
existed?

If anyone has any more insights into this, I'd be very happy to hear
them.

-Nemanja

On Dec 19 2010, 7:26 pm, nemik ne...@nemik.net wrote:
 Dominik,

 Yea, that's right. All it does currently is read; at least via the
 Java API. If you look at the kernel source though, a bunch of ifdefs
 which allow for emulation were all disabled. So full compliance with
 theNFCstandard will have to wait for a future kernel release.

 On Dec 7, 5:42 am, Gruntz Dominik dominik.gru...@fhnw.ch wrote:

  Hi everyone,

  Do I see it right, that the Android 2.3NFCAPI does not provide
functionality to 

[android-developers] showDialog's BadTokenException + BACK button

2011-01-14 Thread Amico
hey,

I know you've all had enough with this exception. there are trillions
of threads in many forums about this exception (yes, 'm using this
and not getApplicationContext() in showDialog) - but I couldnt find a
single solution for that.
if I run my code everything is OK. once I press the back button, as
far as I nderstood it goes through the entire activity destruction
(onPause--onStop--onDestroy). when I start the application again,
when I want to show a dialog using showDialog, I get the
BadTokedException.

I can post some of the code if nessacery, but its more a general
problem.
10x, for any reply.

Amir

-- 
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] Problem authenticating Restlet webservice via Google Accounts

2011-01-14 Thread Sky
Hi all,

I have an Android app that has to upload and synchronize data from and
to GAE. Currently I use Restlet to connect Android to GAE. This works
good (below my testcode). Now I want to authenticate the restlet
webservice via Google Account (Oauth), but do not know how. All my
tests were not successfully. There is no tutorial how to use oauth
with Restlet on Android and the API is not intuitive. I looked into
the following tutorial
http://blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-app
In this tutorial an httpclient is used to get a cookie and then an
authenticated http call is made.
I did not manage to map this to restlet. I even tried to set the
cookie gained from the http reques to the restlet request, but I did
not succeed.

My questions are simple:
1. Does anyone has experience with Android client side Restlet and
authenticating with Google Accounts and maybe has some reference to a
good tutorial or sample code?
3. Is there a better/easier solution than using Restlet, with better
documentation and android tutorial?

Here is my test code, that works without authenticating. Calling the
Google user service on server side
userServiceManager.isUserLoggedIn() always returns false (not
authenticated):

GAE side:
Server Application:
public class UploadServerApplication extends Application {
@Override
public Restlet createInboundRoot() {
Router router = new Router(getContext());
getConnectorService().getClientProtocols().add(Protocol.FILE);
router.attachDefault(UploadServerResource.class);
return router;
}
}
Resource:
UploadServerResource extends ServerResource implements UploadResource
{
public UploadResult upload(UploadData uploadData) {
UserService userServiceManager =
UserServiceFactory.getUserService();
boolean authenticated = userServiceManager.isUserLoggedIn();  ---
always false in my tests!
if (authenticated) { ...  result.setSuccess(true); }
else { ...result.setSuccess(false);   }
return result;
}
-
Android client side:
ClientResource cr = new ClientResource(http://192.168.1.4:/
upload);
UploadResource resource = cr.wrap(UploadResource.class);
UploadData uploadData = new UploadData();
...
UploadResult result = resource.uploadTrack(uploadData);
...

-- 
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] Howto: Lock down android using our custom start up application.

2011-01-14 Thread Belani

I am investigating a possibility of runing our custom application at
startup when android boots up. Also I would like to run this
application at startup in full screen mode. It should not allow users
to access any other functionality of OS.

Ideally I would like to hide the fact from User that my application is
running on top of Android.

Can anyone on this group help me on this?

Thanks,
H Belani.

-- 
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] Camera rotation problem on Android OpenGL ES

2011-01-14 Thread revolutionary
I have written a first person camera class for android.

The class is really simple , the camera object has its three axes X,Y
and Z
And I am using an Eye and a LookAt point to create the ModelView
matrix, which seems to be working fine.

The problem comes when i try to rotate around the Y-axis ( or X-
axis) .
I am simply creating a rotation matrix around the Y-axis and
multiplying it with the Eye vector.
But after 45-degree my camera starts rotating in reverse direction.

I have taken measurements after every 1-degree rotation and it seems
that my Eye-vector although it rotates but it lags behind.
e.g. if i rotate 20-degrees it has rotated only 12.
But after 45-degree things really start to go out of control.

I though it must be a problem with the Rotation matrices that i create
to rotate the Eye-vector.
So i made two implementations, one using the functions in
android.opengl.Matrix package (e.g. setRoatetM)
and doing everything from scratch using (sin, cos ) functions.
But surprisingly the results are same.

Below is the code from the Camera class.
The three main functions involved in rotations are :
1. applyModelViewTransform( ) // this is where I use the setLookAtM()
2. yaw( ) // rotating LookAt around y-axis of the camera
3. reNormalizeAxes() // recalculating all the camera's Axes

-

package com.droidnova.android.games.vortex;

import javax.microedition.khronos.opengles.GL10;

import android.opengl.Matrix;
import android.util.Log;

import com.surrealtech.math.util.Vector3;

public class Camera7 implements ICamera {

Vector3 _vecUp = new Vector3(0,1,0); // global UP vector
Vector3 _vecLookAt; // look-at point vector
Vector3 _vecEye;// eye position
Vector3 _X; // camera's x-axis
Vector3 _Y; // camera's y-axis
Vector3 _Z; // camera's z-axis

float[] _matModelView = new float[16];
float[] _matRotation = new float[16];
float[] _vecTemp4 = new float[4];   // a temporary vector to store
results
float angleYaw = 0;
float anglePitch = 0;

public Camera7() {
// Initialize all vectors
_vecEye= new Vector3(0.0f, 1.0f,  2.0f);// eye
_vecLookAt = new Vector3(0.0f, 1.0f,  1.0f);// look-at

//  // normalize all axis
//  reNormalizeAxes();
//
//  // calculate the mdoel view matrix
//  Matrix.setLookAtM (_matModelView, 0,
//  _vecEye.x, _vecEye.y, 
_vecEye.z,
//  _vecLookAt.x, 
_vecLookAt.y, _vecLookAt.z,
//  _Y.x, _Y.y, _Y.z);
}


private void reNormalizeAxes(){
_Z = Vector3.Subtract(_vecLookAt, _vecEye);
_Z.Normalise();

// calculate the right vector from
_X = Vector3.Cross(_Z, _vecUp); // this should give the +ve 
X-axis
of camera from right-hand rule
_X.Normalise();

_Y = Vector3.Cross(_X, _Z);
_Y.Normalise();
}


@Override
public void applyModelViewTransform(GL10 gl) {
// normalize all axis
reNormalizeAxes();

// calculate the mdoel view matrix
Matrix.setLookAtM (_matModelView, 0,
_vecEye.x, _vecEye.y, 
_vecEye.z,
_vecLookAt.x, 
_vecLookAt.y, _vecLookAt.z,
_Y.x, _Y.y, _Y.z);

// push the new openGL matrix
gl.glMatrixMode(gl.GL_MODELVIEW);
gl.glLoadMatrixf(_matModelView, 0);
}

@Override
public void pitch(GL10 gl, float angle) {
// get the rotation matrix around X-Axis
Matrix.setIdentityM(_matRotation, 0);
Matrix.setRotateM(_matRotation, 0, (float)Math.toDegrees(angle),
_X.x, _X.y, _X.z);

// rotate the LookAt point
Matrix.multiplyMV(_vecTemp4, 0, _matRotation, 0,
_vecLookAt.getFloat(), 0);
_vecLookAt.setFloat(_vecTemp4);

// apply transform
this.applyModelViewTransform(gl);

}

@Override
public void yaw(GL10 gl, float angle) {
// initialise the lookat vector back to the start point
_vecLookAt = new Vector3(0.0f, 1.0f,  1.0f);// look-at
this.angleYaw += angle;

// get the rotation matrix around Y-Axis
Matrix.setIdentityM(_matRotation, 0);
//  Matrix.setRotateM(_matRotation, 0, (float)Math.toDegrees(angle),
_Y.x, _Y.y, _Y.z);
   

[android-developers] how to fetch gmail account details configured in android 1.6?

2011-01-14 Thread Math Android
Hi,

I would like to fetch the gmail account details:username, password and
the email id configured in phone, android1.6. How will I do this?
Please 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: NFC: Tag Emaulation

2011-01-14 Thread muasif80
I have seen that Android 2.3 does not support the other two modes. It
only supports the read mode at the moment and support for other modes
is coming up.

http://programming-android.labs.oreilly.com/ch18.html
http://www.anandtech.com/Show/Index/4059?cPage=5all=Falsesort=0page=2slug=nexus-s-and-android-23-review-gingerbread-for-the-holidays

On Dec 7 2010, 9:08 pm, gamtgamt thomas_ra...@yahoo.de wrote:
 It seems that even in the Nexus S there will be no tag emulation.
 Simon Wilson (Android Engineer) sayshttp://youtu.be/wk5mUdeEF8cat
 1:02 that.

 Did you find out how to write information to annfc-tag? That I could
 not find out till now.

 Thomas

 On 7 Dez., 12:01, Gruntz Dominik dominik.gru...@fhnw.ch wrote:

  Hi Everyone,
  In the android.nfcpackage documentation I read:

    Provides access to Near Field Communication (NFC) functionality, allowing 
  applications
    to read NDEF message inNFCtags. A tag may actually be another device 
  that appears
    as a tag.

  Question: Can tags be emulated with the AndroidNFCAPI, and if yes, how?

  Dominik

-- 
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] Restlet, Android and Google Account authentication (oauth)

2011-01-14 Thread Sky
Hello,
Does anyone know how to use Restlet in combination with OAUTH? I
searched the web and did not found any useful documentations or
tutorial. Seems like this is not supported anymore?

What I want to do is connecting Android to Google App engine, where I
use Google Accounts for authentication.

Here is my Restlet Server Code:
public class UploadServerApplication extends Application {
   @Override
   public Restlet createInboundRoot() {
   Router router = new Router(getContext());
 
getConnectorService().getClientProtocols().add(Protocol.FILE);
  router.attachDefault(UploadServerResource.class);
 return router;
   }
}
Resource:
UploadServerResource extends ServerResource implements UploadResource
{
public UploadResult upload(UploadData uploadData) {
   UserService userServiceManager =
UserServiceFactory.getUserService();
   boolean authenticated = userServiceManager.isUserLoggedIn();---
always false in my tests!
   if (authenticated) { ...  result.setSuccess(true); }
   else { ...result.setSuccess(false);   }
   return result;
}
-
Android client code:
ClientResource cr = new ClientResource(http://192.168.1.4:/
upload);
UploadResource resource = cr.wrap(UploadResource.class);
UploadData uploadData = new UploadData();
...
UploadResult result = resource.uploadTrack(uploadData);
...

-- 
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: NFC Secure Element

2011-01-14 Thread gusdgg
Could you tell me how do you enabled SMX (SmartMX) and set the
cardemulation mode? So far, I was able to read and write tags with the
Nexus S.

Thanks

.gusdgg

On 8 ene, 16:30, nemik ne...@nemik.net wrote:
 I was able to enable a secure element the other day by messing around
 with this external/libnfc-nxp library. I enabled SMX (SmartMX) in the
 config headers, and upon booting and monitoring `adb logcat` during
 boot I saw 1 secure elements (a SmartMX one) had been enabled. I was
 then able to change the mode in NfcService.java to cardemulation
 mode.

 The Nexus S is now emulating a MiFare Classic 4k card. However, I am
 not able to read sectors from the card directly. I've been trying to
 use the micmd tool to do that but things act pretty strangely. For
 example, I tried to read block 0 and micmd tells me Could not read
 the data block! Tag halted, reconnecting... but what's even stranger
 is that at that point, 'adb logcat' shuts itself off. As if that read
 command somehow interfered with USB or logging?
 However trying `a` commands to authenticate in micmd always works for
 some reason and it'll even pretent to write and persist data to
 blocks; but of course that data never actually gets persisted to the
 emulated card. Maybe this is a bug in micmd?

 Does anyone know if the Nexus S hardware (or its PN544NFCchipset)
 even contains a hardware secure element like SmartMX? I tried also
 enabling UICC but that didn't seem to work at all andNFCservice
 wouldn't even start in that case. Plus my SIM card is MANY years old
 and not sure it'd even work...

 Either way, I used libnfc.org's `nfc-mfclassic` tool to dump out the
 contents of that emulated 4k card. It is here:http://pastebin.com/zKZ2ELcw

 Seems to be entirely blank which is why I'm wondering if these aren't
 some default values it would spit out anyway even if no SmartMX module
 existed?

 If anyone has any more insights into this, I'd be very happy to hear
 them.

 -Nemanja

 On Dec 19 2010, 7:26 pm, nemik ne...@nemik.net wrote:



  Dominik,

  Yea, that's right. All it does currently is read; at least via the
  Java API. If you look at the kernel source though, a bunch of ifdefs
  which allow foremulationwere all disabled. So full compliance with
  theNFCstandard will have to wait for a future kernel release.

  On Dec 7, 5:42 am, Gruntz Dominik dominik.gru...@fhnw.ch wrote:

   Hi everyone,

   Do I see it right, that the Android 2.3NFCAPI does not provide 
   functionality to access a secure element? A secure element is a smartcard 
   connected to theNFCcontroller, i.e. a secure storage in the device, 
   either embedded in the mobile phone, on the SIM card or on a SD card.

   With JavaME access to the secure element was provided with JSR177 which 
   supported the communication with smart card applications usind APDU 
   commands. I have not seen comparable functionality in package android.nfc.

   Thanks for any hints
   Dominik- Ocultar texto de la cita -

 - Mostrar texto de la cita -

-- 
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] First app

2011-01-14 Thread SAM L
Hi everyone

Am new to this and can`t get this bit of code to work on my virtual
device. I get the following error message. Any input would be really
useful.

Errors:
[2011-01-09 21:03:33 - Cat.Talker] Failed to install Cat.Talker.apk on
device 'emulator-5554!
[2011-01-09 21:03:33 - Cat.Talker] (null)
[2011-01-09 21:03:33 - Cat.Talker] Launch canceled!

Cat.java:

package cat.talker;

import android.app.Activity;
import android.os.Bundle;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class Cat extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

}

public void playSound(View view) {
// First parameter defines the number of channels which should be
played
// in parallel, last one currently not used
SoundPool soundPool = new SoundPool(1, AudioManager.STREAM_MUSIC, 0);
int soundID = soundPool.load(this, R.raw.meow1, 1);

// Getting the user sound settings
AudioManager audioManager = (AudioManager)
getSystemService(AUDIO_SERVICE);
float actualVolume = (float) audioManager
.getStreamVolume(AudioManager.STREAM_MUSIC);
float maxVolume = (float) audioManager
.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
float volume = actualVolume / maxVolume;
soundPool.play(soundID, volume, volume, 1, 0, 1f);
}
}


main.xml:

?xml version=1.0 encoding=utf-8?
AbsoluteLayout
android:id=@+id/widget0
android:layout_width=fill_parent
android:layout_height=fill_parent
xmlns:android=http://schemas.android.com/apk/res/android;

ImageView
android:id=@+id/widget30
android:layout_width=190px
android:layout_height=136px
android:layout_x=20px
android:layout_y=12px

/ImageView
Button
android:id=@+id/Meow1
android:layout_width=197px
android:layout_height=wrap_content
android:text=Meow1
android:layout_x=16px
android:layout_y=161px
android:onClick=playsound

/Button
Button
android:id=@+id/Meow2
android:layout_width=196px
android:layout_height=40px
android:text=Meow2
android:layout_x=17px
android:layout_y=221px

/Button
Button
android:id=@+id/Meow3
android:layout_width=195px
android:layout_height=42px
android:text=Meow3
android:layout_x=17px
android:layout_y=276px

/Button
Button
android:id=@+id/Meow4
android:layout_width=191px
android:layout_height=40px
android:text=Meow4
android:layout_x=18px
android:layout_y=337px

/Button
/AbsoluteLayout


-- 
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] Is it possible to use relative path for the android-sdk in eclipse portable?

2011-01-14 Thread LyR
Hi,

is it possible, that i can use the relative path for the sdk? So i
don't need to adjust the device-letter. If it is possible, where can
i add the relative path?
Until now my opinion is, that the path for the sdk is written in the
com.android.ide.eclipse.adt.prefs file.
Thanks!
Sincerely...

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


Re: [android-developers] Re: What's new in honeycomb?

2011-01-14 Thread Phil Bayfield
I'd make the assumption that with higher resolution phones on the way soon
that Honeycomb would be for phones also with a similar UI and the same API,
would be interesting to hear more on this though if anyone knows and is
allowed to reveal at this stage.

On 10 January 2011 08:43, mort m...@sto-helit.de wrote:

 I don't know if I get a bit off-topic, but it's still related to
 Honeycomb and tablets:
 I've seen several apps in the Honeycomb videos which displayed in one
 screen what must've been multiple Activities before, like e.g. the
 mail list and single mail view.
 Will there be an easy way to support multiple visible Activities, or
 is it just hard work to create mightier Widgets (e.g. something like
 the mail list as Widget instead of ListActivity) and lots of if that
 Widget exists in the current layout ...?
 I think it'd be a good idea to give developers some chance to prepare
 for things like that. Properly supporting tablets is more than just
 supporting a different screen size, it's often a completely different
 UI that must be supported in the same app...
 Also, can you give some hints how the future way is planned? Will
 there be a Honeycomb for smartphones with a different UI? Will tablet
 and smartphone APIs remain compatible? (You know the problem with the
 bad long f word... ;))

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


-- 
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: ProGuard Integration?

2011-01-14 Thread lionscribe
The problem is not with the bat file, it's with proguard itself. I
checked the Bat file, and it just passes what it gets.
ADT could easily have bypassed this problem by passing it the short
name version of all files passe , including in the .pro file.
In the meantime, I created my own script, that converts all scripts,
and allows the export functionality to work fine from within eclipse,
even when there are spaces in the file path (but not in the file
name).
You will have to have Perl installed, with the Win32 module (included
in ActiveState).

The following is the perl script;

#!/usr/bin/perl

# File Name: LaunchProguardShortNames.pl
# Created by: Lionscribe 2011
# License: Public, use completely at own risk.

use strict;
use Win32;

my $fileName;
my $i;
my @lines;
my $line;

my $argc = @ARGV;
if ($argc  1)
{
print \nUsage: perl LaunchProguardShortNames.pl Executible.exe
[Args]\n;
exit;
}

for ($i = 0; $i$argc; $i++)
{
$ARGV[$i] = FixFileNameString($ARGV[$i]);
if ($ARGV[$i] =~ /(.*?)(\D:\\.*pro\b)(.*)/) #it's a pro file
{
$fileName = $2;
open(FILE, $fileName) or die(Unable to open file '$fileName');

# read file into an array
@lines = FILE;
# close file
close(FILE);

open(FILE, $fileName) or die(Unable to open file 
'$fileName' for
output);
my $oldh = select(FILE);#We select it so that we can 
disable
buffering
$| = 1;
foreach $line (@lines)
{
print FixFileNameString($line);
print \n;
}
close(FILE);
select ($oldh);
}
}
system @ARGV;


sub FixFileNameString
{
my $str;
my $shortName;

$str = $_[0];
$str =~ /(.*?)(\D:\\.*\\)(.*)/;

if (defined($1))
{
$shortName =  Win32::GetShortPathName($2);
if (!defined($shortName))
{
$shortName = $2;
}
$str = $1$shortName$3;
}
return $str;;
}

# End File: LaunchProguardShortNames.pl

save this file in the android-sdk folder in the subfolder tools
\proguard\bin as LaunchProguardShortNames.pl
Then edit in the above folder the file called proguard.bat, change the
last line that reads:
call %java_exe% -jar %PROGUARD_HOME%\lib\proguard.jar %1 %2 %3 %4 %5
%6 %7 %8 %9
change it to:
call perl LaunchProguardShortNames.pl %java_exe% -jar %PROGUARD_HOME
%\lib\proguard.jar %1 %2 %3 %4 %5 %6 %7 %8 %9

and viola, export should work from eclipse.
Enjoy,
Lionscribe



On Dec 6 2010, 11:40 pm, Xavier Ducrohet x...@android.com wrote:
 Michael,

 We're fixing ADT to properly report what the problem really is but we
 just noticed the .bat thatproguardships with doesn't support path
 with spaces.
 We'll provide our own .bat for the next tools release but in the mean
 time you may want to check this.

 Xav





 On Mon, Dec 6, 2010 at 3:37 PM, Michael A. michael.aki...@gmail.com wrote:
  I'm getting an error when trying to export usingProguard:

  !MESSAGE Failed to export application
  !STACK 0
  com.android.ide.eclipse.adt.internal.build.ProguardResultException
         at
  com.android.ide.eclipse.adt.internal.build.BuildHelper.runProguard(Unknown
  Source)
         at
  com.android.ide.eclipse.adt.internal.project.ExportHelper.exportReleaseApk(­Unknown
  Source)
         at
  com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.doExport(U­nknown
  Source)
         at
  com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.access
  $0(Unknown Source)
         at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard
  $1.run(Unknown Source)
         at org.eclipse.jface.operation.ModalContext
  $ModalContextThread.run(ModalContext.java:121)

  This is a brand new, clean project in Eclipse Helios (Win7) with - as
  far as I know - the latest plugin and SDK. I'm guessing that there's
  something in my Eclipse/Windows environment that needs to be set up.
  Any tips?

  Regards,

  Michael A.

  On Dec 7, 12:18 am, Michael A. michael.aki...@gmail.com wrote:
  Thanks. I found it shortly after posting this (incidentally, the link
  in the Android market points to the wrong page).

  Great stuff. I love the many small things like these in 2.3 that help
  makes the lives of the developers easier. :-)

  Regards,

  Michael A.

  On Dec 7, 12:07 am, Xavier Ducrohet x...@android.com wrote:

   Doc about the integration is 
   there:http://developer.android.com/guide/developing/tools/proguard.html

   In a nutshell:
   - it's packaged with the SDK
   - all you have to do is create aproguardconfig file somewhere and
   specify its location in default.properties.
   - Whenever you do a release build (ant release or export
   signed/unsigned package from Eclipse) it'll 

[android-developers] SUI DEVELOPER

2011-01-14 Thread rimsy chandna
Dear Associates,



Please let me know your interest in the following position:

Job Description:
Title: Senior UI Developer

Duration: Long Term

Bill Rate : Open



Responsibilities and requirements

Develop prototypes and production level code for our consumer and enterprise
products using xHTML, CSS, Flash, Flex, JavaScript, AJAX, jQuery, and other
web technologies.

Contribute to and drive user-centered designs and support user research and
usability testing.

Qualifications:
A four-year degree in Computer Science; Computer Information Systems; or
related field is required
Greater than 5 years of professional experience designing interfaces on
large scale projects.
A mastery of web standards and user-centered design principles
Expert skill level with jQuery, AJAX, Flash, Flex, xHTML, JavaScript, DOM,
CSS.
Familiar with web development technologies such as JSP, Struts, Spring,
JAVA, etc.
Ability to effectively demonstrate creative and process skills as they
relate to interface design
Articulate design concepts and prototypes, with the ability to define your
vision for the project in a variety of ways…written, visually, and
verbally.
Ability to provide team leadership and demonstrate the ability to drive a
project to completion
Strong verbal communication and interpersonal skills, and the ability to
work independently as well as on a team.



Kindly send me the updated Resume at
resu...@requistech.comhttps://mail.google.com/mail/h/13w1m059mhf80/?v=bcs=whto=resu...@requistech.com
along
with following details which are mandatory for submission.

1) Full Name:
2) Availability:
3) Contact number:
4) Current Location:
5) Visa Status:
6) Rate:



*If I need more information I will contact you.  *



Thanks  Regards,
Rimsy

resu...@requistech.comhttps://mail.google.com/mail/h/13w1m059mhf80/?v=bcs=whto=resu...@requistech.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] Lat/long coord to pixel screen XY coord without showing MapView

2011-01-14 Thread Machete
Hi guys, I need to convert the lat/long coord to pixel xy coord to
show a dot on the top of some image, I know I can use the following
code inside MapView to do that conversion:

mapView.getProjection().toPixels(location.getPoint(), screenCoords);
int x=screenCoords.x;
int y=screenCoords.y;


however, I don't want to show or use the MapView, I just want to
extract the X and Y screen coord, because I have my own background, my
app will use a simple ImageView to display that background and I want
to draw a little dot on canvas, on the top of that background, that
dot will only appear if that location respect some range.

To better understand the question, imagine I have an aerial photo
showing some building, I know the lat/long of that building, and I
want to display a dot representing the building and a second dot if my
actual position is near from that local.

How I can get the XY pixel screen position of that location without
showing the MapView?

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


  1   2   3   4   5   >