[android-developers] Converting a view to Bitmap

2019-10-27 Thread Pablo Costa
Hi Everyone.
I am stuck with a project for more than one week and i really can't figure 
out a solution.

What i've been trying to do is:
1) Create a Custom View (OK)
2) Override the method onDraw and then do something with the canvas (Ok)
3) Add the CustomView to the activity_main.xml - so it will be acessible 
from MainActivity
4) On the MainAcvitiy, convert  this custom view to a bitmap´(here starts 
the problems )

I've tried several methods but i can't convert my View to bitmap. Whenever 
i try to access its contents or properties, its like the object is null 
(because width and height are 0).
People told me i should access this view from an 
ViewTreeObserver.doOnGloballayout but the results were the same.
When i try to toast the View width\height, it shows 0 for both. 

Any input is appreciated.

activity_main.xml
https://pastebin.com/gj77Caqk
ViewTreeObserver.doOnGlobalLayout Extension method
https://pastebin.com/1pdKyVy6
CustomView.kt
https://pastebin.com/ScWM58SE
MainActivity.kt
https://pastebin.com/71cefUUj
Extension method for converting a view to BitMap
https://pastebin.com/ivFSPezB

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/29434eac-9cff-48aa-a39e-16677111cb55%40googlegroups.com.


[android-developers] how to use Epubli?

2016-10-09 Thread pablo reinoso
i try use but import de libs in my proyect in android studio and the word 
R. is in red, and not build apk.

the epublib is create by Siegman

sory,mybad english, helpme please!

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/fd8b8216-09ea-43ad-9f37-cae5029c14b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Can't read new prefered APN when network changes

2016-09-30 Thread Pablo Sánchez
Hello

On android API 20+ (previous API levels had the apn read blocked), I have a 
problem detecting the currently selected APN when the device changes it 
(when going to another country and changing from the current network to 
roaming). The preferapn does not change, it always return the same value:

Uri uri = Uri.parse("content://telephony/carriers/preferapn");
Cursor cursor = getContentResolver().query(uri, new String[] 
{Telephony.Carriers.APN}, null, null, 
Telephony.Carriers.DEFAULT_SORT_ORDER);
if (null != cursor) {
try {
while (cursor.moveToNext()) {
String apn = 
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.APN));
Log.d("APNs",apn);
}
} finally {
cursor.close();
}
}

But if I manually go to the APN settings (Settings -> More -> Mobile 
networks -> Access point names), when I go back to the app, the returned 
value changes to the new value.

The list of current APN is automatically changing, I don't have to go to 
the APN settings menu to get the changes, but querying the 
telephony/carriers or telephony/carriers/current I can't find a way to see 
the selected APN:

Uri uri = Uri.parse("content://telephony/carriers/current");
Cursor cursor = getContentResolver().query(uri, new String[] 
{Telephony.Carriers.APN}, null, null, 
Telephony.Carriers.DEFAULT_SORT_ORDER);
if (null != cursor) {
try {
while (cursor.moveToNext()) {
String apn = 
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.APN));
Log.d("APNs",apn);
}
} finally {
cursor.close();
}
}

Has anyone have a clue of why the preferapn isn't updating when the network 
changes?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/8d5f313a-9111-4a46-94b7-5dbf2c09821b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Cant unenroll/uninstall Android N beta

2016-06-17 Thread Juan Pablo González
Same problem here with Developer Preview 4... I unrolled my device from 
beta this morning and can't receive the OTA downgrade...
I restored my device and nothing also... :(

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/5cbd3bcd-2810-450d-a616-cbd06a0be43a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] google drive aplication in python

2016-03-06 Thread Pablo Fernandez Grado
I need to make an application in python. I want to upload and download 
files at my Google Drive and I already do it. But when i try to upload o 
download some file, the app redirects me to the web page to authorize the 
access. I use OAuth 2.0.
I want to skip this step. I don't want authorize all the times that I want 
to use the product.
How I must make this?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/60a1d404-6a9c-40ef-86e0-163d56ede57e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] App Radio Streaming

2012-11-14 Thread Juan Pablo Neveu
Hello,

What Live streaming protocol recommended for making an application for a 
radio? http or rtsp, etc.? Android runs Shoutcast uncut?

Thanks.

Juan Pablo

-- 
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] Touch by Explore or Screen Reader

2012-10-17 Thread Juan Pablo Herrera Gómez
Regards,

I'm starting with Android and applications made in a job that I do is for 
the blind, I studied the code Eyes Free, but is quite complex for what is 
required. The idea is, I have several buttons on the screen and use your 
finger to blind to know what controls are passed over if one of them, using 
TTS, accessibility of services I think is called Touch by Explore. Can 
anyone help me with a simple example about this?

If Explore by Touch or touch exploration is turned on, then I can slide my 
finger over the screen to find out what is on it. Whenever my 
finger touches a button, block of text, edit field, etc., the screen 
reader lets me know. 

The idea is to make my own code, a simple example with two buttons.

Thank you very much

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

[android-developers] Activities in Android Game

2012-06-29 Thread Pablo Ramon
Hi, I was designing my game, but I've a big doubt, and I don't Know how is 
usually solved.

If my game has a Main menu, level selector, etc... Will I create an 
activity for any menu, or only one Activity that manage a SurfaceView and 
helping with states Draw the especified menu?

 What I should do?

Thanks, (and sorry for my English, It's rusty :) )

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

2012-03-04 Thread Pablo Lopez
buenas buenas tengo un xperia x8 y se quedo muerto, no pasa de la
pantalla de inicio con el primer logo de Sony ya probe con PC
Companion y nada, necesito una mano para revivirlo.
El telefono esta root, por aquello Gracias espero puedan ayudarme

-- 
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] Eclipse Android Graphical Layout is not giving the options on properties window

2011-10-12 Thread Pablo Fernandes
I wanted just to register that everything is working perfectly now.

the r14 preview solved until now all of my interface problems. (thanks so
much for the help)
*
*
*Pablo Fernandes*

*I´m involved in so many things and
**this **is **my very personal e-mail address ;)*


* http:// http://goog_627633143*blog.veezor.com/pablo
 +54 91134390732  Buenos Aires
 +55 11 8244 7119  São Paulo
 +55 84 9903 0947  Natal
 @_PabloFernandes http://twitter.com/_PabloFernandes   Pabluez
 http://facebook.com/mrPabloFernandes
 pabluez  Freenode:p4blu3z:#veezor

*Copyleft - all rights reversed.*



On Tue, Oct 4, 2011 at 9:11 AM, Pablo Fernandes pabl...@gmail.com wrote:

 Tor,

 i'm gonna do this until tomorrow and i will post the results. Now i'm using
 the r12 version of ADT (that is what was available when i followed the
 installations steps on android.com). I didn't know about the r14 preview.
 (VERY good news though).

 thank you so much for the help and i'll post it back in a few hours.

 Pablo Fernandes


-- 
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] Eclipse Android Graphical Layout is not giving the options on properties window

2011-10-04 Thread Pablo Fernandes
Tor,

i'm gonna do this until tomorrow and i will post the results. Now i'm using
the r12 version of ADT (that is what was available when i followed the
installations steps on android.com). I didn't know about the r14 preview.
(VERY good news though).

thank you so much for the help and i'll post it back in a few hours.

Pablo Fernandes

-- 
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 Android Graphical Layout is not giving the options on properties window

2011-10-03 Thread Pablo Fernandes
Hello fellows

Eclipse Android Graphical Layout is not giving the options on properties
window.

example: When i select any widget on my graphical layout editor to show the
properties, when i click on Text property (value field) it shows the ...
button to select a string. When i click on the button, nothing happens and i
have to fill it by myself. The same for other properties like Gravity (i
have to fill it by myself instead of show me the options like center, etc.

I've just updated to the last version available, anyway, this installation
is very fresh (last weekend). I'm running on a ubuntu 11.04 also updated
today. But this always happened to me, it never worked actually :( very
frustrating.

do you guys have any idea about what could be my problem?

thanks a lot in advance

Regards

Pablo

-- 
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] Creating a database to initialize an application

2011-09-27 Thread Pablo Moreno
I'm starting to develop an application using SQLite and wanted to know if
the more correct would be to create my database after the splash screen of
the application, and if it is correct my question, what is the best way to
proceed to realize this creation.

I used the Runnable to create the splash screen, I put the scripts into it
and open the main activity?





Regards!!

-- 
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] Just received Lodsys letter...

2011-08-17 Thread Pablo Escribano
Hello David:

from Spain with love, mandalos al carajo, this is Europe

Regards,

Pablo

Este mensaje y sus anexos son confidenciales. No podrá ser revelado ni
utilizado por nadie que no sea el destinatario. Si lo recibiera por error,
por favor avise al remitente, y destruya el mensaje inmediatamente. Gracias.

This message and its attachments are confidential. If you have received it
in error, please notify us  and destroy this message inmediately. You must
not copy, distribute or take any action in reliance on it. Thank you.


2011/8/17 David Erosa García soul...@gmail.com

 Hi all.

 I'm a solo developer from Spain and just received a letter from
 lodsys claiming infringment for 4 US patents...
 I've been in shock since I received it an hour ago and just wanted to
 know if any of you has any kind of advise for this situation...  I do
 understand almost nothing of the lawyer-style language of the letter
 :(

 Regards.

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

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

2011-07-04 Thread Pablo A
Hei, by trying to make an aplication for android i obtained an
exception:

glSwapBuffer exception.

I do not have any idea about what this exception means. Any idea??
Thanks for everything

-- 
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 enable FTS3 module for SQLite

2010-09-09 Thread Pablo López
Hi everyone,

I am trying to use FTS3 queries but I get the following error:

09-09 09:10:23.740: ERROR/Database(271): Failure 1 (no such module:
ft3) on 0x222678 when executing 'create virtual table'
09-09 09:11:13.230: ERROR/AndroidRuntime(271): FATAL EXCEPTION: main
09-09 09:11:13.230: ERROR/AndroidRuntime(271):
java.lang.RuntimeException: Unable to start activity:
android.database.sqlite.SQLiteException: no such module: ft3
09-09 09:11:13.230: ERROR/AndroidRuntime(271): Caused by:
android.database.sqlite.SQLiteException: no such module: ft3

I haven't been able to find any info about how to enable or install
this module, just about how to use it. Any help?

Thanks!!

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


[android-developers] TabHost issue in 1.5

2010-02-23 Thread Pablo Szyrko
Hi,
I have a TabActivity that contains three tabs and the content launch a
new activity. The code works for 1.6 and later but doesn't work for
1.5.

I found a old thread with the same problem but without answer:
http://www.mail-archive.com/android-developers@googlegroups.com/msg35229.html
Could you help me?
Thanks, Pablo

This is the exception thrown when the activity is shown:

02-23 10:26:00.669: ERROR/AndroidRuntime(1271):
java.lang.StackOverflowError
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.locks.ReentrantLock
$NonfairSync.lock(ReentrantLock.java:177)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:252)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.CopyOnWriteArrayList.removeRange(CopyOnWriteArrayList.java:
583)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.CopyOnWriteArrayList.remove(CopyOnWriteArrayList.java:
380)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
java.util.concurrent.CopyOnWriteArrayList.remove(CopyOnWriteArrayList.java:
390)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:
377)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.TextView.onDraw(TextView.java:3753)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5838)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5841)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.AbsListView.dispatchDraw(AbsListView.java:1326)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.ListView.dispatchDraw(ListView.java:2863)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5944)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.AbsListView.draw(AbsListView.java:2180)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5841)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
com.szyrko.FastScrollView.draw(FastScrollView.java:161)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.View.draw(View.java:5841)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
02-23 10:26:00.669: ERROR/AndroidRuntime(1271

[android-developers] Re: APK not visible in market for HTC Tattoo Android Phone ?

2010-02-02 Thread Pablo Szyrko
Hi,
I'm having the same issue. Is it needed any additional configuration?
thanks in advance, Pablo

On 7 ene, 13:25, Mark Wyszomierski mar...@gmail.com wrote:
 Hi,

 I'm trying to verify this - my app has the following in its manifest:

  supports-screens
   android:smallScreens=true
   android:normalScreens=true
   android:largeScreens=true
   android:anyDensity=true
   /

  uses-sdk android:minSdkVersion=3 android:targetSdkVersion=5 /
  uses-feature android:name=android.hardware.camera /

 but it still does not appear fortattoo. Is there something else we
 need to add? It does have a camera, right?

 Thanks

 On Dec 30 2009, 11:15 am, Sena Gbeckor-Kove s...@imkon.com wrote:

  Hi,

  It does indeed only show apps which are compatible with the device.

  S
  On 30 Dec 2009, at 17:13, croco wrote:

   moneytoo thanks,

   You exactly answered what i want to know!! because android would have
   been the first software to not ensure ascending compatibility if i had
   to have to build  ;)

   I just hope is the unique reason why it does not appear ontattoo.
   Saying that just because i would be surprised that the market search
   done by users check on the fly only the apk compatible with device. If
   it is able to do that on the fly WoW  this is the god OS.

   Thank you.

   Croco

   On Dec 30, 12:40 pm, moneytoo m...@seznam.cz wrote:
   Just build your app using 1.6 SDK and add the supports-screens tag.
   Your app will be visible on devices 1.5 and later if you use uses-sdk
   android:minSdkVersion=3 / and will work as long you don't use 1.6
   specific API.

   On Dec 30, 12:23 pm, croco zeug...@gmail.com wrote:

   Thank you Sena for your hint,

   i developped my app on version 3 uses-sdk android:minSdkVersion=3 /

   the supports-screens android:smallScreens=true
                   android:normalScreens=true android:largeScreens=true
                   android:anyDensity=true /

   is for 1.6 + sdk 

   Does it mean a 1.5 based APK is not visible on market for low density
   device?

   If the device are 1.6 + android based no problem i will update the APK
   sdk but if some remain on 1.5 does it mean i need to version of my app
   which i think it is impossible for package name rule on Android
   Market.

   Thank you.

   Croco

   On Dec 30, 10:54 am, Sena Gbeckor-Kove s...@imkon.com wrote:

   Thetattoohas a low density screen if I remember correctly. Your 
   application would have to support low density screens explicitly for 
   it to show up in the market.

   Regards
   S

   On 30 Dec 2009, at 10:38, croco wrote:

   Hi all,

   I'm reporting byTattoousers than my game World of Bombs author
   zeugame is not available onTattoo+ Android Market 1.6?

   I really don't have idea what's wrong with this configuration?

   Personally i'veHTCmagic + Android Market 1.6 and it rocks like for
   severals thousands registered account on the game.

   If some otherTattoousers could confirm please? And over all why it
   is not visible in the market and how to solve this? Need to contact
   Google?

   Thank you for your help.

   Best Regards

   Croco

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

   ---

   Sena Gbeckor-Kove
   CTO/Founder - imKon

   UK : +44 7788 146652
   NL : +31 62 434 1290
   s...@imkon.com    |    www.imkon.com

   Asia (Singapore) :
   35 Selegie Road, #09-14/15 Parklane Shopping Mall, 188307 Singapore, 
   Singapore

   Europe (London) :
   145-157 St John's St, EC1V 4PY London, UK

    smime.p7s
   3KViewDownload

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

  ---

  Sena Gbeckor-Kove
  CTO/Founder - imKon

  UK : +44 7788 146652
  NL : +31 62 434 1290
  s...@imkon.com    |    www.imkon.com

  Asia (Singapore) :
  35 Selegie Road, #09-14/15 Parklane Shopping Mall, 188307 Singapore, 
  Singapore

  Europe (London) :
  145-157 St John's St, EC1V 4PY London, UK

   smime.p7s
  3KViewDownload

-- 
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] Broadcast receiver for ACTION_UP of the camera button

2010-01-06 Thread pablo
Hi

Samsung Galaxy, Android 1.5. I'm trying to detect when the user
releases the camera button. I have a receiver that gets the
ACTION_CAMERA_BUTTON intent and examines the EXTRA_KEY_EVENT that
comes with it,using the following code (in the onReceive() in the
receiver)

@Override
public void onReceive(Context context, Intent intent) {
String intent_action = intent.getAction();
 if (intent_action.equals(Intent.ACTION_CAMERA_BUTTON) ) {
abortBroadcast();
KeyEvent key = (KeyEvent) intent.getParcelableExtra
(Intent.EXTRA_KEY_EVENT);

if ( key.getAction() == KeyEvent.ACTION_DOWN )
Toast.makeText(context, press,
Toast.LENGTH_SHORT).show();
else if ( key.getAction() == KeyEvent.ACTION_UP )
Toast.makeText(context, release,
Toast.LENGTH_SHORT).show();
else if ( key.getAction() == KeyEvent.ACTION_MULTIPLE )
Toast.makeText(context, multi,
Toast.LENGTH_SHORT).show();
}
}

When I press the button, I only get the press popup.

Is this a limitation in the phone or in Android? Is there another way
to detect the release of the camera key?
-- 
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] Led notification on Motorola Milestone

2010-01-05 Thread Pablo Szyrko
Hi all,
I'm dealing with an issue related with notifications.
My application shows led notification for some events, but it isn't
working in the Motorola Milestone (i'm not sure if it doesn't work in
the Motorola DROID also). Led notifications are shown in HTC Hero,
Magic and G1

This is my code:

Notification notif = new Notification();
notif.flags |= Notification.FLAG_SHOW_LIGHTS;
notif.ledOnMS = 200;
notif.ledOffMS = 200;
notificationManager.notify(LED_NOTIFICATION, notif);

Do you know if this code is OK? i don't know if i'm missing something.
Thanks, Pablo

-- 
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] Question about sockets and connectivity

2009-12-22 Thread Pablo Szyrko
I'm the developer of an application that needs to keep a permanent
connection with a remote server. In order to achieve this goal a
socket instance is created when the application startups. The
outputstream and inputstrem instances associated with the socket are
used to exchange the data with the server. Also i have implemented a
reconnection mechanism: when the connectivity of the device is down i
launch a reconnection thread that detects if the connectivty has been
restarted to recreate the connection with the server (creating a new
socket). The main problem is a lot of users that have downloaded the
application reported that the application only keeps connected a few
minutes and is reconnecting so much.
So these are my questions:
-Is my approach (use a socket object) right to keep a permanent
connection with a server?
-Is there a limit of socket instances created in the same session of
an application? Sometimes happens that after 10/20 tries the socket
instance can't be created and the only alternative is closing the
application and starting it again. Please take in account that this
issue doesn't happen always.
-Do you know if Android platform provides another way to achieve my
goal?
I will appreciate your help.
Thanks, Pablo

-- 
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 button in the emulator is disabled?

2009-11-19 Thread pablo
Hi,

The camera button on the android emulator is disabled. I can't click
on it and when I hover with the mouse the background is not blue like
in the other buttons. I've tried to add camera support - true
hardware but the button is still un-clickable.

How can I click on the button? What should happen when clicking on the
button? I don't have an real android device so I might be able to
click on the button without knowing it.

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] Workaround for preferences UI issue with android:Theme.Light.NoTitleBar

2009-11-11 Thread Pablo Szyrko
I am using the theme Theme.Light.NoTitleBar in my application and it
is not working well for preference activities:
-The initial preference activity is shown ok
-But the child preferences screens doesn't look good:
  -The backgound is black
  -The color of the items on the list is black and can't be read.

There is a open issue regarding this issue (issue 922) and i think i
have to create my own theme which parent will be
Theme.Light.NoTitleBar. My question is: which changes should be
implemented in my custom theme to fix the preference UI issue?
Thanks, Pablo

-- 
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 Calling getContentResolver().query for video file URI

2009-10-29 Thread Pablo Szyrko

Sometimes (this happens randomly) my application crashes when it tries
to perform a query passing as parameter a video file URI.
I have found a similar issue (http://groups.google.com/group/android-
developers/msg/0715a5f641ef0757) but it doesn't have any reply.
Thanks, Pablo

Following is the stacktrace:

10-27 15:15:05.531: ERROR/MediaPlayer(37): Unable to to create media
player
10-27 15:15:05.531: ERROR/CameraService(37): Failed to load
CameraService sounds.
10-27 15:15:05.531: ERROR/Camera(931): _getParameters:
antibanding=auto;antibanding-values=off,50hz,
60hz,auto;brightness=5;brightness-max=10;brightness-
min=0;contrast=5;contrast-max=10;contrast-min=0;effect=none;effect-
values=mono,negative,solarize,pastel,mosaic,resize,sepia,posterize,whiteboard,blackboard,aqua;img-
timestamp=0;jpeg-quality=100;jpeg-thumbnail-height=384;jpeg-thumbnail-
quality=30;jpeg-thumbnail-width=512;luma-adaptation=0;meter-mode=meter-
average;meter-mode-values=meter-spot,meter-center,meter-
average;nightshot-mode=0;picture-format=jpeg;picture-
size=2048x1536;preview-format=yuv420sp;preview-frame-rate=15;preview-
size=480x320;rotation=0;saturation=5;saturation-max=10;saturation-
min=0;sharpness=15;sharpness-max=30;sharpness-min=0;taking-picture-
zoom=0;taking-picture-zoom-max=40;taking-picture-zoom-
min=0;whitebalance=auto;whitebalance-
values=auto,custom,incandescent,fluorescent,daylight,cloudy,twilight,shade
10-27 15:15:05.801: ERROR/Camera(931): setParameters()
10-27 15:15:05.821: ERROR/QualcommCameraHardware(37):
LINK_camera_set_thumbnail_properties returned 2
10-27 15:15:10.381: ERROR/QualcommCameraHardware(37): camera cb:
autofocus has started.
10-27 15:15:12.993: ERROR/QualcommCameraHardware(37): camera cb:
autofocus succeeded.
10-27 15:15:13.111: ERROR/(37): Dynamically Loading the library :
libOmxVidEnc.so
10-27 15:15:13.111: ERROR/OMXVenc(37): get_parameter::788 unsupported
index 267887431
10-27 15:15:13.111: ERROR/VENC_DRV(37): venc_drv_malloc::1138 phys
lookup success 0x41ba8000 -- 0x26a0 -- size - 2097152
10-27 15:15:13.131: ERROR/QualcommCameraHardware(37):
LINK_camera_set_thumbnail_properties returned 2
10-27 15:15:13.191: ERROR/VENC_DRV(37): venc_drv_rtos_msg_cb::1081
received invalid message ID from VIDEOENC task, 65535
10-27 15:15:13.311: ERROR/QualcommCameraHardware(37): startPreview is
already in progress, doing nothing.
10-27 15:15:20.532: ERROR/HardwareService(63): GetPreferredValue
(settings.display.brightness, 102) failed!
10-27 15:15:20.532: ERROR/HardwareService(63): GetPreferredValue
(settings.display.brightness): read from property = 102
10-27 15:15:30.212: ERROR/HardwareService(63): GetPreferredValue
(settings.display.brightness, 102) failed!
10-27 15:15:30.212: ERROR/HardwareService(63): GetPreferredValue
(settings.display.brightness): read from property = 102
10-27 15:15:30.212: ERROR/HardwareService(63): GetPreferredValue
(settings.display.brightness, 102) failed!
10-27 15:15:30.221: ERROR/HardwareService(63): GetPreferredValue
(settings.display.brightness): read from property = 102
10-27 15:15:31.463: ERROR/VENC(37): venc_stop::772 finalizing stop in
context of caller(command)
10-27 15:15:31.463: ERROR/VENC_DRV(37): venc_drv_close::529 Send
VENC_IDLE_CMD to DSP
10-27 15:15:31.463: ERROR/VENC_DRV(37): venc_drv_rtos_msg_cb::1064
received QDSP_VIDEOENCTASK_VENC_CMD_DONE_MSG callback from DSP for
VENC_IDLE_CMD
10-27 15:15:31.471: ERROR/VENC_DRV(37): venc_drv_close::577
venc_drv_close: counter (0), venc_idle_cmd_done_recved(1)
10-27 15:15:38.301: ERROR/QualcommCameraHardware(37): Preview not in
progress!
10-27 15:15:38.311: ERROR/LocationHandler(931): mLocationManager ==
null
10-27 15:15:38.421: ERROR/AndroidRuntime(753): Uncaught handler:
thread main exiting due to uncaught exception
10-27 15:15:38.551: ERROR/AndroidRuntime(753):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.nimbuzz/com.pas.InboxMessageComposerScreen}:
java.lang.NullPointerException
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:
3278)
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
android.app.ActivityThread.access$1900(ActivityThread.java:112)
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
android.os.Handler.dispatchMessage(Handler.java:99)
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
android.os.Looper.loop(Looper.java:123)
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
android.app.ActivityThread.main(ActivityThread.java:3948)
10-27 15:15:38.551: ERROR/AndroidRuntime(753): at
java.lang.reflect.Method.invokeNative

[android-developers] Re: Make different instances of a widget behave different based on their appWidgetId

2009-10-09 Thread Pablo

Thank you very much :)

Thats is exactly what I was looking for.

for future reference:
We changed the way we work with intents and used URIs, now it works
beautifully.
(dont forget your data android:schema... / in your receivers
intent-filter !!)

thanks Amitkeerti

On Oct 7, 7:28 am, Amitkeerti amitkee...@gmail.com wrote:
 you might be facing a problem because of the pending intent.
 Inorder to differentiate the two intents, you set 2 different URLs in
 the intent.
 (i.e. when you create your intent instead of adding mAppWidgetId as
 putExtra, create an URL out of it and add it as intent1.setData(URI))

 your extra data actually goes into a bundle in the Intent where as the
 URI gets stored in a different variable. So differentiating 2 intents
 based on getData do the trick (rather than differentiating based on
 putExtra(id, int))

 On Oct 7, 1:38 am, Pablo pablo.llo...@gmail.com wrote:



  A solution (or rather a workaround) was found.
  I am posting this for future reference:

  It was simpler than I thought, but it didn't occur to me or my friend
  with whom I am developing this widget, until he recently came up with
  this simple solution.

  It consists in having the different flags selected by the users in the
  configuration activity appended as strings to the intent action.

  That way, if you want some instances of your widget to behave by
  outputting sound and others not, setup different action strings
  accordingly.
  (for example, action_button1_sound if the button should output
  sound, and action_button1_nosound for the opposite behavior.

  If you have more than one flag you can set in your configuration
  activity, as it is in our case, you'll have to manifest all possible
  combinations in your intent-filters. You don't have to parse the
  intent action string, though, as that is only needed so the intents do
  not overwrite each other.
  Therefore, you can now read the arguments passed through the extras
  and make the buttons behave accordingly.

  If someone finds a nicer solution I will be happy to hear about it!

  thanks!

  On Oct 5, 10:08 pm, Pablo pablo.llo...@gmail.com wrote:

   I am developing a simple widget which has a couple of buttons in its
   layout.

   Before the widget gets added, the configuration activity is displayed,
   where the user can choose if the widget makes any sounds when the
   buttons get pressed or not.

   Thus, a user can put two instances of the widget, one where he chose
   sound to be activated and another where he chose the opposite.
   However, I can not seem to be able to reproduce the expected behavior
   (that one reproduces sound and the other doesn't).

   The buttons' behavior varies according to the flags specified to the
   PendingIntent:

   - FLAG_UPDATE_CURRENT seems to override the previous intent/setting
   - no flags (0x00) seems to ignore any intent/setting after the first
   instance of the widget is put.

   What I want to do: I want to be able to configure different instances
   of the same widget to behave in a different way, according to what the
   user specified in the configuration activity. I am attempting to do
   this with the help of the appWidgetId of each instance:

   I have tried the following when assigning an action to the click of
   the button:

                           int mAppWidgetId=appWidgetIds[i];
                           Intent intent1=new Intent();
                           
   intent1.setAction(com.spartancoders.intenttest.TEST);
                           Log.d(TEST ONUPDATE,+mAppWidgetId);
                           intent1.putExtra(id, mAppWidgetId);
                           PendingIntent pi1 = 
   PendingIntent.getBroadcast(context,
   0,intent1,PendingIntent.FLAG_UPDATE_CURRENT);

   And in the onReceive() method:

                   Bundle extras = arg1.getExtras();
                   if (arg1!=null){
                           Log.d(TEST ONRECEIVE,+extras.getInt(id));
                   }

   This results in the first widget acting properly (The IDs printed in
   logcat are as expected)
   When adding a second widget, however, the first widget starts
   reporting the second widget's appWidgetId in its onReceive(), when it
   previously did no such thing.
   (because of the FLAG_UPDATE_CURRENT, I guess)

   How can one make different instances behave in a different way?
   Is there a way to do this with the help of the appWidgetId?

   I have elaborated a widget application for the purpose of debugging
   this problem which tries to be minimal, while reproducing the (un)
   desired behavior:

  http://www.2shared.com/file/8243059/b6519584/IntentTesttar.html

   Any help is appreciated, thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers

[android-developers] Re: Make different instances of a widget behave different based on their appWidgetId

2009-10-06 Thread Pablo

A solution (or rather a workaround) was found.
I am posting this for future reference:

It was simpler than I thought, but it didn't occur to me or my friend
with whom I am developing this widget, until he recently came up with
this simple solution.

It consists in having the different flags selected by the users in the
configuration activity appended as strings to the intent action.

That way, if you want some instances of your widget to behave by
outputting sound and others not, setup different action strings
accordingly.
(for example, action_button1_sound if the button should output
sound, and action_button1_nosound for the opposite behavior.

If you have more than one flag you can set in your configuration
activity, as it is in our case, you'll have to manifest all possible
combinations in your intent-filters. You don't have to parse the
intent action string, though, as that is only needed so the intents do
not overwrite each other.
Therefore, you can now read the arguments passed through the extras
and make the buttons behave accordingly.

If someone finds a nicer solution I will be happy to hear about it!

thanks!

On Oct 5, 10:08 pm, Pablo pablo.llo...@gmail.com wrote:
 I am developing a simple widget which has a couple of buttons in its
 layout.

 Before the widget gets added, the configuration activity is displayed,
 where the user can choose if the widget makes any sounds when the
 buttons get pressed or not.

 Thus, a user can put two instances of the widget, one where he chose
 sound to be activated and another where he chose the opposite.
 However, I can not seem to be able to reproduce the expected behavior
 (that one reproduces sound and the other doesn't).

 The buttons' behavior varies according to the flags specified to the
 PendingIntent:

 - FLAG_UPDATE_CURRENT seems to override the previous intent/setting
 - no flags (0x00) seems to ignore any intent/setting after the first
 instance of the widget is put.

 What I want to do: I want to be able to configure different instances
 of the same widget to behave in a different way, according to what the
 user specified in the configuration activity. I am attempting to do
 this with the help of the appWidgetId of each instance:

 I have tried the following when assigning an action to the click of
 the button:

                         int mAppWidgetId=appWidgetIds[i];
                         Intent intent1=new Intent();
                         
 intent1.setAction(com.spartancoders.intenttest.TEST);
                         Log.d(TEST ONUPDATE,+mAppWidgetId);
                         intent1.putExtra(id, mAppWidgetId);
                         PendingIntent pi1 = 
 PendingIntent.getBroadcast(context,
 0,intent1,PendingIntent.FLAG_UPDATE_CURRENT);

 And in the onReceive() method:

                 Bundle extras = arg1.getExtras();
                 if (arg1!=null){
                         Log.d(TEST ONRECEIVE,+extras.getInt(id));
                 }

 This results in the first widget acting properly (The IDs printed in
 logcat are as expected)
 When adding a second widget, however, the first widget starts
 reporting the second widget's appWidgetId in its onReceive(), when it
 previously did no such thing.
 (because of the FLAG_UPDATE_CURRENT, I guess)

 How can one make different instances behave in a different way?
 Is there a way to do this with the help of the appWidgetId?

 I have elaborated a widget application for the purpose of debugging
 this problem which tries to be minimal, while reproducing the (un)
 desired behavior:

 http://www.2shared.com/file/8243059/b6519584/IntentTesttar.html

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



[android-developers] Make different instances of a widget behave different based on their appWidgetId

2009-10-05 Thread Pablo

I am developing a simple widget which has a couple of buttons in its
layout.

Before the widget gets added, the configuration activity is displayed,
where the user can choose if the widget makes any sounds when the
buttons get pressed or not.

Thus, a user can put two instances of the widget, one where he chose
sound to be activated and another where he chose the opposite.
However, I can not seem to be able to reproduce the expected behavior
(that one reproduces sound and the other doesn't).

The buttons' behavior varies according to the flags specified to the
PendingIntent:

- FLAG_UPDATE_CURRENT seems to override the previous intent/setting
- no flags (0x00) seems to ignore any intent/setting after the first
instance of the widget is put.

What I want to do: I want to be able to configure different instances
of the same widget to behave in a different way, according to what the
user specified in the configuration activity. I am attempting to do
this with the help of the appWidgetId of each instance:

I have tried the following when assigning an action to the click of
the button:

int mAppWidgetId=appWidgetIds[i];
Intent intent1=new Intent();
intent1.setAction(com.spartancoders.intenttest.TEST);
Log.d(TEST ONUPDATE,+mAppWidgetId);
intent1.putExtra(id, mAppWidgetId);
PendingIntent pi1 = PendingIntent.getBroadcast(context,
0,intent1,PendingIntent.FLAG_UPDATE_CURRENT);

And in the onReceive() method:

Bundle extras = arg1.getExtras();
if (arg1!=null){
Log.d(TEST ONRECEIVE,+extras.getInt(id));
}

This results in the first widget acting properly (The IDs printed in
logcat are as expected)
When adding a second widget, however, the first widget starts
reporting the second widget's appWidgetId in its onReceive(), when it
previously did no such thing.
(because of the FLAG_UPDATE_CURRENT, I guess)

How can one make different instances behave in a different way?
Is there a way to do this with the help of the appWidgetId?

I have elaborated a widget application for the purpose of debugging
this problem which tries to be minimal, while reproducing the (un)
desired behavior:

http://www.2shared.com/file/8243059/b6519584/IntentTesttar.html

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



[android-developers] Re: ExpatReader: DTD handlers aren't supported.

2009-09-29 Thread Pablo Szyrko

Hi,
I'm getting the same error. Could you fix the issue.
Thanks, Pablo

On 20 sep, 12:47, Maksim mxx...@gmail.com wrote:
 The same here. I'm trying to read XML from sd card.
 Did you find a solution so far?

 On Aug 31, 6:14 pm, synfo...@googlemail.com

 synfo...@googlemail.com wrote:
  I seem to be having a weird issue when parsing XML from a server. In
  LogCat the following warning is displayed:

  08-31 12:05:28.870: WARN/ExpatReader(2031):DTDhandlersaren't
 supported.

  The parser then seems to stop. I can't figure out what is causing this
  problem, my approach doesn't seem any different in this instance with
  regard to parsing XML. Does anyone have any recommendations to fixing
  this issue? Any help would be greatly 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] Get the file path from a URI instance

2009-09-02 Thread Pablo Szyrko

Hi,
I need to get the absolute path of the file associated with a specific
android.net.Uri instance. I know how to get the URI instance based on
the file instance (with Uri.fromFile(file)) and i need the inverse
action.
Thanks in avance, Pablo
--~--~-~--~~~---~--~~
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] Customize search bar UI

2009-08-27 Thread Pablo Szyrko

I am developing an application that needs to extend the functionality
of the android search bar. Basically I need to show a bitmap image for
each suggestion. The current implementation of the search bar enables
to show resource icons (with SearchManager.SUGGEST_COLUMN_ICON_1 and
SearchManager.SUGGEST_COLUMN_ICON_2).
I don't see the way to customize thenative search dialog.
I think it is not a good idea to create my search component. I found
an old entry in this group, but it doesn't have any answer (http://
www.mail-archive.com/android-developers@googlegroups.com/msg31090.html).
Basically the question is the same: is the search UI customizable at
all?
Thanks in advance, Pablo
--~--~-~--~~~---~--~~
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] enable StreetView

2009-08-03 Thread Juan Pablo Hoyos Sanchez
I have enabled StreetView with .setStreetView(true) but it don´t load, so I
don´t know if I have enable other things.

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] Google Maps

2009-08-03 Thread Juan Pablo Hoyos Sanchez
When I click the icon of My location, it opens a tag with information and
when I touch this tag then I go a new Activity that give my more
information,it same pass with StreetView, so How can I do that?

Thank you very much.
Juan Pablo

--~--~-~--~~~---~--~~
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] Tag Google Maps

2009-08-03 Thread Juan Pablo Hoyos Sanchez
When I click the icon of My location, it opens a tag with information and
when I touch this tag then I go a new Activity that give my more
information,it same pass with StreetView, so How can I do that?

Thank you very much.
Juan Pablo

--~--~-~--~~~---~--~~
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] enable StreetView

2009-08-03 Thread Juan Pablo Hoyos Sanchez
I have enabled StreetView with .setStreetView(true) but it don´t load, so I
don´t know if I have enable other things.

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] Tag Google Maps

2009-08-03 Thread Juan Pablo Hoyos Sanchez

When I click the icon of My location, it opens a tag with information
and when I touch this tag then I go a new Activity that give my more
information,it same pass with StreetView, so How can I do that?

Thank you very much.
Juan Pablo

--~--~-~--~~~---~--~~
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: enable StreetView

2009-08-03 Thread Juan Pablo Hoyos Sanchez
thank you

2009/8/3 iñaki inaki.s...@gmail.com

 Take it easy Juan Pablo!!!



 2009/8/3 Juan Pablo Hoyos Sanchez blopa...@gmail.com


 I have enabled StreetView with .setStreetView(true) but it don´t load, so
 I don´t know if I have enable other things.

 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] enable StreetView

2009-07-31 Thread Juan Pablo Hoyos Sanchez
I have enabled StreetView with .setStreetView(true) but it don´t load, so I
don´t know if I have enable other things.

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] [Android Developers] Apps without Android android.app

2009-07-20 Thread Pablo Nebreda Cespedosa

I am questioning if it is possible to develop and run an application
without the Framework provided by Android. I mean, without Activities
and Intents, and only using the underlying Java packages understandable
by the DalvikVM.
I want to do this because I see some limitations for example while using
the openFileOutput() method that does not allow you to specify a path in
the file name.

Please any kind of help or commentary will be welcome.
Regards,
Pablo.
--
This message and any files transmitted with it are confidential and intended 
solely 
for the use of the individual or entity to whom they are addressed. No 
confidentiality 
or privilege is waived or lost by any wrong transmission. 
If you have received this message in error, please immediately destroy it and 
kindly 
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy 
any 
part of this message if you are not the intended recipient. Opinions, 
conclusions and 
other information in this message that do not relate to the official business 
of 
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor 
endorsed by 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: TabHost Listview dissapearing after going to SMS screen and back.

2009-07-17 Thread Pablo Szyrko

I have a similar issue. Is this an Android bug?

On 9 jul, 12:35, extrapedestrian extra.pedestr...@gmail.com wrote:
 its me again, here is simple example to reproduce this bug, please if
 anyone can confirm it, (or point out mistake i make) i would
 appreciate it...

 public class TabHostListView extends TabActivity implements
 TabHost.TabContentFactory {
     /** Called when the activity is first created. */

     private String mListOfResults[] = {item1, item2, item3};

     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         TabHost.TabSpec spec=getTabHost().newTabSpec(First);
         spec.setContent(this);
         spec.setIndicator(First);
         getTabHost().addTab(spec);

         spec=getTabHost().newTabSpec(Second);
         spec.setContent(this);
         spec.setIndicator(Second);
         getTabHost().addTab(spec);
     }

     @Override
     public View createTabContent(String arg0) {
         // create list here
         LayoutInflater inflater = LayoutInflater.from(getBaseContext
 ());
         ListView mLV = (ListView)inflater.inflate
 (R.layout.list_layout, null);
         mLV.setAdapter(new ArrayAdapterString
 (this,android.R.layout.simple_list_item_1,mListOfResults));
         registerForContextMenu(mLV);
         return mLV;
     }

     @Override
     public void onCreateContextMenu(ContextMenu menu, View v,
 ContextMenuInfo menuInfo) {
         // Display sms action
         super.onCreateContextMenu(menu, v, menuInfo);
         menu.setHeaderTitle(Actions menu);
         menu.add(0, 0, 0, SMS);
     }

     public boolean onContextItemSelected(MenuItem item) {
         /* Send SMS */
         try {
             String phone = 123123;
             startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromParts
 (sms, phone, null)));
         } catch (ActivityNotFoundException e) {
             Toast.makeText(getBaseContext(), R.string.failed,
 Toast.LENGTH_SHORT).show();
             Log.e(EdithActivity, SMS Contact failed );
         }
         return super.onContextItemSelected(item);
     }

 }

 list_layout xml file:

 ?xml version=1.0 encoding=utf-8?

 ListView xmlns:android=http://schemas.android.com/apk/res/android;
         android:id=@+id/listTabView
     android:layout_width=fill_parent
     android:layout_height=wrap_content
     /

 Steps to reproduce the bug:

 Start program  - there are two tabs and a list.
 Select list item with longpress - Context menu appears.
 Click SMS - SMS app appears.
 Type in few letters and press back - Toast is displayed, and your are
 back to test activity.
 Try to switch totab2 - there is no content in tab2! List is not
 displayed!

 Make sure you dont go to tab2 first, then it works ok!
 Make sure you type few letters (at least one) in SMS window, if you
 return immediately - it works ok too.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] tabhost disappearing randomly

2009-07-16 Thread Pablo Szyrko

I have an application that has two tabs:
-First tab contains contacts
-Second tab contains chats

Some times when I select the second tab it dissapears and a black
background is shown.
This issue does't happen when the first tab is shown
You can find a picture of the issue here:
http://1.bp.blogspot.com/_2UoVsSnv2Gk/Sl8u2o-tvzI/AJc/RMUMfKUB7X4/s1600-h/chat.JPG
This issue happens randomly and i can't reproduce it consistenly.
Could you help me?
--~--~-~--~~~---~--~~
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: Tabhost Disappearing List view

2009-07-16 Thread Pablo Szyrko

I have posted a new entry (tabhost disappearing randomly) and it
looks like a similar issue.

On 6 jul, 12:56, Georgios Galyfos yorg...@gmail.com wrote:
 Hello, did you by any chance found out what was causing this behavbiour? I
 am facing a similar situation:

 I set setCurrentTab(0) initially and even though the listView under the
 first tab has contents, they are not displayed. This happend all time though
 for me..

 Should the listView have already contents before calling the addTab()? I
 have tried both ways anyway and still nothing...

 Any ideas?

 On Sat, May 2, 2009 at 3:13 PM, cre cretcheu2...@gmail.com wrote:

  Mark,

  Thanks.

  Will do both.

  On May 1, 9:05 pm, Mark Murphy mmur...@commonsware.com wrote:
   cre wrote:
I didn't answer your previous question.  No, there are not problems
with other Adapters only the ones in TabHost.
I went back and looked at the Hierarchyviewer property values and it
shows an item count of 3, which is the number of items in this
ListView that should be visible but are not.  I am sure I will see the
same thing with getCount() next time it fails. So I would say that the-
adapter-thinks-its-empty theory is negative.  It thinks it has 3 items
but has lost the pointer to them somehow.

I also didn't make it clear that this problem only occurs after
leaving the activity and returning. As long as I remain in the
activity there is no problem with the ListViews.  That is why I
suggested putting the code in onResume().

At this point I firmly believe that this is a bug.

   That is quite likely. The question is, a bug in what?

   I recommend you try replacing ArrayAdapter.createFromResource() with
   some other constructed Adapter (e.g., new ArrayAdapter()) and see if the
   problem persists. If the problem goes away, then the problem is fairly
   well narrowed down, and you have a workaround. I suspect that
   createFromResource() is not the most popular way of creating adapters,
   so it is possible the difficulty lies there.

   Also, is this on 1.5 final, or some other edition? If you are not on 1.5
   final, you probably should try it there, since the issue might have been
   resolved.

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

   _The Busy Coder's Guide to Android Development_ Version 2.0 Available!-
  Hide quoted text -

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



[android-developers] Re: tabhost disappearing randomly

2009-07-16 Thread Pablo Szyrko

Someone can help me with this issue?

On 16 jul, 10:49, Pablo Szyrko pablo.szy...@gmail.com wrote:
 I have an application that has two tabs:
 -First tab contains contacts
 -Second tab contains chats

 Some times when I select the second tab it dissapears and a black
 background is shown.
 This issue does't happen when the first tab is shown
 You can find a picture of the issue 
 here:http://1.bp.blogspot.com/_2UoVsSnv2Gk/Sl8u2o-tvzI/AJc/RMUMfKU...
 This issue happensrandomlyand i can't reproduce it consistenly.
 Could you help me?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android TLS implementation

2009-07-13 Thread Pablo Szyrko

Is there any available guide to implement TLS for Android
applications?
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] Bug report: widget does not load if the orientation changes during the configuration

2009-07-13 Thread Pablo Pera

Hi,

I'd like to report a bug we just found while writing a widget.

Summary: There is a widget installed, that defines a configuration
activity. If the user changes the orientation while they are in the
configuration activity, and they finish that activity in a different
orientation that they started, the widget does NOT appear in the home
screen after the configuration is done.

How to reproduce: have a minimal widget, with a configuration activity
that contains a button, which correctly updates the App Widget when it
is clicked (as explained in 
http://developer.android.com/guide/topics/appwidgets/index.html#Configuring).
Add a new instance of the widget, so the config screen shows up.
Change the orientation once. Click on the button. Your widget does not
appear in the home screen. (Ouch.)

If this has already been reported, or if there's a better way to
submit a bug report, please let me know!

Thanks,

Pablo

--~--~-~--~~~---~--~~
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] Launch application after installing issue

2009-07-07 Thread Pablo Szyrko

Hi all,
I'm developing an application that has a login screen that only is
shown when the user has not been registered before. If the user was
registered before the main screen is open. To implement this feature i
have added an initial activity (action=android.intent.action.MAIN,
Category=android.intent.category.LAUNCHER) that shows a splash image
and contains the logic to determine if it is necessary showing the
Login or the Main screen. These activities are launched with the
method startActivity.
The application works OK when it is launched from the Home screen but
i have problems when it is launched clicking the button “OPEN” once it
was installed.
This is the description of the problem:
-Download application from server
-Install application
-Select option “Open”
-The application is open. At this point the applications works OK. The
login screen is shown and the user can enter the login data to open
the main screen.
-Press 'Home' button. Application is minimized.
-Open the application again from and this is the problem: the initial
activity is created again!!! It doesnt't keep the previous state. So,
there are two differents tasks at the same time.

When the application is launched from Home this wrong behaivor doesn't
happen. And i think the problem is the missing flag
FLAG_ACTIVITY_RESET_TASK_IF_NEEDED when the application is open after
installing. This flag is added when the application is open from HOME

The launchMode of the initial screen is set with “singleTop”. I also
tried with singleInstance and singleTask but the behaivor is the same:
the previuos state is not kept.

This is the log when the initial activity is launched after
installing:

07-06 11:26:42.973: INFO/ActivityManager(56): Starting activity:
Intent { action=android.intent.action.MAIN flags=0x1000 comp=
{com.myapplication/com.myapplication.InitScreen}

This is the log when the initial activity is launched from HOME:

07-06 11:27:42.483: INFO/ActivityManager(56): Starting activity:
Intent { action=android.intent.action.MAIN categories=
{android.intent.category.LAUNCHER} flags=0x1020 comp=
{com.myapplication/com.myapplication.InitScreen} }

There is a difference between the flags:  0x1000 vs  0x1020


Does it make sense? How can i launch the application after installing
it and keep the status of the activities once it returns from HOME?

--~--~-~--~~~---~--~~
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] Detect shaking

2009-03-01 Thread J . Pablo Fernández
Hello,

Is there an easy way to detect shaking of the phone? Or do I have to
implement it myself by monitoring the sensors? If so, any hints on how
shaking looks like from the sensor point of view?

Thanks.
-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.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] Testing the menu

2009-02-28 Thread J . Pablo Fernández
Hello,

I'm trying to write an instrumentation test for checking the correct
visibility of menu items according to the state of the application. Do you
know how can I programatically get ahold of the visible menu items, the menu
or something?

Thanks.
-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.com)

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



[android-developers] Re: X and y coordinates for clicks and long clicks

2009-02-22 Thread J . Pablo Fernández
That gives you the x and y coordinates when there's a touch event, not an
onClick, onLongClick or onContextMenuSomething.

On Sun, Feb 22, 2009 at 2:55 PM, Lewis lewisandrewba...@googlemail.comwrote:


 This is how i found x and y coords of a click:

 create an ontouchlistener, override 'onTouch' and use getRawX() to get
 an x coord.


  final OnTouchListener myListener = new OnTouchListener()
{

 public boolean onTouch(View v, MotionEvent event)
 {


 if (event.getAction() == MotionEvent.ACTION_DOWN)
   {
xInit = event.getRawX();
yInit= event.getRawY();
  }
}
 return false;
 }



  Hope this helps

 Lewis


 On Feb 22, 12:15 pm, J. Pablo Fernández pup...@pupeno.com wrote:
  It seems it's also not possible to know where exactly was the long
 clicked
  performed in a view to trigger a context menu. :S
 
  On Sat, Feb 21, 2009 at 3:41 PM, J. Pablo Fernández pup...@pupeno.com
 wrote:
 
   Hello,
 
   When you receive clicks and long clicks, how do you get the x and y
   coordinates that were clicked?
 
   Thanks.
   --
   J. Pablo Fernández pup...@pupeno.com (http://pupeno.com)
 
  --
  J. Pablo Fernández pup...@pupeno.com (http://pupeno.com)
 



-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.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] X and y coordinates for clicks and long clicks

2009-02-21 Thread J . Pablo Fernández
Hello,

When you receive clicks and long clicks, how do you get the x and y
coordinates that were clicked?

Thanks.
-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.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] How do you pass a Bundle to an activity on an instrumentation test case?

2009-01-29 Thread J . Pablo Fernández

Hello,

When implementing an ActivityInstrumentationTestCase, how do you start
the activity with a Bundle of saved state?

Thanks.
--
J. Pablo Fernández pup...@pupeno.com (http://pupeno.com)

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



[android-developers] Re: How do you save the state of an activity on an ActivityUnitTestCase

2009-01-28 Thread J . Pablo Fernández

Thanks. I did give ActivityInstrumentationTestCase a try but it didn't
work. Now I gave it another try with a fresh look and it's partly
running (the test is failing, but I believe the problem is somewhere
else so if I post I'd do it as another thread).

On Sat, Jan 24, 2009 at 9:19 AM, Andrew Stadler stad...@gmail.com wrote:

 Pablo-

 ActivityUnitTestCase is extremely limited in its support for
 operations that require interfacing with the rest of the system,
 because the Activity is never attached to the Activity Manager or the
 rest of the runtime.  It may be possible to fix this particular case
 (so you can make this call via Instrumentation) in an update but in
 the meantime, you will probably find it easier to use
 ActivityInstrumentationTestCase - have you tried that?

 --Andy


 On Thu, Jan 22, 2009 at 12:28 AM, J. Pablo Fernández pup...@pupeno.com 
 wrote:

 Hello,

 In an ActivityUnitTestCase I'm trying to do:

Activity activity = startActivity(INSERT_INTENT, 
 initialState, null);
Bundle outState = new Bundle();

 getInstrumentation().callActivityOnSaveInstanceState(activity, outState);

 But on the save state call I get this trace:

 android.util.AndroidRuntimeException: Acquiring SearchManager objects
 only valid in Activity Contexts.
at 
 android.app.ApplicationContext.getSearchManager(ApplicationContext.java:976)
at 
 android.app.ApplicationContext.getSystemService(ApplicationContext.java:861)
at 
 android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:73)
at android.app.Activity.getSystemService(Activity.java:3091)
at android.app.Activity.performSaveInstanceState(Activity.java:1004)
at 
 android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1255)
at 
 com.blah.blah.SomeActivityTest.testLoadingAndSavingState(SomeActivityTest.java:90)
at java.lang.reflect.Method.invokeNative(Native Method)
at 
 android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:136)
at 
 android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:126)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:155)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:142)
at 
 android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:313)
at 
 android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1508)

 Going through the ApplicationContext source code I've found this
 (http://tinyurl.com/d8qsyc):

private SearchManager getSearchManager() {
// This is only useable in Activity Contexts
if (getActivityToken() == null) {
throw new AndroidRuntimeException(
Acquiring SearchManager objects only valid in
 Activity Contexts.);
}
synchronized (mSync) {
if (mSearchManager == null) {
mSearchManager = new SearchManager(getOuterContext(),
 mMainThread.getHandler());
}
}
return mSearchManager;
}

 It seems the problem is that the activity token is not set. But here
 I'm puzzled, I don't know where to go next. Any ideas on how to fix it
 or workaround it are appreciated. I want to test that my application
 is saving its state correctly.

 Thanks.
 --
 J. Pablo Fernández pup...@pupeno.com (http://pupeno.com)

 


 




-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.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] Should onSaveInstanceState call super?

2009-01-28 Thread J . Pablo Fernández

Hello,

At the beginning of my onSaveInstanceState I was calling
super.onSaveInstanceState(outState) and everything was working fine.
But now I wrote an instrumentation test case which basically does:

Activity activity = getActivity();
getInstrumentation().callActivityOnStart(activity);
getInstrumentation().callActivityOnResume(activity);
Bundle outState = new Bundle();
getInstrumentation().callActivityOnSaveInstanceState(activity, 
outState);

and I'm getting this error: Only the original thread that created a
view hierarchy can touch its views. (stack trace at the bottom). So
I'm wondering, what am I doing wrong here? the test or the app?

Thanks.
-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.com)

PS: The stack trace:

Error in testLoadingAndSavingState:
android.view.ViewRoot$CalledFromWrongThreadException: Only the
original thread that created a view hierarchy can touch its views.
at android.view.ViewRoot.checkThread(ViewRoot.java:1849)
at android.view.ViewRoot.invalidateChild(ViewRoot.java:468)
at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:481)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:2250)
at android.view.View.invalidate(View.java:4095)
at android.widget.TextView.invalidateCursor(TextView.java:2767)
at android.widget.TextView.access$1300(TextView.java:151)
at android.widget.TextView$ChangeWatcher.spanChange(TextView.java:4278)
at android.widget.TextView$ChangeWatcher.onSpanAdded(TextView.java:4304)
at 
android.text.SpannableStringInternal.sendSpanAdded(SpannableStringInternal.java:312)
at 
android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:136)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at 
android.text.SpannableStringInternal.init(SpannableStringInternal.java:50)
at android.text.SpannableString.init(SpannableString.java:30)
at android.widget.TextView.onSaveInstanceState(TextView.java:2015)
at android.view.View.dispatchSaveInstanceState(View.java:4944)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:1052)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:1052)
at android.view.View.saveHierarchyState(View.java:4927)
at 
com.android.internal.policy.impl.PhoneWindow.saveHierarchyState(PhoneWindow.java:1314)
at android.app.Activity.onSaveInstanceState(Activity.java:1055)
at blah.blah.Blah.onSaveInstanceState(TodoEdit.java:110)
at android.app.Activity.performSaveInstanceState(Activity.java:999)
at 
android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1255)
at 
blah.blah.BlahTest.testLoadingAndSavingState(TodoEditIntegrationTest.java:37)
at java.lang.reflect.Method.invokeNative(Native Method)
at 
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:136)
at 
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:126)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:155)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:142)
at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:313)
at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1508)

--~--~-~--~~~---~--~~
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 do you save the state of an activity on an ActivityUnitTestCase

2009-01-22 Thread J . Pablo Fernández

Hello,

In an ActivityUnitTestCase I'm trying to do:

Activity activity = startActivity(INSERT_INTENT, initialState, 
null);
Bundle outState = new Bundle();
getInstrumentation().callActivityOnSaveInstanceState(activity, 
outState);

But on the save state call I get this trace:

android.util.AndroidRuntimeException: Acquiring SearchManager objects
only valid in Activity Contexts.
at 
android.app.ApplicationContext.getSearchManager(ApplicationContext.java:976)
at 
android.app.ApplicationContext.getSystemService(ApplicationContext.java:861)
at 
android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:73)
at android.app.Activity.getSystemService(Activity.java:3091)
at android.app.Activity.performSaveInstanceState(Activity.java:1004)
at 
android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1255)
at 
com.blah.blah.SomeActivityTest.testLoadingAndSavingState(SomeActivityTest.java:90)
at java.lang.reflect.Method.invokeNative(Native Method)
at 
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:136)
at 
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:126)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:155)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:142)
at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:313)
at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1508)

Going through the ApplicationContext source code I've found this
(http://tinyurl.com/d8qsyc):

private SearchManager getSearchManager() {
// This is only useable in Activity Contexts
if (getActivityToken() == null) {
throw new AndroidRuntimeException(
Acquiring SearchManager objects only valid in
Activity Contexts.);
}
synchronized (mSync) {
if (mSearchManager == null) {
mSearchManager = new SearchManager(getOuterContext(),
mMainThread.getHandler());
}
}
return mSearchManager;
}

It seems the problem is that the activity token is not set. But here
I'm puzzled, I don't know where to go next. Any ideas on how to fix it
or workaround it are appreciated. I want to test that my application
is saving its state correctly.

Thanks.
-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.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] Testing using ProviderTestCase and other classes in android.test

2009-01-21 Thread J . Pablo Fernández

Hello,

According to http://code.google.com/android/kb/troubleshooting.html#addjunit
you have to remove the Android library from your tests to run them,
but if you remove the Android library then you can't access classes
such as android.test.ProviderTestCase; so how do you write or run a
ProviderTestCase?

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] _count column

2009-01-21 Thread J . Pablo Fernández

Hello,

What should I do to get my content provider to return the _count
column with the count of records?

Thanks.
-- 
J. Pablo Fernández pup...@pupeno.com (http://pupeno.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] Long click in ListActivity

2009-01-12 Thread J . Pablo Fernández

Hello,

Any ideas how to implement long click on the items of a ListActivity
that is build using a ListAdapter and no layout, just the built in.

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] Shipping to US - what shipping options?

2008-12-21 Thread Pablo

I am not from the US but i have family that will go there for a few
days. Given the ridiculous amount asked for shipping to europe, my
goal is to get the dev phone shipped to the US why my relatives are
there.

However, I can nowhere see how much it takes to ship whithin the US,
or if there are different shipping options. I do not want to pay the
$25 just to check the shipment methods which are available, either.
(Depending on how it goes i might buy it from google or just a G1 from
somewhere else)

Anyone knows from experience how much it really takes to ship the dev
phone within the US ?
Maybe someone could point me to the information i might have missed?

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