Re: [android-developers] Unexpected SecurityException

2013-09-29 Thread Piren
As far as i know, it's not the device, it's the OS. It fails on 4.2 and 
above.

On Sunday, September 29, 2013 8:25:40 PM UTC+3, Harri Smått wrote:
>
> Hi,
>
> I would be more interested why other devices you've ran this code on (?) 
> have not caused similar exception. According to docs 
> Intent.ACTION_AIRPLANE_MODE_CHANGED should be protected for system usage 
> only.
>
> --
> Harri
>
>
> On Sun, Sep 29, 2013 at 6:06 PM, elio francesconi 
> 
> > wrote:
>
>> Hi all,
>>
>> I wrote an application it controls dynamically the AIRPLANE_MODE, this is 
>> the piece of code:
>>
>> *
>>  // toggle airplane mode
>> android.provider.Settings.System.putInt(
>>   mContext.getContentResolver(),
>>   android.provider.Settings.System.AIRPLANE_MODE_ON, on ? 1 : 0);
>>  // Post an intent to reload
>>  Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
>> intent.putExtra("state", on);
>>  mContext.sendBroadcast(intent);
>> *
>>  
>> I noticed a call stack exception on Nexus 4 only, 
>>
>> Full Stack Trace:
>>
>> java.lang.SecurityException
>> android.os.Parcel.readException(Parcel.java:1431)
>>
>> android.os.Parcel.readException(Parcel.java:1385)
>> android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:2224)
>>
>> android.app.ContextImpl.sendBroadcast(ContextImpl.java:1046)
>> android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:344)
>>
>>
>> Have you experience on such kind of exceptions?
>>
>> Thanks 
>>
>> Elio
>>
>>  -- 
>> 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: InApp Billing v3 and multiple accounts

2013-09-29 Thread kj
I'm not saying that getting the Google account name via the API wouldn't be 
useful, but unfortunately that doesn't exist right now. I agree that 
forcing accounts is not user friendly and probably isn't a good idea for 
the majority of apps, but it is an option that may be considered. Sticking 
with the default IAB model of purchases being tied to the Google account 
that downloaded the app works for most cases and users have a reasonable 
expectation of how that will work.

What I meant by current Google account is what Alexander mentioned 
previously, that the Google account making the purchase is the one that 
downloaded the app from the Play store.

On Sunday, September 29, 2013 9:48:18 PM UTC-4, Nikolay Elenkov wrote:
>
> On Mon, Sep 30, 2013 at 7:56 AM, kj > 
> wrote: 
> > The Google IAB dialog has the Google account name that will be 
> associated 
> > with the purchase. In-app purchases are generally understood to be tied 
> to 
> > your Google account and apps you download/purchase are associated with 
> the 
> > account used in Google play. 
> >... 
> > ... If you need more explicit guaruntees of user behavior, force them to 
> make 
> > accounts. 
>
> Your point being? Letting the developer know what account the user used to 
> buy an IAB item, etc. is genuinely useful. It has been requested countless 
> times, but the it's not part of the API. 'Force them to make accounts' is 
> hardly user friendly and is really BS in a world where people are used to 
> simply using their Google/FB, etc. account. Additionally Google is 
> aggressively 
> pushing OAuth and more specifically G+ accounts for *everything* now, so 
> forcing people to create a bunch of throw-away accounts just to 
> compensate for the limitations of the IAB API is not only bad advice, it 
> also 
> goes against even Google's policy. And BTW, what exactly is 'the current 
> Google account'? 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android 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: InApp Billing v3 and multiple accounts

2013-09-29 Thread Nikolay Elenkov
On Mon, Sep 30, 2013 at 7:56 AM, kj  wrote:
> The Google IAB dialog has the Google account name that will be associated
> with the purchase. In-app purchases are generally understood to be tied to
> your Google account and apps you download/purchase are associated with the
> account used in Google play.
>...
> ... If you need more explicit guaruntees of user behavior, force them to make
> accounts.

Your point being? Letting the developer know what account the user used to
buy an IAB item, etc. is genuinely useful. It has been requested countless
times, but the it's not part of the API. 'Force them to make accounts' is
hardly user friendly and is really BS in a world where people are used to
simply using their Google/FB, etc. account. Additionally Google is aggressively
pushing OAuth and more specifically G+ accounts for *everything* now, so
forcing people to create a bunch of throw-away accounts just to
compensate for the limitations of the IAB API is not only bad advice, it also
goes against even Google's policy. And BTW, what exactly is 'the current
Google account'?

-- 
You received this message because you are subscribed to the Google
Groups "Android 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: InApp Billing v3 and multiple accounts

2013-09-29 Thread kj
The Google IAB dialog has the Google account name that will be associated 
with the purchase. In-app purchases are generally understood to be tied to 
your Google account and apps you download/purchase are associated with the 
account used in Google play. You could force your users to create user 
accounts with your service if you want to avoid this kind of Google 
associated purchasing altogether, but you are going to have a bit more 
friction for new users. You can just auto generate accounts for your app 
and associate purchases with said auto generated account, that way 
purchases are unique to a device rather than something that a user can take 
with them to a new device. Other than that, those are the only real 
options. If you need more explicit guaruntees of user behavior, force them 
to make accounts. If you don't need that, it is OK to use the current 
Google account.

On Sunday, September 29, 2013 3:44:34 PM UTC-4, Alexander Osmanov wrote:
>
> Yes, that is my problem if I want to bind server side to Google account. I 
> can't rely on first account being the one I should use and I don't think 
> that something like showing an account picker and saying "choose the 
> account you used for purchasing blah blah to create blah blah" is a good 
> idea. Users still will be able to choose another account and don't have it 
> on other device with all the consequences. That's why I'm so confused. If 
> only there was a way to know for sure which account is used for IAB.
>
> On Sunday, September 29, 2013 11:26:29 PM UTC+4, kj wrote:
>>
>> Weird, I didn't realize that the Google Play downloading account would be 
>> used, although this makes sense. Ultimately though the user making the 
>> purchase isn't configurable by your app since you'll be stuck with the 
>> downloading Google account anyway.
>>
>> On Sunday, September 29, 2013 2:40:11 PM UTC-4, Alexander Osmanov wrote:
>>>
>>> Kj, I did a research today, published my app through alpha testing on 
>>> Google Play and tried downloading it using several accounts. I can confirm 
>>> that IAB is NOT limited to primary Google account. Whichever account I use 
>>> for downloading the app from Google play is then used for IAB.
>>>
>>> On Saturday, September 28, 2013 5:41:45 PM UTC+4, kj wrote:

 As others mentioned, IAB is limited to the primary Google account. 
 Users that need truly separated user accounts will use the multi-user 
 accounts options on Jelly Bean tablets, so their primary Google accounts 
 will be different. This isn't confusing: when you make a purchase with a 
 Google account, it is tied to that account. If your web app/service has 
 its 
 own user account system, tie that transaction to that user account at 
 purchase time or later on when that Google user makes an account. Your app 
 and webapp should provide a way to view the IAPs for accounts so the user 
 knows what they have purchased.

 On Thursday, September 26, 2013 6:20:30 AM UTC-4, Alexander Osmanov 
 wrote:
>
> Hello,
>
>   I'm having a hard time with figuring out the right way to approach 
> handling in app purchases for users with multiple accounts. I am 
> using Appengine Endpoints to implement my server side API. This API 
> returns 
> some data to my users. As soon as user purchases a certain product API 
> will 
> return additional data. I want to make it more secure by enabling OAuth 
> authentication to my endpoints. So as soon as user purchases something it 
> is verified and remembered on a server. Thus my API endpoint will always 
> know what data to return to a particular user.
>
> But what should I do if a user has more than one account? I couldn't 
> find the way how to obtain account the app uses for IAP (according to 
> documentation it's the account used to download the app). So I either 
> have 
> to blindly pick first account or let user pick an account. But what if 
> they 
> pick another account and all their purchases would go to a different 
> account? This creates a lot of problems. For instance if user has only 
> one 
> account on another device it will either not have server side info 
> available or will not have Google Play recognizing as a buyer. Basically 
> we 
> will end up with two sources of info - Google Play and my server possibly 
> conflicting with each other because of accounts. 
>
> What makes problem even harder is that I don't want to force users 
> logging in using their account as this really doesn't add much value to 
> app 
> at the moment. But at the same I want to avoid just sending purchased 
> flag 
> to my API based on some my local data (which can be compromised).
>
> What is the appropriate strategy for handling this I would say quite 
> common situation? If only there was a way to know for sure which account 
> the a

[android-developers] how to create button with one image background and one image inside and text

2013-09-29 Thread Amit Mangal
Hi Team,

hope you all are doing good.
i want to create a button with one image in background and one inside
button and want to write small text on that.

i have attached the sample picture any idea how to create that .
i want to add text inside button image dynamically .

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: InApp Billing v3 and multiple accounts

2013-09-29 Thread Alexander Osmanov
Yes, that is my problem if I want to bind server side to Google account. I 
can't rely on first account being the one I should use and I don't think 
that something like showing an account picker and saying "choose the 
account you used for purchasing blah blah to create blah blah" is a good 
idea. Users still will be able to choose another account and don't have it 
on other device with all the consequences. That's why I'm so confused. If 
only there was a way to know for sure which account is used for IAB.

On Sunday, September 29, 2013 11:26:29 PM UTC+4, kj wrote:
>
> Weird, I didn't realize that the Google Play downloading account would be 
> used, although this makes sense. Ultimately though the user making the 
> purchase isn't configurable by your app since you'll be stuck with the 
> downloading Google account anyway.
>
> On Sunday, September 29, 2013 2:40:11 PM UTC-4, Alexander Osmanov wrote:
>>
>> Kj, I did a research today, published my app through alpha testing on 
>> Google Play and tried downloading it using several accounts. I can confirm 
>> that IAB is NOT limited to primary Google account. Whichever account I use 
>> for downloading the app from Google play is then used for IAB.
>>
>> On Saturday, September 28, 2013 5:41:45 PM UTC+4, kj wrote:
>>>
>>> As others mentioned, IAB is limited to the primary Google account. Users 
>>> that need truly separated user accounts will use the multi-user accounts 
>>> options on Jelly Bean tablets, so their primary Google accounts will be 
>>> different. This isn't confusing: when you make a purchase with a Google 
>>> account, it is tied to that account. If your web app/service has its own 
>>> user account system, tie that transaction to that user account at purchase 
>>> time or later on when that Google user makes an account. Your app and 
>>> webapp should provide a way to view the IAPs for accounts so the user knows 
>>> what they have purchased.
>>>
>>> On Thursday, September 26, 2013 6:20:30 AM UTC-4, Alexander Osmanov 
>>> wrote:

 Hello,

   I'm having a hard time with figuring out the right way to approach 
 handling in app purchases for users with multiple accounts. I am using 
 Appengine Endpoints to implement my server side API. This API returns some 
 data to my users. As soon as user purchases a certain product API will 
 return additional data. I want to make it more secure by enabling OAuth 
 authentication to my endpoints. So as soon as user purchases something it 
 is verified and remembered on a server. Thus my API endpoint will always 
 know what data to return to a particular user.

 But what should I do if a user has more than one account? I couldn't 
 find the way how to obtain account the app uses for IAP (according to 
 documentation it's the account used to download the app). So I either have 
 to blindly pick first account or let user pick an account. But what if 
 they 
 pick another account and all their purchases would go to a different 
 account? This creates a lot of problems. For instance if user has only one 
 account on another device it will either not have server side info 
 available or will not have Google Play recognizing as a buyer. Basically 
 we 
 will end up with two sources of info - Google Play and my server possibly 
 conflicting with each other because of accounts. 

 What makes problem even harder is that I don't want to force users 
 logging in using their account as this really doesn't add much value to 
 app 
 at the moment. But at the same I want to avoid just sending purchased flag 
 to my API based on some my local data (which can be compromised).

 What is the appropriate strategy for handling this I would say quite 
 common situation? If only there was a way to know for sure which account 
 the app used for purchases, all my problems would be gone.

 Thanks,
 Alex.

>>>

-- 
You received this message because you are subscribed to the Google
Groups "Android 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: InApp Billing v3 and multiple accounts

2013-09-29 Thread kj
Weird, I didn't realize that the Google Play downloading account would be 
used, although this makes sense. Ultimately though the user making the 
purchase isn't configurable by your app since you'll be stuck with the 
downloading Google account anyway.

On Sunday, September 29, 2013 2:40:11 PM UTC-4, Alexander Osmanov wrote:
>
> Kj, I did a research today, published my app through alpha testing on 
> Google Play and tried downloading it using several accounts. I can confirm 
> that IAB is NOT limited to primary Google account. Whichever account I use 
> for downloading the app from Google play is then used for IAB.
>
> On Saturday, September 28, 2013 5:41:45 PM UTC+4, kj wrote:
>>
>> As others mentioned, IAB is limited to the primary Google account. Users 
>> that need truly separated user accounts will use the multi-user accounts 
>> options on Jelly Bean tablets, so their primary Google accounts will be 
>> different. This isn't confusing: when you make a purchase with a Google 
>> account, it is tied to that account. If your web app/service has its own 
>> user account system, tie that transaction to that user account at purchase 
>> time or later on when that Google user makes an account. Your app and 
>> webapp should provide a way to view the IAPs for accounts so the user knows 
>> what they have purchased.
>>
>> On Thursday, September 26, 2013 6:20:30 AM UTC-4, Alexander Osmanov wrote:
>>>
>>> Hello,
>>>
>>>   I'm having a hard time with figuring out the right way to approach 
>>> handling in app purchases for users with multiple accounts. I am using 
>>> Appengine Endpoints to implement my server side API. This API returns some 
>>> data to my users. As soon as user purchases a certain product API will 
>>> return additional data. I want to make it more secure by enabling OAuth 
>>> authentication to my endpoints. So as soon as user purchases something it 
>>> is verified and remembered on a server. Thus my API endpoint will always 
>>> know what data to return to a particular user.
>>>
>>> But what should I do if a user has more than one account? I couldn't 
>>> find the way how to obtain account the app uses for IAP (according to 
>>> documentation it's the account used to download the app). So I either have 
>>> to blindly pick first account or let user pick an account. But what if they 
>>> pick another account and all their purchases would go to a different 
>>> account? This creates a lot of problems. For instance if user has only one 
>>> account on another device it will either not have server side info 
>>> available or will not have Google Play recognizing as a buyer. Basically we 
>>> will end up with two sources of info - Google Play and my server possibly 
>>> conflicting with each other because of accounts. 
>>>
>>> What makes problem even harder is that I don't want to force users 
>>> logging in using their account as this really doesn't add much value to app 
>>> at the moment. But at the same I want to avoid just sending purchased flag 
>>> to my API based on some my local data (which can be compromised).
>>>
>>> What is the appropriate strategy for handling this I would say quite 
>>> common situation? If only there was a way to know for sure which account 
>>> the app used for purchases, all my problems would be gone.
>>>
>>> Thanks,
>>> Alex.
>>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android 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 

> 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 
>>
>> 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] Re: Is anybody using amazon S3 for uploading files from android?

2013-09-29 Thread Dev Droid
@Frank LoVecchio  Can you share the code please how did you did uploaded to 
s3 using multipart please ?

On Friday, March 18, 2011 9:34:52 PM UTC+5:30, Frank LoVecchio wrote:
>
> I've gotten a multipart upload to work, I will give it a shot on 
> Android and get back to you Monday if you haven't gotten this to work 
> yet :) 
>
> On Feb 24, 12:48 am, ishwarya  wrote: 
> > Hi there, 
> > 
> > I am trying to upload image file from my android app to 
> > amazon s3.The problem is that the files are not getting properly 
> > uploaded to S3. 
> > 
> > I am using PutObjectRequest as follows to upload file to S3 
> > 
> > PutObjectRequest p=new PutObjectRequest(String 
> > 
> > Bucketname,Stirng key,InputStream in,ObjectMetadata metadata); 
> > 
> > Upload myUpload = tx.upload(p); 
> > 
> > //In ObjectMetadata argument I am passing only the content length 
> > 
> > When viewed through AWS management console to check the properties of 
> > the uploaded file, I could see 
> > only 32 Bytes of 5.2 KB image file getting uploaded. 
> > 
> > Also, under the Metadata tab of the file in the AWS console, I am able 
> > to see the value of the file as "application/octet-stream" instead of 
> > "image/jpeg" 
> > 
> > I tried doing Multipart upload but it seems to be complex. 
> > 
> > Could somebody help me with this??? 
> > 
> > Thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
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: InApp Billing v3 and multiple accounts

2013-09-29 Thread Alexander Osmanov
Kj, I did a research today, published my app through alpha testing on 
Google Play and tried downloading it using several accounts. I can confirm 
that IAB is NOT limited to primary Google account. Whichever account I use 
for downloading the app from Google play is then used for IAB.

On Saturday, September 28, 2013 5:41:45 PM UTC+4, kj wrote:
>
> As others mentioned, IAB is limited to the primary Google account. Users 
> that need truly separated user accounts will use the multi-user accounts 
> options on Jelly Bean tablets, so their primary Google accounts will be 
> different. This isn't confusing: when you make a purchase with a Google 
> account, it is tied to that account. If your web app/service has its own 
> user account system, tie that transaction to that user account at purchase 
> time or later on when that Google user makes an account. Your app and 
> webapp should provide a way to view the IAPs for accounts so the user knows 
> what they have purchased.
>
> On Thursday, September 26, 2013 6:20:30 AM UTC-4, Alexander Osmanov wrote:
>>
>> Hello,
>>
>>   I'm having a hard time with figuring out the right way to approach 
>> handling in app purchases for users with multiple accounts. I am using 
>> Appengine Endpoints to implement my server side API. This API returns some 
>> data to my users. As soon as user purchases a certain product API will 
>> return additional data. I want to make it more secure by enabling OAuth 
>> authentication to my endpoints. So as soon as user purchases something it 
>> is verified and remembered on a server. Thus my API endpoint will always 
>> know what data to return to a particular user.
>>
>> But what should I do if a user has more than one account? I couldn't find 
>> the way how to obtain account the app uses for IAP (according to 
>> documentation it's the account used to download the app). So I either have 
>> to blindly pick first account or let user pick an account. But what if they 
>> pick another account and all their purchases would go to a different 
>> account? This creates a lot of problems. For instance if user has only one 
>> account on another device it will either not have server side info 
>> available or will not have Google Play recognizing as a buyer. Basically we 
>> will end up with two sources of info - Google Play and my server possibly 
>> conflicting with each other because of accounts. 
>>
>> What makes problem even harder is that I don't want to force users 
>> logging in using their account as this really doesn't add much value to app 
>> at the moment. But at the same I want to avoid just sending purchased flag 
>> to my API based on some my local data (which can be compromised).
>>
>> What is the appropriate strategy for handling this I would say quite 
>> common situation? If only there was a way to know for sure which account 
>> the app used for purchases, all my problems would be gone.
>>
>> Thanks,
>> Alex.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android 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-09-29 Thread Robert Greenwalt
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 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 
> wrote:
>
>> I understand Sprint is investigating and may contact you for more info.
>>
>>
>> On Thu, Sep 26, 2013 at 2:01 AM, Gaurav Sharma > > 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. AT&T, 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 here 
>>>
>>> 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-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 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.
>>
>> 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-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] Unexpected SecurityException

2013-09-29 Thread Harri Smått
Hi,

I would be more interested why other devices you've ran this code on (?)
have not caused similar exception. According to docs
Intent.ACTION_AIRPLANE_MODE_CHANGED should be protected for system usage
only.

--
Harri


On Sun, Sep 29, 2013 at 6:06 PM, elio francesconi <
elio.francesc...@gmail.com> wrote:

> Hi all,
>
> I wrote an application it controls dynamically the AIRPLANE_MODE, this is
> the piece of code:
>
> *
>  // toggle airplane mode
> android.provider.Settings.System.putInt(
>   mContext.getContentResolver(),
>   android.provider.Settings.System.AIRPLANE_MODE_ON, on ? 1 : 0);
>  // Post an intent to reload
>  Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
> intent.putExtra("state", on);
>  mContext.sendBroadcast(intent);
> *
>
> I noticed a call stack exception on Nexus 4 only,
>
> Full Stack Trace:
>
> java.lang.SecurityException
> android.os.Parcel.readException(Parcel.java:1431)
> android.os.Parcel.readException(Parcel.java:1385)
> android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:2224)
> android.app.ContextImpl.sendBroadcast(ContextImpl.java:1046)
> android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:344)
>
> Have you experience on such kind of exceptions?
>
> Thanks
>
> Elio
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android 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] Unexpected SecurityException

2013-09-29 Thread elio francesconi
Hi all,

I wrote an application it controls dynamically the AIRPLANE_MODE, this is
the piece of code:

*
 // toggle airplane mode
android.provider.Settings.System.putInt(
  mContext.getContentResolver(),
  android.provider.Settings.System.AIRPLANE_MODE_ON, on ? 1 : 0);
 // Post an intent to reload
Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
intent.putExtra("state", on);
mContext.sendBroadcast(intent);
*

I noticed a call stack exception on Nexus 4 only,

Full Stack Trace:

java.lang.SecurityException
android.os.Parcel.readException(Parcel.java:1431)
android.os.Parcel.readException(Parcel.java:1385)
android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:2224)
android.app.ContextImpl.sendBroadcast(ContextImpl.java:1046)
android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:344)

Have you experience on such kind of exceptions?

Thanks

Elio

-- 
You received this message because you are subscribed to the Google
Groups "Android 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] Determine when view/views below my view have changed

2013-09-29 Thread Harri Smått
Hello All,

I'm in the midst of implementing somewhat dynamic background blur effect
for Android (similar to what iOS7 has) and I'm keen to have this one
optimisation in place.

In my implementation I'm trying to achieve following:

1. I extend default layout classes and call them blur layouts

2. When view contents below blur layout in the view tree changes, I render
what ever content there is into scaled offscreen bitmap (this is the part
needing optimisation)

3. Blur is applied on offscreen bitmap using RenderScript implementation of
stack blur

4. From then on the blur layout draws this blurred image as it's background

Now.. Currently.. I'm using ViewTreeObserver to determine when current
screen is about to update (OnPreDrawListener) but this doesn't give me any
indication whether content below my layout has changed. It's triggered no
matter what update happens on the screen and though I'm recreating the blur
image way too often - also in cases content below hasn't changed.

It would be great if someone with better knowledge on Android drawing
internals could help me out on this one. Say, if my layout occupies
Rect(100, 100, 200, 200) on the screen, I would like to observe in this
layout when content below within it's area has changed. Or is this even
possible?

For interested ones current implementation can be found here:
https://github.com/harism/android_anndblur

And precompiled application should appear in Play Market at some point.

--
Harri

-- 
You received this message because you are subscribed to the Google
Groups "Android 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] Problem with tax data migration to Wallet

2013-09-29 Thread Joan Pujol
Hi,

Has someone had problem with the migration from financial data from the 
last system to wallet?
For me the bank data and tax data was corrupted and I had to enter it 
again. I was able to enter another time the bank data but I haven't been 
able to enter the tax data because the form doesn't work.
I suppose that there is some corrupted data that makes the form crash an 
only a blank form appears and I'm not able to enter it.

The problem with this is that I'm not able to receive the money and the 
google wallet support is a nightmare. We have interchanged more than 30 
mails and phone calls in the last two months and the response is always the 
same:
Our engineers are looking into it...

It's really a nightmare that a such important issue hadn't been solved in 
more than two months and as I didn't see any progress I have writen here to 
know if other people has the same problem.

Some one had problems with data migration to wallet?

Cheers,

-- 
You received this message because you are subscribed to the Google
Groups "Android 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: Strange SQLite error, possibly in native code?

2013-09-29 Thread Piren
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 
>
> 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-29 Thread Piren
I've used both methods (webview and html textview) and found that both had 
their issues (especially with aligning images with text across screen 
sizes)... eventually nothing beats just doing it all using separate ui 
elements.

On Saturday, September 28, 2013 3:02:54 AM UTC+3, Nathan wrote:
>
>
>
> On Friday, September 27, 2013 3:15:18 PM UTC-7, Kostya Vasilyev wrote:
>>
>> 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
>>
>>
> I think it is this one and that Mark Murphy also looked at the source. 
>
>
> http://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html
>
>
>  
>
>> You will want handleStartTag
>>
>
>
> Yes, and I think I will want to do an image getter too. If I can pull 
> drawables from resources, I can show on help what buttons mean in real 
> time. 
>
> 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.


[android-developers] Re: debugging break pint not hittting

2013-09-29 Thread Piren
check you didnt forget android:debuggable="true" in the manifest

On Friday, September 27, 2013 3:00:22 PM UTC+3, Sadhna Upadhyay wrote:
>
> Hi guys,
>m trying to debug my codebut it is not hitting any line ,but in other 
> project its working then why it is not working in one project please let me 
> know if any one ave any idea
>

-- 
You received this message because you are subscribed to the Google
Groups "Android 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] Strange SQLite error, possibly in native code?

2013-09-29 Thread tarun sablok
There should be one column in your database which should be named *_id* ,
its common error !!!


On Sun, Sep 29, 2013 at 3:35 AM, 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 
>
> 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.