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
<?php | |
header("content-type:application/json"); | |
mysql_connect("localhost","root",""); | |
mysql_select_db("database"); | |
$sql="select * from table"; | |
$data=array(); | |
$results=mysql_query($sql); | |
while($r=mysql_fetch_row($results)) | |
{ | |
$data[] = array("title"=>$r[1],"author"=>$r[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
import java.util.ArrayList; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
import android.widget.TextView; |
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
AsyncHttpClient client=new AsyncHttpClient(); | |
client.get(URL, new AsyncHttpResponseHandler() | |
{ | |
@Override | |
public void onSuccess(int arg0, Header[] arg1, byte[] response) { | |
String data =new String(response); | |
} | |
@Override |
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
public void onReceive(Context context, Intent intent){ | |
final SmsManager sms = SmsManager.getDefault(); | |
final Bundle bundle = intent.getExtras(); | |
try { | |
if (bundle != null) { | |
final Object[] pdusObj = (Object[]) bundle.get("pdus"); |
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 java.util.ArrayList; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
import java.util.UUID; | |
public class Database extends SQLiteOpenHelper { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.walter.push" > | |
<!-- GCM Permissions - Start here --> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> | |
<permission |
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
try | |
{ | |
LocationListener listener=new LocationListener() { | |
@Override | |
public void onLocationChanged(Location location) { | |
double lat= location.getLatitude(); | |
double lon = location.getLongitude(); | |
double speed =location.getSpeed(); | |
//do something with this values | |
} |
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
public static void writeStringAsFile(final String fileContents, String fileName) { | |
Context context = App.instance.getApplicationContext(); | |
try { | |
FileWriter out = new FileWriter(new File(context.getFilesDir(), fileName)); | |
out.write(fileContents); | |
out.close(); | |
} catch (IOException e) { | |
Logger.logError(TAG, e); | |
} | |
} |
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
Go to google play store and login using the following credentials | |
https://play.google.com/apps/publish/ | |
Username:[email protected] | |
Password:chemistry@2010 | |
The publishing guide is on the youtube video below | |
https://www.youtube.com/watch?v=nHaep1HBIwM | |
You can do your own research on youtube for other videos |
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
final Bundle bundle = intent.getExtras(); | |
try { | |
if (bundle != null) | |
{ | |
final Object[] pdusObj = (Object[]) bundle.get("pdus"); | |
for (int i = 0; i < pdusObj.length; i++) | |
{ | |
SmsMessage currentMessage = SmsMessage.createFromPdu((byte[]) pdusObj[i]); | |
} // end for loop |
OlderNewer