[android-developers] Re: Writing to disk

2010-10-25 Thread kypriakos

Hi Mark,

android:sharedUserId
The name of a Linux user ID that will be shared with other
applications etc.

Where can I find the allowable values for this ID?

Thanks

On Oct 13, 12:17 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Oct 13, 2010 at 12:07 PM, kypriakos demet...@ece.neu.edu wrote:
  Well these are two separate projects that eventually co-operate with
  each other
  using that shared space. So yes if I could give specific access to a
  particular
  app to access that space that would be fine. Else, I will need to find
  another
  way to approach it. Generating such a shared space on the sdcard is a
  better
  idea?

 If these are two projects of yours, then you can use the
 android:sharedUserId attribute in your manifest. Give both apps the
 same user ID and sign both with the same signing key. Then they will
 run as the same Linux user, and they can access each other's files
 without further modification. And, the files will still be protected
 from other apps.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Writing to disk

2010-10-25 Thread kypriakos

Sorry for the multiple postings -

on the same note, do apps generated via the Eclipse Android plug in
get automatically
signed before they can run on the emulator? Or do they need to be
signed before they
can be launched on a real device?

On Oct 13, 12:17 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Oct 13, 2010 at 12:07 PM, kypriakos demet...@ece.neu.edu wrote:
  Well these are two separate projects that eventually co-operate with
  each other
  using that shared space. So yes if I could give specific access to a
  particular
  app to access that space that would be fine. Else, I will need to find
  another
  way to approach it. Generating such a shared space on the sdcard is a
  better
  idea?

 If these are two projects of yours, then you can use the
 android:sharedUserId attribute in your manifest. Give both apps the
 same user ID and sign both with the same signing key. Then they will
 run as the same Linux user, and they can access each other's files
 without further modification. And, the files will still be protected
 from other apps.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Writing to disk

2010-10-25 Thread kypriakos

Ok you can scream at me now ... everything is explained in
http://developer.android.com/guide/publishing/app-signing.html#setup

So I am assuming that my original question of how I will be able to
sign
both apps with the same key is answered by doing so manually for each
of the unsigned apks. I never signed these apks before but yet they
are
running fine on the emulator and the real device so I assumed that the
plug in does it automatically in which case I will need to intervene
to
sign them with the same key before I can used the SharedId.

Thanks and again apologies for the multiple postings

On Oct 13, 12:17 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Oct 13, 2010 at 12:07 PM, kypriakos demet...@ece.neu.edu wrote:
  Well these are two separate projects that eventually co-operate with
  each other
  using that shared space. So yes if I could give specific access to a
  particular
  app to access that space that would be fine. Else, I will need to find
  another
  way to approach it. Generating such a shared space on the sdcard is a
  better
  idea?

 If these are two projects of yours, then you can use the
 android:sharedUserId attribute in your manifest. Give both apps the
 same user ID and sign both with the same signing key. Then they will
 run as the same Linux user, and they can access each other's files
 without further modification. And, the files will still be protected
 from other apps.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Writing to disk

2010-10-13 Thread kypriakos

He he - I knew I was going to hear all that ;)

Well these are two separate projects that eventually co-operate with
each other
using that shared space. So yes if I could give specific access to a
particular
app to access that space that would be fine. Else, I will need to find
another
way to approach it. Generating such a shared space on the sdcard is a
better
idea?

On Oct 12, 5:08 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Oct 12, 2010 at 5:04 PM, kypriakos demet...@ece.neu.edu wrote:
  On a related note - can apps give permissions to other apps to read
  write from/into their sandboxes? (/data/data/app/files?

 Yes, but it is a terrible idea. As in epic fail level of terrible.

 Provide some sort of managed access (remote service via AIDL,
 command-style IntentService, ContentProvider) to work with the local
 data. Unless, of course, you don't mind other applications deleting
 your data, etc.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android 2.2 Programming Books:http://commonsware.com/books

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


Re: [android-developers] Re: Writing to disk

2010-10-13 Thread Mark Murphy
On Wed, Oct 13, 2010 at 12:07 PM, kypriakos demet...@ece.neu.edu wrote:
 Well these are two separate projects that eventually co-operate with
 each other
 using that shared space. So yes if I could give specific access to a
 particular
 app to access that space that would be fine. Else, I will need to find
 another
 way to approach it. Generating such a shared space on the sdcard is a
 better
 idea?

If these are two projects of yours, then you can use the
android:sharedUserId attribute in your manifest. Give both apps the
same user ID and sign both with the same signing key. Then they will
run as the same Linux user, and they can access each other's files
without further modification. And, the files will still be protected
from other apps.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Writing to disk

2010-10-13 Thread Bret Foreman
You should try Amazon S3. I use it for holding large amounts of app
data and and I'm very happy with the performance, reliability, and
ease of use. This also makes it easy to share data across any number
of phones at the same time, which opens up lots of possibilities for
neat app features.

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


[android-developers] Re: Writing to disk

2010-10-13 Thread kypriakos

That's what I was looking for - thanks. Regarding the storage of files
for each app though (yes both apps are mine) should they still be
storing their corresponding files in their own sandbox and each of
will use the path to each other's space?

On Oct 13, 12:17 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Oct 13, 2010 at 12:07 PM, kypriakos demet...@ece.neu.edu wrote:
  Well these are two separate projects that eventually co-operate with
  each other
  using that shared space. So yes if I could give specific access to a
  particular
  app to access that space that would be fine. Else, I will need to find
  another
  way to approach it. Generating such a shared space on the sdcard is a
  better
  idea?

 If these are two projects of yours, then you can use the
 android:sharedUserId attribute in your manifest. Give both apps the
 same user ID and sign both with the same signing key. Then they will
 run as the same Linux user, and they can access each other's files
 without further modification. And, the files will still be protected
 from other apps.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Writing to disk

2010-10-13 Thread kypriakos

That could be another possibility for storing large data off the
phone. In this
case these are simple config files so I will try Mark's suggestion
with
ther common user id.

Thanks Bret

On Oct 13, 12:18 pm, Bret Foreman bret.fore...@gmail.com wrote:
 You should try Amazon S3. I use it for holding large amounts of app
 data and and I'm very happy with the performance, reliability, and
 ease of use. This also makes it easy to share data across any number
 of phones at the same time, which opens up lots of possibilities for
 neat app features.

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


Re: [android-developers] Re: Writing to disk

2010-10-13 Thread Mark Murphy
On Wed, Oct 13, 2010 at 1:49 PM, kypriakos demet...@ece.neu.edu wrote:
 That's what I was looking for - thanks. Regarding the storage of files
 for each app though (yes both apps are mine) should they still be
 storing their corresponding files in their own sandbox and each of
 will use the path to each other's space?

An app's on-board files get removed when the app gets uninstalled.
Hence, each app needs whatever it needs in case the other app gets
uninstalled.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Writing to disk

2010-10-13 Thread kypriakos

Gotcha - thanks Mark

On Oct 13, 1:54 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Oct 13, 2010 at 1:49 PM, kypriakos demet...@ece.neu.edu wrote:
  That's what I was looking for - thanks. Regarding the storage of files
  for each app though (yes both apps are mine) should they still be
  storing their corresponding files in their own sandbox and each of
  will use the path to each other's space?

 An app's on-board files get removed when the app gets uninstalled.
 Hence, each app needs whatever it needs in case the other app gets
 uninstalled.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Writing to disk

2010-10-12 Thread kypriakos

My bad - the exception is specific to the software I am using. This
exception is thrown when a particular file is not created in the
sdcard.
The thread that writes it does not thrown an exception but simply
skips it - which means the original code does not catch it.
I will look a bit deeper on this and post what I find.

On a related note - can apps give permissions to other apps to read
write from/into their sandboxes? (/data/data/app/files?

The exception was:
10-10 17:00:41.739  7878  7878 I System.out: P2PA - ## - fatal
error : group creation failure
10-10 17:00:41.739  7878  7878 W System.err:
net.jxta.exception.PeerGroupException: Could not locate World
PeerGroup Module Implementation.
10-10 17:00:41.739  7878  7878 W System.err:at
net.jxta.peergroup.WorldPeerGroupFactory.getDefaultWorldPeerGroupClass(WorldPeerGroupFactory.java:
241)
10-10 17:00:41.739  7878  7878 W System.err:at
net.jxta.peergroup.WorldPeerGroupFactory.init(WorldPeerGroupFactory.java:
178)
10-10 17:00:41.739  7878  7878 W System.err:at
net.jxta.peergroup.NetPeerGroupFactory.init(NetPeerGroupFactory.java:
204)
10-10 17:00:41.739  7878  7878 W System.err:at
net.jxta.platform.NetworkManager.startNetwork(NetworkManager.java:410)
10-10 17:00:41.739  7878  7878 W System.err:at
com.p2pSOAAndroidP2PA.P2PA.PeerToPeerAdapter.startJxta_2_5(PeerToPeerAdapter.java:
1207)
10-10 17:00:41.739  7878  7878 W System.err:at
com.p2pSOAAndroidP2PA.P2PA.PeerToPeerAdapter.main(PeerToPeerAdapter.java:
808)
10-10 17:00:41.739  7878  7878 W System.err:at
com.p2pSOAAndroidP2PA.p2pSOAAndroidP2PAAct.onCreate(p2pSOAAndroidP2PAAct.java:
122)

On Oct 11, 1:17 pm, TreKing treking...@gmail.com wrote:
 On Mon, Oct 11, 2010 at 12:08 PM, kypriakos demet...@ece.neu.edu wrote:
  the same dir path on the real device is throwing exceptions.

 And the exceptions are ... ?

 -
 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


Re: [android-developers] Re: Writing to disk

2010-10-12 Thread Mark Murphy
On Tue, Oct 12, 2010 at 5:04 PM, kypriakos demet...@ece.neu.edu wrote:
 On a related note - can apps give permissions to other apps to read
 write from/into their sandboxes? (/data/data/app/files?

Yes, but it is a terrible idea. As in epic fail level of terrible.

Provide some sort of managed access (remote service via AIDL,
command-style IntentService, ContentProvider) to work with the local
data. Unless, of course, you don't mind other applications deleting
your data, etc.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 2.2 Programming Books: http://commonsware.com/books

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


[android-developers] Re: Writing to disk

2010-10-11 Thread kypriakos

But if I do want to share data between apps the best bet is to avoid
putting
them in /data/data/app/files and opt to throw them on the sdcard
right?
What happened is that the app would write data to /sdcard/app on the
emulator
without issues but the same dir path on the real device is throwing
exceptions.


On Oct 11, 1:23 am, kypriakos demet...@ece.neu.edu wrote:
 Hi all,

 with the emulator I can create directories via my apps and populate
 them
 with files (ex. /sdcard) - it seems that I have kind-of root
 privileges (set by the
 entry in the manifest file).
 with the real device I am finding out that this is not possible (??).
 Would the
 only space that my apps can write be in predefined app spaces/
 sandboxes
 that Android allows for each installed app?
 This is the case?

 Thanks

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


Re: [android-developers] Re: Writing to disk

2010-10-11 Thread TreKing
On Mon, Oct 11, 2010 at 12:08 PM, kypriakos demet...@ece.neu.edu wrote:

 the same dir path on the real device is throwing exceptions.


And the exceptions are ... ?

-
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