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

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