Android transfer object data through different device, same app - android

I want to implement a feature in an app where users can add friends and check and compare each other stats from the java objects created, which involves a few subclasses.
I was wondering if anyone know what the best way to approach this would be?
The only thing that pops out is using Firebase. Where the user would click a button to upload the data to Firebase with a UUID link, and then give the UUID to the other user, where he/she would have to manually type the UUID in a textfield, and it gets the data from Firebase.
Would method be viable and is there any other better options?
Thanks

I would probably create a file (you can invent any ending) with all info you need displayed in json. That file can be shared via Whatsapp or what ever and imported in your app?
But I don't know what "stats" that are that the users can compare but I think they will change from time to time? So I would guess an online service would be better because otherwise to update, they have to share again and again?

Related

How to share data between devices using firestore?

I would like to share data between two users in my app. Generally, users are registered in the app and the storage of their data is done via Firestore. To access the data I use the UID of the user on the one hand and an id for the corresponding document inside a collection to be accessed on the other.
I am now looking for a way to share some selected data of a user with other users. The data is to be shared via WhatsApp, Email, etc., for example. These are the ways I have thought of so far:
The DataClass with all the stored data is packaged as an app-specific file and sent between the users.
or
The UID of the user and the id of the corresponding document inside the collection are sent. Using these two pieces of information, I can access the data from the user who is to receive the data via Firestore and save it on his or her device.
In general, my data sets are not particularly large. Now to my question:
Which of the two ways seems to make more sense and, above all, how can I implement this or which other sites could help me?
I've tried a few things with FileProvider so far, but haven't really got anywhere. It would be important that the user in question receives a message via e.g. WhatsApp, email, etc., can open my app via this, and the processing of the data for the user begins. Basically, I need to start an intent from the message the user receives with some extra data. How can I achieve that?
If you need any further information, please just let me know. Many thanks in advance!
You might want to have a look at Firebase Dynamic Links, which:
If a user opens a Dynamic Link on iOS or Android, they can be taken directly to the linked content in your native app.

Data storage option that best suits for my android app purpose

I am creating an android app that can be used by common users and also admin.
Suppose, if admin adds a new place name, that name should be added to database and when common user uses the app, he should be able to see the place name that is added.
I used MySqlLite database. But the problem is that if the app is uninstalled all data is lost. So I want some persistent data storage in which all the places that are added by admin are saved permanently.
Regards,
Sindhu
With the data being needed across multiple devices, your only option is to create/use a backend API.
Parse would have been a good choice but since that is getting shut down soon then it wouldn't be wise to use that.
Take a look at these alternatives here
You could also write one yourself, but unless you have some experience in that sort of thing then it will take some time to learn.

Android: Sharing Data between multiple applications

I have a requirement, wherein I have 4 android apps, which are sending notifications to a user, at a fixed time of the day. A user could have one, or more of these apps installed on his phone.
I want only one of the apps(any one) to show this notification to the user, because multiple apps popping up notifications is a bad user experience.
For this I need to share some data across the apps.
I was thinking of a mutex/lock based approach, the problem is, where do I store it?
Problems:
Shared Prefs: I don't know which app wrote the data first, and from which app's context should I read.
SQLite: Same Problem as above and app uninstalls need to be handled and SD card might be missing
Server: Mostly offline app, dont want to add internet permission just for this
I see files at a common location as the only way to store this information.
Is there any better way
As you said that the easiest ways is with file,
I did this before and i too wasn't able to find more easy way.
when you show the notification first time then Just make a new file anywhere which can be common for any app and then check if file is exist.
if it exist then don't show the notification and if not then show and make file again, also remember to delete the file from any of your app when day changed, use AlarmManager for this.
hope it helps.

Android: how to integrate a 'report abuse' mechanism in my app.?

I'm currently working on my first serious app., and I would like to have some sort of contol on the data that users can enter.
Specifically, my app. allows users to write some text content (imagine something like a 'tweet'), and upload pictures.
I would like to prevent them from writing inappropriate text, and uploading offensive pictures for instance.
What I thought of doing, is to allow something like 'report abuse' button, where users who find some content offesive, can press - in which case relevent data will be saved, and later checked, to decide if indeed an inappropriate usage happened (maybe by some sort of server-side code).
As I said, I'm a beginner in android development, and I would really love to hear your suggestions and guiding. Perhaps it is something over my league for now? Maybe you know of such thing that already exists?
My app. uses Parse.com as its DB.
I would really appriciate your help.
Thank you.
I'm developing as well an app with parse and I also had to integrate in it a report button for the user.
The way I did it is simple:
In every Pf User object, I created a field of type counter named "reportCounter" while in the PFObject created by the user (it can be a string, a picture, etc.)I created a boolean field named "isReported". When a user find some inappropriate content he can report it through the dedicated button. The PFObject relative to that content gets its isReported field changed to YES and a parse background job checks every day for all the PFObjects, incrementing the reportCounter field of the owner-creator of the content and sending a report e-mail to the administrator. In this way you can keep also a record to see if a particular user is behaving badly. Just take a look at the Parse documentation about background-jobs. It's pretty good.
I hope this will help.

what kind of database solution suits my mobile apps

I am looking into options how to realize the following use case. A iOS/Android user is using my app which gets its table view data populated by a cloud database solution. The user must be able to send back information (e.g. name + date) which needs to be send back to the database and gets stored there in a/different table/s. Moreover, I would need the db-solution to run automated reports based on the information sent back by the users (e.g. in an excel file).
So far I only found ragic.com might suit my needs. But what other options are out there, which might not be as fancy looking but will get the job done. Thanks guys!
A WebService is considered best practice regarding these matters. Have a look at this guys tutorial:
http://android.programmerguru.com/android-webservice-example/

Categories

Resources