text
stringlengths
3
1.18M
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
package andy.demo.location; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.Iterator; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.h...
package andy.demo.webservice; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.Activity; import android.os.Bundle; import android.view.View; import android...
package andy.demo.nfc; import android.app.Activity; import android.content.Intent; import android.nfc.NfcAdapter; import android.nfc.Tag; import android.nfc.tech.MifareClassic; import android.os.Bundle; import android.widget.TextView; import andy.demo.R; public class NFCMC extends Activity { NfcAdapter...
package andy.demo.getBootUp; import java.util.Date; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; public class BootUpReceiver extends BroadcastReceiver{ p...
package andy.demo.parseXML.sax.service; import java.util.ArrayList; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; import andy.demo.parseXML.sax.domain.Person; /** 解析过程示例: <?xml version="1.0" encoding="UTF-8"?> <persons> <person id="...
package andy.demo.parseXML.sax.service; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.Attributes; import org.xml.sa...
package andy.demo.parseXML.sax.domain; public class Person { private Integer id; private String personName; private String age; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getPersonName() { return personName; } public voi...
package andy.demo.parseXML.xml; import java.io.InputStream; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import android.test.AndroidTestCase; import android.util.Log; public class TestSAX extends AndroidTestCase { public void testParse() throws Throwable { try { ...
package andy.demo.parseXML.xml; import java.util.ArrayList; import java.util.List; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; /** * 继承DefaultHandler类 * 用于解析XML文档的解析类 * @author Administrator * * 2010-6-28 下午07:51:20 */ public cl...
package andy.demo.parseXML.xml; public class Person { private Integer id; private String name; private Short age; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.na...
package andy.demo.parseXML.xml; import android.app.Activity; public class XmlParseActivity extends Activity { }
package andy.demo.parseXML.pull; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import android.util.Xml; import andy.demo.parseXML.sax.domain.Person; public class PULLService { pub...
package andy.demo.parseXML.dom.service; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; imp...
package andy.demo.parseXML; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; import ...
package andy.demo.location; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.Iterator; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.h...
package andy.demo.slip.viewpager; import java.util.ArrayList; import java.util.List; import android.os.Bundle; import android.os.Parcelable; import android.annotation.SuppressLint; import android.app.Activity; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.util.Displa...
package andy.demo.slip.viewpager; import java.util.ArrayList; import java.util.List; import android.os.Bundle; import android.os.Parcelable; import android.annotation.SuppressLint; import android.app.Activity; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.util.Displa...
package andy.demo.multiThreadDownload; /** * 下载进度监听器 * * @author Wang Jialin * */ public interface DownloadProgressListener { /** * 下载进度监听方法,获取和处理下载点数据的大小 * * @param size * 数据大小 */ public void onDownloadSize(int size); }
package andy.demo.multiThreadDownload; import java.io.File; import java.io.InputStream; import java.io.RandomAccessFile; import java.net.HttpURLConnection; import java.net.URL; import android.util.Log; /** * 下载线程,根据具体下载地址、保持到的文件、下载块的大小、已经下载的数据大小等信息进 行下载 * * @author Wang Jialin * */ public clas...
package andy.demo.multiThreadDownload; import java.io.File; import android.app.Activity; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.Message; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.wid...
package andy.demo.multiThreadDownload; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; /** * SQLite管理器,实现创建数据库和表,但版本变化时实现对表的数据库表的操作 * @author think * */ public class DBOpenHelper extends SQLiteOpenHelper { ...
package andy.demo.multiThreadDownload; import java.util.HashMap; import java.util.Map; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; /** * 业务Bean,实现对数据的操作 * @author Wang Jialin * */ public class FileService { ...
package andy.demo.multiThreadDownload; import java.io.File; import java.io.RandomAccessFile; import java.net.HttpURLConnection; import java.net.URL; import java.util.LinkedHashMap; import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Matcher; imp...
package andy.demo.utils; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class IOUtil { public static InputStream String2InputStream(String str){ ByteArrayInputStream stream = new Byt...
package andy.demo.SMSBlocker; import java.util.Iterator; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.telephony.SmsManager; import android.telephony.SmsMessage; import android.util.Log; /** * 拦截短信 * @author AndyBoyce * */ ...
package andy.demo.pinyin; import java.io.UnsupportedEncodingException; import net.sourceforge.pinyin4j.PinyinHelper; import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; import ne...
package andy.demo.notification; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Vie...
package andy.demo.json; public class User { private String userName; private int age; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public int getAge() { return age; } public void setAge(int age) { this.age = a...
package andy.demo.json; import java.io.IOException; import java.io.StringReader; import java.lang.reflect.Type; import java.util.Iterator; import java.util.LinkedList; import com.google.gson.stream.JsonReader; public class JsonUtils { public static String single_jsonData = "{\"name\":\"lucy\",\"age\"2...
package andy.demo.json; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; import andy.demo.R; public class MainActivity extends Activity implements OnClickListener { priva...
package andy.demo.net.networkinfo; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.widget.Toast; public class NetworkReceiver extends BroadcastReceiver { private...
package andy.demo.viewviewgroup; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Rect; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; import android.view.View; import androi...
package andy.demo.telinfo; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import android.app.Activity; import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context; import android.net.ConnectivityManager; import android.net.Netw...
package andy.demo.telinfo; import android.app.Activity; import android.os.Bundle; import android.telephony.CellLocation; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; public class TelManager extends Activity { @Override protected void onCreate(Bundle savedInsta...
package andy.demo.webView; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import android.app.Activity; import android.content.res.AssetManager; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; ...
package andy.demo.mutitouch; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; public class MTView extends...
package andy.demo.mutitouch; import android.app.Activity; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; public class MutitouchVisiable extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //隐藏标题栏 re...
package andy.demo; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.HashMap; import java.util.Map; import android.R; import android.app.ListActivity; import android.content.Intent; import android.content.pm.ResolveInfo; import android.os.Bundle; import android.view.View; ...
package andy.demo.mutiScreen; import android.app.Activity; import android.content.Context; import android.graphics.Rect; import android.os.Bundle; import android.util.DisplayMetrics; import android.util.TypedValue; import android.view.Display; import android.view.View; import android.view.Window; import an...
package andy.demo.widget.toast; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageVie...
package andy.demo.ipc; import android.app.Activity; import android.os.Bundle; import android.app.Activity; import android.content.Context; import android.graphics.Color; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.util.Log; import android.vi...
package andy.demo.gusture; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.GestureDetector; import android.view.GestureDetector.OnGestureListener; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import a...
package andy.demo.pxdipsp; import android.app.Activity; import android.content.Context; import android.graphics.Rect; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.Display; import android.view.View; import android.view.Window; import android.view.WindowManager; import an...
package zt.receive; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class SMSReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, " SMS...
package zt.receive; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class TimerReceiver extends BroadcastReceiver { public void onReceive(Context arg0, Intent arg1) { Toast.makeText(arg0, " TimerReceiver get A...
package andy.timerTask; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference...
package zt.ser; import android.app.Service; import android.content.Intent; import android.os.Binder; import android.os.Bundle; import android.os.IBinder; import android.util.Log; public class DemoService extends Service implements Runnable { private boolean isRun = false; private LocalBinder binder ...
package pl.edu.agh.mobsys; import java.util.HashMap; import java.util.List; import java.util.Map; import org.garret.perst.Storage; import org.jivesoftware.smack.AccountManager; import org.jivesoftware.smack.Chat; import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.Connection...
package pl.edu.agh.mobsys.activities; import java.net.InetAddress; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import pl.edu.agh.mobsys.R; import pl.edu.agh.mobsys.XmppApplication; import pl.edu.agh.mobsys.data.Contact; import pl.edu.agh.mobsys.data.ContactFacto...
package pl.edu.agh.mobsys.activities; import org.jivesoftware.smack.Roster; import pl.edu.agh.mobsys.R; import pl.edu.agh.mobsys.data.Contact; import pl.edu.agh.mobsys.data.ContactFactory; import pl.edu.agh.mobsys.data.PersonalContact; import pl.edu.agh.mobsys.data.SmoaContact; import pl.edu.agh.mobsys.data.validatio...
package pl.edu.agh.mobsys.activities; import pl.edu.agh.mobsys.R; import pl.edu.agh.mobsys.data.ConnectionConfig; import pl.edu.agh.mobsys.utils.Constants; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color...
package pl.edu.agh.mobsys.activities.soapactivities; import org.jivesoftware.smack.PacketListener; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Packet; import pl.edu.agh.mobsys.R; import pl.edu.agh.mobsys.XmppApplication; import pl.edu.agh.mobsys.data.SoapXmppMessage; import pl.ed...
package pl.edu.agh.mobsys.activities.soapactivities; import java.util.ArrayList; import pl.edu.agh.mobsys.R; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuI...
package pl.edu.agh.mobsys.activities.soapactivities; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.jivesoftware.smack.PacketListen...
package pl.edu.agh.mobsys.activities; import java.util.List; import org.jivesoftware.smack.MessageListener; import org.jivesoftware.smack.XMPPException; import pl.edu.agh.mobsys.R; import pl.edu.agh.mobsys.XmppApplication; import pl.edu.agh.mobsys.data.ConnectionConfig; import pl.edu.agh.mobsys.data.Message; import ...
package pl.edu.agh.mobsys.data; import java.io.Serializable; import android.content.SharedPreferences; /** * konfiguracja serwera * */ public class ConnectionConfig implements Serializable { private static final long serialVersionUID = 1L; public String host, port, username, password, resource, ip...
package pl.edu.agh.mobsys.data; import org.apache.commons.lang.StringEscapeUtils; /** * Modyfikacja klasy message, pod styl akceptowany przez SMOA * */ public class SoapXmppMessage extends org.jivesoftware.smack.packet.Message { public SoapXmppMessage(String soap) { setBody(soap); } /** * !!!...
package pl.edu.agh.mobsys.data; /** * Reprezentuje standardowy osobowy kontakt XMPP (nie smoa). * */ public class PersonalContact extends Contact { private String xmppName, resource; public String getResource() { return resource; } public void setResource(String resource) { this.resource = r...
package pl.edu.agh.mobsys.data; /** * Reprezentuje kontakt SMOA, enkapsuluje parę kontaków do zlecania zgłoszeń * oraz odbierania notyfikacji z subskrypcji pod jednym aliasem * */ public class SmoaContact extends Contact { private String notifierXmppName, jobReceiverXmppName, notifierResource, jobReceiv...
package pl.edu.agh.mobsys.data.validation; import pl.edu.agh.mobsys.data.ConnectionConfig; /** * Zbiór metod na walidację danych używanych w aplikacji * */ public class Validator { /** * Walidacja wartości loginu xmpp. * * @return * ostrzeżenie jeśli walidacja niepomyślna; inaczej null ...
package pl.edu.agh.mobsys.data; /** * Reprezentuje pojedyczny kontakt XMPP. * * Abstakcja ze zględu na generyczność. * */ public abstract class Contact { private String alias; Contact() { super(); } public String getAlias() { return alias; } public void setAlias(String alias) { ...
package pl.edu.agh.mobsys.data; /** * Wiadomość do wyświetlenia w chacie z klientem osobowym (nie smoa). * */ public class Message { public final String content, author, time; public Message(String content, String author, String time) { super(); this.content = content; this.author = author; ...
package pl.edu.agh.mobsys.data; import java.util.Arrays; /** * Pomaga w zabawie z utrwalaniem kontaktów - enkpsuluje ich generyczność. * */ public class ContactFactory { private static final String SEPARATOR = "###"; /** * Odczyt kontaktu na podstawie aliasu i zakodowanej konfiguracji * * @...
package pl.edu.agh.mobsys.utils; /** * Callback do aktualizacji stanu połączenia. * */ public interface ConnectionListener { public void connectionActive(); public void connectionInactive(String cause); }
package pl.edu.agh.mobsys.utils; import java.util.ArrayList; import pl.edu.agh.mobsys.R; import pl.edu.agh.mobsys.soap.JobData; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widg...
package pl.edu.agh.mobsys.utils; import java.util.List; import pl.edu.agh.mobsys.R; import pl.edu.agh.mobsys.data.Contact; import pl.edu.agh.mobsys.data.SmoaContact; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.w...
package pl.edu.agh.mobsys.utils; /** * Stałe dla aplikacji. * */ public class Constants { public static final String SHARED_PREFS_KEY_CONTACTS = "SHARED_PREFS_KEY_CONTACTS"; public static final String SHARED_PREFS_KEY_SERVER_CONFIG = "SHARED_PREFS_KEY_SERVER_CONFIG"; public static final String SERVER...
package pl.edu.agh.mobsys.utils; import android.content.Intent; /** * Pomocniczna klasa - ułatwia zarządzanie menu. * */ public class BB { public final int labelId, id; public final int icon; public final Intent intent; public BB(int labelId, int id, int icon, Intent intent) { super(); this.l...
package pl.edu.agh.mobsys.utils; import java.util.List; import pl.edu.agh.mobsys.R; import pl.edu.agh.mobsys.data.Message; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.Te...
package pl.edu.agh.mobsys.utils; import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.packet.Packet; import org.jivesoftware.smack.packet.PacketExtension; import pl.edu.agh.mobsys.utils.Constants.SmoaAgentType; import android.util.Log; public class SmoaParser { public stati...
package pl.edu.agh.mobsys.persistence; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteStatement; import android.util.Log; import java.util.LinkedList; import ...