Communication between android applications and services-student inquiry system case source code

Source: Internet
Author: User

1. inventory file

AndroidManifest. xml

2. Application Interface

Main. xml

3. The service file // The queried data can be called from the database.

Studentservice String [] name = {"", "", "" IBinder binder = String query (no> 0 & no <4 name [no-1 studentbinder Binder String querystudent (} studentservice. java

4. interface file

String querystudent (} istudent. java

5. Application Files

Cai_appserviceActivity TextView result; EditText studentid; studentserviceconn conn = studentserviceconn (); istudent studentbinder; result = studentid = Intent service = Intent (, studentservice. bindService (service, conn, BIND_AUTO_CREATE); search (View v) {String id = String name = studentbinder. querystudent (Integer. valueOf (id); unbindService (conn); studentserviceconn studentbinder = (istudent) service; stud Entbinder =;} Cai_appserviceActivity. Java

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.