Giter VIP home page Giter VIP logo

socailnetworkandroidapp's Introduction

SocailNetworkAndroidApp

A social networking android application with backend on java and mysql.
The database and the scripts are uploaded on AWS EC2 Instance

Here is the download link to the app. Feel free to give any sort of feedbacks.
https://drive.google.com/open?id=1zwQ0FS6x_p_gRn5qTj6Hh9dqZ3yIpfym

The scripts are written in jsp and use apache tomcat server to run.

Project Explained

There are basic login and signup activities with client side validations.

After signing up there is a SelectProfilePicture activity.
All the images are stored in the firebase storage and the link to them is stored in the mysql database

And then there is this home activity which have three fragments with a tablayout with viewpager.
The three fragments are FeedFragment, FriendRequestsFragment and ProfileFragment.

You can upload new post with images or without them the FeedAdapter will handle it accordingly and diplay the feed.
While uplaodng the post you can select if you want or not to attach an image with it.

You can send friend request to different people.
And you can also search for users with the search option in action bar.

Ps : I am still working on it to make it better. Any forks are welcomed ^_^

socailnetworkandroidapp's People

Contributors

ashgarg143 avatar shivamvk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

socailnetworkandroidapp's Issues

Is the JAR file missing as I couldn't see the mysql-connectot-java.jar do we need one to connect to mysql database

I am totally new and I am a bit confused about the JAR file that every tutorial mentioned.
I can see you have a java class Constants that you inserted link to jsp files.
I have uploaded all these file to my ubuntu server where mysql installed, I have changed the mysql address from "jdbc:mysql://localhost/facebookandroid?user=root&password=test123" to mine example "jdbc:mysql://localhost/facebookandroid?user=root&password=mypassword" on every jsp but I am not able to connect or insert any data to my database, I have tested the register page to no availe, not sure where I am wrong, I am also sure the database called facebookandroid does exist and mysql is started and running, I also have user called root with password mypassword, after tested the file with android studio I get the actual jsp file code printed out on the screen as its an error toast , strange that I cant see any error in AS log, here is the image can you please help me or guide me where I am going wrong.

`<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" import="java.sql."%>
<%@page import="org.json.
" %>

<%
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/facebookandroid?user=root&password=adilimaam");
PreparedStatement statement = con.prepareStatement("select * from users where userEmail=?");
statement.setString(1, request.getParameter("userEmail"));
ResultSet rs = statement.executeQuery();
if(rs.next()){
response.getWriter().append("error");
} else {
PreparedStatement statement1 = con.prepareStatement("insert into users(userName,userEmail,userPassword) values(?,?,?)");
statement1.setString(1, request.getParameter("userName"));
statement1.setString(2, request.getParameter("userEmail"));
statement1.setString(3, request.getParameter("userPassword"));
statement1.executeUpdate();
response.getWriter().append("okay");
}
con.close();
%>

<%!
public static void convertResultSetIntoJSON(ResultSet resultSet, HttpServletResponse response) throws Exception {
JSONArray jsonArray = new JSONArray();
while (resultSet.next()) {
int total_rows = resultSet.getMetaData().getColumnCount();
JSONObject obj = new JSONObject();
for (int i = 0; i < total_rows; i++) {
String columnName = resultSet.getMetaData().getColumnLabel(i + 1).toLowerCase();
Object columnValue = resultSet.getObject(i + 1);
// if value in DB is null, then we set it to default value
if (columnValue == null){
columnValue = "null";
}
/*
Next if block is a hack. In case when in db we have values like price and price1 there's a bug in jdbc -
both this names are getting stored as price in ResulSet. Therefore when we store second column value,
we overwrite original value of price. To avoid that, i simply add 1 to be consistent with DB.
*/
if (obj.has(columnName)){
columnName += "1";
}
obj.put(columnName, columnValue);
}
jsonArray.put(obj);
}
response.getWriter().write(jsonArray.toString());
}
%>
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.