Skip to content

Instantly share code, notes, and snippets.

@komendantaa
komendantaa / ionic@3.2 [manual] PUSH.ts
Last active December 6, 2019 11:07
ionic push manual
===== INSTALLATION =====
Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add phonegap-plugin-push
$ npm install --save @ionic-native/push
*docs
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/
*tested versions:
"cordova-android": "7.1.1", (required > 7.1)
*docs
https://github.com/jeduan/cordova-plugin-facebook4
===== CREATE APP ======
https://developers.facebook.com
===== INSTALLATION =====
Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
$ npm install @ionic-native/facebook
@komendantaa
komendantaa / tslint.json
Created June 19, 2019 15:12
tslint config
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
@komendantaa
komendantaa / file-transfer.ts
Created March 8, 2019 18:56
ionic-imageSourcePopup
import { Injectable } from '@angular/core';
import { ActionSheetController, normalizeURL, Platform } from 'ionic-angular';
import { File, FileEntry, IFile } from '@ionic-native/file';
import { Crop } from '@ionic-native/crop';
import { Camera, CameraOptions } from '@ionic-native/camera';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { IOSFilePicker } from '@ionic-native/file-picker';
export interface ImageData {
imagePath: string;
@komendantaa
komendantaa / app.component.ts
Last active March 13, 2019 22:39
dirty hack ionic keyboard
window.addEventListener('native.keyboardshow', function () {
/*
* This code is a hack to fix the cursor issue.
*/
if (document.activeElement.nodeName === 'INPUT') {
setTimeout(function (){
document.activeElement.setAttribute('disabled', 'true');
setTimeout(function () {
document.activeElement.setAttribute('disabled', '');
}, 10);