This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void createNewMessage(String message) { | |
String chatId = getIntent().getStringExtra("channelId"); | |
String loggedInUserId = Preferences.get(context, Preferences.KEY_USER_ID); | |
String loggedInUserName = ""; // TODO : get user name | |
DatabaseReference reference = FirebaseDatabase | |
.getInstance() | |
.getReference("/chatMessages/" + chatId + "/messages"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'dart:ui' as ui; | |
void main() => runApp(StartPage()); | |
class StartPage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cheq.retail.ui.cheqsafe.subfragments | |
import android.app.Dialog | |
import android.content.Intent | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.activity.result.contract.ActivityResultContracts | |
import androidx.lifecycle.ViewModelProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.util.Log | |
import java.io.File | |
import java.io.FileInputStream | |
import java.io.FileOutputStream | |
private val TAG = DatabaseExporter::class.java.simpleName | |
object DatabaseExporter { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CrimeLab{ | |
public File getPhotoFile(Crime crime) { | |
File externalFilesDir = mContext.getExternalFilesDir(Environment.DIRECTORY_PICTURES); | |
if (externalFilesDir == null) { | |
return null; | |
} | |
return new File(externalFilesDir, crime.getPhotoFilename()); | |
} | |
} |