Ejemplo n.º 1
0
        async void GetInvoices()
        {
            user = database.FindUser(dbpath);
            //user.Id = "beacc222da5086d625ed5e8515eba3c7";
            //user.Name = "Juan Gómez";
            //user.DocumentId = "1037002002";
            //user.DocumentType = "CC";
            //user.Password = "******";
            //user.AccountNumber = "17232144607";
            //user.AccountType = "SAVING";
            //user.AccountName = "Nómina";
            //user.Username = "******";

            invoicesResult = await apiService.Get <InvoiceModel>("https://api.us.apiconnect.ibmcloud.com/",
                                                                 "/playgroundbluemix-dev/hackathon/api/", "invoices", user.Username, user.PassUser);

            invoices = (List <InvoiceModel>)invoicesResult.Result;
            invoiceListView.Adapter = new InvoiceListItemAdapter(this, invoices);
            tts = new TextToSpeech(this, this);



            //await database.insertUpdateData(user, dbpath);
            //user = database.FindUser(dbpath);
            //Toast.MakeText(this, response.Name, ToastLength.Long);
        }
Ejemplo n.º 2
0
        async void LoadUserAccount()
        {
            userDb     = database.FindUser(dbpath);
            title.Text = "Cuentas de " + userDb.Name;
            response   = await apiService.Get <Account>("https://api.us.apiconnect.ibmcloud.com/",
                                                        "/playgroundbluemix-dev/hackathon/api/", "accounts", userDb.Username, userDb.PassUser);

            accountList             = (List <Account>)response.Result;
            accountListView.Adapter = new AccountListAdapter(this, accountList);
            Talk();
        }
Ejemplo n.º 3
0
        public async void Speech()
        {
            // Consultamos el nombre de la DB
            var    response = database.FindUser(dbpath);
            string userName = response.Name;

            // Saludamos al usuario
            string[] speaks = { " ", "Hola" + userName + ", Bienvenido ha tu Asistente de Pagos", "tienes facturas pendientes por pagar", "¿Quieres consultarlas?" };

            for (var i = 0; i < speaks.Length; i++)
            {
                Speak(speaks[i]);
            }
            Listen();
        }
Ejemplo n.º 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            System.Threading.Thread.Sleep(2000); //Let's wait awhile...

            database = new SqLiteHelper();
            dbpath   = System.IO.Path.Combine(
                System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "ormdemo.db3");
            database.createDatabase(dbpath);
            user = database.FindUser(dbpath);

            if (user != null)
            {
                this.StartActivity(typeof(LoginVoice));
            }
            else
            {
                this.StartActivity(typeof(LoginActivity));
            }
        }