Skip to content

Instantly share code, notes, and snippets.

@acidjazz
Created February 14, 2013 04:12
Show Gist options
  • Save acidjazz/4950559 to your computer and use it in GitHub Desktop.
Save acidjazz/4950559 to your computer and use it in GitHub Desktop.
package com.rosetta.sms_sxsw;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import org.apache.cordova.*;
import android.telephony.TelephonyManager;
public class sms_sxsw extends DroidGap
{
private static String imei;
private static String refer;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Set by <content src="index.html" /> in config.xml
super.loadUrl(Config.getStartUrl());
//super.loadUrl("file:///android_asset/www/index.html")
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
imei = tm.getDeviceId();
super.loadUrl("javascript:window.IMEI=\"" + imei + "\";");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment