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 androidx.annotation.NonNull | |
import io.flutter.embedding.android.FlutterActivity | |
import io.flutter.embedding.engine.FlutterEngine | |
import io.flutter.plugin.common.MethodChannel | |
class MainActivity: FlutterActivity() { | |
private val CHANNEL = "samples.flutter.dev/battery" | |
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { | |
super.configureFlutterEngine(flutterEngine) |
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
class _MyHomePageState extends State<MyHomePage> { | |
List<Language> _languages = List(); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text("Linguagens"), | |
), | |
body: Column( |
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
... | |
class _MyHomePageState extends State<MyHomePage> { | |
var smsList = []; | |
static const subscriber = const MethodChannel('flutter.native/sms_receiver'); | |
_MyHomePageState() { | |
subscriber.setMethodCallHandler(myHandler); | |
} |
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
package study.com.flutter_receiver_twilo | |
class MainActivity: FlutterActivity(), SmsListener { | |
val receiver: IncomingSmsBroadcastReceiver = IncomingSmsBroadcastReceiver() | |
val CHANNEL = "flutter.native/sms_receiver" | |
override fun onCreate(savedInstanceState: Bundle?) { | |
... |
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
package study.com.flutter_receiver_twilo | |
import android.content.BroadcastReceiver | |
import android.content.Context | |
import android.content.Intent | |
import android.content.IntentFilter | |
import android.os.Bundle | |
import android.telephony.SmsMessage | |
import io.flutter.app.FlutterActivity |
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
var five = require("johnny-five"); | |
var board = new five.Board(); | |
const client = require('twilio')( | |
"AC6491..........", | |
"d975f..........."); | |
board.on("ready", function() { | |
var button = new five.Button(8); |
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
var five = require("johnny-five"); | |
var board = new five.Board(); | |
const client = require('twilio')( | |
"AC64914..............", | |
"d975fb8.............."); | |
board.on("ready", function() { | |
var button = new five.Button(8); |
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 'package:flutter/material.dart'; | |
import 'package:flutter_app_fcm/firebase_notification_handler.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { … } | |
class MyHomePage extends StatefulWidget { … } | |
class _MyHomePageState extends State<MyHomePage> { |
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
… | |
dependencies: | |
flutter: | |
sdk: flutter | |
# The following adds the Cupertino Icons font to your application. | |
# Use with the CupertinoIcons class for iOS style icons. | |
cupertino_icons: ^0.1.2 | |
firebase_messaging: ^5.1.2 |
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
$.ajax({ | |
type : 'POST', | |
url : "https://fcm.googleapis.com/fcm/send", | |
headers : { | |
Authorization : 'key=AAAAqnHvu1w...' | |
}, | |
contentType : 'application/json', | |
dataType: 'json', | |
data: JSON.stringify({ | |
"data": { |
NewerOlder