[android-developers] Re: Access to files on CIFS partition from my application

2014-02-26 Thread mastermind
Thanks for the answer!
Folder mounted outside of the app from adb shell.
I just can't understand why some apps can't access it (ES File Explorer 
with root priveleges) and some can (Total Commander, even adb without root 
priveleges).
May be it can be accessed only under root UID and adb is an exception?
How can I set options appropriate?
How can I enable root priveleges for my app so it can access the folder?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Access to files on CIFS partition from my application

2014-02-26 Thread Nikolay Elenkov
Please reply to list.

On Wed, Feb 26, 2014 at 5:08 PM, mastermind denis.bar...@gmail.com wrote:
 Thanks for the answer!
 Folder mounted outside of the app from adb shell.
 I just can't understand why some apps can't access it (ES File Explorer with
 root priveleges) and some can (Total Commander, even adb without root
 priveleges).
 May be it can be accessed only under root UID and adb is an exception?
 How can I set options appropriate?
 How can I enable root priveleges for my app so it can access the folder?


It all depends on the permissions of those files, check those first.
Root can generally access anything, regardless of permissions.
For everyone else, it depends on the owner, group and permissions
of the target file(s).

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Download folder

2014-02-26 Thread Yves Liu
Yes, I did. The problem is like this. In my gallery, say, there are 6
pictures, when i do the file.exist call, (with the path I got from
Gallery), two works, and 4 of them are not working.


On Tue, Feb 25, 2014 at 8:15 AM, TreKing treking...@gmail.com wrote:


 On Tue, Feb 25, 2014 at 1:26 AM, Yves Liu yves...@gmail.com wrote:

 Sorry, this happens on Nexus 5, kitkat.


 That's what I thought. Next question - have you declared the new external
 storage permission?

 https://developer.android.com/about/versions/android-4.4.html



 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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

2014-02-26 Thread Yves Liu
Yes, this is very inconvenient. Does google want to kill all the third
party developers?


On Tue, Feb 25, 2014 at 12:21 PM, Nathan nathan.d.mel...@gmail.com wrote:



 On Thursday, February 20, 2014 5:25:28 PM UTC-8, Nathan wrote:



 There is a chance that if I directed my users to use:
 Android/data/com.example.foo/ on external storage devices that they might
 be able to use their valued card.

 However, that is difficult to test as I don't have one of the target
 devices, much less all of them.


 Another snag with that idea I had. Based on this API, those files will get
 wiped if the app is uninstalled.

 Very undesirable if the user uninstalled and reinstalled and loses
 valuable data.

 Nathan
 public abstract 
 File[]https://developer.android.com/reference/java/io/File.html
  getExternalFilesDirs 
 (Stringhttps://developer.android.com/reference/java/lang/String.html
  type)
 Added in API level 
 19https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels

 Returns absolute paths to application-specific directories on all external
 storage devices where the application can place persistent files it owns.
 These files are internal to the application, and not typically visible to
 the user as media.

 This is like 
 getFilesDir()https://developer.android.com/reference/android/content/Context.html#getFilesDir()
  in that these files will be deleted when the application is uninstalled,
 however there are some important differences:


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Access to files on CIFS partition from my application

2014-02-26 Thread mastermind
Permission of the file is drwxr-xr-x, so everybody should access it. 
Owner and group is system. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Resource not found errors for images referred to in a button image selector xml file

2014-02-26 Thread nish1013
I got a similar problem when building with maven. I have got an apklib that 
contain xml(s) that refers to drawables in src. But when build a project 
that has got this apklib as a dependency same error. 

On Wednesday, 6 January 2010 08:37:46 UTC, Vladimir wrote:

 Instead of
 android:drawable=@drawable-ldpi/startstopin
 try
 android:drawable=@drawable/startstopin
 Just like you do for your normal HVGA screen. On small screens it will
 automatically look in the -ldpi directory and pick these images
 ahead of those in the default dir

 On Jan 5, 11:18 pm, OldSkoolMark m...@sublimeslime.com wrote:
  My 1.6 app works fine in both portrait and landscape modes on the
  default HVGA device. I'm now trying to support it on QVGA devices and
  am encountering build-time errors I don't understand.
 
  In my res/drawable-ldpi directory I have:
 
  startstopin.png
  startstopout.png
 
  and a selector file
 
  startstopbuttonimageselector.xml
 
  which contains:
 
  ?xml version=1.0 encoding=utf-8?
   selector xmlns:android=http://schemas.android.com/apk/res/android;
   item android:state_pressed=true
 android:drawable=@drawable-ldpi/startstopin / !--
  pressed --
   item android:drawable=@drawable-ldpi/startstopout / !--
  default --
   /selector
 
  I've 'fixed project properties', and done a 'clean' build, to no
  avail. The error I get is:
 
  ERROR Error: No resource found that matches the given name (at
  'drawable' with value '@drawable-ldpi/startstopin').
   ERROR Error: No resource found that matches the given name (at
  'drawable' with value '@drawable-ldpi/startstopout').
 
  I've tried adding a layout file in res/layout-small that explicitly
  references this selector file, but this triggers a similar build error
  and fails to address the original problem:
 
  ERROR Error: No resource found that matches the given name (at 'src'
  with value '@drawable-ldpi/startstopbuttonimageselector').
 
  Any insight into this problem would be greatly appreciated.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Can't create handler inside thread that has not called Looper.prepare()

2014-02-26 Thread Rashmi
Hi,

I am binding from service1 in app1 to service2 in app2 through aidl. In 
service2 to I have defined the aidl stub api's which has some handler.
If I tried to access the service2 api through binder from service1, I am 
getting the following exception

 java.lang.RuntimeException: Can't create handler inside thread that has 
not called Looper.prepare()

I am not creating any thread explicitly. Please let me know from where I 
can call Looper.prepare().

Thank you,

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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

2014-02-26 Thread Jonathan S
Users should have to backup data first. 

On Tuesday, February 25, 2014 3:21:14 PM UTC-5, Nathan wrote:



 On Thursday, February 20, 2014 5:25:28 PM UTC-8, Nathan wrote:



 There is a chance that if I directed my users to use: 
 Android/data/com.example.foo/ on external storage devices that they might 
 be able to use their valued card. 

 However, that is difficult to test as I don't have one of the target 
 devices, much less all of them.


 Another snag with that idea I had. Based on this API, those files will get 
 wiped if the app is uninstalled. 

 Very undesirable if the user uninstalled and reinstalled and loses 
 valuable data.  

 Nathan
 public abstract 
 File[]https://developer.android.com/reference/java/io/File.html
  getExternalFilesDirs 
 (Stringhttps://developer.android.com/reference/java/lang/String.html
  type)
 Added in API level 
 19https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels

 Returns absolute paths to application-specific directories on all external 
 storage devices where the application can place persistent files it owns. 
 These files are internal to the application, and not typically visible to 
 the user as media.

 This is like 
 getFilesDir()https://developer.android.com/reference/android/content/Context.html#getFilesDir()
  in that these files will be deleted when the application is uninstalled, 
 however there are some important differences:




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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

2014-02-26 Thread Nathan


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

 Users should have to backup data first. 


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

I expect they will find out after the fact. 

Nathan 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client cert/key in the keystore

2014-02-26 Thread Pradeep Phatak
 
Finally, programatically setting EAP-TLS is working for me.
The last error was resolved after I added set phase2auth to none.
I believe it was caused by call to getKeyIdForCredentials in 
WifiConfigStore.java. 
 

On Tuesday, February 25, 2014 8:18:46 PM UTC-8, Pradeep Phatak wrote:

  
 setClientKeyEntry API worked after I retrieved X509Certificate and 
 PrivateKey from the KeyStore. The cert and key looked okay in the 
 WifiConfiguration.
  
 Adding wifi network failed with the error below-
 E/WifiConfigStore(764): 8021x-wpa2-ssid invalid config for key 
 installation
 E/WifiConfigStore(764): Failed to set a network variable, removed network: 
 12

 On Tuesday, February 25, 2014 8:31:17 AM UTC-8, Nikolay Elenkov wrote:

 On Wed, Feb 26, 2014 at 1:18 AM, Pradeep Phatak 
 pradeep...@gmail.com wrote: 
  
  The alias is provided when we use the Keychain createInstallIntent API 
 to 
  store the p12 in the Android KeyStore. 
  As you correctly noted in your earlier post, we can't retrieve the 
 Private 
  Key in that case. 
  The only other method I found to load a p12 certificate in Keystore was 
 the 
  load method. But, it doesn't take any alias as parameter. 
  How do I pass the alias while loading the certificate in the keystore? 
  

 Do read the JavaDoc of the KeyStore class before proceeding: 

 https://developer.android.com/reference/java/security/KeyStore.html 



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Digest for android-developers@googlegroups.com - 10 Messages in 6 Topics

2014-02-26 Thread nyiswan htet
Thank for that.
On Feb 27, 2014 12:43 PM, android-developers@googlegroups.com wrote:

   Today's Topic Summary

 Group: http://groups.google.com/group/android-developers/topics

- WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client
cert/key in the keystore #14471f9bc8cd823f_group_thread_0 [1 Update]
- External Storage lockout in 4.4 update on some Samsung 
 devices.#14471f9bc8cd823f_group_thread_1[3 Updates]
- Can't create handler inside thread that has not called
Looper.prepare() #14471f9bc8cd823f_group_thread_2 [1 Update]
- Resource not found errors for images referred to in a button image
selector xml file #14471f9bc8cd823f_group_thread_3 [1 Update]
- Access to files on CIFS partition from my 
 application#14471f9bc8cd823f_group_thread_4[3 Updates]
- Download folder #14471f9bc8cd823f_group_thread_5 [1 Update]

   WifiEnterpriseConfig setClientKeyEntry doesn't work with .p12 client
 cert/key in the 
 keystorehttp://groups.google.com/group/android-developers/t/c44be42e5e40aafb

Pradeep Phatak pradeep.pha...@gmail.com Feb 26 04:40PM -0800

Finally, programatically setting EAP-TLS is working for me.
The last error was resolved after I added set phase2auth to none.
I believe it was caused by call to getKeyIdForCredentials in
WifiConfigStore.java.


On Tuesday, February 25, 2014 8:18:46 PM UTC-8, Pradeep Phatak wrote:




   External Storage lockout in 4.4 update on some Samsung 
 devices.http://groups.google.com/group/android-developers/t/35843bee07b7f5da

Yves Liu yves...@gmail.com Feb 26 12:16AM -0800

Yes, this is very inconvenient. Does google want to kill all the third
party developers?






Jonathan S xfsuno...@gmail.com Feb 26 11:31AM -0800

Users should have to backup data first.

On Tuesday, February 25, 2014 3:21:14 PM UTC-5, Nathan wrote:




Nathan nathan.d.mel...@gmail.com Feb 26 02:34PM -0800

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

 Users should have to backup data first.

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

I expect they will find out after the fact.

Nathan



   Can't create handler inside thread that has not called 
 Looper.prepare()http://groups.google.com/group/android-developers/t/2a799860e76cdb99

Rashmi rashmi@gmail.com Feb 26 03:52AM -0800

Hi,

I am binding from service1 in app1 to service2 in app2 through aidl.
In
service2 to I have defined the aidl stub api's which has some handler.
If I tried to access the service2 api through binder from service1, I
am
getting the following exception

java.lang.RuntimeException: Can't create handler inside thread that
has
not called Looper.prepare()

I am not creating any thread explicitly. Please let me know from where
I
can call Looper.prepare().

Thank you,



   Resource not found errors for images referred to in a button image
 selector xml 
 filehttp://groups.google.com/group/android-developers/t/c80bae6583cc1dab

nish1013 nishan...@gmail.com Feb 26 02:07AM -0800

I got a similar problem when building with maven. I have got an apklib
that
contain xml(s) that refers to drawables in src. But when build a
project
that has got this apklib as a dependency same error.

On Wednesday, 6 January 2010 08:37:46 UTC, Vladimir wrote:



   Access to files on CIFS partition from my 
 applicationhttp://groups.google.com/group/android-developers/t/f1bc02314595d470

mastermind denis.bar...@gmail.com Feb 26 12:10AM -0800

Thanks for the answer!
Folder mounted outside of the app from adb shell.
I just can't understand why some apps can't access it (ES File
Explorer
with root priveleges) and some can (Total Commander, even adb without
root
priveleges).
May be it can be accessed only under root UID and adb is an exception?
How can I set options appropriate?
How can I enable root priveleges for my app so it can access the
folder?




Nikolay Elenkov nikolay.elen...@gmail.com Feb 26 05:14PM +0900

Please reply to list.

 May be it can be accessed only under root UID and adb is an
exception?
 How can I set options appropriate?
 How can I enable root priveleges for my app so it can access the
folder?


It all depends on the permissions of those files, check those first.
Root can generally access anything, regardless of permissions.
For everyone else, it depends on the owner, group and permissions
of the target file(s).




mastermind denis.bar...@gmail.com Feb 26 12:35AM -0800

Permission of the file is drwxr-xr-x, so everybody should access it.
Owner and group is system.



   Download 
 

[android-developers] moving file in tb

2014-02-26 Thread Rahul Kaushik
Hello ,

I have created my own directory and i want cope the file from sd card to my
dir
please suggest

Thanks
RK

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.