android app to build dynamic user input forms with sms delivery - android

I am new to Android programming . I have just gone through the basic tutorials present in the samples folder when i downloaded the sdk
My task is to now build an app that does the following :
Create a form with 3 fields
namely name , address and phone
number
Values of these fields will be
present in local mysql lite
database of android and will be
displayed as a drop down list when i
click the respective fields
after doing so , when i click the
submit button , the app should send
an sms to a particular contact ,
here again the list of contacts must
be displayed as per what i have
provided in the mysql lite database
as a drop down list giving me the
option to send a to a particular
contact
I would appreciate any suggestions for the same
Thanks

I would start off just making an activity which takes text input from the user, then puts that into a sms and sends it. You can find a tutorial for sending sms here.
Once you have that working i would suggest that you then change it from text imput to your drop down menus(spinner widget) from your SQLite database, you can find a tutorial for spinners here, but rather than using a xml list to populate the spinner (as done in the tutorial) you would get your data from SQLite and put that into an array to use in your spinner.
Hope this helps get you started.

Related

Rearranging of contacts in chat application based on recent activity

I have built a chat application in android which is voice based. I am arranging my contact list alphabetically at present.
I want my application's contact list to be rearranged every time it receives a new voice message i.e I want the contact name on the top which receives the voice message lately. (Same as that of WhatsApp chat list).
Please suggest me the component or method I need to implement in my application to get it done. Will share my piece of code if needed. Please Help
Thank you
You can add a new attribute to your database that holds the timestamp of the last activity by users. Each time a message is received, sort your list according to the timestamp retrieved from your database.
watsapp store contact and recent activity in their own local sqlite db.
so create you own sqlite db to track user activities

Delete data corresponding to a particular user in other tables in Parse data browser for Android app

I'm using parse as a backend for an android app.What I'm trying to do is to automatically delete data corresponding to a particular user from other tables when that user is deleted from main User table.I am using pointer of user in other tables as a column to identify user.But it isn't working as per what I want to do.Please let me know if anyone here is having knowledge to accomplish this thing.
Thanks :)

Custom Contacts List in Android

I am looking to build a local Contacts list in Android. The user selects, say 3 contacts, from the address book and the code needs to save this list locally. The list should include Contact name, mobile number and email address. The user should also be able to edit this list. I am new to Android and struggling to get a solution for this.
The app I am building needs a user to create a local contacts list. I need to be able to extract the full contacts list from the Address Book and then the user gets to choose a limited number of contacts which get saved for later retrieval/modifications.
try Retrieving a List of Contacts in Android Developer.
This link may helps you to retrive the contact list.
Replace book objects with contact objects in the following tutorial and it might be useful...
http://stirfriedcode.blogspot.jp/2013/11/getting-specific-data-from-sqlite.html
I tried a new workaround and adapter-free solution . It's worth to have a look at :
https://github.com/draxdave/ConstraintAccordion

Accessing a web service from an android phone

Hello I am new to Android .I have been given an Android project to do. As a part of my project I need to do the following :
1)Create an Android application that takes 3 inputs from user via EditText namely id,address and contact no, and has a submit button at the end to send that data
2)After clicking the submit button , a web service that we will create using Netbeans should get invoked and display it's contents on the phone to the user
The web service will basically contain some predefined data entries that I want to display it to the user with a checkbox
say eg. xyz
yax
where 'xyz' and 'yax' are contents of my web service. The user selects any checkbox say 'xyz' , clicks another submit button below and the entire data namely id , address ,contact no , and now 'xyz' goes into a mysql database.
3) After reading this I am now aware of how to create a web service but the problem I have is how to invoke that web service from an android phone ???
Can someone please help me ?
You can directly use web-service from URL.

Possibility of a custom Contacts field with a set list of values and Contacts lookup performance

I'm pretty sure it's not viable to do what I'd like to based on some initial research, but I figured it couldn't hurt to ask the community of experts here in case someone knows a way.
I'd like to create a custom field for contacts that the user is able to edit from the main Contacts app; however, the user should only be allowed to select from a list of four specific values. A short list of string values would be ideal, but an int with a min/max range would suffice.
I'm interested in knowing if it's possible either way, but also wondering if it make sense to go this route performance wise. More specifically, would it be better to look up a contact (based on a phone number) each time a call or SMS message is received or better to store my own set of data (consisting of name, numbers, and the custom field) and just syncing contact info in a thread every so often? Or syncing contacts the first time the app is run and then registering for changes using ContentObserver?
Here is a similar question with an answer that explains how to add a custom field to a contact.
Thanks in advance.
I don't see the purpose to have your own set of data against contacts stored in your separate database, as you obviously will run into sync issues. You can use the mimetype and store whatever you want against the contact, in the manner you linked.
Whenever you want to looup contacts you can do that by using your custom mimetype. You get the contact id (from ContactsContract.Data.CONTENT_URI), and then you run another query to get the contact details (from ContactsContract.Contacts.CONTENT_URI). Please note these are different tables.
I'd like to create a custom field for contacts that the user is able to edit from the main Contacts app
I don't see that possible, editable from the main app, when you use your custom mimetypes, and you don't have much options here. The main contact app will display only the fields that are in SDK. You can store details against contacts but they won't show up in the inbuilt edit contact screen.

Categories

Resources