-
-
Save uno-de-piera/733e8ff27157f9d7aad42430d3c4f1ce to your computer and use it in GitHub Desktop.
This file contains 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 { Injectable } from '@angular/core'; | |
import { Diagnostic } from '@ionic-native/diagnostic'; | |
@Injectable() | |
export class CheckHardwareProvider { | |
/** | |
* @param diagnostic | |
*/ | |
constructor( | |
private diagnostic: Diagnostic | |
) { | |
console.log('Hello CheckHardware Provider'); | |
} | |
public stateWifi() { | |
this.diagnostic.isWifiAvailable().then(available => { | |
if( ! available ) { | |
this.diagnostic.switchToWifiSettings(); | |
} | |
}, | |
error => { | |
alert(JSON.stringify(error)); | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment