ionic-framework

Reading from a Notify Characteristic (Ionic - Bluetooth)

点点圈 提交于 2019-12-25 08:59:54
问题 I am trying to connect to a glucose sensor using the default bluetooth profile 0x1808 . I have already connected to the device, discovered all services and characteristics but I can not read the Glucose Measurement 0x2A18 { "service":"1808", "characteristic":"2a18", "properties":["Notify"], "descriptors":[{ "uuid":"2902" }] }, { "service":"1808", "characteristic":"2a34", "properties":["Notify"], "descriptors":[{ "uuid":"2902" }] }, { "service":"1808", "characteristic":"2a51", "properties":[

How to maintain aspect ratio for Ionic cards

心已入冬 提交于 2019-12-25 08:56:18
问题 I have a list of cards displayed on my Ionic page and I want them to expand proportionally. Here's my code: HTML <ion-content class="home" padding> <ion-card class="event-item" *ngFor="let item of items"> <div [ngStyle]="{'background-image': 'url(' + item.img + ')'}" class="card-thumbnail"></div> <ion-card-content> <p [innerHTML]="item.excerpt"></p> </ion-card-content> </ion-card> </ion-content> SCSS .event-item { margin: 25px 10px; } .card-thumbnail { height: 18rem; background-size: cover;

Ionic 2 saving multiple calendar events

﹥>﹥吖頭↗ 提交于 2019-12-25 08:54:45
问题 I am currently experiencing a problem with my ionic calendar in that I am able to save input events in an array, retrieve the array and display the info on console. However I am unable to utilize the array and display the array in its original list. I am a noob at ionic:-) so any help will go a long way. Here is my code so far: //where data is received from a modal and received as(data) modal.onDidDismiss(data =>{ if (data){ let eventData=data; eventData.startTime= new Date(data.startTime);

Ionic, upload image or string to firebase not working on Android, but working in browser and iOS

假如想象 提交于 2019-12-25 08:50:01
问题 since about 3 days I am trying to upload an image to the firebase storage without success. I tried several approaches I found here in stackoverflow. It is even not possible to upload a simple string for Android. Running the app in the browser is working fine for images and strings. Emulator and phone returns the same error: Firebase Storage: An unknown error occurred, please check the error payload for server response. I don't know where should I check the mentioned "payload" This is my code

Showing a different tab with an if statement on Ionic 2

狂风中的少年 提交于 2019-12-25 08:49:43
问题 Ionic 2 seems very different from 1. I used the starter project and those are my files: Tabs.html <ion-tabs> <ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab> </ion-tabs> Tabs.ts import { Component } from '@angular/core'; import { SigninPage } from '../Auth/Signin/Signin'; @Component({ templateUrl: 'Tabs.html' }) export class TabsPage { tab1Root: any = SigninPage; constructor() { } } app.components.ts import { Component } from '@angular/core'; import { Platform } from

Adding an icon to the right of an Avatar - Ionic

怎甘沉沦 提交于 2019-12-25 08:49:41
问题 I'm looking ti add an icon to the right of an ionic avatar list item. My code: <ion-item class="animated flipInX item-divider gold" ng-show="(myArray.length > 0)">My Stuff</ion-item> <div ng-repeat="item in array"> <ion-list> <ion-item class="animated flipInX item-avatar" ng-click="showAcceptRequest(item)"> <img ng-src={{item['Picture']}}> <h2>{{item['SenderName']}}</h2> <p>{{item['EntityName']}}</p> </ion-item> </div> </ion-list> This shows an avatar picture with there name and some sub-info

understanding the ionic select

和自甴很熟 提交于 2019-12-25 08:45:41
问题 Im trying to use ionic list to display a set of cars, when the particular car is selected it should display a small description of it and also editable. Here Im unable to display the description of the item selected. Also please let me know how to edit the description and update it. link here this is the controller car.controller('popSelect', ['$scope','$ionicPopup', function ($scope, $ionicPopup) { $scope.homePage = function () { window.location = "#/menu.html" } $scope.carList = [{ value:

How to save image path in sqlite cordova

扶醉桌前 提交于 2019-12-25 08:37:33
问题 I want show the image taken from camera or chosen from gallery , after saving the image in filesystem then pushing the file image url into sqlite database successfully , I can't find a way to display it ,I tried the code below , it only insert the img path so far var db = null; angular.module('starter', ['ionic', 'ngCordova']) .run(function($ionicPlatform, $cordovaSQLite) { $ionicPlatform.ready(function() { try { db = $cordovaSQLite.openDB({ name: "my.db", location: 'default' });

Why navigator.onLine is inconsistent? Is there any reliable solutions?

岁酱吖の 提交于 2019-12-25 08:34:54
问题 I am facing an issue on connectivity check. Using navigator.onLine to test the same in my ionic app. Its pretty inconsistent across devices. Its a cross platform app. Is there any possible and reliable replacement for connectivity check? 回答1: If the browser supports navigator.onLine (typeof navigator.onLine === "boolean") the connectivity check is reliable. If the browser doesn't support navigator.onLine (typeof navigator.onLine !== "boolean") you need some kind of hack. One possible hack is

How to retrieve image's url from Firebase's storage?

落花浮王杯 提交于 2019-12-25 08:33:04
问题 I have this code straight from the documentation of Firebase : // Create a reference to the file we want to download var user = firebase.auth().currentUser.uid; var storageRef = firebase.storage(); var pathReference = storageRef.ref('/' + user + '/profilePicture/' + image.name); //var starsRef = storageRef.child('/' + user + '/profilePicture/' + file.name); // Get the download URL pathReference.getDownloadURL().then(function(url) { // Insert url into an <img> tag to "download" $scope.imageUrl