Re: [android-developers] Automatic Google+ sign-in

2013-09-20 Thread Douglas Drumond
Nice you found the problem.

Cheers!

--
Douglas Drumond
*GDG Campinas 
 –
**eee19.com* 
*gplus.to/douglasdrumond

* – *@douglasdrumond *



2013/9/20 FReDD 

> Well, here's an update : you actually solved my problem. The key part here
> is what you mentioned : *unless they signed out*.
> I had implemented an automatic sign out on leaving the game, I mixed up
> Google+ sign in and Games Client connection.
>
> A big thank you,
>
> FReDD
>
> Le vendredi 20 septembre 2013 23:45:22 UTC+2, FReDD a écrit :
>
>> Ok, thanks for the insight. I must be doing something wrong, then, that
>> would also explain why I didn't find any results relating to this.
>> I don't know what, though, because the connection code is pretty
>> straightforward.
>> Anyway, thanks !
>>
>> Le vendredi 20 septembre 2013 03:41:09 UTC+2, Douglas Drumond a écrit :
>>>
>>> After the user signed in, unless they signed out, this should be
>>> automatic. At least on my phone (4.3), when I signed in my app, I had to
>>> manually sign out to test login with Google+ again because it already used
>>> the last account to login the second time I launched the app. I have three
>>> accounts on this device.
>>>
>>>
>>> --
>>> Douglas Drumond
>>> *GDG Campinas 
>>> –
>>> **eee19.com* 
>>> *gplus.to/douglasdrumond
>>> * – *@douglasdrumond *
>>>
>>>
>>>
>>> 2013/9/19 FReDD 
>>>
 Hi everyone,

 sorry if this topic has been discussed before, I didn't find a
 definitive answer.
 I am developing a game with Google Play Game capabilities (leaderboards
 & achievements).
 I implemented Google+ sign-in, following the tutorial and the provided
 code examples.

 Everything is working fine, but the problem I am currently facing
 occurs in the following scenario,
 at least on an Android 2.2 device :

- I have two Google accounts, both of them are declared and syncing
on my device
- I start my game, and a dialog (of my own) asks me whether I want
to use Google Play Game capabilities,
and therefore if I want to sign in to Google+
- I click 'Yes' and my code starts calling the Google+ sign-in API
- Android Google+ API kicks in and asks me to choose one of my two
accounts to sign in

 What I'd like for my future players is allow them to do this once, and
 never bother to sign in again (if they
 allow it, of course). Is there a way to tell the Google+ API to use one
 account in particular and use it to
 sign in automatically ?
 I can understand that a completely silent sign-in can be a privacy
 concern, but is there a way to store
 which account was used and use it later ?

 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.com
 To unsubscribe from this group, 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,

[android-developers] Lower level documentation on how Google's backend starter works w/ Android devices

2013-09-20 Thread Ken
Does anyone know of a document that describes how Google+ login and 
endpoints and GCM at the network level (what data gets sent back and forth)?
I'm trying to write a replacement backend w/o staring at Wireshark traces 
:-)

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

2013-09-20 Thread FReDD
Well, here's an update : you actually solved my problem. The key part here 
is what you mentioned : *unless they signed out*.
I had implemented an automatic sign out on leaving the game, I mixed up 
Google+ sign in and Games Client connection.

A big thank you,

FReDD

Le vendredi 20 septembre 2013 23:45:22 UTC+2, FReDD a écrit :
>
> Ok, thanks for the insight. I must be doing something wrong, then, that 
> would also explain why I didn't find any results relating to this.
> I don't know what, though, because the connection code is pretty 
> straightforward.
> Anyway, thanks !
>
> Le vendredi 20 septembre 2013 03:41:09 UTC+2, Douglas Drumond a écrit :
>>
>> After the user signed in, unless they signed out, this should be 
>> automatic. At least on my phone (4.3), when I signed in my app, I had to 
>> manually sign out to test login with Google+ again because it already used 
>> the last account to login the second time I launched the app. I have three 
>> accounts on this device.
>>
>>
>> --
>> Douglas Drumond
>> *GDG Campinas 
>>  – 
>> **eee19.com* 
>> *gplus.to/douglasdrumond
>> 
>> * – *@douglasdrumond *
>>
>>
>>
>> 2013/9/19 FReDD 
>>
>>> Hi everyone,
>>>
>>> sorry if this topic has been discussed before, I didn't find a 
>>> definitive answer.
>>> I am developing a game with Google Play Game capabilities (leaderboards 
>>> & achievements).
>>> I implemented Google+ sign-in, following the tutorial and the provided 
>>> code examples.
>>>
>>> Everything is working fine, but the problem I am currently facing occurs 
>>> in the following scenario,
>>> at least on an Android 2.2 device :
>>>
>>>- I have two Google accounts, both of them are declared and syncing 
>>>on my device
>>>- I start my game, and a dialog (of my own) asks me whether I want 
>>>to use Google Play Game capabilities,
>>>and therefore if I want to sign in to Google+
>>>- I click 'Yes' and my code starts calling the Google+ sign-in API
>>>- Android Google+ API kicks in and asks me to choose one of my two 
>>>accounts to sign in 
>>>
>>> What I'd like for my future players is allow them to do this once, and 
>>> never bother to sign in again (if they
>>> allow it, of course). Is there a way to tell the Google+ API to use one 
>>> account in particular and use it to
>>> sign in automatically ?
>>> I can understand that a completely silent sign-in can be a privacy 
>>> concern, but is there a way to store
>>> which account was used and use it later ?
>>>
>>> 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.com
>>> To unsubscribe from this group, 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 :
> 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] Automatic Google+ sign-in

2013-09-20 Thread FReDD
Ok, thanks for the insight. I must be doing something wrong, then, that 
would also explain why I didn't find any results relating to this.
I don't know what, though, because the connection code is pretty 
straightforward.
Anyway, thanks !

Le vendredi 20 septembre 2013 03:41:09 UTC+2, Douglas Drumond a écrit :
>
> After the user signed in, unless they signed out, this should be 
> automatic. At least on my phone (4.3), when I signed in my app, I had to 
> manually sign out to test login with Google+ again because it already used 
> the last account to login the second time I launched the app. I have three 
> accounts on this device.
>
>
> --
> Douglas Drumond
> *GDG Campinas 
>  – 
> **eee19.com* 
> *gplus.to/douglasdrumond
> 
> * – *@douglasdrumond *
>
>
>
> 2013/9/19 FReDD >
>
>> Hi everyone,
>>
>> sorry if this topic has been discussed before, I didn't find a definitive 
>> answer.
>> I am developing a game with Google Play Game capabilities (leaderboards & 
>> achievements).
>> I implemented Google+ sign-in, following the tutorial and the provided 
>> code examples.
>>
>> Everything is working fine, but the problem I am currently facing occurs 
>> in the following scenario,
>> at least on an Android 2.2 device :
>>
>>- I have two Google accounts, both of them are declared and syncing 
>>on my device
>>- I start my game, and a dialog (of my own) asks me whether I want to 
>>use Google Play Game capabilities,
>>and therefore if I want to sign in to Google+
>>- I click 'Yes' and my code starts calling the Google+ sign-in API
>>- Android Google+ API kicks in and asks me to choose one of my two 
>>accounts to sign in 
>>
>> What I'd like for my future players is allow them to do this once, and 
>> never bother to sign in again (if they
>> allow it, of course). Is there a way to tell the Google+ API to use one 
>> account in particular and use it to
>> sign in automatically ?
>> I can understand that a completely silent sign-in can be a privacy 
>> concern, but is there a way to store
>> which account was used and use it later ?
>>
>> 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.com
>> To unsubscribe from this group, 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] Good time to register for AnDevCon today - discount

2013-09-20 Thread Nathan
AnDevCon is in San Francisco on November 12-15th. 

It's a good time to register today. You get $400 off full price through 
today. 

On top of that, you can use the Discount code 'Mellor' to get $200 off of 
whatever ticket you order. 

I'm speaking in "Apps for Profit" and "App Discovery Optimization". But 
many smarter people than me are also speaking. You know some of them from 
these groups. 

Let me know in this thread if you plan on attending. I will see you there. 

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.


Re: [android-developers] Lower level documentation on how Google's backend starter works w/ Android devices

2013-09-20 Thread Ken


On Friday, September 20, 2013 1:25:08 PM UTC-4, Kristopher Micinski wrote:
>
> There are specific clauses in the TOS for Play (at least) that stipulate 
> you can't write apps that could compete with Google apps, under which I 
> presume this use would fall.
>

I haven't seen that in the TOS 
(http://play.google.com/intl/en_us/about/play-terms.html)...what part 
exactly do you mean?   I searched for "compet" and "replace".

It'd just be an alternative.  People have written back ends in other 
languages before.  Google's value add is their GAE infrastructure for 
scaling.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Lower level documentation on how Google's backend starter works w/ Android devices

2013-09-20 Thread Kristopher Micinski
I doubt such a thing exists, because I doubt Google would be very happy
with you using their protocol for an app.

There are specific clauses in the TOS for Play (at least) that stipulate
you can't write apps that could compete with Google apps, under which I
presume this use would fall.

Kris



On Fri, Sep 20, 2013 at 11:15 AM, Ken  wrote:

> Does anyone know of a document that describes how Google+ login and
> endpoints and GCM at the network level (what data gets sent back and forth)?
> I'm trying to write a replacement backend w/o staring at Wireshark traces
> :-)
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 USB problems

2013-09-20 Thread eli
How do I get an app to read data from a USB barcode reader if the 
usbManager can't even detect that its there.

On Thursday, September 19, 2013 3:55:19 PM UTC-4, eli wrote:

> 
> **
>   
> I have a tablet, an OTG cable and a barcode reader. I know this works 
> because when I start the Google app I can scan barcodes and see them on the 
> screen.
>
> I created a very simple application that starts the USB manager and checks 
> how many devices are attached.
>
> When I have a memory flash stick in the OTG cable the program shows 1. 
> (correct) 
>
> When I have a mouse in the OTG cable it shows 0. (why)
>
> Interesting observation. When I connect the mouse to the OTG cable it 
> works fine. I use it to click on the button to ask the usbManager how many 
> devices are attached and the response is 0.
>
>  When I attach a barcode reader to the OTG cable, the application goes 
> through onDestroy() and then shows 0. (Why does this happen)
>
> Basics of my program developed using Eclipse:
>
> In onCreate() I have:
>
> usbManager = (UsbManager)getSystemService(Context.USB_SERVICE);
>
>  
>
> In onClick() I have  (there is a button on the screen):
>
> Map usbDeviceList = 
> sbManager.getDeviceList();Toast.makeText(this, String.format("Number of 
> devices = %d", usbDeviceList.size()), Toast.LENGTH_SHORT).show();
>
>

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