Purdue Pride 4.7.10 Joe Gutierrez Tung Ho Janam Jhaveri 4/7/2010Purdue Pride1.

Slides:



Advertisements
Similar presentations
Programming with Android: Data management
Advertisements

Bruce Scharlau, University of Aberdeen, 2012 Data storage options for mobiles Mobile Computing.
Problem Solving 5 Using Java API for Searching and Sorting Applications ICS-201 Introduction to Computing II Semester 071.
Multivalued parameters Some type of parameters may have more than one value. This is the case for the checkbox. What IDEs do you use? NetBeans Eclipse.
Exception Handling – illustrated by Java mMIC-SFT November 2003 Anders P. Ravn Aalborg University.
Purdue Pride Joe Gutierrez Tung Ho Janam Jhaveri 4/21/2010Purdue Pride1.
ContentProviders.  Databases for reading & writing data  Support typical database operations  e.g., query, insert, update & delete.
Apache Tomcat Server Typical html Request/Response cycle
Exceptions and Assertions Recitation – 03/13/2009 CS 180 Department of Computer Science, Purdue University.
CS 206 Introduction to Computer Science II 01 / 23 / 2009 Instructor: Michael Eckmann.
Cosc 5/4730 Android and Blackberry SQLite. For the sql language syntax, please see SQlite documentation –
SQLLite and Java CS-328 Dick Steflik. SQLLite Embedded RDBMS ACID Compliant Size – about 257 Kbytes Not a client/server architecture –Accessed via function.
Purdue Pride Joe Gutierrez Tung Ho Janam Jahavier 3/10/2010Purdue Pride1.
Purdue Pride Joe Gutierrez Tung Ho Janam Jhaveri 4/30/2010Purdue Pride1.
Purdue Pride Joe Gutierrez Tung Ho Janam Jhaveri 4/1/2010Purdue Pride1.
Xpantrac connection with IDEAL Sloane Neidig, Samantha Johnson, David Cabrera, Erika Hoffman CS /6/2014.
SQLite Database. SQLite Public domain database – Advantages Small (about 150 KB) – Used on devices with limited resources Each database contained within.
1 Java Database Connection (JDBC) There are many industrial-strength DBMS's commercially available in the market. Oracle, DB2, and Sybase are just a few.
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
Lecture Objectives To understand how Java implements a stack To learn how to implement a stack using an underlying array or linked list Implement a simple.
Purdue Pride Live Wallpapers Unsure if do-able – Couldn’t find anything about RSS => maybe very recent feature => formatting RSS might be an.
Writing Widgets & Custom Script API for BOY Xihui Chen
Cosc 5/4730 Android Content Providers and Intents.
Data Storage: Part 4 (Content Providers). Content Providers Content providers allow the sharing of data between applications. Inter-process communication.
Package org.androidtown.database.query; import android.app.Activity; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase;
MySQL Connection using ADO.Net Connecting to MySQL from.NET Languages.
JDBC Java and Databases, including Postgress. JDBC l Developed by Industry leaders l Three main goals: –JDBC should be an SQL-level API –JDBC should capitalize.
Mark Dixon 1 09 – Java Servlets. Mark Dixon 2 Session Aims & Objectives Aims –To cover a range of web-application design techniques Objectives, by end.
Android Storage. There are several options for storage of data with Android We can put data into a preferences file. We can put data into a ‘normal’ file.
JDBC Java and Databases. RHS – SOC 2 JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
Accessing Database using JDBC. JDBC Objectives Gain basic knowledge of Java JDBC Become familiar with the basics of interacting with a database using.
Chapter 25 Databases. Chapter Scope Database concepts Tables and queries SQL statements Managing data in a database Java Foundations, 3rd Edition, Lewis/DePasquale/Chase25.
Purdue Pride Joe Gutierrez Tung Ho Janam Jhaveri 4/14/2010Purdue Pride1.
JDBC. Java.sql.package The java.sql package contains various interfaces and classes used by the JDBC API. This collection of interfaces and classes enable.
Persistence Dr. David Janzen Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Interfaces, Classes, Collections School of Engineering and Computer Science, Victoria University of Wellington COMP T2 Lecture 3 Thomas Kuehne.
Mark Dixon 1 11 – Java Servlets. Mark Dixon 2 Session Aims & Objectives Aims –To cover a range of web-application design techniques Objectives, by end.
SQLite DB Storing Data in Android RAVI GAURAV PANDEY 1.
COSC 2007 Data Structures II Dr Dave Goforth FA 377 (705) x2316
Lecture Objectives  To understand how Java implements a stack  To learn how to implement a stack using an underlying array or linked list  Implement.
Android - SQLite Database 12/10/2015. Introduction SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with.
SQlite. SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation.
2006 JavaOne SM Conference | Session BOF-0367 JDBC™Technology-based Metadata Recipes Mahmoud Parsian Server Architect LimeLife, Inc.
Purdue Pride Joe Gutierrez Tung Ho Janam Jahavier 3/3/2010Purdue Pride.
1. Playing with SQLite Database  SQLite : Database specific name for Android Application  For windows there are several kind of database name : Mysql,
Interfaces, Classes, Collections School of Engineering and Computer Science, Victoria University of Wellington COMP T2 Lecture 3 Marcus Frean.
Database Programming With Java & JDBC Reading: DD Ch. 18, pp al/jdbc/index.html, or anything covering JDBC.
SQL and Java The vision for Java is to be the concrete and nails that people use to build this incredible network system that is happening all around us.
JDBC Java and Databases. SWC – JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
Click to edit Master text styles Stacks Data Structure.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Современные технологии баз данных Лекция 7. Объектно-реляционное отображение (ORM) Технология отображения объектов какого- либо объектно-ориентированного.
CS320 Web and Internet Programming Database Access with JDBC Chengyu Sun California State University, Los Angeles.
Database Programming Code Dissection. Layered Approach Presentation (Activity) DbSampleActivity.java DataAccess (DataSource) CommentsDataSource.java MySQLiteHelper.java.
Making content providers
SQLite in Android Landon Cox March 2, 2017.
CS320 Web and Internet Programming Database Access with JDBC
HW#4 Making Simple BBS Using JDBC
Lecture 8: Database Topics: Basic SQLite Operations.
PRG 421 MART Education for Service-- prg421mart.com.
PRG 421 GUIDE Education for Service-- prg421guide.com.
Android Storage.
null, true, and false are also reserved.
CMPE419 Mobile Application Development
Mobile Computing With Android ACST 4550 Android Database Storage
Using a Database with JDBC
Android Developer Fundamentals V2
Department of School of Computing and Engineering
SQLLite and Android.
Lecture 8: Database Topics: Basic SQLite Operations.
Presentation transcript:

Purdue Pride Joe Gutierrez Tung Ho Janam Jhaveri 4/7/2010Purdue Pride1

Timeline 7 weeks March 10 th : Widget, RSS tutorials March 24 th : RSS Feed April 7 th : SQL Lite Database (currently working on) April 21 st : Widget April 28 th : Work off any loose ends 4/7/2010Purdue Pride2

Milestones Website with RSS feed is set up (3.3.10) Basic widget displays hard-coded text ( ) Successfully store and recall data from SQL Lite with an application ( ) Successfully retrieve and display RSS feed onto view (4.1.10) 4/7/2010Purdue Pride3

Database Code public class PrideDB { private static final String FEEDS_TABLE = "feeds"; private static final String DATABASE_NAME = "pride"; private static SQLiteDatabase db; public PrideDB(Context ctx) { db = ctx.openOrCreateDatabase(DATABASE_NAME, 0, null); //API change } 4/7/2010Purdue Pride4

Database Code public static boolean insertItem(String title, String description) { ContentValues values = new ContentValues(); values.put("title", title); values.put("description", description); return(db.insert(FEEDS_TABLE, null, values) > 0); } public boolean deleteItem(Long feedID) { return(db.delete(FEEDS_TABLE, "feed_id=" + feedID.toString(), null) > 0); } public static List getItems() { ArrayList feeds = new ArrayList (); try { Cursor c = db.query(FEEDS_TABLE, new String[] {"feed_id", "title", "description"}, null, null, null, null, null); int numRows = c.getCount(); //API change for( int i =0; i < numRows; ++i) { RSSItem item = new RSSItem(); item.feedId = c.getLong(0); item.title = c.getString(1); item.description = c.getString(2); feeds.add(item); c.moveToNext(); //API change } 4/7/2010Purdue Pride5

Database Code catch (SQLException e) { Log.e("PurduePride",e.toString()); } return feeds; } public static RSSItem getItem() { RSSItem item = new RSSItem(); try { Cursor c = db.query(FEEDS_TABLE, new String[] {"feed_id", "title", "description"}, null, null, null, null, null); item.feedId = c.getLong(0); //item.title = c.getString(1); //item.description = c.getString(2); } catch (SQLException e) { Log.e("PurduePride",e.toString()); } return item; } } 4/7/2010Purdue Pride6

RSS Handler if (item.title != null) { PrideDB.insertItem(item.title, item.description); item.title = null; item.description = null; /*itemsAdded++; if (itemsAdded >= ARTICLES_LIMIT) { throw new SAXException(); } */ } 4/7/2010Purdue Pride7

Pride RSS 4/7/2010Purdue Pride8 handler.setContext(this);

Widget XML 4/7/2010Purdue Pride9 //XML file with some metadata about the widget. "Called" in main Widget Java file

Next Task 4/7/2010Purdue Pride10 April 7 th : Have RSS feed interacting with database (in Progress) April 21 st : Display RSS feed onto Widget