Re: [android-developers] Removing Saved WiFi Networks

2016-04-28 Thread Kostya Vasilyev
http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-network


   - Your apps can now change the state of WifiConfiguration
   
<http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html>
objects
   only if you created these objects. You are not permitted to modify or
   delete WifiConfiguration
   
<http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html>
objects
   created by the user or by other apps.

-- K



2016-04-28 22:02 GMT+03:00 Hogga <mlrti...@gmail.com>:

> Really?
>
> So when I connect to a WiFi network via standard Android App, so via
> Android prefences, I only can delete this WiFi via Android prefences and
> not with any other App?
>
> Why? :-) And where is that decriped? Thanks!
>
>
>
>
> Am Donnerstag, 28. April 2016 20:51:19 UTC+2 schrieb Kostya Vasilyev:
>>
>> On 6.0 and above, a WiFi network can only be modified or removed by same
>> exact app as originally created this network.
>>
>> -- K
>>
>>
>> 2016-04-28 21:39 GMT+03:00 Hogga <mlrt...@gmail.com>:
>>
>>> Hi,
>>>
>>> I´ve an App in which I want to remove saved Wifi networks, by selecting
>>> a specific.
>>>
>>> Here is my code:
>>>
>>> List savedWifis = wifiMgr.getConfiguredNetworks();
>>>
>>> wifiMgr.removeNetwork(savedWifis.get(k).networkId);
>>>
>>> wifiMgr.saveConfiguration()
>>>
>>> "k" is the selected WiFi in a ListPrefence.
>>>
>>>
>>> My Problem:
>>> On one of my smartphones it works wihtout problems (Cyanogenmod 12.1,
>>> Android 5.1.1), BUT on an other device the selected WiFi is not deleted
>>> (Android 6.0.1).
>>> wifiMgr.saveConfiguration() returns "true".
>>>
>>>
>>>
>>> Any idea?
>>>
>>> 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/CAN7dqjAzARY%3DZBvwWHt23Qi45g7Wi%3DBXfQT%3D_OBr2wATa%2Bo2pA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Removing Saved WiFi Networks

2016-04-28 Thread Kostya Vasilyev
On 6.0 and above, a WiFi network can only be modified or removed by same
exact app as originally created this network.

-- K


2016-04-28 21:39 GMT+03:00 Hogga :

> Hi,
>
> I´ve an App in which I want to remove saved Wifi networks, by selecting a
> specific.
>
> Here is my code:
>
> List savedWifis = wifiMgr.getConfiguredNetworks();
>
> wifiMgr.removeNetwork(savedWifis.get(k).networkId);
>
> wifiMgr.saveConfiguration()
>
> "k" is the selected WiFi in a ListPrefence.
>
>
> My Problem:
> On one of my smartphones it works wihtout problems (Cyanogenmod 12.1,
> Android 5.1.1), BUT on an other device the selected WiFi is not deleted
> (Android 6.0.1).
> wifiMgr.saveConfiguration() returns "true".
>
>
>
> Any idea?
>
> 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/72a42b45-3656-4db3-a090-aad6a60cc57e%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAN7dqjDTWo5n0VwK-DYLdJzoS1abS1e2ZPLyC%3D3yhVkfXjSeiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Why am I getting this Google Play optimization tip

2016-04-08 Thread Kostya Vasilyev

Those probably come from a library.




David Toledo  8 апреля 2016 г. 9:01:15 написал:


Hello Developers

I received the following optimization tips in Android Developer Console

*You translated the APK into English (United Kingdom), Portuguese (Brazil)
and Russian but not the store listing.*

My App have only the default res folders and files. No language specific
folders or files (like values-en folder) were added. I no have Portuguese
and Russian res folder

Some idea ?¿

Thanks
David

--
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/CAJO1%2Bv27xEba1noiwP0sNC1od8xr2ia3oJW1NEEmdwXo-CJrwA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.


--
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/153f49baf48.27c2.6f6fc4a06026c58a43fb5f515d98e8c4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Play Store doesnt recognize my app as Tablet ready

2016-02-28 Thread Kostya Vasilyev
I think they have some sort of logic (behind the publishing console) to
detect if your tablet screenshots are sufficiently different from phone
screenshots.

I once contacted Play support about it -- and they wrote back that my app
doesn't look sufficiently different on tablets, so will not get the
"optimized for tablets" in its listing.

They wanted whole different layouts, not just bigger fonts or wider padding.

So there is human moderation too, it seems.

-- K

2016-02-28 23:34 GMT+03:00 :

> I do not have made real screenshots of an 7" and an 10" tablet. I just
> uploaded the same screenshot for both.
>
> Am Sonntag, 28. Februar 2016 21:32:11 UTC+1 schrieb mu.h...@gmail.com:
>>
>> Yes i have two screenshots there (minimum) Do you think that causes the
>> problem and not the config.xml?
>>
>> Am Sonntag, 28. Februar 2016 21:07:04 UTC+1 schrieb Steve Gabrilowitz:
>>
>> Did you upload tablet screen shots to the Play Store description?
>>>
>>
>>
>>> On Feb 28, 2016 1:14 PM,  wrote:
>>>

 Hey Community

 I have made an app for Android, but the Play Store doesnt think its
 Tablet optimized. Its full responsive and looks good on all devices
 (Tablet/Phone) i have tested. I have not used breakpoints. I have tried to
 use diffrent android-minSdkVersion but that doesnt help. Do you guys have
 an idea whats wrong?




-- 
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/CAN7dqjBnkX_98V6ApzDmW2LzS0bgpWeiU0%2BkV41kRKjVL28VtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Proguard complains about duplicate definitions of class was removed

2016-02-15 Thread Kostya Vasilyev
https://code.google.com/p/android/issues/detail?id=194513

These are "note" severity messages, not critical.

You can suppress them with "-dontnote" options in your project's Proguard
config.

-- K


2016-02-16 0:33 GMT+03:00 'RLScott' via Android Developers <
android-developers@googlegroups.com>:

> New information:  The messages I reported do not appear to be the result
> of my previous attempt at adding something from org.apach.http...  I just
> imported another project from Eclipse to Android Studio, and in this
> project I never message around with HTTP stuff.  Yet the same message
> appeared.  Here is what Proguard reports in the Gradle console just before
> those "duplicate definition" messages:
>
> Reading program jar
> [C:\Swdev\Android\sdk\extras\android\m2repository\com\android\support\support-annotations\23.1.1\support-annotations-23.1.1.jar]
> (filtered)
> Reading program jar
> [C:\Users\Bob\AndroidProj\as\Cadence\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\jars\classes.jar]
> (filtered)
> Reading program jar
> [C:\Users\Bob\AndroidProj\as\Cadence\app\build\intermediates\exploded-aar\com.android.support\support-v4\23.1.1\jars\classes.jar]
> (filtered)
> Reading program jar
> [C:\Users\Bob\AndroidProj\as\Cadence\app\build\intermediates\exploded-aar\com.android.support\support-v4\23.1.1\jars\libs\internal_impl-23.1.1.jar]
> (filtered)
> Reading program directory
> [C:\Users\Bob\AndroidProj\as\Cadence\app\build\intermediates\classes\release]
> (filtered)
> Reading library jar [C:\Swdev\Android\sdk\platforms\android-23\android.jar]
> Reading library jar
> [C:\Swdev\Android\sdk\platforms\android-23\optional\org.apache.http.legacy.jar]
>
>
> I still don't see why there are duplicate definitions.
>
> -Robert Scott
>  Hopkins, MN
>
> On Monday, February 15, 2016 at 11:20:29 AM UTC-6, RLScott wrote:
>>
>> I briefly added a HTTP library from org.apache.http... to try some things
>> out, and now I want to remove it as I no longer reference it in my code.  I
>> removed the reference in the Project app module Dependencies and deleted
>> the apache module itself.
>>
>> Now the project builds without errors, as long as I don't enable Proguard
>> in my gradle file.  If I set "minifyEnabled true" in the app
>> build.gradle, I get the following message in the gradle console:
>>
>> Note: duplicate definition of library class [android.net.http.SslError]
>> Note: duplicate definition of library class
>> [android.net.http.SslCertificate]
>> Note: duplicate definition of library class
>> [android.net.http.SslCertificate$DName]
>> Note: duplicate definition of library class
>> [org.apache.http.conn.scheme.HostNameResolver]
>> Note: duplicate definition of library class
>> [org.apache.http.conn.scheme.SocketFactory]
>> Note: duplicate definition of library class
>> [org.apache.http.conn.ConnectTimeoutException]
>> Note: duplicate definition of library class
>> [org.apache.http.params.HttpParams]
>>
>> I think these were are left-over from my brief experiment with apach
>> http.  I would like to get rid of these messages, even though they don't
>> seem to be harming the final APK file, which still runs fine.  Is there
>> anywhere else I should look for references to this HTTP library?
>>
>>
>> -Robert Scott
>>  Hopkins, MN
>>
>> --
> 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/b3d67b5b-4173-400a-80b6-f4d45773d18a%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAN7dqjBBZbgbk7cZ27A%2BG7r7dFc7Qzu-tiE2S9Vezdv1xMf_mA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Local service, 'hardware' back and AppCompat up buttons

2016-02-04 Thread Kostya Vasilyev
No need to make it so complicated.

Since you mentioned that your objects aren't parcelable -- we're talking
about sharing data between various places all within same process (VM).

You can just pass them around the way you normally would between methods /
classes.

To make it cleaned, I'd look into some kind of "event bus" where some
objects can subscribe to abstract "changes" and others can send these
"change notifications".

Can be something like JavaRX or an "event bus", for example:

http://greenrobot.org/eventbus/

( I haven't used this, but the principle is the same )

-- K


2016-02-04 21:40 GMT+03:00 Massimo Del Zotto :

> Hello,
> In my program I need to pass 'live' Objects from one activity to another.
> Those are most likely not parcelable and most likely not just data. I
> figured out I could use a local Service to provide a cross-Activity data
> sharing. It's just a map from unique ids to Object. Initial
> experimentation went great.
>
> However, I am having serious trouble with a difference between the back
> and the up button.
>
> The application is set up as follows: there's a MainMenu Activity which
> launches the service by means of bindService(..., BIND_AUTO_CREATE).
> Other "inner" activities bind by bindService(..., 0). They unbind on
> onDestroy, mostly because I'm lazy.
>
> Now, because of the way I have setup activities, the up and the back
> buttons should be equivalent. And indeed they are. Sort of.
>
> When I push the back 'hardware' button I have: onPause, onStop, onDestroy as
> expected. Here, I de-register the callback and... at a certain point I got
> a huge error by pushing the 'back' button relating to a leaking window
> created in my onServiceDisconnect. Indeed, I show an error dialog when
> this happens with the only option being calling finish().
>
> I figured out I needed to keep track of unbinding status. It was my
> understanding onServiceDisconnect wouldn't get called when I
> unregister... it turns out the 'back' button produces this sequence of
> calls: onPause, onServiceDisconnected, onServiceConnected (MainMenu),
> onStop, onDestroy.
>
> *Is anyone aware of this difference and why does that happen?* As a side
> note, this implies Binders should be passed around (in MainMenu) with
> care as they can go stale. Not really a big problem but something to keep
> in mind.
>
> I'm trying to devise a solution. For the time being, I'll think I'll
> resolve to 'instant service connections' so I bind, do what I need and
> unbind right away. I might do that in an AsyncTask in case... *isn't that
> an hammer solution?* I totally missed about this difference in
> documentation and I'm confused on how to use services correctly at this
> point.
>
> Elaborations are welcome.
>
> Massimo
>
>
> --
> 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/b7a759ba-2013-4669-81c3-28628c12b59a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAN7dqjAc8s35WsuAU8BX8%3DR3UWUjWRnpuZkAWa9jb3%2BwpSHo9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Physical address is required for paid apps or in-app purchases

2015-12-08 Thread Kostya Vasilyev
It's been speculated that this is a requirement of European customer 
protection laws.


Let's say someone has an issue with your paid app and you aren't able to 
resolve it over email (and let's imagine you're irresponsible and ignore 
the user's request to refund).


Knowing that address, the customer can get on a plane, fly halfway around 
the world, knock on your door with his / her phone in hand, and show you 
that "see, when I click there, it turns green".


-- K



Gino  6 декабря 2015 г. 5:06:15 написал:


Isn't displaying developers' addresses so blatantly a violation of
developer privacy ?

This may be legal but it seems pretty intrusive, like a rectal probe feels
pretty intrusive.

I thought Google's motto was: "don't be evil". I'm not sure this policy of
blatantly displaying developer addresses, with no regard for their personal
privacy, complies with Google's motto.


On Thursday, September 18, 2014 at 2:13:56 AM UTC-4, nagamatu wrote:


Dear Android Developers,

I got the following notification at Google play Developer Console.

| Add a physical contact address Beginning September 30, 2014, you need to
add a physical address
| to your Settings page. After you've added an address, it will be
available on your app's detail page to
| all users on Google Play. If your physical address changes, make sure to
update your information on
| your Settings page.

| If you have paid apps or apps with in-app purchases, it's mandatory to
provide a physical address
| where you can be contacted. If you don't provide a physical address on
your account, it may result in
| your apps being removed from the Play Store.

I do not want to disclose my home address in public, because I am an
individual developer.
This is privacy issue. I don't understand why Google requires my physical
address.

I disclose my e-mail address and users can contact me. Also I can reply to
messages that is written
in review at Google Play.

If I am working for a company and office address is disclosed in public, I
do not care for it.
But do you want to know your home address in public?

# I sent a feedback about objection for this requirement.

--
nagamatu




--
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 http://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/df729753-c4a7-4d22-9039-5d6018f5ed43%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
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 http://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/15175f5e520.27d7.6f6fc4a06026c58a43fb5f515d98e8c4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android 5.0, 5.1 mobile radio active

2015-04-08 Thread Kostya Vasilyev
Hi,

There seems to be a fairly common issue seen on Android 5.0 and 5.1:

System battery stats reporting really high percentage of battery use for
some apps, seemingly at random, and then --

 -- a reasonable wake lock time and a much higher mobile radio active
time. The wake lock value may be in the minutes, and this mobile radio
value in the hours.

This metric is new in 5.0, and supposedly is the time spent by the app
talking specifically to the mobile network, keeping the radio in high power
state.

It has been reported by my users for my app, but then searching the
Internet finds cases of other apps as well, including Google's own.

In my app, I know there is always a wake lock when it's talking to the
network, so this just doesn't make sense.

I assume most if not all other apps are the same way.

I have collected some screenshots here and have a hard time believing that
all these apps have the same bug, and actually (by mistake) hold some sort
of mobile radio lock, and in any case, I'm not aware of a way to do that
for mobile data.

http://www.aqua-mail.com/forum/index.php?topic=3326.msg16869#msg16869

This one has screenshots of this issue in Google Play Services and
Hangouts. This is immediately after the device got the official OTA 5.0.2
update, and it never had any of my own apps installed (and no third party
apps at all):

http://www.aqua-mail.com/forum/index.php?topic=3326.msg16845#msg16845

There are discussions on Reddit as well and other forums, including Google
Product forums...

But I have not found a bug report in the Android tracker that's focused on
this specific metric, just more general battery drain on Nexus with
5.*... discussions.

Are others seeing this too?

What are your conclusions?

To me, this looks like a system code issue, maybe the modem software not
getting shut down into low power state, or maybe the metric has some subtle
twist, like the time used by other apps may be counted towards the app that
caused the initial mobile data transmission... but minutes and hours,
really?

-- K

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


Re: [android-developers] Android: Google drive integration, what is “com.google.android.gms.version”?

2015-04-06 Thread Kostya Vasilyev
For what it's worth -- I've got 6111000 in my app right now (6.1.something)
and the newest version is 7.0.something, works fine.

There's got to be some backwards compatibility, but maybe it doesn't go
quite as far as 6 - 4 (your 4030500) and the app-side library itself
checks the installed Play Services version, since it has to interact with
it...

FWIW, again, I use app-side library version 6111000, so my version resource
matches the library's code.

-- K

2015-04-06 16:58 GMT+03:00 Ab abe.oppenh...@gmail.com:

 If I hardcode it to some previous version number, such as 4030500, my
 app crashes with stack traces saying that version 658700 was expected. I'm
 wondering if my solution, importing the version.xml file, will prevent or
 result in crashes on devices with older versions and/or devices with newer
 versions?

 On Monday, 6 April 2015 09:54:06 UTC-4, Kostya Vasilyev wrote:

 This is the minimum required Google Play Services version.

 When a device has a lower version, the system will prompt the user to
 update via a status bar notification saying app XXX requires Google Play
 Services update (or some such), linked to Google Play app.

 -- K


 2015-04-06 16:28 GMT+03:00 Ab abe.op...@gmail.com:

 My application integrates with Google Drive using the old api, it does
 not include Google's library project (instead it includes a bunch of jars
 like 'google-api-client-1.12.0-beta.jar', 
 'google-api-services-drive-v2-rev59-1.12.0-beta.jar',
 etc...).

 This causes an issue because this line in my manifest file:

 meta-data android:name=com.google.android.gms.version
android:value=@integer/google_play_services_version /

 Now gives the following error:

 Error: No resource found that matches the given name (at 'value' with value
  '@integer/google_play_services_version').

 If I just copy the version.xml file from the library project into my
 project, the error goes away. The file's contents are:

 integer name=google_play_services_version6587000/integer

 But now I'm wondering, what is the com.google.android.gms.version attribute
 anyway? Is it the version number of the google play services on the device?
 Copying the file into my workspace seems the same as just hardcoding the
 attribute to '6587000'. If so, will this cause issues going forward if
 devices update their google play services? Will it cause issues on devices
 that currently have an old version of the services installed? (And in all
 these cases, how would importing this resource value from the library
 project be any better, as that just seems like a hardcoded value as well?)

 Any general insight into the safety of this workaround?

 --
 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+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/d/optout.


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


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


Re: [android-developers] Android: Google drive integration, what is “com.google.android.gms.version”?

2015-04-06 Thread Kostya Vasilyev
This is the minimum required Google Play Services version.

When a device has a lower version, the system will prompt the user to
update via a status bar notification saying app XXX requires Google Play
Services update (or some such), linked to Google Play app.

-- K


2015-04-06 16:28 GMT+03:00 Ab abe.oppenh...@gmail.com:

 My application integrates with Google Drive using the old api, it does not
 include Google's library project (instead it includes a bunch of jars like
 'google-api-client-1.12.0-beta.jar',
 'google-api-services-drive-v2-rev59-1.12.0-beta.jar', etc...).

 This causes an issue because this line in my manifest file:

 meta-data android:name=com.google.android.gms.version
android:value=@integer/google_play_services_version /

 Now gives the following error:

 Error: No resource found that matches the given name (at 'value' with value
  '@integer/google_play_services_version').

 If I just copy the version.xml file from the library project into my
 project, the error goes away. The file's contents are:

 integer name=google_play_services_version6587000/integer

 But now I'm wondering, what is the com.google.android.gms.version attribute
 anyway? Is it the version number of the google play services on the device?
 Copying the file into my workspace seems the same as just hardcoding the
 attribute to '6587000'. If so, will this cause issues going forward if
 devices update their google play services? Will it cause issues on devices
 that currently have an old version of the services installed? (And in all
 these cases, how would importing this resource value from the library
 project be any better, as that just seems like a hardcoded value as well?)

 Any general insight into the safety of this workaround?

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


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


Re: [android-developers] Getting exception when clicking button to connect to soap and return dataset

2015-03-19 Thread Kostya Vasilyev
The relevant stanza from your logcat is:

03-18 16:34:05.627: E/AndroidRuntime(9005):  at
com.InventoryList.inventory.ViewInventoryActivity.find_and_modify_text_view(
*ViewInventoryActivity.java:58*)

Now you just need to debug and fix this part of your code.

-- K


2015-03-19 22:06 GMT+03:00 Daniel Chacon cuban...@gmail.com:

 Anyone see anything that would cause the error?
 Im trying to atleast get past this issue today, i can run my other project
 which is identical other than the SOAP_ACTION, METHOD_NAME and URL.
 I basically wanted to start this project from a working point and it
 doesnt work..

 On Wed, Mar 18, 2015 at 4:44 PM, Dan Cha cuban...@gmail.com wrote:

 So i was trying to reuse existing code that works in another app, just
 changing the namespace, WSDL, Saop action and method name, but getting an
 error

 Please let me know what im doing wrong or what needs changing or checking.

 Here is the error log from the button click

 03-18 16:34:05.627: E/AndroidRuntime(9005): FATAL EXCEPTION: main
 03-18 16:34:05.627: E/AndroidRuntime(9005): Process:
 com.InventoryList.inventory, PID: 9005
 03-18 16:34:05.627: E/AndroidRuntime(9005): java.lang.RuntimeException:
 Unable to start activity
 ComponentInfo{com.InventoryList.inventory/com.InventoryList.inventory.ViewInventoryActivity}:
 java.lang.NullPointerException
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2540)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2599)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.app.ActivityThread.access$900(ActivityThread.java:174)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.os.Handler.dispatchMessage(Handler.java:102)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.os.Looper.loop(Looper.java:146)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.app.ActivityThread.main(ActivityThread.java:5748)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 java.lang.reflect.Method.invokeNative(Native Method)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 java.lang.reflect.Method.invoke(Method.java:515)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 dalvik.system.NativeStart.main(Native Method)
 03-18 16:34:05.627: E/AndroidRuntime(9005): Caused by:
 java.lang.NullPointerException
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 com.InventoryList.inventory.ViewInventoryActivity.find_and_modify_text_view(ViewInventoryActivity.java:58)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 com.InventoryList.inventory.ViewInventoryActivity.onCreate(ViewInventoryActivity.java:51)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.app.Activity.performCreate(Activity.java:5600)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
 03-18 16:34:05.627: E/AndroidRuntime(9005): at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2504)
 03-18 16:34:05.627: E/AndroidRuntime(9005): ... 11 more

 Like i said, im reusing another apps code, merely changed the above
 variables to point to the correct service calls. I know the web service
 works cause i built a windows form app to call it and works and returns
 great.
 So i know the webservice is working and returning what it should.

 Here is my code on the page that getting the error when you click the
 button.

 private Button.OnClickListener get_view_buttonView_Listener = new
 Button.OnClickListener() {
 public void onClick(View v) {
 new ItemTask().execute();
 }
 };

 protected Void doInBackground(final Void... unused){
 StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()

 .detectDiskReads()
 .detectDiskWrites()
 .detectNetwork()
 .penaltyLog()
 .build());

 SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,METHOD_NAME);
 SoapSerializationEnvelope envelope = new
 SoapSerializationEnvelope(SoapEnvelope.VER11);

 envelope.dotNet = true;
 envelope.setOutputSoapObject(request);

 HttpTransportSE httpTransport = new HttpTransportSE(URL);


 try
 {
  ListHeaderProperty invHeaders = new
 LinkedListHeaderProperty();
  httpTransport.call(SOAP_ACTION, envelope,
 (ListHeaderProperty)invHeaders);
  SoapObject response = (SoapObject)envelope.bodyIn;

if(response != null)
{
SoapObject dataset = (SoapObject) response.getProperty(0);

SoapObject table = (SoapObject)
 dataset.getProperty(diffgram);
SoapObject 

Re: [android-developers] INSTALL_FAILED_DUPLICATE_PERMISSION

2015-02-20 Thread Kostya Vasilyev
I'm seeing this with android:protectionLevel=normal too.

Since Android doesn't grant permissions that had not been declared yet, 
this forces the user to install apps declaring / using the permission in a 
certain order.

This is a pain for the user, so the developer of one app that works with 
mine (and needs a permission declared there) added an identical permission 
declaration stanza in his app too.

A clever hack, on Android prior to 5.0, it lets the user install mine and 
his apps in either order.

Since Android 5.0, only one app can be installed at a time -- trying to 
install the other one fails with Play error code 505.

I don't work for Google, so can only post a link to the bug tracker 
-- https://code.google.com/p/android/issues/detail?id=79375 -- and maybe 
recommend trying signature protection level, since both apps are yours 
and (as I understand) you hadn't released the new one yet, so you can still 
make that change.

-- K

On Friday, February 20, 2015 at 11:33:25 AM UTC+3, marten wrote:

 Hi Marina,

 we're using android:protectionLevel=dangerous because that's what we 
 think is suitable for personal data like tasks. Also, it's what the 
 CalendarProvider uses for the permissions to read and write calendars.

 At present the major issue is that some users get this error even though 
 they install the properly signed version from Google Play.

 The root of all this is that there is no way to grant a permission that 
 hasn't been granted at installation time. And Google is making it worse 
 instead of fixing it. At present the only solution seems to be to use no 
 permissions at all and that's certainly not what this is intended for.

 If there is someone from Google in this Forum: How is this intended to 
 work?

 thanks

 Marten

 Am Donnerstag, 19. Februar 2015 19:21:40 UTC+1 schrieb Marina Cuello:

 Hi! 
 I'm not sure how to help, because've only met this problem when there 
 are several users set on a device. 

 If I install my app directly from Eclipse with my debug certificates, 
 then uninstall the app and try to install a production copy, made with 
 the release certificate, I've got the same error message 
 INSTALL_FAILED_DUPLICATE_PERMISSION. 

 Until I uninstall the app in every user by hand, I can't install the 
 new one. At least in your case the error message makes sense :) 

 When I was trying to understand that error message, I've read that it 
 affected permissions with android:protectionLevel  declared as 
 signature. Are you using that? Can you change it to normal without 
 affecting your business model? 


 Marina 

 On Wed, Feb 18, 2015 at 11:58 AM, Marten Gajda mar...@dmfs.org wrote: 
  Hi all, 
  
  we've some problems with Android 5. There seems to be a new policy that 
  requires two apps that define the same permissions to be signed by the 
 same 
  key. Otherwise you can't install the app getting the error 
  INSTALL_FAILED_DUPLICATE_PERMISSION. 
  This is very annoying and I'd like to know that the suggested 
  solution/workaround to this is. 
  
  We have an Open Source task app that provides access to the tasks via a 
  ContentProvider. The concept pretty much equals the CalendarProvider. 
 We 
  also have a (not yet Open Source) sync app that can sync to this task 
 app 
  (or its ContentProvider). 
  The problem is that (in contrast to the CalendarProvider) our users 
 usually 
  install the sync app first. That means the permissions of the task app 
 are 
  not known when the sync app is installed. So they are not granted 
  automatically when the task app is installed afterwards. 
  
  Until Android 5 the solution was to define the same permissions in the 
 sync 
  app. But that doesn't work any more in some cases. If the user compiles 
 the 
  task app himself he can not use our sync app at the same time, because 
 they 
  are not signed by the same key. 
  
  How can we achieve that we protect access to the task ContentProvider 
 by 
  permissions still allowing them to use a self compiled version? 
  
  Even if both apps are signed by the same key it doesn't seem to work in 
 some 
  cases (does Android 5 also require both apps to be from the same 
 source?) 
  
  A similar issue exists when another developer tries to build a sync app 
 that 
  can sync to our task app. He can not add the same permissions, because 
 he 
  can't use the same signing key. But if he can't add the same permission 
  definition his app won't get the permission if it's installed before 
 the 
  task app is installed. 
  
  What's the solution of this mess? 
  
  thanks 
  
  Marten 



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

Re: [android-developers] Which pattern is most common for apps that involve communication with servers?

2015-02-20 Thread Kostya Vasilyev
You know, I don't. My apps aren't open source, and I came up with it 
myself, not borrowed from a library.

But it's not rocket science, I'm sure you understand the pattern.

-- K

On Friday, February 20, 2015 at 4:39:32 AM UTC+3, Kristopher Micinski wrote:

 I agree, that sounds like a useful pattern.  I *think* that's 
 relatively close to how Volley is implemented (though I haven't read 
 the implementation fully), too. 

 Do you have any pointers to open sourced code that would provide an 
 example of such a behavior?  If not, no big deal: I can certainly 
 write one myself, and am not asking you to open-source code from your 
 codebase. 

 Kris 


 On Thu, Feb 19, 2015 at 4:17 PM, Kostya Vasilyev kman...@gmail.com 
 javascript: wrote: 
  A service turned inside out 
  
  A mediator class that manages a pool of threads, submits / cancels / 
  executes task objects, manages the wake lock (based on having tasks). 
  
  And a service whose only responsibility is to do startForeground / 
  stopForeground when it's told to. 
  
  All in the same process. 
  
  This way I don't have to bind to a service (which is asynchronous) and 
 it's 
  easier to manage state in the UI, to indicate to the user what the app 
 is 
  doing, and to queue up tasks when necessary. 
  
  -- K 




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


Re: [android-developers] Re: Which pattern is most common for apps that involve communication with servers?

2015-02-20 Thread Kostya Vasilyev
For me, all network activity is performed by tasks which are executed by
executors on a pool of threads.

Not Java executors, but something a bit more flexible for my needs --
priorities, cancellation, per-thread affinity based on each task's account,
etc.

The data is written to a database, served up by a content provider (most of
the time anyway, when I need simple automatic cursor-based re-query).

-- K

2015-02-21 2:10 GMT+03:00 Kristopher Micinski krismicin...@gmail.com:

 The main hypothesis I'm wondering about is how developers pass data
 from their app to the network.  Since any use of the network
 necessarily involves threads, there are a variety of ways this could
 occur.

 Most of the ways with which I'm familiar utilize methods where the
 communication between the app and the network happen with something
 pretty straightforward.  (As an example, in Volley, the threads are
 somewhat hidden in the request order, and you build up request objects
 to send to them.)

 The thing I *don't* want to see is a lot of use of shared variable
 concurrency to coordinate stuff with a `Thread` instance that is
 passed to the network, but it doesn't seem like that pops up all that
 often.

 Kris


 On Fri, Feb 20, 2015 at 1:21 PM, erdo e...@ixpocket.com wrote:
  Sorry for the huge post, but for what it's worth, every app that I do
  nowadays has the same general pattern...
 
  I basically have a model class(es) that incorporates any logic or data
 that
  you don't want cluttering up your views/activities/fragments and where
 you
  would do any networking stuff. By model I mean the M in MVC or the M in
 MVVM
  or the VM in MVVM. (Let's say an account object)
 
  You can inject this model class into your views/activities/fragments when
  you need it - using dagger or you can just roll your own dependency
  injection code via the application class.
 
  That means that the fragment/activity classes just manage their lifecycle
  and get references to whatever models they need (an account object,
 maybe a
  network state object or whatever) and do as little else as possible.
 
  When you update the UI, you just run a syncView() method on the fragment
 or
  your custom view class (my preference, as it removes even more code from
 the
  fragment) that sets the state of all the UI components eg:
  textView.setText(account.getAccountName()); you just need to make sure
 all
  the get() methods on your models return immediately.
 
  Any network connectivity or other stuff that needs to be done on a
 separate
  thread, I would do from the model class which mostly exists
 independently of
  any activity/fragment lifecycle (saving you a whole heap of lifecycle
  trouble).
 
  Once the network stuff has returned with data or an error to the model
  class, I use the Observer pattern so that the views/activities/fragments
 or
  other models that are interested, get notified of the change to the model
  and then update themselves based on the model's new data (see the
 syncView()
  method above). You can roll your own simple observer classes (my
 preference)
  or use something like RxJava or even Otto can be used this way. Also if
 you
  send all your update notifications on the UI thread, you'll save yourself
  some headaches when updating UIs based on them.
 
  So the models themselves will make use of Volley or Retrofit/OKHttp (both
  are pretty good and I would definitely use one of them) and may have
  AsyncTasks in there too. You just have to make sure (especially when
 using
  AsyncTasks) that you can independently test the models which means being
  able to inject the networking stuff (substituting mocked versions for
  tests). The way AsyncTask is designed makes it particularly awkward to
 test.
  You can: Write complicated tests to handle the threading problems using a
  latch and so on; Test only using a framework like espresso (but then you
  will be testing via the UI and not strictly doing a unit test; Or you can
  wrap AsyncTask in your own class that can be used in a synchronous way
 for
  tests - that's what I do and it makes the tests much simpler.
 
  If you're fetching lists of stuff, I'd use the model classes to write
  straight to a database once the data has been fetched from the network.
  ContentLoaders while they do clutter up your fragment/activity code, do
 seem
  nice and performant and have a built in observer style mechanism so when
 the
  data in your database changes, your view gets immediately refreshed. You
 do
  have to write a content provider but personally I think it's worth it.
 
 
  I just realised how complicated all of this sounds, but it is actually so
  much simpler than jamming everything in your activity classes, which is
 just
  crazy but very common to see. I think it's a major failing of Android (as
  opposed to iOS or windows phone, or maybe most other application
  platforms!?) that it seems to have been designed with no thought about
 the
  absolutely fundamental issue of how 

Re: [android-developers] Which pattern is most common for apps that involve communication with servers?

2015-02-19 Thread Kostya Vasilyev
A service turned inside out

A mediator class that manages a pool of threads, submits / cancels /
executes task objects, manages the wake lock (based on having tasks).

And a service whose only responsibility is to do startForeground /
stopForeground when it's told to.

All in the same process.

This way I don't have to bind to a service (which is asynchronous) and it's
easier to manage state in the UI, to indicate to the user what the app is
doing, and to queue up tasks when necessary.

-- K

2015-02-19 23:30 GMT+03:00 Kristopher Micinski krismicin...@gmail.com:

 Right, that's a good point I did not mention.

 I'm interested in knowing what percentage of apps use a framework like
 this rather than facilities purely within the vanilla Android
 framework.

 I can do some rough calculations in a while by grabbing a bunch of
 apps and running some analysis on them,

 Kris


 On Thu, Feb 19, 2015 at 3:13 PM, TreKing treking...@gmail.com wrote:
 
  On Thu, Feb 19, 2015 at 2:03 PM, Kristopher Micinski
  krismicin...@gmail.com wrote:
 
  I was
  wondering if there were any other patterns that app developers used
  that I hadn't thought about,
 
 
  Use a library like Volley or Retrofit.
 
 
 -
  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
--- 
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/d/optout.


Re: [android-developers] BANNING APPS ON PURPOSE

2015-01-01 Thread Kostya Vasilyev
I think you *might* be able to do something under the DMCA -- if you never
signed the rights to those apps (copy, distribute, create derivative
works...) over to the customer -- or any sort of license to distribute,
etc. -- and so you're still the copyright owner on those apps (works).

I'm not a lawyer, and this is only a guess -- so you may want to consult
someone who's qualified in these matters. It may not be practical though
(depends on how much you'd have to pay for a consultation).

-- K

2015-01-01 20:33 GMT+03:00 Raghavendra Rao raghu1...@gmail.com:

 you cannot ban.. since u have evrything with you. you can change the
 package name, add more good features to it and can release that with other
 name into google play store in your own account and can hit his revenue..
 This will affect his revenue if your app is much better than that app.
 On 31 Dec 2014 22:39, Michael Benner rarui...@gmail.com wrote:

 Hello.

 I've been developing apps for a guy who didn't pay me anything.

 I still keep all the keystores and some of source codes.
 Do you know any way to being able to ban the apps ? (legally).

 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
 ---
 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/d/optout.

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


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


[android-developers] Re: New Google Play Services Library causes ANR

2014-12-22 Thread Kostya Vasilyev
Looks like a classic two-thread deadlock.

Thread main holding one monitor, and waiting for thread 
client_id_fetcher while trying to lock another:

main prio=5 tid=1 MONITOR
| group=main sCount=1 dsCount=0 obj=0x40e70a78 self=0x57017010
| sysTid=24172 nice=0 sched=0/0 cgrp=apps handle=1074714076
| state=S schedstat=( 42758 1139226000 1925 ) utm=17 stm=25 core=0
at com.google.android.gms.analytics.ae.void U(java.lang.String)((null):~-1)
  
 com.google.android.gms.analytics.Logger getLogger()
- waiting to lock 0x413413a0 held by tid=11 (client_id_fetcher)

And thread client_id_fetcher waiting for thread main:

client_id_fetcher prio=5 tid=11 MONITOR
| group=main sCount=1 dsCount=0 obj=0x4133ed30 self=0x58adfbc8
| sysTid=24186 nice=0 sched=0/0 cgrp=apps handle=1487037720
| state=S schedstat=( 284614000 1254896000 1744 ) utm=1 stm=27 core=0
at 
com.google.android.gms.analytics.GoogleAnalytics.com.google.android.gms.analytics.GoogleAnalytics
 
getInstance(android.content.Context)((null):~-1)

com.google.android.gms.analytics.GoogleAnalytics eY()
void 
a(com.google.android.gms.analytics.aa)
int ai(java.lang.String)
void setDryRun(boolean)
void 
enableAutoActivityReports(android.app.Application)
void 
reportActivityStart(android.app.Activity)

com.google.android.gms.analytics.Tracker newTracker(int)

com.google.android.gms.analytics.Tracker 
a(com.google.android.gms.analytics.Tracker)
void 
a(com.google.android.gms.analytics.GoogleAnalytics$a)
void u(java.util.Map)
- waiting to lock 0x4133ba20 held by tid=1 (main)

Like this:

void something_in_main() {

   synchronized (lockObject1) {
synchronized (lockObject2) {

}
}
}

and

void something_in_client_id_fetcher() {

   synchronized (lockObject2) {
synchronized (lockObject1) {

}
}
}


( I don't work for Google or know anything about GA, but a deadlock is a 
deadlock )

-- K

On Monday, December 22, 2014 7:07:11 AM UTC+3, yccheok wrote:

 I get huge number of ANR 

 ANR keyDispatchingTimedOut

 after using latest Google Play Services Library.

 The problematic code is

 com.google.android.gms.analytics.GoogleAnalytics 
 getInstance(android.content.Context)

 This can be seen in the proguard retrace log

 - pid 24172 at 2014-12-22 10:17:52 -
 Cmd line: org.yccheok.jstock.gui

 DALVIK THREADS:
 (mutexes: tll=0 tsl=0 tscl=0 ghl=0)

 main prio=5 tid=1 MONITOR
 | group=main sCount=1 dsCount=0 obj=0x40e70a78 self=0x57017010
 | sysTid=24172 nice=0 sched=0/0 cgrp=apps handle=1074714076
 | state=S schedstat=( 42758 1139226000 1925 ) utm=17 stm=25 core=0
 at com.google.android.gms.analytics.ae.void U(java.lang.String)((null):~-1)
   
  com.google.android.gms.analytics.Logger getLogger()
 - waiting to lock 0x413413a0 held by tid=11 (client_id_fetcher)
 at com.google.android.gms.analytics.ae.void V(java.lang.String)((null):-1)
 at 
 com.google.android.gms.analytics.GoogleAnalytics.com.google.android.gms.analytics.GoogleAnalytics
  
 getInstance(android.content.Context)((null):-1)
 
 com.google.android.gms.analytics.GoogleAnalytics eY()
 void 
 a(com.google.android.gms.analytics.aa)
 int 
 ai(java.lang.String)
 void setDryRun(boolean)
 void 
 enableAutoActivityReports(android.app.Application)
 void 
 reportActivityStart(android.app.Activity)
 
 com.google.android.gms.analytics.Tracker newTracker(int)
 
 com.google.android.gms.analytics.Tracker 
 a(com.google.android.gms.analytics.Tracker)
 void 
 a(com.google.android.gms.analytics.GoogleAnalytics$a)
 void u(java.util.Map)
 at com.google.android.gms.analytics.GoogleAnalytics.void eZ()((null):-1)
 at com.google.android.gms.analytics.GoogleAnalytics.init((null):-1)
 at com.google.android.gms.analytics.GoogleAnalytics.init((null):-1)
 at 
 com.google.android.gms.analytics.GoogleAnalytics.com.google.android.gms.analytics.GoogleAnalytics
  
 

Re: [android-developers] ViewPager pages not drawn

2014-12-22 Thread Kostya Vasilyev


On Sunday, December 21, 2014 6:15:44 AM UTC+3, Doug Gordon wrote:

 SOLVED! After tracing the execution through ViewPager and 
 FragmentPagerAdapter and trying to explain the very strange behavior I was 
 seeing, I eventually discovered that when I wrote my fragments extending 
 Fragment and ListFragment a long time ago, I had added a getView() method 
 that was (inadvertently) overriding the method by that name in the 
 superclass and was returning the wrong view for what the ViewPager was 
 expecting. I removed these methods and everything started working.

 The only explanation I have for why this code was working OK with the 
 native fragments is that I noticed that the support.v4 fragments enclose 
 the fragment's actual root view as returned by onCreateView with some sort 
 of FrameLayout that they create, and that is what getView returns. The 
 native fragments apparently do not do this, so the view returned by my 
 getView method worked correctly.

 The only odd thing, and I am not a Java expert, is that I did not precede 
 my getView with @Override and did not notice any error or warning about 
 that. Isn't this required? I know that when I wrote that code that I was 
 not intending to override the superclass.


@Override is not required. 

It's for flagging a method that you intend to be an override -- and if it 
really isn't (no matching method in a base class / interface), then the 
compiler will flag it with an error.

Useful to detect a situation when someone makes a change to a base class or 
interface (potentially a few hierarchy levels up), maybe adding a 
parameter, that sort of thing -- and your class' method suddenly doesn't 
override what it's supposed to, breaking at runtime.

Personally, I find it very useful to use Eclipse's auto-format when 
saving, with the setting that automatically adds any missing @Override 
annotations.

-- K

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


Re: [android-developers] ViewPager pages not drawn

2014-12-20 Thread Kostya Vasilyev
Ok, so the items are there and the views are there.

What I would do at this point is check the attributes (data) of those views:

- Their positions and sizes
- Visibility
- Animation state
- Translation / scaling
- Scroll positions

Or I would try to debug into the view pager's onMeasure / onLayout /
populate + scrollToItem

For this second part, I would perhaps add a button in the layout that calls
requestLayout or setCurrentItem on the pager, to trigger as needed.

-- K

2014-12-20 17:17 GMT+03:00 Doug Gordon gordo...@gmail.com:

 Kostya, I have done that and what I am seeing is the background of the
 ViewPager, but not my fragments' views. I set a breakpoint so I could go
 back into the ViewPager, and examining its data structure I find that not
 only does its mItems array contain my instantiated fragments, but also the
 mChildren array in the base View contains my fragments' expanded view
 hierarchies!

 There is just something that is preventing the views from being drawn,
 even if I explicitly call invalidate() on the ViewPager. And it still seems
 that it must have something to do with using the support.v4 fragment
 support since it all works fine using native fragments.

 On Friday, December 19, 2014 4:57:43 PM UTC-5, Kostya Vasilyev wrote:

 Have you tried debugging into ViewPager code?

 To see if your fragments' views are actually there and how they're laid
 out?

 Another thing I often use in cases like this -- is to set the background
 color of various views to distinct noticeable colors, like pink, cyan, etc.
 In this case, I'd try the view pager itself, its parent view, and your
 fragments' views.

 -- K

 2014-12-20 0:30 GMT+03:00 Doug Gordon gord...@gmail.com:

 I haven't received any responses on stackoverflow about this, so am
 giving it a shot here.

 My app, which is fairly large and complex (hard to post meaningful code)
 uses as its main view a ViewPager with a FragmentPagerAdapter. Since the
 minSDK is 14, I originally wrote it to use the native Fragment and related
 classes (ViewPager from support.v4 and FragmentPagerAdapter from
 support.v13). This has all been working perfectly for a long time.

 Recently I decided to build in more compatibility, mainly for themes, by
 using the appcompat.v7 library. However, using this library required that I
 use the Fragment and FragmentPagerAdapter, etc. classes from the support.v4
 library (meaning that I also had to change my Activity to a
 FragmentActivity, call getSupportFragmentManager, etc.).



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


Re: [android-developers] ViewPager pages not drawn

2014-12-19 Thread Kostya Vasilyev
Have you tried debugging into ViewPager code?

To see if your fragments' views are actually there and how they're laid out?

Another thing I often use in cases like this -- is to set the background
color of various views to distinct noticeable colors, like pink, cyan, etc.
In this case, I'd try the view pager itself, its parent view, and your
fragments' views.

-- K

2014-12-20 0:30 GMT+03:00 Doug Gordon gordo...@gmail.com:

 I haven't received any responses on stackoverflow about this, so am giving
 it a shot here.

 My app, which is fairly large and complex (hard to post meaningful code)
 uses as its main view a ViewPager with a FragmentPagerAdapter. Since the
 minSDK is 14, I originally wrote it to use the native Fragment and related
 classes (ViewPager from support.v4 and FragmentPagerAdapter from
 support.v13). This has all been working perfectly for a long time.

 Recently I decided to build in more compatibility, mainly for themes, by
 using the appcompat.v7 library. However, using this library required that I
 use the Fragment and FragmentPagerAdapter, etc. classes from the support.v4
 library (meaning that I also had to change my Activity to a
 FragmentActivity, call getSupportFragmentManager, etc.).

 Making no more than these changes, my ViewPager comes up as a blank
 screen; all I see is the ViewPager's background color; my fragments' views
 are not displayed! What's really strange is that by putting in various
 breakpoints, I can see that almost everything is working underneath as far
 as my fragments' life-cycle methods being called, etc. I can swipe back and
 forth across the screen and the fragments appear to be swapped in and out
 as expected. It is particularly telling, however, that in various custom
 views that I have, the onMeasure and onDraw methods are never called!

 Does anyone have any idea of what would be preventing the ViewPager from
 actually drawing its views? If I revert the code to use the native fragment
 support and associated supporting classes, everything shows up, which means
 that if there is something wrong on my end it must be extremely subtle.

 (Just to throw in some confusion, there is another activity in the app
 that also uses a ViewPager with fragments, and it continues to work with
 either the native or support library classes. (I'm about to throw in the
 towel and just forget this whole update.))

 Doug Gordon

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


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


Re: [android-developers] Dex Limit workarounds- ADT or Android Studio only?

2014-12-17 Thread Kostya Vasilyev
I feel your pain about Eclipse.

Google Play services just recently was split into multiple libraries.

Assuming you don't need Google Games and Google Wear and Google Fitness and
Google Helicopters and Google Sandwiches and Google Wallet and Google
Kitchen Sink all at the same time -- you should be able to include just the
ones you need.

You can find them under:

sdk root/extras/google/m2repository/com/google/android/gms/

This is part of ... something ... Repository in the SDK Manager.

Now, those are .aar files, but they're simple archives -- you should be
able to the contents and use it as an Eclipse library project:

unzip -l play-services-wearable-6.1.71.aar
Archive:  play-services-wearable-6.1.71.aar
  Length  DateTimeName
-  -- -   
 5763  2014-10-08 22:05   R.txt
 1088  2014-10-08 22:05   AndroidManifest.xml
  1356943  2014-10-08 22:05   classes.jar
0  2014-10-08 22:05   res/
0  2014-09-25 19:07   res/values-bg/
 5350  2014-09-25 19:07   res/values-bg/common_strings.xml
0  2014-09-25 19:07   res/drawable-tvdpi/
  823  2014-09-25 19:07
res/drawable-tvdpi/ic_plusone_medium_off_client.png
  828  2014-09-25 19:07
res/drawable-tvdpi/ic_plusone_small_off_client.png
  874  2014-09-25 19:07
res/drawable-tvdpi/ic_plusone_standard_off_client.png
  873  2014-09-25 19:07
res/drawable-tvdpi/ic_plusone_tall_off_client.png
...

Should work, although I haven't done this.

What I have done, and it worked -- needing just OAUTH stuff, before this
split happened -- was to:

- use the Eclipse project for Play Services under:

/home/kman/Android/android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib/libs

- extract the monolithic google-play-services.jar and repackage just the
files I needed into a new .jar and using that one instead

- carefully delete unused resources (languages that my app doesn't have
translations for anyway, a bunch of images...)

-- K



2014-12-17 23:22 GMT+03:00 Nathan nathan.d.mel...@gmail.com:

 I was wondering what all the fuss was over the Dex limit, till I included
 Google Play Services.

 Right away, I got the dreaded error:

 Conversion to Dalvik format failed:
 Unable to execute dex: method ID not in [0, 0x]: 65536

 So now I am referring to the official guide:

 Building Apps with Over 65K Methods:
 https://developer.android.com/tools/building/multidex.html

 It says, I think, that on Android 5.0 I will be fine.
 Good so far.
 On pre 5.0, use the multidex support library.
 Okay, so I included android-support-multidex.jar in libs folder.

 The next section is
 Configuring Your App for Multidex with Gradle
 Hmm, no section for Configuring Your App for Multidex with ADT/Eclipse
 They weren't kidding about dropping support for ADT like a rock.

 A colleague found this

 http://stackoverflow.com/questions/13439882/android-error-in-eclipse-unable-to-execute-dex-cannot-merge-new-index-65799-i
 Suggesting that we should use
 dex.force.jumbo=true
 in each project.properties.
 It seemed to work for him
 I don't know if this applies to the android libraries like appcompat and
 Google Play Services.

 I tried it. Didn't help.
 Still getting this when I try to debug:

 Conversion to Dalvik format failed:
 Unable to execute dex: method ID not in [0, 0x]: 65536

 Saw this article too:

 http://android-developers.blogspot.com/2014/12/google-play-services-and-dex-method.html
 Hmm, these instructions are also only for Gradle. No way to do it in ADT?

 So my questions are:
 *Can I get around this in ADT/Eclipse or should I speed up the migration
 to Android Studio. ? *

 I see this note at the bottom:

  *Note:* Use of multidex for creating a test APK is not currently
 supported

 Does this mean no more debugging my code?
 Just ship it to Google Play and hope for the best?
 We are all Klingon warriors now - we do not debug - our software does not
 coddle the weak. ;)

 Nathan





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


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

Re: [android-developers] Simple PagerAdapter does not display views

2014-11-24 Thread Kostya Vasilyev
Did you properly implement the adapter's isViewFromObject?

How about getItemPosition?

-- K

2014-11-25 0:22 GMT+03:00 Doug Gordon gordo...@gmail.com:

 I have a fragment in which I want to display a number of similar pages
 using ViewPager. For some reason I thought that it would be simpler to
 extend the base PagerAdapter to feed views to the ViewPager. My custom
 PageAdapter implements instantiateItem by inflating a layout, populating
 its widgets, and then calling addView against the container view. The
 containing ViewPager is the view that I return from the onCreateView method
 of the fragment.

 The problem is that this is working from a paging point of view, but the
 screen remains blank. By setting breakpoints, I find that when I swipe
 across the (blank) screen, my PagerAdapter is called as expected
 (instantiateView, destroyView, etc.) to return the next/previous view, but
 nothing is shown -- only the background of the ViewPager. Examining the
 ViewPager at the breakpoint, the expected instantiated views are in its
 array of child views.

 Any clues on where to look? I've implemented a FragmentPagerAdapter
 elsewhere with no issues, but this does seem like it would be easier,
 especially since these views have no controls on them (just data).

 Doug Gordon
 GHCS Software

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


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


Re: [android-developers] Re: SSLHandshakeException errors on Android 5.0?

2014-11-15 Thread Kostya Vasilyev
Do you use SSLCertificateSocketFactory (with caching?)

https://github.com/android/platform_frameworks_base/blob/master/core/java/android/net/SSLCertificateSocketFactory.java

https://github.com/android/platform_frameworks_base/blob/master/core/java/android/net/SSLSessionCache.java

A lot of servers have been tweaked recently because of the SSLv3
vulnerability.

This socket factory will try to use any previously negotiated (and cached)
protocols and ciphers, potentially failing.

There is are no methods to flush the caches (Android API Council, hello?)...

...but it works to delete the files (see SSLSessionCache constructor) and
to then reboot the device (so flush anything already loaded into memory).

-- K


2014-11-16 1:38 GMT+03:00 Scott Jackson daneren2...@gmail.com:

 I am getting a very similar error report from some users.  It seems that
 only people who are connecting to a default setup of Subsonic are having
 the issue.  Anyone who uses a NGinx/Apache front end aren't having the same
 issue.  The server is based on Jetty 6.  Any idea what the problem might be?


 On Thursday, November 6, 2014 3:25:42 PM UTC-8, Nathan wrote:

 I've had two people in a row report the exact same thing with Android 5.0
 on Nexus 9.

 One of them got me a log.

 I am seeing a failure in contacting a server through a client certificate
 for in app billing purposes

 Can anyone confirm any ssl based surprises in Android 5.0?

 If so, not such a good job in backwards compatibility, but I guess my
 expectations should be pretty low in that regard.

 Nathan


 11-06 14:25:39.684 E/ServerService( 9973): Handshake failed
 11-06 14:25:39.684 E/ServerService( 9973): 
 javax.net.ssl.SSLHandshakeException:
 Handshake failed
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(
 OpenSSLSocketImpl.java:374)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(
 OpenSSLSocketImpl.java:598)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(
 OpenSSLSocketImpl.java:584)
 11-06 14:25:39.684 E/ServerService( 9973): at com.crittermap.iab.
 serverinterface.ServerService.onHandleIntent(ServerService.java:98)
 11-06 14:25:39.684 E/ServerService( 9973): at
 android.app.IntentService$ServiceHandler.handleMessage(
 IntentService.java:65)
 11-06 14:25:39.684 E/ServerService( 9973): at android.os.Handler.
 dispatchMessage(Handler.java:102)
 11-06 14:25:39.684 E/ServerService( 9973): at
 android.os.Looper.loop(Looper.java:135)
 11-06 14:25:39.684 E/ServerService( 9973): at
 android.os.HandlerThread.run(HandlerThread.java:61)
 11-06 14:25:39.684 E/ServerService( 9973): Caused by: 
 javax.net.ssl.SSLProtocolException:
 SSL handshake aborted: ssl=0x55a1c0b870: Failure in SSL library, usually a
 protocol error
 11-06 14:25:39.684 E/ServerService( 9973): error:14077438:SSL
 routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
 (external/openssl/ssl/s23_clnt.c:765 0x7f8df6bfb0:0x)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(
 OpenSSLSocketImpl.java:302)
 11-06 14:25:39.684 E/ServerService( 9973): ... 7 more
 11-06 14:25:40.825 E/ServerService( 9973): Handshake failed
 11-06 14:25:40.825 E/ServerService( 9973): 
 javax.net.ssl.SSLHandshakeException:
 Handshake failed
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(
 OpenSSLSocketImpl.java:374)
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(
 OpenSSLSocketImpl.java:598)
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(
 OpenSSLSocketImpl.java:584)
 11-06 14:25:40.825 E/ServerService( 9973): at com.crittermap.iab.
 serverinterface.ServerService.onHandleIntent(ServerService.java:98)
 11-06 14:25:40.825 E/ServerService( 9973): at
 android.app.IntentService$ServiceHandler.handleMessage(
 IntentService.java:65)
 11-06 14:25:40.825 E/ServerService( 9973): at android.os.Handler.
 dispatchMessage(Handler.java:102)
 11-06 14:25:40.825 E/ServerService( 9973): at
 android.os.Looper.loop(Looper.java:135)
 11-06 14:25:40.825 E/ServerService( 9973): at
 android.os.HandlerThread.run(HandlerThread.java:61)
 11-06 14:25:40.825 E/ServerService( 9973): Caused by: 
 javax.net.ssl.SSLProtocolException:
 SSL handshake aborted: ssl=0x55a1c057e0: Failure in SSL library, usually a
 protocol error
 11-06 14:25:40.825 E/ServerService( 9973): error:14077438:SSL
 routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
 (external/openssl/ssl/s23_clnt.c:765 0x7f8df6bfb0:0x)
 11-06 14:25:40.825 E/ServerService( 

Re: [android-developers] Untrusted Server Certificate in Android Studio(0.8.14)

2014-11-13 Thread Kostya Vasilyev
Looks like your Internet provider is pulling an MITM on you (for good
reasons, I'm sure).

I'm attaching a screenshot of services.gradle.org from Chrome. As you can
see, it's issued by DigiCert.

-- k

2014-11-13 15:38 GMT+03:00 Innolab innolab...@gmail.com:

 Hi,

 I am trying to compile a project in android studio(0.8.14) at enterprise
 level. All the proxy information is setup.
 But when I Build the app for the very first time, it shows* 'Server's
 Cetificate is not trusted'.*


 https://lh6.googleusercontent.com/-cHYLvUCix0w/VGSmENXRc7I/AeU/9NqUzdO6tYc/s1600/certificate%2Berror.png

 I clicked  '*Accept*' option and tried to complie it again.

 Now it is giving error *'Received fatal alert: bad_record_mac'*

 How can I setup android studio properly?

 Need help.

 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
 ---
 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/d/optout.


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


Re: [android-developers] SSLHandshakeException errors on Android 5.0?

2014-11-06 Thread Kostya Vasilyev
I recall seeing a bug report in the preview tracker - had to do with
connecting to Apple's iCloud mail servers (IMAP), and someone also reported
an issue with http POST losing some data.

Don't have a link handy, but should be possible to find.

In addition, I've seen some SSL failures after a system upgrade between
earlier Android versions (4.2 and 4.4) caused by the caching SSL socket
factory, the one which is an Android class, not Java SDK class. And there
is no API to remove those caches from memory, arrgh.
 07 нояб. 2014 г. 2:29 пользователь Nathan nathan.d.mel...@gmail.com
написал:

 I've had two people in a row report the exact same thing with Android 5.0
 on Nexus 9.

 One of them got me a log.

 I am seeing a failure in contacting a server through a client certificate
 for in app billing purposes

 Can anyone confirm any ssl based surprises in Android 5.0?

 If so, not such a good job in backwards compatibility, but I guess my
 expectations should be pretty low in that regard.

 Nathan


 11-06 14:25:39.684 E/ServerService( 9973): Handshake failed
 11-06 14:25:39.684 E/ServerService( 9973):
 javax.net.ssl.SSLHandshakeException: Handshake failed
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:374)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:598)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(OpenSSLSocketImpl.java:584)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.crittermap.iab.serverinterface.ServerService.onHandleIntent(ServerService.java:98)
 11-06 14:25:39.684 E/ServerService( 9973): at
 android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
 11-06 14:25:39.684 E/ServerService( 9973): at
 android.os.Handler.dispatchMessage(Handler.java:102)
 11-06 14:25:39.684 E/ServerService( 9973): at
 android.os.Looper.loop(Looper.java:135)
 11-06 14:25:39.684 E/ServerService( 9973): at
 android.os.HandlerThread.run(HandlerThread.java:61)
 11-06 14:25:39.684 E/ServerService( 9973): Caused by:
 javax.net.ssl.SSLProtocolException: SSL handshake aborted:
 ssl=0x55a1c0b870: Failure in SSL library, usually a protocol error
 11-06 14:25:39.684 E/ServerService( 9973): error:14077438:SSL
 routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
 (external/openssl/ssl/s23_clnt.c:765 0x7f8df6bfb0:0x)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
 11-06 14:25:39.684 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:302)
 11-06 14:25:39.684 E/ServerService( 9973): ... 7 more
 11-06 14:25:40.825 E/ServerService( 9973): Handshake failed
 11-06 14:25:40.825 E/ServerService( 9973):
 javax.net.ssl.SSLHandshakeException: Handshake failed
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:374)
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:598)
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(OpenSSLSocketImpl.java:584)
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.crittermap.iab.serverinterface.ServerService.onHandleIntent(ServerService.java:98)
 11-06 14:25:40.825 E/ServerService( 9973): at
 android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
 11-06 14:25:40.825 E/ServerService( 9973): at
 android.os.Handler.dispatchMessage(Handler.java:102)
 11-06 14:25:40.825 E/ServerService( 9973): at
 android.os.Looper.loop(Looper.java:135)
 11-06 14:25:40.825 E/ServerService( 9973): at
 android.os.HandlerThread.run(HandlerThread.java:61)
 11-06 14:25:40.825 E/ServerService( 9973): Caused by:
 javax.net.ssl.SSLProtocolException: SSL handshake aborted:
 ssl=0x55a1c057e0: Failure in SSL library, usually a protocol error
 11-06 14:25:40.825 E/ServerService( 9973): error:14077438:SSL
 routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
 (external/openssl/ssl/s23_clnt.c:765 0x7f8df6bfb0:0x)
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
 11-06 14:25:40.825 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:302)
 11-06 14:25:40.825 E/ServerService( 9973): ... 7 more
 11-06 14:25:41.964 E/ServerService( 9973): Handshake failed
 11-06 14:25:41.964 E/ServerService( 9973):
 javax.net.ssl.SSLHandshakeException: Handshake failed
 11-06 14:25:41.964 E/ServerService( 9973): at
 com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:374)
 11-06 

Re: [android-developers] Re: Physical address is required for paid apps or in-app purchases

2014-10-01 Thread Kostya Vasilyev
2014-10-02 0:07 GMT+04:00 jtoolsdev brianjto...@gmail.com:
 I still want to know what EU laws they are complying with?  I don't see
 anything about developer addresses in the letter the EU sent to them.

 Also if you read the new agreement, section 3.7 shows the refund period as
 48 hours instead of the NEW refund period of 2 hours.  It apparently was
 left at 48 hours even when it was only 15 minutes (from reviewing the
 archive).

The web version of Play store still shows this after a purchase -- 15 minutes.


If you are not satisfied with this app, it can be returned from your
device up to 15 minutes after installation. Refund policy
OK



 Kinda sloppy.  Are the Google attorneys fresh out of law school
 too?

48 hours, 15 minutes, pretty close anyway? :)

-- K

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


Re: [android-developers] Re: Physical address is required for paid apps or in-app purchases

2014-09-30 Thread Kostya Vasilyev
It looks like the wording conflates two addresses into one --

-- The address that will be displayed to everyone, even on the Google Play
web site, even to users who've not installed your apps... just anyone, I
presume.

-- The address that Google will use for contact, and which won't be shown
to random strangers on the web

Also I am unable to find anything about addresses in the linked Developer
Terms either (checked the current US English version).

Fortunately, Google Wallet / Merchant settings are still separate.

Don't think there is anything to be done here -- Google is being forced by
the EU to comply with its laws.

The execution is pretty terrible, in my opinion, but I just don't see
Google or the EU backtracking on the requirement itself.

-- K


2014-09-30 16:58 GMT+04:00 Jose_GD jose.gonzale...@gmail.com:

 Ok, the day arrived. The Physical address field is live in the developer
 console.

 Below the field you'll find this:

 *Please provide a current, valid postal address where you may be
 contacted. If you offer apps or in-app items for sale, you are required to
 provide a postal address under our developer terms
 https://play.google.com/about/developer-distribution-agreement.html and
 consumer protection laws; failure to do so may result in the suspension of
 your account and/or sales of your apps. Please ensure that you keep these
 details up to date if they change. By providing your email or postal
 address information, you confirm that you consent to Google publicly
 displaying or disclosing that information in connection with your apps. *


 You are required to provide a postal address under our developer
 terms Alright, the terms DON'T mention this nonsense at all! At least
 in the Spanish version.

 I think I'll put something there, not sure what... Time to start a
 change.org petition or something like that?


 El lunes, 29 de septiembre de 2014 09:50:34 UTC-3, Jose_GD escribió:

 Ha, I've seen those awesome news too. Answering what I guess:

 1. Email, because Google encourages users to use comments in Play Store
 alongside ratings and email to ask for support
 2. Google will examine support inquires after users complaining of an
 unsatisfactory answer. If they think it was urgent, they will email the dev
 with this: Hey, this was an urgent matter, please answer now to not risk a
 dev account cancellation


 El viernes, 26 de septiembre de 2014 10:14:36 UTC-3, Kostya Vasilyev
 escribió:

 But wait, there is more.

 New developer policy -- from September 25 -- has this (new):

 For paid Products or in-app transactions, you must respond to customer
 support inquiries within three (3) business days, and within 24 hours to
 any support or Product concerns stated to be urgent by Google.

 Does anyone know if:

 1 - They mean Google Play comments or email?

 2 - How will the developer know that a particular support request was
 stated to be urgent by Google?

 -- K



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


Re: [android-developers] Re: Physical address is required for paid apps or in-app purchases

2014-09-26 Thread Kostya Vasilyev
But wait, there is more.

New developer policy -- from September 25 -- has this (new):

For paid Products or in-app transactions, you must respond to customer
support inquiries within three (3) business days, and within 24 hours to
any support or Product concerns stated to be urgent by Google.

Does anyone know if:

1 - They mean Google Play comments or email?

2 - How will the developer know that a particular support request was
stated to be urgent by Google?

-- K


2014-09-26 15:26 GMT+04:00 Jose_GD jose.gonzale...@gmail.com:

 If this were Facebook Kostya, I would liked your post LOL

 I can't imagine people knocking on my door neither, this is ludicrous...

 El jueves, 25 de septiembre de 2014 16:42:47 UTC-3, Kostya Vasilyev
 escribió:

 Yes, Google's communication could be better here. I guess they just don't
 really care about explaining.

 The reason still looks ridiculous to me -- but dura lex, sed lex, and
 Google has to comply, and then so do we.

 But it makes me curious -- should I now expect users from Denmark or
 Greece to show on my doorstep, with their phones in hand, see, this button
 doesn't work? It's a long trip from there to Russia, and there are bears
 in the streets, dangerous :)

 It's not clear if Google will accept PO boxes here -- they don't for
 merchant account addresses -- so we'll see when there actually is a way to
 enter the address. Right now, it seems like there isn't, and my request for
 a clarification has not been answered (so far).

 -- K


 2014-09-25 22:55 GMT+04:00 jtoolsdev brian...@gmail.com:

 So if it has to do with European customer protection laws why don't they
 just say so in the notification AND put a link the law?  Or is that too
 much work for them?  There seems to be an attitude against people being
 able to make money on their own and that you MUST work with a big company
 in the 21st century.  If you have to rent a mailbox then raise your prices
 to pay for it and let the users know why.  Everyone else is raising their
 prices including your local sandwich shop.  Yesterday's 99 cent app should
 be $1.25 by now.

 On Wednesday, September 24, 2014 1:29:33 PM UTC-7, Kostya Vasilyev wrote:

 @Jose - I contacted Play support about it and they explained that it
 has to do with European customer protection laws, and there is no way they
 will make any exceptions. So I think you can forget about reverted too.

 @Noby - do you know if it should be under Business Information -
 Public Profile - Address, or under Legal profile - Payee profile -
 Address? I'll need to use different addresses there, for personal safety.

 -- K



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


Re: [android-developers] Re: Physical address is required for paid apps or in-app purchases

2014-09-25 Thread Kostya Vasilyev
Yes, Google's communication could be better here. I guess they just don't
really care about explaining.

The reason still looks ridiculous to me -- but dura lex, sed lex, and
Google has to comply, and then so do we.

But it makes me curious -- should I now expect users from Denmark or Greece
to show on my doorstep, with their phones in hand, see, this button
doesn't work? It's a long trip from there to Russia, and there are bears
in the streets, dangerous :)

It's not clear if Google will accept PO boxes here -- they don't for
merchant account addresses -- so we'll see when there actually is a way to
enter the address. Right now, it seems like there isn't, and my request for
a clarification has not been answered (so far).

-- K


2014-09-25 22:55 GMT+04:00 jtoolsdev brianjto...@gmail.com:

 So if it has to do with European customer protection laws why don't they
 just say so in the notification AND put a link the law?  Or is that too
 much work for them?  There seems to be an attitude against people being
 able to make money on their own and that you MUST work with a big company
 in the 21st century.  If you have to rent a mailbox then raise your prices
 to pay for it and let the users know why.  Everyone else is raising their
 prices including your local sandwich shop.  Yesterday's 99 cent app should
 be $1.25 by now.

 On Wednesday, September 24, 2014 1:29:33 PM UTC-7, Kostya Vasilyev wrote:

 @Jose - I contacted Play support about it and they explained that it has
 to do with European customer protection laws, and there is no way they will
 make any exceptions. So I think you can forget about reverted too.

 @Noby - do you know if it should be under Business Information - Public
 Profile - Address, or under Legal profile - Payee profile - Address?
 I'll need to use different addresses there, for personal safety.

 -- K

 2014-09-24 23:45 GMT+04:00 Nobu Games dev.nob...@gmail.com:

 As far as I know, the physical address has to be specified in your Google
 Wallet Merchant https://wallet.google.com/merchant/ account, that you
 use for receiving payments from Google Play.


 On Wednesday, September 24, 2014 2:38:24 PM UTC-5, Jose_GD wrote:

 I thinks this is another sign of the insanity a company can get when it
 grows too big...
 We are less than a week from the deadline and still it isn't possible
 to find the dreaded Physical address field in the already painful
 Developer Console (too be fair it got better in some aspects lately)

 Hope this crazy decision gets reverted in the following days

 Cheers

 José
 https://play.google.com/store/apps/developer?id=Jos%C3%A9+Go
 nz%C3%A1lez+D%27Amico


 El jueves, 18 de septiembre de 2014 03:13:56 UTC-3, nagamatu escribió:

 Dear Android Developers,

 I got the following notification at Google play Developer Console.

 | Add a physical contact address Beginning September 30, 2014, you
 need to add a physical address
 | to your Settings page. After you've added an address, it will be
 available on your app's detail page to
 | all users on Google Play. If your physical address changes, make
 sure to update your information on
 | your Settings page.

 | If you have paid apps or apps with in-app purchases, it's mandatory
 to provide a physical address
 | where you can be contacted. If you don't provide a physical address
 on your account, it may result in
 | your apps being removed from the Play Store.

 I do not want to disclose my home address in public, because I am an
 individual developer.
 This is privacy issue. I don't understand why Google requires my
 physical address.

 I disclose my e-mail address and users can contact me. Also I can
 reply to messages that is written
 in review at Google Play.

 If I am working for a company and office address is disclosed in
 public, I do not care for it.
 But do you want to know your home address in public?

 # I sent a feedback about objection for this requirement.

 --
 nagamatu


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


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

Re: [android-developers] Re: Physical address is required for paid apps or in-app purchases

2014-09-24 Thread Kostya Vasilyev
@Jose - I contacted Play support about it and they explained that it has to
do with European customer protection laws, and there is no way they will
make any exceptions. So I think you can forget about reverted too.

@Noby - do you know if it should be under Business Information - Public
Profile - Address, or under Legal profile - Payee profile - Address?
I'll need to use different addresses there, for personal safety.

-- K

2014-09-24 23:45 GMT+04:00 Nobu Games dev.nobu.ga...@gmail.com:

 As far as I know, the physical address has to be specified in your Google
 Wallet Merchant https://wallet.google.com/merchant/ account, that you
 use for receiving payments from Google Play.


 On Wednesday, September 24, 2014 2:38:24 PM UTC-5, Jose_GD wrote:

 I thinks this is another sign of the insanity a company can get when it
 grows too big...
 We are less than a week from the deadline and still it isn't possible to
 find the dreaded Physical address field in the already painful Developer
 Console (too be fair it got better in some aspects lately)

 Hope this crazy decision gets reverted in the following days

 Cheers

 José
 https://play.google.com/store/apps/developer?id=Jos%C3%A9+
 Gonz%C3%A1lez+D%27Amico


 El jueves, 18 de septiembre de 2014 03:13:56 UTC-3, nagamatu escribió:

 Dear Android Developers,

 I got the following notification at Google play Developer Console.

 | Add a physical contact address Beginning September 30, 2014, you need
 to add a physical address
 | to your Settings page. After you've added an address, it will be
 available on your app's detail page to
 | all users on Google Play. If your physical address changes, make sure
 to update your information on
 | your Settings page.

 | If you have paid apps or apps with in-app purchases, it's mandatory to
 provide a physical address
 | where you can be contacted. If you don't provide a physical address on
 your account, it may result in
 | your apps being removed from the Play Store.

 I do not want to disclose my home address in public, because I am an
 individual developer.
 This is privacy issue. I don't understand why Google requires my
 physical address.

 I disclose my e-mail address and users can contact me. Also I can reply
 to messages that is written
 in review at Google Play.

 If I am working for a company and office address is disclosed in public,
 I do not care for it.
 But do you want to know your home address in public?

 # I sent a feedback about objection for this requirement.

 --
 nagamatu



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


Re: [android-developers] Physical address is required for paid apps or in-app purchases

2014-09-19 Thread Kostya Vasilyev
Not just a blatant privacy violation.

They're putting developers' lives at risk.

Not every developer lives in relatively safe place like the US, or Western
Europe. The world is larger than that, and there are places where criminal
activity is relatively high.

It's quite easy for someone to do the math, multiplying an app's price by
its install count, and then to pay a visit to the developer -- with the
intent of extortion, racket, theft, or other criminal activity.

A PO box won't work for me personally, and Google may not accept them
either.

-- K


2014-09-20 1:00 GMT+04:00 Mark Phillips m...@phillipsmarketing.biz:

 Rent a post office box near where you live. Then call it a suite in your
 address. You can pick up the mail once a week. Not a big deal.

 I completely agree about the privacy issue with using your home address. I
 wouldn't use my home address, nor my private email address.

 Mark
 On Sep 17, 2014 11:24 PM, nagamatu nagam...@gmail.com wrote:

 Dear Android Developers,

 I got the following notification at Google play Developer Console.

 | Add a physical contact address Beginning September 30, 2014, you need
 to add a physical address
 | to your Settings page. After you've added an address, it will be
 available on your app's detail page to
 | all users on Google Play. If your physical address changes, make sure
 to update your information on
 | your Settings page.

 | If you have paid apps or apps with in-app purchases, it's mandatory to
 provide a physical address
 | where you can be contacted. If you don't provide a physical address on
 your account, it may result in
 | your apps being removed from the Play Store.

 I do not want to disclose my home address in public, because I am an
 individual developer.
 This is privacy issue. I don't understand why Google requires my physical
 address.

 I disclose my e-mail address and users can contact me. Also I can reply
 to messages that is written
 in review at Google Play.

 If I am working for a company and office address is disclosed in public,
 I do not care for it.
 But do you want to know your home address in public?

 # I sent a feedback about objection for this requirement.

 --
 nagamatu

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

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


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


Re: [android-developers] Re: Tracking down multiple Activity instances in memory

2014-09-17 Thread Kostya Vasilyev
In my experience, WeakReferences are collected quite aggressively by
Android 2.3 and higher.

Haven't had a problem with non-static inner classes -- I don't think those
are always a memory leak, it all depends on the lifespan duration of the
inner object instances.

I think MAT is a great tool for tracking down stuff. I'm always careful to
force GC in DDMS a few times (monitoring logcat output, until GC collects,
basically, nothing). This makes the picture a lot clearer.

In MAT, I usually start by looking at the object histogram, and applying
filters by my package name or a specific class.

-- K

2014-09-18 1:35 GMT+04:00 Nathan nathan.d.mel...@gmail.com:

 Should WeakReferences prevent garbage collection? I thought they were weak
 because they didn't prevent garbage collection.

 I am seeing that some of the Android classes are holding static
 collections of stuff. I can't see where I am causing that behavior, but I
 keep trying.

 In fact, some of the articles on this topic suggest replacing your
 anonymous inner classes with named, static inner classes that have
 WeakReferences to the outer activity. There are forty of those inner
 classes, with all the clicklisteners and whatnot. It is quite a bit of
 turmoil to change them all, but I may do that.

 All in all, as shown here, these things are often obscure.
 It took me weeks to track down a memory leak caused by Google Analytics
 before I could release my first app.  I believe MAT helped me find the
 crucial evidence.

 Have the rest of you found that following the links, trees, reports, and
 histograms in Memory Analyzer are helpful? it seems like there ought to be
 some clues in there, but I am getting mostly false leads.

 Otherwise I am using Treking's method. Disabling bits of functionality at
 a time.

 Nathan


 On Tuesday, September 16, 2014 5:56:48 AM UTC-7, Streets Of Boston wrote:

 I had a similar issue once and I tracked it down to the View#setTag(int
 key, Object tag) method.
 In my code, setTag was called with a tag value being an object
 holding/referencing an instance that had children referring to children of
 the View on which this setTag was called (tag was a 'ViewHolder'
 instance).

 Certain versions of Android implement setTag using a *static *map of
 WeakRereferences. This caused a View to never get garbage collected, since
 the tag would hold references to its children whose parents would then
 point (all the way up) to that View again. And if a View doesn't get
 garbage collected, its Context (i.e. Activity) would never get garbage
 collected.

 Look if there is anything holding on to your Activity by the virtue of
 other instances being held through incorrect usage of WeakReferences.


 On Wednesday, September 10, 2014 12:00:36 AM UTC-4, Nathan wrote:

 I'm fairly sure I have been able to use the eclipse tools before to
 track down memory leaks - I even found one in Google Analytics.

 But I can't for the life of me figure out.

 I have found out that there are two instances of Activity B in memory
 when the activity is closed. I can see that with

 I know enough to know that that is bad.

 But what I cannot see is WHY. Why is that stupid activity still in
 memory twice?

 I seem to remember that I right click on something and choose Merge Path
 to GC Roots.

 Then I get something like this.


 Class Name
 | Ref. Objects | Shallow Heap | Ref. Shallow Heap | Retained Heap
 
 
 ---
 com.android.internal.policy.impl.PhoneLayoutInflater @ 0x42d2b0d8
 Unknown|1 |   40
 |   536 |64
 '- mPrivateFactory, mContext MyActivity @ 0x42d28230|1
 |  536 |   536 |   127,336
 class com.android.internal.os.ZygoteInit @ 0x41a21a18 System
 Class   |1 |  120
 |   536 | 1,000
 '- mResources android.content.res.Resources @
 0x41aa7108 |1
 |  112 |   536 | 8,512
'- mContext android.app.ContextImpl @ 0x43009398
 |1 |  128 |   536 |10,400
   '- mOuterContext MyActivity @ 0x42d4f008  |1
 |  536 |   536 | 3,864
 
 
 ---

 Well that PhoneLayoutInflater shouldn't be holding on to that context of
 a closed activity, but I don't think I control that.
 And definitely that ZygoteInit thing shouldn't be holding a context in a
 static way, but I don't control that either.

 Any tips on finding the causes better?

 Nathan


 Nathan

  --
 You received this message because you are subscribed to the Google
 

Re: [android-developers] In App Billing - Signature Verification failed.

2014-08-14 Thread Kostya Vasilyev
Or with the just updated Google Play app.
 15 авг. 2014 г. 3:11 пользователь Nathan nathan.d.mel...@gmail.com
написал:

 In addition, I wonder if it has anything to do with this spec:
  Kernel version: 3.4.0-cyanogenmod-g433243c build02@cyanogenmod )

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


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


Re: [android-developers] Re: Pressing Menu button with ActionBar shows an dark overlay

2014-08-11 Thread Kostya Vasilyev
Might be a bug in the 3.* emulator -- you way want to try a 4.1+ emulator
image instead.

And as far as setting your minSdk -- you might set it to 4.0 or better yet,
4.0.3 (API 15).

Android 3.* is virtually non-existent in the wild now, same goes for
4.0.1 - 4.0.2.

-- K



2014-08-11 23:06 GMT+04:00 'RLScott' via Android Developers 
android-developers@googlegroups.com:

 New information:  I just realized that I am unable to demonstrate this
 behavior on anything other than the Eclipse simulator.  That's because I
 don't have any real Android devices that are both Android 3.0 or above and
 have a separate hardware menu button.  The more modern ways of getting at
 the menu function (long press the app switcher button, or tap ActionBar
 overflow icon) all hide themselves when there is no menu to display.  But I
 constructed an Android virtual device in Eclipse by specifying both Android
 3.2 and the hardware menu button.  So maybe this is a non-problem. I don't
 have to worry about Android 3.0 because my app requires 3.0 for other
 reasons.  As long as there are no Android devices with both 3.0 and above
 and a hardware menu key, I think I am OK.

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


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


Re: [android-developers] help with patch 9 image file

2014-07-19 Thread Kostya Vasilyev
Maybe try putting it under drawable-nodpi to avoid scaling?

-- K


2014-07-19 23:45 GMT+04:00 dashman erjdri...@gmail.com:

 I've got a simple .9.png file.

 Trying to create a red background with a 1-pixel gray border.

 My png file is 5x5 pixels

 --B--
 -GGG-
 BGRG-
 -GGG-
 -

 B black
 G gray - hex 99
 R red
 - transparent

 The problem is when the image is displayed - it seems to display
 a gradient - gray from the edges to red in the center.

 I just want a 1 pixel gray border and the red pixel stretched.


 It seems to display as I want on the emulator but on the 4.4 device
 it has this gradient display.

 any help?

 p.s. this is a background to a Button or ImageButton - same behavior.

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


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


Re: [android-developers] ADT/SDK 23 broken on Mac - annotations.jar

2014-07-01 Thread Kostya Vasilyev
Tor,

But the redundant .feature.feature is still there in 23.0.1.

I mean the Eclipse tools.

This is 23.0.1:

com.android.ide.eclipse.ddms.*feature.feature*.group

And this is 22.6.3:

com.android.ide.eclipse.ddms.*feature*.group

So the process of *updating* Eclipse tools from 22 to 23 is still kind of 
awkward.

Is this the intent, or just something that slipped through the cracks this 
time too?

-- K

On Tuesday, July 1, 2014 4:26:10 AM UTC+4, Tor Norbye wrote:

 There were some packaging problems in Tools 23 where proguard and 
 annotations.jar were missing. We've released 23.0.1 to fix that, so invoke 
 the SDK manager and install it (if necessary run Packages  Reload since I 
 think it might cache some results.)

 -- Tor

 On Mon, Jun 30, 2014 at 4:27 PM, Nathan nathan@gmail.com 
 javascript: wrote:

 I do not even know if I am having the same problems as others. 

 I downloaded the combined bundle. This was after Eclipse told me that I 
 needed to update my ADT, but wouldn't let me do it. Something in the fine 
 print led me to believe I need a new eclipse.  

 So I installed the adt-bundle-mac-x86_64-20140624.

 Then Facebook SDK won't load because its looking for. 

 /adt-bundle-mac-x86_64-20131030/sdk/tools/support/annotations.jar. 

 Nowhere available for me to change where it looks for it, and suggestions 
 I found on the internet of what to put there did not result in resolving 
 any symbols. 

 Can anyone give advice on what to do next?


 Nathan




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


Re: [android-developers] ATTN all developing on Mac OS X: need working SDK/ADT

2014-06-29 Thread Kostya Vasilyev
2014-06-30 2:11 GMT+04:00 Jim Graham spooky1...@gmail.com:


 On Mon, Jun 30, 2014 at 12:18:17AM +0300, Harri Sm?tt wrote:
 
  Removing the existing ADT Plugin from Software Sites in preferences -
  then adding it back using Install New Software - finally let me upgrade
  ADT to the latest version though. This could help you too.

 What did you add back and how (i.e., what URL)?  I have version 21 of the
 ADT, which pre-dates this whole insanity on my drive, but I tried that
 yesterday, and Eclipse still inslsted that it had 22.6 (which I removed
 from the Eclipse directory).



I was able to recover my broken (by the Platform L preview / tools 23)
Eclipse install by doing essentially the same

... but without having to remove and add back the download site URL, or
uninstalling ADT 22 as a separate step.

This is what worked for me:

1 - Brought up Help - Install new software

2 - In the work with dropdown, selected Android.

The download site for that is (should be listed in the dropdown)

Android - https://dl-ssl.google.com/android/eclipse

3 - The large area below showed the new (23.0.*) tools.

4 - Selected everything, unselected Android Native Development Tools,
since I didn't have those installed

5 - Pressed Next

6 - And finally -- Eclipse offered to *replace* the already installed ADT
tools 22 with new tools 23.

I suppose if native tools version 22 are already installed, then step 4
should be skipped, but that's not my configuration.

Hope this helps.

-- K



  But at the end I decided to re-install Eclipse with the latest version
  from scratch. Seriously.. Indigo, why?

 To quote an old saying (poor English and all), Don't fix it if it ain't
 broke.

 Of course, now, it's not just Eclipse that's brokwn, it's my procmail
 filters, too.  WTH is going on?  This past week has been one issue
 after another, and it's getting REALLY old.

 Thanks,
--jim

 --
 THE SCORE:  ME:  2  CANCER:  0
 73 DE N5IAL (/4)  | AN EXCERCISE is a situation in which you stop
 what
 spooky1...@gmail.com  | you're doing in order to simulate doing what
 you
  Running Mac OS X Lion  | were doing so you can show someone else that
 you
 ICBM / Hurricane: | can simulate what you were doing as well as you
30.44406N 86.59909W| were doing it before you were interrupted.



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


[android-developers] Android Preview L and splitActionBarWhenNarrow

2014-06-28 Thread Kostya Vasilyev
Did anyone else playing with Preview L notice their 
splitActionBarWhenNarrow application attribute not working, when using the 
Material theme?

I wonder if this is an accidental bug, or a intentional change (given that 
Google's own apps seem to not be using a split action bar these days)?

-- K

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


Re: [android-developers] Strange Eclipse problems

2014-06-27 Thread Kostya Vasilyev
Might be related to this:

https://plus.google.com/111661559774274998746/posts/FSqUAwwikBd

The comment by Joe Rogers

Basically, the 23 version of ADT has wrong package name.

-- K


2014-06-27 23:55 GMT+04:00 Jim Graham spooky1...@gmail.com:

 I'm running Eclipse (Indigo), and am seeing some errors I've never seen
 before...hoping someone here can help me get past these.

 First, when I open Eclipse, it complains that This SDK (WHICH SDK???)
 requires ADK version 3.0, and I only have 2.6 installed.  Fine.  I'll
 install 3.0.

 When I try to install 3.0, it starts trying to, and then gives me this
 warning message (blank lines added for readability):

   Cannot complete the install because of a conflicting
   dependency.  Software being installed: Android Development
   Tools 23.0.0.1245622

   (com.android.ide.eclipse.adt.feature.feature.group
   23.0.0.1245622) Software currently installed: Android
   Development Tools 22.6.1.v201403111859-1066720

   (com.android.ide.eclipse.adt.feature.group
   22.6.1.v201403111859-1066720) Only one of the following can
   be installed at once: ADT Package
   22.6.1.v201403111859-1066720

   (com.android.ide.eclipse.adt.package
   22.6.1.v201403111859-1066720) ADT Package 23.0.0.1245622

   (com.android.ide.eclipse.adt.package 23.0.0.1245622) Cannot
   satisfy dependency: From: Android Development Tools
   23.0.0.1245622

   (com.android.ide.eclipse.adt.feature.feature.group
   23.0.0.1245622) To: com.android.ide.eclipse.adt.package
   [23.0.0.1245622] Cannot satisfy dependency: From: Android
   Development Tools 22.6.1.v201403111859-1066720

   (com.android.ide.eclipse.adt.feature.group
   22.6.1.v201403111859-1066720) To:

   com.android.ide.eclipse.adt.package
   [22.6.1.v201403111859-1066720]

 So basically, I have ADT 2.6, which Eclipse doesn't like---it wants 3.0.
 But it won't install 3.0 because I have 2.6.

 Finally, when I try to create a new project (getting started with
 AndEngine and a tutorial), the New Android Application screen keeps
 griping that A package name cannot start or end with a dot.  The
 thing is, it doesn't start or end with a dot.  WTFO?

 Is it just me, or has this been a really bad week for everyone?

 Oh, FWIW, as a side note, I tried importing AndEngine into Android
 Studio, too.  Android Studio, however, insisted (couldn't find the option
 to stop this) on using Gradle for a non-Gradle project.  I no doubt
 missed some tiny check-box somewhere, but I definitely couldn't see it.
 Can anyone point me to that checkbox to import a non-Gradle project
 without trying to apply Gradle?

 Thanks,
--jim

 --
 THE SCORE:  ME:  2  CANCER:  0
 73 DE N5IAL (/4)  | AN EXCERCISE is a situation in which you stop
 what
 spooky1...@gmail.com  | you're doing in order to simulate doing what
 you
  Running Mac OS X Lion  | were doing so you can show someone else that
 you
 ICBM / Hurricane: | can simulate what you were doing as well as you
30.44406N 86.59909W| were doing it before you were interrupted.

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


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


Re: [android-developers] Setting/Determining size of PopupWindow based on contents.

2014-06-24 Thread Kostya Vasilyev
Yes.

You can use different MeasureSpec values depending on what you actually
need (e.g. staying within a certain width).

-- K



2014-06-24 7:23 GMT+04:00 Nathan nathan.d.mel...@gmail.com:

 Is this the idea?

 int widthSpec = MeasureSpec.UNSPECIFIED;
 int heightSpec = MeasureSpec.UNSPECIFIED;
 mContentView.measure(widthSpec, heightSpec);

 int W = mContentView.getMeasuredWidth();
 int H = mContentView.getMeasuredHeight();

 Doing that, I get actual values for width and height, which is good.


 Nathan

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


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


Re: [android-developers] Setting/Determining size of PopupWindow based on contents.

2014-06-23 Thread Kostya Vasilyev
Just measure the popup's content view by calling contentView.measure with
the appropriate MeasureSpec objects.

Add padding from the popup's background, if appropriate.

Viola!

You have the exact size in pixels to use as the popup window's width and
height.

Some sample code from the framework itself:

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/ListPopupWindow.java#1009

-- K


2014-06-24 1:50 GMT+04:00 Nathan nathan.d.mel...@gmail.com:

 I brought this up years ago.

 https://groups.google.com/forum/#!topic/android-developers/hZk5YYsmv_4

 I want to either set or determine the size of the popupwindow.

 Is it still impossible?

 The size is not a constant.

 If I call
 mContentView.getWidth();
 The first time it is zero.
 The second time it is not zero, but is likely the size it was last time,
 but it could be a different size the second time.

 In the thread in 2010, there was a solution to set the size based on the
 anchorview, but no based on the contents of the popupwindows view.


 Nathan

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


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


Re: [android-developers] Recursive Activities - not possible?

2014-06-18 Thread Kostya Vasilyev
How about:

onBackPressed() {

File newDirectory = mCurrentDirectory.getParentFile();
if (newDirectory != null) {
mCurrentDirectory = newDirectory;
reloadFileList(mCurrentDirectory);
}

}

-- K


2014-06-18 23:16 GMT+04:00 'RLScott' via Android Developers 
android-developers@googlegroups.com:

 I need to implement a File Explorer as an activity within my app.  One of
 the functions of such an activity is the ability to recursively navigate up
 and down the directory tree.  I was planning on doing that by having the
 current instance of the File Explorer start another instance of the File
 Explorer when then the user taps on a directory entry.  I was going to have
 each instance storing its place in the tree (as a path name) so that I
 could pop this stack all the way to the beginning.  But then I remembered
 the Activity life cycle, and the fact that Android can destroy any activity
 that is not visible.  So that would trash my stack, if the stack was stored
 as instance data for each instance of the File Explorer.  Do I have that
 right?  And if so, what is a preferable way to manage a stack of nested
 instances of a File Explorer activity?

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


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


Re: [android-developers] Re: Fragment animations using objectAnimator to slide over the previous fragment

2014-06-06 Thread Kostya Vasilyev
2014-06-06 19:12 GMT+04:00 Simon Giddings mr.s.giddi...@gmail.com:

 Thanks for this Harri,

 Tried it, to no avail.
 In fact, what I have found is that the new fragment, when it is animated
 in, comes in *under* the existing fragment.
 What I need is for it to be inserted *over* or *before* the existing
 fragment.
 Cannot see how to do  this.


Views (child views), by default, are drawn in same order as in their
parent's child view list.

Or you can use this:

http://developer.android.com/reference/android/view/ViewGroup.html#getChildDrawingOrder(int,
int)

Maybe there are other ways...




 Not too happy about ViewPager as it is in the support library - which for
 me means that it is not stable code, at least not as stable as system code.


The support library gets more frequent updates than system code on most
actual devices out there -- not to mention it doesn't get mangled by the
OEMs.

-- K




 Any other thoughts ?


 On Friday, 6 June 2014 15:16:22 UTC+2, Harri Smatt wrote:

 Hmm.. Maybe I misunderstood the problem but does it help if you simply
 use non-transparent Fragment background colour?
 On Jun 6, 2014 2:14 PM, Simon Giddings mr.s.g...@gmail.com wrote:

 Thanks for your suggestion.
 No, you are right, I have not considered this as yet (didn't know I
 could to be honest).
 I'll look into this option, unless anyone else has already done this and
 could share here ?

 On Friday, 6 June 2014 10:10:44 UTC+2, Doug wrote:

 I have not thought through this myself thoroughly, but have you
 considered using a FragmentPagerAdapter with a ViewPager?

 Doug

 On Thursday, June 5, 2014 11:41:02 AM UTC-7, Simon Giddings wrote:


 I have seen the kind of effect I want being demonstrated with the
 ViewPager
 http://developer.android.com/training/animation/screen-slide.html#depth-page
 - but I am using Fragments.
 Can this kind of transition (just the moving in from the left bit
 shown at the end) be achieved with fragment animation ?



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


Re: [android-developers] Re: Share Loader's data between multiple fragment

2014-06-04 Thread Kostya Vasilyev
Couldn't you abstract the different ways of loading data inside the loader?

...and pass some sort of unique data ID to each fragment to identity the
data, but not the actual way of obtaining it (network, content provider,
etc.).

Then you'd be able to package this ID into each fragment's arguments,
leveraging the framework's persistence mechanism for orientation changes,
activity re-creation, etc...?

-- K


2014-06-04 20:03 GMT+04:00 Nathan Barraille nathan.barrai...@gmail.com:

 Yeah, I guess I can do that, but if I do I need to write custom code for
 retaining the arguments across instance change, which I would have liked
 the framework to be able to do for me, as described here:
 https://groups.google.com/forum/#!topic/android-developers/bCc5tjOHQ1o


 On Wed, Jun 4, 2014 at 8:47 AM, MathieuB blanc...@gmail.com wrote:

 Like Doug said. That's sort of how i'm doing it and had no problem.

 So #2 kind of.

 Here's my onLoadFinished :

 @Override
 public void onLoadFinished(LoaderArrayListTour loader,
 ArrayListTour data) {

 CatalogTabFeatured featuredFragment = (CatalogTabFeatured)
 getSupportFragmentManager().findFragmentByTag(makeFragmentName(mViewPager.getId(),
 0));

 featuredFragment.setData(data);


 CatalogTabRecents recentsFragment = (CatalogTabRecents)
 getSupportFragmentManager().findFragmentByTag(makeFragmentName(mViewPager.getId(),
 1));

 recentsFragment.setData(data);

  CatalogTabRated ratedFragment = (CatalogTabRated)
 getSupportFragmentManager().findFragmentByTag(makeFragmentName(mViewPager.getId(),
 2));

 ratedFragment.setData(data);

 }

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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 a topic in the
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/rFQDqknx8VM/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 android-developers+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/d/optout.


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


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


Re: [android-developers] Custom preference entry

2014-05-31 Thread Kostya Vasilyev
I highly recommend looking in the android-sdk directory under
platforms/platform-N/data/res. This is where you can find the layouts /
styles / etc. used by the platform itself.

I find styles.xml, themes.xml and attrs.xml to be the most useful. Many of
those styles / attributes / layouts can be referenced from applications.

-- K



2014-05-31 19:35 GMT+04:00 dashman erjdri...@gmail.com:

 Thanks.

 I'd like my custom preference style to look similar to the built-in ones.

 How can I find out about the text styles for the title, sub-title
 background color etc.

 Thanks.



 On Friday, May 30, 2014 6:57:09 PM UTC-4, TreKing wrote:

 http://developer.android.com/guide/topics/ui/settings.html#Custom


 On Fri, May 30, 2014 at 5:17 PM, dashman erjd...@gmail.com wrote:

 Is it possible to create a custom layout entry/row

 - i'd like a togglebutton + an imagebutton on the same preference row.


  --
 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+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/d/optout.




 --

 
 -
 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
 ---
 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/d/optout.


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


Re: [android-developers] Navigation Drawer Icon Theme/Color?

2014-05-23 Thread Kostya Vasilyev
You'll need to copy the source code for ActionBarDrawerToggle.java into
your project, possibly renaming (I forget if it somehow gets wired into the
action bar automagically or has to be done from application code).

Make changes to how the constructor initializes mDrawerImage, applying
color tint.

PS - I highly recommend this Chrome extension to look up Android source
code:

https://chrome.google.com/webstore/detail/android-sdk-search/hgcbffeicehlpmgmnhnkjbjoldkfhoin

-- K



2014-05-23 21:03 GMT+04:00 Kevin Kovach kov...@gmail.com:

 Yes, I'm currently using this class. The problem is that it loads a
 drawable, which I do not know how to apply a tint to.  There could be
 something that I'm missing, but I've not found a way yet.

 - Kevin


 On Thursday, May 22, 2014 5:51:39 PM UTC-4, Kostya Vasilyev wrote:

 This is the class responsible for that pedestrian crossing icon:

 https://developer.android.com/reference/android/support/v4/
 app/ActionBarDrawerToggle.html

 It's in the support library. The code as it is just loads an image from a
 resource resource, but should be easy to change to apply a color tint.

 -- K


 2014-05-23 0:25 GMT+04:00 Kevin Kovach kov...@gmail.com:

 We're trying to theme an app that uses a navigation drawer and I want to
 be able to tint/color the icon for the navigation drawer with an @color.
  For the life of me I cannot find any information or hints on how to
 accomplish this.  I would really appreciate any hints on doing this.
  Thanks.

 - Kevin

 --
 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+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/d/optout.


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


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


Re: [android-developers] Re: WrongThread exception - how to analyze/debug?

2014-05-23 Thread Kostya Vasilyev
2014-05-24 0:05 GMT+04:00 plnelson pna...@gmail.com:



 On Wednesday, May 21, 2014 12:23:32 PM UTC-4, Kostya Vasilyev wrote:



 Is there more to the message? I grepped the base framework, and came up
 with these:


 The entire message is CalledFromWrongThreadException: Only the original
 thread that created a view hierarchy can touch its views

 And it's widely discussed on places like Stack Overflow but the focus of
 the dicscussions is always on fixing the bug,


Fixing the bug should ultimately be your goal, no?


 whereas I'm posting this to the Google group instead of Stack Overflo0w
 because I want to *understand* what it actually *means*.   What do they
 mean by the wrong thread?


The view hierarchy should only be touched from the UI thread that's
created for you by Android (labeled main thread in Eclipse).

Now, some view methods may have checks for this, and some may not (in fact,
the vast majority does not).


 If the same thread (based on the debugger and trace) is accessing it when
 it generates the exception and when it doesn't, how does that thread become
 the wrong thread?   Where does Google document its exceptions?


http://developer.android.com/guide/components/processes-and-threads.html

Additionally, the Andoid UI toolkit is *not* thread-safe. So, you must not
manipulate your UI from a worker thread—you must do all manipulation to
your user interface from the UI thread. Thus, there are simply two rules to
Android's single thread model:

   1. Do not block the UI thread
   2. Do not access the Android UI toolkit from outside the UI thread




 *And what does the Eclipse debugger thread nomenclature ( Thread x[
 Thread-y] ) mean?*

 The Eclipse debugger seems to refer to a thread 9 and a thread 10.   What
 does the debugger mean when it displays it that way?


 They're just thread ids (the x) and auto-generated thread names.


 Yes, I know, but why are there *two* of them on one line?  That's my
 question.  Normally I see one TID per line, so what is Eclipse telling us
 when it uses *Thread x[ Thread-y] syntax?*


I really don't know. Looks like the name is assigned based on thread id,
but does not use the thread id directly -- maybe some little piece of code
with own counter, etc.

But if this discussion is to be focused on only the original thread can
touch the view hierarchy -- you should not be touching views from any
thread other than the main UI thread, and that one is clearly labeled in
Eclipse as Thread [1 main].

Hope I didn't make it completely nonsensical.

-- K

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


Re: [android-developers] Navigation Drawer Icon Theme/Color?

2014-05-22 Thread Kostya Vasilyev
This is the class responsible for that pedestrian crossing icon:

https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.html

It's in the support library. The code as it is just loads an image from a
resource resource, but should be easy to change to apply a color tint.

-- K


2014-05-23 0:25 GMT+04:00 Kevin Kovach kov...@gmail.com:

 We're trying to theme an app that uses a navigation drawer and I want to
 be able to tint/color the icon for the navigation drawer with an @color.
  For the life of me I cannot find any information or hints on how to
 accomplish this.  I would really appreciate any hints on doing this.
  Thanks.

 - Kevin

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


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


Re: [android-developers] Is there any functionality difference between ViewTreeObserver.removeOnGlobalLayoutListener() and .removeGlobalOnLayoutListener()?

2014-05-22 Thread Kostya Vasilyev
Looks like it was just renamed in API 16 for consistency.

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/view/ViewTreeObserver.java


   1. @Deprecated
   2. public void removeGlobalOnLayoutListener(OnGlobalLayoutListener victim
   ) {
   3. removeOnGlobalLayoutListener(victim);
   4. }
   5.


-- K


2014-05-23 1:33 GMT+04:00 Sheng-Dean littledot5...@gmail.com:

 The ViewTreeObserver class has 2 methods:

  removeOnGlobalLayoutListener()  removeGlobalOnLayoutListener().

 I went on GrepCode and diff-ed every version and couldn't find any
 functionality difference other than the name change.

 Is there any functionality differences between these two methods?
 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
 ---
 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/d/optout.


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


Re: [android-developers] Re: WrongThread exception - how to analyze/debug?

2014-05-21 Thread Kostya Vasilyev
2014-05-21 20:02 GMT+04:00 plnelson pna...@gmail.com:

 On Tuesday, May 20, 2014 11:51:35 PM UTC-4, Jonathan S wrote:

 Can you copy and paste code in the *MyRemoteActivity class?*


 It's 700 lines of (mostly proprietary) code, so no I don't think that
 would be practical.Anyway,* my questions are generic Android
 questions*; they're not specific to the code:   I'm not asking for anyone
 to debug this for me; I'm just trying to understand more so I can debug it
 myself.

 1. * If it's the wrong thread then why does the stack trace show the same
 thread in the cases where it crashes and where it doesn't?*
 ...in other words what does Android mean by wrong thread?  If the
 debugger shows it executing in the same thread when it's not crashing as
 when it lands in the catch block with the wrong thread then what exactly
 do they mean by wrong thread?


Is there more to the message? I grepped the base framework, and came up
with these:

./core/tests/coretests/src/android/widget/focus/RequestFocusTest.java:
 // Test that a requestFocus from the wrong thread fails.
./core/tests/coretests/src/android/widget/focus/RequestFocusTest.java:
   fail(requestFocus from wrong thread should raise exception.);
./opengl/java/android/opengl/ManagedEGLContext.java:throw new
IllegalStateException(Called on wrong thread);
./opengl/java/android/opengl/GLErrorWrapper.java:
 OpenGL method called from wrong thread.);

Two of these are in tests.




 *And what does the Eclipse debugger thread nomenclature ( Thread x[
 Thread-y] ) mean?*
 The Eclipse debugger seems to refer to a thread 9 and a thread 10.   What
 does the debugger mean when it displays it that way?


They're just thread ids (the x) and auto-generated thread names.

When you debug in Eclipse, you should see other threads with more
meaningful names, e.g. main, Binder_x, etc.

You can assign names to your threads by calling Thread.setName. Personally,
I find it very useful for debugging and postmortem crash reports:

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




 *What are some good strategies for analyzing wrong thread bugs? *
 Just that -  what tools or strategies are recommended to see what code is
 executing in which threads - how do experienced Android programmers debug
 these kinds of exceptions?


Not sure I qualify as an experienced Android programmer, but...

...

From your original description (I snipped it, it was below), it seems you
have some code that runs on a worker thread, and yet is placed in a file
called MyRemoteActivity.

There is nothing wrong with naming source files anything you wish, but ---
is that actually an Android activity?

Are you sure the code in that file, that runs on a non-main thread, does
not make any calls to Android UI code?

Conversely, your code should not be making networking calls on the main
thread. You can use StrictMode to log such events:

http://developer.android.com/reference/android/os/StrictMode.html

And going back to your original message again:

the other one is the main thread that handles all the usual View stuff

Do you mean the main Android thread that get pre-created for you, or do
you mean there is a different thread that your code creates (and which
you're calling main) that interacts with the Android UI framework?

You should only call Android UI framework methods from the main thread
that gets pre-created for you by Android, that's the thread on which all
component callbacks are called (onCreate, etc.).

-- K

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


Re: [android-developers] Re: position value in getView seems too big

2014-05-16 Thread Kostya Vasilyev
The value returned by AdapterView.getCount is cached.

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/AdapterView.java#580

It's also updated after you've called notifyDataSetChanged:

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/AdapterView.java#794

The preceding call chain is:

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/BaseAdapter.java#45

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/database/DataSetObservable.java#30

I's also updated in a few other places (e.g. ListView.onMeasure), but the
right way to notify a list view about changed underlying data in an adapter
is notifyDataSetChanged.

-- K



2014-05-16 23:03 GMT+04:00 plnelson pna...@gmail.com:



 There's a lot of proprietary code in the adapter; I'll see if I can
 whittle it down to something simple but meanwhile I'd like to pursue the
 listview's strange getCount result.   Because that's a separate question
 from the getView()'s position value (maybe) I've started a separate thread
 focusing on that:
 https://groups.google.com/forum/#!topic/android-developers/Lx9_3H4RkhM

 This seems to have stumped them on Stack Overflow and I've never been able
 to get a clear description of where *exactly* the value in ListView's
 getCount() actually come from.


 On Friday, May 16, 2014 2:39:54 PM UTC-4, Streets Of Boston wrote:

 That is hard to figure out without you posting the code of your adapter
 and how you create an instance of your adapter. It is probably a subtle
 bug...


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


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


Re: [android-developers] RelativeLayout issue

2014-05-11 Thread Kostya Vasilyev
Yep: a child with alignParentRight / alignParentBottom will cause the
parent (the RelativeLayout) to stretch to the entire width / height of
*its* parent.

-- K


2014-05-11 17:05 GMT+04:00 Piren gpi...@gmail.com:

 I've come across something like that before. RelativeLayouts do not like
 their children doing something like that (or asking to be aligned to the
 right/bottom).

 Just use a size variable for both the parent and child (see
 dimensions.xml), will save you the headache understanding android's layout
 mechanism.


 On Sunday, May 11, 2014 3:37:09 PM UTC+3, dashman wrote:

 android:layout_alignParentLeft=true
 android:layout_alignParentRight=true


 No changes - still the full width of the parent View (not layout)



 On Saturday, May 10, 2014 9:06:10 PM UTC-4, TreKing wrote:


 On Sat, May 10, 2014 at 6:57 PM, dashman erjd...@gmail.com wrote:

 Shouldn't the width of the button be 60dp -
 since i've set the width of the button to match-parent - and it's set
 to 60dp in the layout.

 It's actually taking up the full width of the parent view - not layout.


 You'd think, right?

 To achieve what you're looking for, try setting both align_parentLeft
 and align_parentRight

 
 -
 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
 ---
 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/d/optout.


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


Re: [android-developers] Activity Back Stack and OutOfMemoryError

2014-05-09 Thread Kostya Vasilyev
2014-05-09 16:59 GMT+04:00 Daniel Rindt daniel.ri...@gmail.com:

 2014-05-09 0:12 GMT+02:00 Kostya Vasilyev kmans...@gmail.com:
  Are you absolutely sure that your code does not leak memory?

 How to be absolutely sure. :-) Just kidding.

  Have you tried using Eclipse MAT and putting the app through the usual
  paces, like rotating the screen, pausing / restarting, etc.?

 This i have done:
 * app started, before killed
 * dump hprof and load with mat (leak suspects)
 * rotate, rotate, rotate...
 * dump hprof again load with mat (leak suspects)

 i compared the mat reports with the suspects and i see no differences in
 the
 leak suspects report. Which sould differ in the occupied size when i am
 not
 wrong?


Well, personally, I usually use the object histogram at the starting point
-- filtered by my app's package.

When I see something that looks strange, I right click on a object class
and do merge shortest paths to object roots to investigate.

That's just me -- I've not used leak suspects -- but maybe you'd be able
to see something interesting in the histogram?



  You'd mentioned the app being heavy on image processing -- is your memory
  allocation strategy based on how much memory your app's process gets? You
  can use ActivityManager#getMemoryClass for that.

 Actually i am aware of this complicated and consequences so i use the
 universal image loader which is configured to scale the images exact in the
 bitmap which cost cpu time, but preserves memory.


That's a well known library, but I guess it still needs to be configured in
a way that makes sense for your app's flow.



  It's too bad that your log does not have any memory allocation data. I'd
  consider implementing a crash handler that logs to a file, recording
 things
  like:
 
  Debug.getNativeHeapAllocatedSize()
  Debug.getNativeHeapFreeSize()
  Runtime.getRuntime().maxMemory()
  Runtime.getRuntime().totalMemory()
  Runtime.getRuntime().freeMemory()
  ActivityManager.getMemoryClass()

 I am new to the memory thing, and it doesn't happen a lot. It happens
 mostly on a rare ressource device.


You can create an emulator image with lowered per-process memory quotas.
Don't know if it actually works the way it's supposed to, but the setting
is there.


 But question again starting lots of
 activities
 where you can go back should not be the issue? If the activity itself
 isn't leaking
 anything it can be gc'ed? The backstack just fire the intent again?


There have been a few discussions on this list about it -- with no clear
answer that I can remember. This should be fairly easy to verify in the
debugger.

Maybe you can use the lifecycle callbacks (onStop / onStart) to release
some memory?

-- K

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


Re: [android-developers] Activity Back Stack and OutOfMemoryError

2014-05-09 Thread Kostya Vasilyev
2014-05-09 18:37 GMT+04:00 Daniel Rindt daniel.ri...@gmail.com:

 2014-05-09 15:53 GMT+02:00 Kostya Vasilyev kmans...@gmail.com:
  Well, personally, I usually use the object histogram at the starting
 point
  -- filtered by my app's package.
 
  When I see something that looks strange, I right click on a object class
 and
  do merge shortest paths to object roots to investigate.
 
  That's just me -- I've not used leak suspects -- but maybe you'd be
 able
  to see something interesting in the histogram?

 I tried what you said, but please tell me what i can recognize as
 strange?
 I don't find a definitve guide to find a leak. I can't really see any
 weird thing.


Well, I usually look at instance counts of large objects that act as
allocation roots (e.g. allocate and own lots of other objects). In my case,
they're fragments (more or less) and activities.

For you app, you may want to dump total memory used by the image loader /
cache -- although MAT won't help here.


 The only conclusion i come to is that every new opened activity consumes
 more heap and i have the feeling that this causes the oom.


An activity instance is not that heavy by itself -- but in your app, sounds
like it also owns a fair amount of bitmap data.


  That's a well known library, but I guess it still needs to be configured
 in
  a way that makes sense for your app's flow.

 I've set it for now just to preserve memory.


Well, that sounds like a nice magic switch but personally, I would verify
what actually happens to memory allocations.

For example, would this library, with this setting, be able to get rid of
in-memory bitmaps used by stopped activities?

In ImageViews still attached to the content of their respective activities?


  There have been a few discussions on this list about it -- with no clear
  answer that I can remember. This should be fairly easy to verify in the
  debugger.
 
  Maybe you can use the lifecycle callbacks (onStop / onStart) to release
 some
  memory?

 You mean set collections to null?


Yes, that sort of thing, and verifying that it actually did something (I'd
trigger GC in DDMS a few times, until it reaches a stable point).

-- K

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


Re: [android-developers] Activity Back Stack and OutOfMemoryError

2014-05-08 Thread Kostya Vasilyev


On Friday, May 9, 2014 1:23:12 AM UTC+4, Daniel Rindt wrote:

 2014-05-08 17:52 GMT+02:00 Krishna Mahadik 
 krishna...@gmail.comjavascript:: 

  Increase memory allocated to process bitmap. 
  
  Chunk of code will be more helpful to understand what problem exactly 
 you 
  are facing. 

 Thanks for your reply, have a look where the error is happen: 
 java.lang.RuntimeException: Unable to start activity 
 ComponentInfo{android/com.android.internal.app.ChooserActivity}: 
 android.view.InflateException: Binary XML file line #26: Error 
 inflating class unknown 

 This is not my code. It seems the process from the app consumes much 
 memory and by invoking the chooser its not able to inflate the layout. 
 The resulting question is what can i do to prevent such errors? 


Are you absolutely sure that your code does not leak memory?

Have you tried using Eclipse MAT and putting the app through the usual 
paces, like rotating the screen, pausing / restarting, etc.?

You'd mentioned the app being heavy on image processing -- is your memory 
allocation strategy based on how much memory your app's process gets? You 
can use ActivityManager#getMemoryClass for that.

It's too bad that your log does not have any memory allocation data. I'd 
consider implementing a crash handler that logs to a file, recording things 
like:

Debug.getNativeHeapAllocatedSize()
Debug.getNativeHeapFreeSize()
Runtime.getRuntime().maxMemory()
Runtime.getRuntime().totalMemory()
Runtime.getRuntime().freeMemory()
ActivityManager.getMemoryClass()

-- K

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


Re: [android-developers] Re: fromHtml doesn't work for textview font size, any help?

2014-04-09 Thread Kostya Vasilyev
Html.fromHtml also understands header tags, from h1 to h6. The respective
relative sizes are:

private static final float[] HEADER_SIZES = {
1.5f, 1.4f, 1.3f, 1.2f, 1.1f, 1f,
};

-- K



2014-04-09 23:22 GMT+04:00 jraanamo jukka.raan...@gmail.com:

 As far as I can see, when converting from HTML string into spannable, only
 color and face are supported (this is with Android 4+ at least). Converting
 the otherway (Html.toHtml) adds more attributes like size. To control the
 size from HTML you are limited to big and small or add your own tag and
 implement Html.TagHandler. Remember that you can set the base text size
 of the TextView and then use big and small to go +/-.

 On Wednesday, 29 December 2010 15:41:02 UTC+2, genxsol wrote:

 Hi Dear,

 i am trying to put text on a text view with different size for each
 word

 textView.setText(Html.fromHtml(font size='10' color='red' Word1 /
 font font size='15' color='white' Word2 /font)));

 color does work but no font size, any help plz

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


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


Re: [android-developers] Creating public files

2014-04-08 Thread Kostya Vasilyev
This is a nice unofficial write-up:

http://www.androidpolice.com/2014/02/17/external-blues-google-has-brought-big-changes-to-sd-cards-in-kitkat-and-even-samsung-may-be-implementing-them/

-- K


On Tuesday, April 8, 2014 2:46:47 PM UTC+4, Enrique López Mañas wrote:

 The best reference is probably the Android Developers section about the 
 storage options.

 http://developer.android.com/guide/topics/data/data-storage.html


 2014-04-08 12:41 GMT+02:00 info.skt...@gmail.com javascript: 
 info.skt...@gmail.com javascript::

 I have been away from developing for a while and have lost track of the 
 changes that have been made in file access rules.
 It used to be that the WRITE_EXTERNAL_STORAGE permission gave full access 
 to create public files.
 When my Note 3 was updated to KitKat my app lost the ability to write to 
 the external SD card.

 My app regularly creates or modifies files to the external storage 
 device.  I want these to be public, that is any app can get to them and I 
 can modify them when I connect the phone to the computer using USB.

 Is there a good reference to describe the new access rules and how I can 
 accomplish this?

 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-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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 javascript:.
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Enrique López Mañas

 *Twitter:* http://twitter.com/eenriquelopez
 *Google+:* http://goo.gl/1PLi2a
 *Phone:* +34 655 155 199(ES)
 +49 157 84281461 (DE)
 *Site:* http://www.lopez-manas.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 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/d/optout.


Re: [android-developers] Re: Rating Hijacking !

2014-03-26 Thread Kostya Vasilyev
2014-03-26 22:28 GMT+04:00 Jose_GD jose.gonzale...@gmail.com:

 Any news regarding this issue?

 I don't know if I didn't pay attention before or if it's a brand new
 feature of the Play app. Now you can rate an app immediately after tapping
 Install (or Buy), *before* the install completes! How can you have an
 opinion for an app you actually didn't use at all?


Haven't you heard about Google Mindreader -- part of the latest Play
Services update?

Sorry, could not resist :)

PS - that's a very nice looking widget.

-- K



 No wonder my app 3 months ago had a 4.4 rate and now has a 4.16 rate. And
 the last update was 4 months ago...

 Thanks for any clues

 José

 https://play.google.com/store/apps/developer?id=Jos%C3%A9+Gonz%C3%A1lez+D%27Amico



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


Re: [android-developers] ContentProvider contains dirty data from a previous JUnit test

2014-02-23 Thread Kostya Vasilyev
I think you're seeing normal Unix (and Linux) file system semantics, with
respect to deleting a file that's currently open. This unlinks the name
from the underlying file system, but the file itself continues to stay
open, and has same content as before unlinking -- until the process that
has the file open terminates.

So, if you're going to execute both tests in one run, you need a way to
reset the database some other way.

One method would be to ensure that the CP closes the database before
deleting the files (then reopens).

Another would be to delete all data (DELETE FROM tablename).

Yet another would be to drop all tables (and to re-create them).

In any case, you'll need a way for your test code to trigger this code
inside the CP.

One way to do this would be to create a special purpose content:// URI and
call it from the test code (and the CP would recognize it and reset its
data using one of the methods above).

-- K



2014-02-24 1:33 GMT+04:00 Code Guru codegur...@gmail.com:

 In this case, I am testing the activities of my app with
 ActivityInstrumentationTestCase2. (I also have tests for the
 ContentProvider using ProviderTestCase2.) The two tests that I outlined
 earlier are for the data entry activity. I want to verify that the data
 entered is inserted into the underlying database. The Activity inserts the
 data via `getContentResolver.insert()`. The test case then opens the
 database directly to assert that the data is there. How would I use a
 MockContentProvider and/or other mock objects to perform this kind of
 testing?

 On Sun, Feb 23, 2014 at 12:29 PM, Danny D daniel.m.dev...@gmail.comwrote:

 As I read your reply, I'm confused now about what's being tested.  Are
 you testing the ContentProvider or the Activity?  If testing the Activity,
 it may be better to create a MockContentProvider that's responsible for
 providing back the info.  If testing the ContentProvider, skip the Activity
 and use an Application test case, as you get direct control of when its
 created or destroyed.

 Sometimes its hard to do, but the goal in testing is to isolate the
 components and build known conditions around 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
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/oOCF2V8tf90/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 android-developers+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.




 On Sun, Feb 23, 2014 at 12:29 PM, Danny D daniel.m.dev...@gmail.comwrote:

 As I read your reply, I'm confused now about what's being tested.  Are
 you testing the ContentProvider or the Activity?  If testing the Activity,
 it may be better to create a MockContentProvider that's responsible for
 providing back the info.  If testing the ContentProvider, skip the Activity
 and use an Application test case, as you get direct control of when its
 created or destroyed.

 Sometimes its hard to do, but the goal in testing is to isolate the
 components and build known conditions around 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
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/oOCF2V8tf90/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 android-developers+unsubscr...@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+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 

Re: [android-developers] External Storage lockout in 4.4 update on some Samsung devices.

2014-02-20 Thread Kostya Vasilyev
Is it maybe same issue as described below?

http://www.androidpolice.com/2014/02/17/external-blues-google-has-brought-big-changes-to-sd-cards-in-kitkat-and-even-samsung-may-be-implementing-them/

The documentation you quoted talks about
android.permission.READ_EXTERNAL_STORAGE, and then you went on to write
that your app has always had WRITE_EXTERNAL_STORAGE. Perhaps you need the
READ permission as well?

-- K



2014-02-21 0:19 GMT+04:00 Nathan nathan.d.mel...@gmail.com:

 Users have reported failures doing operations with an app on the secondary
 storage wit (not external storage, the one that is actually external and/or
 removable) after receiving an update to Android 4.4.

 Based on logs so far, it appears it may be the result of an app being
 given limited or no file access to those storage volumes.

 I do not have the devices in question, so far Galaxy Note 3 and S4.

 I did find the following in Android 4.4 update notes.

 If your app reads from external storage...

 Your app can not read shared files on the external storage when running on
 Android 4.4, unless your app has 
 theREAD_EXTERNAL_STORAGEhttps://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE
  permission. That is, files within the directory returned by
 getExternalStoragePublicDirectory()https://developer.android.com/reference/android/os/Environment.html#getExternalStoragePublicDirectory(java.lang.String)
  are no longer accessible without the permission. However, if you need to
 access only your app-specific directories, provided by
 getExternalFilesDir()https://developer.android.com/reference/android/content/Context.html#getExternalFilesDir(java.lang.String),
 then you do not need 
 theREAD_EXTERNAL_STORAGEhttps://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE
  permission.
 But I doubt this has to do with the problem because
 a) I've always had the WRITE_EXTERNAL_STORAGE permission anyway
 b) This isn't really talking about additional storage volumes, since what
 Android calls external storage is what most.

 I am inclined, therefore, to believe that this isn't necessarily due to
 Android 4.4 specifically.
 Instead, it is another instance of Samsung mucking with permissions on a
 firmware update, deciding in their extremely finite wisdom that certain
 apps should not access certain media volumes, perhaps because they think
 that users could not possibly want to put anything besides photos or music
 on that external card that they paid for with their own money.
 Or it could be unintended behavior due to a bug in Android 4.4 or
 Samsung's OEM firmware.

 Am I correct? Anyone have more insight?

 Do I have options other than to tell my customers Too bad, just use
 internal storage and complain to Samsung, hoping they won't blame my app,
 but assuming they will.

 Nathan

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


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


Re: [android-developers] Re: Android 4.4 WebView cannot load content:// urls in html page

2014-02-19 Thread Kostya Vasilyev
Oh, if that was the only WebView breakage in 4.4 :)

-- K



2014-02-20 0:42 GMT+04:00 Henrik Lindqvist henrik.lindqv...@gmail.com:

 This is a app breaking change. Android's content sharing is built around
 content:// uri's, this make that impossible.

 Every one please star:

 https://code.google.com/p/android/issues/detail?id=63033




 On Friday, January 10, 2014 8:30:05 PM UTC+1, ankur wrote:

 We found some behavior changes on Kitkat's new Chromium webview 
 implementation.  One issue we encountered was the content:// urls in a 
 downloaded html page are no longer getting loaded via the content provider. 
 I was able to put together a small Android app to demonstrate this behavior 
 change (https://github.com/lhwa/KitkatWebviewTest). When the page contains 
 an image src url in content:// scheme, the image cannot be loaded on 
 Kitkat and we get the following errors in logcat:

 INFO/chromium(6759): [INFO:CONSOLE(9)] Not allowed to load local resource: 
 content://com.testing.image/kitkat.png, source: 
 https://googledrive.com/host/0B6yymhTJtX7ZRVdoRjNuWDA5NGc/example.html (9)

 The image can be loaded correctly in webview on Android 4.3 and priori 
 versions. I was not able to find any websettings to work around this on 
 Kitkat.  Can anyone help address this behavior change on Kitkat? Or share 
 some insights on the given error and suggest any workaround?


 Thanks and regards,

 Ankur.

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


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


Re: [android-developers] Checking to see whether my service is running/active

2014-01-31 Thread Kostya Vasilyev
2014-01-31 dashman erjdri...@gmail.com:


 What's confusing is this.

 I've got the app and service running.

 Then using the active app-list option of the launcher, I remove the app.


 I would think this would kill the app - but not the service.

 Service.onDestroy() is not called.


 But now if I restart the app - the Service.onCreate() is called


Sounds like your app's process gets killed. When this happens, the
service's onDestroy will not be called.

Next when you start the app's UI (activity), the process is created again,
and the service is too.

You can watch this in the logcat, and for more details, use system settings
- apps - running, or adb shell ps, where ps is the standard Unix
command that gives the list of running processes.

-- K

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


Re: [android-developers] Checking to see whether my service is running/active

2014-01-31 Thread Kostya Vasilyev
How many threads a service / process has inside does not have any effect
on how likely it's to be killed.

You should expect that your app's entire process, including any services
(and threads, of course) can be killed by the system any time.

Now since you mentioned swiping -- in case you're running 4.4, it appears
to have a bug where swiping kills the process.

In general, maintaining an ever-running service is not an easy task, unless
you use the official startForeground API (which by design puts an icon
into the status bar).

Some (say, Mark Murphy who doesn't appear to be on this list anymore),
would call it an anti-pattern. I tend to agree.

-- K



2014-02-01 dashman erjdri...@gmail.com:

 I think your analysis is correct.

 I also think it happens because my service doesn't create a worker thread.

 In the onStartCommand() method - it sets up some system listeners and
 returns STICKY.

 So when the main app is being killed (when i remove it from the active
 apps list) - i think the service
 is being killed - but the onDestroy is not being called (as you mentioned).

 I verified with the ps command - and it's gone.

 So should I create a worker thread or a handler - i will use it later on
 for some work.





 On Friday, January 31, 2014 3:01:28 PM UTC-5, Kostya Vasilyev wrote:


 2014-01-31 dashman erjd...@gmail.com:


 What's confusing is this.

 I've got the app and service running.

 Then using the active app-list option of the launcher, I remove the app.


 I would think this would kill the app - but not the service.

 Service.onDestroy() is not called.


 But now if I restart the app - the Service.onCreate() is called


 Sounds like your app's process gets killed. When this happens, the
 service's onDestroy will not be called.

 Next when you start the app's UI (activity), the process is created
 again, and the service is too.

 You can watch this in the logcat, and for more details, use system
 settings - apps - running, or adb shell ps, where ps is the standard
 Unix command that gives the list of running processes.

 -- K

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


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


Re: [android-developers] Checking to see whether my service is running/active

2014-01-31 Thread Kostya Vasilyev
I'd say trying STICKY and be careful to not swipe your app from the recents
list (which kills the process... can be a support issue).

-- K


2014-02-01 dashman erjdri...@gmail.com:

 yes this is on 4.4

 i saw the startForeground API call - but my service really is a background
 service...

 but i guess i'll have to use that now.




 On Friday, January 31, 2014 3:34:41 PM UTC-5, Kostya Vasilyev wrote:

 How many threads a service / process has inside does not have any
 effect on how likely it's to be killed.

 You should expect that your app's entire process, including any services
 (and threads, of course) can be killed by the system any time.

 Now since you mentioned swiping -- in case you're running 4.4, it appears
 to have a bug where swiping kills the process.

 In general, maintaining an ever-running service is not an easy task,
 unless you use the official startForeground API (which by design puts an
 icon into the status bar).

 Some (say, Mark Murphy who doesn't appear to be on this list anymore),
 would call it an anti-pattern. I tend to agree.

 -- K



 2014-02-01 dashman erjd...@gmail.com:

 I think your analysis is correct.

 I also think it happens because my service doesn't create a worker
 thread.

 In the onStartCommand() method - it sets up some system listeners and
 returns STICKY.

 So when the main app is being killed (when i remove it from the active
 apps list) - i think the service
 is being killed - but the onDestroy is not being called (as you
 mentioned).

 I verified with the ps command - and it's gone.

 So should I create a worker thread or a handler - i will use it later on
 for some work.





 On Friday, January 31, 2014 3:01:28 PM UTC-5, Kostya Vasilyev wrote:


 2014-01-31 dashman erjd...@gmail.com:


 What's confusing is this.

 I've got the app and service running.

 Then using the active app-list option of the launcher, I remove the
 app.


 I would think this would kill the app - but not the service.

 Service.onDestroy() is not called.


 But now if I restart the app - the Service.onCreate() is called


 Sounds like your app's process gets killed. When this happens, the
 service's onDestroy will not be called.

 Next when you start the app's UI (activity), the process is created
 again, and the service is too.

 You can watch this in the logcat, and for more details, use system
 settings - apps - running, or adb shell ps, where ps is the standard
 Unix command that gives the list of running processes.

 -- K

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


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


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


Re: [android-developers] Re: LocalBroadcastManager.java NullPointerException at line 297

2013-12-22 Thread Kostya Vasilyev
While I can't answer the original question, here is what I would recommend:

- Exclude LocalBroadcastManager from obfuscation
- Break down the statement where the crash happens into several more simple
ones, so you can tell where it goes wrong
- Monitor crash reports


   1. br.receivers.get(j).receiver.onReceive(mAppContext, br.intent);


change to:


   1. ArrayListReceiverRecord receivers = br.receivers;
   2. ReceiverRecord record = receivers.get(j);
   3. BroadcastReceiver receiver = record.receiver;
   4. Intent intent = br.intent;
   5. receiver.onReceive(mAppContext, intent);


Maybe there are better ways, but that's what I would do...

-- K


2013/12/23 kevikev2020 kkaw...@gmail.com

 There are still exceptions of course but no more of the
 LocalBroadcastManager which was occurring the most out of all the
 exceptions reported by Google and Flurry.


 On Sunday, December 22, 2013 1:23:12 PM UTC-8, Jonathan S wrote:

 This doesn't explain much. Im sure you have more exceptions after that
 one.

 On Sunday, December 22, 2013 7:14:06 AM UTC-5, kevikev2020 wrote:

 Sure, here it is.  Also attached a screenshot of the devices and OS.
  Since adding try/catch in Hackborns code, I haven't seen one report of
 crash come in.
 java.lang.NullPointerException
 at android.support.v4.a.e.a(LocalBroadcastManager.java:297)
 at android.support.v4.a.e.a(LocalBroadcastManager.java:46)
 at android.support.v4.a.f.handleMessage(LocalBroadcastManager.java:116)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:137)
 at android.app.ActivityThread.main(ActivityThread.java:4944)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:511)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(
 ZygoteInit.java:1038)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
 at dalvik.system.NativeStart.main(Native Method)

 On Saturday, December 21, 2013 11:27:25 PM UTC-8, Dekra wrote:

 Which device and os version does it happen?
 can you paste the exception?

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


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


Re: [android-developers] Overflow button always on in Kitkat?

2013-12-19 Thread Kostya Vasilyev
Now you'll just need to explain to your users what those three dots are :)

-- K



2013/12/19 Nathan nathan.d.mel...@gmail.com

 Is this true?


 http://www.phonearena.com/news/Android-menu-button-now-on-by-default-on-all-device-with-KitKat_id50179

 If so, it is a long overdue step in the right direction.

 Note to Samsung: no one ever finds your stupid mostly invisible menu
 button anyway.

 Nathan

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


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


Re: [android-developers] Re: Swipe app out of recent tasks permanently kills app (like force-stop) even though it's running background services!

2013-12-15 Thread Kostya Vasilyev
I just did a quick test (twice, to be sure) on my Nexus 5 with 4.4.2, and
found that:

1 - Having a foreground service does not prevent the process, including the
service, from being killed

2 - The killed process does not get automatically restarted, at least not
in any reasonable timeframe

3 - To add insult to injury, the service's foreground icon stays stuck in
the status bar

4 - Existing alarms that target the package's components continue to work
(so the package is not placed in a disabled state, as someone speculated)

5 - Killing a process with DDMS behaves the same way: a foreground service
goes away with the process (that's expected), but does not get restarted
after a short time, like it did in earlier Android versions.

Item 4 makes it look like an intentional change, while the third one makes
it look like a bug.

I'm more inclined to think it's a bug, maybe caused by memory optimization
changes in the system's internals (yes, I'm speculating).

At the same time, I see things like these in the logcat:

I/ActivityManager(  758): Killing
28081:com.google.android.setupwizard/u0a17 (adj 15): empty for 1806s
I/ActivityManager(  758): Killing 28113:com.google.android.youtube/u0a73
(adj 15): empty for 1806s

It's likely that Google's apps aren't affected by this, as they often use
GCM (Gmail, G+, other cloud centric apps).

So we have substantial changes / bugs in how process lifecycles are
handled, likely to optimize memory usage, and at the same time Google's own
apps, including those built into the firmware, continue to run when they've
not been used (ever / for a long time).

-- K



2013/12/15 Piren gpi...@gmail.com

 First, i'll have to agree with Kristopher, you're being an asshole... tone
 down your rhetoric, people might be more inclined to help you.
 Second, you keep going on and on selling us what you think the swipe means
 and what users think the swipe means, who cares? the only thing that
 matters is what google thought it is, and sadly, they made practically no
 documentation of it.

 It is however supposed to keep services running sometimes :)
 See posts by Dianne here:
 https://plus.google.com/105051985738280261832/posts/GfwRYCC42uX

 And there's also a known bug about it here:
 https://groups.google.com/forum/#!topic/android-developers/LtmA9xbrD5A

 And what you're describing might be another bug, or just a policy change
 which again was badly documented.
 Either way, the simplest solution to your issue will be to change the
 service to be a Foreground Service, it should* keep the service running.

 * With google, it's always a guess

 On Saturday, December 14, 2013 10:40:58 PM UTC+2, 3c wrote:

 And I did dig into the sources. App is permanently killed, except for
 manifest registered events (unverified) and alarms. So any sticky device
 not relying on those is a dead service. In 4.4.x only that is.

 I found a work around but its so dirty I wait for a better option if any
 before posting.
 Le 14 déc. 2013 17:37, Kristopher Micinski krismi...@gmail.com a
 écrit :

 Just as a note: you're being fairly condescending to people who are
 suggesting solutions to you free of charge in a pretty polite way..

 I personally don't know what the semantics of the swipe away are: but
 I wouldn't be surprised if it were to kill the app.  I am not sure
 whether or not I'd call it a bug or not (I'd personally lean toward
 not) but it's obvious you feel differently.  If nobody else
 (presumably, someone who's read the source..) responds to this you
 could always dig through the system source to find out!

 Kris


 On Fri, Dec 13, 2013 at 6:59 AM, 3c ccou...@gmail.com wrote:
  Thanks but I'm fully aware of this and as the title suggest I'm
 referring to
  swiping an app from the recent task list. Not sure how this has
 anything to
  do with this.
 
  On Android 4.4, the recent task list is now acting like a force-stop
 and
  that's a definitive and obvious bug. And this behavior is anything but
 what
  end-users do expect when removing apps from recent list. I've already
  received a dozen reports from end-users who think my app stops
 functioning
  unexpectedly, while they only swiped it away from the recent list, they
  expect its services to continue running!
 
  How nice this is when an app actually has widgets on the launcher?
 Those
  simply stop refreshing forever! If that's not a bug, I guess Android
 OS and
  my app both have 0 bug. I'll make sure to refer my users to your posts
 so
  they understand there's no bug!
 
  Have a read at these:
  http://developer.android.com/reference/android/app/Service.
 html#onTaskRemoved(android.content.Intent)
  http://developer.android.com/reference/android/content/pm/
 ServiceInfo.html#FLAG_STOP_WITH_TASK
 
 
  On Friday, December 13, 2013 4:25:42 AM UTC+1, RichardC wrote:
 
  Have a read of:
 
  Launch controls on stopped applications in
  http://developer.android.com/about/versions/android-3.1.html
 
  Note that it says:
  Applications are in a 

Re: [android-developers] Re: Swipe app out of recent tasks permanently kills app (like force-stop) even though it's running background services!

2013-12-15 Thread Kostya Vasilyev
2013/12/15 Cedric Counotte ccouno...@gmail.com

 Nice testing and investigation. Running the same device same version.

 However when I set a foreground service (with the status icon) the app is
 not killed!? The is actually running a plain sticky background service and
 an extra foreground service.


In the past, when 4.03 (or was it 4.0.1?) did its own weird stuff with
swipe from recents and background services, it was affected by intent
broadcasts. This was discussed before (Piren's link).

Maybe the important thing is here that Google's own apps continue to work.

I remember posting a list of issues with GPU acceleration that I ran into,
and the response was but all built-in apps work with it just fine.

-- K



 Without foreground service the app is killed and never restarted, but
 Android apps, running shows the service as still running.  Bug #1

 I just tried killing the app using the stop background process api.  And
 app is no longer restarted. That is both services are not scheduled for
 restart.

 And the foreground icon remains in the status bar. Bug #2.

 IMO there is nothing consistent in the new behavior.

 Not sure how Google will fix the above bugs, but if a swipe from what is
 called a recent task list also kills any background sticky service, I call
 this bug #3.

 For me it looks like Google is trying to improve memory consumption and
 battery drains with the assumption that only their apps behave well.

 While I've made endless recording of Google's app and services draining
 battery in standby more than any other apps. FWIW I only install my app on
 any devices. And in battery usage stats can only find Google's apps and
 services.

 That said I can't blame Google who made Android which changed my life
 completely.

 Nevertheless the whole process needs fine tuning, and until then requires
 workaround.

 The workaround I'm using is very simple: I create a transparent activity
 from onTaskRemoved to restart my services. How dirtier can it get?

 Sent from GMail mobile.

 Rgds,
 Ç.
 Le 15 déc. 2013 13:47, Kostya Vasilyev kmans...@gmail.com a écrit :

 I just did a quick test (twice, to be sure) on my Nexus 5 with 4.4.2, and
 found that:

 1 - Having a foreground service does not prevent the process, including
 the service, from being killed

 2 - The killed process does not get automatically restarted, at least not
 in any reasonable timeframe

 3 - To add insult to injury, the service's foreground icon stays stuck in
 the status bar

 4 - Existing alarms that target the package's components continue to work
 (so the package is not placed in a disabled state, as someone speculated)

 5 - Killing a process with DDMS behaves the same way: a foreground
 service goes away with the process (that's expected), but does not get
 restarted after a short time, like it did in earlier Android versions.

 Item 4 makes it look like an intentional change, while the third one
 makes it look like a bug.

 I'm more inclined to think it's a bug, maybe caused by memory
 optimization changes in the system's internals (yes, I'm speculating).

 At the same time, I see things like these in the logcat:

 I/ActivityManager(  758): Killing
 28081:com.google.android.setupwizard/u0a17 (adj 15): empty for 1806s
 I/ActivityManager(  758): Killing 28113:com.google.android.youtube/u0a73
 (adj 15): empty for 1806s

 It's likely that Google's apps aren't affected by this, as they often use
 GCM (Gmail, G+, other cloud centric apps).

 So we have substantial changes / bugs in how process lifecycles are
 handled, likely to optimize memory usage, and at the same time Google's own
 apps, including those built into the firmware, continue to run when they've
 not been used (ever / for a long time).

 -- K



 2013/12/15 Piren gpi...@gmail.com

 First, i'll have to agree with Kristopher, you're being an asshole...
 tone down your rhetoric, people might be more inclined to help you.
 Second, you keep going on and on selling us what you think the swipe
 means and what users think the swipe means, who cares? the only thing that
 matters is what google thought it is, and sadly, they made practically no
 documentation of it.

 It is however supposed to keep services running sometimes :)
 See posts by Dianne here:
 https://plus.google.com/105051985738280261832/posts/GfwRYCC42uX

 And there's also a known bug about it here:
 https://groups.google.com/forum/#!topic/android-developers/LtmA9xbrD5A

 And what you're describing might be another bug, or just a policy change
 which again was badly documented.
 Either way, the simplest solution to your issue will be to change the
 service to be a Foreground Service, it should* keep the service running.

 * With google, it's always a guess

 On Saturday, December 14, 2013 10:40:58 PM UTC+2, 3c wrote:

 And I did dig into the sources. App is permanently killed, except for
 manifest registered events (unverified) and alarms. So any sticky device
 not relying on those is a dead service

Re: [android-developers] Google Drive says Action Bars on the bottom are ok?

2013-12-12 Thread Kostya Vasilyev
Do you mean the panel that slides up and down as you scroll the documents
list?

Google+ does this too.

I guess it's the fashionable UI pattern du jour.

-- K


2013/12/12 Ken kenk...@gmail.com

 Just noticed this recently...Google Drive has a few action bar items at
 the bottom.

 I thought we weren't supposed to put action bar items at the bottom
 because it's confusing to users with the soft button bar (with back, home,
 etc.) down there as well?

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


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


Re: [android-developers] testing app from PC on attached phone

2013-11-29 Thread Kostya Vasilyev
Not in any particular order:

- You need drivers.

Sony Ericsson makes their adb drivers available in the Windows Driver 
Download center (or whatever it's called), but not every manufacturer does 
this. For those, you'll need to either install their own (manufacturer 
specific, and potentially device specific) drivers, or get the generic 
Google's adb driver and hack its UPNP IDs before installing.

- The adb debugging setting should be enabled (checked) on your non-virtual 
devices (system settings - developer options).

- Some manufacturers / devices seem to require an entry in adb_usb.ini, or 
you'll get permission denied.

-  Android 4.2 and higher requires an on-device confirmation before it 
allows adb connections.

- I'd recommend trying to get adb devices to work first, before jumping 
into Eclipse.

-- K

On Friday, November 29, 2013 8:27:44 PM UTC+4, peter gottlieb wrote:

 I'm not sure what you mean by a response from ADB.  I can debug from 
 Eclipse on the virtual device, but Eclipse android plug in won't even 
 recognize the hardware phone.


 On Fri, Nov 29, 2013 at 8:11 AM, Kristopher Micinski 
 krismi...@gmail.comjavascript:
  wrote:

 Can you get any response from ADB?

 Kris



 On Fri, Nov 29, 2013 at 10:52 AM, peter gottlieb 
 gottl...@gmail.comjavascript:
  wrote:

 Bad guess.  I clearly stated that the windows 7 setup had already worked 
 with the Sony Erickson, but now doesn't.  For all PC-phone interactions 
 (browse files on the phone from the PC, update phone software from the PC, 
 etc) the connections work perfectly fine.  Only the Eclipse connection from 
 the PC has the problem.  My only thought is a virus, but I have run Norton, 
 and everything seems fine.  It could be some new virus that only effects 
 certain software.   As a last resort I will try to get Norton assistance. 


 On Fri, Nov 29, 2013 at 1:05 AM, TreKing treki...@gmail.comjavascript:
  wrote:


 On Fri, Nov 29, 2013 at 12:45 AM, peter gottlieb 
 gottl...@gmail.comjavascript:
  wrote:

 The windows 7 has worked in the past, but doesn't work now.  The 
 windows 8 setup hasn't been used for this purpose before.  I have made 
 sure 
 to set debug = true in the manifest, and that the phones (a new Sony 
 Xperia, and an old Sony-Erickson Xperia) are set to accept apps from 
 non-verified sources.  I cannot get either phone to show up as a 
 connected 
 Android device chooser.


 Does anyone have any idea what could be wrong?  


 First guess would be you haven't installed the proper drivers.


 -
 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-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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 a topic in the 
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/android-developers/ESKcfB1nTiU/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 android-developers+unsubscr...@googlegroups.com javascript:.

 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-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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.comjavascript:
 .
 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-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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 a topic in the 
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/android-developers/ESKcfB1nTiU/unsubscribe
 .
 To unsubscribe from this group and all its topics, send 

[android-developers] Re: Selected a contact phone number

2013-11-18 Thread Kostya Vasilyev
I use this code to make the system contact picker show only those contacts 
which have email addresses:

Intent intent = new Intent(Intent.ACTION_PICK, 
ContactsContract.Contacts.CONTENT_URI);
intent.setType(Email.CONTENT_TYPE);

Just checked that this works too (only contacts with phone numbers are 
shown):

Intent intent = new Intent(Intent.ACTION_PICK, 
ContactsContract.Contacts.CONTENT_URI);
intent.setType(Phone.CONTENT_TYPE);

This type of filtering seems to be available starting with Android 3.2, and 
works on stock Android and manufacturer specific versions (like Samsung, 
Sony, ...)

Still, I recommend an additional check beforehand with 
PackageManager.queryIntentActivities, and having a catch block for 
ActivityNotFoundException.

As for getting the picked phone number:

In the activity result, you'll have a Uri that looks like contacts 
authoritycontacts/lookup/*/# (when filtering is not available, and the 
user picked a contact -- then you'll need to query its list of phone 
numbers, there may not be any) or data/# (when filtering is available, 
and the user picked a specific phone number).

-- K

On Sunday, November 17, 2013 5:06:07 PM UTC+4, mbanzon wrote:

 Hi all,

 I am trying to get a contact with a phone number and so far I haven't 
 found a reliable way to do this. I launch the standard activity for picking 
 a contact using this snippet:

 Intent intent = new Intent(Intent.ACTION_PICK, 
 ContactsContract.Contacts.CONTENT_URI);
 startActivityForResult(intent, REQUEST_CONTACT_NUMBER);

 In my onActivityResult method I do this (from examples from SO etc.):

 if (REQUEST_CONTACT_NUMBER == requestCode) {
 if (resultCode == Activity.RESULT_OK) {
  Uri contactData = data.getData();
 Cursor c = getContentResolver().query(contactData, null, null, null, null);
  if (c.moveToFirst()) {
 String id = 
 c.getString(c.getColumnIndexOrThrow(ContactsContract.Contacts._ID));
  String hasPhone = 
 c.getString(c.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER));

 if (hasPhone.equalsIgnoreCase(1)) {
  Cursor phones = getContentResolver().query( 
 ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, 
  ContactsContract.CommonDataKinds.Phone.CONTACT_ID +  =  + id, 
 null, null);
 if (phones.moveToFirst()) {
  String number = 
 phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
 this.numberEditText.setText(number);
  return;
 }
 }
 }
  }
 Toast.makeText(this, No number, Toast.LENGTH_SHORT).show();
 }

 The activity that launches show a lot more contacts than expected - every 
 person is shown once per phone number or email eg. - many of the contacts 
 is shown three to five times - and only one of these will result in an 
 actual phone number being returned. Some contacts even return the email 
 address!

 If I launch the activity using this:

 Intent intent = new Intent(Intent.ACTION_PICK, 
 ContactsContract.Contacts.CONTENT_URI);
 intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
 startActivityForResult(intent, REQUEST_CONTACT_NUMBER);

 It seems that every contact is only shown once - and if chosen the contact 
 picker prompts to select the correct part (phone, email, etc.) - but no 
 matter what I select nothings actually gets returned - it always toasts 
 the text No number.

 I just need a reliable and simple (to the user) way to pick a contact and 
 get the phone number into the app - any help or reference for more 
 information would be much appreciated ;-)

 -- 
 Michael Banzon
 http://michaelbanzon.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 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.


Re: [android-developers] Re: why does SharedPreferences framework allow you to insert a preference with a null key - given it can't reload the preferences afterwards?

2013-10-30 Thread Kostya Vasilyev
Starting over with shared prefs content when something goes wrong --
looks to me like a feature, and a useful one: sometimes storage goes
bad, files get corrupted, etc.

Being able to put null keys into shared prefs, and it triggering the
corruption handing code path later -- looks like a bug to me.

Just my two somethings...

-- K

2013/10/31 Palmer Eldritch the.u...@gmail.com:
 Why could one permit null keys - actually one null key - to have afterwards
 all the preferences cleared due to an exception ? Given that the prefs are a
 persistence mechanism.
 No it is at least an oversight - except if I am missing something
 NB - I am talking about the default shared preferences - but all shared
 preferences are the same behind the scenes


 On Wednesday, October 30, 2013 10:27:03 PM UTC+2, Kristopher Micinski wrote:

 I would honestly suspect that it's meant to be this way, and perhaps
 the documentation is buggy.  If you want, posting a bug report might
 get some action by Android devs, if none of them respond here.

 Kris


 On Wed, Oct 30, 2013 at 3:39 PM, Palmer Eldritch the@gmail.com
 wrote:
  I did not mean to complain at Nobu - sorry if I sounded harsh :)
 
  I just wanted to point out that my question was not so much what happens
  but
  why - and also raise awareness to this buggy and unintuitive behavior-
  or
  maybe have someone explain why this is so.
 
  Should we post a bug report ?
 
 
  On Wednesday, October 30, 2013 8:23:46 PM UTC+2, Kristopher Micinski
  wrote:
 
  Your question seems more to deal with intention rather than
  complaining.  I believe that Nobu's response was merely interpreting
  the implementation and trying to interpret it, so there's no use in
  trying to complain at him for providing a guess at something he didn't
  even write.
 
  kris
 
 
  On Wed, Oct 30, 2013 at 2:02 PM, Palmer Eldritch the@gmail.com
  wrote:
  
   On Wednesday, October 30, 2013 7:44:17 PM UTC+2, Nobu Games wrote:
  
   I quickly peeked into the source code and well, this is the way how
   it
   is
   programmed. When an exception occurs while the preferences data file
   gets
   read, SharedPreferences sets internally an empty map so you start
   from
   scratch. I even dug a bit deeper. The XML serializer just ignores
   NULL
   keys
   and creates XML output that cannot be properly read anymore through
   the
   map
   deserialization method which seems to expect an existing key value.
  
  
   My question is really why was it allowed to insert a null key in the
   first
   place - why not throw a NPE immediately (and say so in the docs) ?
   If you read my links (point 3 here) you will see that null keys are
   perfectly valid :  - they fail only on loading the prefs - taking
   down
   everything with them
   They should either fix deserialization or prohibit null keys
  
  
   As for why it has been programmed like that... I think the reasoning
   may
   be that preferences are not deemed to be of so much importance that
   it
   should make the app crash in case of failure. This error state is
   silently
   discarded and you start over with the defaults. I think that's a
   reasonable
   approach since any app should be able to start over with empty
   preferences.
  
  
  
   Not at all - Shared Preferences is a documented persistence mechanism
   -
   it
   is as reasonable as deleting a database without even saying so
  
  
  
   In this particular case you may have discovered a tiny bug you may
   want
   to
   report. But to be honest, using null keys is a pretty unusual thing
   to
   do.
  
  
   Not so (either by mistake or not).
   See the discussions in the SO. Some more I suspect they may have to
   do
   with
   null keys :
  
   sharedpreferences - Android - Shared Preferences are lost sometimes -
   Stack
   Overflow
  
  
   http://stackoverflow.com/questions/7943573/android-shared-preferences-are-lost-sometimes
   android - Shared Preferences get lost after shutting down device or
   killing
   the app - Stack Overflow
  
  
   http://stackoverflow.com/questions/9803838/shared-preferences-get-lost-after-shutting-down-device-or-killing-the-app#comment12495021_9803838
  
  
  
   On Wednesday, October 30, 2013 5:48:12 AM UTC-5, Palmer Eldritch
   wrote:
  
   The preferences are apparently cleared when one tries to load them
   when
   there is a null key which is bad ! Reproducer :
  
   public class XmlExceptionTest extends AndroidTestCase {
   /** Run it twice - on the second run the exception is
   thrown
   */
   public void testXmlException() {
   Context ctx = getContext();
   SharedPreferences prefs = PreferenceManager
   .getDefaultSharedPreferences(ctx); // exception
   thrown
   here (line 18)
   // and apparently it clears the prefs as the condition
   below
   is false
   if (prefs.contains(run_once)) { // false
   Log.w(XmlExceptionTest,
 

Re: [android-developers] does executable code change (improve) with increase in minSdkVersion declaration in manifest? is minsdk 11 declaration really needed for tablets?

2013-10-28 Thread Kostya Vasilyev
Firebreather:

2013/10/29 firebreather michaelirvingbr...@gmail.com:
 i'm developing on version 14 with minsdk declared of 10 (recently up from
 8).

[snip]

http://developer.android.com/distribute/googleplay/quality/tablet.html#android-versions
 which has a long detailed list of 12 things needed for tablet support,
 including in Part 8;

 At a minimum, check the uses-sdk element to make sure that:

 targetSdkVersion is declared with value 11 or higher (14 or higher is
 recommended), OR
 minSdkVersion is declared with value 11 or higher.
 If a maxSdkVersion attribute is declared, it must have a value of 11 or
 higher. Note that, in general, the use of maxSdkVersion is not recommended

I take this to mean at least one of:

*either* targetSdkVerison = 11
*or* minSdkVersion = 11 (which implies target = 11)

FWIW, an app of mine passed the designed for tablets checks (last
time I was uploading a release to Play: it just needed 10 screenshots
too).

Oh, and as already stated by others: do test the hell out of your app
after changing the targetSdk.

-- K

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


Re: [android-developers] Re: Google Play Music database

2013-10-28 Thread Kostya Vasilyev
...

2013/10/29 Kostya Vasilyev kmans...@gmail.com:
 As a developer, I feel your pain, but...

 ...this group might not be the best place to reach Google Music staff.

 Try this instead:

Sorry, the link:

https://support.google.com/googleplay/topic/2999684?hl=enref_topic=2952998#

Clicking contact us eventually leads here:


-- K




 2013/10/29 nakvic nak...@googlemail.com:
 Need to comment on my post:

 THIS IS A BUG, introduced in latest Google Play Music App.

 The one of the previous versions works fine, that is why I had it working on
 android 2.x.

 Google, please, fix the above mentioned exception in Play Music content
 provider!!!

 Regards,
 Victor


 On Monday, October 28, 2013 10:08:54 PM UTC+1, nakvic wrote:

 Hi there,

 I'm trying to query Google Play Music database. So far I have succeeded
 with querying for tracks, but not for albums and artists.


 If I try to query Play Music app for artists or albums, it throws an
 annoying exception on android 3+:

 android.database.sqlite.SQLiteException: cannot use index:
 MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX, while compiling: SELECT AlbumArtist
 AS album_artist, Album AS album_name, MUSIC.AlbumId AS _id FROM MUSIC
 INDEXED BY MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX  LEFT  JOIN KEEPON ON
 (MUSIC.AlbumId = KEEPON.AlbumId)  WHERE (MUSIC.AlbumIdSourceText IN (SELECT
 AlbumIdSourceText FROM MUSIC GROUP BY MUSIC.AlbumIdSourceText ORDER BY
 MUSIC.AlbumIdSourceText) ) GROUP BY MUSIC.AlbumIdSourceText ORDER BY
 MUSIC.AlbumIdSourceText

 What is very confusing is that the same code does work just great on
 android 2.x (?!).

 Does anyone tried to query Google Play Music database for artists and/or
 albums?
 What is MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX and why it fails on Android
 3+?

 Regards,
 Victor

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

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


Re: [android-developers] Re: Google Play Music database

2013-10-28 Thread Kostya Vasilyev
As a developer, I feel your pain, but...

...this group might not be the best place to reach Google Music staff.

Try this instead:


2013/10/29 nakvic nak...@googlemail.com:
 Need to comment on my post:

 THIS IS A BUG, introduced in latest Google Play Music App.

 The one of the previous versions works fine, that is why I had it working on
 android 2.x.

 Google, please, fix the above mentioned exception in Play Music content
 provider!!!

 Regards,
 Victor


 On Monday, October 28, 2013 10:08:54 PM UTC+1, nakvic wrote:

 Hi there,

 I'm trying to query Google Play Music database. So far I have succeeded
 with querying for tracks, but not for albums and artists.


 If I try to query Play Music app for artists or albums, it throws an
 annoying exception on android 3+:

 android.database.sqlite.SQLiteException: cannot use index:
 MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX, while compiling: SELECT AlbumArtist
 AS album_artist, Album AS album_name, MUSIC.AlbumId AS _id FROM MUSIC
 INDEXED BY MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX  LEFT  JOIN KEEPON ON
 (MUSIC.AlbumId = KEEPON.AlbumId)  WHERE (MUSIC.AlbumIdSourceText IN (SELECT
 AlbumIdSourceText FROM MUSIC GROUP BY MUSIC.AlbumIdSourceText ORDER BY
 MUSIC.AlbumIdSourceText) ) GROUP BY MUSIC.AlbumIdSourceText ORDER BY
 MUSIC.AlbumIdSourceText

 What is very confusing is that the same code does work just great on
 android 2.x (?!).

 Does anyone tried to query Google Play Music database for artists and/or
 albums?
 What is MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX and why it fails on Android
 3+?

 Regards,
 Victor

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

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


Re: [android-developers] Re: Google Play Music database

2013-10-28 Thread Kostya Vasilyev
Sorry for the spam (what is it with my fingers today).

Meant to post this link too:

https://support.google.com/googleplay/android-developer/

-- K


2013/10/29 Kostya Vasilyev kmans...@gmail.com:
 ...

 2013/10/29 Kostya Vasilyev kmans...@gmail.com:
 As a developer, I feel your pain, but...

 ...this group might not be the best place to reach Google Music staff.

 Try this instead:

 Sorry, the link:

 https://support.google.com/googleplay/topic/2999684?hl=enref_topic=2952998#

 Clicking contact us eventually leads here:


 -- K




 2013/10/29 nakvic nak...@googlemail.com:
 Need to comment on my post:

 THIS IS A BUG, introduced in latest Google Play Music App.

 The one of the previous versions works fine, that is why I had it working on
 android 2.x.

 Google, please, fix the above mentioned exception in Play Music content
 provider!!!

 Regards,
 Victor


 On Monday, October 28, 2013 10:08:54 PM UTC+1, nakvic wrote:

 Hi there,

 I'm trying to query Google Play Music database. So far I have succeeded
 with querying for tracks, but not for albums and artists.


 If I try to query Play Music app for artists or albums, it throws an
 annoying exception on android 3+:

 android.database.sqlite.SQLiteException: cannot use index:
 MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX, while compiling: SELECT AlbumArtist
 AS album_artist, Album AS album_name, MUSIC.AlbumId AS _id FROM MUSIC
 INDEXED BY MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX  LEFT  JOIN KEEPON ON
 (MUSIC.AlbumId = KEEPON.AlbumId)  WHERE (MUSIC.AlbumIdSourceText IN (SELECT
 AlbumIdSourceText FROM MUSIC GROUP BY MUSIC.AlbumIdSourceText ORDER BY
 MUSIC.AlbumIdSourceText) ) GROUP BY MUSIC.AlbumIdSourceText ORDER BY
 MUSIC.AlbumIdSourceText

 What is very confusing is that the same code does work just great on
 android 2.x (?!).

 Does anyone tried to query Google Play Music database for artists and/or
 albums?
 What is MUSIC_DOMAIN_ALBUMID_SOURCE_TEXT_INDEX and why it fails on Android
 3+?

 Regards,
 Victor

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

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


Re: [android-developers] does executable code change (improve) with increase in minSdkVersion declaration in manifest? is minsdk 11 declaration really needed for tablets?

2013-10-28 Thread Kostya Vasilyev
Re: testing on the emulator takes literally hours for each run --

-- do you use the x86 emulator images?

I do, and for me, it's faster than a Galaxy Note 2 (Linux, 64 bit,
Intel CPU with kvm).

http://developer.android.com/tools/devices/emulator.html#accel-vm

-- K

2013/10/29 firebreather michaelirvingbr...@gmail.com:
 I've never declared a target sdk, I figure that's safer.
 my android phone is version 10 so I can't increase my minimum or i'd be
 stuck with the increadibly slow emulator.
 it took hours to get a screenshot off it for the tablet google play image.
 it will be some time before I can afford a version 11+ phone or i'd just
 change my minimum to 11 so I wouldn't have to worry about it. testing on the
 emulator takes literally hours for each run so i'll never be able to compare
 different  phones:minsdk:targetsdk:development skd permutations.

 On Monday, October 28, 2013 4:38:59 PM UTC-5, Kostya Vasilyev wrote:

 Firebreather:

 2013/10/29 firebreather michaelir...@gmail.com:
  i'm developing on version 14 with minsdk declared of 10 (recently up
  from
  8).

 [snip]


 http://developer.android.com/distribute/googleplay/quality/tablet.html#android-versions
  which has a long detailed list of 12 things needed for tablet support,
  including in Part 8;
 
  At a minimum, check the uses-sdk element to make sure that:
 
  targetSdkVersion is declared with value 11 or higher (14 or higher is
  recommended), OR
  minSdkVersion is declared with value 11 or higher.
  If a maxSdkVersion attribute is declared, it must have a value of 11 or
  higher. Note that, in general, the use of maxSdkVersion is not
  recommended

 I take this to mean at least one of:

 *either* targetSdkVerison = 11
 *or* minSdkVersion = 11 (which implies target = 11)

 FWIW, an app of mine passed the designed for tablets checks (last
 time I was uploading a release to Play: it just needed 10 screenshots
 too).

 Oh, and as already stated by others: do test the hell out of your app
 after changing the targetSdk.

 -- K

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

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


Re: [android-developers] does executable code change (improve) with increase in minSdkVersion declaration in manifest? is minsdk 11 declaration really needed for tablets?

2013-10-28 Thread Kostya Vasilyev
2013/10/29 firebreather michaelirvingbr...@gmail.com:
 well it won't work on my version 10 phone with a version 11 target (no
 compatible device error), so i'll have to leave it with no target declared.

It's possible to run a targetSdk = 11 on an 2.* device. I do it every day :)

A minSdk = 11 would not run on a 2.* device.

-- K



 On Monday, October 28, 2013 4:38:59 PM UTC-5, Kostya Vasilyev wrote:

 Firebreather:

 2013/10/29 firebreather michaelir...@gmail.com:
  i'm developing on version 14 with minsdk declared of 10 (recently up
  from
  8).

 [snip]


 http://developer.android.com/distribute/googleplay/quality/tablet.html#android-versions
  which has a long detailed list of 12 things needed for tablet support,
  including in Part 8;
 
  At a minimum, check the uses-sdk element to make sure that:
 
  targetSdkVersion is declared with value 11 or higher (14 or higher is
  recommended), OR
  minSdkVersion is declared with value 11 or higher.
  If a maxSdkVersion attribute is declared, it must have a value of 11 or
  higher. Note that, in general, the use of maxSdkVersion is not
  recommended

 I take this to mean at least one of:

 *either* targetSdkVerison = 11
 *or* minSdkVersion = 11 (which implies target = 11)

 FWIW, an app of mine passed the designed for tablets checks (last
 time I was uploading a release to Play: it just needed 10 screenshots
 too).

 Oh, and as already stated by others: do test the hell out of your app
 after changing the targetSdk.

 -- K

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

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


Re: [android-developers] Xml file corrupted over sprint cellular network ?

2013-10-03 Thread Kostya Vasilyev
Is the XML content maybe compressed (gzipped) by the cellular operator's 
proxy?

Uncompressed, it would look like garbage.

You can find out by checking for Content-Encoding: gzip (or maybe 
deflate).

-- K

On Thursday, October 3, 2013 2:04:53 PM UTC+4, Gaurav Sharma wrote:

 @Robert can you suggest me any other way so i can fix the issue? I have 
 tried changing xml content type in tomcat 6.0 but it did not work.


 On Sun, Sep 29, 2013 at 11:36 PM, Robert Greenwalt 
 rgree...@google.comjavascript:
  wrote:

 We have contacts with many of the carriers and I had them ask Sprint 
 about this.


 On Sat, Sep 28, 2013 at 3:34 AM, Gaurav Sharma 
 gauravs...@gmail.comjavascript:
  wrote:

 @robert: How do you such information? have you faced this situation 
 before or have they contacted you ?


 On Sat, Sep 28, 2013 at 4:31 AM, Robert Greenwalt 
 rgree...@google.comjavascript:
  wrote:

 I understand Sprint is investigating and may contact you for more info.


 On Thu, Sep 26, 2013 at 2:01 AM, Gaurav Sharma 
 gauravs...@gmail.comjavascript:
  wrote:

 I am having a very strange issue in my android app. I receive xml file 
 from server and perform operation based on xml content.

 It is working on almost every network for eg. ATT, Verizon in USA, 
 airtel, vodaphone and others in india.But it not working on sprint 
 network 
 USA.

 When i tried to find xml content i am getting some byte code or 
 unicode not the plain xml file. I looked for more information i found 
 other 
 also has faced this issue on sprint evdeo. people says turn off byte 
 mobile 
 optimization herehttp://t8387.codeinpro.us/q/50810aaa4f1eba38a4efcbd1

 I am not able to turn off mobile byte optimization. If i switch to 
 wifi network it receive file properly. Issue occur on sprint cellular 
 network only.

 Any help or any pointer will be very much appreciated. 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-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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.comjavascript:
 .

 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-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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 a topic in the 
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/android-developers/eihARGT8Pl8/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 android-developers+unsubscr...@googlegroups.com javascript:.

 For more options, visit https://groups.google.com/groups/opt_out.




 -- 
 Gaurav Sharma
 Bangalore
  
 -- 
 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.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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.comjavascript:
 .
 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-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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 a topic in the 
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/android-developers/eihARGT8Pl8/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 android-developers+unsubscr...@googlegroups.com javascript:.
 For more options, visit 

Re: [android-developers] Re: Strange SQLite error, possibly in native code?

2013-09-30 Thread Kostya Vasilyev
Just to follow up: building the query myself didn't help.

android.database.sqlite.SQLiteException: no such table: me (code 1): ,
while compiling: SELECT _id, generation, [snip], op_hide, misc_flags
*FROM me  age WHERE* folder_id = ? AND [condition here]

The query string is built in my Java code, and then passed to db.rawQuery.

The FROM me  age WHERE reads FROM message WHERE at that time, then
apparently gets corrupted inside system code, again, just in a slightly
different place.

I still don't know what makes this one query more special than the others,
oh well.

-- K



2013/9/29 Kostya Vasilyev kmans...@gmail.com

 Yes, that's what just did in a dev build, will see it helps.

 Curiously enough, the framework's SQLiteQueryBuilder uses a StringBuilder
 that is initially 120 chars long, and the corruption happens at 112'th
 character.

 I've long anticipated an Android device with firmware that calculates 2+2
 as 5... this is not quite it, but comes pretty close.

 -- K



 2013/9/29 Piren gpi...@gmail.com

 never came across such a report, but if it's isolated to that specific
 query maybe try replacing it with a rawQuery instead and see if it makes a
 difference.


 On Sunday, September 29, 2013 1:05:26 AM UTC+3, Kostya Vasilyev wrote:

 Hello,

 One of my users reports a crash like this:

 android.database.sqlite.**SQLiteException: no such column: _id (code 1): , 
 while compiling: SELECT _id, generation, flags, numeric_uid, 
 body_main_size, body_main_fetched_size, body_alt_size, body_alt_fetc¤   
 , search_token, op_flags, op_move_to_folder, op_hide, misc_flags FROM 
 message WHERE folder_id = ? AND numeric_uid = ? AND numeric_uid  ?
 at 
 android.database.sqlite.**SQLiteConnection.**nativePrepareStatement(Native 
 Method)
 at 
 android.database.sqlite.**SQLiteConnection.**acquirePreparedStatement(**SQLiteConnection.java:886)
 at 
 android.database.sqlite.**SQLiteConnection.**executeForCursorWindow(**SQLiteConnection.java:835)
 at 
 android.database.sqlite.**SQLiteSession.**executeForCursorWindow(**SQLiteSession.java:836)
 at 
 android.database.sqlite.**SQLiteQuery.fillWindow(**SQLiteQuery.java:62)
 at 
 android.database.sqlite.**SQLiteCursor.fillWindow(**SQLiteCursor.java:158)
 at 
 android.database.sqlite.**SQLiteCursor.getCount(**SQLiteCursor.java:148)
 at 
 android.database.**AbstractCursor.moveToPosition(**AbstractCursor.java:197)
 at 
 android.database.**AbstractCursor.moveToNext(**AbstractCursor.java:245)
 at my code here

 Note the weird character in the middle of:

 body_alt_fetc right here¤ , search_token.

 There are supposed to be a few more characters where this weird one is.

 My code here calls SQLiteDatabase.query with a String[] projection, a
 table name, a simple selection and its arguments, etc. All very basic stuff.

 The crash happens once in a while, even though this query runs
 literally all the time. It's always this query, too, even though there are
 dozens more, for same table, and in same source file.

 It looks to me like a memory overwrite, presumably in native code
 ('cause it's pretty hard to overwrite something by accident on the Java
 side of things).

 Has anyone ran into this or a similar query corruption?

 The device is a Zopo 980, if that means anything.

 Thanks,
 -- K


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




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


Re: [android-developers] Re: Strange SQLite error, possibly in native code?

2013-09-29 Thread Kostya Vasilyev
Yes, that's what just did in a dev build, will see it helps.

Curiously enough, the framework's SQLiteQueryBuilder uses a StringBuilder
that is initially 120 chars long, and the corruption happens at 112'th
character.

I've long anticipated an Android device with firmware that calculates 2+2
as 5... this is not quite it, but comes pretty close.

-- K



2013/9/29 Piren gpi...@gmail.com

 never came across such a report, but if it's isolated to that specific
 query maybe try replacing it with a rawQuery instead and see if it makes a
 difference.


 On Sunday, September 29, 2013 1:05:26 AM UTC+3, Kostya Vasilyev wrote:

 Hello,

 One of my users reports a crash like this:

 android.database.sqlite.**SQLiteException: no such column: _id (code 1): , 
 while compiling: SELECT _id, generation, flags, numeric_uid, body_main_size, 
 body_main_fetched_size, body_alt_size, body_alt_fetc¤   , search_token, 
 op_flags, op_move_to_folder, op_hide, misc_flags FROM message WHERE 
 folder_id = ? AND numeric_uid = ? AND numeric_uid  ?
  at 
 android.database.sqlite.**SQLiteConnection.**nativePrepareStatement(Native 
 Method)
  at 
 android.database.sqlite.**SQLiteConnection.**acquirePreparedStatement(**SQLiteConnection.java:886)
  at 
 android.database.sqlite.**SQLiteConnection.**executeForCursorWindow(**SQLiteConnection.java:835)
  at 
 android.database.sqlite.**SQLiteSession.**executeForCursorWindow(**SQLiteSession.java:836)
  at 
 android.database.sqlite.**SQLiteQuery.fillWindow(**SQLiteQuery.java:62)
  at 
 android.database.sqlite.**SQLiteCursor.fillWindow(**SQLiteCursor.java:158)
  at 
 android.database.sqlite.**SQLiteCursor.getCount(**SQLiteCursor.java:148)
  at 
 android.database.**AbstractCursor.moveToPosition(**AbstractCursor.java:197)
  at 
 android.database.**AbstractCursor.moveToNext(**AbstractCursor.java:245)
  at my code here

 Note the weird character in the middle of:

 body_alt_fetc right here¤ , search_token.

 There are supposed to be a few more characters where this weird one is.

 My code here calls SQLiteDatabase.query with a String[] projection, a
 table name, a simple selection and its arguments, etc. All very basic stuff.

 The crash happens once in a while, even though this query runs
 literally all the time. It's always this query, too, even though there are
 dozens more, for same table, and in same source file.

 It looks to me like a memory overwrite, presumably in native code ('cause
 it's pretty hard to overwrite something by accident on the Java side of
 things).

 Has anyone ran into this or a similar query corruption?

 The device is a Zopo 980, if that means anything.

 Thanks,
 -- K


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


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

2013-09-28 Thread Kostya Vasilyev
Hello,

One of my users reports a crash like this:

android.database.sqlite.SQLiteException: no such column: _id (code 1):
, while compiling: SELECT _id, generation, flags, numeric_uid,
body_main_size, body_main_fetched_size, body_alt_size, body_alt_fetc¤
 , search_token, op_flags, op_move_to_folder, op_hide, misc_flags
FROM message WHERE folder_id = ? AND numeric_uid = ? AND numeric_uid
 ?
at 
android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native
Method)
at 
android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:886)
at 
android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:835)
at 
android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)
at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
at 
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:158)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:148)
at 
android.database.AbstractCursor.moveToPosition(AbstractCursor.java:197)
at android.database.AbstractCursor.moveToNext(AbstractCursor.java:245)
at my code here

Note the weird character in the middle of:

body_alt_fetc right here¤ , search_token.

There are supposed to be a few more characters where this weird one is.

My code here calls SQLiteDatabase.query with a String[] projection, a table
name, a simple selection and its arguments, etc. All very basic stuff.

The crash happens once in a while, even though this query runs literally
all the time. It's always this query, too, even though there are dozens
more, for same table, and in same source file.

It looks to me like a memory overwrite, presumably in native code ('cause
it's pretty hard to overwrite something by accident on the Java side of
things).

Has anyone ran into this or a similar query corruption?

The device is a Zopo 980, if that means anything.

Thanks,
-- K

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


Re: [android-developers] Html.fromHtml limitations.

2013-09-27 Thread Kostya Vasilyev
There was an old blog post by Mark Murphy, perhaps it's still on his site.

Or just look at the source:

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/text/Html.java

You will want handleStartTag

-- K


2013/9/28 Nathan nathan.d.mel...@gmail.com

 Html.from Html. can parse html into a Spanned.

 It mentions it has limitations.
 Is it documented anywhere what limitations those are?

 It could be useful for context help and a lot more lightweight than using
 a Webview

 I've been considering something like this.

 http://blahti.wordpress.com/2012/02/14/how-to-build-simple-help-in-android/

 I wouldn't have to handle arbitrary text from the internet, just strings
 from our own resource files.

 Nathan

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


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


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-20 Thread Kostya Vasilyev
If that's really it, I wonder why you never see ads or reviews saying
This 32 core, 6GHz device with a 6 4x HD screen can corrupt your
data up to four times faster than the closest competitor!

Seriously, why is this not part of the compatibility test (I realize
it maybe a difficult thing to detect, but it's users' data at stake).

Some of us still shiver from all the data storage issues that the
original Galaxy S had.

Curiously, I'm also getting - admittedly rare - reports of shared
prefs values randomly changing, including some in files that the user
can't touch in the app's UI.

On the other hand, if this is flash memory going bad on some specific
devices (as opposed to device models), then how does the user run
chkdsk / fsck / surface scan / whatever to detect it?

-- K


2013/9/20 Anthony Prieur anthony.pri...@gmail.com:
 From my guess the database gets corrupted because of (some) flash disk
 controllers that lie to the OS and do not flush/sync properly the FS before
 crash/reboot, so even with transactions the DB gets corrupted in some cases.

 Le vendredi 20 septembre 2013 02:34:51 UTC+2, Kostya Vasilyev a écrit :

 Yes, but if the database can't be opened at sqlite level, it would only
 help the app know that, not recover the data... And there are other ways to
 detect that. Back to square one: why do they get corrupted in the first
 place?


 Nathan 20 пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ 2013пїЅпїЅ. 4:05:53
 пїЅпїЅпїЅпїЅпїЅпїЅпїЅ:



 On Thursday, September 19, 2013 4:31:23 PM UTC-7, Kostya Vasilyev wrote:


 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java

 Look for a method called onCorruption.


 It looks like we could, in 4.0+, define a custom DatabaseErrorHandler that
 could do something different.

 I have not done so.

 Nathan


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

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

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


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Kostya Vasilyev
I also get -- rare and very unpleasant -- support emails with this
error, also database disk image is malformed.

Sometimes it's one of the databases used internally by WebView (and
yet, a crash is a crash).

Then there are rare cases when the app's database just disappears.

The framework has code to detect corrupted databases and delete them.
Most likely it's this code that kicks in. I doubt it was added into
the framework just for my app.

SQLite is supposedly the best tested piece of software ever. However,
there was one case when its developer admitted on a mailing list that
a particular version, which happened to be included in a particular
Android release, could corrupt its in-memory buffer, albeit not disk
image (if my memory serves me). So nothing is perfect, all software
has bugs, yada yada yada...

I don't even have a theory on what the root cause is: other SQLite
bugs, Android's use of ext4, memory chips going bad... I just look at
it as a given.

-- K

2013/9/19 Nathan nathan.d.mel...@gmail.com:
 Also interested in any other reasons I might be getting
 SQLiteDiskIOException disk I/O error (code 1802) at random times in the
 field.

 After thinking this was a real breakthrough, I heard back from people saying
 that their database was less than 1 GB anyway. This could be not a real
 problem, or it could be just one of many problems.

 Data from the (singleton) SQliteDatabase can be read from multiple threads,
 but from my best understanding of SQLiteDatabases, reads and writes will
 simply block until they get access.

 Nathan

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

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


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Kostya Vasilyev

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java

Look for a method called onCorruption.




Nathan nathan.d.mel...@gmail.com 20 сентября 2013 г. 2:20:05 написал:



On Thursday, September 19, 2013 12:38:19 PM UTC-7, Kostya Vasilyev wrote:

 I also get -- rare and very unpleasant -- support emails with this error, 
also database disk image is malformed. 
 Sometimes it's one of the databases used internally by WebView (and yet, 
a crash is a crash). 

 Then there are rare cases when the app's database just disappears. 
 The framework has code to detect corrupted databases and delete them. 
Most likely it's this code that kicks in. I doubt it was added into the 
framework just for my app. 
 SQLite is supposedly the best tested piece of software ever. However, 
there was one case when its developer admitted on a mailing list that a 
particular version, which happened to be included in a particular Android 
release, could corrupt its in-memory buffer, albeit not disk image (if my 
memory serves me). So nothing is perfect, all software has bugs, yada yada 
yada... 
 I don't even have a theory on what the root cause is: other SQLite bugs, 
Android's use of ext4, memory chips going bad... I just look at it as a 
given. 


My experience matches yours in that some databases just disappear. I would 
like to look at the frameworks code for doing that if you know where I 
should look.
The unusual part, as I've seen, is that people are seeing data disappear 
and sometimes reappear, within a database where other data may be intact. 
It can drive one insane, and I've been able to eliminate user error ( I 
think) in many cases.

To sum up, I've got at least three issues.
1. Databases disappear and I can't stop them. 2. Some weird file thing 
could be preventing me from getting to the file (do devices unmount and 
mount their storage whenever they feel like it?) 3. I could be seeing 
conflicts in threads. Shouldn't happen if they are all reader , but . .. 4 
(Maybe). Databases above 2 Gigabytes cause undefined behavior in SQLite.

In the thread I cited, Diane Hackborn said (two years ago):
Yeah it's actually very likely the problem.  Android for various reasons 
defines off_t to be 32 bit, so if you want to support  2GB files you need 
to use off64_t.  That unfortunately makes it easy to have code paths that 
break like this.


https://groups.google.com/forum/#!searchin/android-developers/Sqlitediskioexception/android-developers/eYNJrIgabxU/e7sKm9QCfN4J

I don't know where in the framework to look for off_t and where it is used 
for SQLite files. Any pointers would help.
I would really like to know for what versions of Android this is a problem, 
if at all.
If this 2 gigabyte thing *isn't a problem*, then I want to hold off on 
telling my users that it is. Some already find 4 Gigabytes restrictive. 
Somebody just told me they are using 8 gigabytes safely on seven different 
devices and sharing them among a group of 200 people. Which means he got 
around my checks in the code to prevent from going over 4 gigabytes. Maybe 
he is just getting lucky, because if the 2 gig problem is real, it seems 
like it would fail rather often.

Nathan



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


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


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Kostya Vasilyev
Yes, but if the database can't be opened at sqlite level, it would only 
help the app know that, not recover the data... And there are other ways to 
detect that. Back to square one: why do they get corrupted in the first place?



Nathan nathan.d.mel...@gmail.com 20 сентября 2013 г. 4:05:53 написал:



On Thursday, September 19, 2013 4:31:23 PM UTC-7, Kostya Vasilyev wrote:

 
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java


 Look for a method called onCorruption.


It looks like we could, in 4.0+, define a custom DatabaseErrorHandler that 
could do something different.

I have not done so.
Nathan


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


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

2013-09-13 Thread Kostya Vasilyev
Not exactly what you're asking, but...

I develop mostly under Ubuntu, but sometimes a bit of work on same projects 
under Windows. A distributed version control system works great for me. I 
push my changes under one OS and pull into another as needed (in my case, 
it's Mercurial).

-- K

On Friday, September 13, 2013 9:57:07 PM UTC+4, JavaSrvcs wrote:

 I want to install the Android SDK as a USB portable app and run from any 
 computer (windows or Linux under wine).

 Is this possible and is this a sane idea?  I move around to a number of 
 projects and am at any machine at any given time ( Ubuntu, CentOS, Windows 
 7 mostly).

 I thought about a VM but some of the boxes I am on are not very powerful 
 and each would require the installation of a VM client ( VirtualBox ).

 Any help on getting this going would be greatly appreciated or any 
 pointers on getting the Android SDK working under both CentOS and Ubuntu 
 would be appreciated.


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


Re: [android-developers] Re: Creating a list like the one in android dev guidlines

2013-08-24 Thread Kostya Vasilyev
Last I checked (using Developer Options, show view boundaries), Gmail was
not using Android layouts for items inside a message item view. It's one
Android view per message list item, the internals are handled internally.

Now back to your original question: consider RelativeLayout:

http://developer.android.com/reference/android/widget/RelativeLayout.html

-- K


2013/8/25 William Reed wree...@gmail.com

 Maybe something like this but with an image view?
 http://stackoverflow.com/questions/8841283/gmail-like-listview-with-checkboxes-and-using-the-actionbar

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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Designed for tablets with both minSdkVersion and targetSdkVersion tags?

2013-08-14 Thread Kostya Vasilyev
You're right, it's:

targetSdkVersion = 11

OR

minSdkVersion = 11

I must have been blind, and missed the or. Sorry.

-- K


On Wednesday, August 14, 2013 12:08:50 PM UTC+4, MobileVisuals wrote:

 I agree that we can't just ignore the older OS versions. I think they mean 
 targetSdkVersion is declared with value 11 or higher  or
 minSdkVersion is declared with value 11 or higher.
 So minSdkVersion is declared with value 11 or higher is not required, but 
 if you for instance add minSdkVersion = 9, the app won't be approved 
 forDesigned for tablets.

 So what am I supposed to do? If I remove minSdkVersion, there will be no 
 filtering our of devices with uncompatible OS's.
 People can then download the app without getting it to work on their 
 device. Is this the price I have to pay to get approved for Designed for 
 tablets?
 Or is there any way to have both minSdkVersion = 9 and targetSdkVersion=11 
 in the manifest?


 On Tuesday, August 13, 2013 10:11:50 AM UTC+2, MobileVisuals wrote:

 I am implementing the new Designed for tablets specification on GP. It 
 is easy to implement and get it to work for live wallpapers. I replace 
 uses-sdk android:minSdkVersion=7 / with uses-sdk 
 android:targetSdkVersion=11 / in the manifest. I wonder if there is any 
 way of having both of the minSdkVersion and targetSdkVersion tags in the 
 manifest? I get a message that the app is not Designed for tablets when I 
 try to include both of these tags.



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

2013-08-14 Thread Kostya Vasilyev
Why not use a state list drawable?

http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

-- K

On Wednesday, August 14, 2013 12:53:23 PM UTC+4, Amit Mangal wrote:

 Hi there,

 i have a list view and in that list view in each row i have image 
 unselectimage.png.
 i want when some one click on that i want to replace that image with 
 selected.png.

 suppose if item is already selected then i want to unselected image.

 suppose list view is having 10 items in out of 10 . 9 itms willbe 
 unselected and only one willbe selected.

 my query is that how to load unselect image on all items and select image 
 on the item which is currently selected.


 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
--- 
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: Designed for tablets with both minSdkVersion and targetSdkVersion tags?

2013-08-13 Thread Kostya Vasilyev
Is this the spec you're using?

http://developer.android.com/distribute/googleplay/quality/tablet.html#android-versions

It says:

---

At a minimum, check the 
uses-sdkhttp://developer.android.com/guide/topics/manifest/uses-sdk-element.html
 element 
to make sure that:

   1. targetSdkVersion is declared with value 11 or higher (14 or higher is 
   recommended), OR
   2. minSdkVersion is declared with value 11 or higher.
   3. If a maxSdkVersion attribute is declared, it must have a value of 11 
   or higher. Note that, in general, the use ofmaxSdkVersion is *not 
   recommended*.


So it looks like a minSdkVersion = 11  is required...

Which doesn't make any sense to me -- e.g. my app has a multi-pane UI using 
native Fragment when on API = 11, but runs fine on API = 5 (and has a 
mostly Holo-styled UI, too).

I suppose most, if not all, apps using the support library / 
ActionBarSherlock would be same way (I'm not using either, but same 
principle).

Weird. Android 2.3 is down to about 40% and was finally overtaken by 4.0+ 
in last month's stats, but in no sense completely gone and can be ignored...

-- K

On Tuesday, August 13, 2013 12:11:50 PM UTC+4, MobileVisuals wrote:

 I am implementing the new Designed for tablets specification on GP. It 
 is easy to implement and get it to work for live wallpapers. I replace 
 uses-sdk android:minSdkVersion=7 / with uses-sdk 
 android:targetSdkVersion=11 / in the manifest. I wonder if there is any 
 way of having both of the minSdkVersion and targetSdkVersion tags in the 
 manifest? I get a message that the app is not Designed for tablets when I 
 try to include both of these tags.


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




Re: [android-developers] Re: how to get a list of locales supported by device we're running on

2013-08-13 Thread Kostya Vasilyev
So you have an HTC... I've got two on my desk, and the language / locale
list on both of them is region-specific:

Russian (Russia, Ukraine, Georgia, other former Soviet republics)
English (same list of countries)

Other deivices I have (a couple of Samsungs purchased in Russia, another
Samsung from a German mail-order, a Galaxy Nexus from the UK) have a much
more complete list of languages, and they're listed without countries.

So yeah, device manufacturer mods... What if I knew Korean and wanted to
use it as the default language on my device? :)

-- K


2013/8/14 Latimerius l4t1m3r...@gmail.com

 Admittedly it took a bit ;-) but I finally got around to taking a closer
 look.

 My HTC Desire show the following languages in its LanguagesInput menu:

 English (United Kingdom)
 English (Ireland)
 French
 Italian
 Spanish

 Not a lot.  However, when I call

 Resources.getSystem().getAssets().getLocales();

 on the device, I get the following list:

 da
 ja
 nb
 de
 th
 fi
 el
 nl
 pl
 ko
 fr
 tr
 cs
 es
 it
 pt
 ru
 sv
 en_CA
 uk_UA
 en_ZA
 en_GB
 id_ID
 en_IE
 bg_BG
 ar_EG
 en_SG
 th_TH
 fi_FI
 sl_SI
 zh_HK
 sk_SK
 zh_CN
 hi_IN
 en_IN
 vi_VN
 ro_RO
 hr_HR
 ca_ES
 sr_RS
 en_US
 es_US
 lt_LT
 pt_PT
 en_AU
 hu_HU
 lv_LV
 zh_TW
 en_NZ
 fr_CA
 nl_BE
 fr_BE
 de_DE
 sv_SE
 de_CH
 fr_CH
 it_CH
 tl_PH
 de_LI
 da_DK
 he_IL
 ar_IL
 nl_NL
 pl_PL
 nb_NO
 ja_JP
 pt_BR
 fr_FR
 el_GR
 ko_KR
 tr_TR
 es_ES
 de_AT
 it_IT
 ru_RU
 cs_CZ
 en
 ar
 hu
 iw

 (Interestingly enough, calling Activity.getAssets().getLocales() returns
 almost the same list, just with hi appended.)

 When I switch my app to some of the languages which are *not* offered by
 the LI menu but *do* appear on the getLocales() list, it turns out that
 some work (like Portuguese, German, Japanese, Chinese) and some don't
 (Hindi, Arabic). Works mean that legible text is displayed, doesn't
 work means that all glyphs are replaced with rectangles in the rendered
 text.

 I believe the LocalePicker code you linked to doesn't run on that device
 (or additional, much stricter filtering is applied elsewhere), and I'm
 still not sure how to filter the getLocales() list to remove languages that
 the device is actually not able to display.


 On Thu, Jun 13, 2013 at 6:22 PM, Latimerius l4t1m3r...@gmail.com wrote:

 Thanks, that's good info.  The reason I didn't check the source in this
 case is, first, with min sdk of 7 that's a lot of source to check ;-) , and
 second that this whole issue is fairly peripheral to our app.

 I'm wondering if I can be reasonably sure that this code (or an
 equivalent) runs in a majority of devices.  Off-hand, it doesn't seem to
 explain what e.g. Optimus One shows in its LI menu (I'll do a detailed
 check tonight or tomorrow).


 On Wed, Jun 12, 2013 at 4:39 PM, Kostya Vasilyev kmans...@gmail.comwrote:

 Settings app:


 https://android.googlesource.com/platform/packages/apps/Settings/+/refs/heads/master/src/com/android/settings/LocalePicker.java

 Uses this:


 https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/com/android/internal/app/LocalePicker.java

 It's basically Resources.getSystem().**getAsset**s().getLocales() which
 you'd already mentioned, but the code here does some filtering, to make the
 list look prettier -- which explains the different results.

 When in doubt, use the source :)

 -- K

 On Wednesday, June 12, 2013 5:55:35 PM UTC+4, Piren wrote:

 Your reasoning is sound, but you're barking at the wrong tree... What
 shows in Language  Input can be summed up to This is what the company
 that made the specific ROM you're using wanted the users to see when they
 use the device, which has little affect on your app. Any language that
 shows there, will mean that you can support it as well, but that list is
 very short, much shorter than the actual list of supported locales and
 fonts. That list is usually just the default provided by google plus some
 of the leading languages used in the region the device is aimed for.

 By localization i meant - Modifications to the text so that a group of
 people would be able to understand it using their native language.
 If a device was localized to support Germany, it would obviously
 support the German language and have all of its interface display in
 German. However, it does not mean it supports all the Locales available in
 Germany (which might be different due to different dialects and customs).
 Basically what you're are aiming to do is add multiple localizations to
 your app and then intersect that list with the localizations the device can
 actually display (which is defined by its available fonts).

 Basically the list of support goes like:  Font  Locale 
 Localizations   (where the Font supports more options than Locale and
 Locale support much more options than Localizations).

 Regarding the limitation that RTL languages offer and limitations like
 that - That is up to you to verify when you create your localization...
 having a Locale

[android-developers] Re: buggy legacy options menu on Samsung S4

2013-08-08 Thread Kostya Vasilyev
Jay,

I also downloaded your test and tried it... Had to make one change -- from 
Google APIs (14) to just Android 14, or it wouldn't install...

The bug is there.

Samsung Galaxy S4, 9505 International LTE version, comes from Germany, 
firmware 4.2.2 I9505XXUAMDE (different from what gjs's device has).

-- K

On Thursday, August 8, 2013 6:35:36 PM UTC+4, Jay Howard wrote:

 First of all, thanks for taking the time to build the demo app.  It's 
 frustrating that I'm no closer to figuring out why this is happening, but 
 at least it doesn't seem to be an issue on *all* S4 devices.

 I wonder if the trait that triggers the behavior isn't hardware, but some 
 configurable option that just happens to have one value on your phone and a 
 different value on mine.  I can't think of what it might be, though.  When 
 the options menu is in the bad state it's as if the taps aren't even 
 registered by the device.  I enabled Show Pointer Location from developer 
 options, though, and I see visual feedback to indicate that taps are 
 occurring inside the bounds of the menu items I'm attempting to select.

 On Thursday, August 8, 2013 5:19:54 AM UTC-5, gjs wrote:

 Hi,

 I downloaded, unzipped  built you app in Eclipse from the source, 
 without any alterations. It did run OK on my Samsung Galaxy S4 (Android 
 V4.2.2).

 It did *not* exhibit the issues you originally mentioned, all menu items 
 working ok with the text for each item showing up ok  immediately for the 
 various key combinations include selecting 'more' and pressing that 
 hardware back button then pressing the original menu options, all was ok.

 I have attached a screenshot showing the device details used for this 
 test. It's a 4G LTE 'international' version and is an 'unlocked' device, 
 not rooted  not from a carrier, it came out of Hong Kong, I am using it in 
 Australia.

 Perhaps the issue is specific to some subset of these devices?

 Regards
 ,
 On Wednesday, August 7, 2013 11:48:28 PM UTC+10, Jay Howard wrote:

 How frustrating.  Though, I'm glad to know it works for someone else; it 
 gives me some hope that a workaround can be found.

 Couple questions about the app that's working correctly:

 1. What's the value of targetSdkVersion in your manifest?  (Mine is 
 9).
 2. What's the value of target in your project.properties file?  (Mine 
 is Google Inc.:Google APIs:14).
 3. Do you use a default theme for your app?  If so, which?  (Mine is 
 Theme.NoTitleBar).

 Is there any chance I could impose on you to build and run my demo app 
 (OptionsMenu.zip shared on Google Drive) on your S4?  The zip file 
 contains a complete Eclipse project minus the bin and gen dirs, which 
 are auto-generated.  The app is trivial and does nothing but demonstrate 
 the bad behavior.

 If possible, I'd like to determine whether this is an issue on all S4s 
 or if the device I'm using is special in some way.

 On Wednesday, August 7, 2013 3:51:02 AM UTC-5, gjs wrote:

 Hi,

 I have a Samsung Galaxy S4 with Android 4.2.2 plus an app  activities 
 that have legacy option menus with more than six items, including more 
 that uses onCreateOptionsMenu() as well as onPrepareOptionsMenu() and 
 onOptionsItemSelected().

 When I try to reproduce your steps I do *not* get the same issues you 
 mention, all menu options work OK when using the key combinations you 
 mention.

 The main difference I can see when looking at your code sample on SO, 
 is that I do *not* use an inflator to inflate the menu items from a static 
 xml file in onCreateOptionsMenu(). 

 Instead I am creating the menu ( sub menu) items in java code 
 dynamically at runtime, within onCreateOptionsMenu()  also 
 onPrepareOptionsMenu(), adding  removing menu items to  from the 
 menu object 'by hand', the reason I'm doing this is that the menu items 
 need to vary according to the current context of the activity, perhaps you 
 could try the same  see if that works ok on an S4.

 Another suggestion, instead of creating menu items dynamically at 
 runtime in java code - which is probably not a recommended practice, is to 
 try your inflator code within onPrepareOptionsMenu(), remembering to 
 call menu.clear() before the inflator and see if that works any better.

 See for details 
 http://developer.android.com/reference/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu)

 Good luck.

 On Wednesday, August 7, 2013 2:01:17 AM UTC+10, Jay Howard wrote:

 I'm seeing the following behavior (on a Samsung S4, but potentially 
 also on other Samsung devices) in an app that uses a legacy options 
 menu:

 1. User taps hardware menu button to bring up options menu.  There are 
 more than six items in the menu.
 2. User taps the bottom-right more button to access the overflow 
 menu items.
 3. User taps the hardware back button to return to the initial options 
 menu.
 4. User taps any combination of menu items, potentially multiple times 
 each.  Nothing happens.  onOptionsItemSelected() is never 

Re: [android-developers] Re: Writing file to app folder

2013-08-06 Thread Kostya Vasilyev
If the device runs Android 3.0 and above, you will need to submit the file
to the media scanner before it's picked up by the MTP provider.

Oh, and it looks like your file is in the app's private area -- not sure if
that's at all accessible via MTP (and definitely requires rooting to see in
a file manager).

-- K


2013/8/7 dashman erjdri...@gmail.com

 This is a Droid Razr HD.

 I don't get a prompt to mount.

 USB debugging is enabled and it auto connects via MTP.

 In Windows Explorer, I can access the device storage - but
 there's no virtual drive (e.g. F:) created.




 On Tuesday, August 6, 2013 1:59:21 PM UTC-4, dashman wrote:

 I'm writing a data file to my app folder

 /Android/data/package/files

 and the file is visible from my android phone file explorer app.

 But when I use the desktop Windows file explorer - it's not visible.


 This is how i'm writing the file out:

 File storageFolder = mContext.getExternalFilesDir(**null);

 java.io.BufferedWriter out = new java.io.BufferedWriter(
 new java.io.FileWriter( storageFolder.getAbsolutePath(**) + /temp.txt)
 );


 As written above - the file is written out - verified.



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




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




Re: [android-developers] Re: ContentResolver insert return null on 4.3

2013-08-04 Thread Kostya Vasilyev
But why would you want to directly insert data like that in the first place?

The SDK has a helper class, MediaScannerConnection, which submits a file 
for scanning, and makes sure it's properly indexed by the system. If you're 
going to use VIEW_ACTION, you can subclass and wait for the scan to 
complete.

On my Nexus 7 (last year's model) with 4.3, this whole thing takes all of 
100ms, probably less than the intent chooser's opening animation.

( I still think that making apps responsible for maintaining system level 
data structures was a weird decision... :) )

-- K

On Sunday, August 4, 2013 12:24:03 PM UTC+4, eli wrote:

 The solution for this issue is to query the Database, instead of insert to 
 it, I posted the full solution with code to this issue in my blog:

 http://androidwarzone.blogspot.co.il/2013/08/media-play-and-share-to-youtube-breaks.html


 Eli


 On Fri, Aug 2, 2013 at 11:20 PM, Eli Hasson hasso...@gmail.comjavascript:
  wrote:

 Yep,
 Looks like I found the issue:
 08-02 23:11:54.524: E/SQLiteDatabase(11214): Error inserting 
 bucket_id=1643208667 media_type=3 title=out.mp4 storage_id=65537 
 mime_type=video/mp4 date_modified=1375474313 _display_name=out.mp4 
 date_added=1375474314 parent=1184 _size=325469 format=12299 
 _data=/storage/emulated/0/compressed/out.mp4 bucket_display_name=compressed
 08-02 23:11:54.524: E/SQLiteDatabase(11214): 
 android.database.sqlite.SQLiteConstraintException: column _data is not 
 unique (code 19)

 The thing is, Google changed the functionality of the insert, seems that 
 column data must be unique.
  
 Eli


 On Fri, Aug 2, 2013 at 11:02 PM, Nobu Games 
 dev.nob...@gmail.comjavascript:
  wrote:

 Is there anything in log cat related to MediaStore?


 On Friday, August 2, 2013 2:43:17 PM UTC-5, eli wrote:

 Thanks for your answer, I just entered hard coded values there to make 
 the code more clear, this is not the issue.

 Eli
 On Aug 2, 2013 10:29 PM, Nobu Games dev.nob...@gmail.com wrote:

 Sorry Eli,

 I should have read your code more carefully. You're hard-coding file 
 paths in that insert request which is bad practice. You cannot assume 
 that 
 there paths like /sdcard/... on all Android devices. They can be named 
 completely differently depending on device / manufacturer and especially 
 on 
 Jelly Bean there's  something like a virtual file system for supporting 
 multiple user accounts and these file paths look totally different.

 You should make use of the context.getExternalStorage(...**) and 
 related methods (also look into the Environment class).

 Maybe the hard-coded file path is the problem there?

 On Friday, August 2, 2013 2:20:50 PM UTC-5, eli wrote:

 It always return null on 4.3, and works perfectly on all other 
 versions.
 On Aug 2, 2013 10:13 PM, Nobu Games dev.nob...@gmail.com wrote:

 I just had a quick peek at the API level 14 source code and it looks 
 like there are two possible reasons for that problem:

 1. The actual ContentProvider the ContentResolver connected to 
 returns null on insert (for whatever reason, that is a mystery)
 2. A RemoteException was thrown during the insert operation. The 
 exception is caught by the ContentResolver and it returns just null 
 instead. The reason for that is (according to the source code comment) 
 that 
 the process / app is about to die anyway.

 Other ContentResolver methods behave exactly the same. Also the 
 query methods. It can - without a warning - just return null, even 
 though 
 it works in your tests a million times.

 You therefore need to check the result for null and come up with a 
 strategy for coping with that problem, like scheduling a re-query or 
 checking if your activity is about to be finished.

 On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:

 This code works on all Android versions except on 4.3:

ContentValues content = new 
 ContentValues(4);
 content.put(Video.**VideoColumns.TITLE, vid.mp4);
 content.put(Video.**VideoColumns.DATE_ADDED,
 System.currentTimeMillis() / 1000);
 content.put(Video.Media.MIME_**TYPE, video/mp4);
 content.put(MediaStore.Video.**Media.DATA, 
 /sdcard/vid.mp4);
 ContentResolver resolver = getContentResolver();
* Uri uri = resolver.insert(MediaStore.Vid
 eo.Media.EXTERNAL_CONTENT_URI,*
 *content);*

 On 4.3 *uri *is null.
 Can someone help?

  Thanks,
 Eli

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

Re: [android-developers] Dealing with 1000's of different devices, each one with its own bugs

2013-07-31 Thread Kostya Vasilyev
The i9000 - oh yeah!

The file system freezes alone were a killer, and then when they implemented 
a fix, it was preventing apps from saving their own shared preferences.

Today's top of the line Samsung devices seem to be much better (haven't run 
into anything on my Galaxy Note 2, myself, but then I don't develop games), 
but their middle- and low- end devices are still really weird. Just had an 
issue reported for one of them, which I am able to reproduce only on my 2.3 
devices - and this Samsung runs 4.0/4.1. Did they screw up the merge / 
rebase?

-- K

On Wednesday, July 31, 2013 4:02:38 PM UTC+4, Piren wrote:

 The Galaxy S (especially the i9000) is one of the shittiest devices i've 
 worked on, without a doubt.

 On Wednesday, July 31, 2013 2:47:38 PM UTC+3, Omer Gilad wrote:

 No problem - you want practical examples, I have literally an endless 
 amount... 
 I will try not to collapse Google servers or something, so I'll post just 
 a few.

 By the way - read the original post - I am NOT talking about official 
 fragmentation. 
 Not screen sizes, API levels features and so on.
 I'm talking about BUGS.

 All the issues below were tested with a device in front of me, these are 
 not just assumptions.
 Ok, let's go:

 1. On Samsung Galaxy S and most of its variants, when you use this simple 
 and documented intent: 
 http://developer.android.com/guide/topics/media/camera.html#intent-image

 The camera app behaves completely differently, and will sometimes ignore 
 MediaStore.EXTRA_OUTPUT.
 If you run the same code that would work on any other device, most likely 
 you'll crash on a NullPointer, unless you workaround for Samsung.
 Tested with the device in 

 2. The API AudioManager.setMicrophoneMute (
 http://developer.android.com/reference/android/media/AudioManager.html#setMicrophoneMute(boolean))
  
  doesn't work at all on some Motorola devices (Milestone variants).
 It will literally do nothing, not mute the mic and even tell that you DID 
 mute the mic (isMicrophoneMute will return true after that).

 3. Using a GLSL shader with 4x3 matrix multiplication containing some 0's 
 on Galaxy S4 will miscalculate the result, and produce artifacts because of 
 that.
 Every other device does the same calculation fine, except S4.

 4. Using camera preview on some Sony Xperia variants (
 http://developer.android.com/reference/android/hardware/Camera.html#setPreviewCallback(android.hardware.Camera.PreviewCallback))
  
 will give you flipped or even cut preview frames - so it's completely 
 useless for implementing video calling on these devices.

 5. Reading from the proximity sensor on Motorola Milestone variants (
 http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_PROXIMITY)
  
 will give you completely unrelated values, different from every other 
 device and ignoring the sensor specification (getMaximumRange() and so on).

 6. Running a GLSL shader with 8 varying vectors (the minimum of available 
 varying vectors according to the spec., that should be available on every 
 device), will cause some Galaxy S variants to reboot instantly.

 7. Using an Intent to pick an image from the gallery (
 http://stackoverflow.com/questions/5309190/android-pick-images-from-gallery) 
 on some Galaxy S variants will cause the Gallery app to crash.


 That's just the ones that came to my mind right now.
 I'm sure this can turn into a whole book when other people contribute.

 On Wednesday, July 31, 2013 1:40:14 PM UTC+3, Daniele Segato wrote:

 On 07/26/2013 12:39 AM, Omer Gilad wrote: 
  .I am wondering how developers here are dealing with the fact that 
 there 
  are 1000's of devices out there, some of them running your 
 applications 
  in very broken ways 
  .I keep running into these kind of issues again and again for the past 
 3 
  years, and to be honest, I'm fed up with it 
  .I've decided to move to iOS development, and the only way to convince 
  me otherwise is to give me a decent, reliable way of dealing with 
  fragmentation 
  
 [snip] 
  
  To make it clear, I'm not talking about official fragmentation. 
  I don't talk about different screen sizes, densities, features, OS 
  versions and so on. 
  I talk about the unofficial fragmentation. The fact that most 
 devices, 
  even the popular ones from the big companies like Samsung, HTC, 
  Motorola, LG and so on, contain tons of implementation bugs that 
 prevent 
  apps from working correctly. 
  I'm talking about the fact that you can call a certain simple API, 
 test 
  it on a stock Android ROM (like on Nexus 4), and then have your 
  application crash on some Samsung, that decided to break the 
  implementation because of some customization. 
  
  How can people stand that? 
  How is it possible to write code, when the machine that executes it is 
  completely broken in unexpected ways? 
  
 [snip] 

 I feel a little put off by this. 

 Never had issues like the one you describe when doing the things are 
 they are supposed 

[android-developers] Re: Do SQLiteDatabase references go stale?

2013-07-31 Thread Kostya Vasilyev


On Thursday, August 1, 2013 2:01:29 AM UTC+4, Nathan wrote:


  

 In older Android versions that error was not treated gracefully and the 
 database file could get corrupted. In newer versions you are greeted with 
 an exception. When the database file gets corrupted, the default behavior 
 of SQLiteDatabase is silently dropping the whole database file and 
 creating a new one, so basically you start from scratch in such a situation 
 and probably your table creation / setup routines kick in and start fresh.


 Sounds horrible, and has probably happened to a few unfortunate users.  


Recent Android versions, too, have code to detect database being corrupted 
and then delete and re-create (the database obviously loses all its data). 
I see this happen in my app from time to time -- it's *extremely* rare and 
*extremely* unpleasant to the users. Not sure what the origin of the issue 
is - bugs in SQLite, or maybe flash memory going bad?

As for not opening the same file, have you considered File#getCanonicalPath?

http://developer.android.com/reference/java/io/File.html#getCanonicalFile()

Not sure if it'll properly resolve all those compatibility and profile 
specific memory card paths that ICS/JB have, but perhaps it's worth a try?

-- K
 

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




Re: [android-developers] Re: Dealing with 1000's of different devices, each one with its own bugs

2013-07-31 Thread Kostya Vasilyev
Since pretty much everyone agrees that the CTS misses things...

Wouldn't it be worthwhile to not only track device specific issues, but to 
also add tests to a fork of CTS?

Google might then accept those enhancement, or might not, it would still be 
helpful in any case.

-- K

On Wednesday, July 31, 2013 9:11:24 PM UTC+4, Kristopher Micinski wrote:

 Just because a test suite doesn't cover all possible behavior doesn't 
 mean stricter enforcement wouldn't help developers. 

 Test suites don't cover all of the codebase by definition, that's why 
 they're called test suites :-) 

 So I'm in favor of setting up a tracker for device bugs, but that 
 doesn't also mean that stricter enforcement of bugs couldn't aid 
 developers.  E.g., to mention one of Omer's points: there could have 
 been a CTS test to test the gallery app on that intent.  (I believe 
 other intents are tested...) 

 Kris 


 On Wed, Jul 31, 2013 at 12:46 PM, Daniele Segato 
 daniele...@gmail.com javascript: wrote: 
  On 07/31/2013 05:17 PM, Kristopher Micinski wrote: 
  
  Yes.  To install Google Play or Google apps, you absolutely are 
  required to pass the CTS. 
  
  But, from your discussion, the CTS obviously doesn't test all parts of 
  the  Android platform: it's just a test suite. 
  
  
  Yes, and never will. 
  
  It may be a good idea to contact them and ask if they can help in 
 setting up 
  a bug database for incompatibilities between different android versions. 
  
  No idea on how to contact 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
--- 
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.




Re: [android-developers] Re: Dealing with 1000's of different devices, each one with its own bugs

2013-07-28 Thread Kostya Vasilyev
I don't have one, can only share more pain :)

Most users are very reluctant to accept explanations like that, because the
devices are much more expensive than the typical Android app.

It's just psychology: I paid $xxx for this, and it's 'top of the line', do
you mean to tell me there is something wrong with it? The salesman said
it's a 'business' phone. It has the latest Android!, etc.

Google's magic, like I said before :) Everyone knows Windows is buggy
(although I don't recall having any issues with it, for a long time), but
Android is just perfect by definition.

I also love but this other app -- in my case, it mostly has to do
with buggy mail servers (IMAP, typically). An explanation that goes along
the lines of the spec say the server must do this, and it's black English
letters on a white background, no way to misread it, and it works with mail
services X, Y, Z and a dozen others doesn't always fly either.

-- K



2013/7/29 Thomas Jakway thomasjakw...@gmail.com

 Does anyone have a workaround for one of the bigger problems of this mess:
 users will blame your app and write bad reviews?
 That sounds like a joke, but really, has anyone had success just telling
 users sorry, Samsung's fault :(?
 Would be a shame to lose sales because of the vendor's problems.


 On Thursday, July 25, 2013 3:39:14 PM UTC-7, Omer Gilad wrote:

 .I am wondering how developers here are dealing with the fact that there
 are 1000's of devices out there, some of them running your applications in
 very broken ways
 .I keep running into these kind of issues again and again for the past 3
 years, and to be honest, I'm fed up with it
 .I've decided to move to iOS development, and the only way to convince me
 otherwise is to give me a decent, reliable way of dealing with fragmentation

 So what do you do when you develop a game, for example, and try to create
 a high-quality user experience on Google Play?
 Do you do your QA on 50 different devices? 100? 1000?
 Or do you just shoot blindly and hope that it works, or wait for users to
 send you bug reports?

 To make it clear, I'm not talking about official fragmentation.
 I don't talk about different screen sizes, densities, features, OS
 versions and so on.
 I talk about the unofficial fragmentation. The fact that most devices,
 even the popular ones from the big companies like Samsung, HTC, Motorola,
 LG and so on, contain tons of implementation bugs that prevent apps from
 working correctly.
 I'm talking about the fact that you can call a certain simple API, test
 it on a stock Android ROM (like on Nexus 4), and then have your application
 crash on some Samsung, that decided to break the implementation because of
 some customization.

 How can people stand that?
 How is it possible to write code, when the machine that executes it is
 completely broken in unexpected ways?

 I'm really fed up with it.
 About 50% of my Android development time is wasted on babysitting broken
 devices.
 I'm waiting for an official Google response about this, and what have you
 been doing in all those years to fix that.
 I've heard about things like conformance tests for devices and so on,
 but the reality is far from acceptable in this area.

 ,Looking forward for helpful responses
 Omer

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




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




  1   2   3   4   5   6   7   8   9   10   >