This document provides instructions on how to create a basic "Hello Widget" Android widget app. It discusses creating a new Android project, designing the widget layout with XML, adding code to the AppWidgetProvider to handle updates, and testing the widget. It also provides an example of adding interactivity by coding buttons on the widget and handling button clicks by launching an activity. The document history section lists the document versions and authors.
18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, MysuruNithin Kumar,VVCE, Mysuru
The document describes the creation of a sign up activity with username and password validation in Android. It involves designing a sign up activity layout with email and password fields and a sign up button. The password validation checks that the password contains uppercase, lowercase, numbers, special characters and has a minimum length of 8. On successful sign up, the username and password are passed to a login activity using intent extras to validate the login.
The document describes the methodology used to develop a Campus News Information System Android application. It discusses using the Android SDK, Eclipse IDE, and phpMyAdmin to build the application. The application will use components like Shared Preferences, Notification Manager, and SQLite to store and retrieve data from the campus server. The goal is to create a system that allows students and faculty to access campus information from their Android devices via a HTTP-based connection. This overcomes limitations of prior approaches that used Bluetooth technology.
Android Based Application Project Report. Abu Kaisar
This document describes a project report for a counseling hour mobile application created for the Wireless Programming course. The application allows students to book counseling sessions with teachers and teachers to update their profiles and counseling times. It includes chapters on introduction and objectives, background studies, system design diagrams, software and hardware requirements, and proposed features for students and teachers. The goal is to make it easier for students and teachers to communicate about counseling sessions through a mobile app rather than traditional methods.
Report on e-Notice App (An Android Application)Priyanka Kapoor
The document is a report submitted for a degree at DigiMantra Labs, Ludhiana from January 5, 2014 to May 30, 2014. It describes the development of an e-Notice Application for Android phones. The app allows users to access online notices on their phone and acts as an online notice board where people can communicate and post notices with text, images or videos. It aims to digitize the traditional notice board and allow staff/students to read and respond to notices from anywhere. The app also serves as a mailing list to notify all employees of new notices without needing to maintain a separate mailing list.
Minor project Report for "Quiz Application"Harsh Verma
This document summarizes a project report for a quiz application submitted to Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal. The report describes a web-based quiz application developed by students Bhumika Kanojia, Durgesh Mishra, and Harsh Verma to fulfill their Bachelor of Engineering degree requirements. The application allows users to play various quizzes on technical, general knowledge, and other topics. Users can view answers, ask questions, and submit their own questions and answers after admin approval. The report covers requirements analysis, design, implementation, and testing of the quiz application.
This document contains a resume summary for Bhaskar Choudhary, including his contact information, professional profile, educational profile, work experience, systems experience, and project summaries. He has over 3 years of experience working as a software developer using technologies like ASP.NET, C#, SQL, and has worked on projects for various clients in industries like pharmaceutical, railway, and education.
18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, MysuruNithin Kumar,VVCE, Mysuru
The document describes the creation of a sign up activity with username and password validation in Android. It involves designing a sign up activity layout with email and password fields and a sign up button. The password validation checks that the password contains uppercase, lowercase, numbers, special characters and has a minimum length of 8. On successful sign up, the username and password are passed to a login activity using intent extras to validate the login.
The document describes the methodology used to develop a Campus News Information System Android application. It discusses using the Android SDK, Eclipse IDE, and phpMyAdmin to build the application. The application will use components like Shared Preferences, Notification Manager, and SQLite to store and retrieve data from the campus server. The goal is to create a system that allows students and faculty to access campus information from their Android devices via a HTTP-based connection. This overcomes limitations of prior approaches that used Bluetooth technology.
Android Based Application Project Report. Abu Kaisar
This document describes a project report for a counseling hour mobile application created for the Wireless Programming course. The application allows students to book counseling sessions with teachers and teachers to update their profiles and counseling times. It includes chapters on introduction and objectives, background studies, system design diagrams, software and hardware requirements, and proposed features for students and teachers. The goal is to make it easier for students and teachers to communicate about counseling sessions through a mobile app rather than traditional methods.
Report on e-Notice App (An Android Application)Priyanka Kapoor
The document is a report submitted for a degree at DigiMantra Labs, Ludhiana from January 5, 2014 to May 30, 2014. It describes the development of an e-Notice Application for Android phones. The app allows users to access online notices on their phone and acts as an online notice board where people can communicate and post notices with text, images or videos. It aims to digitize the traditional notice board and allow staff/students to read and respond to notices from anywhere. The app also serves as a mailing list to notify all employees of new notices without needing to maintain a separate mailing list.
Minor project Report for "Quiz Application"Harsh Verma
This document summarizes a project report for a quiz application submitted to Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal. The report describes a web-based quiz application developed by students Bhumika Kanojia, Durgesh Mishra, and Harsh Verma to fulfill their Bachelor of Engineering degree requirements. The application allows users to play various quizzes on technical, general knowledge, and other topics. Users can view answers, ask questions, and submit their own questions and answers after admin approval. The report covers requirements analysis, design, implementation, and testing of the quiz application.
This document contains a resume summary for Bhaskar Choudhary, including his contact information, professional profile, educational profile, work experience, systems experience, and project summaries. He has over 3 years of experience working as a software developer using technologies like ASP.NET, C#, SQL, and has worked on projects for various clients in industries like pharmaceutical, railway, and education.
Designing the Process of Stores Management for Implementing ERP in Manufactur...sushil Choudhary
This paper describes the importance of ERP in manufacturing industries and examines the various articles
published by eminent Researchers in the field of ERP. Enterprise Resource Planning (ERP) software presents a
frame work for organizations to better utilize their processes. The report is about windows based application.
The main idea of this paper is to handle the all details of stores management system. In this project software
package has been developed to smoothen the processing of item transaction in stores such as item receive, item
issue & report generation such as stock statement, issue register & receive register etc. This Software will help in
automating all the process like receiving and issuing application in stores.
This document provides a report on mobile application development research conducted for Henderson State University School of Business. Both qualitative and quantitative research methods were used, including in-depth interviews with faculty, students, and alumni, as well as a survey distributed to stakeholders. Key findings from the research indicated that students were most interested in features like an event calendar, job/internship opportunities, degree information, and grade checking. Faculty expressed interest in an event calendar, student degree information, a directory, and job opportunities for students. Based on these results, recommendations include further A/B testing of mobile app prototypes, a promotion strategy using various marketing channels, and hiring a dedicated mobile app developer if expanding campus-wide.
This document is a project synopsis submitted by two students, Akshay Dudhankar and Vijaykumar Jagatap, for their Bachelor of Computer Applications degree. It outlines their proposed "New Admission App" project, which involves developing an online application for college admissions. The synopsis includes an introduction to the project, problem definition, proposed solution, requirements, system design, and implementation details. The goal is to create a web-based application to streamline the admissions process and make it more convenient for students.
This document provides information about an online job portal system. It discusses the technologies used including JavaServer Pages (JSP) and MySQL database. It describes the existing manual job placement system and proposes developing a computerized online system to address limitations like low speed, accuracy and efficiency. The proposed system would allow applicants and companies to register online, search and post jobs, and send alerts to applicants about interviews. Key modules, hardware/software requirements, entity relationship diagram and table structures are also outlined. The system aims to streamline the job placement process.
This document summarizes a thesis submitted for the degree of Bachelor of Technology in Computer Science and Engineering. The thesis proposes developing an online test system using .NET. It was submitted by three students and supervised by an assistant professor. The thesis follows a waterfall model for software development. It includes sections on software requirements specification, data flow diagrams, entity relationship diagrams, functional and non-functional requirements, testing, and screenshots of the developed system.
This thesis describes the development of an Android-based multiple choice quiz application called Quizzy. Quizzy allows users to practice for exams by creating MCQ questions across various categories like computer science, verbal, and analytical. It includes features like hints, skipping questions, and pausing that act as lifelines. The app shows progress and results. It was built using a TinyDB database on the Android platform to store and retrieve questions. The goal was to help users prepare for admissions and recruitment tests through an engaging and interactive quiz-based learning experience.
This document presents a project report on developing a Campus News Feed application on the Android platform. It aims to allow students and faculty to easily stay informed about the latest campus news and updates by retrieving content from the college website. The application will connect to a backend database through an API. It will periodically check for new content and display it to users in the app. This provides an efficient notification system compared to traditional notice boards. The application is intended to facilitate information exchange within a college community and help users stay up-to-date on academic activities and developments.
Mohamed Mansoor is a seasoned IT professional with over 3 years of experience in technologies like Java/J2EE, PL/SQL, LAMP, and middleware technologies. He has worked as a Programmer Analyst, Android Developer, and Java Developer. His skills include web application development, databases, problem-solving, and he has experience with frameworks like Struts, JQuery, and technologies like Android, SQL, and Oracle. He has participated in several projects involving ERP systems, textile management, student portals, and more. He holds a Bachelor's degree in Electronics and Communication Engineering.
Presentation on 6 month Training Project (e-Notice App)Priyanka Kapoor
Its an android application that I made for college. Its main purpose is to intimate students instantly about any notice, posted by college admins. In this way, students will be updated about college events and happenings all the time.
Kuvempu University is a public state university located in Shivamogga, Karnataka, India. It was established in 1987 and offers undergraduate and postgraduate programs across a range of disciplines. The university has a 230-acre main campus called Jnana Sahyadri. It has 59 postgraduate departments and offers 45 postgraduate programs, 4 PG diplomas, and 1 undergraduate program. The document discusses developing a mobile application called "Kuvempu University App" for Android that would provide students and users information about the university such as admissions, examinations, results, library facilities, and a map of the campus. It would require Android Studio, Java, and other Android development tools. The app aims to
IRJET- Contest Information Desk Android ApplicationIRJET Journal
This document describes the development of a "Contest Information Desk" Android application to simplify the process of announcing and registering for college events. The app allows staff to post upcoming event details and students to view and register for events, reducing time and paper waste compared to traditional methods. It was created using Android Studio, PHP, and a MySQL database to store user and event information.
AI based College Information Search SystemIRJET Journal
This document describes an AI-based college information search system project developed by students to help with the college admission process. The project includes a website and Android app that allows students to search for information on desired colleges. The website is built using PHP, MySQL, AJAX, HTML, and CSS. It has two modules - one for administrators to add college data and manage user accounts, and one for users to search for college information and interact with a chatbot for assistance. The goal of the project is to provide students with all necessary information for college admissions in one convenient location to simplify the process.
This document provides an overview of a job portal project that aims to connect employers and job seekers. It includes sections on project definition, profile, tools used, scope and limitations, diagrams, use cases, and database tables. The project allows employers to post jobs, search candidates, and track applicants. Job seekers can create profiles, search and apply for jobs, and view company profiles. The system is built using HTML, CSS, JavaScript, and SQL Server for the frontend and backend. Diagrams include ERD, context, level 0 and 1, and use case diagrams. Future enhancements could include reports for employers and email alerts for matching jobs.
This document contains the resume of Abhishek Sapkale. It includes his contact information, job objective, profile summary, organizational experience working as a software engineer, IT skills which include languages and frameworks used, education qualifications and personal details. It also includes an annexure listing various projects undertaken by him using technologies such as ASP.Net MVC, C#, SQL Server, jQuery and describes their purpose and functionality.
This resume is for Venkatesan Arumugam, an Indian software engineer with over 8 years of experience developing web applications using technologies like ASP.NET, C#, SQL Server, and JavaScript frameworks. He has a Master's degree in Computer Application and has worked on projects in healthcare, asset management, payroll, and matrimony domains for companies in India, the UK, Malaysia, and Vietnam. His responsibilities included development, testing, and maintenance of applications from design to deployment.
Ashish B Baria is a senior technology executive with over 9 years of experience in IT industries. He has extensive experience in software application support for .NET applications, database support for SQL Server, and software implementation. He is proficient in technologies such as .NET development, SQL Server, ASP.NET, and manual/automated testing tools. Currently he works as a senior technology platform executive at Infosys providing technical support to onshore client teams in the US and Australia.
The document provides an overview of getting started with Android development using Android Studio. It discusses downloading and installing the necessary software, creating a "Hello World" project, and exploring the basic anatomy and functionality of Android Studio. Key steps include downloading Android Studio and required SDKs, creating a new project, adding an activity, and accessing user interface elements from Java code using findViewById.
This document provides instructions for setting up the development environment and coding a basic "Hello World" Android application. It includes steps for installing the Java Development Kit (JDK), Android SDK, configuring the Android Virtual Device (AVD), and creating a new Android project in Eclipse. It then walks through coding the app's layout, main activity class, and manifest file. Later sections add functionality like displaying Toast notifications and creating a new activity for camera access. The document teaches Android app development basics through a tutorial approach of building on a simple starter app.
Designing the Process of Stores Management for Implementing ERP in Manufactur...sushil Choudhary
This paper describes the importance of ERP in manufacturing industries and examines the various articles
published by eminent Researchers in the field of ERP. Enterprise Resource Planning (ERP) software presents a
frame work for organizations to better utilize their processes. The report is about windows based application.
The main idea of this paper is to handle the all details of stores management system. In this project software
package has been developed to smoothen the processing of item transaction in stores such as item receive, item
issue & report generation such as stock statement, issue register & receive register etc. This Software will help in
automating all the process like receiving and issuing application in stores.
This document provides a report on mobile application development research conducted for Henderson State University School of Business. Both qualitative and quantitative research methods were used, including in-depth interviews with faculty, students, and alumni, as well as a survey distributed to stakeholders. Key findings from the research indicated that students were most interested in features like an event calendar, job/internship opportunities, degree information, and grade checking. Faculty expressed interest in an event calendar, student degree information, a directory, and job opportunities for students. Based on these results, recommendations include further A/B testing of mobile app prototypes, a promotion strategy using various marketing channels, and hiring a dedicated mobile app developer if expanding campus-wide.
This document is a project synopsis submitted by two students, Akshay Dudhankar and Vijaykumar Jagatap, for their Bachelor of Computer Applications degree. It outlines their proposed "New Admission App" project, which involves developing an online application for college admissions. The synopsis includes an introduction to the project, problem definition, proposed solution, requirements, system design, and implementation details. The goal is to create a web-based application to streamline the admissions process and make it more convenient for students.
This document provides information about an online job portal system. It discusses the technologies used including JavaServer Pages (JSP) and MySQL database. It describes the existing manual job placement system and proposes developing a computerized online system to address limitations like low speed, accuracy and efficiency. The proposed system would allow applicants and companies to register online, search and post jobs, and send alerts to applicants about interviews. Key modules, hardware/software requirements, entity relationship diagram and table structures are also outlined. The system aims to streamline the job placement process.
This document summarizes a thesis submitted for the degree of Bachelor of Technology in Computer Science and Engineering. The thesis proposes developing an online test system using .NET. It was submitted by three students and supervised by an assistant professor. The thesis follows a waterfall model for software development. It includes sections on software requirements specification, data flow diagrams, entity relationship diagrams, functional and non-functional requirements, testing, and screenshots of the developed system.
This thesis describes the development of an Android-based multiple choice quiz application called Quizzy. Quizzy allows users to practice for exams by creating MCQ questions across various categories like computer science, verbal, and analytical. It includes features like hints, skipping questions, and pausing that act as lifelines. The app shows progress and results. It was built using a TinyDB database on the Android platform to store and retrieve questions. The goal was to help users prepare for admissions and recruitment tests through an engaging and interactive quiz-based learning experience.
This document presents a project report on developing a Campus News Feed application on the Android platform. It aims to allow students and faculty to easily stay informed about the latest campus news and updates by retrieving content from the college website. The application will connect to a backend database through an API. It will periodically check for new content and display it to users in the app. This provides an efficient notification system compared to traditional notice boards. The application is intended to facilitate information exchange within a college community and help users stay up-to-date on academic activities and developments.
Mohamed Mansoor is a seasoned IT professional with over 3 years of experience in technologies like Java/J2EE, PL/SQL, LAMP, and middleware technologies. He has worked as a Programmer Analyst, Android Developer, and Java Developer. His skills include web application development, databases, problem-solving, and he has experience with frameworks like Struts, JQuery, and technologies like Android, SQL, and Oracle. He has participated in several projects involving ERP systems, textile management, student portals, and more. He holds a Bachelor's degree in Electronics and Communication Engineering.
Presentation on 6 month Training Project (e-Notice App)Priyanka Kapoor
Its an android application that I made for college. Its main purpose is to intimate students instantly about any notice, posted by college admins. In this way, students will be updated about college events and happenings all the time.
Kuvempu University is a public state university located in Shivamogga, Karnataka, India. It was established in 1987 and offers undergraduate and postgraduate programs across a range of disciplines. The university has a 230-acre main campus called Jnana Sahyadri. It has 59 postgraduate departments and offers 45 postgraduate programs, 4 PG diplomas, and 1 undergraduate program. The document discusses developing a mobile application called "Kuvempu University App" for Android that would provide students and users information about the university such as admissions, examinations, results, library facilities, and a map of the campus. It would require Android Studio, Java, and other Android development tools. The app aims to
IRJET- Contest Information Desk Android ApplicationIRJET Journal
This document describes the development of a "Contest Information Desk" Android application to simplify the process of announcing and registering for college events. The app allows staff to post upcoming event details and students to view and register for events, reducing time and paper waste compared to traditional methods. It was created using Android Studio, PHP, and a MySQL database to store user and event information.
AI based College Information Search SystemIRJET Journal
This document describes an AI-based college information search system project developed by students to help with the college admission process. The project includes a website and Android app that allows students to search for information on desired colleges. The website is built using PHP, MySQL, AJAX, HTML, and CSS. It has two modules - one for administrators to add college data and manage user accounts, and one for users to search for college information and interact with a chatbot for assistance. The goal of the project is to provide students with all necessary information for college admissions in one convenient location to simplify the process.
This document provides an overview of a job portal project that aims to connect employers and job seekers. It includes sections on project definition, profile, tools used, scope and limitations, diagrams, use cases, and database tables. The project allows employers to post jobs, search candidates, and track applicants. Job seekers can create profiles, search and apply for jobs, and view company profiles. The system is built using HTML, CSS, JavaScript, and SQL Server for the frontend and backend. Diagrams include ERD, context, level 0 and 1, and use case diagrams. Future enhancements could include reports for employers and email alerts for matching jobs.
This document contains the resume of Abhishek Sapkale. It includes his contact information, job objective, profile summary, organizational experience working as a software engineer, IT skills which include languages and frameworks used, education qualifications and personal details. It also includes an annexure listing various projects undertaken by him using technologies such as ASP.Net MVC, C#, SQL Server, jQuery and describes their purpose and functionality.
This resume is for Venkatesan Arumugam, an Indian software engineer with over 8 years of experience developing web applications using technologies like ASP.NET, C#, SQL Server, and JavaScript frameworks. He has a Master's degree in Computer Application and has worked on projects in healthcare, asset management, payroll, and matrimony domains for companies in India, the UK, Malaysia, and Vietnam. His responsibilities included development, testing, and maintenance of applications from design to deployment.
Ashish B Baria is a senior technology executive with over 9 years of experience in IT industries. He has extensive experience in software application support for .NET applications, database support for SQL Server, and software implementation. He is proficient in technologies such as .NET development, SQL Server, ASP.NET, and manual/automated testing tools. Currently he works as a senior technology platform executive at Infosys providing technical support to onshore client teams in the US and Australia.
The document provides an overview of getting started with Android development using Android Studio. It discusses downloading and installing the necessary software, creating a "Hello World" project, and exploring the basic anatomy and functionality of Android Studio. Key steps include downloading Android Studio and required SDKs, creating a new project, adding an activity, and accessing user interface elements from Java code using findViewById.
This document provides instructions for setting up the development environment and coding a basic "Hello World" Android application. It includes steps for installing the Java Development Kit (JDK), Android SDK, configuring the Android Virtual Device (AVD), and creating a new Android project in Eclipse. It then walks through coding the app's layout, main activity class, and manifest file. Later sections add functionality like displaying Toast notifications and creating a new activity for camera access. The document teaches Android app development basics through a tutorial approach of building on a simple starter app.
The document discusses the Android platform. It describes Android as a layered environment built upon the Linux kernel that includes rich functions. It notes that Android includes an embeddable browser built on WebKit and supports connectivity options like WiFi, Bluetooth and wireless data. It also includes support for graphics, media, 2D/3D graphics via OpenGL, and data storage via SQLite. The software layers include applications, application framework, libraries and services, and the Linux kernel.
The document provides steps to create an Android quiz app with a relative layout, background image, image buttons, and text styling. It describes adding a relative layout, adding multiple versions of images for different screens, creating image buttons and positioning them, adding accessibility content descriptions, styling text with a custom font, and making the buttons interactive by adding onclick attributes.
Yeoman AngularJS and D3 - A solid stack for web appsclimboid
This was a course given in Bangalore India for JSChannel conf 2013. It encompases the use of angular js and d3 in a harmonious way and gives an overview over each of the frameworks / libraries.
Lecture #1 Creating your first android projectVitali Pekelis
1. The document discusses setting up a basic Android project structure including an activity, layout, and manifest.
2. It explains how to create an activity class that extends Activity and sets the layout view. The activity is declared in the manifest.
3. Basic instructions are provided for running the app on a real device or emulator from Android Studio.
This document provides instructions for setting up Android Studio and describes the basic structure of an Android project and Java code. It includes the following key points:
1) It outlines 9 steps for downloading and configuring Android Studio, including downloading the executable, installing it, configuring SDK components, and creating a new project.
2) It describes the basic folder structure of an Android project, including folders for Java source files, generated files, resources, drawables, layouts and values.
3) It explains some important files in an Android project like the AndroidManifest file, main layout file, and activity class. The activity class inherits from Android activity and contains the onCreate method.
Angular Kickstart document provides an overview of Angular including:
- Angular is a client side JavaScript framework that allows building of single page applications.
- A single page application loads initial content via the first page load and subsequent content without reloading the page.
- The document discusses Angular features such as modularity, performance, TypeScript support, and building blocks like modules, components and directives. It also provides instructions on setting up the development environment for Angular applications.
The document discusses various design patterns and best practices for building multipage applications with Backbone.js, including scoping selectors with views, using a file structure with folders for models, views etc., templates, template sharing between client and server, view injection, view helpers, bootstrapping data, mixins, parent-child views, two-way data binding with stickit, and an overview of Marionette.js which provides additional structure to Backbone apps.
Creating the first app with android studioParinita03
The document provides an overview of Android Studio, the integrated development environment for Android app development. It discusses what Android is, how Android Studio differs from Eclipse, and walks through creating a new project in Android Studio. The key steps covered are installing Android Studio, creating a new project, selecting project options like the application name and form factors, adding an initial activity, and running the app on an Android emulator.
The document provides instructions for building an Android app that makes an API call to GitHub to retrieve a list of Java developers in Nairobi. It retrieves the data using Volley, parses the JSON response, and displays the developer names, images, and URLs in a RecyclerView with CardViews. It also describes how to set up an adapter to connect the data to the RecyclerView items, create a model class to store the developer data, and add a click handler to launch a profile activity with more details when an item is tapped.
The ultimate guide to optimize your react native app performance in 2022Katy Slemon
Improve Your React Native app performance. Go through this guide to Speed up the performance of Android and iOS applications with our ultimate strategies.
This document provides an overview of React Native, Redux, and ES6 concepts. It begins with an introduction to React Native fundamentals like components, props vs state, and styling. It then covers Redux terminology such as actions, reducers, and middleware. Finally, it discusses ES6 features like arrow functions, destructuring, and template literals. Code examples and links to documentation are provided throughout for illustrating key concepts.
The document provides instructions for installing the Android SDK on NetBeans IDE. It describes downloading and installing the Android SDK, then installing the nAndroid plugin for NetBeans. It explains configuring the plugin to locate and use the Android SDK, and installing additional Android packages. The update section clarifies that the Android SDK directory cannot contain spaces and the PATH environment variable must be configured to properly locate the SDK tools folder.
Learn reactjs, how to code with example and general understanding thinkwikHetaxi patel
React js for beginners, learn react js with basic code setup and code examples with general understanding. beginners guide for basic react js programming with examples
Angular 7 Firebase5 CRUD Operations with Reactive FormsDigamber Singh
This document discusses how to create Angular 7 Firebase5 CRUD operations using Reactive Forms. It involves setting up a student record management system where an admin can create, read, update and delete student records. The key steps include setting up an Angular project with Bootstrap and Firebase, creating CRUD services, generating components, setting up routing, and integrating modules like NGX Toastr for alerts.
UGC CARE LIST OF JOURNALS 2024: UNLOCKING ACADEMIC EXCELLENCEaimlayresearch2
The UGC CARE initiative was launched to promote academic integrity and great studies guides. It aims to pick out and keep a comprehensive listing of credible journals across a diverse range of subjects. The UGC CARE listing is up to date often to encompass excellent journals while removing those who fail to fulfill the set requirements
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 3)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
Lesson Outcomes:
- students will be able to identify and name various types of ornamental plants commonly used in landscaping and decoration, classifying them based on their characteristics such as foliage, flowering, and growth habits. They will understand the ecological, aesthetic, and economic benefits of ornamental plants, including their roles in improving air quality, providing habitats for wildlife, and enhancing the visual appeal of environments. Additionally, students will demonstrate knowledge of the basic requirements for growing ornamental plants, ensuring they can effectively cultivate and maintain these plants in various settings.
Hospital pharmacy and it's organization (1).pdfShwetaGawande8
The document discuss about the hospital pharmacy and it's organization ,Definition of Hospital pharmacy
,Functions of Hospital pharmacy
,Objectives of Hospital pharmacy
Location and layout of Hospital pharmacy
,Personnel and floor space requirements,
Responsibilities and functions of Hospital pharmacist
Beginner's Guide to Bypassing Falco Container Runtime Security in Kubernetes ...anjaliinfosec
This presentation, crafted for the Kubernetes Village at BSides Bangalore 2024, delves into the essentials of bypassing Falco, a leading container runtime security solution in Kubernetes. Tailored for beginners, it covers fundamental concepts, practical techniques, and real-world examples to help you understand and navigate Falco's security mechanisms effectively. Ideal for developers, security professionals, and tech enthusiasts eager to enhance their expertise in Kubernetes security and container runtime defenses.
Cross-Cultural Leadership and CommunicationMattVassar1
Business is done in many different ways across the world. How you connect with colleagues and communicate feedback constructively differs tremendously depending on where a person comes from. Drawing on the culture map from the cultural anthropologist, Erin Meyer, this class discusses how best to manage effectively across the invisible lines of culture.
How to Create User Notification in Odoo 17Celine George
This slide will represent how to create user notification in Odoo 17. Odoo allows us to create and send custom notifications on some events or actions. We have different types of notification such as sticky notification, rainbow man effect, alert and raise exception warning or validation.
Slide Presentation from a Doctoral Virtual Open House presented on June 30, 2024 by staff and faculty of Capitol Technology University
Covers degrees offered, program details, tuition, financial aid and the application process.
Integrated Marketing Communications (IMC)- Concept, Features, Elements, Role of advertising in IMC
Advertising: Concept, Features, Evolution of Advertising, Active Participants, Benefits of advertising to Business firms and consumers.
Classification of advertising: Geographic, Media, Target audience and Functions.
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024yarusun
Are you worried about your preparation for the UiPath Power Platform Functional Consultant Certification Exam? You can come to DumpsBase to download the latest UiPath UIPATH-ADPV1 exam dumps (V11.02) to evaluate your preparation for the UIPATH-ADPV1 exam with the PDF format and testing engine software. The latest UiPath UIPATH-ADPV1 exam questions and answers go over every subject on the exam so you can easily understand them. You won't need to worry about passing the UIPATH-ADPV1 exam if you master all of these UiPath UIPATH-ADPV1 dumps (V11.02) of DumpsBase. #UIPATH-ADPV1 Dumps #UIPATH-ADPV1 #UIPATH-ADPV1 Exam Dumps
To study Earth’s magnetic field using a compass, natal bar magnet wire plotti...ajitkumarmatia8
Let me explain. To study Earth’s magnetic field, you can use a compass needle, a bar magnet, and a tangent galvanometer. Here are the steps:
Bar Magnet Placement:
Place the bar magnet in the middle of a large piece of paper.
Mark the outline of the magnet and indicate its poles.
Plotting Compass:
Use a plotting compass (a small compass with a freely rotating needle).
Position the compass near one pole of the bar magnet.
Mark where the compass needle points.
Moving the Compass:
Move the compass so that the back of the compass aligns with the previous mark.
Mark where the needle points again.
Repeat this process until the compass reaches the magnet’s other pole or the edge of the paper.
Drawing Field Lines:
Connect the marked points with a smooth curve.
Add an arrow to show the direction of the magnetic field.
Repeat the process from different starting points around the magnet to draw more field lines.
Tangent Galvanometer:
A tangent galvanometer measures the strength of the magnetic field.
It uses the tangent of the angle between the compass needle and the magnetic field direction.
Remember, magnetic field lines never cross, go from north to south, are continuous, and are closer where the field is stronger. Have fun with your project THANK YOU..
To study Earth’s magnetic field using a compass, natal bar magnet wire plotti...
Android how to hellowidget
1. How to: Android 'Hello Widget'
Table of Contents
Document history......................................................................................................1
HelloWidget...............................................................................................................1
Prerequisites.........................................................................................................1
Let’s start from scratch..........................................................................................1
The Java-way Time-Widget..................................................................................6
The Service-way Time-Widget (not working with 1.6 any more)..........................8
How to use Buttons on Widgets................................................................................9
Prerequisites.........................................................................................................9
The Layout............................................................................................................9
AppWidget Provider............................................................................................10
Manifest file.........................................................................................................10
ButtonWidget Provider........................................................................................11
Document history
Version Date User Description
1.0 2009-07-11 Norbert Möhring Initial document.
moehring.n [at] googlemail.com
1.1 2009-07-21 Norbert Möhring Small fixes in code (copy&paste erros ).
moehring.n [at] googlemail.com Thanks to Andreas Kompanez (ak@endlessnumbered.com)
for the review.
Better layout.
Added document history and table of contents.
Put all links behind text → looks better 
1.2 2009-07-23 Norbert Möhring Fixed some typos
moehring.n [at] googlemail.com
1.3 2009-09-27 Norbert Möhring - Some comments to the new 1.6 Version
moehring.n [at] googlemail.com - How to use Buttons on widgets
HelloWidget
Since there is only the one not that self explaining example of a widget I
decided to invest some nightly hours to cut that example into pieces and
then start from scratch with an easy to follow “Hello Widget” tutorial.
Prerequisites
You should already have the android SDK and android Eclipse IDE plug-in
installed and running. If not, go here to learn how to get started with the
android plug-in. Also you should have at least basic knowledge about Java
programming since this is not a Java tutorial.
Let’s start from scratch
In Eclipse, go to
File → new Project … → other … and select 'Android Project'
The project name will be “Hello Widget” and in this case the target platform will be ‘Android 1.5’.
Uncheck the probably already checked Box “Create Activity”. We won’t create an Activity here we just
want a simple widget.
How to: Android ‚Hello Widget’ Page 1 of 12
2. New Project Wizard
After that, your Project structure will look like this:
The project wizard gave us some default stuff already, like the default android app-icon e.g.
We’ll start with the layout and design of our widget.
Open main.xml and modify it like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:background="@drawable/widget_bg_normal"
android:layout_gravity="center"
android:layout_height="wrap_content">
<TextView android:id="@+id/widget_textview"
android:text="@string/widget_text"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal|center"
android:layout_marginTop="5dip"
android:padding="10dip"
android:textColor="@android:color/black"/>
</LinearLayout>
How to: Android ‚Hello Widget’ Page 2 of 12
3. We have a simple linear layout with a TextView for your message to display. At this point, you will get
an Error saying
ERROR Error: No resource found that matches the given name (at 'background'
with value '@drawable/widget_bg_normal')
That’s because you don’t have the widget_bg_normal resource at this point. I borrowed the image
from the SimpleWiktionary widget. It’s a png NinePatch image which will be our background of the
widget.
Put the file widget_bg_normal.9.png (or your own background image) into the folder res/drawable.
You also don’t have the @string/widget_text resource. To fix that, go to res/values/string.xml and add this
line to it:
<string name="widget_text">Hello Widget!</string>
string.xml will look like this:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="widget_text">Hello Widget!</string>
<string name="app_name">Hello Widget</string>
</resources>
We just finished our design part.
Now we have to tell Android that we are going to have a widget.
Open AndroidManifest.xml and go to the source view.
The lines you have to add are bold:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.thesmile.android.widget"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<!-- Broadcast Receiver that will process AppWidget updates -->
<receiver android:name=".HelloWidget" android:label="@string/app_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/hello_widget_provider" />
</receiver>
</application>
<uses-sdk android:minSdkVersion="3" />
</manifest>
How to: Android ‚Hello Widget’ Page 3 of 12
4. We declare our Broadcast Receiver which will be “HelloWidget”.
Don’t forget the dot before HelloWidget, this will create the full qualified path name with the declared
package at the top of the file. The Label of our application was already set be the project wizard and is
located in our string.xml.
From the documentation:
The <intent-filter> element must include an <action> element with the android:name attrib ute. This attrib ute
specifies that the AppWidgetProvider accepts the ACTION_APPWIDGET_UPDATE b roadcast. This is the only
b roadcast that you must explicitly declare. The AppWidgetManager automatically sends all other App Widget
b roadcasts to the AppWidgetProvider as necessary.
The meta-tag tells android about your widget provider. In this case, the widget provider is located at
res/xml/hello_widget_provider.xml. The provider.xml is pretty much self explaining:
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="146dip"
android:minHeight="72dip"
android:updatePeriodMillis="10000"
android:initialLayout="@layout/main"
/>
Define the size of your widget (should match the guidelines for desktop widgets).
updatePerdiodMillis as it’s name already says, the time in milliseconds to update your widget. In our
case, this is unimportant and we don’t need it because we don’t do any update on our widget.
The initial layout points the the main.xml file. We already defined our layout and design.
The only thing that is missing to run our widget is the Class that extends the AppWidgetProvider
which we declared in AndroidManifest.xml at the receiver-tag.
Create a new Class under the package de.thesmile.android.widget, name it HelloWidget
and set AppWidgetProvider as super class.
How to: Android ‚Hello Widget’ Page 4 of 12
5. Your new class will look like this:
package de.thesmile.android.widget;
import android.appwidget.AppWidgetProvider;
public class HelloWidget extends AppWidgetProvider {
}
Since our Widget is doing nothing, you’re now ready to go. To start your application, right click on your
project → Run As → Android Application
This will start the Android Virtual Device (AVD) and install your widget on this device.
How to: Android ‚Hello Widget’ Page 5 of 12
6. Now press and hold your left mouse button on the AVD Desktop screen until the menu pops up.
Select Widgets → Hello Widget …
… and have a look at the result.
Ok, that was pretty easy and now you have a widget which can do …. nothing 
Let’s do something with our widget ... display the current time. I’ll show you two versions of the time
example, one that I would call the Java-way and the other one to introduce you to services in widgets
(Service-way).
The Java-way Time-Widget
This is how the Java-way Time-Widget will look like. It will update
every second and display the time.
By the way: It’s 11:50 pm right now, I don’t know where the AVD
gets it’s time from but it’s definitely not my system time.
Now, open your empty class HelloWidget.
We have to override the protected method onUpdate from
AppWidgetProvider. Also, because of the Java-way, we’ll create
an inner class MyTime which will be derived from TimerTask. Just
have a look at the following code:
public class HelloWidget extends AppWidgetProvider {
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
Timer timer = new Timer();
timer.scheduleAtFixedRate(new MyTime(context, appWidgetManager), 1, 1000);
How to: Android ‚Hello Widget’ Page 6 of 12
7. }
private class MyTime extends TimerTask {
RemoteViews remoteViews;
AppWidgetManager appWidgetManager;
ComponentName thisWidget;
DateFormat format = SimpleDateFormat.getTimeInstance(SimpleDateFormat.MEDIUM,
Locale.getDefault());
public MyTime(Context context, AppWidgetManager appWidgetManager) {
this.appWidgetManager = appWidgetManager;
remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
thisWidget = new ComponentName(context, HelloWidget.class);
}
@Override
public void run() {
remoteViews.setTextViewText(R.id.widget_textview,
"Time = " + format.format(new Date()));
appWidgetManager.updateAppWidget(thisWidget, remoteViews);
}
}
}
The method onUpdate will be called at first. We create a timer that will run our MyTime-Thread every
second. The constructor of the MyTime-Class gets some information to update our widget on the
desktop.
Get our main view that we created (at that point you could also change your layout to another design).
remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
In the run method, we set the time with our new Date and update the remote View.
That’s already it. Now you have a widget that is displaying the current time.
At that point I want to give you some further information about a bug that has not been fixed yet, either
in the AVD nor on any machine. The bug-fix didn’t make it into the CUPCAKE Version (1.5).
To delete a widget, you tab and hold, then drag it and drop it into the trash can at the bottom.
At that point the widget provider usually runs an onDelete and onDisable method. Currently this is not
happening since the wrong IDs are sent. To fix this problem and really delete your widget, add the
following code to the onReceive method:
@Override
public void onReceive(Context context, Intent intent) {
// v1.5 fix that doesn't call onDelete Action
final String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
final int appWidgetId = intent.getExtras().getInt(
AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
this.onDeleted(context, new int[] { appWidgetId });
}
} else {
super.onReceive(context, intent);
}
}
onReceive is always called before onUpdate is called. This code snipped checks the called action
and decides weather to just run the receive method or the delete method.
Jeff Sharkey provided us with this useful code-snipped.
If you don’t do that, your widget won’t be displayed any more, but your widget provider will still run
onReceive and onUpdate in the given period (updatePerdiodMillis) which will eat up battery and
memory. It seems like this problem has been fixed in the 1.6 update so that you don't need this
additional code anymore.
How to: Android ‚Hello Widget’ Page 7 of 12
8. The Service-way Time-Widget (not working with 1.6 any more)
Usually your widget will do some more stuff than updating your time. To do so, you should create an
UpdateService.class. Here’s the Time-Widget with a service. This is just an example and I’m
pretty sure that the service-way of the time widget will eat up more battery than the Java-way.
To register and start the service, change your onUpdate method like this:
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
Intent intent = new Intent(context, UpdateService.class);
context.startService(intent);
}
The UpdateService.class looks like this:
public static class UpdateService extends Service {
@Override
public void onStart(Intent intent, int startId) {
RemoteViews updateViews = new RemoteViews(this.getPackageName(),
R.layout.main);
Date date = new Date();
DateFormat format = SimpleDateFormat.getTimeInstance(
SimpleDateFormat.MEDIUM, Locale.getDefault());
// set the text of component TextView with id 'message'
updateViews.setTextViewText(R.id.widget_textview, "Current Time "
+ format.format(date));
// Push update for this widget to the home screen
ComponentName thisWidget = new ComponentName(this, HelloWidget.class);
AppWidgetManager manager = AppWidgetManager.getInstance(this);
manager.updateAppWidget(thisWidget, updateViews);
}
If you want the time to be updated every second, your have to modify the hello_widget_provider.xml
file and set updatePerdiodMillis to 1000.
The android update 1.6 unfortunately does not support any update periode that is less then 30
minutes. The result is, that you can not run the “service-way” in 1.6 any more. Since updating every
second is not very useful concerning the battery life of your phone, the 30 minute minimum period
makes sense. Still, it is not very useful concerning development and testing because no developer
wants to wait for 30 minutes to test the update of his widget.
Anyway, for usability purposes one should always use an AlarmManager for widget updates, since you
can let the user configure the periode. I'll get to the AlarmManager in my next tutorial update.
How to: Android ‚Hello Widget’ Page 8 of 12
9. How to use Buttons on Widgets
After a few requests about updating this tutorial to show how buttons
work on widgets, I finally made it and here is an example App for
buttons. This application will not be functional like the Time-Widget. It
will just show you how you can add several buttons and click events.
Prerequisites
For the prerequisites, you already know how to create a widget project
from scratch. Just do that, or download the source code for this
example widget. You can get it here.
The Layout
For the layout, we use the main.xml which will look like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:background="@drawable/widget_bg_normal"
android:layout_gravity="center"
android:layout_height="wrap_content">
<Button android:text="B1" android:id="@+id/button_one"
android:layout_gravity="center_horizontal|center"
android:layout_height="fill_parent"
android:layout_width="wrap_content"/>
<Button android:text="B2" android:id="@+id/button_two"
android:layout_gravity="center_horizontal|center"
android:layout_height="fill_parent"
android:layout_width="wrap_content"/>
</LinearLayout>
We use the background from our first widget and add two buttons to it, that's all we need.
Since this example will also start an activity from a button, we have to create a layout for this activity.
This e.g. could be a configuration screen. The configure.xml file looks like this:
<TableLayout android:id="@+id/TableLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/TextOne"
android:text="Text"
android:textColor="@android:color/white"
android:textSize="15dip"
android:textStyle="bold"
android:layout_marginTop="5dip"/>
<EditText android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtFieldId"
android:clickable="true"
android:inputType="number"
android:layout_marginTop="5dip"
android:layout_marginBottom="20dip"/>
</TableLayout>
We just added a label with the string “Text” and a textfield to the screen. Nothing will be functional
here.
How to: Android ‚Hello Widget’ Page 9 of 12
10. AppWidget Provider
The appwidget-provider xml named button_widget_provider.xml is very simple. We don't need any
update periode so it will look like this:
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="146dip"
android:minHeight="72dip"
android:updatePeriodMillis="0"
android:initialLayout="@layout/main"
/>
Manifest file
The manifest file will have some more information this time and should look like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.thesmile.android.widget.buttons"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<!-- Broadcast Receiver that will process AppWidget updates -->
<receiver android:name=".ButtonWidget" android:label="@string/app_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<!-- Broadcast Receiver that will also process our self created action -->
<action
android:name="de.thesmile.android.widget.buttons.ButtonWidget.ACTION_WIDGET_RECEIVER"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/button_widget_provider" />
</receiver>
<!-- this activity will be called, when we fire our self created ACTION_WIDGET_CONFIGURE -->
<activity android:name=".ClickOneActivity">
<intent-filter>
<action
android:name="de.thesmile.android.widget.buttons.ButtonWidget.ACTION_WIDGET_CONFIGURE"/>
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="3" />
</manifest>
Ok, let's have a detailled look at it.
We already know about the first part. We register our ButtonWidget as a receiver which will react on
the intent with the filter APPWIDGET_UPDATE. We also know about the meta-data tag which declares some
widget properties. The new thing here is the ACTION_WIDGET_RECEIVER, which, as you can see, belongs
to our package. What we do is, we add a certain event to our ButtonWidget-Receiver. If this event
(android calls these events intent) is fired, our ButtonWidget will be called to react on it.
The second thing is the activity ClickOneActivity. We register the intent-filter ACTION_WIDGET_CONFIGURE
to this activity.
The code for the ClickOneActivity is pretty straight forward and you already know how that is working.
We only use the onCreate method here and display a Toastmessage:
public class ClickOneActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// change to our configure view
setContentView(R.layout.configure);
// don't call 'this', use 'getApplicationContext()', the activity-object is
// bigger than just the context because the activity also stores the UI elemtents
Toast.makeText(getApplicationContext(), "We are in ClickOneActivity",
Toast.LENGTH_SHORT).show();
}
}
How to: Android ‚Hello Widget’ Page 10 of 12
11. Now we can have a look at the AppWidgetProvider code to see how the intent-filters work.
ButtonWidget Provider
First of all, we configure our own events which we already used in our manifest file. You should always
make sure that your actions have unique names not only in the namespace of your own apps but in
the global namespace of the whole android framework. My idea is to just use your package name of
the application to insure that. (I didn't do that in this example)
public class ButtonWidget extends AppWidgetProvider {
public static String ACTION_WIDGET_CONFIGURE = "ConfigureWidget";
public static String ACTION_WIDGET_RECEIVER = "ActionReceiverWidget";
[...]
Now, let's have a look at the most important method; onUpdate()
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
Intent configIntent = new Intent(context, ClickOneActivity.class);
configIntent.setAction(ACTION_WIDGET_CONFIGURE);
Intent active = new Intent(context, ButtonWidget.class);
active.setAction(ACTION_WIDGET_RECEIVER);
active.putExtra("msg", "Message for Button 1");
PendingIntent actionPendingIntent = PendingIntent.getBroadcast(context, 0, active, 0);
PendingIntent configPendingIntent = PendingIntent.getActivity(context, 0, configIntent, 0);
remoteViews.setOnClickPendingIntent(R.id.button_one, actionPendingIntent);
remoteViews.setOnClickPendingIntent(R.id.button_two, configPendingIntent);
appWidgetManager.updateAppWidget(appWidgetIds, remoteViews);
}
First, we get the RemoteViews for our main layout; that's where we will be working on. Then we
configure a new Intent that will hold our configuration activity. This event will be given our action
ACTION_WIDGET_CONFIGURE.
The second Intent will be configured with our ButtonWidget and be given the action
ACTION_WIDGET_RECEIVER. We also give this action some extra data that we will use later to display
something on the screen. This is just to show you how you can add extra data to an intent and use it
later when this intent is captured by whatever application is catching it.
Now we use PendingIntents which will be given to the remoteViews as click-events.
From the documentation:
By giving a PendingIntent to another application, you are granting it the right to perform the operation you
have specified as if the other application was yourself (with the same permissions and identity).
As usual, we have to update our widget with the appWidgetManager to „commit“ the updates. Now
everything is registered to our widget and the button „B2“ will be working already since it will start our
Activity as soon as you click the button.
Button one will do nothing at the moment because we didn't tell our ButtonWidget to do anything when
it receives the action ACTION_WIDGET_RECEIVER.
How to: Android ‚Hello Widget’ Page 11 of 12
12. Let's have a look at the important method that can react on the ACTION_WIDGET_RECEIVER:
@Override
public void onReceive(Context context, Intent intent) {
// v1.5 fix that doesn't call onDelete Action
final String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
final int appWidgetId = intent.getExtras().getInt(
AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
this.onDeleted(context, new int[] { appWidgetId });
}
} else {
// check, if our Action was called
if (intent.getAction().equals(ACTION_WIDGET_RECEIVER)) {
String msg = "null";
try {
msg = intent.getStringExtra("msg");
} catch (NullPointerException e) {
Log.e("Error", "msg = null");
}
Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, intent, 0);
NotificationManager notificationManager =
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
Notification noty = new Notification(R.drawable.icon, "Button 1 clicked",
System.currentTimeMillis());
noty.setLatestEventInfo(context, "Notice", msg, contentIntent);
notificationManager.notify(1, noty);
}
super.onReceive(context, intent);
}
}
At the beginning I put the 1.5 onReceive-fix here, but this time we ask for our action in the else
statement before we call super.onReceive. If ACTION_WIDGET_RECEIVER is called, we get our extra data
from the intent (which was stored under the key „msg“) and display a Toast-Message with this string to
the user.
As a little gimmick I also show you how you use the NotificationManager of the android framework.
The message „Button 1 clicked“ will pop up on the notification bar (the bar where your clock is placed)
and will also show the widget icon.
Feedback appreciated
Author: Norbert Möhring (moehring.n [at] googlemail.com)
Blog: http://blog.thesmile.de
How to: Android ‚Hello Widget’ Page 12 of 12