[android-developers] Re: MonkeyRunner.waitForConnection() can't get device with network

2016-02-17 Thread Diego Torres Milano
Try *AndroidViewClient/culebra* 
 that could connect to 
devices connected over the network (i.e. TV) with no problems.
If you want to just take screenshots `dump -f` (one of the tools included 
in the package) does just that.


On Wednesday, 17 February 2016 03:26:30 UTC-5, huang xin wrote:
>
> Hi,
>
> Now, i'm studying how to use the MonkeyRunner to test android devices. 
> There is an android tv set, enabled adbd, no usb debug port, but network 
> is available. I can use a following commend to connect this device with adb
>
> *adb connect 172.30.198.240.*
>
> List of devices attached
> 172.30.198.240:device
>
>
> Then i checked this connection that was successful.  i can use adb shell 
> command to login the tv.
>
>  i wrote a python script(called test.py) to test the MonkeyRunner.
>
> #Script start###
> *from com.android.monkeyrunner import MokeyRunner, MonkeyDevice*
>
> *device = MonkeyRunner.waitForConnection() # <---wait for ever*
>
> *if device is not None:*
> *device.takSnapshot()*
> ##Script END###
>
> after aboves done, i input the* monkeyrunner.bat test.py* in the dos 
> terminal of win7.
> the codes blockedt the MonkeyRunner.waitForConnection() for ever, and adb 
> server was killed.
>
> I also tried to use next method: *monkeyrunner.bat -s 172.30.198.240 
> test.py, *but failed again.
>
>
> Then i change  a phone with a usb debug port to connect my pc. Above 
> script ran ok.
>
> I don't know why, could you help me?
>
> thanks a lot
>
>
>
>
>
>

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


Re: [android-developers] Whether / how to upgrade Android Studio from 1.3.1 to 1.5.1

2016-02-17 Thread Hernán G .
Thanks for answering! I pointed the Updates to the Dev Channel, and it 
worked.

On Wednesday, February 17, 2016 at 2:14:31 PM UTC-5, TreKing wrote:
>
>
> On Thu, Jan 7, 2016 at 7:25 AM, > wrote:
>
>> (a) Do I want to upgrade to 1.5.1?
>>
>
> Generally, yes, you want to update to the latest stable release. 
>
> (b) If so, how do I do it?
>>
>
> Make sure you're pointing to the stable channel for downloads. If you are 
> configured to get the alpha or beta releases, that's what you'll get. Check 
> the setting under Preferences > System Settings > Updates.
>
>
> -
> 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 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/218f4d54-2ea3-4ad8-b3f5-e239307d5ecb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Application getting wrong location until open inbuilt Google Map application

2016-02-17 Thread gjs
Hi,

Try checking 
http://developer.android.com/reference/android/location/Location.html#hasAccuracy()
 
and 
http://developer.android.com/reference/android/location/Location.html#getAccuracy()
 
on the Location object provided your location listener associated with Fused 
Location API, if that accuracy is not good enough for your purposes then 
probably try GPS location provider (as per Google Maps), see also 
http://developer.android.com/guide/topics/location/strategies.html

Regards

On Wednesday, February 17, 2016 at 11:50:00 PM UTC+11, Chirag Raval wrote:
>
> Hello All,
>
> I have developed one application which is used to find current location of 
> device. I have used Fused Location API to get current location.
>
> I am facing very strange issue, in some of devices i am not getting 
> accurate current location until i open inbuilt Google Map, once i open 
> Google Map and back to my application at that time application return exact 
> location.
>
> Can anyone tell me what is the wrong? Your help is really appreciated.
>

-- 
You received this message because you are subscribed to the Google 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/175bba94-fc8f-4c22-a3fc-a7312a2091b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Urgent Need Automation Tester (Coded UI) Long-term Contracts

2016-02-17 Thread gjs
Try Setting -> Factory Reset that should fix your error...

On Thursday, February 18, 2016 at 4:16:28 AM UTC+11, Javed Khan wrote:
>
> Please share profile: ja...@globalwebmaster.us
>
>  
>
> Hi,
>
> Hope you are doing great.
>
> We have new job opportunity with our client. I am sending the job 
> description for your review so please go through that and reply with 
> your/consultation resume with contact details. I will highly appreciate if 
> you can send ASAP.
>
>  
>
> VERY URGENT AND IMMEDIATE NEED
>
>  
>
> Job Title  :   Automation Tester (Coded UI)
>
> Location  :   Chevy Chase, MD
>
> Duration :   Long-term Contracts
>
> Interview   :   Phone / Skype
>
> Start Date   :   ASAP
>
>  
>
> *Job Description:*
>
> •  *Test Automation* 
>
> •  Should be capable to understand the underlying technology 
> on the various automation tools. 
>
> •  Should be capable to evaluate the best tool to the client. 
>
> •  Should be capable to create the required automation 
> framework to the client.
>
> •  Web Testing 
>
> •  Should have good knowledge & concepts of UI validations, 
> GUI features etc. Concepts of Globalization and Localization testing will 
> be an added advantage
>
> •  Application Testing 
>
> •  Should be able to differentiate the different testing 
> phases like Unit Integration, System, Acceptance, Regression testing 
>
> •  should be capable to perform these tests with the help of 
> ready-test cases. 
>
> •  Should understand Test Plans, Requirement Traceability 
> Matrix, Orthogonal Array Tool. 
>
> •  Should be able to do metrics analysis and reliability 
> analysis effectively with DFA tool.
>
> •  Tool - *VSTS Coded UI Automation Testing*
>
>  
>
> ---
>
>  
>
> Warm Regards,
> *Javed Khan (Sr. Technical Recruiter)*
>
> Global Webmaster Inc.
>
> 160 Beach, Rockaway Park, NY 11694
>
> Direct: (312) 428-7795
>
> Email: ja...@globalwebmaster.us 
>
> Skype ID: *javeedkhan.khan2*
>
> GTalk: javeedimrank...@gmail.com   ; 
> javedglobalwebmas...@gmail.com  
>
> www.globalwebmaster.us
>

-- 
You received this message because you are subscribed to the Google 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/80bbdfa2-5aa3-4aa8-8039-c157b8ab14ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Immediate Need||UX Architect/ Project Manager(12+ Months,DC)

2016-02-17 Thread gjs
Try Setting -> Factory Reset that should fix your error...

On Thursday, February 18, 2016 at 6:05:49 AM UTC+11, pragyan dixit wrote:
>
>
>
> Hi,
> Hope you are doing great.
> I have a urgent direct client requirement , Please send me your updated 
> profile.
>
> Below is the Complete Requirement
>
>  
>
>  
>
> *Role:  * *UX Architect/ Project Manager*
>
> *Location: Washington ,DC*
>
> *Duration: 12+Months *
>
>  
>
> *Job Description:*
>
> *10 year experience required.*
>
> Experience with standard prototyping & Design tools (ex: Axure, Photoshop, 
> Omnigraffle, Invision, FramerJS, etc.).
>
> Creating process flows, site maps, wireframes, screen prototypes, and 
> functional specifications
>
> Ability to elicit feedback and understand complex requirements
>
> Knowledge of business requirement gathering, site assessment, competitive 
> analysis, and secondary research
>
> Interaction design, process development and improvement
>
>  
>
>  
>
> *Thanks and Regards…*
>
> Pragyan Dixit 
>
> Technical Recruiter
>
> [image: cid:image001.jpg@01D14DEF.5BAD6DB0]408-722-9446 ext. 5099 [image: 
> cid:image002.jpg@01D14DEF.5BAD6DB0]pragya...@e-solutionsinc.com 
>  
>
> ADDRESS:- e-Solutions Inc| 2 N. Market St., Suite # 400, San Jose, CA 
> -95113, 
>
> WEBSITE:- www.e-solutionsinc.com
>
>  
>
>  
>
>  
>
>  
>
>
>
>
>
>  
>
>
>
>

-- 
You received this message because you are subscribed to the Google 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/06551bca-a031-497a-a011-09905bcbb665%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


android-developers@googlegroups.com

2016-02-17 Thread gjs
Try Setting -> Factory Reset that should fix your error...

On Thursday, February 18, 2016 at 9:31:06 AM UTC+11, Vikram Murari wrote:
>
> Hello,
>
> Hope you are doing great,
>
>  
>
> I have below urgent requirement with my Global consulting partner. Please 
> have a look at the below mentioned detailed Job description and let me know 
> your interest at your earliest.
>
>  
>
> *Position: Oracle DBA Consultant*
>
> *Location: Hammonton/Folsom, NJ (Philadelphia / Mount Laurel / Cherry Hill 
> NJ area.)*
>
> *Long Term*
>
>  
>
> Client prefers local candidates. ( Philadelphia, Trenton and Southern NJ 
> areas)
>
> Communication skills must be a 10 and ability to interact with business 
> users and upper managers is very important with this position. 
>
> The Oracle DBA / (Production) will participate in the planning, design, 
> development and support of a dynamic database infrastructure including 
> performance tuning and load testing, security administration, 
> backup/restore, real-time monitoring and troubleshooting, and ongoing 
> grooming and maintenance.
>
>  
>
> Responsibilities include: 
>
> • Providing design assistance, analyzing and managing application 
> and database solutions with technical emphasis in performance monitoring, 
> problem identification and resolution;
>
> • Assisting with tuning and monitoring of the operational 
> efficiency and technical integrity of applications in support of internal 
> and external customers databases and installations;
>
> • Assisting with installations, patches and upgrades to CLIENT 
> applications;
>
> • Performing data analysis, testing and software configuration of 
> customer environments as necessary;
>
> • Analyzing trends and reporting potential problems or areas of 
> improvement concerning internal and customer databases;
>
> • Assisting with the creation and maintenance of departmental 
> documentation and standards
>
> • Monitoring and responding to database performance issues
>
> • Writing queries and stored procedures to support application 
> requirements, ad-hoc requests and data updates
>
> • Providing Incident and Problem Management support for database 
> related tickets
>
>  
>
> Qualifications
>
> • Bachelor’s degree in Computer Science, Information Technology, 
> or related area (equivalent work experience will be considered)
>
> • 7 years of experience as an Oracle database 
> administrator/developer, preferably in a dynamic real-time production 
> environment
>
> • Experience with Oracle 11g required.  Experience with Oracle 12c 
> a plus
>
> • Day to day work experience in backup and recovery concepts
>
> • Day to day work experience Oracle cloning environments
>
> • Day to day work experience in performing SQL and database tuning
>
> • Strong understanding of DBA best practices/strategies in areas 
> of security, backup/recovery, integrity checks, configuration patching, 
> capacity planning and monitoring
>
> • Extensive experience of index managements - how indexes are 
> stored, created and managed effectively
>
> • Strong interpersonal and communication skills
>
> • Strong problem solving and decision making skills
>
> • Strong focus on creating high quality deliverables
>
> • Accuracy and strict adherence to deadlines
>
> • Focus on continual process improvement
>
> • Able to bring multiple, concurrent projects to successful 
> completion
>
> • Easily adapts to changing priorities
>
>
> Thanks & Regards
>
> *Vikram Murari* 
>
> Office: (925) 973- x 207 | Fax: (408) 273-6002
>
> Email: vik...@allianceit.com  |URL: www.allianceit.com 
>

-- 
You received this message because you are subscribed to the Google 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/15657927-dfcb-46b5-a05c-a8b9e213a6a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] App Invite Quota ?

2016-02-17 Thread Erick Costa
Hello,
I'm using Google Appinvite for Android and it works very well:
https://developers.google.com/app-invites/android/

But I realized that a certain time of day any user can send the invites and 
after a few hours back to work.
I have a daily quota of submissions?
If so how do I increase?

-- 
You received this message because you are subscribed to the Google 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/6faf5b54-e995-4c19-a50c-8daf8fd62926%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Text to speech

2016-02-17 Thread Rakesh Jha
What exactly you are looking, if example gives you about "Hello World" then
rest you can design and developed.

On Thu, Feb 18, 2016 at 8:18 AM, 0101001001100110 
wrote:

> Im looking for a tutorial on using text to speech. I have found many
> tutorials on building a text box and a button that speaks, but nothing that
> does a basic "hello world".
> Thank you on advance.
>
> --
> You received this message because you are subscribed to the Google 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/5165bea7-26c1-4ec2-814b-c3eb7c246ad1%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Thanks & Regards

Rakesh Kumar Jha
Android Developer, Trainer and Mentor
Bangalore
Skype - rkjhaw
(O) +918050753516
(R) +919886336619

Rakesh Jha
9886336619

https://www.facebook.com/rakeshjhadhamdaha
https://twitter.com/rkjhaw
https://plus.google.com/u/0/b/114183395110899096234/114183395110899096234/

http://dhamdaha.blogspot.in/

-- 
You received this message because you are subscribed to the Google 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/CABL056Jvv%2B0m4Kxw3%3D1c8cFzMjTyx98RBcP2P8-e3L1KE1L4Yg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android Studio for multiple users

2016-02-17 Thread erharjen
I am trying to install android studio in a lab but I cant get it to run the 
first time with out the admin password.  I need a way to run the app no 
matter who logs in tot he machine.  I am running Mavericks 

-- 
You received this message because you are subscribed to the Google 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/51a411d5-d44b-4248-9332-ce8d1e6c3794%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Text to speech

2016-02-17 Thread 01010010011011110110
Im looking for a tutorial on using text to speech. I have found many tutorials 
on building a text box and a button that speaks, but nothing that does a basic 
"hello world".
Thank you on advance.

-- 
You received this message because you are subscribed to the Google 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/5165bea7-26c1-4ec2-814b-c3eb7c246ad1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Signing using RSA Keys from AndroidKeyStore on Marshmallow

2016-02-17 Thread 'Alex Klyubin' via Android Developers
Excellent!

"Caused by: android.security.KeyStoreException: Incompatible padding mode" 
is the issue here. The issue is that you're asking Android Keystore to sign 
using this RSA private key using SHA-512 digest and PKCS #1 v1.5 signature 
padding scheme, but you didn't authorize the key to be used with the PKCS 
#1 v1.5 signature padding scheme. Unfortunately, it's not obvious from 
Signature algorithm name "SHA512withRSA" that this padding scheme will be 
used... To fix, invoke 
setSignaturePaddings(KeyProperties.SIGNATURE_PADDING_RSA_PKCS1) on the 
KeyGenParameterSpec.Builder when generating the key.

Cheers,
Alex

On Wednesday, February 17, 2016 at 6:11:55 PM UTC-8, Jacob Taylor wrote:
>
> Hi Alex,
>
> How silly of me, I thought I already commented out the BouncyCastle JCA 
> provider. That's done now, and yes, this is running on Android 6 and I'm 
> using the single arg getInstance for Signature.
>
> Now I get another error, stack trace below:
>
> java.security.InvalidKeyException: Keystore operation failed
>   
>   at android.security.KeyStore.getInvalidKeyException(KeyStore
> .java:692)
>   
>   at android.security.KeyStore.getInvalidKeyException(KeyStore
> .java:712)
>   
>   at android.security.keystore.KeyStoreCryptoOperationUtils.
> getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
>   
>   at android.security.keystore.AndroidKeyStoreSignatureSpiBase
> .ensureKeystoreOperationInitialized(AndroidKeyStoreSignatureSpiBase.java:
> 219)
>   
>   at android.security.keystore.AndroidKeyStoreSignatureSpiBase
> .engineInitSign(AndroidKeyStoreSignatureSpiBase.java:99)
>   
>   at android.security.keystore.AndroidKeyStoreSignatureSpiBase
> .engineInitSign(AndroidKeyStoreSignatureSpiBase.java:77)
>   
>   at java.security.Signature$SignatureImpl.engineInitSign(
> Signature.java:706)
>   
>   at java.security.Signature.initSign(Signature.java:357)
>   
>   at au.com.taylornetworks.tapid.keystoreContentSigner.
> getSignature(keystoreContentSigner.java:69)
>   
>   at org.spongycastle.pkcs.PKCS10CertificationRequestBuilder.
> build(PKCS10CertificationRequestBuilder.java:149)
>   
>   at au.com.taylornetworks.tapid.pkiManager.generateCSR(
> pkiManager.java:78)
>   
>   at au.com.taylornetworks.tapid.MainActivity.createAndShowCSR
> (MainActivity.java:42)
>   
>   at java.lang.reflect.Method.invoke(Native Method)
>   
>   at android.support.v7.app.
> AppCompatViewInflater$DeclaredOnClickListener.onClick(
> AppCompatViewInflater.java:270)
>   
>   at android.view.View.performClick(View.java:5204)
>   
>   at android.view.View$PerformClick.run(View.java:21153)
>   
>   at android.os.Handler.handleCallback(Handler.java:739)
>   
>   at android.os.Handler.dispatchMessage(Handler.java:95)
>   
>   at android.os.Looper.loop(Looper.java:148)
>   
>   at android.app.ActivityThread.main(ActivityThread.java:5417)
>   
>   at java.lang.reflect.Method.invoke(Native Method)
>   
>   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.
> run(ZygoteInit.java:726)
>   
>   at com.android.internal.os.ZygoteInit

[android-developers] Re: Signing using RSA Keys from AndroidKeyStore on Marshmallow

2016-02-17 Thread Jacob Taylor
Hi Alex,

How silly of me, I thought I already commented out the BouncyCastle JCA 
provider. That's done now, and yes, this is running on Android 6 and I'm 
using the single arg getInstance for Signature.

Now I get another error, stack trace below:

java.security.InvalidKeyException: Keystore operation failed

at android.security.KeyStore.getInvalidKeyException(KeyStore.
java:692)

at android.security.KeyStore.getInvalidKeyException(KeyStore.
java:712)

at android.security.keystore.KeyStoreCryptoOperationUtils.
getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)

at android.security.keystore.AndroidKeyStoreSignatureSpiBase.
ensureKeystoreOperationInitialized(AndroidKeyStoreSignatureSpiBase.java:219)

at android.security.keystore.AndroidKeyStoreSignatureSpiBase.
engineInitSign(AndroidKeyStoreSignatureSpiBase.java:99)

at android.security.keystore.AndroidKeyStoreSignatureSpiBase.
engineInitSign(AndroidKeyStoreSignatureSpiBase.java:77)

at java.security.Signature$SignatureImpl.engineInitSign(
Signature.java:706)

at java.security.Signature.initSign(Signature.java:357)

at au.com.taylornetworks.tapid.keystoreContentSigner.
getSignature(keystoreContentSigner.java:69)

at org.spongycastle.pkcs.PKCS10CertificationRequestBuilder.build
(PKCS10CertificationRequestBuilder.java:149)

at au.com.taylornetworks.tapid.pkiManager.generateCSR(pkiManager
.java:78)

at au.com.taylornetworks.tapid.MainActivity.createAndShowCSR(
MainActivity.java:42)

at java.lang.reflect.Method.invoke(Native Method)

at android.support.v7.app.
AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.
java:270)

at android.view.View.performClick(View.java:5204)

at android.view.View$PerformClick.run(View.java:21153)

at android.os.Handler.handleCallback(Handler.java:739)

at android.os.Handler.dispatchMessage(Handler.java:95)

at android.os.Looper.loop(Looper.java:148)

at android.app.ActivityThread.main(ActivityThread.java:5417)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(
ZygoteInit.java:726)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

 Caused by: android.security.KeyStoreException: Incompatible 
padding mode

at android.security.KeyStore.getKeyStoreException(KeyStore.java:
632)

at android.security.KeyStore.getInvalidKeyException(KeyStore.
java:712) 

at android.security.keystore.KeyStoreCryptoOperationUtils.
getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54) 

at android.security.keysto

[android-developers] Re: Signing using RSA Keys from AndroidKeyStore on Marshmallow

2016-02-17 Thread 'Alex Klyubin' via Android Developers
P. S. Typo: bcProviderIndex = i; should be bcProviderIndex = i + 1; 
Security.insertProviderAt uses a 1-based indexing scheme...

Alex

On Wednesday, February 17, 2016 at 6:02:04 PM UTC-8, Alex Klyubin wrote:
>
> Oh, I didn't notice the PkiManager class in OP. It does install Bouncy 
> Castle as the highest-priority JCA Provider. Unfortunately, Bouncy Castle 
> JCA Provider has a bug (http://www.bouncycastle.org/jira/browse/BJA-543 
> )
>  
> where is advertises to JCA that it can handle any keys, even those that it 
> actually can't handle, such as Android Keystore keys which don't expose 
> private/secret key material. Here are some options to work around this 
> issue:
> 1. Don't install the Bouncy Castle JCA Provider if you don't need to. For 
> example, you don't need it for crypto operations involving Android Keystore 
> keys.
> 2. If you must install the Bouncy Castle JCA Provider, install it below 
> Android Keystore JCA provider. The best way to achieve that is to find the 
> index at which the platform-bundled Bouncy Castle provider is installed, 
> and then invoke Security.insertProviderAt with that same index and your 
> Bouncy Castle Provider. This will install your Bouncy Castle provider just 
> above the preinstalled Bouncy Castle provider which is itself installed at 
> the correct spot for Android Keystore stuff to work. For example:
>
>   Provider[] providers = Security.getProviders();
>   int bcProviderIndex = -1;
>   for (int i = 0; i < providers.length; i++) {
> Provider provider = providers[i];
> if ("BC".equals(provider.getName())) {
>   bcProviderIndex = i;
>   break;
> }
>   }
>   Security.insertProviderAt(new BouncyCastleProvider(), 
> bcProviderPosition);
>
> Alex
>
> On Wednesday, February 17, 2016 at 5:41:40 PM UTC-8, Alex Klyubin wrote:
>>
>> * Please provide the full stack trace (at least from Signature.initSign 
>> down into the framework).
>> * What version of Android is this (e.g., 6.0)?
>> * Are you installing any additional JCA providers (e.g., 
>> Security.insertProviderAt or Security.addProvider)?
>> * Please confirm that you're not specifying a provider when invoking 
>> Signature.getInstance. (i.e., that you're using the single-arg getInstance, 
>> not the one that takes an additional String or Provider argument).
>>
>> Cheers,
>> Alex
>>
>> On Wednesday, February 17, 2016 at 5:25:34 PM UTC-8, Jacob Taylor wrote:
>>>
>>> Hey Alex,
>>>
>>> When I input PrivateKey object from entry.getPrivateKey() to 
>>> s.initSign(), the following exception occurs:
>>>
>>> java.security.InvalidKeyException: Supplied key 
>>> (android.security.keystore.AndroidKeyStoreRSAPrivateKey) is not a 
>>> RSAPrivateKey instance.
>>>
>>> This is the new code:
>>> Signature s = Signature.getInstance(algorithmText);
>>> KeyStore.Entry entry = ks.getEntry(keyAlias, null);
>>> PrivateKey privateKey = ((KeyStore.PrivateKeyEntry) entry).getPrivateKey
>>> ();
>>>
>>> s.initSign(privateKey); // <--- excepts here
>>>
>>>
>>> For the time being, algorithmText is set to "SHA512withRSA".
>>>
>>> Cheers,
>>> Jake
>>>
>>>
>>>
>>> On Thursday, February 18, 2016 at 6:06:15 AM UTC+11, Alex Klyubin wrote:

 Short answer: Drop the cast to RSAPrivateKey. Use entry.getPrivateKey() 
 instead.

 Longer answer: RSAPrivateKey interface is for private keys which expose 
 their key material in a structured way (e.g., expose their private 
 exponent). Android Keystore keys by definition do not expose their key 
 material. Thus, Android Keystore private keys are not instances of 
 RSAPrivateKey. They are instance of PrivateKey and RSAKey (this one lets 
 you obtain the modulus). Signature.initSign happily takes a PrivateKey 
 instance. Thus, drop the cast to RSAPrivateKey and it'll work just fine.

 On Wednesday, February 17, 2016 at 6:43:04 AM UTC-8, Jacob Taylor wrote:
>
> Hey devs,
>
> I'm working on a proof of concept app for generating an RSA keypair in 
> an app, generating a X509 CSR based on the new keypair, then exporting it 
> to be signed by some CA.
> As a part o f the CSR generation process the whole CSR must be signed 
> by the key itself.
>
> I've been following along with the Keystore page on the documentation 
> site (
> http://developer.android.com/training/articles/keystore.html#SigningAndVerifyingData)
>  
> and reached a snag.
> The generation of the CSR is handled by spongycastle, which in turn 
> uses a custom build class (called keystoreContentSigner) to sign the 
> completed CSR with the keys stored in the keystore.
> According to the above referenced documentation, the call to 
> ks.getEntry(keyAlias, null) should return an object typecasted to the 
> Keystore.Entry class, which you then cast into a PrivateKeyEntry which 
> y

[android-developers] Re: Signing using RSA Keys from AndroidKeyStore on Marshmallow

2016-02-17 Thread 'Alex Klyubin' via Android Developers
Oh, I didn't notice the PkiManager class in OP. It does install Bouncy 
Castle as the highest-priority JCA Provider. Unfortunately, Bouncy Castle 
JCA Provider has a bug (http://www.bouncycastle.org/jira/browse/BJA-543 
)
 
where is advertises to JCA that it can handle any keys, even those that it 
actually can't handle, such as Android Keystore keys which don't expose 
private/secret key material. Here are some options to work around this 
issue:
1. Don't install the Bouncy Castle JCA Provider if you don't need to. For 
example, you don't need it for crypto operations involving Android Keystore 
keys.
2. If you must install the Bouncy Castle JCA Provider, install it below 
Android Keystore JCA provider. The best way to achieve that is to find the 
index at which the platform-bundled Bouncy Castle provider is installed, 
and then invoke Security.insertProviderAt with that same index and your 
Bouncy Castle Provider. This will install your Bouncy Castle provider just 
above the preinstalled Bouncy Castle provider which is itself installed at 
the correct spot for Android Keystore stuff to work. For example:

  Provider[] providers = Security.getProviders();
  int bcProviderIndex = -1;
  for (int i = 0; i < providers.length; i++) {
Provider provider = providers[i];
if ("BC".equals(provider.getName())) {
  bcProviderIndex = i;
  break;
}
  }
  Security.insertProviderAt(new BouncyCastleProvider(), bcProviderPosition);

Alex

On Wednesday, February 17, 2016 at 5:41:40 PM UTC-8, Alex Klyubin wrote:
>
> * Please provide the full stack trace (at least from Signature.initSign 
> down into the framework).
> * What version of Android is this (e.g., 6.0)?
> * Are you installing any additional JCA providers (e.g., 
> Security.insertProviderAt or Security.addProvider)?
> * Please confirm that you're not specifying a provider when invoking 
> Signature.getInstance. (i.e., that you're using the single-arg getInstance, 
> not the one that takes an additional String or Provider argument).
>
> Cheers,
> Alex
>
> On Wednesday, February 17, 2016 at 5:25:34 PM UTC-8, Jacob Taylor wrote:
>>
>> Hey Alex,
>>
>> When I input PrivateKey object from entry.getPrivateKey() to 
>> s.initSign(), the following exception occurs:
>>
>> java.security.InvalidKeyException: Supplied key 
>> (android.security.keystore.AndroidKeyStoreRSAPrivateKey) is not a 
>> RSAPrivateKey instance.
>>
>> This is the new code:
>> Signature s = Signature.getInstance(algorithmText);
>> KeyStore.Entry entry = ks.getEntry(keyAlias, null);
>> PrivateKey privateKey = ((KeyStore.PrivateKeyEntry) entry).getPrivateKey
>> ();
>>
>> s.initSign(privateKey); // <--- excepts here
>>
>>
>> For the time being, algorithmText is set to "SHA512withRSA".
>>
>> Cheers,
>> Jake
>>
>>
>>
>> On Thursday, February 18, 2016 at 6:06:15 AM UTC+11, Alex Klyubin wrote:
>>>
>>> Short answer: Drop the cast to RSAPrivateKey. Use entry.getPrivateKey() 
>>> instead.
>>>
>>> Longer answer: RSAPrivateKey interface is for private keys which expose 
>>> their key material in a structured way (e.g., expose their private 
>>> exponent). Android Keystore keys by definition do not expose their key 
>>> material. Thus, Android Keystore private keys are not instances of 
>>> RSAPrivateKey. They are instance of PrivateKey and RSAKey (this one lets 
>>> you obtain the modulus). Signature.initSign happily takes a PrivateKey 
>>> instance. Thus, drop the cast to RSAPrivateKey and it'll work just fine.
>>>
>>> On Wednesday, February 17, 2016 at 6:43:04 AM UTC-8, Jacob Taylor wrote:

 Hey devs,

 I'm working on a proof of concept app for generating an RSA keypair in 
 an app, generating a X509 CSR based on the new keypair, then exporting it 
 to be signed by some CA.
 As a part o f the CSR generation process the whole CSR must be signed 
 by the key itself.

 I've been following along with the Keystore page on the documentation 
 site (
 http://developer.android.com/training/articles/keystore.html#SigningAndVerifyingData)
  
 and reached a snag.
 The generation of the CSR is handled by spongycastle, which in turn 
 uses a custom build class (called keystoreContentSigner) to sign the 
 completed CSR with the keys stored in the keystore.
 According to the above referenced documentation, the call to 
 ks.getEntry(keyAlias, null) should return an object typecasted to the 
 Keystore.Entry class, which you then cast into a PrivateKeyEntry which you 
 then call against using its .getPrivateKey method.

 On my test phone (Nexus 6P) this flow doesn't work. It excepts during 
 the call to initSign, and reports the type of the object return from 
 ks.getEntry as android.security.keystore.AndroidKeyStoreRSAPrivateKey, 
 which isn't referenced anywhere I can find.

 This typ

[android-developers] Re: Signing using RSA Keys from AndroidKeyStore on Marshmallow

2016-02-17 Thread 'Alex Klyubin' via Android Developers
* Please provide the full stack trace (at least from Signature.initSign 
down into the framework).
* What version of Android is this (e.g., 6.0)?
* Are you installing any additional JCA providers (e.g., 
Security.insertProviderAt or Security.addProvider)?
* Please confirm that you're not specifying a provider when invoking 
Signature.getInstance. (i.e., that you're using the single-arg getInstance, 
not the one that takes an additional String or Provider argument).

Cheers,
Alex

On Wednesday, February 17, 2016 at 5:25:34 PM UTC-8, Jacob Taylor wrote:
>
> Hey Alex,
>
> When I input PrivateKey object from entry.getPrivateKey() to s.initSign(), 
> the following exception occurs:
>
> java.security.InvalidKeyException: Supplied key 
> (android.security.keystore.AndroidKeyStoreRSAPrivateKey) is not a 
> RSAPrivateKey instance.
>
> This is the new code:
> Signature s = Signature.getInstance(algorithmText);
> KeyStore.Entry entry = ks.getEntry(keyAlias, null);
> PrivateKey privateKey = ((KeyStore.PrivateKeyEntry) entry).getPrivateKey
> ();
>
> s.initSign(privateKey); // <--- excepts here
>
>
> For the time being, algorithmText is set to "SHA512withRSA".
>
> Cheers,
> Jake
>
>
>
> On Thursday, February 18, 2016 at 6:06:15 AM UTC+11, Alex Klyubin wrote:
>>
>> Short answer: Drop the cast to RSAPrivateKey. Use entry.getPrivateKey() 
>> instead.
>>
>> Longer answer: RSAPrivateKey interface is for private keys which expose 
>> their key material in a structured way (e.g., expose their private 
>> exponent). Android Keystore keys by definition do not expose their key 
>> material. Thus, Android Keystore private keys are not instances of 
>> RSAPrivateKey. They are instance of PrivateKey and RSAKey (this one lets 
>> you obtain the modulus). Signature.initSign happily takes a PrivateKey 
>> instance. Thus, drop the cast to RSAPrivateKey and it'll work just fine.
>>
>> On Wednesday, February 17, 2016 at 6:43:04 AM UTC-8, Jacob Taylor wrote:
>>>
>>> Hey devs,
>>>
>>> I'm working on a proof of concept app for generating an RSA keypair in 
>>> an app, generating a X509 CSR based on the new keypair, then exporting it 
>>> to be signed by some CA.
>>> As a part o f the CSR generation process the whole CSR must be signed by 
>>> the key itself.
>>>
>>> I've been following along with the Keystore page on the documentation 
>>> site (
>>> http://developer.android.com/training/articles/keystore.html#SigningAndVerifyingData)
>>>  
>>> and reached a snag.
>>> The generation of the CSR is handled by spongycastle, which in turn uses 
>>> a custom build class (called keystoreContentSigner) to sign the completed 
>>> CSR with the keys stored in the keystore.
>>> According to the above referenced documentation, the call to 
>>> ks.getEntry(keyAlias, null) should return an object typecasted to the 
>>> Keystore.Entry class, which you then cast into a PrivateKeyEntry which you 
>>> then call against using its .getPrivateKey method.
>>>
>>> On my test phone (Nexus 6P) this flow doesn't work. It excepts during 
>>> the call to initSign, and reports the type of the object return from 
>>> ks.getEntry as android.security.keystore.AndroidKeyStoreRSAPrivateKey, 
>>> which isn't referenced anywhere I can find.
>>>
>>> This type can't be casted to anything usable in the current format, is 
>>> there some new way to perform cryptographic operations in Marshmallow, or 
>>> is there something I'm missing?
>>>
>>> KeystoreContentSigner class:
>>>
>>> package au.com.taylornetworks.tapid;
>>>
>>>
>>> import org.spongycastle.asn1.x509.AlgorithmIdentifier;
>>> import org.spongycastle.operator.ContentSigner;
>>> import org.spongycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
>>>
>>> import java.io.ByteArrayOutputStream;
>>> import java.io.OutputStream;
>>> import java.security.KeyStore;
>>> import java.security.Signature;
>>> import java.security.interfaces.RSAPrivateKey;
>>>
>>>
>>> public class keystoreContentSigner implements ContentSigner{
>>>
>>> private AlgorithmIdentifier algorithmIdentifier;
>>> private String algorithmText;
>>> private ByteArrayOutputStream dataStream;
>>> private String keyAlias;
>>>
>>> public keystoreContentSigner(String keyAlias)
>>> {
>>> algorithmText = "SHA512withRSA";
>>> algorithmIdentifier = new 
>>> DefaultSignatureAlgorithmIdentifierFinder().find(algorithmText);
>>> dataStream = new ByteArrayOutputStream();
>>> this.keyAlias = keyAlias;
>>> }
>>>
>>> public void setAlgorithm(String algorithmText)
>>> {
>>> this.algorithmText = algorithmText;
>>> algorithmIdentifier = new 
>>> DefaultSignatureAlgorithmIdentifierFinder().find(algorithmText);
>>> }
>>>
>>> @Override
>>> public OutputStream getOutputStream()
>>> {
>>> return dataStream;
>>> }
>>>
>>> @Override
>>> public AlgorithmIdentifier getAlgorithmIdentifier()
>>> {
>>> return algorithmIdentifier;
>>> }
>>>
>>> public 

[android-developers] Re: Signing using RSA Keys from AndroidKeyStore on Marshmallow

2016-02-17 Thread Jacob Taylor
Hey Alex,

When I input PrivateKey object from entry.getPrivateKey() to s.initSign(), 
the following exception occurs:

java.security.InvalidKeyException: Supplied key 
(android.security.keystore.AndroidKeyStoreRSAPrivateKey) is not a 
RSAPrivateKey instance.

This is the new code:
Signature s = Signature.getInstance(algorithmText);
KeyStore.Entry entry = ks.getEntry(keyAlias, null);
PrivateKey privateKey = ((KeyStore.PrivateKeyEntry) entry).getPrivateKey();

s.initSign(privateKey); // <--- excepts here


For the time being, algorithmText is set to "SHA512withRSA".

Cheers,
Jake



On Thursday, February 18, 2016 at 6:06:15 AM UTC+11, Alex Klyubin wrote:
>
> Short answer: Drop the cast to RSAPrivateKey. Use entry.getPrivateKey() 
> instead.
>
> Longer answer: RSAPrivateKey interface is for private keys which expose 
> their key material in a structured way (e.g., expose their private 
> exponent). Android Keystore keys by definition do not expose their key 
> material. Thus, Android Keystore private keys are not instances of 
> RSAPrivateKey. They are instance of PrivateKey and RSAKey (this one lets 
> you obtain the modulus). Signature.initSign happily takes a PrivateKey 
> instance. Thus, drop the cast to RSAPrivateKey and it'll work just fine.
>
> On Wednesday, February 17, 2016 at 6:43:04 AM UTC-8, Jacob Taylor wrote:
>>
>> Hey devs,
>>
>> I'm working on a proof of concept app for generating an RSA keypair in an 
>> app, generating a X509 CSR based on the new keypair, then exporting it to 
>> be signed by some CA.
>> As a part o f the CSR generation process the whole CSR must be signed by 
>> the key itself.
>>
>> I've been following along with the Keystore page on the documentation 
>> site (
>> http://developer.android.com/training/articles/keystore.html#SigningAndVerifyingData)
>>  
>> and reached a snag.
>> The generation of the CSR is handled by spongycastle, which in turn uses 
>> a custom build class (called keystoreContentSigner) to sign the completed 
>> CSR with the keys stored in the keystore.
>> According to the above referenced documentation, the call to 
>> ks.getEntry(keyAlias, null) should return an object typecasted to the 
>> Keystore.Entry class, which you then cast into a PrivateKeyEntry which you 
>> then call against using its .getPrivateKey method.
>>
>> On my test phone (Nexus 6P) this flow doesn't work. It excepts during the 
>> call to initSign, and reports the type of the object return from 
>> ks.getEntry as android.security.keystore.AndroidKeyStoreRSAPrivateKey, 
>> which isn't referenced anywhere I can find.
>>
>> This type can't be casted to anything usable in the current format, is 
>> there some new way to perform cryptographic operations in Marshmallow, or 
>> is there something I'm missing?
>>
>> KeystoreContentSigner class:
>>
>> package au.com.taylornetworks.tapid;
>>
>>
>> import org.spongycastle.asn1.x509.AlgorithmIdentifier;
>> import org.spongycastle.operator.ContentSigner;
>> import org.spongycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
>>
>> import java.io.ByteArrayOutputStream;
>> import java.io.OutputStream;
>> import java.security.KeyStore;
>> import java.security.Signature;
>> import java.security.interfaces.RSAPrivateKey;
>>
>>
>> public class keystoreContentSigner implements ContentSigner{
>>
>> private AlgorithmIdentifier algorithmIdentifier;
>> private String algorithmText;
>> private ByteArrayOutputStream dataStream;
>> private String keyAlias;
>>
>> public keystoreContentSigner(String keyAlias)
>> {
>> algorithmText = "SHA512withRSA";
>> algorithmIdentifier = new 
>> DefaultSignatureAlgorithmIdentifierFinder().find(algorithmText);
>> dataStream = new ByteArrayOutputStream();
>> this.keyAlias = keyAlias;
>> }
>>
>> public void setAlgorithm(String algorithmText)
>> {
>> this.algorithmText = algorithmText;
>> algorithmIdentifier = new 
>> DefaultSignatureAlgorithmIdentifierFinder().find(algorithmText);
>> }
>>
>> @Override
>> public OutputStream getOutputStream()
>> {
>> return dataStream;
>> }
>>
>> @Override
>> public AlgorithmIdentifier getAlgorithmIdentifier()
>> {
>> return algorithmIdentifier;
>> }
>>
>> public byte[] getSignature()
>> {
>> byte[] data;
>> byte[] signature = null;
>> KeyStore ks;
>>
>> try {
>> ks = KeyStore.getInstance("AndroidKeyStore");
>> ks.load(null);
>>
>> data = dataStream.toByteArray();
>> dataStream.flush();
>>
>> Signature s = Signature.getInstance(algorithmText);
>> KeyStore.Entry entry = ks.getEntry(keyAlias, null);
>>
>> s.initSign((RSAPrivateKey) entry);
>> s.update(data);
>> signature = s.sign();
>> } catch (Exception e) {
>> e.printStackTrace();
>> }
>>
>> return signature;
>> }
>>
>

[android-developers] Starting activity from spinner help

2016-02-17 Thread Chase McPherson
i cannot figure out what is wrong with my code, please help me. I created a 
spinner to act as a drop down menu, in my emulator, the menu drops as it 
should, but when i click on the desired activity nothing happens. 

package geministudios.sunsetvideo;Enter code here...


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;

public class MainMenu extends AppCompatActivity implements 
AdapterView.OnItemSelectedListener{

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_menu);


//Drop Menu
Spinner DropMenu = (Spinner) findViewById(R.id.DropMenuId);
ArrayAdapter adapter = 
ArrayAdapter.createFromResource(this, R.array.Drop_Menu,
android.R.layout.simple_spinner_item);


adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
DropMenu.setAdapter(adapter);}




public void onItemSelected(AdapterView parent, View view, int pos, 
long id) {
if (parent.getItemAtPosition(pos).toString().equals("New 
Releases")) {
Intent intent = new Intent(MainMenu.this, New_Releases.class);
startActivity(intent);
}
}

@Override
public void onNothingSelected (AdapterView < ? > parent){

}


}

-- 
You received this message because you are subscribed to the Google 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/12345a9a-459f-413a-8e09-9d565383b33d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Cant create handler inside thread that has not called looper.prepare() exception being thrown

2016-02-17 Thread TreKing
On Wed, Feb 10, 2016 at 7:08 AM, Akash Paul  wrote:

> here is the area in which the exception is being thrown :
>
> private class Connection extends AsyncTask{
> @Override
> protected Object doInBackground(Object[] objects){
> try{
> PostData(R.id.fullscreen_content, 3);
>}
> catch(IOException exception){
> exception.printStackTrace();
> }
> return null;
> }
> }
>
>
No, it's not. You're catching that exception. Your title is this: *Cant
create handler inside thread that has not called looper.prepare() exception
being thrown*

Where is *that* exception being thrown?
Do you understand how to use a debugger?

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


Re: [android-developers] Android app indexing and deep links: did I get it wrong all the time?

2016-02-17 Thread TreKing
On Fri, Feb 12, 2016 at 4:39 AM, MarKco 
wrote:

> Hello everyone.


Sup, bra.


> Also, I wrote a content provider in order to parse the URI


You don't need a content provider for this and it's likely just to add
confusion and complexity.


> But I wonder: what should I do? Get data from the intent with a
>
> getIntent().getData().getQuery()
> or use the ContentProvider and get them from the URI?


Get the data from the intent.


> Now, in the "testing your app" section of the documentation I saw that the
> links like http://hotelsclick.com?hotel_id=135738
>  are referred as "deep links"
> while those like android-app://com.towers.hotelsclick/https/
> hotelsclick.com?hotel_id=135738 
> are referred as "URI". Am I right?


No. Both of those are actually both URIs and deep links.
URIs: specially formatted strings that uniquely describe some resource.
Deep links: a special case of URI that your app can handle to navigate to a
specific location within your app.

The thing prefixed with "android-app" is specifically an "App URI" and is
used for App Indexing. It's what you use to register a piece of content
that was viewed from within your app with Google.


> The "View as google" funcionality asks for a URI but I don't know how to
> create one.


I'm assuming you mean "Fetch as Google" in the Search Console. Follow the
docs: https://support.google.com/webmasters/answer/6178089
You'd just paste "http://hotelsclick.com?hotel_id=135738
" into the box and hit "Fetch" to
verify Google can crawl your app. If you've set everything up correctly, it
should be able to crawl your app successfully.

Also, I wonder how this URI is passed to the app and I'm pretty sure I'm
> getting very confused about this all URI/deepLink thing, and can't find
> relief in the documentation.


Once you've registered in your manifest that a given activity handles a
given URI, the system will route links matching that pattern to your app.
Once you've set up App Indexing using the App URI, searches from the Google
App on an Android device will directly open your app to view the relevant
content.

Where and when should I use the URI?


Your App URI is used in registering content for App Indexing. See:
http://developer.android.com/tools/help/app-link-indexing.html


> Where and when should I use the deepLink?


A deep link is not something you use, per se. It's something you handle
when it's given to you by the system.


> I guess that since I'm going to put the link rel=URI in my webpages then
> the app will be called in the app indexing with the URI and not with the
> URL of the page.


Although the docs mention adding these alternate links, I didn't find them
necessary.


> But if it's so... why is the adb shell am start -a
> android.intent.action.VIEW -d command used for testing with the URL and not
> the URI?


Because the system launches your app with standard format URLs. The App URI
is a special thing used by App Indexing which you will never receive.


> Should my app be able to get and handle URIs or URLs? And how?


Your app only cares about URLs using the standard intent filtering
mechanism that's been in Android since the beginning of time.

I thought I had understood something about app indexing, but today I'm
> starting to think I got it all wrong since I started. That's why I ask you
> for help in answering the questions above, and possibly sheding a light on
> all this URL/URI/intent-filter/ContentProvider mess.


There's definitely a lot of pieces here and Google's tradition of using
shitty names for things certainly doesn't help.

Make sure you've run through these main pages of documentation:

https://developers.google.com/app-indexing/introduction#android
http://developer.android.com/training/app-indexing/index.html
http://developer.android.com/tools/help/app-link-indexing.html


> Thank you everybody


Sure thing. Stay frosty.

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


Re: [android-developers] Android Developers | Visual Srudio

2016-02-17 Thread Sunnatillo Salimov
Thank you!

On Thursday, February 18, 2016 at 2:10:02 AM UTC+7, TreKing wrote:
>
>
> On Tue, Feb 16, 2016 at 5:13 PM, Sunnatillo Salimov <
> sunnatill...@gmail.com > wrote:
>
>> What do I have to do.
>
>
> Try asking a question that makes some kind of sense.
> http://www.catb.org/esr/faqs/smart-questions.html
>
>
> -
> 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 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/cf4e1e33-d758-4185-a1e9-cde7a81780b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


android-developers@googlegroups.com

2016-02-17 Thread Caesar Samsi
My goodness how many spams this list has received already.

This is getting through spam filters are it the android list is addressed as 
bcc.

Would it be possible for the list to filter our emails where android is 
addressed as bcc please?

I’ve actually responded to one of these emails and the sender was a 
non-existent email address.

Thank you!

> On Feb 17, 2016, at 2:21 PM, Vikram Murari  wrote:
> 
> Hello,
> 
> Hope you are doing great,
> 
>  
> I have below urgent requirement with my Global consulting partner. Please 
> have a look at the below mentioned detailed Job description and let me know 
> your interest at your earliest.
> 
>  
> 
> Position: Oracle DBA Consultant
> 
> Location: Hammonton/Folsom, NJ (Philadelphia / Mount Laurel / Cherry Hill NJ 
> area.)
> 
> Long Term
> 
>  
> Client prefers local candidates. ( Philadelphia, Trenton and Southern NJ 
> areas)
> 
> Communication skills must be a 10 and ability to interact with business users 
> and upper managers is very important with this position.
> 
> The Oracle DBA / (Production) will participate in the planning, design, 
> development and support of a dynamic database infrastructure including 
> performance tuning and load testing, security administration, backup/restore, 
> real-time monitoring and troubleshooting, and ongoing grooming and 
> maintenance.
> 
>  
> Responsibilities include:
> 
> • Providing design assistance, analyzing and managing application and 
> database solutions with technical emphasis in performance monitoring, problem 
> identification and resolution;
> 
> • Assisting with tuning and monitoring of the operational efficiency 
> and technical integrity of applications in support of internal and external 
> customers databases and installations;
> 
> • Assisting with installations, patches and upgrades to CLIENT 
> applications;
> 
> • Performing data analysis, testing and software configuration of 
> customer environments as necessary;
> 
> • Analyzing trends and reporting potential problems or areas of 
> improvement concerning internal and customer databases;
> 
> • Assisting with the creation and maintenance of departmental 
> documentation and standards
> 
> • Monitoring and responding to database performance issues
> 
> • Writing queries and stored procedures to support application 
> requirements, ad-hoc requests and data updates
> 
> • Providing Incident and Problem Management support for database 
> related tickets
> 
>  
> Qualifications
> 
> • Bachelor’s degree in Computer Science, Information Technology, or 
> related area (equivalent work experience will be considered)
> 
> • 7 years of experience as an Oracle database 
> administrator/developer, preferably in a dynamic real-time production 
> environment
> 
> • Experience with Oracle 11g required.  Experience with Oracle 12c a 
> plus
> 
> • Day to day work experience in backup and recovery concepts
> 
> • Day to day work experience Oracle cloning environments
> 
> • Day to day work experience in performing SQL and database tuning
> 
> • Strong understanding of DBA best practices/strategies in areas of 
> security, backup/recovery, integrity checks, configuration patching, capacity 
> planning and monitoring
> 
> • Extensive experience of index managements - how indexes are stored, 
> created and managed effectively
> 
> • Strong interpersonal and communication skills
> 
> • Strong problem solving and decision making skills
> 
> • Strong focus on creating high quality deliverables
> 
> • Accuracy and strict adherence to deadlines
> 
> • Focus on continual process improvement
> 
> • Able to bring multiple, concurrent projects to successful completion
> 
> • Easily adapts to changing priorities
> 
> 
> 
> Thanks & Regards
> 
> Vikram Murari 
> 
> Office: (925) 973- x 207 | Fax: (408) 273-6002
> 
> Email: vik...@allianceit.com  |URL: 
> www.allianceit.com 
> 
> -- 
> You received this message because you are subscribed to the Google 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/CAK3-99fPW%3D%3DZ5yA-bGwhGjDfTvLxsKDADX2z_4%2B4DrwwFzr2pg%40mail.gmail.com
>  
> 

android-developers@googlegroups.com

2016-02-17 Thread Vikram Murari
Hello,

Hope you are doing great,



I have below urgent requirement with my Global consulting partner. Please
have a look at the below mentioned detailed Job description and let me know
your interest at your earliest.



*Position: Oracle DBA Consultant*

*Location: Hammonton/Folsom, NJ (Philadelphia / Mount Laurel / Cherry Hill
NJ area.)*

*Long Term*



Client prefers local candidates. ( Philadelphia, Trenton and Southern NJ
areas)

Communication skills must be a 10 and ability to interact with business
users and upper managers is very important with this position.

The Oracle DBA / (Production) will participate in the planning, design,
development and support of a dynamic database infrastructure including
performance tuning and load testing, security administration,
backup/restore, real-time monitoring and troubleshooting, and ongoing
grooming and maintenance.



Responsibilities include:

• Providing design assistance, analyzing and managing application
and database solutions with technical emphasis in performance monitoring,
problem identification and resolution;

• Assisting with tuning and monitoring of the operational
efficiency and technical integrity of applications in support of internal
and external customers databases and installations;

• Assisting with installations, patches and upgrades to CLIENT
applications;

• Performing data analysis, testing and software configuration of
customer environments as necessary;

• Analyzing trends and reporting potential problems or areas of
improvement concerning internal and customer databases;

• Assisting with the creation and maintenance of departmental
documentation and standards

• Monitoring and responding to database performance issues

• Writing queries and stored procedures to support application
requirements, ad-hoc requests and data updates

• Providing Incident and Problem Management support for database
related tickets



Qualifications

• Bachelor’s degree in Computer Science, Information Technology, or
related area (equivalent work experience will be considered)

• 7 years of experience as an Oracle database
administrator/developer, preferably in a dynamic real-time production
environment

• Experience with Oracle 11g required.  Experience with Oracle 12c
a plus

• Day to day work experience in backup and recovery concepts

• Day to day work experience Oracle cloning environments

• Day to day work experience in performing SQL and database tuning

• Strong understanding of DBA best practices/strategies in areas of
security, backup/recovery, integrity checks, configuration patching,
capacity planning and monitoring

• Extensive experience of index managements - how indexes are
stored, created and managed effectively

• Strong interpersonal and communication skills

• Strong problem solving and decision making skills

• Strong focus on creating high quality deliverables

• Accuracy and strict adherence to deadlines

• Focus on continual process improvement

• Able to bring multiple, concurrent projects to successful
completion

• Easily adapts to changing priorities


Thanks & Regards

*Vikram Murari*

Office: (925) 973- x 207 | Fax: (408) 273-6002

Email: vik...@allianceit.com |URL: www.allianceit.com

-- 
You received this message because you are subscribed to the Google 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/CAK3-99fPW%3D%3DZ5yA-bGwhGjDfTvLxsKDADX2z_4%2B4DrwwFzr2pg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Rearrange listview item on visit

2016-02-17 Thread TreKing
On Fri, Feb 12, 2016 at 1:37 AM, Ashish John  wrote:

> How to shift list view item to downwards once viewed.
> For eg. my ListView have data 1,2,3,4,5,6,7,8,9,10. & at a time 2 item are
> visible.
> User visits 1,2,3 & 4
> Now, I want to update the list item as 5,6,7,8,9,10,1,2,3,4 so that user
> may get the rest of the data first.
>

Simply rearrange the items in the adapter backing the listview per your
business logic requirements, then call notifyDataSetChanged() on the
adapter.

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


Re: [android-developers] Navigation drawer fragment not changing

2016-02-17 Thread TreKing
On Thu, Feb 11, 2016 at 2:40 PM, Riva  wrote:

> I'm trying to get the navigation drawer down,  i've followed a few
> tutorials around the internet however they all end up not working.  Now I
> know it's something simple but I can't figure it out.  Menu opens, main
> fragment loads, but if I click a new fragment, nothing works.  ideas?


You've posted way too much information to sift through, no one has time to
read all of that and debug your problem for you.
Trim down your post to absolute bare minimum required to illustrate your
problem with a clear explanation of what you're doing, what you expect, and
what is actually happening that you need help with.

Have you debugged your code and verified all of the code you expect to be
executing actually is running?

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


Re: [android-developers] Permissions Messages in VR (Google Cardboard Apps)

2016-02-17 Thread TreKing
On Wed, Feb 17, 2016 at 8:38 AM, Dan M  wrote:

> *We are currently aware of the requirement to display a message asking the
> user for permission to access the SDCARD, every time the app boots up.*
>

You should not be asking for a permission every time the app boots up. You
should be asking for a permission at the time it is required, or up front
if it's critical to your app functionality, *if you don't have the
permission granted already*.


> * However, we are currently unsure how best to handle this in regards to
> Google Cardboard VR apps. We can’t ask the user for permission from within
> the app, as the user would be in VR and presently the dialogue box that
> pops up does so in 2D over the top of the VR layer. *
>
>
>
> *Any advice you can offer us in how to handle such messages would be
> greatly appreciated.*
>

Can you have a launch screen that is not in VR and checks for the
permission and requests it then if not granted?

-
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 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/CANCScgjMWZv0fSi%2BF_MwbS%2BcNP%3DOccGeS7RpZ0Y_b-V%3DqTKE%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Using MediaPlayer for MP3 requires a license?

2016-02-17 Thread TreKing
On Wed, Feb 17, 2016 at 7:40 AM, porky pooky  wrote:

> If I develop a mp3 player app using MediaPlayer class and sell it, then do
> I have to pay for the decoder?


You should not have to pay for using any part of the Android SDK, no.

-
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 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/CANCScgicD-XPnMnqtBcbnk-CgOBeJc-n1TaFZNS5PbpMB3ZmQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Application getting wrong location until open inbuilt Google Map application

2016-02-17 Thread TreKing
On Wed, Feb 17, 2016 at 6:50 AM, Chirag Raval 
wrote:

> I am facing very strange issue, in some of devices i am not getting
> accurate current location until i open inbuilt Google Map, once i open
> Google Map and back to my application at that time application return exact
> location.
>
> Can anyone tell me what is the wrong?
>
With the amount of information you posted, the only conclusion is "you have
a bug in your app".

If you'd like to post more code that shows how you're going about your
task, perhaps you can get a more detailed reply.

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


Re: [android-developers] Separate context menus in child view of list view

2016-02-17 Thread TreKing
On Wed, Feb 17, 2016 at 4:35 AM,  wrote:

> Handling regular button clicks is no issue, however I'd also like to have
> a long press for both buttons where a context menu is shown.
>

Android is moving away form long-press for context menus. Using it for
buttons within a list item sounds doubly bad.
https://www.google.com/design/spec/patterns/gestures.html#gestures-touch-mechanics

The same menu should be shown, however choosing an entry should be
> certainly specific to the chosen button.
>
> Using registerForContextMenu() in the activity is no problem. I can also
> easily get the entry position. However I do not seem to be able to find out
> which button brought it up.
>

You'd probably need to create a custom ContextMenuInfo object that you pass
along when the long click happens indicating the view id that was long
clicked.
http://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html


But really, you should come up with a better design for whatever it is
you're doing. Good luck.

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


Re: [android-developers] Whether / how to upgrade Android Studio from 1.3.1 to 1.5.1

2016-02-17 Thread TreKing
On Thu, Jan 7, 2016 at 7:25 AM,  wrote:

> (a) Do I want to upgrade to 1.5.1?
>

Generally, yes, you want to update to the latest stable release.

(b) If so, how do I do it?
>

Make sure you're pointing to the stable channel for downloads. If you are
configured to get the alpha or beta releases, that's what you'll get. Check
the setting under Preferences > System Settings > Updates.

-
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 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/CANCScggmp0Qt%3DiotY8LE18o12%3Db-nYEbW6A6a7GdM%3Dzubr08VA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Signing using RSA Keys from AndroidKeyStore on Marshmallow

2016-02-17 Thread 'Alex Klyubin' via Android Developers
Short answer: Drop the cast to RSAPrivateKey. Use entry.getPrivateKey() 
instead.

Longer answer: RSAPrivateKey interface is for private keys which expose 
their key material in a structured way (e.g., expose their private 
exponent). Android Keystore keys by definition do not expose their key 
material. Thus, Android Keystore private keys are not instances of 
RSAPrivateKey. They are instance of PrivateKey and RSAKey (this one lets 
you obtain the modulus). Signature.initSign happily takes a PrivateKey 
instance. Thus, drop the cast to RSAPrivateKey and it'll work just fine.

On Wednesday, February 17, 2016 at 6:43:04 AM UTC-8, Jacob Taylor wrote:
>
> Hey devs,
>
> I'm working on a proof of concept app for generating an RSA keypair in an 
> app, generating a X509 CSR based on the new keypair, then exporting it to 
> be signed by some CA.
> As a part o f the CSR generation process the whole CSR must be signed by 
> the key itself.
>
> I've been following along with the Keystore page on the documentation site 
> (
> http://developer.android.com/training/articles/keystore.html#SigningAndVerifyingData)
>  
> and reached a snag.
> The generation of the CSR is handled by spongycastle, which in turn uses a 
> custom build class (called keystoreContentSigner) to sign the completed CSR 
> with the keys stored in the keystore.
> According to the above referenced documentation, the call to 
> ks.getEntry(keyAlias, null) should return an object typecasted to the 
> Keystore.Entry class, which you then cast into a PrivateKeyEntry which you 
> then call against using its .getPrivateKey method.
>
> On my test phone (Nexus 6P) this flow doesn't work. It excepts during the 
> call to initSign, and reports the type of the object return from 
> ks.getEntry as android.security.keystore.AndroidKeyStoreRSAPrivateKey, 
> which isn't referenced anywhere I can find.
>
> This type can't be casted to anything usable in the current format, is 
> there some new way to perform cryptographic operations in Marshmallow, or 
> is there something I'm missing?
>
> KeystoreContentSigner class:
>
> package au.com.taylornetworks.tapid;
>
>
> import org.spongycastle.asn1.x509.AlgorithmIdentifier;
> import org.spongycastle.operator.ContentSigner;
> import org.spongycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
>
> import java.io.ByteArrayOutputStream;
> import java.io.OutputStream;
> import java.security.KeyStore;
> import java.security.Signature;
> import java.security.interfaces.RSAPrivateKey;
>
>
> public class keystoreContentSigner implements ContentSigner{
>
> private AlgorithmIdentifier algorithmIdentifier;
> private String algorithmText;
> private ByteArrayOutputStream dataStream;
> private String keyAlias;
>
> public keystoreContentSigner(String keyAlias)
> {
> algorithmText = "SHA512withRSA";
> algorithmIdentifier = new 
> DefaultSignatureAlgorithmIdentifierFinder().find(algorithmText);
> dataStream = new ByteArrayOutputStream();
> this.keyAlias = keyAlias;
> }
>
> public void setAlgorithm(String algorithmText)
> {
> this.algorithmText = algorithmText;
> algorithmIdentifier = new 
> DefaultSignatureAlgorithmIdentifierFinder().find(algorithmText);
> }
>
> @Override
> public OutputStream getOutputStream()
> {
> return dataStream;
> }
>
> @Override
> public AlgorithmIdentifier getAlgorithmIdentifier()
> {
> return algorithmIdentifier;
> }
>
> public byte[] getSignature()
> {
> byte[] data;
> byte[] signature = null;
> KeyStore ks;
>
> try {
> ks = KeyStore.getInstance("AndroidKeyStore");
> ks.load(null);
>
> data = dataStream.toByteArray();
> dataStream.flush();
>
> Signature s = Signature.getInstance(algorithmText);
> KeyStore.Entry entry = ks.getEntry(keyAlias, null);
>
> s.initSign((RSAPrivateKey) entry);
> s.update(data);
> signature = s.sign();
> } catch (Exception e) {
> e.printStackTrace();
> }
>
> return signature;
> }
>
> }
>
>  
> PkiManager class:
> Enter 
>
> package au.com.taylornetworks.tapid;
>
> import android.security.keystore.*;
>
> import java.io.IOException;
> import java.security.*;
> import java.security.cert.CertificateException;
> import org.spongycastle.asn1.misc.MiscObjectIdentifiers;
> import org.spongycastle.asn1.misc.NetscapeCertType;
> import org.spongycastle.asn1.x500.X500Name;
> import org.spongycastle.asn1.x509.BasicConstraints;
> import org.spongycastle.asn1.x509.ExtendedKeyUsage;
> import org.spongycastle.asn1.x509.Extension;
> import org.spongycastle.asn1.x509.ExtensionsGenerator;
>
> ...

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 

Re: [android-developers] Android Developers | Visual Srudio

2016-02-17 Thread TreKing
On Tue, Feb 16, 2016 at 5:13 PM, Sunnatillo Salimov <
sunnatillo.sali...@gmail.com> wrote:

> What do I have to do.


Try asking a question that makes some kind of sense.
http://www.catb.org/esr/faqs/smart-questions.html

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


Re: [android-developers] How to add list view items to an array list? or a work around to achieve the below?

2016-02-17 Thread TreKing
On Sun, Feb 14, 2016 at 2:24 AM, A KA  wrote:

> *In the above code, on selecting an item from listview I am trying to save
> it in an Arraylist i.e list_items which could be used in *onActionItemClicked
> method for further action on that respective item.
>
>
>
> *Any ideas on how to solve or find a workaround to use a listview in the
> above situation? *
>
If you're trying to track the items that have been checked to perform a
bulk action, use:
http://developer.android.com/reference/android/widget/AbsListView.html#getCheckedItemPositions()

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


[android-developers] Immediate Need||UX Architect/ Project Manager(12+ Months,DC)

2016-02-17 Thread pragyan dixit
Hi,
Hope you are doing great.
I have a urgent direct client requirement , Please send me your updated
profile.

Below is the Complete Requirement





*Role:  * *UX Architect/ Project Manager*

*Location: Washington ,DC*

*Duration: 12+Months *



*Job Description:*

*10 year experience required.*

Experience with standard prototyping & Design tools (ex: Axure, Photoshop,
Omnigraffle, Invision, FramerJS, etc.).

Creating process flows, site maps, wireframes, screen prototypes, and
functional specifications

Ability to elicit feedback and understand complex requirements

Knowledge of business requirement gathering, site assessment, competitive
analysis, and secondary research

Interaction design, process development and improvement





*Thanks and Regards…*

Pragyan Dixit

Technical Recruiter

[image: cid:image001.jpg@01D14DEF.5BAD6DB0]408-722-9446 ext. 5099 [image:
cid:image002.jpg@01D14DEF.5BAD6DB0]pragya...@e-solutionsinc.com

ADDRESS:- e-Solutions Inc| 2 N. Market St., Suite # 400, San Jose, CA
-95113,

WEBSITE:- www.e-solutionsinc.com

-- 
You received this message because you are subscribed to the Google 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/CAC39az5vXWhaguvTHipsh9aSR6tthnHgbt8kG48Hv4VUyn8NMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] ADB not responding, if you would like try manually kill adb.exe and click Restart.

2016-02-17 Thread Shah faizal
i tried killing adb.exe in task manager its getting restart by itself.
i tried to kill through command promt but got error.
Even its killed its not starting from command promt daemon issue.
i tried even uninstalling studio and reinstalling then downloading fresh 
Android studio and install.
Still i am getting same issue.

And i even tried Tools- Android integration enable/disable.

-- 
You received this message because you are subscribed to the Google 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/1c005baf-ffc0-479d-85d3-fd959b5b4e7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Urgent Need Automation Tester (Coded UI) Long-term Contracts

2016-02-17 Thread Javed Khan
Please share profile: ja...@globalwebmaster.us



Hi,

Hope you are doing great.

We have new job opportunity with our client. I am sending the job
description for your review so please go through that and reply with
your/consultation resume with contact details. I will highly appreciate if
you can send ASAP.



VERY URGENT AND IMMEDIATE NEED



Job Title  :   Automation Tester (Coded UI)

Location  :   Chevy Chase, MD

Duration :   Long-term Contracts

Interview   :   Phone / Skype

Start Date   :   ASAP



*Job Description:*

•  *Test Automation*

•  Should be capable to understand the underlying technology on
the various automation tools.

•  Should be capable to evaluate the best tool to the client.

•  Should be capable to create the required automation
framework to the client.

•  Web Testing

•  Should have good knowledge & concepts of UI validations, GUI
features etc. Concepts of Globalization and Localization testing will be an
added advantage

•  Application Testing

•  Should be able to differentiate the different testing phases
like Unit Integration, System, Acceptance, Regression testing

•  should be capable to perform these tests with the help of
ready-test cases.

•  Should understand Test Plans, Requirement Traceability
Matrix, Orthogonal Array Tool.

•  Should be able to do metrics analysis and reliability
analysis effectively with DFA tool.

•  Tool - *VSTS Coded UI Automation Testing*



---



Warm Regards,
*Javed Khan (Sr. Technical Recruiter)*

Global Webmaster Inc.

160 Beach, Rockaway Park, NY 11694

Direct: (312) 428-7795

Email: ja...@globalwebmaster.us

Skype ID: *javeedkhan.khan2*

GTalk: javeedimrank...@gmail.com  ; javedglobalwebmas...@gmail.com

www.globalwebmaster.us

-- 
You received this message because you are subscribed to the Google 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/CAHi%2Bg23jngS0URE9mAXKTZ4Rm3WzPzFkcUKHyYqvFNNmCs%2BeOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android Google Sign In is flashing a small empty white box while signing in a user

2016-02-17 Thread Santhanam gunasekaran
Hi,

Pls someone help,

There is no way to indicate(callbacks) the user about a background task 
happing in google side.

-- 
You received this message because you are subscribed to the Google 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/5020aa2c-2473-4059-befb-1965c6051a4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Signing using RSA Keys from AndroidKeyStore on Marshmallow

2016-02-17 Thread Jacob Taylor
Hey devs,

I'm working on a proof of concept app for generating an RSA keypair in an 
app, generating a X509 CSR based on the new keypair, then exporting it to 
be signed by some CA.
As a part o f the CSR generation process the whole CSR must be signed by 
the key itself.

I've been following along with the Keystore page on the documentation site 
(http://developer.android.com/training/articles/keystore.html#SigningAndVerifyingData)
 
and reached a snag.
The generation of the CSR is handled by spongycastle, which in turn uses a 
custom build class (called keystoreContentSigner) to sign the completed CSR 
with the keys stored in the keystore.
According to the above referenced documentation, the call to 
ks.getEntry(keyAlias, null) should return an object typecasted to the 
Keystore.Entry class, which you then cast into a PrivateKeyEntry which you 
then call against using its .getPrivateKey method.

On my test phone (Nexus 6P) this flow doesn't work. It excepts during the 
call to initSign, and reports the type of the object return from 
ks.getEntry as android.security.keystore.AndroidKeyStoreRSAPrivateKey, 
which isn't referenced anywhere I can find.

This type can't be casted to anything usable in the current format, is 
there some new way to perform cryptographic operations in Marshmallow, or 
is there something I'm missing?

KeystoreContentSigner class:

package au.com.taylornetworks.tapid;


import org.spongycastle.asn1.x509.AlgorithmIdentifier;
import org.spongycastle.operator.ContentSigner;
import org.spongycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;

import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.security.KeyStore;
import java.security.Signature;
import java.security.interfaces.RSAPrivateKey;


public class keystoreContentSigner implements ContentSigner{

private AlgorithmIdentifier algorithmIdentifier;
private String algorithmText;
private ByteArrayOutputStream dataStream;
private String keyAlias;

public keystoreContentSigner(String keyAlias)
{
algorithmText = "SHA512withRSA";
algorithmIdentifier = new 
DefaultSignatureAlgorithmIdentifierFinder().find(algorithmText);
dataStream = new ByteArrayOutputStream();
this.keyAlias = keyAlias;
}

public void setAlgorithm(String algorithmText)
{
this.algorithmText = algorithmText;
algorithmIdentifier = new 
DefaultSignatureAlgorithmIdentifierFinder().find(algorithmText);
}

@Override
public OutputStream getOutputStream()
{
return dataStream;
}

@Override
public AlgorithmIdentifier getAlgorithmIdentifier()
{
return algorithmIdentifier;
}

public byte[] getSignature()
{
byte[] data;
byte[] signature = null;
KeyStore ks;

try {
ks = KeyStore.getInstance("AndroidKeyStore");
ks.load(null);

data = dataStream.toByteArray();
dataStream.flush();

Signature s = Signature.getInstance(algorithmText);
KeyStore.Entry entry = ks.getEntry(keyAlias, null);

s.initSign((RSAPrivateKey) entry);
s.update(data);
signature = s.sign();
} catch (Exception e) {
e.printStackTrace();
}

return signature;
}

}

 
PkiManager class:
Enter 

package au.com.taylornetworks.tapid;

import android.security.keystore.*;

import java.io.IOException;
import java.security.*;
import java.security.cert.CertificateException;
import org.spongycastle.asn1.misc.MiscObjectIdentifiers;
import org.spongycastle.asn1.misc.NetscapeCertType;
import org.spongycastle.asn1.x500.X500Name;
import org.spongycastle.asn1.x509.BasicConstraints;
import org.spongycastle.asn1.x509.ExtendedKeyUsage;
import org.spongycastle.asn1.x509.Extension;
import org.spongycastle.asn1.x509.ExtensionsGenerator;
import org.spongycastle.asn1.x509.KeyPurposeId;
import org.spongycastle.asn1.x509.KeyUsage;
import org.spongycastle.operator.ContentSigner;
import org.spongycastle.operator.OperatorCreationException;
import org.spongycastle.pkcs.*;
import org.spongycastle.pkcs.jcajce.JcaPKCS10CertificationRequestBuilder;


public class pkiManager {

static private String keystoreName = "AndroidKeyStore";

KeyStore keyStore;
PKCS10CertificationRequest csr;
String keyAlias;
String username;


public pkiManager(String keyAlias) throws KeyStoreException, 
CertificateException, NoSuchAlgorithmException, IOException {
Security.insertProviderAt(new 
org.spongycastle.jce.provider.BouncyCastleProvider(), 1);
username = "Default User";
keyStore = KeyStore.getInstance(keystoreName);
keyStore.load(null);
this.keyAlias = keyAlias;
}

public PublicKey generateKeypair() throws NoSuchProviderException, 
NoSuchAlgorithmException, InvalidAlgorithmParameterException {

KeyPairGenerator generator;
KeyGenParameterSpec

[android-developers] Permissions Messages in VR (Google Cardboard Apps)

2016-02-17 Thread Dan M


*We are currently aware of the requirement to display a message asking the 
user for permission to access the SDCARD, every time the app boots up. 
However, we are currently unsure how best to handle this in regards to 
Google Cardboard VR apps. We can’t ask the user for permission from within 
the app, as the user would be in VR and presently the dialogue box that 
pops up does so in 2D over the top of the VR layer. *

 

*Any advice you can offer us in how to handle such messages would be 
greatly appreciated.*

 

-- 
You received this message because you are subscribed to the Google 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/779fe75e-f295-46ac-ad1f-c0e0ac125833%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Using MediaPlayer for MP3 requires a license?

2016-02-17 Thread porky pooky
I searched the android developer site but couldn't get any information
about the license for using the mp3 decoder.
If I develop a mp3 player app using MediaPlayer class and sell it, then do
I have to pay for the decoder?

-- 
You received this message because you are subscribed to the Google 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/CAM2%2BJfAEc_Y0pUhzfdPEOsPDHaMy%3DWoKVREv3ARkxWXL%3Du-v%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Application getting wrong location until open inbuilt Google Map application

2016-02-17 Thread Chirag Raval
 

Hello All,

I have developed one application which is used to find current location of 
device. I have used Fused Location API to get current location.

I am facing very strange issue, in some of devices i am not getting 
accurate current location until i open inbuilt Google Map, once i open 
Google Map and back to my application at that time application return exact 
location.

Can anyone tell me what is the wrong? Your help is really appreciated.

-- 
You received this message because you are subscribed to the Google 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/04031994-cc6c-407b-b105-9ea8564049c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to upload .hex file to arduino via bluetooth.

2016-02-17 Thread Rakesh Wadbudhe
I want to make android app that able to upload .hex file to arduino via 
bluetooth. There is a arduino IDE for windows who compiled program and 
creates .hex file and able to upload to arduino via USB and bluetooth. 
There is app call arduino commander on play store which can able upload 
.hex file via OTG. And there another app called Bluino Loader on play store 
which can able to upload .hex file via bluetooth. I heard about STK 500 v1 
protocol is used to upload .hex file to arduino .I get that protocol from 
github , but that is not working . So please give me any solution .

-- 
You received this message because you are subscribed to the Google 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/4cc074d1-7c1c-4e5b-b183-84ac805bd258%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Minimum Android API not respected? (Crosswalk)

2016-02-17 Thread BackendFreak
Hi ppl. Any smart head here?

I have my android-minSdkVersion set up to 19 (4.4 KitKat) and Target Api to 
21. However when I send my app to Google Play for alpha/beta testing, on my 
app page on Google Play states that the minimum requirement is Android 4.0. I 
use the newest IntelXDK, Crosswalk 15. I have decompiled an APK file to 
check what's in the config.xml which has been compiled to the APK and it 
looks allright "". Is 
it a Google bug? Is it a bug only for alpha/beta testing? I'm afrait to 
publish my app on production cause I don't want it to be accessible for 
older devices. Is there any other config file I should check?

-- 
You received this message because you are subscribed to the Google 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/22e06f12-334d-4311-938f-59853cfc84aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Separate context menus in child view of list view

2016-02-17 Thread tdrisio
Hello,

I am trying to implement a list view where each row has two buttons. 
Handling regular button clicks is no issue, however I'd also like to have a 
long press for both buttons where a context menu is shown. The same menu 
should be shown, however choosing an entry should be certainly specific to 
the chosen button.

Using registerForContextMenu() in the activity is no problem. I can also 
easily get the entry position. However I do not seem to be able to find out 
which button brought it up.

I tried different approaches (registering and showing the menu where the 
adapter is creating the row view, ) but all of them didnt lead anywhere 
and either didnt get me the button either or even lost the position 
information.

-- 
You received this message because you are subscribed to the Google 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/8f74b7a2-e26b-42b6-a916-f863eb980199%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Why does NdsManager not work on Android Wear?

2016-02-17 Thread Simon East
 

I am trying to get discovery to work on Android Wear. I'm using the 
standard NdsManager sample code but just the bit to discover another 
service - I am not publishing my own service from the device.


The code works fine on a Samsung Galaxy S3 running 4.3 - but on a Sony 
SmartWatch 3 running 5.1.1 it fails with "Internal Error".


So here is the discovery code - the same code is running on both devices:


public class ServerDiscovery {
Context mContext;NsdManager mNsdManager;NsdManager.DiscoveryListener 
mDiscoveryListener;NsdManager.ResolveListener mResolveListener;
public static final String SERVICE_TYPE = "_protocol._tcp.";public static final 
String TAG = "ServerDiscovery";public String mServiceName = "Client";
NsdServiceInfo mService;
public ServerDiscovery(Context context) {
mContext = context;}
public void start() {
initializeResolveListener();
initializeDiscoveryListener();
mNsdManager = (NsdManager) mContext.getSystemService(Context.NSD_SERVICE);
mNsdManager.discoverServices(SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, 
mDiscoveryListener);}
public void initializeDiscoveryListener() {

// Instantiate a new DiscoveryListener
mDiscoveryListener = new NsdManager.DiscoveryListener() {

//  Called as soon as service discovery begins.
@Override
public void onDiscoveryStarted(String regType) {
Log.d(TAG, "Service discovery started");
}

@Override
public void onServiceFound(NsdServiceInfo service) {
// A service was found!  Do something with it.
Log.d(TAG, "Service discovery success" + service);
if (!service.getServiceType().equals(SERVICE_TYPE)) {
// Service type is the string containing the protocol and
// transport layer for this service.
Log.d(TAG, "Unknown Service Type: " + service.getServiceType());
} else {
mNsdManager.resolveService(service, mResolveListener);
}
}

@Override
public void onServiceLost(NsdServiceInfo service) {
// When the network service is no longer available.
// Internal bookkeeping code goes here.
Log.e(TAG, "service lost" + service);
}

@Override
public void onDiscoveryStopped(String serviceType) {
Log.i(TAG, "Discovery stopped: " + serviceType);
}

@Override
public void onStartDiscoveryFailed(String serviceType, int errorCode) {
Log.e(TAG, "Discovery failed: Error code:" + errorCode);
   // mNsdManager.stopServiceDiscovery(this);
}

@Override
public void onStopDiscoveryFailed(String serviceType, int errorCode) {
Log.e(TAG, "Discovery failed: Error code:" + errorCode);
mNsdManager.stopServiceDiscovery(this);
}
};}
public void initializeResolveListener() {
mResolveListener = new NsdManager.ResolveListener() {
@Override
public void onResolveFailed(NsdServiceInfo serviceInfo, int errorCode) {
Log.e(TAG, "Resolve failed" + errorCode);
}
@Override
public void onServiceResolved(NsdServiceInfo serviceInfo) {
Log.e(TAG, "Resolve Succeeded. " + serviceInfo);
if (serviceInfo.getServiceName().equals(mServiceName)) {
Log.d(TAG, "Same IP.");
return;
}
mService = serviceInfo;
}
};}

and it is called from the main activity using:


public class MyActivity extends AppCompatActivity {
ServerDiscovery mServerDiscovery;
@Overrideprotected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

...some ui setup code...

mServerDiscovery = new ServerDiscovery(getApplicationContext());
mServerDiscovery.start();}

There is a server running on the same network publishing a service using 
_protocol._tcp. This gets dicovered and resolved to as you'd expect:


Service discovery startedService discovery successname: Simon’s MacBooktype: 
_protocol._tcp.host: nullport: 0txtRecord: nullResolve Succeeded. name: 
Simon’s\032MacBooktype: ._protocol._tcphost: /192.168.192.114port: 
3000txtRecord: null

But when I call the same code from the Android Wear activity:


public class MyActivity extends WearableActivity {

private static final SimpleDateFormat AMBIENT_DATE_FORMAT =
new SimpleDateFormat("HH:mm", Locale.US);

ServerDiscovery mServerDiscovery;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_s);
setAmbientEnabled();

... UI Code ...

mServerDiscovery = new ServerDiscovery(getApplicationContext());
mServerDiscovery.start();
}

All I get back is


E/ServerDiscovery: Discovery failed: Error code:0

Error code 0 apparently means Internal Error which does not h

[android-developers] MonkeyRunner.waitForConnection() can't get device with network

2016-02-17 Thread huang xin
Hi,

Now, i'm studying how to use the MonkeyRunner to test android devices. 
There is an android tv set, enabled adbd, no usb debug port, but network is 
available. I can use a following commend to connect this device with adb

*adb connect 172.30.198.240.*

List of devices attached
172.30.198.240:device


Then i checked this connection that was successful.  i can use adb shell 
command to login the tv.

 i wrote a python script(called test.py) to test the MonkeyRunner.

#Script start###
*from com.android.monkeyrunner import MokeyRunner, MonkeyDevice*

*device = MonkeyRunner.waitForConnection() # <---wait for ever*

*if device is not None:*
*device.takSnapshot()*
##Script END###

after aboves done, i input the* monkeyrunner.bat test.py* in the dos 
terminal of win7.
the codes blockedt the MonkeyRunner.waitForConnection() for ever, and adb 
server was killed.

I also tried to use next method: *monkeyrunner.bat -s 172.30.198.240 
test.py, *but failed again.


Then i change  a phone with a usb debug port to connect my pc. Above script 
ran ok.

I don't know why, could you help me?

thanks a lot





-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/4c626856-65cf-4157-8e39-cdbf42c92b9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.