How to create a web service that stores users posts [Android] - Java for Android App Development

Hi guys!
I would create an Android app where the users can login with Facebook or Twitter(no problem with this) and then they can post something to give everyone that is his friends or followers, to LIKE or FAVORITE what they wrote.
The app should be like this, approximately:
1)LOGIN (with Facebook or Twitter)
2)Show all the POSTS of the others friends that has the app with LIKES NUMBERS next to each post.
3)Text form where they can write and publish their own posts.
Everyone that login can just put ONE like and being able to see how many likes are stored in that exact time.
The important thing is that the posts and the likes must not be shown in Facebook Diary or Twitter Account to everyone, but just to the users of my app.
I could say I want to create a little private social network with just posts (with likes and comments).
I don't know how to store all the posts and the likes "live"...
What I know for sure is that I have to create a web service that must communicate with my Android app first. But I don't know how to do it.
Anyone can help me? Any links or tutorial would be great!

First answer me why would facebook or twitter let you create a private mini social network inside thier platform ?
for facebook i can say for sure it is not possible !
twitter will be no different but no harm checking
Sent from my GT-S5302 using Tapatalk 2

sak-venom1997 said:
First answer me why would facebook or twitter let you create a private mini social network inside thier platform ?
for facebook i can say for sure it is not possible !
twitter will be no different but no harm checking
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
Mostly I would to use Facebook or Twitter for make the login more easier, without forcing the users to type all his informations..
Actually it would be no problem for me sign up new users! I would just need a new database, that I can link to my Android app via web service.
But my issue is to store the posts of every users with the numbers likes to that post, I thought that with Facebook it would've been more simply to do.
It should like this, after the login:
POST SOMETHING button
USER A: Hi, have a wonderful day to everyone!
3 likes. 4 comments
LIKE button COMMENT button
*list of comments*
USER B: Hello!
1 likes. 2 comments
LIKE button COMMENT button
*list of comments*
and go on...
So, as you can see, it must show all the post of all the users with the number of the likes and comments.
I don't know how to store and show them updated in real-time.

@ubun09
HERE is a glimpse of how facebook does that
Sent from my GT-S5302 using Tapatalk 2

sak-venom1997 said:
@ubun09
HERE is a glimpse of how facebook does that
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
Thanks for that. :good:
So Facebook uses Apache Hadoop, but I think it's too "big" for what I need for. Are there some alternatives?

ubun09 said:
Thanks for that. :good:
So Facebook uses Apache Hadoop, but I think it's too "big" for what I need for. Are there some alternatives?
Click to expand...
Click to collapse
No need just press the thanks button dude
SQL or probably nosql if you plan for expansion in near future
for SQL you can have a table with a column time
TIME
POST ** contents of post
LIKES **list of users who liked this post
similary for COMMENTS and stuff
Sent from my GT-S5302 using Tapatalk 2

sak-venom1997 said:
No need just press the thanks button dude
SQL or probably nosql if you plan for expansion in near future
for SQL you can have a table with a column time
TIME
POST ** contents of post
LIKES **list of users who liked this post
similary for COMMENTS and stuff
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
So great, I can save everything in a external database and then transfer the datas with JSON to Android. I will start with SQL first, (I have no idea where to start with nosql).
But the problem now is: how can I keep the posts updated in real time on Android app?

ubun09 said:
So great, I can save everything in a external database and then transfer the datas with JSON to Android. I will start with SQL first, (I have no idea where to start with nosql).
But the problem now is: how can I keep the posts updated in real time on Android app?
Click to expand...
Click to collapse
you can use the GCM
google cloud messag**** dont know exactly
it can send push notifications to your app so that it can sync with server to fetch data
Edit
Its Google Cloud Messaging
Sent from my GT-S5302 using Tapatalk 2

sak-venom1997 said:
you can use the GCM
google cloud messag**** dont know exactly
it can send push notifications to your app so that it can sync with server to fetch data
Edit
Its Google Cloud Messaging
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
So basically you suggest me to: create a database SQL with the table of the posts, then use GCM for display all the datas on the app via web service (php), right?

If you need a server to handle GCM, have a look at Google app engine: https://developers.google.com/appengine/docs/whatisgoogleappengine
If it's not about hundreds of thousands of users, the free plans should be enough for what you want to do.

Thank you! I will give a look at that ;D
Sent from my Nexus 7 using xda app-developers app

Related

[Q] Are multi user logins possible on honeycomb?

I was thinking how great it would be to have home and work logins for different gmail accounts, apps, voice, etc. Even others such as one for my daughter, wife, guests? Does this exist and did I miss it in my search results?
Thanks in advance! Don't be too harsh if its a boneheaded question.
It don't exist but I agree it would be awesome.
Maybe someday... Google wink*wink*
Sent from my Xoom using XDA App
yeah it would be a nice feature but adds a lot of complexity to the OS and also to App purchases.
I know right now LG and VMware are working on a project together where you can basically run a virtual machine on your android device. I think this is due out later this year as they had a demo in December. So, once it is available for the LG, I am sure some smart people will port it over.
Sent from my Xoom using XDA Premium App
Inphinitizeit said:
yeah it would be a nice feature but adds a lot of complexity to the OS and also to App purchases.
Click to expand...
Click to collapse
I don't see why, except to the os. But it would still be the same UDID so the apps would stay on the phone.
It would just basically make different folders that would save the shorcuts for the homesceeen and allow you to save specific files and settings for different accounts.
Think of windows.
User settings
C\Users
And apps and drm protection settings
C:\Program Files
Apps would be fine, but it would take up space. I don't exactly know the specifics of designing it into an os.
Sent from my Xoom using XDA App
Honeycomb does support multiple logins for apps like gmail, calendar, and contacts. My wife and I currently have both our google accounts on the Xoom and it works great. There is just a drop down up in the top right corner where you can select between the account. Hope this helps.
Sent from my Xoom using XDA App
i"d love this, as my wife could have a diff set of shortcuts on her homescreen, Smartkeyboard as her default input device, and the locale set to Japan.
Anyone who pulled this off would get a purchase from me hands down.
I wish there is the same for Facebook app
Nvious1 said:
Honeycomb does support multiple logins for apps like gmail, calendar, and contacts. My wife and I currently have both our google accounts on the Xoom and it works great. There is just a drop down up in the top right corner where you can select between the account. Hope this helps.
Sent from my Xoom using XDA App
Click to expand...
Click to collapse
well it looks like interest is there. I too was thinking along the widows users folders. Ive always maintained a device between work and homed on my laptops. Different wallpaper, bookmarks, personal email seperate from business. So my daughter can plant pokemon bookmarks and youtube links on the home account. Or not email someone on my business emai account.
Yeah, I'm currently trying to navigate a screen for my work, a screen for my girlfriend, and the rest just w/e. I hate the one all the way to the right as my work. Luckily my work uses an @att e-mail address, and i use firefox only for work which helps me keep my bookmarks seperate.
It would be awesome to have specific files for different users, but for now, this will have to work.
Please star this for me.
http://code.google.com/p/android/issues/detail?id=15030
I put it up a few days ago. Stars == attention
multi profiles would be a good start?
Something like firefox profiles where one could login an sync to their gmail account bookmarks, etc. Could be a start from the last post? Now if only I were talented enough to code! I'm glad to see I'm not all nuts with the idea.
found iOS has a hacked feature like this
http://vr-zone.com/articles/ios-hack-brings-multi-user-support-to-apple-s-ipad/13005.html
login SwiftKey Facebook url

App request! Share to email

I find myself looking at various things on my phone from webpages and feed apps like deck buzz and I find myself instead of reading an article, I share to facebook so I can read later.
I don't really want to post everything I want to read to facebook so I had an idea for an app that others might find useful. I would pay for this app if it were available.
Here is the app
The app should have an entry in Android's share menu and what it will do is collect anything that I share with it and hold onto the links. After a selectable period of time, say at the end of the day or the end of the week, it will send me an email with all the collected links so I can go through them when I want to and view the links.
Thanks
K9 mail allows sharing
Sent from my GT-I9000 using XDA App
weirder said:
K9 mail allows sharing
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Hey, it helps to read the contents of the thread and not just the topic title. But thanks for your reply anyway.
Phone 2 Chrome + Drop Box + a Chrome extension will get you pretty close. Doesn't share via email it shares the link via your Drop Box account.
this could be something:
https://market.android.com/details?id=com.ideashower.readitlater.pro&feature=search_result

A friendly FYI for the new ridiculous Facebook app permissions

Just in case you guys don't check permissions when you update apps, or if you just have your apps set to automatically update, you should be made aware of Facebook app permission changes.
Any version AFTER 1.5.4 now has these permissions:
send SMS messages
Allows application to send SMS messages. Malicious applications may cost you money by sending messages without your confirmation.
receive SMS
Allows application to receive and process SMS messages. Malicious applications may monitor your messages or delete them without showing them to you.
read SMS or MMS
Allows application to read SMS messages stored on your device or SIM card. Malicious applications may read your confidential messages.
edit SMS or MMS
Allows application to write to SMS messages stored on your device or SIM card. Malicious applications may delete your messages.
Source click permissions tab.
For those interested I have provided the Facebook 1.5.4 apk which doesn't have these ridiculous permissions.
Go Google +!
Seriously.
That's ridiculous...
Thanks for the heads up
Sent from my PC36100 using XDA Premium App
Thanks Matt
Sent from my Nexus S 4G using XDA Premium App
Thanks for the fyi. Just a minor point of clarification, I don't believe auto-updates occur on the market when apps change their permissions. It will prompt for a manual update instead.
Sent from my PC36100 using XDA App
WTH does facebook need permission to access text messages for? Look up the Permissions Denied app on the market, it can let you pick and choose what permissions to give an app.
augy said:
Thanks for the fyi. Just a minor point of clarification, I don't believe auto-updates occur on the market when apps change their permissions. It will prompt for a manual update instead.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
I believe you're correct.
Too many people don't think to check new permissions before installing.
Of course, why would you expect an app like this to want this kind of permission?
xHausx said:
WTH does facebook need permission to access text messages for? Look up the Permissions Denied app on the market, it can let you pick and choose what permissions to give an app.
Click to expand...
Click to collapse
I have no freakin' clue but it's really ridiculous.
You'd think Engadget would be pointing this out as another reason Apple is superior.
Permissions denied direct link for anyone interested.
mattykinsx said:
I believe you're correct.
Too many people don't think to check new permissions before installing.
Of course, why would you expect an app like this to want this kind of permission?
I have no freakin' clue but it's really ridiculous.
You'd think Engadget would be pointing this out as another reason Apple is superior.
Permissions denied direct link for anyone interested.
Click to expand...
Click to collapse
I'm guilty of being one of them who doesn't check permissions, but now that I read this, I surely will for now on, thanks Matt!
Sent from my EVO using Tapatalk
So, an app that includes a function that allows you to send messages to people on your friends list shouldn't have permission to access messaging???
Hmmmm
HipKat said:
So, an app that includes a function that allows you to send messages to people on your friends list shouldn't have permission to access messaging???
Hmmmm
Click to expand...
Click to collapse
???
How does that make any sense?
Because you can send messages on the Facebook messaging system it should be able to read, edit and even send text and picture mail?
Um, no.
Its the same thing as if the AIM app wanted the same rights.
AIM messaging has nothing to do with my texts.
These are two different types of messaging systems and there's no excuse nor any good reason that this app should be able to send receive or even read my texts/pictexts.
Furthermore, we've been able to use the chat program previous to 1.5.4 and yet back then the app didn't want those permissions.
Gochat doesn't want those permissions.
No excuse.
Fred makes a cracking post on facebook, I want to send it to Jeff, but he's a Luddite who doesn't want anything to do with facebook, but he has a mobile phone, so I forward the post to him via SMS, which of course the facebook app will need access to in order to forward the post.
Jeff then texts me an awesome reply that I want to share with everyone on facebook, so I publish the sms through the facebook app, which again will need permission to access my sms in order to read it and post it online for me.
Does that make sense?
xaccers said:
Fred makes a cracking post on facebook, I want to send it to Jeff, but he's a Luddite who doesn't want anything to do with facebook, but he has a mobile phone, so I forward the post to him via SMS, which of course the facebook app will need access to in order to forward the post.
Jeff then texts me an awesome reply that I want to share with everyone on facebook, so I publish the sms through the facebook app, which again will need permission to access my sms in order to read it and post it online for me.
Does that make sense?
Click to expand...
Click to collapse
I can share things between apps just fine without them having the ability to read my texts/pictexts and having the ability to send them.
In fact, I can share something via the Tapatalk app on Facebook....yet... Tapatalk doesn't need access to my Facebook password.
I can even share something on Tapatalk via text message.
Yet....Tapatalk doesn't need access to my texts.
Sorry, not a viable reason.
xaccers said:
Fred makes a cracking post on facebook, I want to send it to Jeff, but he's a Luddite who doesn't want anything to do with facebook, but he has a mobile phone, so I forward the post to him via SMS, which of course the facebook app will need access to in order to forward the post.
Jeff then texts me an awesome reply that I want to share with everyone on facebook, so I publish the sms through the facebook app, which again will need permission to access my sms in order to read it and post it online for me.
Does that make sense?
Click to expand...
Click to collapse
Is this function inside the facebook app? There must be some reason why facebook would declare such a permission I believe it won't have any ill intentions tho.
mattykinsx said:
Just in case you guys don't check permissions when you update apps, or if you just have your apps set to automatically update, you should be made aware of Facebook app permission changes.
Any version AFTER 1.5.4 now has these permissions:
send SMS messages
Allows application to send SMS messages. Malicious applications may cost you money by sending messages without your confirmation.
receive SMS
Allows application to receive and process SMS messages. Malicious applications may monitor your messages or delete them without showing them to you.
read SMS or MMS
Allows application to read SMS messages stored on your device or SIM card. Malicious applications may read your confidential messages.
edit SMS or MMS
Allows application to write to SMS messages stored on your device or SIM card. Malicious applications may delete your messages.
Source click permissions tab.
For those interested I have provided the Facebook 1.5.4 apk which doesn't have these ridiculous permissions.
Go Google +!
Seriously.
Click to expand...
Click to collapse
Cm7 lets you revoke permissions. Good catch!
mattykinsx said:
I can share things between apps just fine without them having the ability to read my texts/pictexts and having the ability to send them.
In fact, I can share something via the Tapatalk app on Facebook....yet... Tapatalk doesn't need access to my Facebook password.
I can even share something on Tapatalk via text message.
Yet....Tapatalk doesn't need access to my texts.
Sorry, not a viable reason.
Click to expand...
Click to collapse
Not used tapatalk myself.
So if I were to send you a text message, you could publish that on FB without logging in?
xaccers said:
Not used tapatalk myself.
So if I were to send you a text message, you could publish that on FB without logging in?
Click to expand...
Click to collapse
Of course I have to be logged into Facebook via the app or mobile browser but, and this is the point, my SMS app doesn't need my facebook password to do it
Furthermore, I've never even heard or seen ANY functionality you're speaking of.
So I'm not sure why you're trying to suggest it and why you're trying to justify this obvious breach of security.
Just another reason to be done with Facebook and migrate to Google plus
Sent from my PC36100 using Tapatalk
thlinx said:
Just another reason to be done with Facebook and migrate to Google plus
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
not even 10% of my friends list will ever use Google+ seriously. g+ is for geeking with people you hardly know, fb is for communication with real friends.
detusueno said:
not even 10% of my friends list will ever use Google+ seriously. g+ is for geeking with people you hardly know, fb is for communication with real friends.
Click to expand...
Click to collapse
Bull.
Maybe right now but it's already taking off.
Facebook started off like this too, only certain colleges could join then only college students now everyone.
I know some people that are far from "geeks" that are loving Google + more than Facebook.
Now, is it going to take a few years before Google + is a big as Facebook?
Sure, Facebook is 7 years old mind you.
But I have no doubt in it.
Google + is still in beta.
Furthermore wxyz channel 7 in Detroit has a Google +
mattykinsx said:
Of course I have to be logged into Facebook via the app or mobile browser but, and this is the point, my SMS app doesn't need my facebook password to do it
Furthermore, I've never even heard or seen ANY functionality you're speaking of.
So I'm not sure why you're trying to suggest it and why you're trying to justify this obvious breach of security.
Click to expand...
Click to collapse
Doing some digging it's probably for the same reason why angry birds had the permissions, in app carrier billing via sms.
Now I can't find any features within the app which would allow that, maybe it can be done via the website so if you make a purchase in a Facebook web app perhaps it will send a sms from your phone to make the payment.
So, rather than start some paranoid ramblings guessing at what it could all be about and how they're going to bankrupt everyone by sending premium rate text messages every second, I thought it'd be an idea to actually ask Facebook, so you never know, we might get an answer.
This may shed some light on the matter
http://www.bloomberg.com/news/2011-...ions-to-bring-credits-to-mobile-browsers.html

[Q] Stock Email app Combined View not Syncing

Hi Folks,
This is my first time on the XDA Developers forum so go easy on me, i've had a look around but cannot seem to find any posts with this problem.
I have a nexus 4 and have set up my 3 email accounts on the stock email app. The checking frequency is set to 'never' on each account as i only check my email once every day or so and don't want any unnecessary data usage.
So my issue is that if i load the app into combined view, so all my email accounts show on the same screen, there is no option to sync all 3 accounts at the same time, i have to click into each account individually for the sync process to start, then go back into combined view to see all 3 accounts email on the one screen. I'm sure that can't be right as that seems to defeat the object of having the combined view if i have to click into each account to start the sync, i might as well view the accounts individually. I'm sure that on my old HTC One X on the HTC Mail app as soon as i launched the app the sync process started for all the accounts on the phone.
I have tried turning auto sync on in the 'data usage' menu but it doesn't make any difference.
Any suggestions?
Thanks in advance
The thread subject is kind of misleading which makes it look like a bug but anyway.
This is normal and not really a bug at all what so ever, you can use a 3rd party app from the Play Store to do the job.
Sent from my Nexus 4 using Tapatalk 4
andyabc said:
The thread subject is kind of misleading which makes it look like a bug but anyway.
This is normal and not really a bug at all what so ever, you can use a 3rd party app from the Play Store to do the job.
Sent from my Nexus 4 using Tapatalk 4
Click to expand...
Click to collapse
thanks for the speedy response. apologies if you think the title is misleading, not my intention. i can't see why the feature i'm looking for wasn't included there on the app, but hey ho. thanks again, i'll go search the play store
ianoel said:
thanks for the speedy response. apologies if you think the title is misleading, not my intention. i can't see why the feature i'm looking for wasn't included there on the app, but hey ho. thanks again, i'll go search the play store
Click to expand...
Click to collapse
6 Minutes late but hey, I was doing something.
Sent from my Nexus 4 using Tapatalk 4

Help in Galaxy S apps

Good Morning
I'm newbie with android systems and im new here in your website, i have Galaxy S4 and i want to ask the most popular application that i must have
also i want to ask how can i backup my contacts and save them to my email or in my PC.
thanx in advance
Nokia N93 said:
Good Morning
I'm newbie with android systems and im new here in your website, i have Galaxy S4 and i want to ask the most popular application that i must have
also i want to ask how can i backup my contacts and save them to my email or in my PC.
thanx in advance
Click to expand...
Click to collapse
Welcome to Android and XDA. :good: Don't forget to glance over the forum rules and always check out the stickies posted in each forum section (they have a thumbtack image next to them and never move from the top section). They contain valuable info for newcomers.
Both your questions are really all about personal preference. No single app's importance is the same to everyone. My advice to you being new to Android and all is to go into Google Play Store and just browse the list of top paid and free apps. This will give you a good idea of what a majority of users are downloading and using the most. Likely there will be numerous apps in there you will find beneficial. Remember one thing though, rooted users have more app options than non-rooted so just keep that in mind. Some apps require root access and will state that in the description. Once you use your device a bit more you will get a feel for what type of tasks you do most often and what apps might make the experience better.
As for contacts, there are different options for this. I would say since most have a Gmail account to access the Play Store, get email, etc. they will use Gmail to auto backup/restore contacts, calendar, tasks between the cloud and the device. I believe Samsung also will back this up for you which, if you have a Samsung account, is native on the S4 already. To give more direction would have to know what you are using on your PC for mail client, how you are using it, etc.
Favorite app is drop box
For backing up I do this. Open contacts> hit menu> hit import/export> then pick any of the export functions.
When restoring for the last step just use the corresponding import function.
Sent from my SPH-L720 using XDA Premium 4 mobile app

Categories

Resources