[android-developers] writing file

2010-05-08 Thread pramod.deore
Hello I am reading one image and convert that image to Base64 format
and write that to one txt file. But my code is not working properly. I
had not get correct output .(txt file is not correctly written),
Actually size of txt file has to be around 155kb but my txt file size
is about 266kb.  here is my code

public class ImageUp extends Activity
{
File readFile = new File(/sdcard/Images/c.jpeg);
File writeFile = new File(/sdcard/Images/Image.txt);
FileWriter fw;
PrintWriter pw;
FileInputStream fstream;
String str,base64String;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try
{
writeFile.createNewFile();
fw = new FileWriter(writeFile);
pw = new PrintWriter(fw);

readFile();
}
catch (Exception e)
{
e.printStackTrace();
}
}

public void readFile()
{
try
{
byte[] byteArray = new byte[102400];
fstream = new FileInputStream(readFile);
int bytesRead = 0;
while((bytesRead = fstream.read(byteArray)) != -1)
 {
 str = new String(byteArray,0,bytesRead);

 base64String = Base64.encode(byteArray);
 writeFile(base64String);
 System.out.println (base64String);
 }
pw.flush();
pw.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}

public void writeFile(String data)
{
pw.print(data);
}
}

I have Base64 class which accept byte array and return a String. what
is wrong in this code?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: AudioRecord Problem, please help!

2010-05-08 Thread ani
It is crashing in your NDK library.
So you need to put logs in your NDK and check for any problems there.
If it is crashing in Android Framework then people can help you in
this forum.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Data readable by two apps

2010-05-08 Thread Viktor Linder
Hi!
Is it possible to share files between two apps?

My scenario is this: I want to create a free/demo version of my game
and a complete version. The player should be able to play the free
version, then upgrade to the complete and continue where the free
version ended - ie. the complete version would need to load a savegame
created by the free version.

All answers appreciated!

Best regards,
Viktor Linder

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] External Fonts Make Low Memory Error

2010-05-08 Thread Sasikumar.S
Hi,


   - when i try to use external fonts in my app. Its crashing my app without
   any information.
   - In log cat it showed as *Low Memory . No More Background Process*.
   - I'm using 6 external fonts. Each exernal fonts containing more than
   350KB.


what's the problem with this?
Any suggestion ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Intents problem

2010-05-08 Thread blew
You may want to update your intent with the latest app state just
before the user leaves your application.
That way your onResume will work with the most up-to-date intent:
Either the one from updated by your widget or the one updated by your
app itself.


On May 8, 12:25 am, Esdras Beleza lis...@esdrasbeleza.com wrote:
 Hi,

 I have a widget that talks with an activity from my application. When
 I click in a button on my widget, it sends an intent to my application
 main activity, that handles it and shows a dialog.

 My problem is that if I go to another application, alternate between
 applications, go to home screen and back -- if my application is not
 in foreground -- and I go back to her, the old intent that my widget
 sent to my activity is handled again and suddenly a dialog is shown.

 The intent is handled using onResume, to handle the cases where the
 application was just created and when the application is restarted by
 widget, but also happens when user comes back to it.

 Does anybody here have any tip that could help me to solve this
 problem?

 Thanks in advance,

 Esdras Beleza

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Some connectivity questions

2010-05-08 Thread Poqit
Yes, its a pain, isn't it.
Go here, and 'star' it to move the feature request up the pile:

http://code.google.com/p/android/issues/detail?id=6518can=1q=3G%20mobile%20Wi-Fi%20type%3DEnhancementcolspec=ID%20Type%20Status%20Owner%20Summary%20Stars

There may be other similar enhancement requests. If there's a higher-
placed one, let us all know, and we can move that one up the pile
instead.

On May 5, 4:44 pm, Carlos Silva r3...@r3pek.org wrote:
 On Wed, May 5, 2010 at 15:15, draf...@gmail.com draf...@gmail.com wrote:
  I have a couple of questions about connectivity on Android, if anyone
  has any insight it would be great.

  What is the default when an application wants to wirelessly connect?
  Is it wlan? And if wlan is switched off or there is no access points
  around is it 3g or gprs?

  Is a device always ip connected? Or when its disabled from wlan or 3g
  does it's lose its ip address?

 AFAIK, you only have 1 *active* conection at a time. wireless or 3g, in
 order of preference.

 if none is available you only have a loopback interface up (127.0.0.1) that
 doesn't connect you to anything except you phone :)

 Is an application, for example the browser only ever connected to one ip 
 address? Or can it be connected to multiple addresses for each
  radio such as gprs or wifi (wlan)?

 Only one.

  Can an application decide which connection to open a socket to? For
  example can I create an application and decide whether to connect the
  socket to the wlan or gprs? Or does the OS decide?

 The OS decides. An application developer only have to worry about being able
 to use the Internet. nothing else.

  Finally how do native applications handle connectivity? In the same
  manner?

 I think they use the active interface, and since there is only one at a
 time, yes, it's in the same manner.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to build default applications as a seperate

2010-05-08 Thread Karteek N
Hi ,
I download the android source code. From that i want to run phone
application as seperate application.
I coped the phone application from packages/apps/ folder and placed in my
workspace.
If i am trying to import it shows the following error
*Android requires .class compatibility set to 5.0. Please fix project
properties.*
Why it is giving the above error. where iam wrong.
Please any one help me

Regards,
Karteek

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Data readable by two apps

2010-05-08 Thread Mark Murphy
Viktor Linder wrote:
 Is it possible to share files between two apps?

Yes, if they are signed by the same signing key and use the same user ID
-- see the android:sharedUserId attribute of the manifest element:

http://developer.android.com/guide/topics/manifest/manifest-element.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] emulator: ERROR: unknown virtual device name: myavd

2010-05-08 Thread saikiran n
Hi,
I installed android plugin and sdk for eclipse  in my system which is having
ubuntu.

I created an evd name as myavd as target 1.6.
It is successfully created.But when i want to launch it the following error
it is displaying
emulator: ERROR: unknown virtual device name: myavd
Any help please

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Custom Listview Background Focus State not working

2010-05-08 Thread Sasikumar.S
Hi,

In my program i'm using custom listview.
Each view contains a linearlayout.
I set linear layout background using selector (using custom xml file) its
working fine for default background state and selected state.
But its now working for focus state.
Any Suggestion ?

-- 
Thanks  Regards
Sasikumar.S

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] AddProximityAlert Disappears Although Expiration -1

2010-05-08 Thread Prasanna Perera
Hello,

I want my app to have a proximityAlert until the user removes it.  I
use expiration -1 to create this proximityAlert.  The proximityAlert
works.  But I find on my Droid phone, after adding a proximityAlert
and leaving the phone over night for charging, the proximityAlert does
not work the next day.  How can I make sure that my proximityAlert is
active indefinitely unless the user removes it?

Thanks,
Prasanna

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: aSmack library errors

2010-05-08 Thread rtreffer
Hi,

On May 2, 12:44 am, Alex Hall mehg...@gmail.com wrote:
 Hi all,
 I am relatively new to android. As a project for the programming class
 I am in, we have to make an app in android, and, since I am blind, I
 am working on a simple messaging program which will work with speech
 and the vibrator for feedback. To this end, I am trying to use the
 ASmack library with android1.6 (maybe 2.0). However, I get errors that
 say basic components of the library do not exist, like
 createConversation or packetFilter. Does anyone have experience with
 this library who can tell me why this might be happening?

I'm responsible for the mess :-) There a two main problems you might
have hit:
1. We got a classloading problem (found one recently, see logcat for
verifier errors) - File a bug at http://code.google.com/p/asmack/
2. You didn't initialize the library

Problem 2 is quite common, you've got to register the features /
packages you'll need. See Yaxim, Beem, Buddycloud or the Phonegap/XMPP
branch for examples.
See 
http://github.com/phonegap/phonegap-android/commit/947248fad673d398b6ca188012e32497fd689d67

Regards,
  Rene Treffer
 I import
 org.jivesoftware.* to be on the safe side. TIA for any help. Oh,
 please note that I do not use Eclipse because of accessibility
 problems.

 --
 Have a great day,
 Alex (msg sent from GMail website)
 mehg...@gmail.com;http://www.facebook.com/mehgcap

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] SQLite concurrent access best practices

2010-05-08 Thread Thierry Legras
Hi,

I have an application with several tables, each being updated by AsyncTask
fired by different Activities and used by UI with SimpleCursorAdapter.
Though i am not developping a game, I would like to avoid to interrupt the
user as mush as possible.
Has SQLite is not multiaccess proof, what is the best way of handling such
situation?

- I consider adding lock from each DB open and to each close sequence but
this seems quite subject to bugs
- The solution i am using now is that each DB access (read/write) is done in
UI thread (when AsyncTask completes, DB write is done typically in
onPostExecute), but that means user is blocked for several seconds during
the DB write.

Is there any better solution for that? Should i use a ContentProvider? when
i read Content providers store and retrieve data and make it accessible to
all applications, this does not seems to be what i need. Any idea?

-- 
Thierry.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Graphic Designer looking for some android fun

2010-05-08 Thread rcdeck
Hello everyone,

Just curious if there is anyone out there looking for a basic graphic
designer.  Not looking to do animations or anything, more along the
lines of UI work, icons, etc...

Please let me know if you are interested!

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] no such table: SFAndroid_PacoteVisita

2010-05-08 Thread Ray da Costa
Friends help one, someone knows why this error occurs, I am trying to save
data in sqlite and is giving this error

05-08 00:28:22.265: ERROR/Database(1341):
android.database.sqlite.SQLiteException: no such table:
SFAndroid_PacoteVisita: , while compiling: INSERT INTO

I'm trying to insert a list of objects and to perform this procedure this
error occurs after the first object to be Isere.

-- 
Ray da Costa
The best way to predict the future is to invent it.
Alan Kay

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Intents problem

2010-05-08 Thread Esdras Beleza
On 8 May 2010 05:39, blew pascal.jac...@gmail.com wrote:

 You may want to update your intent with the latest app state just
 before the user leaves your application.
 That way your onResume will work with the most up-to-date intent:
 Either the one from updated by your widget or the one updated by your
 app itself.



Hi,

I don't know if I understood your advice, but I tried some things like
that.

I tried to put new data into the intent (like a used flag) and updating
the intent with setIntent(updatedIntent). I also tried to create an useless
new intent and replace the application intent with setIntent(newIntent). But
every time that I go back to application the very first intent is handled
again with its original data and then the dialog is shown.

I tried to put some state into my code too, but how could my application
know the difference between an intent that was sent for the first time and
an intent that is being sent again? It's my main problem.

Thanks,


Esdras Beleza
http://www.esdrasbeleza.com
http://www.makeinstall.com.br



 On May 8, 12:25 am, Esdras Beleza lis...@esdrasbeleza.com wrote:
  Hi,
 
  I have a widget that talks with an activity from my application. When
  I click in a button on my widget, it sends an intent to my application
  main activity, that handles it and shows a dialog.
 
  My problem is that if I go to another application, alternate between
  applications, go to home screen and back -- if my application is not
  in foreground -- and I go back to her, the old intent that my widget
  sent to my activity is handled again and suddenly a dialog is shown.
 
  The intent is handled using onResume, to handle the cases where the
  application was just created and when the application is restarted by
  widget, but also happens when user comes back to it.
 
  Does anybody here have any tip that could help me to solve this
  problem?
 
  Thanks in advance,
 
  Esdras Beleza
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group athttp://
 groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] no such table: SFAndroid_PacoteVisita

2010-05-08 Thread Mark Murphy
Ray da Costa wrote:
 Friends help one, someone knows why this error occurs, I am trying to
 save data in sqlite and is giving this error
 
 05-08 00:28:22.265: ERROR/Database(1341):
 android.database.sqlite.SQLiteException: no such table:
 SFAndroid_PacoteVisita: , while compiling: INSERT INTO
 
 I'm trying to insert a list of objects and to perform this procedure
 this error occurs after the first object to be Isere.

The error seems straightforward: you do not have a table named
SFAndroid_PacoteVisita in your database.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Intents problem

2010-05-08 Thread Mark Murphy
Esdras Beleza wrote:
 I don't know if I understood your advice, but I tried some things like
 that. 
 
 I tried to put new data into the intent (like a used flag) and
 updating the intent with setIntent(updatedIntent). I also tried to
 create an useless new intent and replace the application intent with
 setIntent(newIntent). But every time that I go back to application the
 very first intent is handled again with its original data and then the
 dialog is shown.
 
 I tried to put some state into my code too, but how could my application
 know the difference between an intent that was sent for the first time
 and an intent that is being sent again? It's my main problem.

Check out this thread from a bit over a week ago:

http://groups.google.com/group/android-developers/browse_thread/thread/d8ea68116c17002a/af9b99df2dd7e03e

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] incoming or outgoing call event

2010-05-08 Thread Nandan .
Hii friends

i m trying to write a code when any one call me on my android phone after
disconnecting call i want to send  call information on any Sever.
There is any callback function in android to handle that type of situation.
yaa how can achive this in android.

i can access call log but i want that happens just after incoming call or
outgoing call disconnect.

can any  one help me .

thank you

with regrads
bhavesh

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] incoming or outgoing call event

2010-05-08 Thread Mark Murphy
Nandan . wrote:
 Hii friends
 
 i m trying to write a code when any one call me on my android phone
 after disconnecting call i want to send  call information on any Sever.
 There is any callback function in android to handle that type
 of situation. yaa how can achive this in android.
 
 i can access call log but i want that happens just after incoming call
 or outgoing call disconnect.
 
 can any  one help me .

http://developer.android.com/reference/android/telephony/TelephonyManager.html#ACTION_PHONE_STATE_CHANGED

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.5 Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] On using themes?!

2010-05-08 Thread Mariano Kamp
Hi,

I have trouble 
(examplehttp://groups.google.com/group/android-developers/browse_thread/thread/5b4ce3e49a1b63d2/)
wrapping my head around styles/themes. Can somebody help me or point me to
actual documentation?

Let's say I have a drawable that I want to use as the background of a
layout:

shape xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle
gradient android:startColor=#9F9FA4 android:endColor=#66FF
android:angle=270 /
/shape


Now I want to have a dark and a light theme. Depending on the chosen
theme I want to have a different value for startColor and endColor.
How do I do that? I am aware of extending themes, but what do I put
into the items? How do I reference those new values then?


Cheers,

Mariano

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Best practice for sharing a SQLiteCursor from one Activity to another?

2010-05-08 Thread westmeadboy
In one activity I build a cursor which is used to populate a ListView.

I want a secondary activity to be able to step through the cursor
entries. What's the best way to do this (bearing in mind cursor
lifecycle).

I don't care if the the system kills and restarts the secondary
activity since in that case the stepping through entries functionality
could be temporarily automatically disabled.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] WYSIWYG Tool for Android

2010-05-08 Thread flumby
Is there any iPhone's Interface Builder style tool for WYSIWYG for
Android?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Android GPS app stopped unexpectedly

2010-05-08 Thread redders
Not sure if you've fixed this by now, but you need to declare that
you're using the google maps library, or it doesn't like you.

Put this in your application tag
uses-library android:name=com.google.android.maps /

On Apr 10, 10:13 am, bob crcowboy...@gmail.com wrote:
 This is my manifest file:

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
     package=com.wissen.android

     application android:icon=@drawable/icon
         android:label=@string/app_name
         activityandroid:name=.Hello android:label=@string/
 app_name
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
 android:name=android.intent.category.LAUNCHER /
             /intent-filter
         /activity
     /application
     uses-permission android:name=android.permission.INTERNET/uses-
 permission
 uses-permission
 android:name=android.permission.ACCESS_COARSE_LOCATION/uses-
 permission
 uses-permission
 android:name=android.permission.ACCESS_FINE_LOCATION/uses-
 permission
 /manifest

 On Apr 9, 5:20 pm, ~ TreKing treking...@gmail.com wrote:



  On Fri, Apr 9, 2010 at 3:47 PM, bob crcowboy...@gmail.com wrote:
   I have the google maps api installed, and have tried to run it on
   the emulator and an actual droid with the same result. Thanks for
   the suggestion though

  And you've declared yourActivityclass in the manifest file?

  --- 
  --
  TreKing - Chicago transit tracking app for Android-powered 
  deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: WYSIWYG Tool for Android

2010-05-08 Thread polyclefsoftware
There's this:

http://www.droiddraw.org/

On May 8, 11:15 am, flumby jay.mojni...@gmail.com wrote:
 Is there any iPhone's Interface Builder style tool for WYSIWYG for
 Android?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Stopping other Activity from my Service..

2010-05-08 Thread Paul Turchenko
They restart the package

On May 6, 4:16 pm, Carlos Silva r3...@r3pek.org wrote:
 2010/5/6 Kostya Vasilyev kmans...@gmail.com

  If that were possible, it'd be a massive security hole.

 How does taskkillers (don't) work  then?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Very weird problem !!

2010-05-08 Thread pawan nimje
Hi all,

i have a listview [custom (2 textview and 1 image) ] and i have  a
filter(featues 1) for it

i.e when i type a in a textview (other than the above 2 mentioned) the
list contains only those name starting with a .

and i also have ascending / descending (features 2) button which when
clicked sorts the given list.

both these features aur running fine

But after im done using the filter, the asc/desc buttons dont work  the
on click listener gets called but the list is not sorted

if any one have come accross this prob help me

any kind of suggestion will do ...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Which device is best for testing development?

2010-05-08 Thread theSmith
The emulator is absolutely not good enough lol. Even with a high end
computer it is still slower than an actual device (because its doing
hardware emulation).

If you want some serious performance out of your game then get a Nexus
One, Droid or Incredible.

Otherwise feel free to pick up whatever. G1's are relatively cheep if
you get it used but are stuck on 1.6 as of now.


-Chris
---
Creator of My College Life
http://mycollegelife.org

On May 7, 2:14 am, kevin0228ca kevin022...@gmail.com wrote:
 Hi everyone.
 I am starting android development
 which phone is good for testing? or is emulator good enough? I am
 doing game devlopment, thanks

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Which device is best for testing development?

2010-05-08 Thread Maps.Huge.Info (Maps API Guru)
Right now, the Droid is probably the least expensive development phone
you can get. There are hundreds available on e-Bay for around
$250-300. One of the most popular devices out there now for Android is
the Droid, so if you're going to develop for the masses, then the
Droid (or the Milestone as a GSM version) is the device to have.

Many of the devs who received a Droid in the Market seeding program
are selling or have already sold their phones, the US based attendees
for Google IO received Droids as well and a lot of those people will
be selling them also. I have two of them myself and ATT as my carrier
so they can only be used as development devices... want to buy one?

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ViewFlipper bug in APILevels7

2010-05-08 Thread szabolcs
Symptom: the ViewFlipper starts flipping views in an irregular
pattern, much faster than the flipinterval set.

Cause: calling stopFlipping() / startFlipping() successively in
intervals less than the flipInterval results in the FLIP_MSG message
being submitted in the ViewFlipper's handler repeatedly, putting the
flipper in a totally FUBAR state, switching to the next child earlier
than it should.

I am mad at whoever wrote the ViewFlipper.java code found in SDK1.5,
1.6 (merged into AOSP under the anonymous initial-contribution email),
since ITS  BUGGY and it cost me an awful lot of time debugging my own
code, thinking I am doing something wrong!

I would also like to THANK Jeff Sharkey for fixing this code in his
1162fd77a8ff8467c96204c00bcaf941aef6aa85 patch.

Too bad we cant rely on the fixed code if we want to support devices
with android 1.5/1.6 as well.

-szabolcs

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Getting checked items from a listview of checkboxes

2010-05-08 Thread TreKing
On Thu, May 6, 2010 at 10:53 AM, Jaime joyx...@gmail.com wrote:

 getCheckedItemPositions() will get the positions but I can't figure out how
 to iterate over the listview to get the names.


Your list view will be backed by some adapter, containing the information
you're displaying (including the names) yes? So you have the checked item
positions - which pretty much tells you exactly which objects you need to
get from your adapter which should have the names you're interested in.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Need guidance for my first Android application

2010-05-08 Thread TreKing
On Thu, May 6, 2010 at 10:19 AM, jul juj...@gmail.com wrote:

 Hi,


Hi


 I'm starting Android doing an application for searching restaurants, and
 some guidance would be welcome!


OK!


 -Can I do everything in one single activity or should I do an activity for
 the search, one for the result list, one for the restaurant description, and
 another for the map?


A MapActivity is required to use MapView, so you need at least that. You
almost definitely want to break apart your app in separate, logical units
represented by activities, where each is something your app does. Your
search and results list could probably go in one activity, the details could
be another, and the map a third.


 -Would doing one single activity make the application more responsive?


No.


  -How can I use a list and a map within a normal activity
 (without ListActivity and MapActivity)?


You can't, again, the MapView requires MapActivity. Though you can probably
put a ListView in a MapActivity with it's MapView, but that would probably
look weird.


 Thank you


You're welcome. =)

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Starting a Mapactivity from a normal activity

2010-05-08 Thread TreKing
On Thu, May 6, 2010 at 9:24 AM, Josh joshd...@gmail.com wrote:

 I am having the same issue and the same amount of joy.


Since you're having the same issue, I will give you the same response the OP
got:

What error do you get. Check the logcat for hints on what might be wrong.


If you want a useful response you'll have to provide more information.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-05-08 Thread TreKing
On Thu, May 6, 2010 at 2:28 AM, Lorents iva...@gmail.com wrote:

 @TreKing - Wow, this thread is really bugging you...


Ha! The thread itself is not the problem - it's the flood of me too
comments that were artificially inflating my RSS feed. I just can't help
commenting on the absurdity of it all - or responding to comments directed
at me =P

BTW, I have had my phone a few days now and its awesome. Everyone else happy
 with theirs?

 (lol)


Jerk. =P

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Button click event not working 2.1

2010-05-08 Thread TreKing
On Thu, May 6, 2010 at 4:10 AM, MB eters...@gmail.com wrote:

 . Any help would be appreciated.


You already asked this question and I responded. There's no need to double
post.
http://groups.google.com/group/android-beginners/browse_thread/thread/f7a8b928a399759e/11d0823d47815e5b

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Button in ListView Event

2010-05-08 Thread TreKing
On Wed, May 5, 2010 at 11:50 PM, Siow yys...@gmail.com wrote:

 below is my code, but have error, any one can help one it??


You want to tell us what the error is, or should we guess?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] mapview on the top part of the screen ?

2010-05-08 Thread TreKing
On Thu, May 6, 2010 at 7:14 PM, jgan jim@gmail.com wrote:

 Does anyone know how to put mapview on the top part of the screen?

 The map always occupies the whole screen and squeezes out the views
 below.


Try setting the height to 0 and weight to 1. Then it should occupy all the
space leftover from the other views.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Which device is best for testing development?

2010-05-08 Thread TreKing
On Fri, May 7, 2010 at 1:14 AM, kevin0228ca kevin022...@gmail.com wrote:

 which phone is good for testing? or is emulator good enough?


For development, the emulator should be good enough to make an app, though
you'll definitely want to test it on devices. It's great to have a Droid or
other popular / powerful phone, but don't forget that many many people are
still on older devices and older platform versions.

So one could argue that the best device is the oldest, crappiest, slowest
phone that is still in active use (G1 FTW!) so you can code your game as
efficiently as possible and have it run on old hardware. Then you can pretty
much assume it will run brilliantly on any more powerful phone after that.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Java thread vs. native thread

2010-05-08 Thread ls02
Does anyone know how Java thread relates to Android native thread?
Does it map one to one?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Very weird problem !!

2010-05-08 Thread pawan nimje

 Hi all,

 i have a listview [custom (2 textview and 1 image) ] and i have  a
 filter(featues 1) for it

 i.e when i type a in a textview (other than the above 2 mentioned) the
 list contains only those name starting with a .

 and i also have ascending / descending (features 2) button which when
 clicked sorts the given list.

 both these features aur running fine

 But after im done using the filter, the asc/desc buttons dont work  the
 on click listener gets called but the list is not sorted

 if any one have come accross this prob help me

 any kind of suggestion will do ...




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Best practice for sharing a SQLiteCursor from one Activity to another?

2010-05-08 Thread Senthil ACS
I remember there is an interface named CrossProcessCursor that
implements Cursor.
Specify this interface in your aidl interface method.

On May 8, 7:21 pm, westmeadboy westmead...@yahoo.co.uk wrote:
 In one activity I build a cursor which is used to populate a ListView.

 I want a secondary activity to be able to step through the cursor
 entries. What's the best way to do this (bearing in mind cursor
 lifecycle).

 I don't care if the the system kills and restarts the secondary
 activity since in that case the stepping through entries functionality
 could be temporarily automatically disabled.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: SQLite concurrent access best practices

2010-05-08 Thread Senthil ACS
For insert() and update(), have it under synchronized blocks.

On May 8, 5:40 pm, Thierry Legras tleg...@gmail.com wrote:
 Hi,

 I have an application with several tables, each being updated by AsyncTask
 fired by different Activities and used by UI with SimpleCursorAdapter.
 Though i am not developping a game, I would like to avoid to interrupt the
 user as mush as possible.
 Has SQLite is not multiaccess proof, what is the best way of handling such
 situation?

 - I consider adding lock from each DB open and to each close sequence but
 this seems quite subject to bugs
 - The solution i am using now is that each DB access (read/write) is done in
 UI thread (when AsyncTask completes, DB write is done typically in
 onPostExecute), but that means user is blocked for several seconds during
 the DB write.

 Is there any better solution for that? Should i use a ContentProvider? when
 i read Content providers store and retrieve data and make it accessible to
 all applications, this does not seems to be what i need. Any idea?

 --
 Thierry.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Button in ListView Event

2010-05-08 Thread Senthil ACS
Dude..

In intent.setClass(), pass the first parameter as the activity context
that, in this case, can be obtained by declaring a final variable
outside the onClick() method so that it can be accessed inside.

Second paramter must be the target classname dot class.
(TargetClass.class)

Modifying hte code..


final Context ctx = this; // i hope this code is
within the main activity
holder.btviewdetail.setOnClickListener(new
OnClickListener() {
public void onClick(View v){
Log.e(TEXTValue,
mList.get(position).get(mIndex[3]).toString());
//productlistitem a = new
productlistitem();
//
a.test(mList.get(position).get(mIndex[1]).toString());

Intent intent = new Intent();
intent.setClass(ctx,
productdetail.class); // productdetail doesnt seem to be the class
name. Rename this as the class name
startActivity(intent);
}

});



On May 6, 9:50 am, Siow yys...@gmail.com wrote:
 I have one custom Listview with a button, now i want to click the
 button and open another class. below is my code, but have error, any
 one can help one it??

 this one is a custom adapter.

                 holder.btviewdetail.setOnClickListener(new OnClickListener() {
                         public void onClick(View v){
                                 Log.e(TEXTValue, 
 mList.get(position).get(mIndex[3]).toString());
                                 //productlistitem a = new productlistitem();
                                 
 //a.test(mList.get(position).get(mIndex[1]).toString());

                                 Intent intent = new Intent();
                                 intent.setClass(productlistitem.this, 
 productdetail.class);
                                 startActivity(intent);
                         }

                 });

 error in the intent setclass.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: mapview on the top part of the screen ?

2010-05-08 Thread Senthil ACS
503 by 480 is huge.
Try setting width as fill_parent and height as say 100dip.

On May 7, 5:14 am, jgan jim@gmail.com wrote:
 Hi

 Does anyone know how to put mapview on the top part of the screen?

 The map always occupies the whole screen and squeezes out the views
 below.

 The explicitly specified height and width does not help either.

 com.google.android.maps.MapView
                                         android:id=@+id/myMapView
                          android:layout_width=480dip
                          android:layout_height=503dip

 It works if the other views are on the top part of the screen and the
 mapview is at the bottom part.

 Thanks.

 Jim

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en