Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radhika #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<<<<<<< HEAD
# sp17proj4android

Repository for Spring 2017 MDB Android Training Program Mini-Project 4 Submissions
=======
# sp17proj3android

Repository for Spring 2017 MDB Android Training Program Mini-Project 3 Submissions
>>>>>>> 187c53ccbdd8774efc914e15bf86a3d139b594e2

Finalized mini-projects should be stored in personal portfolios, but this repository will be used for providing feedback on code quality using the GitHub code review features.

Expand Down
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
40 changes: 40 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.radhika.mdbsocials"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.google.firebase:firebase-storage:10.2.0'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta5'
compile 'com.android.support:design:25.1.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.github.bumptech.glide:glide:3.5.2'

}

apply plugin: 'com.google.gms.google-services'
55 changes: 55 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"project_info": {
"project_number": "1098638014968",
"firebase_url": "https://mdbsocials-7d774.firebaseio.com",
"project_id": "mdbsocials-7d774",
"storage_bucket": "mdbsocials-7d774.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1098638014968:android:472de4f8bae7c6b4",
"android_client_info": {
"package_name": "com.example.radhika.mdbsocials"
}
},
"oauth_client": [
{
"client_id": "1098638014968-73o689qtkm87ahqbhdtrun9a8lrrov1c.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.radhika.mdbsocials",
"certificate_hash": "7aa5a0c7eb2c732903199f2d698b9aec693da1e5"
}
},
{
"client_id": "1098638014968-8tco8eph6khenj3mii08hjc4c9kjmcb9.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCe2zSt4b-jlxvvRcSZcq-_HN4iBe37_tU"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "1098638014968-8tco8eph6khenj3mii08hjc4c9kjmcb9.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/Radhika/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.example.radhika.mdbsocials;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.example.radhika.mdbsocials", appContext.getPackageName());
}
}
30 changes: 30 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.radhika.mdbsocials">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".SignInActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SignUpActivity" />
<activity android:name=".SocialFeedActivity" />
<activity
android:name=".SocialDetailsActivity"
android:label="@string/title_activity_social_details"
/>
<activity android:name=".NewSocialActivity" />
<activity android:name=".InterestedFeedActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package com.example.radhika.mdbsocials;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;

import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import java.util.ArrayList;
import java.util.List;

/**
*
* TO DO :
* 1. add profile image
* 2. add take picture function
* 3. fix recycler view problem - when you cmark interested, adds new row - click on that row and CRASH
* 4. improve UI
* 5. Perform checks for all input taken!!!!!!! especially in signup
*
*/

public class InterestedFeedActivity extends AppCompatActivity {
InterestedFeedAdapter adapter;
DatabaseReference db;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_interested_feed);
init();
}
public void init () {
RecyclerView recyclerView = (RecyclerView) (findViewById(R.id.rv));
recyclerView.setLayoutManager(new LinearLayoutManager(this));

final List<User> interested = new ArrayList<>();

// Get the ID of the event from the Intent used to start the InterestedActivity
String key = getIntent().getStringExtra("Social Key");

db = FirebaseDatabase.getInstance().getReference();
db = db.child("Socials").child(key);
adapter = new InterestedFeedAdapter(getApplicationContext(), interested);
recyclerView.setAdapter(adapter);
db.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot snapshot) {
Social s = snapshot.getValue(Social.class);
adapter.interested = s.getInterested();
adapter.notifyDataSetChanged();
}

@Override
public void onCancelled(DatabaseError firebaseError) {}
});

}
}
Loading