Sharing Data

stevel05

Expert
Licensed User
Longtime User
I'm looking for a slick way to share data from one app user to another via email, I just need to be able to import a text file from an email, either with the data as an attachment or with a text string as a URI but I can't find anything to read it without user interaction i.e. saving the file and then manually loading it into the app.

I have searched the forums and help but I cant identify anything that will do it.

Is there a way this can be automated in B4A?

Thanks

Steve
 

stevel05

Expert
Licensed User
Longtime User
Thanks Erel,

I think the data will be too large tp use SMS. Is this something that is likely to be implemented? or should I look at another way.

Steve
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
OK, what about if the data was built into a URI, a link in an email, is it possible to get an app to start in response to clicking on it, and then capturing the URI which would include the data required?

From my limited knowledge and investigations, I think this would require an entry in the manifest.xml, could this work?

Steve
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
I am thinking of it working the otherway around, so that the email contains a link, such as:

myapp://data........................................

and clicking on the link could then start myapp. If the full URI is then accessible to myapp, I would have my data.

It would then be a question of how an app can be started by clicking on the link.
Android would have to know that myapp:// relates to myapp and needs to start it.

I'm sorry to labour this point, but it is an important part of the app I am working on, I would like the process of transferring and importing data to be as transparent as possible to the user.

Steve
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I haven't tried to start an application from a mail. So I don't know if it will work. Even if it works I don't think that you will be able to pass any information in the URI.

I guess that the devices are not connected in the same local network, right?
Can you use some online resource that will store the shared data?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
The app will be for general release, so users could be anywhere. And if it proves popular, there could be a lot of traffic.

I will investigate further and experiment with it a bit, but I think the first question would be is it possible to change the manifest.xml once it's generated without upsetting B4A?

Steve
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Thanks Erel,

From my initial reading, you need an entry in the manifest file to allow a program to be started via a URI.

I'll let you know how I get on.

Steve
 
Upvote 0

LittleEddie

Member
Licensed User
Longtime User
Why not just put the Data on the web somewhere and then send a E-mail that the data is ready, start the app and it automaticly goes and gets the data. Unless you readly need the data in the email
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Hi Eddie

When the app is out in the wild, it won't be under my control. A user will be able to share data with any other user, so it needs to be self contained and easy to use.

I've spent a few hours investigating this and have come to the conclusion that it's not going to be a quick fix. I need to learn far more about Android and probably a bit of Java as well, so I have gone halfway to meeting my requirements. The file is sent as an email attachment which the user then saves to the root of the SDcard.

When restarting the app, or selecing a menu option the import will be completed.

It's not perfect, but will have to do for now. I'll come back to it when I have more time.

Steve
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top