Android Development

A place to discuss Android Development, Eclipes, the SDK, Java, xml and souch issues.

image on image viewer

hi
i am trying to display my image in an image viewer by selecting the image from gridview using sd card but i am unable to retrive that image can u help me out in this pls

access resource in android

hi this is
vinod
how i access resource from app to another app

File not found, hello world application

Hey guys, I have recently started reading the Android SDK documentation and thought I'd give it a go. After installing Eclipse and the ADT plugin I thought I was all set. I was wrong.

Everytime I try to run my application I get file not found errors on all of the executable files in the android/tools directory. This only seems to happen with android, i've tried re-downloading many times, all files are executable so I have no idea what's wrong. Could any shed any light on this?

[haze@shirley tools]$ ls
NOTICE.txt apkbuilder draw9patch hprof-conv sqlite3
adb ddms emulator lib traceview
android dmtracedump hierarchyviewer mksdcard
[haze@shirley tools]$ emulator
bash: /home/haze/android/tools/emulator: No such file or directory

And for the Eclipse plugin I get this error:

home/haze/android/platforms/android-1.1/tools/aapt: No such file or directory

but..

[haze@shirley ~]$ ls /home/haze/android/platforms/android-1.1/tools/
aapt aidl dexdump dx lib

I'm really confused.. and I just want to start developing

Google analytics API and eclipse

Has anyone on here got the google analytics api to install
and run on the android sdk with eclipse?

I'm using ther latest analytics api, android sdk and eclipse 3.5

I can get the 'import' files to install, but none of the analytics code ever compiles. I get messages which suggest it's just not setup correctly.

Anyone with any experience of the analytics api that can help me or at least tell me what setup they're running it on would be helpful.

Many thanks

A

Problem with pending intent with notification

Hello Friends, I am developing some application, in that I have implemented notification for message receiving. but when I click on notification it doesn't show desired intent. the code for that is as under.

public void notifyUser(String str, Context context, long receivedSms) {
String convertedStr = "abc";
NotificationManager noteManager = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
Notification note = new Notification(R.drawable.icon,
"Message Received", System.currentTimeMillis());
note.defaults = Notification.DEFAULT_LIGHTS;
Intent showSms = new Intent();
showSms.setAction("android.intent.action.MAIN"
showSms.addCategory("SMSRECEIVER"
PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
showSms, 0);
if (receivedSms == 1) {
note.setLatestEventInfo(context, "SMS in Lango", convertedStr,
contentIntent);
} else if (receivedSms > 1) {
note.setLatestEventInfo(context, "SMS in Lango", Long
.toString(receivedSms + 1)
+ " Messages unread", contentIntent);
}
notificationVar = true;
noteManager.notify(R.layout.buddy_list, note);
}

Is there any problem in code???
The manifest file code for particular class as under.

/>

Log Message:
07-15 23:23:28.636: INFO/ActivityManager(564): Starting activity: Intent { action=android.intent.action.MAIN categories={SMSRECEIVER} comp={com.lango.sms/com.lango.sms.SmsReceiver} }
07-15 23:23:28.986: WARN/InputManagerService(564): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4367da28

Thanks.

Can the handset LED be maniuplated without using a Notification object?

Good day all,

I would like to be able to control the LED on the handset with finer grained control than is offered by the Notification object. Notifications allow one to change the rate of flashing; e.g. 300 milliseconds on, 1000 milliseconds off, but that's it.

Essentially, I would like to turn the LED on and off at will at arbitrary times. Does anyone know if this is possible?

ID

I want to make UI Events but Eclipse underlines something in red:

Button button = (Button)findViewById(R.id.corky);

He underline "R.id".

I have a button whit the name "Ok"
what am I doing wrong?

My full class:

package stijn.test; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class Test extends Activity implements OnClickListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button)findViewById(R.id.corky); button.setOnClickListener(this); } public void onClick(View v) { // do something when the button is clicked } }

AndroSQL, An Android SQLite framework based on Enum provide a database debuger

Check out this post here http://negentropiccoder.blogspot.com

And the code source here http://code.google.com/p/androsql/downloads/list

In this post, I want to expose you AndroSQL, a SQLite framework based
on Enum that I builded to help me in my Android applications
developement.

I created an example application with a multiple selections dialog,
where you can create time schedules, edit and list them.

This example implement a tipical many-to-many relations.

Also, this application use the Enum capabilities to print out the
database content in your LogCat console.

The following sections will decribe my SQLite framework through the
explanation of my multiple selections dialog example.

Contents
The problem with the NotePad android tutorial
The Multiple choise dialog example
Define database with enum
The SCHEMA
The Tables
The DAO
The Debugger

editing google spreadsheet

I read that G1 allows editing Google spreadsheet now and i would like to use that in my app. Can someone help me?

Thank you.

What's the problem?

I dont know the problem in code.

protected Dialog onCreateDialog(int id, Context ctx) {

FileInputStream istream = null;
try {
istream = (FileInputStream) ctx.getResources().openRawResource(R.xml.sample);

/* Get a SAXParser from the SAXPArserFactory. */
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
/* Get the XMLReader of the SAXParser we created. */
XMLReader xr = sp.getXMLReader();
/* Create a new ContentHandler and apply it to the XML-Reader*/
ExampleHandler myExampleHandler = new ExampleHandler();
xr.setContentHandler(myExampleHandler);
/* Parse the xml-data from our URL. */
xr.parse(new InputSource(istream));
/* Parsing has finished. */

/* Our ExampleHandler now provides the parsed data to us. */
ParsedExampleDataSet parsedExampleDataSet = myExampleHandler.getParsedData();

switch (id) {
case DIALOG_MESSAGE:
return new AlertDialog.Builder(MainMenu.this)
//.setIcon(R.drawable.dialog_icon)
.setTitle("Test set text from local file"
.setMessage(parsedExampleDataSet.toString1())
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {

/* User clicked OK so do some stuff */
}
})
.setNeutralButton("Something", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {

/* User clicked Something so do some stuff */
}
})
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {

/* User clicked Cancel so do some stuff */
}
})
.create();
}
}
catch (Exception e){
e.getMessage();
}
return null;
}

Syndicate content