[android-developers] Save RTP stream with Android MediaCodec/MediaMuxer

2018-04-11 Thread Ivan Lobanov


I'm trying to save the RTP video stream received from camera, encoded with 
MediaCodec, using MediaMuxer. However, for some reason I have no keyframes.

I am receiving RTP using this 
 library 
and there are no problems with playing video on surface.

Maybe someone who is already doing something like that knows why?

-- 
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/1e40a50b-5e8c-4f8a-9914-a7c5f73df782%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Bluetooth At commands

2017-01-31 Thread Ivan Kuzlo
i'm writing app for detect battery level of Bluetooth device(headset) 
i want to listen Bluetooth data c and get data from it
many many Bluetooth headsets sent to device their battery level
<
01-31 21:56:43.059 21082-7393/com.android.bluetooth E/bt-rfcomm: 
PORT_DataInd, p_port:0xa2d0d8c4, p_data_co_callback is null
01-31 21:56:43.060 21082-7393/com.android.bluetooth D/bt-btif: 
bta_ag_hdl_event: p_scb 0xa2d15024 
01-31 21:56:43.060 21082-7393/com.android.bluetooth D/bt-btif: AG evt (hdl 
0x0001): State 2, Event 0x050b
01-31 21:56:43.060 21082-7361/com.android.bluetooth D/bt-btif: 
btif_hf_upstreams_evt: event=BTA_AG_AT_UNAT_EVT
01-31 21:56:43.062 21082-7373/com.android.bluetooth D/HeadsetStateMachine: 
Connected process message: 101, size: 1
01-31 21:56:43.062 21082-7373/com.android.bluetooth D/HeadsetStateMachine: 
event type: 15event device : 20:74:CF:06:48:2F
01-31 21:56:43.062 21082-7373/com.android.bluetooth E/HeadsetStateMachine: 
processVendorSpecificAt: unsupported command: +IPHONEACCEV=2,1,4,2,0
01-31 21:56:43.062 21082-7373/com.android.bluetooth D/bt-btif: BTHF: 
at_response
01-31 21:56:43.066 21082-7393/com.android.bluetooth D/bt-btif: 
bta_ag_api_result: p_scb 0xa2d15024 
01-31 21:56:43.066 21082-7393/com.android.bluetooth D/bt-btif: AG evt (hdl 
0x0001): State 2, Event 0x0506
01-31 21:56:43.066 21082-7393/com.android.bluetooth D/bt-btif: 
bta_ag_hfp_result : res = 20
 
i'm interesting in  +IPHONEACCEV=2,1,4,2,0
but i cant get it anywhere
how i can do this?


-- 
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/c9f1e152-3bcb-457e-a24c-464cc2aad26f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android OS 4.42 problem

2017-01-22 Thread IVAN LEE
Does anyone experiences the following in android phone?

Programme 'com.android.systemui' stop working.

Any solution? Thanks a lot.

-- 
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/b4d1854c-139f-491a-9908-c905ec6dae13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android App Architecture for "platform" idea

2016-11-25 Thread Ivan Pironi
Hi all,

I am new to this group and I hope I can get few answers :)

I am in process of design an app which will require a "back-end web based 
platform"... something like Uber, where *I assume* all the info is stored 
on a web platform/database and each app installation just queries/requests 
partial information (and eventually some of this info is cached locally)...

my dilemma is on how to develop the "central platform/database"... which 
technology? which architecture? is there any best practice I can look-up?

Many thanks all

Cheers

-- 
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/0c8e45a7-e594-437a-be97-8b6376daa02b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Does Developer account count as a company

2016-11-08 Thread Ivan Kramarić
Hi, Im making a game with my friends and we would like to upload it to google 
play store. Now, question is does opening a developer account with our team 
name count like we have opened a company or do we rly need to go through all 
that law stuff to open a real company.

-- 
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/d4382e27-f7c2-4be4-93fe-5cd65c72e936%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Does developer account count as company?

2016-11-08 Thread Ivan Kramarić
Hi, Im making a game with my friends and we would like to upload it to google 
play store. Now, question is does opening a developer account with our team 
name count like we have opened a company or do we rly need to go through all 
that law stuff to open real company. 

-- 
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/0ba1ea97-86ee-4a5e-a0d9-91423285d8a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How can I send a multipart binary sms?

2016-09-09 Thread Ivan Metla
How can I send a multipart binary sms

-- 
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/2459614f-b5a6-4ddb-b71d-336c26a77455%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] HELP Gradle sync failed

2016-09-08 Thread ivan tan chia chiet
hello,

any can help me to solve this problem?

after i can my pc user name, from Xian Shi,to XIanShi, without space, i was 
getting this Gradle sync problem, 
say that can not  create directory c:/user/Xian Shi/.andriod.




how can i fix this?

already reinstall andriod studio still the same problem there.

-- 
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/e69d182b-f571-41d8-a614-04612d411423%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to remove the application from google play

2016-01-17 Thread ivan limonov
Hello.
I'm not sure that I write in the right place.
But I do not know where to write on this issue.
I need to remove my application from google play as it can be done through 
the google play console?

-- 
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/06ec04b3-8ffe-43ad-b3a8-d120a7ce5291%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Camera rotation portrait but playing in landscape.

2013-04-30 Thread Ivan Stamenkovic
I tried, i searched but nothing works. I have this code preparing the 
camera:

http://paste.laravel.com/pP1

and there is myCamera.setDisplayOrientation(90);

But when i playback the video it's in landscape. Is there any way to change 
this or to rotate videoview

-- 
-- 
You received this message because you are subscribed to the Google
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: A proplem with the floating window

2012-11-11 Thread ivan shi
up!   anybody who can help me?

在 2012年11月8日星期四UTC+8下午3时29分14秒,ivan shi写道:

 I developed a floating window, when I need to change the position of the 
 floating window,I call WindowManager.updateViewLayout to update the layout. 
 If the initial coordinates x 0, adjust it to 500, this box is sliding past, 
 android show herea sliding animation. I do not want this effect, want to 
 jump directly to box in the past, do not know how to engage,who can 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] A proplem with the floating window

2012-11-08 Thread ivan shi
I developed a floating window, when I need to change the position of the 
floating window,I call WindowManager.updateViewLayout to update the layout. 
If the initial coordinates x 0, adjust it to 500, this box is sliding past, 
android show herea sliding animation. I do not want this effect, want to 
jump directly to box in the past, do not know how to engage,who can 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: My First App

2012-10-04 Thread ALAN IVAN AYALA NAVA


El viernes, 17 de agosto de 2012 12:13:11 UTC-5, Divya escribió:

 Hi, 

 I had the smae problem. I could install the support library when I ran SDK 
 Manager as an administrator by right click on SDK manager.exe 

 Thanks 



Thanks Divya, it works 

-- 
You received this message because you are subscribed to the Google
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] writing to /data/data/package-name/lib

2012-05-17 Thread ivan
I have an issue where I need to dynamically load a library to /data/
data/package-name/lib ... is there any way for me to gain write
access to this directory?  If not, can I put the file somewhere else
so that it can still be found?

-- 
You received this message because you are subscribed to the Google
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] Unpackaging APKs for ROM builds at initial startup

2012-04-24 Thread ivan
The application I am working on is being preinstalled with the OEM ROM
builds.  Consequently, the APK is packaged with a .so file that is
traditionally placed in /system/lib.  Unfortunately, the latest Ice
Cream Sandwich builds of the ROMs contain the same exact .so file that
is interacted with in a slightly different way (preventing me from
just using that .so file), but interferes with the namespace of
the .so file contained in my APK.

So, the problem is I have two .so files in the /system/lib directory
that create a namespace conflict.  I've been told there is a way to
extract the .so file I need from my APK to /data/data/ on the app's
maiden startup.  Is this true? Can someone point me in the right
direction?

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: Anti-Aliasing Lines in openGL

2012-04-18 Thread ivan
Romain, can you please briefly elaborate on the technique of using a
slightly more complicated mesh with a texture map?

On Apr 12, 2:19 pm, ivan istas...@gmail.com wrote:
 Romain, can you please briefly elaborate on the technique of using a
 slightly more complicated mesh with a texture map?

 On Apr 12, 1:05 pm, Romain Guy romain...@android.com wrote:







   1.) What anti-aliasing technique (for simple lines) is guaranteed to
   work on all/most older devices that don't have the latest and
   greateast GPUs.

  You will have to generate a slightly more complicated mesh and use a
  texture to simulate anti-aliasing. You can also use a fragment shader.

   2.) How is anti-aliasing (again for simple lines) done on the new
   hardware with anti-aliased frame buffers?

  You simply enable MSAA. Note that MSAA is not supported by all GPUs
  (Tegra2 and Tegra3 for instance) and that it can be costly (memory
  and/or time.)

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

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


[android-developers] Anti-Aliasing Lines in openGL

2012-04-12 Thread ivan
I'm trying to use a GL_LINE_STRIP to draw circles and curves, but I'm
unable to get rid of the jaggies.

I've read quite a bit online about anti-aliasing, but nothing simple
has seemed to work.

Without restating all that I've read, I'm looking for direction on two
things.

1.) What anti-aliasing technique (for simple lines) is guaranteed to
work on all/most older devices that don't have the latest and
greateast GPUs.

2.) How is anti-aliasing (again for simple lines) done on the new
hardware with anti-aliased frame buffers?

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: Anti-Aliasing Lines in openGL

2012-04-12 Thread ivan
Romain, can you please briefly elaborate on the technique of using a
slightly more complicated mesh with a texture map?


On Apr 12, 1:05 pm, Romain Guy romain...@android.com wrote:
  1.) What anti-aliasing technique (for simple lines) is guaranteed to
  work on all/most older devices that don't have the latest and
  greateast GPUs.

 You will have to generate a slightly more complicated mesh and use a
 texture to simulate anti-aliasing. You can also use a fragment shader.

  2.) How is anti-aliasing (again for simple lines) done on the new
  hardware with anti-aliased frame buffers?

 You simply enable MSAA. Note that MSAA is not supported by all GPUs
 (Tegra2 and Tegra3 for instance) and that it can be costly (memory
 and/or time.)

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

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


[android-developers] Reasoning Engine in Android

2012-04-03 Thread Ivan
Wonder any information about reasoning engines inside Android System,
just as Jena and Jess for Java?

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


[android-developers] Re: Help! No files return from apache commons net FTPClient

2012-03-16 Thread Ivan Kablar
I am encountering exactly the same issue.
I get a reply of 230 in both applications. The Java application returns all 
files from a getFiles() method call while the Android application returns 0 
with a negative 500 reply checking the reply code afterwards. I gave 
INTERNET permission in the manifest file.
 
Did anybody solve this problem?
 
Best Regards
 
Ivan

Am Montag, 7. Dezember 2009 16:33:57 UTC+1 schrieb Chander Pechetty:

 As far as I can tell, there is no compatibility problem. Enable server 
 logging and see if you get a 250 or [some number]  directory OK, and 
 hopefully its the same code you are running with the same account; it 
 could be a minor bug somewhere else:-) 


 -Chander 
 www.unisaran.com 

 On Dec 6, 8:26 pm, armstrong armstrongh...@gmail.com wrote: 
  Hi, all 
  
  I am writing a ftp client on android sdk 1.5 with apache-commons-net- 
  ftp-2.0. I can successfully connect to my testing ftp server but with 
  I use listFiles() it return an empty FTPFile[]. 
  
  I put the same code in a normal java program and it works fine. I 
  don't know where is wrong. Any compatible problem when apache-commons- 
  net-ftp-2.0 and android works together? 
  
  Here is my test code: 
  
  FTPClient ftpClient = new FTPClient(); 
  try { 
  ftpClient.connect(192.168.1.102, 21); 
  ftpClient.login(testftp, testftp); 
  Thread.currentThread().sleep(5000); 
  System.out.println(bb:  + 
 ftpClient.getReplyString()); 
  FTPFile[] ftpFiles = 
 ftpClient.listFiles(); 
  System.out.println(aa:  + 
 ftpFiles.length); 
  } catch (Exception e) { 
  e.printStackTrace(); 
  } 
  
  android output: 
  bb: 230 Login successfully. 
  aa: 0 
  
  j2se output: 
  bb: 230 Login successfully. 
  aa: 5 
  
  It is actually 4 files and 1 directory in the ftp root! 
  
  Maybe someone asked the same thing before. Some suggestion? 
  
  Thanks in advance! 


Am Montag, 7. Dezember 2009 16:33:57 UTC+1 schrieb Chander Pechetty:

 As far as I can tell, there is no compatibility problem. Enable server 
 logging and see if you get a 250 or [some number]  directory OK, and 
 hopefully its the same code you are running with the same account; it 
 could be a minor bug somewhere else:-) 


 -Chander 
 www.unisaran.com 

 On Dec 6, 8:26 pm, armstrong armstrongh...@gmail.com wrote: 
  Hi, all 
  
  I am writing a ftp client on android sdk 1.5 with apache-commons-net- 
  ftp-2.0. I can successfully connect to my testing ftp server but with 
  I use listFiles() it return an empty FTPFile[]. 
  
  I put the same code in a normal java program and it works fine. I 
  don't know where is wrong. Any compatible problem when apache-commons- 
  net-ftp-2.0 and android works together? 
  
  Here is my test code: 
  
  FTPClient ftpClient = new FTPClient(); 
  try { 
  ftpClient.connect(192.168.1.102, 21); 
  ftpClient.login(testftp, testftp); 
  Thread.currentThread().sleep(5000); 
  System.out.println(bb:  + 
 ftpClient.getReplyString()); 
  FTPFile[] ftpFiles = 
 ftpClient.listFiles(); 
  System.out.println(aa:  + 
 ftpFiles.length); 
  } catch (Exception e) { 
  e.printStackTrace(); 
  } 
  
  android output: 
  bb: 230 Login successfully. 
  aa: 0 
  
  j2se output: 
  bb: 230 Login successfully. 
  aa: 5 
  
  It is actually 4 files and 1 directory in the ftp root! 
  
  Maybe someone asked the same thing before. Some suggestion? 
  
  Thanks in advance! 


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

[android-developers] Re: EditText in ListView footer not visible when the soft keyboard is present

2012-01-31 Thread ivan
The problem is that the list activity is contained in a tab activity
that needs to set to adjustPan.  When I make the tab activity
adjustResize too, everything works as expected.

I'm guessing I'll need to work some magic in code.
Does anyone have an suggestions on where to start?

Thanks.

On Jan 30, 9:34 am, ivan istas...@gmail.com wrote:
 Anyone?

 On Jan 27, 12:44 pm, ivan istas...@gmail.com wrote:







  I have a ListView and I'm placing an EditText view in its footer, but
  the soft keyboard blocks the EditText view when it pops up.

  My AndroidManifest has:

  activity
  android:name=com.myapp.views.activities.StoresSearchActivity
              android:label=@string/appName
  android:screenOrientation=portrait
              android:launchMode=singleInstance
              android:windowSoftInputMode=adjustResize /

  My activity layout:

  ListView android:id=@+id/stores_preferredStores
                  xmlns:android=http://schemas.android.com/apk/res/android;
                  android:orientation=vertical
                  android:layout_width=fill_parent
                  android:layout_height=fill_parent
                  android:dividerHeight=0dp
                  android:divider=#
                  android:overScrollFooter=@null
                  /

  My footer is a complex view with a couple different buttons and an
  edit text view so it doesn't make sense to not have it scroll with the
  list view, being so tall.

  My footer layout:

  RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
  android
        android:id=@+id/footerlayout
        android:layout_width=fill_parent
  android:layout_height=wrap_content
        android:layout_marginBottom=10dp

              TextView android:layout_height=wrap_content
              android:id=@+id/store_search_text
              android:text=@string/store_search_find_header_text
              android:layout_width=fill_parent
              android:layout_marginLeft=10dp
              android:layout_marginRight=10dp
              android:textColor=@color/white
              android:layout_alignParentLeft=true
          /TextView
          Button
              android:id=@+id/store_search_use_location_button
              android:layout_width=fill_parent
              android:layout_marginTop=10dp
              android:layout_height=40dp
              android:layout_below=@id/store_search_text
              android:text=@string/store_search_location_button_text
              android:layout_alignLeft=@id/store_search_text
              android:layout_alignRight=@id/store_search_text
              style=@style/ActionButton.LtBlue
          /Button
          TextView android:layout_height=wrap_content
              android:id=@+id/store_search_or
              android:text=Or
              android:textColor=@color/white
              android:layout_width=fill_parent
              android:layout_marginTop=10dp
              android:layout_below=@id/
  store_search_use_location_button
              android:layout_alignLeft=@+id/
  store_search_use_location_button
              android:layout_alignRight=@+id/
  store_search_use_location_button
          /TextView
          EditText android:layout_height=wrap_content
              android:id=@+id/store_search_query
              android:layout_width=fill_parent
              android:layout_marginLeft=10dp
              android:layout_marginRight=10dp
              android:layout_marginTop=10dp
              android:paddingLeft=5dp
              android:layout_below=@id/store_search_or
              android:hint=@string/search_hint
              android:inputType=textPostalAddress
              android:imeOptions=actionDone 
          /EditText
          Button
              android:id=@+id/store_search_find_location
              android:layout_width=fill_parent
              android:layout_height=40dp
              android:layout_below=@id/store_search_query
              android:text=@string/
  store_search_find_location_button_text
              android:layout_alignLeft=@+id/store_search_query
              android:layout_alignRight=@+id/store_search_query
              style=@style/ActionButton.LtBlue
          /Button
  /RelativeLayout

  I've set up an OnScrollListener, and it appears the ListView is not
  getting resized as it should when the soft keyboard pops up.

  Does anyone have any ideas on how I can get the EditText above the
  soft keyboard?

  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: EditText in ListView footer not visible when the soft keyboard is present

2012-01-30 Thread ivan
Anyone?

On Jan 27, 12:44 pm, ivan istas...@gmail.com wrote:
 I have a ListView and I'm placing an EditText view in its footer, but
 the soft keyboard blocks the EditText view when it pops up.

 My AndroidManifest has:

 activity
 android:name=com.myapp.views.activities.StoresSearchActivity
             android:label=@string/appName
 android:screenOrientation=portrait
             android:launchMode=singleInstance
             android:windowSoftInputMode=adjustResize /

 My activity layout:

 ListView android:id=@+id/stores_preferredStores
                 xmlns:android=http://schemas.android.com/apk/res/android;
                 android:orientation=vertical
                 android:layout_width=fill_parent
                 android:layout_height=fill_parent
                 android:dividerHeight=0dp
                 android:divider=#
                 android:overScrollFooter=@null
                 /

 My footer is a complex view with a couple different buttons and an
 edit text view so it doesn't make sense to not have it scroll with the
 list view, being so tall.

 My footer layout:

 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
 android
       android:id=@+id/footerlayout
       android:layout_width=fill_parent
 android:layout_height=wrap_content
       android:layout_marginBottom=10dp

             TextView android:layout_height=wrap_content
             android:id=@+id/store_search_text
             android:text=@string/store_search_find_header_text
             android:layout_width=fill_parent
             android:layout_marginLeft=10dp
             android:layout_marginRight=10dp
             android:textColor=@color/white
             android:layout_alignParentLeft=true
         /TextView
         Button
             android:id=@+id/store_search_use_location_button
             android:layout_width=fill_parent
             android:layout_marginTop=10dp
             android:layout_height=40dp
             android:layout_below=@id/store_search_text
             android:text=@string/store_search_location_button_text
             android:layout_alignLeft=@id/store_search_text
             android:layout_alignRight=@id/store_search_text
             style=@style/ActionButton.LtBlue
         /Button
         TextView android:layout_height=wrap_content
             android:id=@+id/store_search_or
             android:text=Or
             android:textColor=@color/white
             android:layout_width=fill_parent
             android:layout_marginTop=10dp
             android:layout_below=@id/
 store_search_use_location_button
             android:layout_alignLeft=@+id/
 store_search_use_location_button
             android:layout_alignRight=@+id/
 store_search_use_location_button
         /TextView
         EditText android:layout_height=wrap_content
             android:id=@+id/store_search_query
             android:layout_width=fill_parent
             android:layout_marginLeft=10dp
             android:layout_marginRight=10dp
             android:layout_marginTop=10dp
             android:paddingLeft=5dp
             android:layout_below=@id/store_search_or
             android:hint=@string/search_hint
             android:inputType=textPostalAddress
             android:imeOptions=actionDone 
         /EditText
         Button
             android:id=@+id/store_search_find_location
             android:layout_width=fill_parent
             android:layout_height=40dp
             android:layout_below=@id/store_search_query
             android:text=@string/
 store_search_find_location_button_text
             android:layout_alignLeft=@+id/store_search_query
             android:layout_alignRight=@+id/store_search_query
             style=@style/ActionButton.LtBlue
         /Button
 /RelativeLayout

 I've set up an OnScrollListener, and it appears the ListView is not
 getting resized as it should when the soft keyboard pops up.

 Does anyone have any ideas on how I can get the EditText above the
 soft keyboard?

 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] EditText in ListView footer not visible when the soft keyboard is present

2012-01-27 Thread ivan
I have a ListView and I'm placing an EditText view in its footer, but
the soft keyboard blocks the EditText view when it pops up.

My AndroidManifest has:

activity
android:name=com.myapp.views.activities.StoresSearchActivity
android:label=@string/appName
android:screenOrientation=portrait
android:launchMode=singleInstance
android:windowSoftInputMode=adjustResize /

My activity layout:

ListView android:id=@+id/stores_preferredStores
xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
android:dividerHeight=0dp
android:divider=#
android:overScrollFooter=@null
/

My footer is a complex view with a couple different buttons and an
edit text view so it doesn't make sense to not have it scroll with the
list view, being so tall.

My footer layout:

RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
  android:id=@+id/footerlayout
  android:layout_width=fill_parent
android:layout_height=wrap_content
  android:layout_marginBottom=10dp

TextView android:layout_height=wrap_content
android:id=@+id/store_search_text
android:text=@string/store_search_find_header_text
android:layout_width=fill_parent
android:layout_marginLeft=10dp
android:layout_marginRight=10dp
android:textColor=@color/white
android:layout_alignParentLeft=true
/TextView
Button
android:id=@+id/store_search_use_location_button
android:layout_width=fill_parent
android:layout_marginTop=10dp
android:layout_height=40dp
android:layout_below=@id/store_search_text
android:text=@string/store_search_location_button_text
android:layout_alignLeft=@id/store_search_text
android:layout_alignRight=@id/store_search_text
style=@style/ActionButton.LtBlue
/Button
TextView android:layout_height=wrap_content
android:id=@+id/store_search_or
android:text=Or
android:textColor=@color/white
android:layout_width=fill_parent
android:layout_marginTop=10dp
android:layout_below=@id/
store_search_use_location_button
android:layout_alignLeft=@+id/
store_search_use_location_button
android:layout_alignRight=@+id/
store_search_use_location_button
/TextView
EditText android:layout_height=wrap_content
android:id=@+id/store_search_query
android:layout_width=fill_parent
android:layout_marginLeft=10dp
android:layout_marginRight=10dp
android:layout_marginTop=10dp
android:paddingLeft=5dp
android:layout_below=@id/store_search_or
android:hint=@string/search_hint
android:inputType=textPostalAddress
android:imeOptions=actionDone 
/EditText
Button
android:id=@+id/store_search_find_location
android:layout_width=fill_parent
android:layout_height=40dp
android:layout_below=@id/store_search_query
android:text=@string/
store_search_find_location_button_text
android:layout_alignLeft=@+id/store_search_query
android:layout_alignRight=@+id/store_search_query
style=@style/ActionButton.LtBlue
/Button
/RelativeLayout

I've set up an OnScrollListener, and it appears the ListView is not
getting resized as it should when the soft keyboard pops up.

Does anyone have any ideas on how I can get the EditText above the
soft keyboard?

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] Video playback on Droid2

2012-01-04 Thread ivan
Is anyone familiar with output like this on the Droid2 when attempting
video playback.  The video encoding we're attempting to play, plays on
nearly every other device we've built our app for.

W/ConfigParser(1197): Exceeds maximum supported resolution, width=960,
height=540 for 'OMX.qcom.7x30.video.decoder.avc'

W/ConfigParser(1197): Exceeds maximum supported resolution, width=960,
height=540 for 'OMX.qcom.video.decoder.avc'

W/ConfigParser(1197): Exceeds maximum supported resolution, width=960,
height=540 for 'OMX.TI.Video.Decoder'

W/ConfigParser(1197): Exceeds maximum supported resolution, width=960,
height=540 for 'OMX.SEC.AVC.Decoder'

W/ConfigParser(1197): Exceeds maximum supported resolution, width=960,
height=540 for 'AVCDecoder'

-- 
You received this message because you are subscribed to the Google
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: Data Usage billing cycle

2011-12-14 Thread Ivan Zuanella


On Dec 13, 7:15 pm, TreKing treking...@gmail.com wrote:

 b.android.com

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] Data Usage billing cycle

2011-12-09 Thread Ivan Zuanella
Hi everyone.
I'm not sure if this is the right place to post. I would like to suggest a 
change in the billing cycle of the data usage setting in the new android 4.
Rather than having only the setting about one month billing cycles, is 
there a chance to add a few extra options like one day or one week billing 
cycles?
With my carrier, I have a data plan that gives me a limit of 100 MB per day 
and I know about other plans that work on a weekly basis. I think that it 
would be a nice feature since I'm sure that I'm not the only person with 
this problem.
Thanks for reading, best 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

[android-developers] Notifying the view tree

2011-11-28 Thread ivan
I've created a scrollable tab host, widget and activity.  I let the
scrollable tab widget overlay the content area of the chosen tab,
which is the contents of a different activity in the activity group.
It usually works, but at times the timing of the setContentView() can
be such that it chops my overlay.

Thus, I'm looking for suggestions on how I might notify the view tree
of a change due to a setContentView, so that I can invalidate and
redraw the overlaid tab widget.

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: Notifying the view tree

2011-11-28 Thread ivan
I added an onPreDraw() callback to the ViewTreeObserver for the
content view group, and it did the trick.

On Nov 28, 12:55 pm, ivan istas...@gmail.com wrote:
 I've created a scrollable tab host, widget and activity.  I let the
 scrollable tab widget overlay the content area of the chosen tab,
 which is the contents of a different activity in the activity group.
 It usually works, but at times the timing of the setContentView() can
 be such that it chops my overlay.

 Thus, I'm looking for suggestions on how I might notify the view tree
 of a change due to a setContentView, so that I can invalidate and
 redraw the overlaid tab widget.

 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] Posting messages to facebook

2011-11-21 Thread ivan goh
Hi, i am developing a calendar and i need to post the events on the
calendar to facebook. right now i already gotten the api keys. i am
using the official facebook SDK (com.facebook.android), what is the
code for me to actually post a message to facebook. thanks for the
help in advanced!!

-- 
You received this message because you are subscribed to the Google
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] Call tab_indicator.xml from styles.xml

2011-11-15 Thread Ivan Soto
Hello,

I'm trying to create a custom theme without relying in classes. Something 
that is easy enough to plug into an app. My problem is that the TabWidget 
in styles.xml doesn't reference tab_indicator.xml anywhere so I can't see a 
way of using a custom style unless I call the style from the layout file or 
the activity using the tab widget.

This is the only reference I see in styles.xml

style name=Widget.TabWidget
item 
name=android:textAppearance@style/TextAppearance.Widget.TabWidget/item
item name=ellipsizemarquee/item
item name=singleLinetrue/item
/style

Any ideas?

-- 
You received this message because you are subscribed to the Google
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] New ADT tools creating eclipse errors

2011-11-14 Thread ivan
Since updating to ADT 15.0.1 preview 2 I can no longer build my
projects without getting two errors.

1.)
Error generating final archive: java.io.FileNotFoundException: bin/
resources.ap_ does not exist UnknownAndroid Packaging Problem

2.)
Unparsed aapt error(s)! Check the console for output.   Blockbuster-
Mobile-lib Unknown  Android Packaging Problem


I've done extensive research on the fix but with no success on fixing
it (i.e. clean and rebuild).


-- 
You received this message because you are subscribed to the Google
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] New ADT tools creating eclipse errors

2011-11-14 Thread ivan
Since updating to ADT 15.0.1 preview 2 I can no longer build my
projects without getting two errors.

1.)
Error generating final archive: java.io.FileNotFoundException: bin/
resources.ap_ does not exist UnknownAndroid Packaging Problem

2.)
Unparsed aapt error(s)! Check the console for output.  Android
Packaging Problem

I've done extensive research on the fix but with no success on fixing
it (i.e. clean and rebuild).

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


[android-developers] Re: New ADT tools creating eclipse errors

2011-11-14 Thread ivan
In addition the console gives the following:

ERROR: Unknown option '--no-crunch'
Android Asset Packaging Tool

On Nov 14, 10:48 am, ivan istas...@gmail.com wrote:
 Since updating to ADT 15.0.1 preview 2 I can no longer build my
 projects without getting two errors.

 1.)
 Error generating final archive: java.io.FileNotFoundException: bin/
 resources.ap_ does not exist Unknown    Android Packaging Problem

 2.)
 Unparsed aapt error(s)! Check the console for output.  Android
 Packaging Problem

 I've done extensive research on the fix but with no success on fixing
 it (i.e. clean and rebuild).

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


[android-developers] Re: New ADT tools creating eclipse errors

2011-11-14 Thread ivan
Yes Android SDK tools were out of sync.  Updating to the latest SDK
tools fixed the issue.

On Nov 14, 11:04 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Based on this, it looks like *some* of your Android tools are out of
 date and out of sync (I'm thinking platform-tools / tools / ADT in Eclipse).

 14.11.2011 21:55, ivan пишет:

  In addition the console gives the following:

  ERROR: Unknown option '--no-crunch'

 --
 Kostya Vasilyev

-- 
You received this message because you are subscribed to the Google
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] updating /system/lib .so file from an APK

2011-11-03 Thread ivan
I'm working on an application that has a native library packaged with
it (i.e. contained in its APK).  Consequently, this application is
going to be prepackaged with new devices thus its APK will live in /
system/app/ and the native .so files will be placed in /system/
lib/ .

I have been asked to help a device manufacturer figure out how
updating of the application from Android market will work.  It seems
that the manufacturer is unclear about how to update the APK in /
system/app/ and then extract the .so file contained in the APK to
update the .so file in /system/lib/.

Can anyone direct me to how this is normally done?

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: ViewPager in honeycomb ignoring Application theme.

2011-11-02 Thread Ivan Soto
Anyone?

I checked today again, and everything looks in order. Yet, whatever I load 
inside a ViewPager ignores the application theme.

I'm using Android 3.1 with compatibility package v4.

-- 
You received this message because you are subscribed to the Google
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] ViewPager in honeycomb ignoring Application theme.

2011-11-01 Thread Ivan Soto
Hello,

For some reason my application is ignoring the theme applied to the 
Application in the manifest file only inside a viewpager.

I have an activity with 2 fragments:

application 
android:icon=@drawable/ic_launcher 
android:label=@string/app_name 
android:theme=@android:style/Theme.Holo.Light 
android:hardwareAccelerated=true

The first fragment loads Holo.light just fine. But the second only applied 
Holo.Light on the button (which is outside the viewpager). Whatever I load 
using the ViewPager, it defaults to Holo.

This is the second fragment:


?xml version=1.0 encoding=utf-8? 
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; 
android:layout_width=match_parent 
android:layout_height=match_parent 
android:orientation=vertical  
Button 
android:id=@+id/button1 
android:layout_width=wrap_content 
android:layout_height=wrap_content 
android:text=Button / 
android.support.v4.view.ViewPager 
android:id=@+id/awesomepager 
android:layout_width=match_parent 
android:layout_height=match_parent / 
/LinearLayout


By the way, this is on Android 3.1.
Any ideas?


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] ADT14 and Library projects as Jars

2011-10-25 Thread Ivan Soto
I've been looking around for an answer and had no luck.

ADT14 mentions that library projects will be compiled into a jar, so I've 
been trying to figure out how I can manually compile the library into a jar 
and distribute it to my team, but I think I can't.
Why is that?

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] USB connection Thread

2011-09-01 Thread Ivan Fajardo
Hi,
i have been working in a app that allow comunicate with a open
accesory dev kit, and i have a big throuble, when ended the USB
comunication I cant start new one until the readthread die. then when
the ativity is pasused or throw new activity i cant comunicate with an
accessory.

i close the parcelFileDescriptor, inputStream and outputStream in the
onPause method and try to open again in the onResume method unless
that the readthread dies. i used a flat to stop the thread. some thing
like this

public void run() {
// TODO Auto-generated method stub
byte[] buffer = new byte[1024];  // buffer para leer el
stream
int bytes; // numero de bytes retornado de read()
while(continueRunning) {
try {

bytes = inputStream.read(buffer);

byte[] data = new byte[bytes];
System.arraycopy(buffer, 0, data, 0, bytes);

synchronized(readData) {
readData.add(data);
}

handler.obtainMessage(what, bytes, -1, new
USBMensaje(USBMensaje.MessageType.READ,
data)).sendToTarget();
} catch (IOException e) {
//Exiting read thread
break;
}

}

but the thread not always dies, and i dont have control when the app
could connect

Hope anybody could help me to fix this issue.

-- 
You received this message because you are subscribed to the Google
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] Displaying images in WebView... Which way is most efficient?

2011-08-30 Thread ivan
In my research I've seen two ways to display an image in a WebView.

1.) Load a Base64 string with the raw image bytes, as done here:
http://stackoverflow.com/questions/5267124/how-to-display-image-with-webview-loaddata

Or...

2.) Reference an image from the assets directory, as done here:
http://www.androidsnippets.com/webview-with-custom-html-and-local-images

Which way is the most efficient?

I'm wondering because it would be nice to not have to keep images
outside of the drawables directory, yet it seems that method one is
doing a lot of work.  Does android basically do the same thing (as
method one) under the hood of the WebView?

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] starting custom intent from link click in textView

2011-08-29 Thread ivan harmady
Hi people, I have faced a problem and I really haven't seen any
solutions how to solve it. Can anybody help me pls? :(

Definition:
I have a database with some articles and I need to put them into
TextViews, they are in HTML form and there are anchor tags like this
a href=1000376 something /a. the number in the href attribute is
id of the next article. When I click on the link it should show the
article with the id in href.
And there is my problem: how can I start Intent from link click and
get the href attribute to use it as a parameter? I can't change the
structure of the database, because it is designed for iPhone by
default :/

Can anybody help me please?  thx, for all further replies

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


[android-developers] A Single APK with multiple processes uses how much memory?

2011-08-11 Thread ivan
I've read that each single process APK gets about 25 MBs.  Is this
about correct?

If another application specific process is declared in the manifest
(i.e. android:process=:BackgroundService), does this double the
amount of memory consumed by the application; or is the original
amount of memory split between the two processes?

-- 
You received this message because you are subscribed to the Google
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] Edit text with lines to get notepad look

2011-07-26 Thread ivan harmady
Hi people, I'm really stuck in this thing. I need to make something
with look like notepad. Shortly: it should have yellow background and
line below each row. And this is problem form me. I can't find any
method to make or draw these lines, i googled for a very long time but
didn't find anything. It should be something like this
http://t3.gstatic.com/images?q=tbn:ANd9GcSdxkn4AMgTLE6p1ZI6oXABWkzb65hikdxsvimhvnkEX1Xj5-IT
. Can you help me please? :(

-- 
You received this message because you are subscribed to the Google
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: Running activity with parameter from status bar notification

2011-06-04 Thread ivan harmady
Oh thanks Dianne, you really helped me. I tried startActivity() and
then the errors firstly began to show. And yes i didn't have
permission to run the activity in another application. So i added
android:exported=true to the activity i wanted to run and everything
was all right. one big THANK YOU to you :)

On 2. Jún, 03:05 h., Dianne Hackborn hack...@android.com wrote:
 Do you actually have permission to run the activity that is in another
 application?

 For debugging issues, you should try to isolate your problem.  For example
 here you should make sure that you can directly do startActivity() with that
 Intent in your own app.  Once you have verified that works, then throw the
 PendingIntent and status bar into the mix.

 Also be sure to look at log output, because that often has useful messages
 when things are going wrong.









 On Wed, Jun 1, 2011 at 4:40 PM, ivan harmady ivan.harm...@gmail.com wrote:
  Hmmm, but how should I use it??  I am not using any uri(i dont even
  know what for is it). I only need to start an activity from the click
  on the notification. But the problem is, i want to run an activity
  from different application.
  There are usually examples like  Intent notifyIntent = new
  Intent(context, notify.class); - but this is for notify.class in the
  same application, but i want to run activity in different application.
  When i use the example above it is ok and the notify.class runs, but
  when i want to run the activity as i described in my code
  - intent.setClassName(com.iwaneez, com.iwaneez.PlaceSettings);
  nothing happens on the click.
  Aren't there any permission or something else?? I really don't
  understand why i cannot run it this way..

  I really need this...pls help :(

  On 31. Máj, 03:20 h., TreKing treking...@gmail.com wrote:
   On Mon, May 30, 2011 at 7:50 PM, ivan harmady ivan.harm...@gmail.com
  wrote:

but this activity never starts when i click on the notfication...can
you help me please?? i really need this and I'm out of ideas.
Every advice worth.

   Try this constructor:
 http://developer.android.com/reference/android/content/Intent.html#In...,
   java.lang.Class?)

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

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

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

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

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


[android-developers] Re: Running activity with parameter from status bar notification

2011-06-01 Thread ivan harmady
Hmmm, but how should I use it??  I am not using any uri(i dont even
know what for is it). I only need to start an activity from the click
on the notification. But the problem is, i want to run an activity
from different application.
There are usually examples like  Intent notifyIntent = new
Intent(context, notify.class); - but this is for notify.class in the
same application, but i want to run activity in different application.
When i use the example above it is ok and the notify.class runs, but
when i want to run the activity as i described in my code
- intent.setClassName(com.iwaneez, com.iwaneez.PlaceSettings);
nothing happens on the click.
Aren't there any permission or something else?? I really don't
understand why i cannot run it this way..

I really need this...pls help :(

On 31. Máj, 03:20 h., TreKing treking...@gmail.com wrote:
 On Mon, May 30, 2011 at 7:50 PM, ivan harmady ivan.harm...@gmail.comwrote:

  but this activity never starts when i click on the notfication...can
  you help me please?? i really need this and I'm out of ideas.
  Every advice worth.

 Try this 
 constructor:http://developer.android.com/reference/android/content/Intent.html#In...,
 java.lang.Class?)

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

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


[android-developers] Running activity with parameter from status bar notification

2011-05-30 Thread ivan harmady
Hi all, I'm trying to run my activity from notification with
parameter. The content of activity depends on parameter i send to
activity with intent. It should open my activity when i click on the
information which gives the notification, but the screen does not
change and still remains the same, no matter which activity is
currently running on screen or if I am on my home screen.

Here is my code for notification:

CharSequence text = You entered \+name+\;
Notification notification = new Notification(R.drawable.icon, text,
System.currentTimeMillis());
Intent intent = new Intent();

// here i say which activity i want to open with click on the
notification
intent.setClassName(com.iwaneez, com.iwaneez.PlaceSettings);

// here i add my parameter
intent.putExtra(ID, Integer.toString(ID));
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
intent, 0); // creating PendingIntent
notification.setLatestEventInfo(this, Mannage place\+name+\,
text, contentIntent);

sNM.notify(R.string.notify, notification);


and here is onCreate() method from PlaceSettings activity

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.place_settings);

ID = getIntent().getStringExtra(ID);
loadPlace();
Toast.makeText(this, ID = +ID+, Name = +name,
Toast.LENGTH_LONG).show();
}



but this activity never starts when i click on the notfication...can
you help me please?? i really need this and I'm out of ideas.
Every advice worth.

-- 
You received this message because you are subscribed to the Google
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: bind service in another aplication

2011-05-12 Thread ivan harmady
Oh thanks, you saved me after all. I didn't know what for is intent-
filter, but now i fully understand it. thanks once more :))

On 25. Apr, 21:41 h., Mark Murphy mmur...@commonsware.com wrote:
 Your service needs to have an intent-filter, and your Intent needs
 to match that filter. For example:

 service android:name=.BshService
                         intent-filter
                                 action 
 android:name=com.commonsware.android.advservice.IScript /
                         /intent-filter
 /service

 new Intent(com.commonsware.android.advservice.IScript) would match
 that from a bindService() standpoint.









 On Sat, Apr 23, 2011 at 8:55 AM, ivanharmadyivan.harm...@gmail.com wrote:
  Hi, I'm trying to make bound service. Acording to tutorials at
  developer.android.com it is appropriate for me to implement bound
  service using messenger // there is written i should use it if i want
  to allow clients from different applications to access my service for
  IPC but i don't need to handle multithreading.
  if i want to bind service in the same application, there is no
  problem. BUT, my problem is to bind service which is in another
  application(/project) than my activity which i want to bind to it.

  in the activity which i want bind to service i call:
   bindService(new Intent(this, -- !!! -- ), myServiceConnection,
  Context.BIND_AUTO_CREATE);

  - BUT i don't know how to write path to the service.class which i
  have in another application(/project)

  how can i handle it? can somebody help me pls? i would be very
  thankfull. I spend too much time to solve it and nothing came :(((

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

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

 Android Training in London:http://bit.ly/smand1,http://bit.ly/smand2

-- 
You received this message because you are subscribed to the Google
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] sending parcelable objects to different process

2011-05-11 Thread ivan harmady
Hi there,
I want to send my custom object which implements Parcelable from one
process(application) to an activity in another one process. But I
still get error message: BadParcelableException:
ClassNotFoundException when unmarshalling. I accepted some advices but
still not working. Here is my code:

// here is my class which implements parcelable and which i want to
send
public class Place implements Parcelable{
int ID;
String name;
boolean in;
boolean notify;

public Place(int ID , String name, boolean notify) {
this.ID = ID;
this.name = name;
in = false;
this.notify = notify;
}

@Override
public int describeContents() {
// TODO Auto-generated method stub
return 0;
}

@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(ID);
dest.writeString(name);
dest.writeInt((in)? 1:0);
dest.writeInt((notify)? 1:0);
}

public static final Parcelable.CreatorPlace CREATOR = new
CreatorPlace() {

@Override
public Place[] newArray(int size) {
return new Place[size];
}

@Override
public Place createFromParcel(Parcel source) {
return new Place(source);
}
};

private Place(Parcel p) {
ID = p.readInt();
name = p.readString();
in = ((p.readInt() == 0)? false:true);
notify = ((p.readInt() == 0)? false:true);
}
}


// In the service I put the Place object into bundle and I add it as
data to message, then i send it to replyTo(Messenger of the activity)
try {
  b = new Bundle();
  b.putParcelable(place, allPlaces.get(0));
  m = Message.obtain(null, GET_PLACE);
  m.setData(b);
  msg.replyTo.send(m);
} catch (RemoteException e1) {
  e1.printStackTrace();
}

// Here is the handler which handles the message
b = new Bundle();
b = msg.getData();
b.setClassLoader(getClassLoader()); // somewhere i read i should reset
the class loader to the loader of the activity in different process
Place p = (Place) b.getParcelable(place);
Toast.makeText(getApplicationContext(), name: +p.name,
Toast.LENGTH_SHORT).show();

Can you help me pls or am I missing something? I'm going crazy, every
advice is worth.

-- 
You received this message because you are subscribed to the Google
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] bind service in another aplication

2011-04-25 Thread ivan harmady
Hi, I'm trying to make bound service. Acording to tutorials at
developer.android.com it is appropriate for me to implement bound
service using messenger // there is written i should use it if i want
to allow clients from different applications to access my service for
IPC but i don't need to handle multithreading.
if i want to bind service in the same application, there is no
problem. BUT, my problem is to bind service which is in another
application(/project) than my activity which i want to bind to it.

in the activity which i want bind to service i call:
  bindService(new Intent(this, -- !!! -- ), myServiceConnection,
Context.BIND_AUTO_CREATE);

- BUT i don't know how to write path to the service.class which i
have in another application(/project)

how can i handle it? can somebody help me pls? i would be very
thankfull. I spend too much time to solve it and nothing came :(((

-- 
You received this message because you are subscribed to the Google
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] In-app billing problem

2011-04-08 Thread Ivan
Hi guys,

I'm trying to integrate in-app billing in an app but for some reason I
can't get the Dungeons sample app to work, even with static responses.

What I've done is:

   - i've setup a publisher and merchant accounts
   - copied my public key from publisher profile in
base64EncodedPublicKey in Security.java in Dungeons
   - uploaded a signed apk and installed the same on my phone  -
Motorola Milestone 2.1 with Market app 2.3.4
   - using my developer's account and License Test Response is set to
Licensed on the phone

When I start the sample and select one of the static items - e.g.
android.test.purchased, the payment screen with a VISA xxx-FAKE opens,
but afterwards only shows Authorizing purchase and doesn't complete
and nothing shows up in Items you own.

Am I forgetting a step or my phone is the problem maybe? Do you have
any idea before I start debugging the issue?

Cheers,
Ivan

-- 
You received this message because you are subscribed to the Google
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: ListView leaks memory II

2011-03-31 Thread ivan
Incoming references and path to GC root show only the TmpTestActivity.

On Mar 30, 5:56 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 7:45 PM, ivan istas...@gmail.com wrote:
  I just ran the ApiDemos app (from SDK 7) in a stand alone emulator.

  I went to List1, then back, then to List2, then back, then back to
  List1, etc... then:

  1.) I used adb shell ps to view the process id.
  2.) I used adb kill -10 pid to kill the process and dump an hprof
  3.) I pulled the hprof from the virtual device's sdcard to my machine
  4.) I converted the hprof with hprof-conv
  5.) I opened the hprof with MAT in eclipse
  6.) I opened OQL tab and ran select * from
  com.example.android.apis.view.List1
  7.) I see multiple instances of com.example.android.apis.view.List1
  lingering in memory

 You forgot:

 8.) Made note of what is holding onto those instances

 If they are not referenced by anything, they are simply garbage that
 has not been collected. Conversely, if they are referenced by
 something, it is important to know what that something is.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 Available!

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


[android-developers] Re: ListView leaks memory II

2011-03-31 Thread ivan
So to reiterate ...

I can see every instance of a ListView/ListActivity (ever created)
sitting around in memory, even though I force a GC in every call to
onDestroy().
... And this is the expected behavior, because the Dalvik GC will
eventually collect them.

Why isn't this the case with other views?



On Mar 31, 10:28 am, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Mar 31, 2011 at 11:58 AM, ivan istas...@gmail.com wrote:
  Incoming references and path to GC root show only the TmpTestActivity.

 If I am understanding you correctly, then, it is merely a matter of
 them not having been GC'd yet. Bear in mind that the Dalvik GC
 implementation does not try to reclaim all unreferenced objects in a
 single pass.

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

 Android Training in NYC:http://marakana.com/training/android/

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


[android-developers] Re: ListView leaks memory II

2011-03-31 Thread ivan
Ok I just tested the api demo again.

I went in and out of List1.java 15 times, and only saw 8 instances
still on the heap.

So, clearly some are being GC'd.

My question still remains... Why doesn't this happen with other views?

On Mar 31, 11:50 am, ivan istas...@gmail.com wrote:
 So to reiterate ...

 I can see every instance of a ListView/ListActivity (ever created)
 sitting around in memory, even though I force a GC in every call to
 onDestroy().
 ... And this is the expected behavior, because the Dalvik GC will
 eventually collect them.

 Why isn't this the case with other views?

 On Mar 31, 10:28 am, Mark Murphy mmur...@commonsware.com wrote:

  On Thu, Mar 31, 2011 at 11:58 AM, ivan istas...@gmail.com wrote:
   Incoming references and path to GC root show only the TmpTestActivity.

  If I am understanding you correctly, then, it is merely a matter of
  them not having been GC'd yet. Bear in mind that the Dalvik GC
  implementation does not try to reclaim all unreferenced objects in a
  single pass.

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

  Android Training in NYC:http://marakana.com/training/android/

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


[android-developers] Re: ListView leaks memory II

2011-03-31 Thread ivan
Roman, can you recommend your preferred way for analyzing whether or
not an object is being withheld from GC by another?

On Mar 31, 2:05 pm, Romain Guy romain...@android.com wrote:
 I have seen many lists with images before. Again, I'd be happy to fix a
 possible issue but I would need a repro case and an explanation of what is
 holding memory and how. I can certainly see views moved to the scrap heap
 holding onto these large images, but the scrap heap is mostly filled when a
 list uses views of different types, which doesn't seem to be what you are
 describing (I would expect at most one view in the scrap heap in your case.)



 On Thu, Mar 31, 2011 at 12:02 PM, Matthew Powers mtpow...@gmail.com wrote:
  Yeah we have a unique setup.  An e-reader that uses a listview to actually
  scroll vertically instead of using the conventional gallery, with very high
  resolution images.  It doesn't surprise me that you have not seen this
  before, its an unconventional way of using a listview and we are using very
  high res images.  I can assure you though, it happens.

  On Thu, Mar 31, 2011 at 2:51 PM, Romain Guy romain...@android.com wrote:

  Bitmaps are an entirely different problem. Android 3.0 improves bitmaps
  memory management a lot by reducing the time it takes for them to be
  reclaimed by the GC. A leak happens only if there's memory that never gets
  reclaimed, which I believe is not the case here. I would again be happy to
  track down and fix such an issue but the fact that we've never witnessed it
  in many many apps that use ListView makes me doubtful.

  On Thu, Mar 31, 2011 at 11:47 AM, Matthew Powers mtpow...@gmail.comwrote:

  Sorry I didn't explain myself fully. In our layout we have a listview
  with rather large images.  We have shown many times that the gc does not 
  run
  quick enough to clean up the images onDestroy, onConfigurationChange, etc
  and are getting OOM exceptions.  We have seen bitmaps getting stranded and
  have had to clean them up by hand, thus walking the tree and recycling the
  individual bitmaps by hand (nulling out does nothing). There appears to be
  new documentation about the recycler where theoretcially we could set a
  recycler listener and monitor when a view is moved onto the scrap heap to
  achieve the same thing, however I have seen instances of 
  onMovedToScrapHeap
  firing on views that are still in focus.  I have submitted a bug with
  detailed instructions on how to reproduce this.
  I could be wrong but we have had a lot of engineers looking at this leak
  in the listview over the last several months.

  On Thu, Mar 31, 2011 at 2:40 PM, Romain Guy romain...@android.comwrote:

  There is no need to do this whatsoever. And you cannot recycle Views
  anyway, at most you can set all the references to null manually which 
  will
  not make much of a difference. The GC will eventually collect the 
  ListView
  instances.

  On Thu, Mar 31, 2011 at 11:32 AM, Matthew Powers 
  mtpow...@gmail.comwrote:

  I have played with this MANY times.  The only solution I have seen is
  to walkthetree in the listview and recycle your objects by hand

  On Thu, Mar 31, 2011 at 2:08 PM, ivan istas...@gmail.com wrote:

  Ok I just tested the api demo again.

  I went in and out of List1.java 15 times, and only saw 8 instances
  still on the heap.

  So, clearly some are being GC'd.

  My question still remains... Why doesn't this happen with other views?

  On Mar 31, 11:50 am, ivan istas...@gmail.com wrote:
   So to reiterate ...

   I can see every instance of a ListView/ListActivity (ever created)
   sitting around in memory, even though I force a GC in every call to
   onDestroy().
   ... And this is the expected behavior, because the Dalvik GC will
   eventually collect them.

   Why isn't this the case with other views?

   On Mar 31, 10:28 am, Mark Murphy mmur...@commonsware.com wrote:

On Thu, Mar 31, 2011 at 11:58 AM, ivan istas...@gmail.com
  wrote:
 Incoming references and path to GC root show only the
  TmpTestActivity.

If I am understanding you correctly, then, it is merely a matter
  of
them not having been GC'd yet. Bear in mind that the Dalvik GC
implementation does not try to reclaim all unreferenced objects in
  a
single pass.

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

Android Training in NYC:http://marakana.com/training/android/

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
  android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  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

[android-developers] ListView leaks memory

2011-03-30 Thread ivan
I have read copious posts on this, but no solution.  After using MAT
extensively on an ApiDemo list view sample, I am ABSOLUTELY convinced
that the ListView/ListActivity is leaking memory.


import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class TmpTestActivity extends ListActivity {

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

setListAdapter(new MyListAdapter(this));
}

@Override
protected void onDestroy()
{
super.onDestroy();
final MyListAdapter mla =
(MyListAdapter)getListView().getAdapter();
mla.onDestroy();

// here I tried setting the activity's contained ListView's
onItemClickListener to null

getListView().setOnItemClickListener(null);
getListView().focusableViewAvailable(null);
}

private static class MyListAdapter extends BaseAdapter {

public void onDestroy()
{
mContext = null;
}

public MyListAdapter(Context context) {
mContext = context;
}

public int getCount() {
return mStrings.length;
}

@Override
public boolean areAllItemsEnabled() {
return false;
}

@Override
public boolean isEnabled(int position) {
return !mStrings[position].startsWith(-);
}

public Object getItem(int position) {
return position;
}

public long getItemId(int position) {
return position;
}

public View getView(int position, View convertView, ViewGroup
parent) {
TextView tv;
if (convertView == null) {
tv = (TextView) LayoutInflater.from(mContext).inflate(
 
android.R.layout.simple_expandable_list_item_1, parent, false);
} else {
tv = (TextView) convertView;
}
tv.setText(mStrings[position]);
return tv;
}

private Context mContext;

private String[] mStrings = {
--,
--,
Abbaye de Belloc,
Abbaye du Mont des Cats,
Abertam,
--,
Abondance,
--,
Ackawi,
Acorn,
Adelost,
Affidelice au Chablis,
Afuega'l Pitu,
Airag,
--,
Airedale,
Aisy Cendre,
--,
Allgauer Emmentaler,
Alverca,
Ambert,
American Cheese,
Ami du Chambertin,
--,
--,
Anejo Enchilado,
Anneau du Vic-Bilh,
Anthoriro,
--,
--
};
}
}

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


[android-developers] ListView leaks memory II

2011-03-30 Thread ivan
I accidentally posted that last one before I was done.

I have read copious posts on this, but no solution.  After using MAT
extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
convinced that the ListView/ListActivity is leaking memory.  I say
this because I can see every instance I've created persisting in
memory -- regardless of forcing a garbage collection.  To repeat copy
the code below into a project, create another simple Activity and go
back and forth between the two a few times.  Then in DDMS force a GC
and dump the heap hprof file.  Open the OQL tab in MAT and type the
following query select * from com.package name.TmpTestActivity and
run... you'll notice multiple instances of TmpTestActivity in memory.

Here's my code:


import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class TmpTestActivity extends ListActivity {

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

setListAdapter(new MyListAdapter(this));
}

@Override
protected void onDestroy()
{
super.onDestroy();
final MyListAdapter mla =
(MyListAdapter)getListView().getAdapter();
mla.onDestroy();

// here I tried setting the activity's contained ListView's
onItemClickListener to null
// since it references an anonymous non-static inner private
class ... see source for ListActivity
getListView().setOnItemClickListener(null);
}

// Here I made the simple Adapter a static inner class to avoid
implicitly referencing the outer class
private static class MyListAdapter extends BaseAdapter {

// I also created an onDestroy function to release the
reference to the outer class's context
public void onDestroy()
{
mContext = null;
}

public MyListAdapter(Context context) {
mContext = context;
}

public int getCount() {
return mStrings.length;
}

@Override
public boolean areAllItemsEnabled() {
return false;
}

@Override
public boolean isEnabled(int position) {
return !mStrings[position].startsWith(-);
}

public Object getItem(int position) {
return position;
}

public long getItemId(int position) {
return position;
}

public View getView(int position, View convertView, ViewGroup
parent) {
TextView tv;
if (convertView == null) {
tv = (TextView) LayoutInflater.from(mContext).inflate(
 
android.R.layout.simple_expandable_list_item_1, parent, false);
} else {
tv = (TextView) convertView;
}
tv.setText(mStrings[position]);
return tv;
}

private Context mContext;

private String[] mStrings = {
--,
--,
Abbaye de Belloc,
Abbaye du Mont des Cats,
Abertam,
--,
Abondance,
--,
Ackawi,
Acorn,
Adelost,
Affidelice au Chablis,
Afuega'l Pitu,
Airag,
--,
Airedale,
Aisy Cendre,
--,
Allgauer Emmentaler,
Alverca,
Ambert,
American Cheese,
Ami du Chambertin,
--,
--,
Anejo Enchilado,
Anneau du Vic-Bilh,
Anthoriro,
--,
--
};
}
}

-- 
You received this message because you are subscribed to the Google
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: ListView leaks memory

2011-03-30 Thread ivan
Mark,

I accidentally posted this before I was done... please see my second
post with the same title and II appended.

Sorry about the confusion.

On Mar 30, 11:10 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 1:06 PM, ivan istas...@gmail.com wrote:
  I have read copious posts on this, but no solution.  After using MAT
  extensively on an ApiDemo list view sample, I am ABSOLUTELY convinced
  that the ListView/ListActivity is leaking memory.

 And your proof of this is... what, exactly?

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 Available!

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
onDestory has been called every time, which I've tested with a break
point .

On Mar 30, 11:23 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
  I accidentally posted that last one before I was done.

  I have read copious posts on this, but no solution.  After using MAT
  extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
  convinced that the ListView/ListActivity is leaking memory.  I say
  this because I can see every instance I've created persisting in
  memory -- regardless of forcing a garbage collection.  To repeat copy
  the code below into a project, create another simple Activity and go
  back and forth between the two a few times.  Then in DDMS force a GC
  and dump the heap hprof file.  Open the OQL tab in MAT and type the
  following query select * from com.package name.TmpTestActivity and
  run... you'll notice multiple instances of TmpTestActivity in memory.

 Has onDestroy() been called on the multiple instances of
 TmpTestActivity in memory?

 If not, they are not leaked. Android just hasn't kicked them out of
 RAM yet. That is perfectly normal behavior.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 Available!

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
In addition, I've read that the leak doesn't occur while the app is
running in a non-debug session.  This is not the case with my
experiments.  I see the leak regardless.

On Mar 30, 11:28 am, ivan istas...@gmail.com wrote:
 onDestory has been called every time, which I've tested with a break
 point .

 On Mar 30, 11:23 am, Mark Murphy mmur...@commonsware.com wrote:

  On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
   I accidentally posted that last one before I was done.

   I have read copious posts on this, but no solution.  After using MAT
   extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
   convinced that the ListView/ListActivity is leaking memory.  I say
   this because I can see every instance I've created persisting in
   memory -- regardless of forcing a garbage collection.  To repeat copy
   the code below into a project, create another simple Activity and go
   back and forth between the two a few times.  Then in DDMS force a GC
   and dump the heap hprof file.  Open the OQL tab in MAT and type the
   following query select * from com.package name.TmpTestActivity and
   run... you'll notice multiple instances of TmpTestActivity in memory.

  Has onDestroy() been called on the multiple instances of
  TmpTestActivity in memory?

  If not, they are not leaked. Android just hasn't kicked them out of
  RAM yet. That is perfectly normal behavior.

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version
  1.9.2 Available!

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
Also, I'm using Android SDK build 8 (2.2).

On Mar 30, 11:37 am, ivan istas...@gmail.com wrote:
 In addition, I've read that the leak doesn't occur while the app is
 running in a non-debug session.  This is not the case with my
 experiments.  I see the leak regardless.

 On Mar 30, 11:28 am, ivan istas...@gmail.com wrote:

  onDestory has been called every time, which I've tested with a break
  point .

  On Mar 30, 11:23 am, Mark Murphy mmur...@commonsware.com wrote:

   On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
I accidentally posted that last one before I was done.

I have read copious posts on this, but no solution.  After using MAT
extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
convinced that the ListView/ListActivity is leaking memory.  I say
this because I can see every instance I've created persisting in
memory -- regardless of forcing a garbage collection.  To repeat copy
the code below into a project, create another simple Activity and go
back and forth between the two a few times.  Then in DDMS force a GC
and dump the heap hprof file.  Open the OQL tab in MAT and type the
following query select * from com.package name.TmpTestActivity and
run... you'll notice multiple instances of TmpTestActivity in memory.

   Has onDestroy() been called on the multiple instances of
   TmpTestActivity in memory?

   If not, they are not leaked. Android just hasn't kicked them out of
   RAM yet. That is perfectly normal behavior.

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

   _The Busy Coder's Guide to *Advanced* Android Development_ Version
   1.9.2 Available!

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
John, I've read your post about this ... I launched a non-debug
version through eclipse (i.e. ctrl + F11) and pulled a heap hprof file
showing the same memory leaks.

Am I missing a step?  When I was running I could see the process in
DDMS, but break points and stack info were not available -- so I
figured this was not running in the debugger.

On Mar 30, 12:34 pm, John Gaby jg...@gabysoft.com wrote:
 Kostya asked if you were running under the debugger.  This is relevant
 because previously I too had a memory leak involved with ListViews and
 eventually discovered that it only happened if I was running under the
 debugger.  So if you are running under the debugger, you might check
 it without the debugger running to see if you still have a problem.

 On Mar 30, 10:53 am, ivan istas...@gmail.com wrote:

  Also, I'm using Android SDK build 8 (2.2).

  On Mar 30, 11:37 am, ivan istas...@gmail.com wrote:

   In addition, I've read that the leak doesn't occur while the app is
   running in a non-debug session.  This is not the case with my
   experiments.  I see the leak regardless.

   On Mar 30, 11:28 am, ivan istas...@gmail.com wrote:

onDestory has been called every time, which I've tested with a break
point .

On Mar 30, 11:23 am, Mark Murphy mmur...@commonsware.com wrote:

 On Wed, Mar 30, 2011 at 1:18 PM, ivan istas...@gmail.com wrote:
  I accidentally posted that last one before I was done.

  I have read copious posts on this, but no solution.  After using MAT
  extensively on a simple ApiDemo list view sample, I am ABSOLUTELY
  convinced that the ListView/ListActivity is leaking memory.  I say
  this because I can see every instance I've created persisting in
  memory -- regardless of forcing a garbage collection.  To repeat 
  copy
  the code below into a project, create another simple Activity and go
  back and forth between the two a few times.  Then in DDMS force a GC
  and dump the heap hprof file.  Open the OQL tab in MAT and type the
  following query select * from com.package name.TmpTestActivity 
  and
  run... you'll notice multiple instances of TmpTestActivity in 
  memory.

 Has onDestroy() been called on the multiple instances of
 TmpTestActivity in memory?

 If not, they are not leaked. Android just hasn't kicked them out of
 RAM yet. That is perfectly normal behavior.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 Available!

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
I'm using a deice.

On Mar 30, 1:30 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 30, 2011 at 3:28 PM, ivan istas...@gmail.com wrote:
  John, I've read your post about this ... I launched a non-debug
  version through eclipse (i.e. ctrl + F11) and pulled a heap hprof file
  showing the same memory leaks.

  Am I missing a step?  When I was running I could see the process in
  DDMS, but break points and stack info were not available -- so I
  figured this was not running in the debugger.

 Run the emulator outside of Eclipse.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version
 1.9.2 Available!

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
When I use MAT to look at TmpTestActivity, I 

1.) Open the OQL tab in MAT and type the following query select *
from com.package name.TmpTestActivity and run the query
2.) I right click on one of the TmpTestActivity result rows and choose
List Objecst - with incoming references ... the results of which is
the same TmpTestActivity instance.
3.) I then right click on the result and choose Path to GC Roots -
Exclude all soft/weak/phantom references, which results in:

i.) a ListView referencing the context of TmpTestActivity
ii.) a FrameLayout referencing the context of TmpTestActivity
iii.) an android.app.ContextImpl referencing the outer context of
TmpTestActivity

Note, if I run this test with an activity that doesn't contain the
ListView I do not see extra activities sitting around in memory.



On Mar 30, 4:35 pm, Romain Guy romain...@android.com wrote:
 What exactly is leaking? What is the chain of references causing the leak?
 If what you are describing is true it would affect pretty much every Android
 application, which seems unlikely.

 On Wed, Mar 30, 2011 at 2:23 PM, Mark Murphy mmur...@commonsware.comwrote:



  On Wed, Mar 30, 2011 at 5:14 PM, ivan istas...@gmail.com wrote:
   I'm using a deice.

  You should be testing this on an emulator in addition to your device.
  Your device may have its own set of bugs and (strangely enough) the
  home screen can impact this sort of thing as well. For a problem like
  this, the emulator will be a truer test of what the unmodified Android
  code will do. Use a standalone emulator and the standalone DDMS
  (tools/ddms from your SDK installation) to ensure Eclipse is not the
  one causing you difficulty.

  On the plus side, I didn't realize you could dump the heap of a
  process that's running on hardware, so that's good to know.

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version
  1.9.2 Available!

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

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

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

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


[android-developers] Re: ListView leaks memory II

2011-03-30 Thread ivan
I just ran the ApiDemos app (from SDK 7) in a stand alone emulator.

I went to List1, then back, then to List2, then back, then back to
List1, etc... then:

1.) I used adb shell ps to view the process id.
2.) I used adb kill -10 pid to kill the process and dump an hprof
3.) I pulled the hprof from the virtual device's sdcard to my machine
4.) I converted the hprof with hprof-conv
5.) I opened the hprof with MAT in eclipse
6.) I opened OQL tab and ran select * from
com.example.android.apis.view.List1
7.) I see multiple instances of com.example.android.apis.view.List1
lingering in memory

On Mar 30, 5:01 pm, ivan istas...@gmail.com wrote:
 When I use MAT to look at TmpTestActivity, I 

 1.) Open the OQL tab in MAT and type the following query select *
 from com.package name.TmpTestActivity and run the query
 2.) I right click on one of the TmpTestActivity result rows and choose
 List Objecst - with incoming references ... the results of which is
 the same TmpTestActivity instance.
 3.) I then right click on the result and choose Path to GC Roots -
 Exclude all soft/weak/phantom references, which results in:

     i.) a ListView referencing the context of TmpTestActivity
     ii.) a FrameLayout referencing the context of TmpTestActivity
     iii.) an android.app.ContextImpl referencing the outer context of
 TmpTestActivity

 Note, if I run this test with an activity that doesn't contain the
 ListView I do not see extra activities sitting around in memory.

 On Mar 30, 4:35 pm, Romain Guy romain...@android.com wrote:

  What exactly is leaking? What is the chain of references causing the leak?
  If what you are describing is true it would affect pretty much every Android
  application, which seems unlikely.

  On Wed, Mar 30, 2011 at 2:23 PM, Mark Murphy mmur...@commonsware.comwrote:

   On Wed, Mar 30, 2011 at 5:14 PM, ivan istas...@gmail.com wrote:
I'm using a deice.

   You should be testing this on an emulator in addition to your device.
   Your device may have its own set of bugs and (strangely enough) the
   home screen can impact this sort of thing as well. For a problem like
   this, the emulator will be a truer test of what the unmodified Android
   code will do. Use a standalone emulator and the standalone DDMS
   (tools/ddms from your SDK installation) to ensure Eclipse is not the
   one causing you difficulty.

   On the plus side, I didn't realize you could dump the heap of a
   process that's running on hardware, so that's good to know.

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

   _The Busy Coder's Guide to *Advanced* Android Development_ Version
   1.9.2 Available!

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

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

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

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


[android-developers] ListView flicker problem (cacheColorHint=#00000000 already set)

2011-03-16 Thread Ivan
Hi guys,

In my app I have a background image and transparent listviews, with
properly set cacheColorHint=#. In every activity it works,
except for one. In this particular one I am getting a strange flicker
effect when I scroll, which basically makes the header and the
listview items a little brighter and then goes away. Any ideas what
the problem can be?  Could the problem be in the header somehow? I run
on Motorola Milestone with android 2.1.

Here is the listview :

?xml version=1.0 encoding=utf-8?
ListView xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@android:id/list android:layout_width=fill_parent
android:layout_height=fill_parent android:layout_weight=1
android:scrollbars=none android:background=@drawable/
game_background  android:cacheColorHint=#/

Cheers,
Ivan

-- 
You received this message because you are subscribed to the Google
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] RemoteServiceException (Nexus S SDK 2.3.2)

2011-03-16 Thread ivan
I have an app that produces a RemoteServiceException on the Nexus S
(running Android SDK 2.3.2) when trying to expand remote views in the
notification bar.

Is anyone aware of issues with this?

I've noticed that the official SDKs versions (http://
developer.android.com/sdk/index.html) jump from 2.3 to 2.3.3.

Maybe 2.3.2 is a scrapped buggy build/version?

-- 
You received this message because you are subscribed to the Google
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 does an AppWidgetHost set focus to an AppWidget button?

2011-03-07 Thread Ivan
I am working on an Android Launcher application. I can host AppWidgets
and display them on my View. I can't figure out how to set focus to
the buttons within the widget (for example, the individual controls of
the Power Control widget), as happens with the default launcher. I am
assigning focus to the AppWidgetHostView using requestFocus(true).

When using a LinearLayout to host the AppWidgets, it appears that the
entire widget gets the focus. The widget buttons respond to onClick
presses.

When using a Gallery to host the AppWidgets (what i really want), I
can't set focus to the at all widget, or get it to respond to
onClick.

-- 
You received this message because you are subscribed to the Google
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: Update activity A from another activity B

2011-02-16 Thread Ivan
Thanks, I tried out the startActivityForResult in the end and it
worked nicely. I was not sure if after coming back from C, A would be
updated but in fact it does. For the interested this is what I do
(simplified with 2 activities, 3 is basically the same process with
passing the position):

Caller Activity A
-

@Override
protected void onListItemClick(ListView l, View v, int position, long
id) {

  Intent intent = new Intent(A.this, B.class);
  intent.putExtra(position, position );
  startActivityForResult(intent, 1);
}

@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
if(resultCode  0){
int position =  data.getExtras().getInt(position);
//remove item at position
//update adapter
}
}

Receiving activity B
--

//set result
Intent in = new Intent();
in.putExtra(position, position);
setResult(1, in);
finish();

On Feb 16, 12:41 am, MagouyaWare magouyaw...@gmail.com wrote:
 If it were me I would use startActivityForResult() when starting both
 Activity B and C...  Activity C would return any pertinent information (if
 any) to Activity B.  Then Activity B can return the pertinent info back to
 A.

 When you get the result from B you update the Activity A based on that
 result...  Technically Activity A would not be updated until you returned
 back to Activity A (and not immediately when clicking the button in B and
 moving on to C) but the user experience is the same either way.

 The only thing to look out for would be if the user can get back to Activity
 A without pressing the back button...

-- 
You received this message because you are subscribed to the Google
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] Update activity A from another activity B

2011-02-15 Thread Ivan
Hi guys,

I am looking for the best way to solve the following problem:

I have 3 activities, lets say A,B and C, which transition linearly A-
B-C. What happens exactly is that in A an item from a listview is
clicked. which shows detailed information in B. Then in B a button
click progresses to C. What I would like to do is to remove the
clicked item the listview in A after the button click in B,
nevertheless progressing to C. The point being that when in C, hitting
back until A should show the updated listview.

One solution I've found is to use a ViewFlipper to switch A and B's
content, rather than having two separate activities. Second one is to
persist state to DB. Both of them require some significant effort in
the current setting of my app. Is there an easier solution? I was
thinking about startActivityForResult from A, however, I still would
like to move to C.

Any suggestion or discussion is very appreciated!

Thanks a lot,
Ivan

-- 
You received this message because you are subscribed to the Google
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: Minimize CursorAdapter view recycling?

2011-02-08 Thread ivan
Anyone?

On Feb 7, 4:33 pm, ivan istas...@gmail.com wrote:
 I'm using a ResourceCursorAdapter to display a list of downloads from
 a ContentProvider that track's my application's downloads -- modeled
 after Android's DownloadProvider.

 The problem is that when a download is actively running it frequently
 calls bind view--every few seconds--to update a download progress bar,
 with a view object that is NOT currently associated with a given
 cursor position.  Thus, bind view is constantly recycling and binding
 view objects to new item/cursor positions.

 This is especially a problem if the user attempts to push a button on
 one of the items while it's being bound to a different view object and
 cursor position, which results in an event being fired for the wrong
 data.

 Does anyone have advice on how to minimize unnecessary view recycling?

 It appears to only occur for the bottom and top list items (of the
 three on the screen), while the middle item remains tied to a single
 cursor and view object.

 Thanks,
 -Ivan

-- 
You received this message because you are subscribed to the Google
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: Minimize CursorAdapter view recycling?

2011-02-08 Thread ivan
Thanks for the reply.

The button events are -- nine times out of ten -- tied to the correct
data, but if you rapidly push a button you can throw an event that
will be tied to the wrong data.  I thought that this didn't make sense
since everything should be occurring on the UI thread (right?).  But
it appears that the event can sneak in before the screen is actually
refreshed.

On Feb 8, 11:24 am, Kostya Vasilyev kmans...@gmail.com wrote:
 If the button is linked to the wrong item, then you have a bug in your
 adapter's getView, where you're not properly associating the button with
 the item for the case where convertView != null.

 As for performance, I find it useful, when refreshing a ListView item in
 response to some event, to go through the visible list items, find the
 ones that are affected, and push new values into them right then and
 there, rather than calling notifyDataSetChanged / Invalidated.

 -- Kostya

 08.02.2011 19:47, ivan пишет:



  Anyone?

  On Feb 7, 4:33 pm, ivanistas...@gmail.com  wrote:
  I'm using a ResourceCursorAdapter to display a list of downloads from
  a ContentProvider that track's my application's downloads -- modeled
  after Android's DownloadProvider.

  The problem is that when a download is actively running it frequently
  calls bind view--every few seconds--to update a download progress bar,
  with a view object that is NOT currently associated with a given
  cursor position.  Thus, bind view is constantly recycling and binding
  view objects to new item/cursor positions.

  This is especially a problem if the user attempts to push a button on
  one of the items while it's being bound to a different view object and
  cursor position, which results in an event being fired for the wrong
  data.

  Does anyone have advice on how to minimize unnecessary view recycling?

  It appears to only occur for the bottom and top list items (of the
  three on the screen), while the middle item remains tied to a single
  cursor and view object.

  Thanks,
  -Ivan

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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: Minimize CursorAdapter view recycling?

2011-02-08 Thread ivan
The only manipulation to the view object is via the non-overridden
ResourseCursorAdapter bindView() function.  On occasion this function
will block for a couple seconds maximum if a drm data cache is
occurring in another thread, but that thread never touches the view
object.  Maybe waiting on a synchronized block of code (in the UI
thread) to get values from the multi-threaded cache causes the UI
thread to wait, releasing cycles to the UI thread, which in turn
allows the misplaced event to occur?



On Feb 8, 12:32 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Are you sure that you only touch the ListView and its adapter from the
 UI thread?

 -- Kostya

 08.02.2011 22:11, ivan пишет:



  Thanks for the reply.

  The button events are -- nine times out of ten -- tied to the correct
  data, but if you rapidly push a button you can throw an event that
  will be tied to the wrong data.  I thought that this didn't make sense
  since everything should be occurring on the UI thread (right?).  But
  it appears that the event can sneak in before the screen is actually
  refreshed.

  On Feb 8, 11:24 am, Kostya Vasilyevkmans...@gmail.com  wrote:
  If the button is linked to the wrong item, then you have a bug in your
  adapter's getView, where you're not properly associating the button with
  the item for the case where convertView != null.

  As for performance, I find it useful, when refreshing a ListView item in
  response to some event, to go through the visible list items, find the
  ones that are affected, and push new values into them right then and
  there, rather than calling notifyDataSetChanged / Invalidated.

  -- Kostya

  08.02.2011 19:47, ivan пишет:

  Anyone?
  On Feb 7, 4:33 pm, ivanistas...@gmail.com    wrote:
  I'm using a ResourceCursorAdapter to display a list of downloads from
  a ContentProvider that track's my application's downloads -- modeled
  after Android's DownloadProvider.
  The problem is that when a download is actively running it frequently
  calls bind view--every few seconds--to update a download progress bar,
  with a view object that is NOT currently associated with a given
  cursor position.  Thus, bind view is constantly recycling and binding
  view objects to new item/cursor positions.
  This is especially a problem if the user attempts to push a button on
  one of the items while it's being bound to a different view object and
  cursor position, which results in an event being fired for the wrong
  data.
  Does anyone have advice on how to minimize unnecessary view recycling?
  It appears to only occur for the bottom and top list items (of the
  three on the screen), while the middle item remains tied to a single
  cursor and view object.
  Thanks,
  -Ivan
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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: Minimize CursorAdapter view recycling?

2011-02-08 Thread ivan
You were saying something about buttons - how are you creating them,
and
mapping to the right data item? 

I set a tag to the cursor position in the bindView() function.

On Feb 8, 3:20 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 No, waiting on synchronized block or thread.wait blocks the waiting thread
 and only lets other threads run.

 But, that synchronization doesn't sound good for a different reason, since
 you are blocking the UI thread, and that should not happen.

 One way around it is to make that cached data item available in the query
 used to populate the list, and fire off update requests to the worker thread
 as needed. Once the worker thread updates the cached item, the list should
 update automatically (since you mentioned that your data is in a content
 provider).

 You were saying something about buttons - how are you creating them, and
 mapping to the right data item?

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com
 09.02.2011 1:04 пользователь ivan istas...@gmail.com написал:

  The only manipulation to the view object is via the non-overridden
  ResourseCursorAdapter bindView() function. On occasion this function
  will block for a couple seconds maximum if a drm data cache is
  occurring in another thread, but that thread never touches the view
  object. Maybe waiting on a synchronized block of code (in the UI
  thread) to get values from the multi-threaded cache causes the UI
  thread to wait, releasing cycles to the UI thread, which in turn
  allows the misplaced event to occur?

  On Feb 8, 12:32 pm, Kostya Vasilyev kmans...@gmail.com wrote:
  Are you sure that you only touch the ListView and its adapter from the
  UI thread?

  -- Kostya

  08.02.2011 22:11, ivan пишет:

   Thanks for the reply.

   The button events are -- nine times out of ten -- tied to the correct
   data, but if you rapidly push a button you can throw an event that
   will be tied to the wrong data.  I thought that this didn't make sense
   since everything should be occurring on the UI thread (right?).  But
   it appears that the event can sneak in before the screen is actually
   refreshed.

   On Feb 8, 11:24 am, Kostya Vasilyevkmans...@gmail.com  wrote:
   If the button is linked to the wrong item, then you have a bug in your
   adapter's getView, where you're not properly associating the button
 with
   the item for the case where convertView != null.

   As for performance, I find it useful, when refreshing a ListView item
 in
   response to some event, to go through the visible list items, find the
   ones that are affected, and push new values into them right then and
   there, rather than calling notifyDataSetChanged / Invalidated.

   -- Kostya

   08.02.2011 19:47, ivan пишет:

   Anyone?
   On Feb 7, 4:33 pm, ivanistas...@gmail.com    wrote:
   I'm using a ResourceCursorAdapter to display a list of downloads
 from
   a ContentProvider that track's my application's downloads -- modeled
   after Android's DownloadProvider.
   The problem is that when a download is actively running it
 frequently
   calls bind view--every few seconds--to update a download progress
 bar,
   with a view object that is NOT currently associated with a given
   cursor position.  Thus, bind view is constantly recycling and
 binding
   view objects to new item/cursor positions.
   This is especially a problem if the user attempts to push a button
 on
   one of the items while it's being bound to a different view object
 and
   cursor position, which results in an event being fired for the wrong
   data.
   Does anyone have advice on how to minimize unnecessary view
 recycling?
   It appears to only occur for the bottom and top list items (of the
   three on the screen), while the middle item remains tied to a single
   cursor and view object.
   Thanks,
   -Ivan
   --
   Kostya Vasilyev -- WiFi Manager + pretty widget --

 http://kmansoft.wordpress.com

  --
  Kostya Vasilyev -- WiFi Manager + pretty widget --

 http://kmansoft.wordpress.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

-- 
You received this message because you are subscribed to the Google
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: Minimize CursorAdapter view recycling?

2011-02-08 Thread ivan
I guess the cursor position tag would/could present a problem if the
data size were changing, but it's not (in this particular instance)
and the query/requery results are sorted in a specific order per the
_id.

Weird.

On Feb 8, 4:03 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Then perhaps the cursor gets requeried and the position changes.

 You can track down requeries with a cursor factory and some logging, but
 perhaps it's easier to set a tag to the item's _id value, as that should not
 change (and you need the _id to delete, anyway).

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com
 09.02.2011 1:54 пользователь ivan istas...@gmail.com написал:

  You were saying something about buttons - how are you creating them,
  and
  mapping to the right data item? 

  I set a tag to the cursor position in the bindView() function.

  On Feb 8, 3:20 pm, Kostya Vasilyev kmans...@gmail.com wrote:
  No, waiting on synchronized block or thread.wait blocks the waiting
 thread
  and only lets other threads run.

  But, that synchronization doesn't sound good for a different reason,
 since
  you are blocking the UI thread, and that should not happen.

  One way around it is to make that cached data item available in the query
  used to populate the list, and fire off update requests to the worker
 thread
  as needed. Once the worker thread updates the cached item, the list
 should
  update automatically (since you mentioned that your data is in a content
  provider).

  You were saying something about buttons - how are you creating them, and
  mapping to the right data item?

  --
  Kostya Vasilyev --http://kmansoft.wordpress.com
  09.02.2011 1:04 пользователь ivan istas...@gmail.com написал:

   The only manipulation to the view object is via the non-overridden
   ResourseCursorAdapter bindView() function. On occasion this function
   will block for a couple seconds maximum if a drm data cache is
   occurring in another thread, but that thread never touches the view
   object. Maybe waiting on a synchronized block of code (in the UI
   thread) to get values from the multi-threaded cache causes the UI
   thread to wait, releasing cycles to the UI thread, which in turn
   allows the misplaced event to occur?

   On Feb 8, 12:32 pm, Kostya Vasilyev kmans...@gmail.com wrote:
   Are you sure that you only touch the ListView and its adapter from the
   UI thread?

   -- Kostya

   08.02.2011 22:11, ivan пишет:

Thanks for the reply.

The button events are -- nine times out of ten -- tied to the
 correct
data, but if you rapidly push a button you can throw an event that
will be tied to the wrong data.  I thought that this didn't make
 sense
since everything should be occurring on the UI thread (right?).  But
it appears that the event can sneak in before the screen is actually
refreshed.

On Feb 8, 11:24 am, Kostya Vasilyevkmans...@gmail.com  wrote:
If the button is linked to the wrong item, then you have a bug in
 your
adapter's getView, where you're not properly associating the button
  with
the item for the case where convertView != null.

As for performance, I find it useful, when refreshing a ListView
 item
  in
response to some event, to go through the visible list items, find
 the
ones that are affected, and push new values into them right then
 and
there, rather than calling notifyDataSetChanged / Invalidated.

-- Kostya

08.02.2011 19:47, ivan пишет:

Anyone?
On Feb 7, 4:33 pm, ivanistas...@gmail.com    wrote:
I'm using a ResourceCursorAdapter to display a list of downloads
  from
a ContentProvider that track's my application's downloads --
 modeled
after Android's DownloadProvider.
The problem is that when a download is actively running it
  frequently
calls bind view--every few seconds--to update a download progress
  bar,
with a view object that is NOT currently associated with a given
cursor position.  Thus, bind view is constantly recycling and
  binding
view objects to new item/cursor positions.
This is especially a problem if the user attempts to push a
 button
  on
one of the items while it's being bound to a different view
 object
  and
cursor position, which results in an event being fired for the
 wrong
data.
Does anyone have advice on how to minimize unnecessary view
  recycling?
It appears to only occur for the bottom and top list items (of
 the
three on the screen), while the middle item remains tied to a
 single
cursor and view object.
Thanks,
-Ivan
--
Kostya Vasilyev -- WiFi Manager + pretty widget --

 http://kmansoft.wordpress.com

   --
   Kostya Vasilyev -- WiFi Manager + pretty widget --

 http://kmansoft.wordpress.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

[android-developers] Re: Minimize CursorAdapter view recycling?

2011-02-08 Thread ivan
Excuse me, I misspoke... Let me correct: The only manipulation to the
view is via the OVERRIDDEN ResourceCursorAdapter bindView() function.

On Feb 8, 3:03 pm, ivan istas...@gmail.com wrote:
 The only manipulation to the view object is via the non-overridden
 ResourseCursorAdapter bindView() function.  On occasion this function
 will block for a couple seconds maximum if a drm data cache is
 occurring in another thread, but that thread never touches the view
 object.  Maybe waiting on a synchronized block of code (in the UI
 thread) to get values from the multi-threaded cache causes the UI
 thread to wait, releasing cycles to the UI thread, which in turn
 allows the misplaced event to occur?

 On Feb 8, 12:32 pm, Kostya Vasilyev kmans...@gmail.com wrote:

  Are you sure that you only touch the ListView and its adapter from the
  UI thread?

  -- Kostya

  08.02.2011 22:11, ivan пишет:

   Thanks for the reply.

   The button events are -- nine times out of ten -- tied to the correct
   data, but if you rapidly push a button you can throw an event that
   will be tied to the wrong data.  I thought that this didn't make sense
   since everything should be occurring on the UI thread (right?).  But
   it appears that the event can sneak in before the screen is actually
   refreshed.

   On Feb 8, 11:24 am, Kostya Vasilyevkmans...@gmail.com  wrote:
   If the button is linked to the wrong item, then you have a bug in your
   adapter's getView, where you're not properly associating the button with
   the item for the case where convertView != null.

   As for performance, I find it useful, when refreshing a ListView item in
   response to some event, to go through the visible list items, find the
   ones that are affected, and push new values into them right then and
   there, rather than calling notifyDataSetChanged / Invalidated.

   -- Kostya

   08.02.2011 19:47, ivan пишет:

   Anyone?
   On Feb 7, 4:33 pm, ivanistas...@gmail.com    wrote:
   I'm using a ResourceCursorAdapter to display a list of downloads from
   a ContentProvider that track's my application's downloads -- modeled
   after Android's DownloadProvider.
   The problem is that when a download is actively running it frequently
   calls bind view--every few seconds--to update a download progress bar,
   with a view object that is NOT currently associated with a given
   cursor position.  Thus, bind view is constantly recycling and binding
   view objects to new item/cursor positions.
   This is especially a problem if the user attempts to push a button on
   one of the items while it's being bound to a different view object and
   cursor position, which results in an event being fired for the wrong
   data.
   Does anyone have advice on how to minimize unnecessary view recycling?
   It appears to only occur for the bottom and top list items (of the
   three on the screen), while the middle item remains tied to a single
   cursor and view object.
   Thanks,
   -Ivan
   --
   Kostya Vasilyev -- WiFi Manager + pretty widget 
   --http://kmansoft.wordpress.com

  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.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] Minimize CursorAdapter view recycling?

2011-02-07 Thread ivan
I'm using a ResourceCursorAdapter to display a list of downloads from
a ContentProvider that track's my application's downloads -- modeled
after Android's DownloadProvider.

The problem is that when a download is actively running it frequently
calls bind view--every few seconds--to update a download progress bar,
with a view object that is NOT currently associated with a given
cursor position.  Thus, bind view is constantly recycling and binding
view objects to new item/cursor positions.

This is especially a problem if the user attempts to push a button on
one of the items while it's being bound to a different view object and
cursor position, which results in an event being fired for the wrong
data.

Does anyone have advice on how to minimize unnecessary view recycling?

It appears to only occur for the bottom and top list items (of the
three on the screen), while the middle item remains tied to a single
cursor and view object.

Thanks,
-Ivan

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


[android-developers] Re: How to interrupt a blocking I/O operation?

2011-01-11 Thread ivan
I ended up NOT going with an interrupt, as it seemed to be (as Bob
explained) a crap-shoot.  Instead when a user wants to stop an I/O -
connection operation I orphan the the blocking thread and set it to
die on it's next loop.  Since most of the resources are released by
the non-blocking thread anyways, an IOException is usually thrown and
cleanup of the blocking thread happens pretty quickly.

Thanks for all the great suggestions!

On Jan 8, 11:16 pm, Bob Kerns r...@acm.org wrote:
 Well, there's interrupting the IO loop, and there's backing out of the
 blocked IO system call.

 GENERALLY SPEAKING, you won't be able to force an ARBITRARY OS to give
 you back control if it's actually in a blocked IO system call.

 If you can on a specific OS, and it improves your app in some way
 that's worth the complexity, then great. But I recommend avoiding it
 as a design requirement! What may work on one platform may not work on
 another.

 That's why I suggest the default position is you can't do that. If
 you can, you should view it as a nice optimization. Optimizations come
 with costs; if it's worth the complexity and potential for bugs and
 corresponding testing burden -- go for it.

 But first design your application to work as well as it can without
 relying on it.

 Then figure out if you even need it.

 On Jan 7, 11:57 am, Streets Of Boston flyingdutc...@gmail.com wrote:

  In my experience, if you use AsynTasks (or Future? instances) to do
  your HTTP I/O in the background, calling cancel(true) on these
  instances will interrupt the HTTP I/O.

  If i'm not mistaken, the apache HttpClient is sensitive to calling
  interrupt() on the thread on which it is doing HTTP I/O.

  On Jan 7, 12:07 pm, ivan istas...@gmail.com wrote:

   I'm wondering what the currently suggested method is for interrupting
   a read operation of a socket input stream?

   I know that traditionally the read could be interrupted by closing the
   socket from another thread and catching an IOException, but I'm not
   quite sure how to get at the socket from the apache classes.

   Maybe I should use some sort of interruptible channel instead ... ?

   Any links or help is greatly appreciated.

   My code looks like this -- minus most of the error handling:

   org.apache.http.impl.client.DefaultHttpClient
   org.apache.http.client.methods.HttpGet
   org.apache.http.HttpResponse

   DefaultHttpClient client = new DefaultHttpClient(httpParameters);

   HttpGet request = new HttpGet(Uri);

   HttpResponse response = client.execute(request);

   InputStream entityStream = response.getEntity().getContent();

   try
   {
      bytesRead = entityStream.read(data);}

   catch (IOException ex)
   {

   }- 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] How to interrupt a blocking I/O operation?

2011-01-07 Thread ivan
I'm wondering what the currently suggested method is for interrupting
a read operation of a socket input stream?

I know that traditionally the read could be interrupted by closing the
socket from another thread and catching an IOException, but I'm not
quite sure how to get at the socket from the apache classes.

Maybe I should use some sort of interruptible channel instead ... ?

Any links or help is greatly appreciated.

My code looks like this -- minus most of the error handling:

org.apache.http.impl.client.DefaultHttpClient
org.apache.http.client.methods.HttpGet
org.apache.http.HttpResponse

DefaultHttpClient client = new DefaultHttpClient(httpParameters);

HttpGet request = new HttpGet(Uri);

HttpResponse response = client.execute(request);

InputStream entityStream = response.getEntity().getContent();

try
{
   bytesRead = entityStream.read(data);
}
catch (IOException ex)
{

}

-- 
You received this message because you are subscribed to the Google
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: ThreadSafeConnectionManager timeout...

2011-01-07 Thread ivan
Have you tried playing with the timeouts passed via the http params?

HttpParams httpParameters = new BasicHttpParams();
ConnManagerParams.setMaxTotalConnections(httpParameters,
inApp.gResources.getInteger(R.integer.HTTP_MaxConnCnt));
HttpConnectionParams.setConnectionTimeout(httpParameters, 2); //
Set the timeout in milliseconds until a connection is established.
HttpConnectionParams.setSoTimeout(httpParameters, 3); // Set the
default socket timeout (SO_TIMEOUT) in milliseconds which is the
timeout for waiting for data.

On Jan 7, 9:29 am, lou louis.coq...@wopata.com wrote:
 Hi !
 I'm actually trying to do an application with a websocket persistent
 connexion  some http request. So I thank I need to use
 ThreadSafeConnectionManager, but I have a big problem with it : very
 very often I got a java.net.SocketException: The operation timed out
 even when the server's responding.
 My code :
 // class members declarations
 private static HttpParams mParams;
 private static SchemeRegistry mSchemeRegistry;
 private static ClientConnectionManager mCm;
 private static HttpClient mClient;

 // code used to initiate the HttpClient
 mParams = new BasicHttpParams();
 mSchemeRegistry = new SchemeRegistry();
 mSchemeRegistry.register(new Scheme(http,
 PlainSocketFactory.getSocketFactory(), 80));
 mCm = new ThreadSafeClientConnManager(mParams, mSchemeRegistry);
 mClient = new DefaultHttpClient(mCm, mParams);

 What am I doing wrong?
 Thanks a lot.
 Louis C.

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


[android-developers] Re: How to interrupt a blocking I/O operation?

2011-01-07 Thread ivan
Thanks for all the replies!

From another thread I've tried:

mInputStream.close();
mRequest.abort();
mClientConnectionManager.shutdown();
mDownloadThread.interrupt();

All allow the read operation to complete.

Maybe I shouldn't be using a SingleClientConnManager ... ?

On Jan 7, 10:25 am, DanH danhi...@ieee.org wrote:
 In the general (platform agnostic) case you solve this by having the
 stream relay though a service of some sort (eg, a thread) that is
 listening for messages from both the HTTP stream handler and whatever
 entity you have that will send the interrupt message.  How you'd do
 this best on Android I haven't a clue.

 On Jan 7, 11:07 am, ivan istas...@gmail.com wrote:

  I'm wondering what the currently suggested method is for interrupting
  a read operation of a socket input stream?

  I know that traditionally the read could be interrupted by closing the
  socket from another thread and catching an IOException, but I'm not
  quite sure how to get at the socket from the apache classes.

  Maybe I should use some sort of interruptible channel instead ... ?

  Any links or help is greatly appreciated.

  My code looks like this -- minus most of the error handling:

  org.apache.http.impl.client.DefaultHttpClient
  org.apache.http.client.methods.HttpGet
  org.apache.http.HttpResponse

  DefaultHttpClient client = new DefaultHttpClient(httpParameters);

  HttpGet request = new HttpGet(Uri);

  HttpResponse response = client.execute(request);

  InputStream entityStream = response.getEntity().getContent();

  try
  {
     bytesRead = entityStream.read(data);}

  catch (IOException ex)
  {

  }

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


[android-developers] Re: How to interrupt a blocking I/O operation?

2011-01-07 Thread ivan
Can you change the timeout values once they've been set, or would you
have to re-instantiate the HttpClient?

On Jan 7, 12:30 pm, JP joachim.pfeif...@gmail.com wrote:
 Alternatively, you could lower the connect and read timeout values at
 the HttpClient level and manage connectivity (that's what I do - I go
 with 3s connect timeout and retry if it fails).

 On Jan 7, 9:07 am, ivan istas...@gmail.com wrote:

  I'm wondering what the currently suggested method is for interrupting
  a read operation of a socket input stream?

  I know that traditionally the read could be interrupted by closing the
  socket from another thread and catching an IOException, but I'm not
  quite sure how to get at the socket from the apache classes.

  Maybe I should use some sort of interruptible channel instead ... ?

  Any links or help is greatly appreciated.

  My code looks like this -- minus most of the error handling:

  org.apache.http.impl.client.DefaultHttpClient
  org.apache.http.client.methods.HttpGet
  org.apache.http.HttpResponse

  DefaultHttpClient client = new DefaultHttpClient(httpParameters);

  HttpGet request = new HttpGet(Uri);

  HttpResponse response = client.execute(request);

  InputStream entityStream = response.getEntity().getContent();

  try
  {
     bytesRead = entityStream.read(data);}

  catch (IOException ex)
  {

  }

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


[android-developers] Re: How to interrupt a blocking I/O operation?

2011-01-07 Thread ivan
Were you using SingleClientConnManager or
ThreadSafeClientConnManager?

I've tried interrupting the thread blocking on the I/O operation, and
it doesn't throw an InterruptedException.

My guess is because it isn't in a wait(), sleep() or join() call as
explained here:

http://developer.android.com/reference/java/lang/Thread.html#interrupt()

On Jan 7, 12:57 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
 In my experience, if you use AsynTasks (or Future? instances) to do
 your HTTP I/O in the background, calling cancel(true) on these
 instances will interrupt the HTTP I/O.

 If i'm not mistaken, the apache HttpClient is sensitive to calling
 interrupt() on the thread on which it is doing HTTP I/O.

 On Jan 7, 12:07 pm, ivan istas...@gmail.com wrote:

  I'm wondering what the currently suggested method is for interrupting
  a read operation of a socket input stream?

  I know that traditionally the read could be interrupted by closing the
  socket from another thread and catching an IOException, but I'm not
  quite sure how to get at the socket from the apache classes.

  Maybe I should use some sort of interruptible channel instead ... ?

  Any links or help is greatly appreciated.

  My code looks like this -- minus most of the error handling:

  org.apache.http.impl.client.DefaultHttpClient
  org.apache.http.client.methods.HttpGet
  org.apache.http.HttpResponse

  DefaultHttpClient client = new DefaultHttpClient(httpParameters);

  HttpGet request = new HttpGet(Uri);

  HttpResponse response = client.execute(request);

  InputStream entityStream = response.getEntity().getContent();

  try
  {
     bytesRead = entityStream.read(data);}

  catch (IOException ex)
  {

  }- Hide quoted text -

  - Show quoted text -

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


[android-developers] Re: How to interrupt a blocking I/O operation?

2011-01-07 Thread ivan
Tabman,

I think that's the best idea yet, but I'm surprised the Apache classes
don't offer some mechanism for manually interrupting the I/O
blocks.  After all, we can set timeouts on all of the I/O operations,
which will interrupt the blocks with socket timeout exceptions etc.

Thanks.

On Jan 7, 1:31 pm, Tabman tabishfay...@gmail.com wrote:
 I think you can extend the InputStream class and override its read
 method and inside read you can cancel/stop the read loop operation
 whenever you want to.

 Here is the source for 
 InputStream.javahttp://www.docjar.com/html/api/java/io/InputStream.java.html

 Let me know if this solves your problem.

 On Jan 7, 7:07 pm, ivan istas...@gmail.com wrote:

  I'm wondering what the currently suggested method is for interrupting
  a read operation of a socket input stream?

  I know that traditionally the read could be interrupted by closing the
  socket from another thread and catching an IOException, but I'm not
  quite sure how to get at the socket from the apache classes.

  Maybe I should use some sort of interruptible channel instead ... ?

  Any links or help is greatly appreciated.

  My code looks like this -- minus most of the error handling:

  org.apache.http.impl.client.DefaultHttpClient
  org.apache.http.client.methods.HttpGet
  org.apache.http.HttpResponse

  DefaultHttpClient client = new DefaultHttpClient(httpParameters);

  HttpGet request = new HttpGet(Uri);

  HttpResponse response = client.execute(request);

  InputStream entityStream = response.getEntity().getContent();

  try
  {
     bytesRead = entityStream.read(data);}

  catch (IOException ex)
  {

  }

-- 
You received this message because you are subscribed to the Google
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: Stablesocket connection (Correct work with Socket/Thread).

2011-01-06 Thread Ivan Pupkoff


On 5 янв, 00:21, Kostya Vasilyev kmans...@gmail.com wrote:
 Ivan,

 Try the following:

 - Use socket.connect(SocketAddress endpoint, int timeout).
 - Catch SocketTimeoutException around connect() and use it to retry
 (after a delay).

 It provides no benefit to try and keep the same Java object (socket),
 since the underlying TCP/IP data connection won't be there until the
 connection is established.

After first attempt of socket.connect(...) throws
SocketTimeoutException
Next attempts throws
java.net.SocketException: The socket argument is not a valid file
descriptor

-- 
You received this message because you are subscribed to the Google
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] Stablesocket connection (Correct work with Socket/Thread).

2011-01-04 Thread Ivan Pupkoff
Need to have stable connection to server.
1. The client tries to connect to server every 5 (10, N)-seconds.
2. After sucess connection client receives data from server.
3. After interrupt connection (server turn off) - go to step  # 1.

How test:
1) Start server
2) Start client (to be sure that client get data from server)
3) Stop server
4) Wait some (about 200) attempts when client tries to connect to
server.
5) Start server.

Server sends data, but client doesn't get it.
socket.connect(...) is sucessfull, but
socket.getInputStream().read(byte[]) is wrong.
Thread blocks on input.read(..).
If uncomment line
//socket.setSoTimeout(500); //to set low-level timeout for reading
then input.read(..) throws timeout Exception.

Where is my wrong?
Thanks.

Part of client code:

private void initSocket() {
try {
if (socket == null || socket.isClosed() == true
|| socket.isConnected() == false) {
socket = new Socket();
// socket.setSoTimeout(500); // set low-level timeout
for read
InetSocketAddress socketAddress = new
InetSocketAddress(
192.168.1.3, 12344);
notifyDataListener(4);
socket.connect(socketAddress, 500);
notifyDataListener(5);
}
} catch (Throwable t) {
System.err.println(t);
}
}

private void closeSocket() {
try {
if (socket != null  socket.isClosed() == false) {
socket.close();
}
} catch (Throwable t) {
System.err.println(t);
}
}

private byte[] buffer = new byte[1024];

public void run() {
while (isActive) {
try {
notifyDataListener(1);
initSocket();
InputStream input = socket.getInputStream();
int length = input.read(buffer);
if (length  0) {
throw new EOFException(Was got -1);
}
notifyDataListener(2);
} catch (Throwable t) {
closeSocket();
notifyDataListener(3);
try {
Thread.sleep(100);
} catch (InterruptedException ie) {
}
}
}
}


Part of server code:

while (true) {
try {
Socket s = ss.accept();
InputStream input = s.getInputStream();
final OutputStream output = s.getOutputStream();
new Thread() {
public void run() {
while (true) {
try {
ik++;
String msg = Hello #  + ik;
System.err.print(Send... + msg);
output.write(msg.getBytes());
output.flush();
System.err.println( OK!);
} catch (Throwable ioe) {
System.err.println( WRONG!);
break;
}
try {
Thread.sleep(50);
} catch (Exception ioe) {
}
}
}
}.start();

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


[android-developers] ListView disappears after orientation change

2010-12-06 Thread Ivan Švogor
Hello,

I'm using a listView with my SimpleAdapter. It works fine, and
populates relative view correctly, but when I put my phone in
landscape position, my list is gone.
Did anyone have a similar issue, what am I doing wrong?

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] How to start others application in Widgets click event ?

2010-08-09 Thread ivan...@gmail.com
I designed a widget and successful using setOnClickPendingIntent to
active the click event, but I want to start other application witch is
install in my Android phone (such as Google Map), how can I using in
this following command?

if (intent.getAction().equals(ACTION_WIDGET_CLICK)) {  }

Beside that, My widget is a clock widget, I want to click a button to
start the system clock page and click the date to the system
Calendar. How can I make it? many thanks!

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


[android-developers] Re: TrueType fails to load on android 2.2

2010-08-06 Thread Ivan
Works fine for me.
Probably it's about your font, try a different one.
Also, could you please post the complete stack trace.

On Aug 6, 9:13 am, Chopcsu st...@kilsby.com.au wrote:
 Hi All

 I am experiencing a problem where I can not load a truetype font in
 android 2.2 but loads fine in all versions prior.

 I get the error

 java.lang.RuntimeException: native typeface cannot be made

 when calling

 Typeface.createFromAsset(Resources.getSystem().getAssets(),/
 font.ttf);

 Any ideas what can be done about this?

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


[android-developers] Re: Persist a variable value

2010-08-06 Thread Ivan
Try shared preferences.

On Aug 6, 9:08 am, Martins Streņģis martin...@draugiem.lv wrote:
 db is simple  :)

 but if you dont want db you could try files

-- 
You received this message because you are subscribed to the Google
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] Video Playback Service

2010-06-14 Thread ivan
I'm writing an app that needs a video player.

It would be nice to have the audio of the player still available when
the user navigates away from the application, and have the visual
resume when they navigate back to it.

For an audio player this could easily be done by creating a service
that houses the media player with an interface setup for controlling
things like start, pause, seek, etc.  It doesn't seem to be so easy
for a video player though, because the video player needs access to a
SurfaceView, and we can't simply pass a pointer to an instance of
SurfaceView through messages and service interfaces (right?).

Any thoughts on how this can be done?

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] Building for System API

2010-06-07 Thread ivan
Hello,

I'm working on an extensive project that will be prepackaged on
certain phones.  I'm researching using some of the existing Android
providers such as DownloadProvider, and as such I need access to an
Android System JAR file containing all the necessary classes.

How do I get my hands on such a JAR file, or should I just attempt to
build one from the Android source code?

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] Use DownloadProvider or not?

2010-06-07 Thread ivan
Hello,

I'm building an extensive Android app that will be pre-packaged on
many soon to be released devices.

I have seen from the post that in general one should not use the
DownloadProvider, except for the cases where the app is prepackaged on
the phone.  This is correct, right?

I need robust downloading functionality that will allow

- Specification of the download location
- Specification of the connection type for download (i.e. WiFi only).
- Restoration of downloading after connection interruption
- Status of current download progress
- pause/stop/resume for downloads
- progressive downloading of media files to specific locations

Should I avoid using the DownloadProvider for downloading media files?

Are there any other downloaders available for android that already
handle such downloading feats?

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] Two articles on Android app development

2010-06-03 Thread Ivan
Fellow developers!

I wrote two articles about Android app development, based on my own
experience. I think they might be interesting to you.

One is called Developing an App with a Background Service (using
IPC)
http://mindtherobot.com/blog/37/android-architecture-tutorial-developing-an-app-with-a-background-service-using-ipc/

The second one: Intro to Loopers and Handlers
http://mindtherobot.com/blog/159/android-guts-intro-to-loopers-and-handlers/

Hope the articles are useful to you. Any feedback is appreciated.

-Ivan

-- 
You received this message because you are subscribed to the Google
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: Two articles on Android app development

2010-06-03 Thread Ivan
Thanks for your feedback guys.

The experience I shared there was practical - and there are times and
requirements when you do need to start a service at the boot time, and
it's really better to run it in a separate process. For example, any
mail-like application would have such requirements. It's probably the
simplicity of the functionality of that small example that makes the
chosen architecture look a bit overshot.

Now, I would be happy to hear something about the loopers and the
handlers. :)

On Jun 4, 1:35 am, Mark Murphy mmur...@commonsware.com wrote:
 Dianne Hackborn wrote:
  - Running the service in a separate process, just because.  The vast
  majority of apps should keep their service in the same process.  This
  greatly the interaction with the service (no IPC), and is generally a
  lighter-weight solution.  There are certain cases where using another
  process is useful, but this should not be encouraged.

 Demonstrating remote services using a Twitter app is reasonable -- heck,
 I do that myself. It's impossible to make a realistic scenario for
 remote services and keep it short.

 However, I would do it with separate APKs, highlighting remote services
 being used for inter-application integration. That should be the more
 common use of remote binding and such.

  - Running the service at boot, forever.  Please please don't.  Please.

 Yeah, that's fairly evil.

 http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-a...http://www.androidguys.com/2010/03/29/code-pollution-background-control/

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

 _Android Programming Tutorials_ Version 2.0 Available!

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


[android-developers] Re: Unlimited Web Hosting

2010-05-31 Thread Ivan Greene
gtfo we don't need your spam

On May 30, 11:35 pm, Biswajit biswajitsarka...@gmail.com wrote:
 FREE DOMAIN NAME

 UNLIMITED SPACE

 UNLIMITED EMAILS

 UNLIMITED SUBDOMAINS

 UNLIMITED DATABASES

 PHP,MYSQL,PERL,RUBY SUPPORT

 FREE SCRIPT LIBRARY

 10 GB BANDWIDTH/MONTH

 FREE SITE BUILDER

 FREE 500 TEMPLATES

 99% UP TIME GUARANTEED

 FREE TECHNICAL SUPPORT

 http://indiaebazar.com/biswajit/prodesc.php?pid=53rid=biswajit

-- 
You received this message because you are subscribed to the Google
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: I've found a way to stop piracy of my apps

2010-05-21 Thread Ivan Greene
for me, I am developing an app that I think will be heavily pirated.
my idea to stop that is to require the user to update with each update
I make (maybe once every 2 weeks or so), which would require them to
buy it.
the app needs to connect to my server anyway, so if it connects with
an older version number, it tells the user to update. simple!

-- 
You received this message because you are subscribed to the Google
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: Installing apps to Nexus One device

2010-05-04 Thread ivan
I've updated my manifest with with Debuggable=true.
I've enable USB debugging on the phone.
I've verified USB driver installation in windows.
I've verified adb devices existence -- along with killing the server
and restarting it.
I've rebooted the phone and the dev machine and switched to different
USB ports.

... and still I can't get the app on the phone.

I'm working on Windows XP with eclipse using SDK 1.5 r3.

Plus, I can view the file system and remove and upload files from
Eclipse, but I can't get an app running on the phone.

Any thoughts?

Thanks,
-Ivan



On Mar 31, 5:47 am, Mark Murphy mmur...@commonsware.com wrote:
 oriharel wrote:
  it was turned on (even before the first time I installed the driver)
  still doesn't work

 adb kill-server
 adb start-server
 adb devices

 See if that helps. If not, reboot and see if that helps.

 If not, plug in your N1 and see if you see any evidence that Windows is
 actually recognizing it and associating the driver to it.

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

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

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


[android-developers] Re: 14-year-old Android Developer:

2010-04-24 Thread Ivan Greene
yeah..wow..I really need to work harder in school.
I'm taking you guys' advice about this!

On Apr 23, 3:39 pm, Bob Kerns r...@acm.org wrote:
 My grades weren't great, though a little better than yours by the time
 I graduated -- but I did well on the SAT's. And I ended up going to
 MIT.

 So it can happen. But you will need to work on it -- you'll have to
 bring up your grades. But what you've already accomplished should be
 proof to yourself that you CAN do it.

 Ask for as much help as you need. Carve out the time, and do whatever
 it takes to actually spend the time doing the things you need to do.
 Time management is a key to success in everything. Focus on what's
 important. I have some important things to do right now -- but I saw
 your message, and decided that encouraging YOU is the best use of my
 time right this moment. Give yourself the same priority and
 expectations.

 Just because you don't have a teacher like Josh, doesn't mean you
 don't have teachers who will help. Teachers like to be asked, they
 really support students who show enough interest to ask questions,
 both in and out of class. If you can't find the help you need there,
 keep looking. When you get to college, keep up that habit. It's a bit
 more intimidating there, but it's key to getting the most out of your
 education.

 You'll blow it. Over and over again. Each time, don't fret about it,
 don't beat yourself up or label yourself a failure. Pick yourself up
 and try again. Figure out how to do better. When something works --
 keep on doing that.

 Don't try to rely just on your smarts. Smart kids really have a hard
 time learning to work hard on learning, because sometimes they don't
 need to. But sometimes, you do. Sometimes, there are no shortcuts.

 Always dive into what you don't understand first. Take a quick look
 around -- and then start building understanding, on a foundation of
 what you already know. Don't try to learn it all at once, learn a step
 at a time. But don't be afraid to take that first step in over your
 head -- or take it anyway.

 Whatever you do -- don't feel you have to learn it alone. That's the
 hard way, and a lot less fun. I wish I'd learned that lesson earlier
 -- but in programming ESPECIALLY, the great ideas you have, aren't
 nearly as the great ideas you'll have after you see the great ideas
 others have.

 Best of luck!

 On Apr 22, 5:37 pm, Ivan Greene ivant...@gmail.com wrote:





  Miguel: Thanks for the encouragement!
  I am working on an Android game right now.
  I'm thinking about college, because I would really like to work for
  Google.
  But I'm not sure that will happen, my grades are quite bad (about 2.5
  GPA).

  On Apr 22, 6:48 pm, Miguel Morales therevolti...@gmail.com wrote:

   Congratulations guys!  You're on your way to build some great stuff.
   I really wish I had a good computer teacher in High School, lucky!
   Keep it up and you might not even need to go to college (MIT or
   something would be cool though) to make good money.
   I wrote my first program at 15 and never finished High School, now I
   make more money than most college graduates, best of luck to you!

   On Thu, Apr 22, 2010 at 4:36 PM, Eddie Ringle ed...@eringle.net wrote:
Yeah, I'm 15 (will be 16 in May), and I haven't made much just yet,
but that is more due to the target audience of my app (GitHub users)
and the fact that a free version is available. I only make money if
someone chooses to buy the donate version (there are ads on the free
verison, but they aren't really effective). Good job though. :)

On Apr 21, 8:26 pm, joshbeck josh.beck2...@gmail.com wrote:
Hello,

I'm writing a curriculum this year that is designed to get high-
achieving 8th grade students to write and publish
Android apps. One of my students broke the $50 this week.

Here's an article:

   http://www.neisd.net/ComRel/News/Krueger_PaidApp_10.htm

He's basically spent the last 2 months camped out in my computer lab,
but hard work pays off for sure.

I'm doing my best to document my instruction through YouTube 
athttp://linuxclassroom.com

Thanks all,
Josh Beck

--
You received this message because you are subscribed to the Google
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 
athttp://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

   --http

[android-developers] Re: Market update of an app installed from another source?

2010-04-24 Thread Ivan Greene
I think it can be.
I just recently noticed download crutch lite was appearing in my
Downloads section, even though I had installed it from some website

On Apr 24, 12:07 am, joebowbeer joe.bowb...@gmail.com wrote:
 I haven't seen this answered anywhere so I thought I'd ask.

 Can an app that was installed from an unknown source be updated from
 the Market?  For example, if a private beta  is conducted off-market,
 will the beta users be able to update from the market after the app is
 published?  Or will they have to uninstall the beta version before
 installing the market version?

 I'm assuming that the certificate and package name of the beta app
 match those of the market app.

 --
 You received this message because you are subscribed to the Google
 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 
 athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Long-press hard volume keys

2010-04-24 Thread Ivan Greene
You need to return true when you are capturing the events

public boolean onKeyDown(int keyCode, KeyEvent event)
{
   final AudioManager audioMan =
(AudioManager)getSystemService(Context.AUDIO_SERVICE);
   if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
   // they pressed the volume down key
   return true;
   } else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
   // they pressed the volume up key
   return true;
   } else {
   return super.onKeyDown(keyCode, event);
   }
}

On Apr 24, 10:31 pm, mkellner m.kin...@gmail.com wrote:
 Hello,

 I'd like to prevent the volume toast from showing up when the user
 long-presses the hardware volume keys.

 Is this possible? I get the volume key events, but don't know how to
 disable the system dialog from appearing.

 Thanks,

 -mk

 --
 You received this message because you are subscribed to the Google
 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 
 athttp://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


  1   2   3   >