Attach to GPRS Service
-> AT+CGATT = 1
<- OK
Define PDP Context (cid, PDP type, APN)
-> AT+CGDCONT=1,"IP","zap.vivo.com.br"
cd | |
sudo apt-get install unzip | |
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
unzip sdk-tools-linux-4333796.zip -d Android | |
rm sdk-tools-linux-4333796.zip | |
sudo apt-get install -y lib32z1 openjdk-8-jdk | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
export PATH=$PATH:$JAVA_HOME/bin | |
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc | |
cd Android/tools/bin |
#!/bin/bash | |
# Download and build libcurl, openssl and zlib for Android using Crystax NDK r7 | |
# Must be run on 32 bit Linux as the Crystax r7 NDK doesn't support 64 bit hosts | |
# Tested on Ubuntu 14.04 | |
# Make the working directory | |
mkdir curl-android-build | |
cd curl-android-build | |
ROOT_DIR=`pwd -P` |
# ======================================================== | |
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE | |
# ======================================================== | |
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces) | |
uci set network.lan.type='bridge' | |
# assign WAN physical interface to LAN (will be available as an additional LAN port now) | |
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)" | |
uci del network.wan.ifname | |
# Remove wan logical interface, since we will not need it. | |
uci del network.wan |
# | |
# Copyright (C) 2014 - 2018 OpenWrt.org | |
# | |
# This is free software, licensed under the GNU General Public License v2. | |
# See /LICENSE for more information. | |
# | |
# make package/feeds/telephony/amfeltec_usb/compile -j1 V=s | |
# | |
# Patch downloaded sources: | |
# Makefile - |
<?php | |
if( ! function_exists( 'current_user_on_membership' ) ) { | |
function current_user_on_membership( $membership_id ) { | |
$member = MS_Model_Member::get_current_member(); | |
$membership_items = $member->get_membership_ids(); | |
if( in_array( $membership_id, $membership_items ) ) { | |
return true; | |
} | |
return false; |
// app module build.gradle | |
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion rootProject.compileSdkVersion | |
buildToolsVersion rootProject.buildToolsVersion | |
defaultConfig { | |
applicationId "com.segunfamisa.gradleextraproperties" | |
minSdkVersion rootProject.minSdkVersion | |
targetSdkVersion rootProject.targetSdkVersion |
#!/usr/bin/python | |
# | |
# | |
# Copyright (C) 2003-2008 Benny Prijono <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# |
<?php | |
Schema::create('users' , function($table) | |
{ | |
$table->increments('id'); Incrementing ID to the table (primary key). | |
$table->string('email'); VARCHAR equivalent column | |
$table->string('name', 100); VARCHAR equivalent with a length | |
$table->integer('votes'); INTEGER equivalent to the table |
import org.eclipse.paho.client.mqttv3.MqttCallback; | |
import org.eclipse.paho.client.mqttv3.MqttClient; | |
import org.eclipse.paho.client.mqttv3.MqttConnectOptions; | |
import org.eclipse.paho.client.mqttv3.MqttDeliveryToken; | |
import org.eclipse.paho.client.mqttv3.MqttException; | |
import org.eclipse.paho.client.mqttv3.MqttMessage; | |
import org.eclipse.paho.client.mqttv3.MqttTopic; | |
public class SimpleMqttClient implements MqttCallback { |