[android-developers] BUSINESS /PROJECT FINANCING

2019-08-15 Thread NATHAN FLEMING
Sir/Ma,

GRUTTERIJ BELEGGINGS- EN FINANCIERINGS MIJ. BV DE is a private funder, who 
base their business model on the referral of private clients.

GBEFMBD provides private finance through the management of their own fund, 
private investment and corporate portfolios. The principal business is 
based on the Lending and Leveraging of those funds, internationally.

GBEFMBD primarily utilizes their own vast funds and assets to raise further 
loan funds through developed methods of leveraging, Insurance Bonds, bank 
guarantees or against trades. We are one of the largest Finance companies 
in Europe who operate with an Insurance Binder as Security and are one of 
the few who operate with due consideration within a strict regulatory and 
legal framework. This stringent working practice assures sound financial 
transactions with the highest standard of "best business practice".

GBEFMBD have extremely good Banking relations and hold company accounts for 
lending with top Banks, including the following:

BNP Paribas France
Credit Suisse AG
Credit Suisse International
ING Group - Netherland's
UniCredit - Italy
Rabobank - Netherlands (strongest AAA rated private bank in Europe)
Commerzbank AG - Germany
Deutsche Bank AG in Germany
KfW Bankengruppe - Germany
Intesa Sanpaolo- Italy
Pareto Bank - Norway
Nordea Bank - Finland
Alpha Bank - Cyprus
TD Bank Group - Canada
Scotiabank - Canada
Bank of America - USA
Citibank- USA
JP Morgan- USA
BNY Mellon - USA
DBS Bank - Hong Kong
Overseas Chinese Banking Corp - Hong Kong
United Overseas Bank - Hong Kong & Malaysia
National Bank - Abu Dhabi (NBAD)
National Bank Kuwait - Kuwait.

** All of which can be substantiated if required**

As leading retail and commercial bank, we have a strong base in Europe and 
follow our customers abroad. We are active internationally in areas in 
which we have substantial expertise, such as Energy, Commodities & 
Transportation (ECT) and GBEFMBD BV Clearing, and focus on our existing 
Private Lending Banking Group activities in Italy and Sweden Netherlands, 
Europe and Asia.

For further details to go about procuring a loan from: Kindly respond 
immediately to this email: andrewryan1...@gmail.com

Regards, as we await your response.

Best Regards 
Andrew Ryan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/bfd9d60b-3ed5-4aea-a009-946ee4a3388e%40googlegroups.com.


[android-developers] BUSINESS/PROJECT FINANCING

2019-08-12 Thread NATHAN FLEMING
Sir/Ma,

GRUTTERIJ BELEGGINGS- EN FINANCIERINGS MIJ. BV DE is a private funder, who 
base their business model on the referral of private clients.

GBEFMBD provides private finance through the management of their own fund, 
private investment and corporate portfolios. The principal business is 
based on the Lending and Leveraging of those funds, internationally.

GBEFMBD primarily utilizes their own vast funds and assets to raise further 
loan funds through developed methods of leveraging, Insurance Bonds, bank 
guarantees or against trades. We are one of the largest Finance companies 
in Europe who operate with an Insurance Binder as Security and are one of 
the few who operate with due consideration within a strict regulatory and 
legal framework. This stringent working practice assures sound financial 
transactions with the highest standard of "best business practice".

GBEFMBD have extremely good Banking relations and hold company accounts for 
lending with top Banks, including the following:

BNP Paribas France
Credit Suisse AG
Credit Suisse International
ING Group - Netherland's
UniCredit - Italy
Rabobank - Netherlands (strongest AAA rated private bank in Europe)
Commerzbank AG - Germany
Deutsche Bank AG in Germany
KfW Bankengruppe - Germany
Intesa Sanpaolo- Italy
Pareto Bank - Norway
Nordea Bank - Finland
Alpha Bank - Cyprus
TD Bank Group - Canada
Scotiabank - Canada
Bank of America - USA
Citibank- USA
JP Morgan- USA
BNY Mellon - USA
DBS Bank - Hong Kong
Overseas Chinese Banking Corp - Hong Kong
United Overseas Bank - Hong Kong & Malaysia
National Bank - Abu Dhabi (NBAD)
National Bank Kuwait - Kuwait.

** All of which can be substantiated if required**

As leading retail and commercial bank, we have a strong base in Europe and 
follow our customers abroad. We are active internationally in areas in 
which we have substantial expertise, such as Energy, Commodities & 
Transportation (ECT) and GBEFMBD BV Clearing, and focus on our existing 
Private Lending Banking Group activities in Italy and Sweden Netherlands, 
Europe and Asia.

For further details to go about procuring a loan from: Kindly respond 
immediately to this email: nathanfleming...@gmail.com

Regards, as we await your response.

Best Regards 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/61697b70-bcbd-48eb-b051-7b3043294576%40googlegroups.com.


[android-developers] Best practices for URLConnection - timeouts, retries.

2017-08-01 Thread Nathan
I do not believe that UrlConnection is behaving optimally. 

What are the best practices for use of timeouts and retries? 

IE
Short timeout but many retries. 
Long timeout - no retries
Short Timeout, then retry with longer timeout. 
Some actual numbers to start with. 
Whether readtimeout and connecttimeout should be different. 

Etc. 

You may be tempted to say"well, that depends on your use case and how fast 
your server responds."

I have no control over the servers or where the end users access them from, 
so assume "all over the map".

As for use case, I am downloading lots of small files (ie 20k) using a 
threadpool. 

Long timeouts will tie up the threadpool if the download is just going to 
fail anyway. 

I found this from Tim Bray.
https://www.tbray.org/ongoing/When/201x/2012/01/17/HttpURLConnection

But the real life example code he referred to is no longer there. 

Nathan

-- 
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/6f7b951a-30c3-4e4d-bfdf-d9a32061659f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] USB configuration in the Developer options always changing?

2016-04-11 Thread Nathan Sheffer
Just bought a Samsung Galaxy s7 Edge with Marshmallow pre-installed.
I'm trying to get my phone to work with Android Auto.

The only way I could make my phone connect to my car is to enable Developer 
Options in the settings menu and change the USB configuration to "MTP Media 
Transfer Protocol".

My problem is that whenever I disconnect my phone, the change I made goes 
away and reverts back to "charging".
So, now, every time I want to connect my phone to use Android Auto, I need 
to enter the settings and change the USB configuration back to MTP for it 
to work... really a pain in the butt.


Does anyone know if this is an Android issue or a Samsung issue? Also, is 
there a way to correct this?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/a1b797be-fb2b-411b-9933-96a858f67c9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Android 6.0 and SSL - handshake failure.

2015-10-23 Thread Nathan
I do believe it is using less than 1024. 

It's not obvious to me how to make the server use a longer DH_P_LENGTH. I 
don't see where we are setting it. It is using Java and 
ServerSocketFactory. 

Perhaps it will just happen if we update OpenSSL. Perhaps we have to 
upgrade to Java 8 and use an environment variable. Or maybe I upgrade 
Denian. 
(where's that intern that setup the server when you need him)


If the length gets longer, will it break all the 4.x and 5.x devices?

Nathan

On Friday, October 23, 2015 at 4:18:13 AM UTC-7, Martin Heller wrote:
>
> Hello Nathan, 
>
> you need to set the DH_P_LENGTH on the server. 
> Most likely your server is using a too small (512 or 768, maybe 1024) 
> DH_P_LENGTH which is not supported by the BoringSSL library on Android 
> 6.0. 
> You can find some more information here: 
> https://www.openssl.org/blog/blog/2015/05/20/logjam-freak-upcoming-changes/ 
>
> Best regards, 
>
> Martin 
>
> On 23/10/15 00:57, Nathan wrote: 
> > Where does one set a DH_P_LENGTH? On the client? On the server? In a 
> > certificate? 
> > 
> > Sorry if this is a dumb question for those of you who know more about 
> SSL. 
> > 
> > I've seen this issue but it has no solution. 
> > 
> https://code.google.com/p/android-developer-preview/issues/detail?id=2792 
> > 
> > Nathan 
> > 
> > On Thursday, October 22, 2015 at 3:35:52 PM UTC-7, Nathan wrote: 
> > 
> > 
> > Something that was cut off. 
> > 
> > BAD_DH_P_LENGTH 
> > 
> > javax.net.ssl.SSLProtocolException: SSL handshake aborted: 
> > ssl=0x557bb63810: Failure in SSL library, usually a protocol error 
> > error:100c1069:SSL 
> > routines:ssl3_get_server_key_exchange:BAD_DH_P_LENGTH 
> > (external/boringssl/src/ssl/s3_clnt.c:1193 0x7fa874c518:0x) 
> > 
> > 
> > On Thursday, October 22, 2015 at 2:04:11 PM UTC-7, Nathan wrote: 
> > 
> > I am experiencing failures connecting securely to my own server 
> > which are probably as a result of the Android 6.0 changes. 
> > 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: Handshake 
> failed 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: 
> > javax.net.ssl.SSLHandshakeException: Handshake failed 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > 
> com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:396)
>  
>
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > 
> com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:629)
>  
>
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > 
> com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(OpenSSLSocketImpl.java:615)
>  
>
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > 
> com.crittermap.iab.serverinterface.ServerService.onHandleIntent(ServerService.java:98)
>  
>
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > 
> android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) 
>
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > android.os.Handler.dispatchMessage(Handler.java:102) 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > android.os.Looper.loop(Looper.java:148) 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > android.os.HandlerThread.run(HandlerThread.java:61) 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService:  Caused by: 
> > javax.net.ssl.SSLProtocolException: SSL handshake aborted: 
> > ssl=0x557ba6f360: Failure in SSL library, usually a protocol 
> error 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: 
> > error:100c1069:SSL 
> > routines:ssl3_get_server_key_exchange:BAD_DH_P_LENGTH 
> > (external/boringssl/src/ssl/s3_clnt.c:1193 
> 0x7fa874c518:0x) 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native 
> > Method) 
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> > 
> com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
>  
>
> > 10-21 21:27:10.018 1267-1530/... E/ServerService: ... 7 
> more 
> > 
> > 
> > However, nowhere that I can find are there instructions o

Re: [android-developers] Re: Android 6.0 and SSL - handshake failure.

2015-10-23 Thread Nathan
I found the intern who set up my server. Even though he has moved on to a 
more prestigious career, he took some time to upgrade to JDK 8 and life is 
much better. 

Nathan

On Friday, October 23, 2015 at 1:25:00 PM UTC-7, Martin Heller wrote:
>
>
> http://serverfault.com/questions/722182/how-to-generate-new-2048-bit-diffie-hellman-parameters-with-java-keytool
>  
>
> https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#customizing_dh_keys
>  
>
> Martin 
>
> On 23/10/15 20:07, Nathan wrote: 
> > I do believe it is using less than 1024. 
> > 
> > It's not obvious to me how to make the server use a longer DH_P_LENGTH. 
> > I don't see where we are setting it. It is using Java and 
> > ServerSocketFactory. 
> > 
> > Perhaps it will just happen if we update OpenSSL. Perhaps we have to 
> > upgrade to Java 8 and use an environment variable. Or maybe I upgrade 
> > Denian. 
> > (where's that intern that setup the server when you need him) 
> > 
> > 
> > If the length gets longer, will it break all the 4.x and 5.x devices? 
> > 
> > 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.


[android-developers] Android 6.0 and SSL - handshake failure.

2015-10-22 Thread Nathan
I am experiencing failures connecting securely to my own server which are 
probably as a result of the Android 6.0 changes. 

10-21 21:27:10.018 1267-1530/... E/ServerService: Handshake failed
10-21 21:27:10.018 1267-1530/... E/ServerService: 
javax.net.ssl.SSLHandshakeException: Handshake failed
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:396)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:629)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(OpenSSLSocketImpl.java:615)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
com.crittermap.iab.serverinterface.ServerService.onHandleIntent(ServerService.java:98)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
android.os.Handler.dispatchMessage(Handler.java:102)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
android.os.Looper.loop(Looper.java:148)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
android.os.HandlerThread.run(HandlerThread.java:61)
10-21 21:27:10.018 1267-1530/... E/ServerService:  Caused by: 
javax.net.ssl.SSLProtocolException: SSL handshake aborted: 
ssl=0x557ba6f360: Failure in SSL library, usually a protocol error
10-21 21:27:10.018 1267-1530/... E/ServerService: error:100c1069:SSL 
routines:ssl3_get_server_key_exchange:BAD_DH_P_LENGTH 
(external/boringssl/src/ssl/s3_clnt.c:1193 0x7fa874c518:0x)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
10-21 21:27:10.018 1267-1530/... E/ServerService: at 
com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
10-21 21:27:10.018 1267-1530/... E/ServerService: ... 7 more


However, nowhere that I can find are there instructions of *what to do* so 
your code will work with Android 6.0. That should be common courtesy when 
Android makes a breaking change. 

it does say:

Android is moving away from OpenSSL to the BoringSSL 
<https://boringssl.googlesource.com/boringssl/> library

It also gives advice for what to link when you are using the NDK. 
I am not using the NDK. What should java people do?
I don't see anywhere in my code that I am referring to either BoringSSL or 
OpenSSL. Yet the stack trace above mentions both and there could be some 
sort of mismatch. 

Below is some of the code. While I am not the original author, this worked 
(and still does ) up to Android 5.x.

I could not see any calls here that are deprecated. 


   KeyStore trustStore = KeyStore.getInstance("BKS");
  TrustManagerFactory trustManagerFactory = 
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
 InputStream trustStoreStream = 
context.getResources().openRawResource(R.raw.iabtruststore);
 trustStore.load(trustStoreStream, "IABTrust$tore0424".toCharArray());
 trustManagerFactory.init(trustStore);


 // Setup the SSL context to use the truststore
 ssl_ctx = SSLContext.getInstance("TLS");
ssl_ctx.init(null, trustManagerFactory.getTrustManagers(), null);

//retrieve a socketfactory!
 socketFactory = ssl_ctx.getSocketFactory();


Any advice on what to change so that it will work?

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.


[android-developers] Re: Android 6.0 and SSL - handshake failure.

2015-10-22 Thread Nathan

Something that was cut off. 

BAD_DH_P_LENGTH

javax.net.ssl.SSLProtocolException: SSL handshake aborted: 
ssl=0x557bb63810: Failure in SSL library, usually a protocol error
error:100c1069:SSL routines:ssl3_get_server_key_exchange:BAD_DH_P_LENGTH 
(external/boringssl/src/ssl/s3_clnt.c:1193 0x7fa874c518:0x)


On Thursday, October 22, 2015 at 2:04:11 PM UTC-7, Nathan wrote:
>
> I am experiencing failures connecting securely to my own server which are 
> probably as a result of the Android 6.0 changes. 
>
> 10-21 21:27:10.018 1267-1530/... E/ServerService: Handshake failed
> 10-21 21:27:10.018 1267-1530/... E/ServerService: 
> javax.net.ssl.SSLHandshakeException: Handshake failed
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:396)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:629)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(OpenSSLSocketImpl.java:615)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> com.crittermap.iab.serverinterface.ServerService.onHandleIntent(ServerService.java:98)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> android.os.Handler.dispatchMessage(Handler.java:102)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> android.os.Looper.loop(Looper.java:148)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> android.os.HandlerThread.run(HandlerThread.java:61)
> 10-21 21:27:10.018 1267-1530/... E/ServerService:  Caused by: 
> javax.net.ssl.SSLProtocolException: SSL handshake aborted: 
> ssl=0x557ba6f360: Failure in SSL library, usually a protocol error
> 10-21 21:27:10.018 1267-1530/... E/ServerService: error:100c1069:SSL 
> routines:ssl3_get_server_key_exchange:BAD_DH_P_LENGTH 
> (external/boringssl/src/ssl/s3_clnt.c:1193 0x7fa874c518:0x)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
> com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
> 10-21 21:27:10.018 1267-1530/... E/ServerService: ... 7 more
>
>
> However, nowhere that I can find are there instructions of *what to do* so 
> your code will work with Android 6.0. That should be common courtesy when 
> Android makes a breaking change. 
>
> it does say:
>
> Android is moving away from OpenSSL to the BoringSSL 
> <https://boringssl.googlesource.com/boringssl/> library
>
> It also gives advice for what to link when you are using the NDK. 
> I am not using the NDK. What should java people do?
> I don't see anywhere in my code that I am referring to either BoringSSL or 
> OpenSSL. Yet the stack trace above mentions both and there could be some 
> sort of mismatch. 
>
> Below is some of the code. While I am not the original author, this worked 
> (and still does ) up to Android 5.x.
>
> I could not see any calls here that are deprecated. 
>
>
>KeyStore trustStore = KeyStore.getInstance("BKS");
>   TrustManagerFactory trustManagerFactory = 
> TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
>  InputStream trustStoreStream = 
> context.getResources().openRawResource(R.raw.iabtruststore);
>  trustStore.load(trustStoreStream, "IABTrust$tore0424".toCharArray());
>  trustManagerFactory.init(trustStore);
>
>
>  // Setup the SSL context to use the truststore
>  ssl_ctx = SSLContext.getInstance("TLS");
> ssl_ctx.init(null, trustManagerFactory.getTrustManagers(), null);
>
> //retrieve a socketfactory!
>  socketFactory = ssl_ctx.getSocketFactory();
>
>
> Any advice on what to change so that it will work?
>
> 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.


[android-developers] Re: Android 6.0 and SSL - handshake failure.

2015-10-22 Thread Nathan
Where does one set a DH_P_LENGTH? On the client? On the server? In a 
certificate? 

Sorry if this is a dumb question for those of you who know more about SSL. 

I've seen this issue but it has no solution. 
https://code.google.com/p/android-developer-preview/issues/detail?id=2792

Nathan

On Thursday, October 22, 2015 at 3:35:52 PM UTC-7, Nathan wrote:
>
>
> Something that was cut off. 
>
> BAD_DH_P_LENGTH
>
> javax.net.ssl.SSLProtocolException: SSL handshake aborted: 
> ssl=0x557bb63810: Failure in SSL library, usually a protocol error
> error:100c1069:SSL routines:ssl3_get_server_key_exchange:BAD_DH_P_LENGTH 
> (external/boringssl/src/ssl/s3_clnt.c:1193 0x7fa874c518:0x)
>
>
> On Thursday, October 22, 2015 at 2:04:11 PM UTC-7, Nathan wrote:
>>
>> I am experiencing failures connecting securely to my own server which are 
>> probably as a result of the Android 6.0 changes. 
>>
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: Handshake failed
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: 
>> javax.net.ssl.SSLHandshakeException: Handshake failed
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:396)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:629)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(OpenSSLSocketImpl.java:615)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> com.crittermap.iab.serverinterface.ServerService.onHandleIntent(ServerService.java:98)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> android.os.Handler.dispatchMessage(Handler.java:102)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> android.os.Looper.loop(Looper.java:148)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> android.os.HandlerThread.run(HandlerThread.java:61)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService:  Caused by: 
>> javax.net.ssl.SSLProtocolException: SSL handshake aborted: 
>> ssl=0x557ba6f360: Failure in SSL library, usually a protocol error
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: error:100c1069:SSL 
>> routines:ssl3_get_server_key_exchange:BAD_DH_P_LENGTH 
>> (external/boringssl/src/ssl/s3_clnt.c:1193 0x7fa874c518:0x)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: at 
>> com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
>> 10-21 21:27:10.018 1267-1530/... E/ServerService: ... 7 more
>>
>>
>> However, nowhere that I can find are there instructions of *what to do* 
>> so your code will work with Android 6.0. That should be common courtesy 
>> when Android makes a breaking change. 
>>
>> it does say:
>>
>> Android is moving away from OpenSSL to the BoringSSL 
>> <https://boringssl.googlesource.com/boringssl/> library
>>
>> It also gives advice for what to link when you are using the NDK. 
>> I am not using the NDK. What should java people do?
>> I don't see anywhere in my code that I am referring to either BoringSSL 
>> or OpenSSL. Yet the stack trace above mentions both and there could be some 
>> sort of mismatch. 
>>
>> Below is some of the code. While I am not the original author, this 
>> worked (and still does ) up to Android 5.x.
>>
>> I could not see any calls here that are deprecated. 
>>
>>
>>KeyStore trustStore = KeyStore.getInstance("BKS");
>>   TrustManagerFactory trustManagerFactory = 
>> TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
>>  InputStream trustStoreStream = 
>> context.getResources().openRawResource(R.raw.iabtruststore);
>>  trustStore.load(trustStoreStream, 
>> "IABTrust$tore0424".toCharArray());
>>  trustManagerFactory.init(trustStore);
>>
>>
>>  // Setup the SSL context to use the truststore
>>  ssl_ctx = SSLContext.getInstance("TLS");
>> ssl_ctx.init(null, trustManagerFactory.getTrustManagers(), null);
>>
>> //retrieve a socketfactory!
>>  socketFactory = ssl_ctx.getSocketFactory();
>&

Re: [android-developers] Does Quick Search Suggestions still work in Android 4+?

2015-09-16 Thread Nathan


On Tuesday, September 15, 2015 at 9:06:34 PM UTC-7, TreKing wrote:
>
>
> On Tue, Sep 15, 2015 at 12:55 PM, Nathan <nathan@gmail.com 
> > wrote:
>
>> Is the topic valid for anything greater than 2.x? 
>>
>
> Can't speak with any ah-tho-ri-tah, but sure doesn't look like it. Feels 
> like this global search feature was a thing back in the days of the Google 
> Search Widget and Search being a dedicated physical button on devices. 
> (Remember that, kids!?)
>  
>
Yes, they need to update the topic. We are back in the "Google knows best 
when it comes to search" era.

 

> Any equivalent I shouldl be looking for? Perhaps app indexing, but not 
>> quite the same. 
>>
>
> Google Now seems to be the new de facto system search, so may that?
> https://www.google.com/landing/now/integrations.html
>
> Though it looks like it's still only available to select developers.
>
 
That's it! I just need to become a "select" developer. I already wanted to 
do that.

App Indexing does seem like the closest match. However, the purpose is 
different. 
App Indexing would allow more users to find deep pages in my app. 

I would be content if they just found quick reference information in the 
search results itself. 

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.


[android-developers] Does Quick Search Suggestions still work in Android 4+?

2015-09-15 Thread Nathan
We've been implementing this:

http://developer.android.com/guide/topics/search/adding-custom-suggestions.html#QSB

It looks like the topic hasn't been updated in a few years. 

To enable search suggestions from your application, the user must open 
"Searchable items" (in Settings > Search) and enable your application as a 
searchable item.
Well, in my 5.0 device, I don't see any Settings->Search.  

I don't see in 4.x emulator. 
A colleague found it on a 2.3 emulator. 

This topic implies it only works on 2.3 or lower. 
https://support.google.com/websearch/answer/168456?hl=en

If so, they should mention it in the article. 

Is the topic valid for anything greater than 2.x? 
Any equivalent I shouldl be looking for? Perhaps app indexing, but not 
quite the same. 

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.


[android-developers] Re: Invalid Package Error on Android 2.3

2015-09-15 Thread Nathan
No ideas?

I think I will have to reproduce a build prior to the one that is failing 
and make it my last build for 2.3, deprecating 2.3 in future builds. 

Its possible one of the new libraries I've used has caused this. Well, 
there are even more libraries to come. 

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.


[android-developers] Invalid Package Error on Android 2.3

2015-09-14 Thread Nathan
Users are reporting that Google Play is returning "Package is Invalid" when 
trying to install an update on 2.3.X

In times past, this has been quirks in Google Play. Troubleshooting 
includes clearing cache on Google Playstore or Google Play Services. 
They've tried it. 

Is my app incompatible with 2.3 since my last update? Not that I can tell. 
The APK installs and runs on a 2.3 emulator. 

My remote test lab chose this time to get bought out by Amazon Device Farm, 
which apparently doesn't care about 2.3. 

Sure, there were a few build changes. An updated jar file for Mobfox. 
Crashlytics updates that were almost forced on us. 
And a later version of Google Play Services - 7.8.0.

But I don't know what to try to change. 
Any ideas?

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.


[android-developers] Bug in Samsung update for java.io.File.exists()?

2015-09-03 Thread Nathan
In the last week, I have had a flood of emails(like 5) saying that my app 
is telling them a folder already exists when it does not. 

Checking the code, I see that I am calling File.exists(), and it returns 
true when it shouldn't. 

It seems this is happening on Samsung S6, and some S5s that likely have 
received a recent firmware update. 

Anything that would cause File.exists() to return false positives? 
Did Samsung change the directory separator so that paths changed in 
preferences will now be invalid?
Did it start using "archives" as a reserved word?
Did it start requiring FileScanners for all files? 

I can (and probably will) change File.exists() to File.isDirectory(), but I 
don't have the hardware to confirm that it changes anything. 

Yes, I know that this is a bit of a longshot, but I am perplexed. 
Please skip telling me that Samsung can't possibly have as stupid of a 
bug/feature as this. 

Topics like this suggest that it is a possibility: 
http://android.stackexchange.com/questions/109833/images-have-disappeared-from-gallery-but-still-in-my-files-samsung-galaxy-s6


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.


[android-developers] Is MultiDex a BAD idea?

2015-05-05 Thread Nathan
After I added one more library, I discovered that I am now hitting the 64K 
method limit. 

No problem, because it appears building for MultiDex is now well 
documented. And maybe it is time. 

However I am scared off by the *catastrophic* limitations:
https://developer.android.com/tools/building/multidex.html#limitations

*-Applications that use multidex may not start on devices that run versions 
of the platform earlier than Android 4.0 (API level 14)*
May not? So is this only for those who want to deprecate everything prior 
to Android 4.0? 
I'm not sure end users will be all that understanding if the app doesn't 
start. 

*-Applications using a multidex configuration that make very large memory 
allocation requests may crash during run time due to a Dalvik linearAlloc 
limit*
 My app makes large memory requests, don't know if its very large, so I 
expect it will crash. 


*-Can result in Application Not Responding (ANR) errors if the secondary 
dex files are large.*How large? Obviously, if they have 65k methods like 
the original, it will be too large, right? So by what percent, exactly, is 
one raising the method limit through this method? So now the practical 
limit is 72K, or what?

*-Make sure to perform testing with these versions of the platform as your 
application can have issues at startup or when particular groups of classes 
are loaded.*
Since my testing is world class (not) and I've always been able to find 
model specific issues well ahead of end users before (not), this should 
give me lots of confidence. 
If I do find them, what do I do?

-Code shrinking can reduce or possibly eliminate these potential issues.
So this is a maybe then?

In summary, then my app may not start on Android4, will likely crash on 
Android5, and I just shrink code and hope for the best. 

So are Google maps and Gmail confident in using MultiDex, for example? 

At this point, I don't find using Multidex to be an acceptable risk. 
Maybe its only postponing the problem, but an alternate strategy is this: 
Tell the third party that wants to run the promotion and just handed me an 
AAR file with 11,499 methods to reduce their method count or the deal is 
off. 

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.


[android-developers] Specifying build variant of wear app.

2015-03-05 Thread Nathan
I have a task that is probably simple for all you gradle/Android Studio 
gurus. 

This is how you package a wear app inside a mobile app for installation. 

dependencies {
   compile 'com.google.android.gms:play-services:5.0.+@aar'
   compile 'com.android.support:support-v4:20.0.+''
   *wearApp project(':wearable')*
}


Good so far. But lets say the wear app has several build variants. I don't 
know how I would specify which build variant. Presumably, I'd want each 
build variant of the mobile app to include the corresponding build variant. 
As above, it doesn't appear to include any, as the apk size is too small. 

As a fallback, I suppose we could do this. Since the apks of different 
build variants have different filenames. Of course, this does not force a 
signed build of the wear app to ensure that the apk is current. 

dependencies {
  ...
  wearApp files('/path/to/wearable_app.apk')
}



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.


[android-developers] Re: Is Android Wear Compass Sensor reliable?

2015-03-04 Thread Nathan
I was thinking of offering this as an alternative= to customers. 

http://www.amazon.com/Sun-DC204WB-Slip-On-Wrist-Compass/dp/B001949J1W/ref=sr_1_1?ie=UTF8qid=1425488514sr=8-1keywords=slip+on+wrist+compass

Less battery drain, and probably more reliable. ;)

I tried forcing it to use these two sensors: 
Sensor.TYPE_ACCELEROMETER
Sensor.TYPE_MAGNETIC_FIELD

Before that, it was defaulting to a RotationVectorSensor if one exists.  
I thought, at least in the phone world, that was preferable where it 
exists.  

On Sony Smartwatch 3, it does exist but apparently not preferable. I don't 
know about the other devices. 

Anybody else have secrets to contribute?

Nathan

On Tuesday, March 3, 2015 at 3:42:44 PM UTC-8, Nathan wrote:

 I implemented code that finds the compass direction.

 It uses Sensor.TYPE_ROTATION_VECTOR.

 The same code works fine (or at least, as usual) on the phone using 
 Android 4.4. 

 I've tried it out on my Sony Smartwatch 3 and it works - a small minority 
 of the time.  

 I have found that if I look at the compass needle I placed on North, 
 Sometimes it points North. 
 Sometimes it points West
 Sometimes it points East.
 Sometimes it points South
 Sometimes it points some other 
 Sometimes it moves When I rotate the watch. Sometimes it doesn't feel like 
 it. 

 Calibrating (in other words, twisting my arm around violently), did not 
 consistently help. 

 Is my experience typical? 

 Before I spend a lot of time trying to figure out if there is something 
 weird with the code, I wanted to know how many have tried and are there any 
 secrets. 
 Maybe I should drop the idea of apps using compass sensors if they are 
 just going to annoy end users who will send me hate mail. 
 I've read things on the internet that indicate the Moto360 does not have 
 the right sensors for compass rotation but it guesses anyway. 

 Besides this device, I only have experience with the Gear Live. It had 
 some funny compass directions sometimes too. The funniest part (ha ha) was 
 once in a while, the compass sensor, plus all other motion sensors, just 
 stopped working at all for a week or two. 
 Sometimes they came back, but it happened enough that I returned that 
 unit. 
  
 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.


[android-developers] Is Android Wear Compass Sensor reliable?

2015-03-03 Thread Nathan
I implemented code that finds the compass direction.

It uses Sensor.TYPE_ROTATION_VECTOR.

The same code works fine (or at least, as usual) on the phone using Android 
4.4. 

I've tried it out on my Sony Smartwatch 3 and it works - a small minority 
of the time.  

I have found that if I look at the compass needle I placed on North, 
Sometimes it points North. 
Sometimes it points West
Sometimes it points East.
Sometimes it points South
Sometimes it points some other 
Sometimes it moves When I rotate the watch. Sometimes it doesn't feel like 
it. 

Calibrating (in other words, twisting my arm around violently), did not 
consistently help. 

Is my experience typical? 

Before I spend a lot of time trying to figure out if there is something 
weird with the code, I wanted to know how many have tried and are there any 
secrets. 
Maybe I should drop the idea of apps using compass sensors if they are just 
going to annoy end users who will send me hate mail. 
I've read things on the internet that indicate the Moto360 does not have 
the right sensors for compass rotation but it guesses anyway. 

Besides this device, I only have experience with the Gear Live. It had some 
funny compass directions sometimes too. The funniest part (ha ha) was once 
in a while, the compass sensor, plus all other motion sensors, just stopped 
working at all for a week or two. 
Sometimes they came back, but it happened enough that I returned that unit. 
 
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] Re: VectorDrawable/BitmapDrawable in custom view.

2015-02-25 Thread Nathan
Naming the folders
drawable-nodpi-v17
and 
drawable-nodpi-v21
did do what I want it to do. 

Now it looks so much nicer on Android 5.0 than on 4.4. 

Nathan

On Monday, February 23, 2015 at 2:17:30 PM UTC-8, Sérgio Faria wrote:

 Maybe if you move face.png to drawable-nodpi-v17 it will work 
 If it doesn't work you can use the inflate method to force it. 

 2015-02-23 21:44 GMT+00:00 Nathan nathan@gmail.com javascript:: 
  No ideas? 
  
  In Android Wear, it is definitely using the vector drawable. 
  
  In Nexus, 9, it is definitely using a raster one and there appears to be 
 now 
  way to force it. 
  
  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.


[android-developers] Android Wear Data Layer: Effect on Battery Life

2015-02-25 Thread Nathan
I wanted to know if I can figure out how the usage of Data on Android Wear 
influences battery life. 

I'm not a hardware guy, just want to know it from a software developers. I 
do believe Android Wear uses Bluetooth LE. (The rest is a hardware problem 
;)

Are there some articles I can read on the subject?

For example, there has been some great stuff written about internet use and 
how it affects the power drain on an Android phone. 
http://developer.android.com/training/efficient-downloads/efficient-network-access.html

For instance, I would love to know whether its better to send 5 megabytes 
of stuff all at once, whether it is bad to send 5K every second all day 
long, and so on and so forth. 

I'm working on a presentation on Android Wear and battery life, and this 
could be part of it. But at the moment, I don't know enough on the subject, 
and would instead solicit feedback from the audience. 

Nathan
Speaker at Wearables Tech Con. 
http://www.wearablestechcon.com/
(Note use discount code 'Mellor' to save $200). 

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

2015-02-23 Thread Nathan
No ideas?

In Android Wear, it is definitely using the vector drawable. 

In Nexus, 9, it is definitely using a raster one and there appears to be 
now way to force it.

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.


[android-developers] VectorDrawable/BitmapDrawable in custom view.

2015-02-17 Thread Nathan
Since VectorDrawable is only in Android 5.0+, and one would presumably use 
plain old raster drawables before then, I came up with a scheme. 

I put face.png in drawable-nodpi.
I put face.xml in drawable-v21

Then, when I need the drawable in my custom view, I call. 

Drawable drawFace =getResources().getDrawable(R.drawable.face);

I sure thought I was clever.

So of course, this will retrieve a VectorDrawable if it is running on 
Android 5.0 or later, and a BitmapDrawable if it is running on 4.4 or 
earlier, right?

Nope. 

I debugged on a Nexus 9. The type of the returned Drawable was 
BitmapDrawable. 

To add to the mystery, I debugged on Android Wear device with Android 5.0

The drawable comes up as a VectorDrawable, just as I wanted. 

Why wouldn't that happen on a tablet with Android 5.0? The targetSDK is 21. 
The BuildTools version is 21.1.1. The minimum SDK is 17. 

The VectorDrawable class has only a default constructor. I don't know how 
to force a VectorDrawable to load if I went that route. 

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] What is the max number of apps?

2015-02-02 Thread Nathan
Don't judge this whole forum by my response. This is a good discussion to 
have, even if it's not the one you wanted to start. 

If you want a more direct answer to your question, I suggest you ask Google 
Play Developer Support how many apps you can have in one account. If they 
don't know or won't say, well then no one will. 

On Sunday, February 1, 2015 at 12:11:36 AM UTC-8, Russell Cecala wrote:

 hmmm ... Do not post repetitive content ... could these apps be 
 considered repetitive:  

 https://play.google.com/store/apps/details?id=com.crittermap.airhockey


 https://play.google.com/store/apps/details?id=com.crittermap.airhockey.dragons


Fair question. Could they by any definition of that extremely vague term? 
Sure. 

Does Google Play object to stuff like that? Not generally, otherwise it 
would have to ban stuff like Temple Run Brave and Angry Birds Space. 

Have they been profitable for me? No, but they have for others. 
 

 wow! looks like your using some sort of wizard like eclipse or android 
 studio to generate these apps.

 I am a simple bash/ant person. :P 


You miss my point if you think I am against code reuse, automation, or 
other ways of reducing cost for producing more apps. 
That's not what you would find if you went to my seminars or read my 
published works. 

If you truly have means of creating 1000s of apps at low cost, through 
automated or human means, that in itself is to be admired. 
If you have the skills to know which of them will be best selling before 
they hit the market, even better. That's something we should all strive 
for. 
 

 Too bad whoever it is that enforces those regulations for google does not 
 seem to understand them. Really?


The enforcement and lack thereof is a different story. Google tends to rely 
on automated means of identifying likely violaters, does manual review as 
little as possible, and can be quite arbitrary and heavyhanded when it does 
knock developers down - suspend first, ask questions never. In such a 
situation, based on the posts I've seen here, people get an extremely vague 
message that they may be violating one or more guidelines, without 
specifics of what Google actually objects to. In such a case, stating that 
a App B got away with X won't do you much good. In your case, they may 
not even say which of the 1000s of apps they object to. 

It's just my opinion that, even with the means to produce more, you should 
prefer quality over quantity. I could be wrong, but these are my reasons. 
A. The cost to publish an app, optimize its listing, graphics, message, 
search rankings, provide support and maintenance, is not going to be zero 
even if you get the coding cost to zero. 
B. Being in Google Play grants an app no real special privileges. By that, 
I mean Google Play gives no special treatment to apps just for being new. 
This is different from iOS. Apps that sell well get respect from Google's 
search algorithm. Apps that don't do well, they might as well be invisible. 
C. Some suspect that the popularity of your individual apps may affect the 
search credibility of all of the apps in the account. This is not proven. 
But if true, it means that you would be better off with 100 popular apps 
than those same 100 popular apps mixed with thousands of unpopular ones. 
D. You are very very likely to attract unwanted scrutiny from Google 
Spambots if you start publishing thousands of apps per month. This scrutiny 
may not be fair if all your apps are truly unique and of high quality. They 
may ding you for things that you could say other apps are getting away 
with. 

I would venture my opinion, and I could be wrong. There may be no published 
limit to the number of apps in an account. But I suspect that there is an 
unpublished number beyond which Google will give your account added 
scrutiny, by automated or manual means. 

If you still want to go for the max, the standard solution is simply to 
have multiple developer accounts. Some will advise you to have no traceable 
connection between them in case you lose one. 

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] What is the max number of apps?

2015-01-31 Thread Nathan

On Friday, January 30, 2015 at 8:29:17 PM UTC-8, Russell Cecala wrote:

 If there is a finite number of apps I could publish I would have to figure 
 out how to pick the ones that would sell best and not publish the less 
 popular ones :)  


Excellent strategy. If you can do that, why not take it a step further and 
not develop the less popular apps in the first place?

Most of us human developers without infinite time and resources have to do 
that anyway.

But I will echo comments from TreKing about what difference does it make?

I do believe that developer accounts can handle three digits of apps. But 
if you were to find out that they are infinite, why would you alter your 
strategy?

Somehow you can afford to produce thousands of apps, create screenshots, 
descriptions, titles, graphics, tech support, marketing, and updates at 
zero cost, yet somehow if it came to it, plunking down $25 for another 
developer account is a huge burden? Something doesn't add up. 

I suppose you probably have access to some app generator and you've read an 
info product that has told you the way to make big bucks on apps is to make 
a gazillion of them. I don't mean to discourage you, just be sure and 
report back on how that goes for you. I suspect your account will be 
disabled sooner for the repetitive content clause below than it will be 
for having too many apps. 

Nathan

*Spam and Placement in the Store*
Developers are important partners in maintaining a great user experience on 
Google Play.
 
   - Do not post repetitive content. 
   - Do not use irrelevant, misleading, or excessive keywords in apps 
   descriptions, titles, or metadata. 
   - Developers must not attempt to change the placement of any Product in 
   the Store, or manipulate any product ratings or reviews by unauthorized 
   means such as fraudulent installs, paid or fake reviews or ratings, or by 
   offering incentives to rate products. 
   - Apps that are created by an automated tool or wizard service must not 
   be submitted to Google Play by the operator of that service on behalf of 
   other persons. 
   - Do not post an app where the primary functionality is to: 
  - Drive affiliate traffic to a website or 
  - Provide a webview of a website not owned or administered by you 
  (unless you have permission from the website owner/administrator to do 
so) 
   - Do not send SMS, email, or other messages on behalf of the user 
   without providing the user with the ability to confirm content and intended 
   recipient.


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

2015-01-24 Thread Nathan


On Saturday, January 24, 2015 at 3:58:36 PM UTC-8, TreKing wrote:


 On Wed, Jan 21, 2015 at 5:16 PM, Nathan nathan@gmail.com 
 javascript: wrote:

 I can't see a way to debug the build variants, or even know if I am 
 debugging the main or a variant. 


 Not entirely sure what you're asking, but there is a Build Variants tool 
 window that lets you flip the current build variant you're working in (and 
 hence running / debugging).
 Mine's on the lower end of the left window dock. Also accessible by 
 View-Tool Windows-Build Variants.


That is what I was asking. I don't know my way around Android Studio much 
yet. I found the first one since I asked and the second way since your 
response. 

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] Re: FusedLocation Provider fail

2015-01-21 Thread Nathan
I've found an answer to one of the mysteries. 

mGoogleApiClient = new Builder(this)
.addConnectionCallbacks(this)
.addApi(LocationServices.API)
//.addApi(Wearable.API)  // used for data layer AP
.addOnConnectionFailedListener(this)
.build();

If you request the wearable api, it might say that the client is available, 
yet fail trying to connect, asynchronously, with unknown error 16.  

My local test devices all had the Android Wear app installed even though no 
wearable has ever been paired with them. Presumably, many of the end user 
devices, and the devices in my remote test lab, do not. 

Probable solution is to use one client per API if some are optional. 

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.


[android-developers] Debug Build Variants in Android Studio?

2015-01-21 Thread Nathan
I have created build variants, and I can create an additional release apk. 
That's good. 

I can't see a way to debug the build variants, or even know if I am 
debugging the main or a variant. 

I would think that would be in Configurations for Run or Debug, but no sign 
of it there .

Perhaps I'm old fashioned that way, but I prefer to debug code before 
shipping it. 

I do have some applications that I think are a good fit for build variants 
(instead of libraries), but the answer affects whether they really are 
appropriate. 

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.


[android-developers] Change Transformations of VectoDrawables at runtime?

2015-01-21 Thread Nathan
Looking into VectorDrawables to see if I understand them. 

A vectordrawable, apparently can contain multiple groups with 
transformations.

It doesn't appear that I can query the groups or change their 
transformation at runtime. 

They could only be changed by an Animated VectorDrawable defined in three 
xml files. 

So if I want to rotate part of the Vectordrawable 30 degrees instead of 45 
degrees, I better have decided that at compile time. Correct?

Based on that, if I do have parts of a drawing that move dynamically, I'd 
be better off getting them in separate vectorDrawables. Correct?

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.


[android-developers] Re: Keeping views in sync on model change

2015-01-20 Thread Nathan Barraille
Thanks for your answer Grunthos.

I thought about using an abstract Adapter and inheritance to be as DRY as 
possible, but more than DRYness I guess, I'm just thinking that I shouldn't 
have to worry about this when writing the adapter, and this is a common 
problem that should be handled by the framework (or another component of 
the app, as there is no way to handle this properly with the Android 
framework).
I thought about your bare-bones cursor that just return the ids, and I 
don't think this is recommended to access the database in your 
Adapter#getView() method, as this will make scrolling slow and not smooth.

I was also looking at ORMs that provide a Cache functionality that reuse 
models instances and auto-refresh the objects when they are updated.
ORMLite and GreenDAO support this but only for objects that are inserted in 
the DB:
http://ormlite.com/javadoc/ormlite-core/doc-files/ormlite_5.html#Object-Caches
http://greendao-orm.com/documentation/sessions/


On Thursday, January 15, 2015 at 1:30:18 PM UTC-8, Nathan Barraille wrote:

 Hi

 I’m working on a fairly big Android app with a lot of fragments and 
 activities.
 These fragments and activities present views that are representing the 
 state of models. Whenever the state of a model instance changes, I need to 
 reflect that change on all the views that represent this model.

 Let’s say for example I’m coding a music App, and I have a 
 TrackListFragment that is a list of all the tracks, and a 
 PlayerFragment which displays a single track. When I click the “Like” 
 button on the player, I want the view of the player to reflect that change, 
 but also the view of that track in the tracklist to update.

 For this, I have an event bus where I post a message, and I have both 
 views (or their controllers) subscribe to that bus, receive this message 
 and update their state. This works, but doesn’t handle the case where the 
 view is out of the scrolled area in the list view, and when scrolling back 
 to it, the adapter is gonna re-create the view with stale data and won’t 
 reflect the change.
 The options I’ve thought about are:
- Go the way I think the Android framework is supposed to work, and 
 notify change on all content URIs whenever a track has changed. This will 
 force the loader to re-run and refresh data from the database. I don’t like 
 this because refreshing the whole list for a change on a single track seems 
 like overkill. Plus that assumes that my data is always loaded from the 
 local database, which is not always true.
- Have my Adapter or fragment subscribe to the event bus and update the 
 model from the list when something changes. This can work, but means I 
 can’t use Cursors and CursorLoaders anymore, as I can’t change a cursor’s 
 data. Plus it’s not really DRY because I have to implement this in all the 
 fragments/adapters that handle list of tracks. An option that would work 
 with cursors is to keep a map of changes since the data was loaded in the 
 fragment/adapter, and override the stale data with this when creating the 
 views. But that seems hacky
- Have a model manager that keeps track of all the models in use. This 
 manager can subscribe to the event bus and update the models as needed. 
 Because all the components of the app are getting their models through this 
 manager, they will all share the same instance of the model and the data 
 will always be up to date. This seems complex to get right, as I need to 
 implement reference counting and concurrent thread access/modification. 
 This is my favorite solution so far, but it feels like their should be an 
 easier answer to such a common problem.

 I'm sure some of you have been confronted to a similar problems already, 
 how did you solve this?

 Thanks!
 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] Re: FusedLocation Provider fail

2015-01-19 Thread Nathan
Now is a good time to chime in if someone, like Google, wants to defend the 
Google Location Services. 

I don't see any advantage of it over location manager. None. And that comes 
form someone who knows that Location Manager hasn't been flawless either. 
But take all its flaws and add a heavyweight wrapper class, and you now 
have Google Location Services. And now you have several more ways it can 
fail. The Google Play Services could be unavailable, not have the right 
version, or not connect.  

It doesn't let me *not* worry about which provider is actually being used. 
To use the GPS at all, I have to specify PRIORITY_HIGH_ACCURACY even if I 
don't need high accuracy. Recent location, in the real world, is often 
null. Requesting location updates, in the real world, often fails to have 
any error messages but never yields a location. 

And it won't work on non Google Play devices, and Google gets to track more 
users. Both of those things may be an advantage to Google but not to me.  

Nathan



On Sunday, January 18, 2015 at 10:48:24 PM UTC-8, Mukesh Srivastav wrote:

 Hi Nathan,

 I am in the same situation, I have my app where in there are 3000 drivers 
 are using and in 20% of cases are getting failed (No locations,location was 
 getting very far(200 miles... :( 

 Here is the approach.

 I was using google play store location which is not at all reliable 
 solution to use it, later on,i have switched to the actual location 
 provider api's to get the lat and long.

 I had put lots of checks like the first priority is gps, if that fails use 
 network, if that fails use passive and in all i was also checking if the 
 location is the same as last, then again loop through the location api 
 (making it null and creating the provider instance again) and try to get 
 the new location.

 Now the situation is under control and the failures are like only 
 5%,though i am still exploring the other areas to get the right data.



 On Sun, Jan 18, 2015 at 4:01 AM, Nathan nathan@gmail.com 
 javascript: wrote:

 OK, this is really getting ridiculous. 

 Google Play Location Provider just isn't reliable. 

 Only once in a great while can I even get a location. I'm not sure how I 
 did it. I can't find any combination of settings that is reliable. Device 
 Only mode has never worked except perhaps once. GPS was never activated as 
 far as I can tell. 

 getLastLocation() states 
 If a location is not available, which should happen very rarely, null 
 will be returned. The best accuracy available while respecting the location 
 permissions will be returned.

 Not true. Seems pretty common for me and is happening a lot for end users 
 as well. Not such a big deal if one could ask for the location and expect 
 to get it. 

 Still nowhere is documented what settings the user has to have for me to 
 get location through Google Play Services.

 So far the promise of the FusedLocationProvider is coming short bigtime. 
 I'm close to crawling back to the supposedly inferior LocationManager. 

 Nathan 



 -- 
 Warm Regards,
 *Mukesh Kumar*,
 Android Consultant/Freelancer,
 India,Hyderabad.
  

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

2015-01-17 Thread Nathan
OK, this is really getting ridiculous. 

Google Play Location Provider just isn't reliable. 

Only once in a great while can I even get a location. I'm not sure how I 
did it. I can't find any combination of settings that is reliable. Device 
Only mode has never worked except perhaps once. GPS was never activated as 
far as I can tell. 

getLastLocation() states 
If a location is not available, which should happen very rarely, null will 
be returned. The best accuracy available while respecting the location 
permissions will be returned.

Not true. Seems pretty common for me and is happening a lot for end users 
as well. Not such a big deal if one could ask for the location and expect 
to get it. 

Still nowhere is documented what settings the user has to have for me to 
get location through Google Play Services.

So far the promise of the FusedLocationProvider is coming short bigtime. 
I'm close to crawling back to the supposedly inferior LocationManager. 

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.


[android-developers] FusedLocation Provider fail

2015-01-17 Thread Nathan
I feel betrayed. 

My first time using the Google Play Location Services and I don't think 
I've been told everything. 

All worked well in testing on my devices. I used   PRIORITY_LOW_POWER.

Boom - now the app is out in the field, and complaints are coming in. I 
don't know if it is everyone, or a small subset. 

I found out it didn't work if the Location Mode is set to Device Only. I 
didn't know that. I tried it and it doesn't fail - it just never gets a 
location, and never has a 
At least one person said that it still didn't work if he did that. I am 
checking on whether we didn't correctly do the check of whether Google Play 
Services is up to date, but I have no way of testing that code - I'd just 
have to ship it and hope it works. 

I don't find anything mentioned about what settings the user needs here:
https://developer.android.com/training/location/receive-location-updates.html

I don' understand why I can't even get the last location when it is on 
Device Only.

Are there other gotchas with this and best practices for communicating this 
to the user?

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.


[android-developers] Keeping views in sync on model change

2015-01-15 Thread Nathan Barraille
Hi

I’m working on a fairly big Android app with a lot of fragments and 
activities.
These fragments and activities present views that are representing the 
state of models. Whenever the state of a model instance changes, I need to 
reflect that change on all the views that represent this model.

Let’s say for example I’m coding a music App, and I have a 
TrackListFragment that is a list of all the tracks, and a 
PlayerFragment which displays a single track. When I click the “Like” 
button on the player, I want the view of the player to reflect that change, 
but also the view of that track in the tracklist to update.

For this, I have an event bus where I post a message, and I have both views 
(or their controllers) subscribe to that bus, receive this message and 
update their state. This works, but doesn’t handle the case where the view 
is out of the scrolled area in the list view, and when scrolling back to 
it, the adapter is gonna re-create the view with stale data and won’t 
reflect the change.
The options I’ve thought about are:
   - Go the way I think the Android framework is supposed to work, and 
notify change on all content URIs whenever a track has changed. This will 
force the loader to re-run and refresh data from the database. I don’t like 
this because refreshing the whole list for a change on a single track seems 
like overkill. Plus that assumes that my data is always loaded from the 
local database, which is not always true.
   - Have my Adapter or fragment subscribe to the event bus and update the 
model from the list when something changes. This can work, but means I 
can’t use Cursors and CursorLoaders anymore, as I can’t change a cursor’s 
data. Plus it’s not really DRY because I have to implement this in all the 
fragments/adapters that handle list of tracks. An option that would work 
with cursors is to keep a map of changes since the data was loaded in the 
fragment/adapter, and override the stale data with this when creating the 
views. But that seems hacky
   - Have a model manager that keeps track of all the models in use. This 
manager can subscribe to the event bus and update the models as needed. 
Because all the components of the app are getting their models through this 
manager, they will all share the same instance of the model and the data 
will always be up to date. This seems complex to get right, as I need to 
implement reference counting and concurrent thread access/modification. 
This is my favorite solution so far, but it feels like their should be an 
easier answer to such a common problem.

I'm sure some of you have been confronted to a similar problems already, 
how did you solve this?

Thanks!
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.


[android-developers] Re: AndroidStudio feedback (vs Eclipse)

2015-01-13 Thread Nathan


On Tuesday, January 13, 2015 at 3:26:37 PM UTC-8, Nanard wrote:

 Hi,

 I've been programming since the beginning with Eclipse+SDK.
 I saw it won't be supported for long, as AndroidStudio became the official 
 dev. platform.   I am then trying to migrate all my code into AndroidStudio.

 I have 2 versions : 1 free, 1 full.  Then I'm learning 'the hard way'  : 
 using flavors.

 My feedback :
 - I am loosing a lot of time trying to understand and searching for sample 
 on the web.  A few help using AndroidStudio, flavor, ...
 - I doubt I could migrate my App on AndroidStudio.
 - It's a huge waste of effort.  2 weeks lost already (2hrs/night)


Been there. It was a huge disruption, but it was pretty much forced on us. 
I took it all in a 24 hour period with little sleep. 
 

 Of course, Eclipse wasn't perfect (especially when new versions came : I 
 had to re-create new Projects and copy/paste code), but it worked, and I 
 published my Apps.

  

 With AndroidStudio well, I'm starting to believe I will leave Android 
 programming !

 Any such feedback ?
 Will Google finally support Eclipse+SDK again for the years to come ?


No, they won't. I learned that the hard way. 

The paint wasn't dry on the 1.0 version before I ran into several things. 

Most of all, including Google Play Services overruns Dex - known problem. 
The only instructions for dealing with that situation. 

There are no instructions for piecing out Google Play Services without 
using Android Studio. Some people here had creative solutions, but that was 
all. 
And there was no way of running MultiDex in Eclipse that I could find. 
Official instructions are Nothing I found actually worked. 

| With AndroidStudio well, I'm starting to believe I will leave Android 
programming !

Is this Android Studio or the migration to Android Studio?

Because with new projects, even months ago, I had no hesitation starting 
them in Android Studio. 
It was the forced migration that was a pain. 

Right now, life is much better. I have no desire to touch Eclipse again if 
I can avoid it. 
That may be of little comfort to you now. 

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.


[android-developers] Re: Phasing out a subscription

2015-01-08 Thread Nathan
I did pose the question/suggestion to Google Play Developer Support. 

They suggest, for the time being that I use the HTTP based API to do the 
cancellations. Roughly the programmatic equivalent to me searching through 
Google Wallet and cancelling all the pertinent renewals. 




*For this functionality, Google Play offers an HTTP-based API that you can 
use to remotely query the validity of a specific subscription at any time 
or cancel a subscription. The API is designed to be used from your backend 
servers as a way of securely managing subscriptions, as well as extending 
and integrating subscriptions with other services.Currently, to completely 
deactivate a subscription you will need to cancel all subscription purchase 
tokens via the API. Please see the following help center article about the 
API for more information: 
http://developer.android.com/google/play/billing/v2/billing_subscriptions.html*
Nathan



On Wednesday, January 7, 2015 at 6:52:42 PM UTC-8, jtoolsdev wrote:

 Sounds like a design oversight.  File it as an issue if it hasn't been 
 already.

 On Wednesday, January 7, 2015 12:55:31 PM UTC-8, Nathan wrote:

 Due to changes in business conditions and agreements with third parties, 
 I need to phase out a yearly subscription. 

 That is, no new people will be allowed to buy. No one will be allowed to 
 renew. A year from now, zero people will own the subscription. 

 I would think I could do this by going to the developer console and 
 marking the subscription sku as Inactive, Deprecated, or something of that 
 nature. 

 But come to find out I can't modify a subscription item in any way. A 
 year from now, therefore, these people will still autorenew.  

 Therefore, no matter how strongly I get the word out, there will *never* 
 be zero subscribers. Even if my app were no longer on Google Play, I think 
 Google would still automatically charge people a year from now. And the 
 terms for subscription require that I support them as long as there is at 
 least one subscriber or my developer account will be suspended. 

 If I have to, I will find all 300 subscribers and manually cancel their 
 subscription so it won't renew. 

 Beware, developers. Do not start any subscription that you cannot support 
 for the rest of *eternity*. Be prepared, even if there is one person left 
 and it will cost you $10,000 a year to maintain. Think twice about any 
 subscription that has dependencies on a third party, however reputable or 
 trustable. In fact, make sure that all subscriptions cost you nothing and 
 are as meaningless as possible. 

 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.


[android-developers] Phasing out a subscription

2015-01-07 Thread Nathan
Due to changes in business conditions and agreements with third parties, I 
need to phase out a yearly subscription. 

That is, no new people will be allowed to buy. No one will be allowed to 
renew. A year from now, zero people will own the subscription. 

I would think I could do this by going to the developer console and marking 
the subscription sku as Inactive, Deprecated, or something of that nature. 

But come to find out I can't modify a subscription item in any way. A year 
from now, therefore, these people will still autorenew.  

Therefore, no matter how strongly I get the word out, there will *never* be 
zero subscribers. Even if my app were no longer on Google Play, I think 
Google would still automatically charge people a year from now. And the 
terms for subscription require that I support them as long as there is at 
least one subscriber or my developer account will be suspended. 

If I have to, I will find all 300 subscribers and manually cancel their 
subscription so it won't renew. 

Beware, developers. Do not start any subscription that you cannot support 
for the rest of *eternity*. Be prepared, even if there is one person left 
and it will cost you $10,000 a year to maintain. Think twice about any 
subscription that has dependencies on a third party, however reputable or 
trustable. In fact, make sure that all subscriptions cost you nothing and 
are as meaningless as possible. 

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] Lock Orientation at runtime

2015-01-03 Thread Nathan
That is what I was looking for. Thanks. 

On Saturday, January 3, 2015 10:13:20 AM UTC-8, TreKing wrote:


 On Fri, Jan 2, 2015 at 8:56 PM, Nathan nathan@gmail.com javascript:
  wrote:

 I wanted to know if it is possible to lock the orientation of an activity 
 at runtime.  



 http://stackoverflow.com/questions/2366706/how-to-lock-orientation-during-runtime


 -
 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.


[android-developers] Lock Orientation at runtime

2015-01-02 Thread Nathan
I wanted to know if it is possible to lock the orientation of an activity 
at runtime.  

I know it is possible:

   1. To restrict a particular activity to portrait or landscape by means 
   of the manifest file. 
   2. For the user to restrict all activities to stay in the current 
   orientation by turning of Screen Rotation in their phone or tablet 
   settings. 
   
I wondered if it is possible to allow users to choose Lock Orientation 
inside my app, if they so choose, and then act in such a way to enforce it. 

If not possible, the next option might be simply to educate users about the 
global setting as an option. 

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] Dex Limit workarounds- ADT or Android Studio only?

2014-12-18 Thread Nathan
Thank you all. 

I did get it to compile with multidex support library if I updated to a new 
copy of Eclipse and installed the ADT from zip file. 

For all stripping of Google Play, though, it appears we are left to our own 
creativity with the solutions mentioned here. 

I don't think I will use all of it, but once I've gone through the pain of 
adding Google Play I may be tempted to throw in several. 
Once Android Studio is working for me I will probably use the supported 
path. 

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] Dex Limit workarounds- ADT or Android Studio only?

2014-12-18 Thread Nathan


On Thursday, December 18, 2014 9:47:53 AM UTC-8, Nathan wrote:

 I did get it to compile with multidex support library if I updated to a 
 new copy of Eclipse and installed the ADT from zip file. 

  I spoke too soon on that. It wasn't including Google Play Services client 
at all, which made it work well. If I put it back, not only does it fail in 
Dex, it crashes Eclipse with outofMemory error. 

There may be no way to do this in Eclipse.

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.


[android-developers] Migrating Android Library projects to Android Studio

2014-12-18 Thread Nathan
Okay, well maybe the rest of you have been able to just push a button and 
your projects build in Android Studio instead of Eclipse. Hasn't happened 
for me. 

I think I'm having an extra amount of trouble because I've used an Android 
Library project, with two other projects that depend on it. 
Android Studio doesn't seem to handle this well, at least not the same. 

The latest problem is that the library can't have the same package name as 
a project that includes it. That seems fair. 

So I went into the manifest of the library files and changed

*com.company.product*to
com.company.product.library 

Fine so far. 

Of course I got a gazillion errors

I couldn't find any way to do this in refactoring tool, so I went through 
every single affected source file and 
changed 
*import com.company.product*.R;
to 
*import com.company.product*.library.R;

I figured that would do the trick. 
Nope. 

I still have 103 errors stating. 


* error: package R does not exist*Now I am not sure why R does not exist. 
Won't they generate it in library projects?

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.


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

2014-12-17 Thread Nathan
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.


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

2014-12-17 Thread Nathan

Only thing so far we've found may be responsible. 

My ADT did not and will not update. 

I appears that I installed a combined bundle of Eclipse with ADT and the 
plugin won't update separately. 

Errors like the following. 

  Software being installed: Android Development Tools 23.0.4.1468518 
(com.android.ide.eclipse.adt.feature.feature.group 23.0.4.1468518)
  Software currently installed: eclipse 23.0.0.1245622 (adtproduct 
23.0.0.1245622)
  Only one of the following can be installed at once: 
Android Development Tools 23.0.4.1468518 
(com.android.ide.eclipse.adt.feature.feature.jar 23.0.4.1468518)
Android Development Tools 23.0.0.1245622 
(com.android.ide.eclipse.adt.feature.feature.jar 23.0.0.1245622)
  Cannot satisfy dependency:
From: eclipse 23.0.0.1245622 (adtproduct 23.0.0.1245622)
To: com.android.ide.eclipse.adt.feature.feature.group [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.feature.feature.jar [23.0.0.1245622]
  Cannot satisfy dependency:
From: Android Development Tools 23.0.4.1468518 
(com.android.ide.eclipse.adt.feature.feature.group 23.0.4.1468518)
To: com.android.ide.eclipse.adt.feature.feature.jar [23.0.4.1468518]

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

2014-11-28 Thread Nathan
I was glad to find this article and especially liked the promise of it. 

https://developer.android.com/training/articles/wear-location-detection.html

However, when you request location data in a wearable app, you don't have 
to worry about where the location data originates; the system retrieves the 
location updates using the most power-efficient method.

So I've implemented it.

Only one problem.

It don't work.

A colleague claims to have received location in an emulator with some 
effort.

Nothing happens in a Gear Live. I've set breakpoints.
RequestLocationUpdates is called.
onLocationChanged is never called. Ever.
In fact, it appears that the ResultCallBack passed in 
requestLocationUpdates is never called.

The only thing that does happen is if I request high accuracy is it crashes 
java.lang.SecurityException: Client must have ACCESS_FINE_LOCATION 
permission to request PRIORITY_HIGH_ACCURACY locations.

Even though
 uses-permission android:name=android.permission.ACCESS_FINE_LOCATION/
is clearly in the manifest after manifest tag and before application tag

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.


[android-developers] Re: Detecting Location on Android Wear Article Defective

2014-11-28 Thread Nathan

In addition, getLastLocation() is always null.

If I don't use High Accuracy, it does not crash, but I also never receive 
updates.

Why are *fictional* articles being posted to developer.android.com.

Nathan

On Friday, November 28, 2014 10:04:40 AM UTC-8, Nathan wrote:

 I was glad to find this article and especially liked the promise of it. 


 https://developer.android.com/training/articles/wear-location-detection.html

 However, when you request location data in a wearable app, you don't have 
 to worry about where the location data originates; the system retrieves the 
 location updates using the most power-efficient method.

 So I've implemented it.

 Only one problem.

 It don't work.

 A colleague claims to have received location in an emulator with some 
 effort.

 Nothing happens in a Gear Live. I've set breakpoints.
 RequestLocationUpdates is called.
 onLocationChanged is never called. Ever.
 In fact, it appears that the ResultCallBack passed in 
 requestLocationUpdates is never called.

 The only thing that does happen is if I request high accuracy is it 
 crashes 
 java.lang.SecurityException: Client must have ACCESS_FINE_LOCATION 
 permission to request PRIORITY_HIGH_ACCURACY locations.

 Even though
  uses-permission android:name=android.permission.ACCESS_FINE_LOCATION/
 is clearly in the manifest after manifest tag and before application tag

 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.


[android-developers] Changes in GPS or compass sensors for Android 5.0?

2014-11-24 Thread Nathan
Android 5.0 is coming out to my customers (not to me yet), and so of course 
I have to filter through any claims that feature X is broken and when are 
you going to support Android 5.0. 

Some are claiming that Compass is broken or GPS is broken.

There are always a few that have those problems any way, so I am not 
assuming that it is something to do with Android 5.0

Nothing here tells me that GPS or compass sensors should be broken. 
http://developer.android.com/about/versions/android-5.0-changes.html


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.


[android-developers] getSkuDetails returns error code 6: BILLING_RESPONSE_RESULT_ERROR 6 Fatal error during the API action

2014-11-17 Thread Nathan
Okay, I have one very very very unfortunate individual who cannot sync his 
inapp purchases. Trying for months. 

In fact, he is so unlucky that the same error occurs after he has changed 
phones and changed phone companies.  

The logs are pretty clear. getSkuDetails is returning error code 6. 
BILLING_RESPONSE_RESULT_ERROR6Fatal error during the API action

The logs seem to indicate that getPurchases() returns a valid list, but 
that the same list cannot get through getSkuDetails. 
What is there that *I* can do about this or that the customer can do about 
this?


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.


[android-developers] Re: getSkuDetails returns error code 6: BILLING_RESPONSE_RESULT_ERROR 6 Fatal error during the API action

2014-11-17 Thread Nathan
Finally the customer today deleted and readded a credit card in 
wallet.google.com and everything worked. 

I have one more thing that I can ask anyone who suffers a similar fate to 
try now. 

Nathan

On Monday, November 17, 2014 11:50:11 AM UTC-8, Nathan wrote:

 Okay, I have one very very very unfortunate individual who cannot sync his 
 inapp purchases. Trying for months. 

 In fact, he is so unlucky that the same error occurs after he has changed 
 phones and changed phone companies.  

 The logs are pretty clear. getSkuDetails is returning error code 6. 
 BILLING_RESPONSE_RESULT_ERROR6Fatal error during the API action

 The logs seem to indicate that getPurchases() returns a valid list, but 
 that the same list cannot get through getSkuDetails. 
 What is there that *I* can do about this or that the customer can do about 
 this?


 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.


[android-developers] Re: Google Play Location Services on Wear

2014-11-06 Thread Nathan
For other's benefit, this is the article I was looking for:

https://developer.android.com/training/articles/wear-location-detection.html#Request
Some wearable devices include a GPS sensor that can retrieve location data 
without another tethered device. However, when you request location data in 
a wearable app, you don't have to worry about where the location data 
originates; the system retrieves the location updates using the most 
power-efficient method. 

Looks like the answer is yes. 

Nathan

On Monday, October 20, 2014 10:39:34 AM UTC-7, Nathan wrote:

 This is probably a simple If Android Wear needs a location, one way to do it 
 is to contact the mobile app counterpart and request a location and send it 
 back to the wear device.

 But I was wondering, could one use GoogleApiClient on the wear device and 
 request the location? I assume it would make the same round trip, if 
 necessary, but might have the data already.  

 In other words, could I get the location via connecting a location client and 
 calling this method?

 Location getLastLocation (GoogleApiClient 
 https://developer.android.com/reference/com/google/android/gms/common/api/GoogleApiClient.html
  client)


 Or am I oversimplifying it?


 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.


[android-developers] Samsung Developer Conference Vouchers

2014-11-06 Thread Nathan
I have one or two vouchers to the Samsung Developer Conference and won't be 
going.  

This is a good opportunity for those who will already be in the San 
Francisco area Nov 11-13. 

Contact me if interested. I could give them to you  for a fire sale price 
or work out some arrangement. 

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.


[android-developers] SSLHandshakeException errors on Android 5.0?

2014-11-06 Thread Nathan
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 14:25:41.964 E/ServerService( 9973): at 
com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:598)
11-06 14:25:41.964 E/ServerService( 9973): at 
com.android.org.conscrypt.OpenSSLSocketImpl.getOutputStream(OpenSSLSocketImpl.java:584)
11-06 14:25:41.964 E/ServerService( 9973): at 
com.crittermap.iab.serverinterface.ServerService.onHandleIntent(ServerService.java:98)
11-06 14:25:41.964 E/ServerService( 9973): at 
android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
11-06 14:25:41.964 E/ServerService( 9973): at 
android.os.Handler.dispatchMessage

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

2014-11-06 Thread Nathan
I found this already:

http://developer.android.com/about/versions/android-5.0-changes.html#ssl

I'm not quite to the point of knowing exactly what to do, but I'm checking 
with the server guy. 


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] Discount Codes in Google Play - still impossible.

2014-10-31 Thread Nathan

Someone pointed out to me that:
https://support.google.com/googleplay/answer/3422659?hl=en

Redeemed gift cards and some promotional codes appear on your account as 
part of your Google Play balance 
https://support.google.com/googleplay/topic/3421699/. Other promotional 
codes give you access to specific apps and digital content, and the 
download will be automatically added to your library after you redeem your 
code.

So how do I create these other promotional codes that give access to 
specific apps and digital content?

I'm guessing only the Google Play team can. 

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.


[android-developers] Android Wear: Disable wakeup gesture?

2014-10-30 Thread Nathan
Android Wear folks. 

Is there a way to programmatically put your Android Wear in a state that 
will not wake up when you move your arm?

Effectively making a sleep or standby mode where it won't come on until you 
push a button. 

I have a Gear Live and I don't see this in the settings. 

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.


[android-developers] Discount Codes in Google Play - still impossible.

2014-10-30 Thread Nathan
According to my best understanding, it is still not possible to offer 
discount codes for your paid app in Google Play. 

Ie, a code that you can track that gives people a discount at time of 
purchase on a specific app. 

My next question is, has someone found a creative solution? 

Could I perhaps get one if I managed to contact the right person on the 
Google Play Marketing Team?

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] Discount Codes in Google Play - still impossible.

2014-10-30 Thread Nathan Mellor
On Thu, Oct 30, 2014 at 3:22 PM, Steve Gabrilowitz steveg1...@gmail.com
wrote:

 It's not clear if you want this discount code to be a limited time offer
 or something that is always available to those in the know.  If the
 former then you might be able to work something out with a key based
 system.  You would have the regular free version of the app with 2
 different key apps, one at regular price and the other discounted.  The
 discounted one would have minimum keywords and such to minimize people
 finding it by accident and could be unpublished when the offer expired

Limited time .

So I guess it would be a special version with a different package name,
which is never updated and would have no IAP. It’s something to consider.

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] Discount Codes in Google Play - still impossible.

2014-10-30 Thread Nathan Mellor
It may be the best option.

Have a secret time when the app is discounted, and only those who sign up
for the newsletter/promotion/bundle deal will be informed in advance of
when that special . Those not so informed would still get the discount if
they just happen to be buying at the right time.

Nathan

On Thu, Oct 30, 2014 at 3:42 PM, Steve Gabrilowitz steveg1...@gmail.com
wrote:

 Another possibility is something I have seen from time to time where
 developers put an app on sale for a limited time - simple matter of
 lowering the price and putting it back when the promotion is over
 On Oct 30, 2014 6:39 PM, Nathan Mellor nathan.d.mel...@gmail.com
 wrote:

 On Thu, Oct 30, 2014 at 3:22 PM, Steve Gabrilowitz steveg1...@gmail.com
 wrote:

 It's not clear if you want this discount code to be a limited time offer
 or something that is always available to those in the know.  If the
 former then you might be able to work something out with a key based
 system.  You would have the regular free version of the app with 2
 different key apps, one at regular price and the other discounted.  The
 discounted one would have minimum keywords and such to minimize people
 finding it by accident and could be unpublished when the offer expired

 Limited time .

 So I guess it would be a special version with a different package name,
 which is never updated and would have no IAP. It’s something to consider.

 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 a topic in the
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/enPIJfI7BlY/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.


[android-developers] Google Play Location Services on Wear

2014-10-20 Thread Nathan


This is probably a simple If Android Wear needs a location, one way to do it is 
to contact the mobile app counterpart and request a location and send it back 
to the wear device.

But I was wondering, could one use GoogleApiClient on the wear device and 
request the location? I assume it would make the same round trip, if necessary, 
but might have the data already.  

In other words, could I get the location via connecting a location client and 
calling this method?

Location getLastLocation (GoogleApiClient 
https://developer.android.com/reference/com/google/android/gms/common/api/GoogleApiClient.html
 client)


Or am I oversimplifying it?


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] Re: getSkuDetails returns BILLING_RESPONSE_RESULT_ERROR

2014-10-14 Thread Nathan Mellor
I don’t know enough about the DNS Outage or Google’s usage of that range to
know if it makes a difference.

If so, is there anything I or the customer can do about it?

Nathan

On Tue, Oct 14, 2014 at 5:23 AM, lbendlin l...@bendlin.us wrote:

 Anything to do with the recent DNS outage on 8.8.8.8 ?


 On Monday, October 13, 2014 12:41:07 PM UTC-4, Nathan wrote:

 User reports that he cannot sync up his in app purchases.

 This is not in a sandbox or in testing. This is in the real world.
 Previously purchased items cannot be synched.

 I've narrowed down to the fact that I querySkuDetails and get:
 BILLING_RESPONSE_RESULT_ERROR=Fatal error during the API action

 Various comments about this on the internet indicated that Google Play
 might time out and return this error if it doesn't get a response from its
 own server within 20 seconds or whatever.
 However, I know of no way to force Google to get their response faster,
 or anything to ask the customer to do. I did ask him to clear caches as
 Google sometimes asks.

 Apparently this used to work for the customer over mobile but not wifi
 but now works on neither.


 Any ideas?

 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 a topic in the
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/GrqNRCCTNUg/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.


[android-developers] getSkuDetails returns BILLING_RESPONSE_RESULT_ERROR

2014-10-13 Thread Nathan
User reports that he cannot sync up his in app purchases. 

This is not in a sandbox or in testing. This is in the real world. 
Previously purchased items cannot be synched. 

I've narrowed down to the fact that I querySkuDetails and get:
BILLING_RESPONSE_RESULT_ERROR=Fatal error during the API action 

Various comments about this on the internet indicated that Google Play 
might time out and return this error if it doesn't get a response from its 
own server within 20 seconds or whatever. 
However, I know of no way to force Google to get their response faster, or 
anything to ask the customer to do. I did ask him to clear caches as Google 
sometimes asks.

Apparently this used to work for the customer over mobile but not wifi but 
now works on neither. 


Any ideas?

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] Re: Tracking down multiple Activity instances in memory

2014-09-18 Thread Nathan

I thought I was on to something. . . A colleague had a static textview and 
a static object that references a LoaderManager in another activity. No 
good reason, it wasn't proper communication between fragments, and the 
compiler probably prompted him to make them static in a Quick Fix. While it 
shouldn't affect the Activity I've been monitoring, It's not.  

However, now adb is broken all of a sudden. After two weeks of doing heap 
dumps, it suddenly can;t even debug. Happening with emulators too. 
Resetting adb, restarting eclipse, and restarting the macbook haven't 
helped. 

I may need to move to another topic to solve that. I see that there is 
possibly an update to ADT. And I know ADT updates always go smoothly and 
help - not. Cannot complete the install because of a conflicting 
dependency. I see rebuilding my development environment for the 
gazillionth time in my near future. 

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.


[android-developers] Apps uninstalling themselves?

2014-09-18 Thread Nathan
All of a sudden I have a  rash of people telling me that my app is 
uninstalling itself immediately after installing. Is there some new Google 
Play problem?

There's the usual one where they assume I can see their screen and remotely 
access their device. 

*Why does it keep uninstalling?*
But some with more information - one blaming Samsung. 



*After the app is done installing, it immediately uninstalls and a message 
pops up that says BC Navigator was uninstalled on my device. To use BC 
Navigator you must install it on your mobile device. Why does it keep 
doing this?*

One is blaming Samsung - which is possible. I do use Samsung SDk for the 
purposes of communicating with Gear 2. 




*I'm sure it's a Samsung issue. I set the phone's permissions and the Gear 
software permissions to authorize 3rd party apps. Your app installs and I 
get a notice which I click agree. Then another popup says it's Uninstaller 
the program!?!? I've tried it several times.*

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.


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

2014-09-17 Thread Nathan
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
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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

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

2014-09-15 Thread Nathan


On Wednesday, September 10, 2014 6:02:58 AM UTC-7, TreKing wrote:


 On Tue, Sep 9, 2014 at 11:00 PM, Nathan nathan@gmail.com 
 javascript: wrote:

 Any tips on finding the causes better?


 Review your Activity class implementation and look for any place where you 
 save a static variable


I have. It's not giving itself up that easily.  

I was hopeful, in the vast array of information in Memory Analyzer, that 
something, somewhere, would be useful in narrowing it down. But, so far, 
all leads have been useless. 

I have review all 347 or so outgoing references to the context. I'm finding 
nothing that should last longer than the activity pointing back to the 
activity. 
 

 (like a cached Bitmap) using the Activity as a Context. That's the usual 
 culprit.


The Android.Graphics.Bitmap class, to my knowledge, does not have any 
context reference. 

It is code that has had multiple people working in it and uses some 
external libraries. So the problem could be deeper, I just wish there were 
more clues.  

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.


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

2014-09-09 Thread Nathan
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
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Android Wear Communication between apps

2014-08-25 Thread Nathan
Can anyone confirm whether Mobile and Wear apps find each other based on 
their package name?

It seems that one to many or many to one relationships are impossible. 

Nathan

On Friday, August 22, 2014 12:24:10 PM UTC-7, Nathan wrote:

 Just barely looking at the communication protocols for Android Wear and 
 needed to clarify something before I go too far down the road. 

 Is the communication only intended between a mobile app and its 
 corresponding Wear app? 

 Or could there be a one to many or many to one relationship?

 Looking at the documentation, I don't see the part where you specify which 
 app you are talking to. 

 I think it is unlikely that every wear app gets every message from every 
 mobile app, or vice versa. 

 So I would assume that a wearables apk must be installed from inside the 
 mobile app sdk to be paired with it

 and there is no chance, say, for the free and paid version of an app to 
 both communicate with the same wearable app. 

 In any case, what is the mechanism by which the apps know who their peer 
 app is? Is it by using the exact same package name or by some other 
 mechanism? 

 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.


[android-developers] Non source code files in Android Studio / Gradle.

2014-08-22 Thread Nathan
I'm new to Android Studio  and Gradle projects. I don't know what all the 
files mean. 

Is there a concise guide for which files/foldes should *not* be in source 
control (ie SVN or Git)?
Or even better, some SVN or Git ignore or other settings which enforce 
that. 

A contractor just put a project into SVN for me, put too much there, and 
frankly, it's a disaster.  

I would like him to fix it, but would like to give him good guidance. 

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.


[android-developers] Android Wear Communication between apps

2014-08-22 Thread Nathan
Just barely looking at the communication protocols for Android Wear and 
needed to clarify something before I go too far down the road. 

Is the communication only intended between a mobile app and its 
corresponding Wear app? 

Or could there be a one to many or many to one relationship?

Looking at the documentation, I don't see the part where you specify which 
app you are talking to. 

I think it is unlikely that every wear app gets every message from every 
mobile app, or vice versa. 

So I would assume that a wearables apk must be installed from inside the 
mobile app sdk to be paired with it

and there is no chance, say, for the free and paid version of an app to 
both communicate with the same wearable app. 

In any case, what is the mechanism by which the apps know who their peer 
app is? Is it by using the exact same package name or by some other 
mechanism? 

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] In App Billing - Signature Verification failed.

2014-08-15 Thread Nathan


On Thursday, August 14, 2014 4:25:30 PM UTC-7, Kostya Vasilyev wrote:

 Or with the just updated Google Play app.
  
Very likely. I have few a people telling me the version of Android Market 
on their phone doesn't support in app billing. 

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] In App Billing - Signature Verification failed.

2014-08-14 Thread Nathan


On Wednesday, August 13, 2014 9:14:29 PM UTC-7, Nikolay Elenkov wrote:

 On Thu, Aug 14, 2014 at 9:41 AM, Nathan nathan@gmail.com 
 javascript: wrote: 

  
  So why would Google Play send me a bogus signature? Its not the first 
 Google 
  glitch, but what can I or the customer do about it? 
  

 Build a backup license restore method (using randomly generated license 
 codes 
 that your *own* server verifies, etc.). If a customer is having 
 problems, send them 
 a license code. Alternatively, if there is major breakage, modify your 
 server to 
 temporarily ignore signature verification failures. 

 IAP breaks from time to time, has been that way for years. Not much you 
 can do 
 about it but add workarounds in your code. 


Unfortunately, I think you are right. 
 
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] In App Billing - Signature Verification failed.

2014-08-14 Thread Nathan
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.


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

2014-08-13 Thread Nathan
Customer cannot restored a purchased subscription. Log indicates:
Purchase signature verification **FAILED**. Not adding item.

This happened several months ago as well. I checked the server logs and yes 
indeed the signature was invalid. I don't know what ever happened with that 
customer. 

Customer is using the same Google Account. He can even see the subscription 
and its expiration date on the Google Play Listing, a new feature. 

So why would Google Play send me a bogus signature? Its not the first 
Google glitch, but what can I or the customer do about it?

It's happening in this part of the IABHelper code. As recommended, I 
replaced the inline signature verification with one on a server. 

if (server.verify(purchaseData, signature, false)) {
logDebug(Sku is owned:  + sku);
Purchase purchase = new Purchase(itemType, 
purchaseData, signature);

if (TextUtils.isEmpty(purchase.getToken())) {
logWarn(BUG: empty/null token!);
logDebug(Purchase data:  + purchaseData);
}

// Record ownership and token
inv.addPurchase(purchase);
}
else {
logWarn(Purchase signature verification **FAILED**. 
Not adding item.);
logDebug(   Purchase data:  + purchaseData);
logDebug(   Signature:  + signature);
verificationFailed = true;
}

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] Re: Compass Reading - proper implementation.

2014-08-01 Thread Nathan
Thanks, I've made much more progress. I'm making Rotation the primary if it 
exists and smoothing the Mag-accel via exponential smoothing of the 
vectors. 

I have seen in some examples where gravity sensor is used as if it were a 
backup to the accelerometer. However, I have found no device that has a 
gravity sensor and no accelerometer. 

I have much more data now about which devices have which sensors. I can 
share it here if people are interested. 

I've seen that about two thirds of devices have a rotation sensor. A very 
few have a rotation sensor and no magnetic sensor, which seems not right to 
me. 

Drifting only a little bit, but does anyone know what sensors the Android 
Wear watches, Gear Live and LG G have?

It looks like they do have magnetic and accelerometer but I can't tell if 
they have Rotation. I don't have the hardware yet to query and emulators 
will be no good. It would simplify things if we know they have rotation 
sensor. 

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] Re: Compass Reading - proper implementation.

2014-07-23 Thread Nathan
I have collected more data on the topic that you might be interested in. 
Trying to give back. 

In five days of Analytics data, I have found
85 devices returning no orientation sensor.
Of these, most do not have a magnetic sensor either, such as the Samsung 
SCH-S738C Galaxy Centura. So some people complaining about the compass 
won't get a solution. 
However ten or so do not return the orientation, but do have the magnetic 
sensor, such as a few of the gazillion iterations of the Samsung S III or 
Samsung S IV, such as Samsung GT-I9300 Galaxy S III.  So some of those 
saying the compass doesn't work in one app but does work in some others, 
are part of a group that is rare but real. Of course, this doesn't tell us 
how many devices return the orientation_sensor, but have erroneous or low 
res data.

What I have done may be a bit rash, but I released the product preferring 
the magnetic/accelerometer whenever API=9. So far I have a few complaints 
that it is jittery (smoothing hasn't been released yet), two people that 
were healed, and relatively quiet otherwise. 

Do most of you agree with Adam that the rotation sensor is to be preferred 
and needs no smoothing when it exists? I haven't tried that one yet. 

I've noticed that about 15 devices, including the Amazon KFTHWI Kindle Fire 
HDX 7 3rd Gen return a rotation sensor (and sometimes an orientation 
sensor) even when they don't return a magnetic sensor. Does this mean their 
rotation data is suspect, or just that they might not expose the magnetic 
data. 

I could post my full findings in another week if people are interested. 

One thing I can definitely conclude is that if a customer has a complaint 
about a sensor, and gives you the device name simply as Galaxy S III, 
that isn't nearly specific enough. 

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] Re: Compass Reading - proper implementation.

2014-07-23 Thread Nathan
I have found these examples of using the rotation sensor. Are they correct?

https://github.com/kplatfoot/android-rotation-sensor-sample/blob/master/src/com/kviation/android/sample/orientation/Orientation.java
https://android.googlesource.com/platform/development/+/master/samples/ApiDemos/src/com/example/android/apis/os/RotationVectorDemo.java
http://stackoverflow.com/questions/14740808/android-problems-calculating-the-orientation-of-the-device


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] Re: Compass Reading - proper implementation.

2014-07-16 Thread Nathan


On Tuesday, July 15, 2014 7:53:52 PM UTC-7, Adam Ratana wrote:

 Nathan, I would suggest just using a simple low pass filter (in this case 
 an EWMA - http://en.m.wikipedia.org/wiki/Exponential_smoothing) and 
 tuning the weighting to taste. The more samples usually the smoother you'll 
 get. I use the GAME rate, but I believe you can specify a rate past a 
 certain api level (would need to look at code, it's been a while). 

 And I imagine you do something special for wraparound cases? For example, 
359 and 1 would average out to 180 instead of 0. 

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.


[android-developers] Mock locations from GPX track on real device?

2014-07-15 Thread Nathan
I am not seeing any app on the market that does this. 

The emulator will use a GPX file, but it is grayed out for a real device. 

Have one of you invented an app that does this?

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] Re: Compass Reading - proper implementation.

2014-07-15 Thread Nathan Mellor
For those of you who have smoothed the jitter.


On Wed, Jul 9, 2014 at 11:55 PM, gjs garyjamessi...@gmail.com wrote:


 One way to smooth the jitter is to compute an average value from a small
 array of recently stored recent values.


For those who have filtered to get a smooth value, what is a good buffer
size and Sensor delay?

I notice that SENSOR_DELAY_NORMAL gives me lower frequency jitter than a
higher frequency, but I’m not counting on the fact that it does any
smoothing.

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.


[android-developers] Re: Compass Reading - proper implementation.

2014-07-09 Thread Nathan


On Monday, March 17, 2014 4:40:21 PM UTC-7, Nathan wrote:

 Last time I worked on a compass reading (which was years ago), I did 
 something like this. 

 A:
 http://www.javacodegeeks.com/2013/09/android-compass-code-example.html

 Of course, this example has a locked portrait orientation. 

 So, I call something like this to get it in sync. 

 http://developer.android.com/reference/android/view/Display.html#getRotation()

 Now, I realize that some of the calls in example A are deprecated. Many 
 devices with which I am familiar, though, it actually does work. 

 That's why, if I were to do a new implementation today, I might consider 
 something like implementation B.   

 B:
 http://sunil-android.blogspot.com/2013/02/create-our-android-compass.html

 I have no good way of testing either method on all of today's gazillion 
 Android devices, so I am going to have to use a best practice, and try to 
 blame the user's device when they don't work. 

 So my questions are:
 1. Does implementation B already take into account landscape/portrait 
 orientation of the device, or should I continue to use Display.getRotation?
 2. Are there known devices for which A fails and B works or vice versa?
 3. Are there devices with usable sensors for which neither A or B works?
 4. Are there any known drawbacks of implementation B?

 Nathan


To follow up with my question from a several months ago. 

I can confirm that the deprectated Orientation sensor method (method A 
above) is broken in some devices. Not just wrong values - no values 
apparently. 

Two users at once told me they were getting no compass readings. When two 
users at once do that, I can expect the problem will soon be widespread. 
Xperia M2, and Samsung S4 mini. 

A log file from one showed this:
07-08 21:39:35.103 E/SensorManager(15370): sensor or listener is null

I had both implementations in the code, but never really activated method B 
because of no real testing. 

I sent custom apk to one of the users, and method B worked. Both method A 
and method B work on the Galaxy note 3, which I have. 

Method B is much more jittery, and I expect that is the case in all 
devices. Don't know how to resolve that yet, and haven't seen gimbal lock 
yet to comment.  

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.


[android-developers] Re: How to list my app as Wearable compatible?

2014-07-09 Thread Nathan


On Tuesday, July 8, 2014 9:55:27 PM UTC-7, Tommy wrote:

 Hi, 
 I'm wondering how to list my app as wearable compatible, like in this list?

 https://play.google.com/store/apps/collection/promotion_30008f2_io_android_wear?hl=en

 That looks like a handpicked list of featured apps, so the real question 
may be how you get the attention of the Google Play Marketing team.  I 
don't know the answer. 

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.


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

2014-06-30 Thread Nathan
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.


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

2014-06-23 Thread Nathan
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.


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

2014-06-23 Thread Nathan
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.


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

2014-06-04 Thread Nathan Barraille
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.


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

2014-06-03 Thread Nathan Barraille
Hello,
I have a problem with the Android framework for which I'm not able to find 
any ideal design solution.
I have an activity that contains multiple fragments, all those fragments 
need to access the same model object. This model object can be loaded from 
a memory cache, ContentProvider or network, depending on a bunch of 
parameters. I wanted to use a Loader to load that model object, so that it 
doesn't have to be loaded again when the activity is recreated, and it can 
be observed if it changes.
All my fragments don't really have a purpose without the model object 
loaded, as they don't have any data to display.
Here are the options I considered:

*#1: Have the activity initialize the loader in its onCreate() method, and 
add the fragments to the activity when the model finishes loading: *
 *Problem:* It is unsafe to make fragment transactions in a callback 
method, because the activity state might be paused, according 
to 
http://developer.android.com/reference/android/app/LoaderManager.LoaderCallbacks.html#onLoadFinished(android.content.LoaderD,
 
D)

*#2: Have the activity initialize the loader and add the fragments in its 
onCreate() method, and call a custom method on the fragment to set the 
model*
 *Problem:* I cannot use the recommended setArguments() method to set 
the data on the fragment, which means that if my fragment is re-created by 
the system, it won't have a reference to the model anymore

*#3: Have the activity initialize the loader and add the fragments in its 
onCreate() method, and have the fragments access the model through the 
activity*
*Problem*: The fragments won't know whether or not the model is loaded 
in the activity, and if I add a method on the fragment for the activity to 
let it know, I'll have the same problem as #2

*#4: Have all my fragments initialize a loader independently and load the 
data on their own.*
 *Problem:* That's really inefficient, especially if the model needs to 
be loaded from the network

I'm kind of thinking now that I could do something like #3, and having an 
additional call in my fragments' onResume() that checks whether or not the 
model is set in the activity to set its state, but that seems hacky...

Is there a cleaner way of doing 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-developers@googlegroups.com
To unsubscribe from this group, 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] Dual Display and 3D Frameworks? (ie Unity, etc).

2014-06-02 Thread Nathan
I have a potential project that involves use of the Secondary Display 
functionality in 4.2+ and 3d rendering. 

Is anyone here experienced with 3D libraries and the secondary display? By 
secondary display, I mean potentially displaying different 3d content on 
the TV, not just a mirror of what is on the screen. 

In particular, I don't know if, for example, Unity works smoothly with 
multiple screens. I couldn't find an example; maybe I wasn't using the 
right search words. 

I'll note that I don't have much experience with 3D frameworks nor 
Secondary Displays yet. If this project goes forward, I will likely hire 
someone or partner with someone with more experience. 

But I'd want to know if many of you have tried it first. I wouldn't be 
trying to hand code a bunch of OpenGL, so I wondered if it is already a 
common practice with the 3D frameworks. 

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.


[android-developers] Re: Dual Display and 3D Frameworks? (ie Unity, etc).

2014-06-02 Thread Nathan
Initial look appears to verify that use of secondary displays is *not* yet 
available on Unity. 

This is one place I found the question being asked. 
http://forum.unity3d.com/threads/android-external-display-support.226815/

I am not able to find anything that addresses whether this is possible in 
libgdx, Rajawali or anything else. 

Any framework that requires you to inherit from their Activity is not 
likely to work since the Presentation class extends from Dialog. 

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

2014-05-07 Thread Nathan
OK, here is a mystery exception 

I can't even tell if it is even in my code, but with 429 reports on 
Crashlytics, I should at least investigate. 

So possibly, a string argument to SQLite is null. But where?
I don't recognize com.google.kzm.*. Is it some obscured code of Google 
Analytics?

Nathan

java.lang.IllegalArgumentException: the bind value at index 1 is null
   at 
android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:164)
   at 
android.database.sqlite.SQLiteProgram.bindAllArgsAsStrings(SQLiteProgram.java:200)
   at 
android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)
   at 
android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1314)
   at 
android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1161)
   at 
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1032)
   at 
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1200)
   at com.google.kzm.i.a()
   at com.google.kzm.g.a()
   at com.google.kzm.g.a()
   at com.google.kzm.h.run()
   at java.lang.Thread.run(Thread.java:856)

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

2014-05-01 Thread Nathan
User reported that a known distance of 3.6 fluctuates between 3.6 and 100.7 
when moving only enough to trigger a refresh. 

So, yep there is a problem with simple math. 

The chatter I could find indicates there was a mathematical, pentium chip 
like problem on Android 4.2.1 that is likely fixed with Android 4.2.2. 

https://android.googlesource.com/platform/dalvik/+/4888a4b95e2f1b2cdeb6a0ca8dd75c784eb80256

Don't you love the fragmentation?

Nathan

On Saturday, April 26, 2014 9:52:48 AM UTC-7, Nathan wrote:

 If I had the hardware, yes. 

 As it is, I will have an end user try a single linear distance that is 
 known to him and see how it compares.  

 Nathan

 On Saturday, April 26, 2014 4:28:38 AM UTC-7, lbendlin wrote:

 You could verify the first assumption by doing the distance calculation 
 manually.

 On Friday, April 25, 2014 2:16:17 PM UTC-4, Nathan wrote:

 In one weekend, I suddenly got six reports that distance measure by GPS 
 was way off. Way off. Like walk 500 feet and it says you just walked 32 
 miles.

 On further interrogation, ALL of these reports were from device model 
 ME173X, the Asus Memo pad.

 Possibilities are the following:
 Getting erroneous or inconsistent results from the Location.distanceTo 
 or Location.distanceBetween method. (Sounds really weird, but some behavior 
 described by an end user could be caused by that.)
 Getting a bunch of noisy location data form the GPS. But this is already 
 a common scenario, and they would see other effects from it. 

 Anyone aware of any weird things from that device?

 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.


[android-developers] ADT Update?

2014-04-28 Thread Nathan
Okay, I installed updates to the Android SDK. 

It tells me that I need to update the ADT plugin and redirects me to Check 
for Updates.

Checking for Updates says there are no updates. I checked the download site 
for the ADT and it matches. 

In the meantime, no Android targets are available. 


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.


[android-developers] Re: Location.distanceTo() and Asus Memo Pad.

2014-04-26 Thread Nathan
If I had the hardware, yes. 

As it is, I will have an end user try a single linear distance that is 
known to him and see how it compares.  

Nathan

On Saturday, April 26, 2014 4:28:38 AM UTC-7, lbendlin wrote:

 You could verify the first assumption by doing the distance calculation 
 manually.

 On Friday, April 25, 2014 2:16:17 PM UTC-4, Nathan wrote:

 In one weekend, I suddenly got six reports that distance measure by GPS 
 was way off. Way off. Like walk 500 feet and it says you just walked 32 
 miles.

 On further interrogation, ALL of these reports were from device model 
 ME173X, the Asus Memo pad.

 Possibilities are the following:
 Getting erroneous or inconsistent results from the Location.distanceTo or 
 Location.distanceBetween method. (Sounds really weird, but some behavior 
 described by an end user could be caused by that.)
 Getting a bunch of noisy location data form the GPS. But this is already 
 a common scenario, and they would see other effects from it. 

 Anyone aware of any weird things from that device?

 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.


[android-developers] Location.distanceTo() and Asus Memo Pad.

2014-04-25 Thread Nathan
In one weekend, I suddenly got six reports that distance measure by GPS was 
way off. Way off. Like walk 500 feet and it says you just walked 32 miles.

On further interrogation, ALL of these reports were from device model 
ME173X, the Asus Memo pad.

Possibilities are the following:
Getting erroneous or inconsistent results from the Location.distanceTo or 
Location.distanceBetween method. (Sounds really weird, but some behavior 
described by an end user could be caused by that.)
Getting a bunch of noisy location data form the GPS. But this is already a 
common scenario, and they would see other effects from it. 

Anyone aware of any weird things from that device?

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.


[android-developers] Understand and reduce Application Resources memory usage

2014-04-21 Thread Nathan Barraille
Hello,
I am working on reducing the memory usage of my application, and it looks 
like one of the part that consumes a lot of it is the application Resources 
class that gives access to all my drawable pngs. I didn't find a lot of 
documentation on how it deals with memory, but it looks like it loads the 
png that are in my res/drawable/* folders when they are needed, and they 
are actually never released from memory.
I have a couple questions about this:
 - Is this really what happens?
 - Are all screen density images loaded, or just the one adapted for my 
device?
 - Where kind I find more info about this?

I have a bunch of pngs that are only being used once (Splash screen 
background, onboarding screens, etc...), but running the Eclipse MAT, it 
looks like they're never released from the Resources.
 - Is there a way to unload them from the memory once they're not needed 
anymore?
 - It looks like there is a method for flushing the Resources 
(http://developer.android.com/reference/android/content/res/Resources.html#flushLayoutCache()),
 
but according to the doc it should only be used for tracking performances. 
Is it unsafe to use in my context?
 - Should I just not put large images in my res/drawable folder and decode 
them manually from the disk so that they don't get stored in Resources at 
all? If yes, where is a good place to store this kind of files?

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.


[android-developers] New Content Policy in Google Play

2014-03-28 Thread Nathan
Just had to accept it. 

Who has done a diff on it already?

What has changed?

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.


[android-developers] Re: New Content Policy in Google Play

2014-03-28 Thread Nathan
Oh good, I found it here:

http://www.androidpolice.com/2014/03/28/google-updates-play-store-developer-program-policies-to-crack-down-on-deceptive-ads/


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] External Storage lockout in 4.4 update on some Samsung devices.

2014-03-26 Thread Nathan
And get this. Apparently Google Play Support is blaming me. 

==
What I suggest is that you contact the developer and ask them when they are
going to release an update that is compatible with Kit Kat. After they do
this the app should work as it did before you perform the update.

I got pretty steamed and have been contacting them. 
 
Someone responded:
your target SDK is 17, platform version 4.2. Currently the customer's 
device is running Kit Kat, platform version 4.4.2.
For the reasons stated above it looks like the app is not compatible with 
the user's device.

Well, apparently Google Play support doesn't know the difference between 
target SDK and MaxSDK, but they are willing to think that they do. Or maybe 
they do have some information that suggests rolling the targetSDk will fix 
this problem. But there is no such information at the Android developer 
site. Really wish it were that simple. 

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.


[android-developers] Re: Compass Reading - proper implementation.

2014-03-20 Thread Nathan


On Thursday, March 20, 2014 4:44:23 AM UTC-7, gjs wrote:

 Hi,

 Risk - that B won't work as well A and (many?) users will complain. Reward 
 - you won't be bothered by the deprecation warnings.


Put that way, it's a no brainer. Deprecation warnings only scratch at the 
perfectionist in me, if any. User complaints sap time and money that could 
be spent on more features and benefits for those users. 
 
However, is there risk for staying with A? That it is already broken on 
some devices? That it will break completely on 4.5, since we've had plenty 
of notice?

I can't say whether A is broken yet. Every release, some user is sure to 
tell me I broke all compass functionality, but
-Some devices have bad sensors
-Some whole models have bad or nonexistent sensors. Of course they blame 
the app. 
-Users don't know how to calibrate their devices and use them near metal or 
magnets. 
- I have an algorithm that switches from static to moving direction at the 
right speed, and that can fail. 


 A little while back I also implemented  tested method B for the same 
 reasons  I found that method B had more jitter (than method A)  had to be 
 smoothed somewhat, but worse that method B suffered from an apparent 
 'gimbal lock' when pointed towards west, with the readings fluctuating 
 wildly when pointed at or near to 270 degrees (with the device in landscape 
 orientation). I only tested briefly on a few (recent  popular phone) 
 devices with each having the same issue so I gave up, manly due to time 
 constraints  continue using method A.

 My suggestion would be to implement both A  B in parallel, test/log  
 compare results from both methods on as many devices as you can reasonably 
 try before deciding on making the change.

 To do that, I'd have to put a user setting in. Only advanced users would 
find that setting, but it could protect you in the event of sudden death of 
Method A.  
 

 I'd be interested to read about the experiences of other people on this 
 topic, particularly regarding the 'gimbal lock' for method B.


Me too.

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.


[android-developers] Re: Compass Reading - proper implementation.

2014-03-19 Thread Nathan
Putting it more concisely. . .

If I have some legacy code implementing a compass reading using the 
deprecated Orientation_Sensor, in use by thousands already.

What is the risk/reward of implementing something like the Implementation 
here:
http://sunil-android.blogspot.com/2013/02/create-our-android-compass.htmlhttp://www.google.com/url?q=http%3A%2F%2Fsunil-android.blogspot.com%2F2013%2F02%2Fcreate-our-android-compass.htmlsa=Dsntz=1usg=AFQjCNEKNuIbn3u_M-hpmp5vQrGcV5EVOg

vs leaving it alone. 

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.


[android-developers] Compass Reading - proper implementation.

2014-03-17 Thread Nathan
Last time I worked on a compass reading (which was years ago), I did 
something like this. 

A:
http://www.javacodegeeks.com/2013/09/android-compass-code-example.html

Of course, this example has a locked portrait orientation. 

So, I call something like this to get it in sync. 
http://developer.android.com/reference/android/view/Display.html#getRotation()

Now, I realize that some of the calls in example A are deprecated. Many 
devices with which I am familiar, though, it actually does work. 

That's why, if I were to do a new implementation today, I might consider 
something like implementation B.   

B:
http://sunil-android.blogspot.com/2013/02/create-our-android-compass.html

I have no good way of testing either method on all of today's gazillion 
Android devices, so I am going to have to use a best practice, and try to 
blame the user's device when they don't work. 

So my questions are:
1. Does implementation B already take into account landscape/portrait 
orientation of the device, or should I continue to use Display.getRotation?
2. Are there known devices for which A fails and B works or vice versa?
3. Are there devices with usable sensors for which neither A or B works?
4. Are there any known drawbacks of implementation B?

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] External Storage lockout in 4.4 update on some Samsung devices.

2014-02-26 Thread Nathan


On Wednesday, February 26, 2014 11:31:21 AM UTC-8, Jonathan S wrote:

 Users should have to backup data first. 


I don't know that we have a way of forcing customers to backup data first. 
And if the data takes up a majority of space on the external card, I don't 
know what they would backup to.  

I expect they will find out after the fact. 

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.


  1   2   3   4   5   6   7   8   >