Friday, February 1, 2013

Re: [android-developers] Re: AppWidgetProvider onDeleted vs onDisabled


On Fri, Feb 1, 2013 at 1:31 PM, Jake Colman <jake.colman@gmail.com> wrote:
1) Press on homescreen to install the widget
2) Configuration activity is displayed.  Press back arrow to exit.
3) On CM7 (my test phone) the "resize widget" activity is displayed.

I think you may have a bad build of CM. I have CM7 as well on my G2X and when I back out of my configuration Activity, the resize control is NOT displayed, as expected.
 
That said, I tried on an emulator and after starting my config activity, if I back out, the widget instance has onUpdate called but never deleted, resulting in onDisable never being called.

I checked the bug database and I think you're suffering from this:

http://code.google.com/p/android/issues/detail?id=2539

Not sure what you can do about this ...

-------------------------------------------------------------------------------------------------
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

Your Adapter has these getChildView and getGroupView methods. Both these methods have an argument called "convertView". That "convertView" argument is a view object that already has been created and filled with data by your adapter. If convertView is not null your Adapter should reuse that object instead of inflating or creating a new view.

And that's the whole point and one possible solution to your problem. You can "manually" do the same what ListAdapter does under the hood. Just get the correct child view you want to update and pass that child view as "convertView" argument to your adapter's getChildView method (with the correct group index and child item position of course). If your adapter is correctly programmed it will reuse that existing view object and just fill it with the correct data to display.

However, you may experience update errors while scrolling quickly through your listview. There are workarounds possible by using a scroll listener. When your listener detects a "fling" that causes fast scrolling, you could stop your updates, because they won't be visible anyway. You could also generally stop updates while the user is scrolling.

Now to the real question: why is scrolling your list view so slow? Even with using notifyDataSetChanged it shouldn't slow down that much because ListView only updates the currently visible list items and that's it.

What exactly does your adapter do in getChildView and getGroupView? Does it query a database? Does it decode bitmap objects? Does it read data from a file?
What does "getUpdateInfo" do?

You should create and update the adapter data only in a background thread. The UI thread should not be burdened with anything that might be blocking (like network or file I/O, database access, bitmap loading...). Is your handler code in your first post invoked on the UI thread? If so, you should move this update to a background thread that is continuously running and pausing for a second. When the activity is paused that thread should be stopped.

On Friday, February 1, 2013 1:37:05 PM UTC-6, saex wrote:
What? where should i put that view? i dont understand you...

the objective is to update one item instead of rebuilding the entire {expandable} list view.

So... what should i do with that view? how can i make that view to be refreshed when i want?

i'm stuck

El viernes, 1 de febrero de 2013 18:19:57 UTC+1, Kostya Vasilyev escribió:
And if you can't call getChildView, just copy the code from there to where you need it.

(Can't believe I wrote "copy the code"... will my developer license be revoked now?)

-- K

2013/2/1 skink <psk...@gmail.com>


saex wrote:
> argggggggggg you didn't understand me. I KNOW HOW TO GET THE VIEW, it is
> not the problem, read the full post please
>
>

i did read the full thread and still i think you should call
getChildView as Kostya suggested


pskink

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-d...@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

[android-developers] Re: App

http://code.google.com/hosting/search?q=OCR&btn=Search+Projects


On Friday, February 1, 2013 3:24:33 PM UTC, dany varghese wrote:
can suggest a site to download the program code for an OCR app(Text
extraction from Image) .

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

[android-developers] Re: AppWidgetProvider onDeleted vs onDisabled

There was a bug in Android 2.* where doing what you described (canceling the widget config activity) caused the Android framework (or the Launcher?) to still save the assigned widget id.

Another case for ghost widget IDs was when there was not enough room on the home screen.

On one of my devices, I had over 80 of these ghost widget IDs at a time. As you might imagine, running an update for all of them was pretty slow.

You mention CM7, I guess that's 2.3?

I've long gotten into the habit of tracking widget IDs myself, adding new ones when the user confirms in the config activity, and removing in the widget's onDelete.

-- K

On Friday, February 1, 2013 11:31:54 PM UTC+4, Jake Colman wrote:
>>>>> "T" == TreKing  <treki...@gmail.com> writes:

   T> On Tue, Jan 29, 2013 at 10:51 AM, Jake Colman <jake....@gmail.com> wrote:

   >> I am finding that, on occasion, after I delete my widget from my
   >> homescreen the underlying Service that I use is still receiving
   >> alarms and doing work.  I do all my clean-up in onDisabled and do
   >> nothing on onDeleted.  Is it possible that onDeleted can be called
   >> without an intervening call to onDisabled?
   >>

   T> You've verified that the method is definitely not being called? It
   T> could be that it's being called and you have a bug, like not
   T> deleting the correct alarm or something.

   T> Also, if you're cleaning up a single instance, I think you should
   T> use onDeleted. onDisable is for when there are no widgets at all
   T> left and you need to clean up some shared state or something.

I am doing my clean-up in onDisabled since I only need to clean up after
the last widget is removed.

Under normal circumstances, when I remove the widget onDeleted fires
followed by onDisabled.  In the following scenario I get screwed:

1) Press on homescreen to install the widget
2) Configuration activity is displayed.  Press back arrow to exit.
3) On CM7 (my test phone) the "resize widget" activity is displayed.
   Instead of pressing "OK", press back arrow.  The widget is NOT
   created.

In this instance, if I create another widget and delete it only
onDeleted is fired but onDisabled is not.  It looks like Android thinks
that the first aborted instance is still there.

How can I protect against this scenario?

--
Jake Colman -- Android Tinkerer

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

saex wrote:
> What? where should i put that view? i dont understand you...
>
> the objective is to update one item instead of rebuilding the entire
> {expandable} list view.
>
> So... what should i do with that view? how can i make that view to be
> refreshed when i want?
>
>

its simple: if your child view (I assume you can somehow get child
view as you said) is for example TextView simply call setText()

pskink

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

[id-android] WTI / WTShare: Game Stick - The Most Portable TV Games Console Ever Created

Mau berbagi info lagi yah Rekan-Rekan...
Singkatnya, ini adalah console game base on android, tapi portable, berbentuk stik, tinggal plug n play ke TV.
Uniknya utk mendapatkan Game Stick ini kayaknya seh bukan dengan membelinya, tapi dengan memberikan sejumlah donasi kepada developernya yg di support langsung oleh lembaga pendanaan utk proyek2 kreatif, bernama Kickstarter.

Menurut pendapat saya pribadi, model pendanaan dengan konsep seperti ini, sungguh sangat menarik, efektif dan sebuah terobosan baru, yg melibatkan user/enthusiast/konsumen/calon konsumen secara aktif dan real time, bersifat terbuka, khususnya buat developer2 muda yg kreatif, dapat memanfaatkannya sebagai sebuah peluang yg sangat terbuka, seperti yg dilakukan oleh Game Stick ini...

Tapi Saya telat taunya, (menyesal...), jadi sekarang lagi bingung neh, gimana caranya utk dapat berpartisipasi, supaya bisa dapetin Game Stick ini...Kayaknya seh sudah closed, target sudah terpenuhi soalnya. Yg tersisa kayaknya seh tinggal yg >US$ 500. (Kemahalan buat saya..hihihi....) 

Mungkin Rekan-Rekan sekalian ada yg berminat ikutan donasi ??? Nanti Game Stik-nya saya yg bayarin yah.......hehehhee....

Semoga Bermanfaat...

--
==========
Download Aplikasi Kompas versi Digital dan Keren
https://play.google.com/store/apps/details?id=com.kompas.android.kec
--------------------------
Download Aplikasi AR "MONSTAR" dari Indosat
https://play.google.com/store/apps/details?id=com.ar.monstarunity
---------------------
Galaxy Note 2 Best Deal Rp. 6,499rb hanya di Multiply.com!
Garansi resmi. Dapatkan segera! http://bit.ly/gaddrotor
--------------------
Virtual Private Server (VPS) Server Indonesia dari Hostune Network - http://www.vpstune.com
--------------------
Aturan Umum ID-Android: http://goo.gl/MpVq8
Join Forum ID-ANDROID: http://forum.android.or.id
==========
---
Anda menerima pesan ini karena Anda berlangganan grup "[id-android] Indonesian Android Community " dari Grup Google.
Untuk berhenti berlangganan dan berhenti menerima email dari grup ini, kirim email ke id-android+berhenti berlangganan@googlegroups.com .
Untuk opsi lainnya, kunjungi https://groups.google.com/groups/opt_out.
 
 

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

What? where should i put that view? i dont understand you...

the objective is to update one item instead of rebuilding the entire {expandable} list view.

So... what should i do with that view? how can i make that view to be refreshed when i want?

i'm stuck

El viernes, 1 de febrero de 2013 18:19:57 UTC+1, Kostya Vasilyev escribió:
And if you can't call getChildView, just copy the code from there to where you need it.

(Can't believe I wrote "copy the code"... will my developer license be revoked now?)

-- K

2013/2/1 skink <psk...@gmail.com>


saex wrote:
> argggggggggg you didn't understand me. I KNOW HOW TO GET THE VIEW, it is
> not the problem, read the full post please
>
>

i did read the full thread and still i think you should call
getChildView as Kostya suggested


pskink

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-d...@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.