hello everyone. 
I started to build my app, I've done an image upload function and its working well. every time I upload the image get saved in firstbase storage. but I wanna save the picture details in the database (ID, Like = set to 0 ) so I wrote up this code and it doesn't work. 

thats the image class : http://prntscr.com/lf38ru 
main code below 
public class StarRateUploadImageActivity extends AppCompatActivity {

    private Button buploadimagetoserver ;
    private ImageButton ibUploadimage ;
    Uri imageUri ;
    private final  int PICK_IMAGE_REQUEST = 71;
    private FirebaseStorage storage ;
    private StorageReference storageReference ;
    private DatabaseReference databasePicture ;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_star_rate_upload_image);
        databasePicture=FirebaseDatabase.getInstance().getReference("Image");
        storage = FirebaseStorage.getInstance() ;
        storageReference = storage.getReference() ;
      buploadimagetoserver = (Button) findViewById(R.id.buploadimagetoserver) ;
      ibUploadimage = (ImageButton) findViewById(R.id.ibUploadimage);
      ibUploadimage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PickPictureGallery() ;
            }
        });
        buploadimagetoserver.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                uploadfile() ;
            }
        });
    }
    private void uploadfile()
    {
    if (imageUri != null)
    {
        final String id = databasePicture.push().getKey();
        StorageReference ref = storageReference.child("images/"+id) ;
        ref.putFile(imageUri)
                .addOnSuccessListener(new OnSuccessListener() {
                    @Override
                    public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                        Toast.makeText(StarRateUploadImageActivity.this,"upload" , Toast.LENGTH_SHORT).show();
                        Picture picture = new Picture(id);
                        databasePicture.child(id).setValue(picture);
                        Toast.makeText(StarRateUploadImageActivity.this,"Picture Uploaded" , Toast.LENGTH_SHORT).show();
                        Intent noder = new Intent(StarRateUploadImageActivity.this,MainGameActivity.class) ;
                        StarRateUploadImageActivity.this.startActivity(noder);
                    }
                })
                .addOnFailureListener(new OnFailureListener() {
                    @Override
                    public void onFailure(@NonNull Exception e) {
                        Toast.makeText(StarRateUploadImageActivity.this,"Failed"+e.getMessage() , Toast.LENGTH_SHORT).show();
                    }
                });


    }
    else {
        Toast.makeText(this,"no file selected" , Toast.LENGTH_SHORT).show();
    }
    }

    private void PickPictureGallery() {
        Intent gallery = new Intent(Intent.ACTION_PICK,MediaStore.Images.Media.INTERNAL_CONTENT_URI);
        startActivityForResult(gallery,PICK_IMAGE_REQUEST);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode==RESULT_OK && requestCode==PICK_IMAGE_REQUEST&&data!=null&&data.getData()!=null)
        {
            imageUri = data.getData() ;
            ibUploadimage.setImageURI(imageUri);
        }
    }

code result : 
https://gyazo.com/5f5a283e85256f4d7b9ded0fe6b8366f
as you can see image is stored in the storage  http://prntscr.com/lf37u9
but there is nothing in the data base . 
http://prntscr.com/lf3876
data base rules  : 
http://prntscr.com/lf38bg 
my plan : after the image gets uploaded i want to make a object inside the database under the folder picture that will contain the picture with ditals (id,likes) 
after the image gets uploaded into the storage i want it to make a 
ty alot !