Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SEProject
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kishore Kumar
SEProject
Commits
16b9144b
Commit
16b9144b
authored
8 years ago
by
kishoreraju2
Browse files
Options
Downloads
Patches
Plain Diff
Woohoo Updated Everything except location
parent
e8d8a6d3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/com/mapps/seproject/ComposeFragment.java
+38
-1
38 additions, 1 deletion
app/src/main/java/com/mapps/seproject/ComposeFragment.java
with
38 additions
and
1 deletion
app/src/main/java/com/mapps/seproject/ComposeFragment.java
+
38
−
1
View file @
16b9144b
...
@@ -30,6 +30,7 @@ import android.widget.Toast;
...
@@ -30,6 +30,7 @@ import android.widget.Toast;
import
com.google.android.gms.tasks.OnFailureListener
;
import
com.google.android.gms.tasks.OnFailureListener
;
import
com.google.android.gms.tasks.OnSuccessListener
;
import
com.google.android.gms.tasks.OnSuccessListener
;
import
com.google.firebase.auth.FirebaseAuth
;
import
com.google.firebase.auth.FirebaseAuth
;
import
com.google.firebase.auth.FirebaseUser
;
import
com.google.firebase.database.DataSnapshot
;
import
com.google.firebase.database.DataSnapshot
;
import
com.google.firebase.database.DatabaseError
;
import
com.google.firebase.database.DatabaseError
;
import
com.google.firebase.database.DatabaseReference
;
import
com.google.firebase.database.DatabaseReference
;
...
@@ -53,13 +54,16 @@ import static android.app.Activity.RESULT_OK;
...
@@ -53,13 +54,16 @@ import static android.app.Activity.RESULT_OK;
public
class
ComposeFragment
extends
Fragment
implements
View
.
OnClickListener
{
public
class
ComposeFragment
extends
Fragment
implements
View
.
OnClickListener
{
int
flag
=
0
;
Button
bComposeMail
;
Button
bComposeMail
;
Spinner
dropdown
;
Spinner
dropdown
;
TextView
emailText
;
TextView
emailText
;
FirebaseAuth
firebaseAuth
=
FirebaseAuth
.
getInstance
();
FirebaseAuth
firebaseAuth
=
FirebaseAuth
.
getInstance
();
final
String
data
=
firebaseAuth
.
getCurrentUser
().
getEmail
();
final
String
data
=
firebaseAuth
.
getCurrentUser
().
getEmail
();
DatabaseReference
databaseReference
;
FirebaseUser
firebaseUser
;
String
UserEmail
=
null
;
String
UserEmail
=
null
;
private
Uri
imageUri
=
CameraFragment
.
images
;
private
Uri
imageUri
=
CameraFragment
.
images
;
...
@@ -69,6 +73,10 @@ public class ComposeFragment extends Fragment implements View.OnClickListener{
...
@@ -69,6 +73,10 @@ public class ComposeFragment extends Fragment implements View.OnClickListener{
Button
upload
;
Button
upload
;
//private static int RESULT_LOAD_IMAGE = 1;
//private static int RESULT_LOAD_IMAGE = 1;
String
UID
=
""
;
int
flag
=
0
;
int
flags
=
0
;
private
com
.
mapps
.
seproject
.
TrackGPS
gps
;
private
com
.
mapps
.
seproject
.
TrackGPS
gps
;
...
@@ -92,6 +100,11 @@ public class ComposeFragment extends Fragment implements View.OnClickListener{
...
@@ -92,6 +100,11 @@ public class ComposeFragment extends Fragment implements View.OnClickListener{
bComposeMail
=
(
Button
)
view
.
findViewById
(
R
.
id
.
bComposeMail
);
bComposeMail
=
(
Button
)
view
.
findViewById
(
R
.
id
.
bComposeMail
);
emailText
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
tvEmailMessage
);
emailText
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
tvEmailMessage
);
firebaseUser
=
firebaseAuth
.
getCurrentUser
();
UID
=
firebaseUser
.
getUid
();
databaseReference
=
FirebaseDatabase
.
getInstance
().
getReference
(
"feed"
);
...
@@ -168,6 +181,30 @@ public class ComposeFragment extends Fragment implements View.OnClickListener{
...
@@ -168,6 +181,30 @@ public class ComposeFragment extends Fragment implements View.OnClickListener{
});
});
databaseReference
.
addValueEventListener
(
new
ValueEventListener
()
{
@Override
public
void
onDataChange
(
DataSnapshot
dataSnapshot
)
{
if
(
flags
==
0
)
{
databaseReference
.
child
(
UID
).
child
(
"feed"
).
child
(
String
.
valueOf
(
MainActivity
.
individualIds
)).
child
(
"status"
).
setValue
(
mailText
);
databaseReference
.
child
(
"feed"
).
child
(
String
.
valueOf
(
MainActivity
.
ids
)).
child
(
"status"
).
setValue
(
mailText
);
flags
=
1
;
}
}
@Override
public
void
onCancelled
(
DatabaseError
databaseError
)
{
}
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment