[android-developers] SQLite Open failed

2011-04-15 Thread Zsolt Vasvari
Out of thousands of users, one is getting the followiing error
suddenly:

I/Database( 9312): sqlite returned: error code = 14, msg = cannot open
file at source line 25467
E/Database( 9312): sqlite3_open_v2(/data/data/com.mycom.package/
databases/My Bookback, handle, 2, NULL) failed
Caused by: android.database.sqlite.SQLiteException: unable to open
database file
at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
at android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java:
1921)
at
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:
883)


Alll I can see is that error code 14 is simply a CANNOT_OPEN

Anybody has any ideas what could be causing this?  This is lady who
just migrated to a new phone (Captivate) -- I seriously doubt she
messed around with the ROM or anything.




-- 
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] Vertical text on canvas

2011-04-15 Thread Numeron
I have text which, when in portrait orientation, runs along the bottom of 
the screen. When the orientation is switched to landscape I want to draw the 
same text vertically along the same edge of the screen, so that it appears 
in exactly the same place as when in portrait mode. Other ui elements are 
drawn as normal for the new orientation. 

I have tried:

Path path = new Path();
path.moveTo(getWidth() - textGap, getHeight());
path.lineTo(getWidth() - textGap, 0);
canvas.drawTextOnPath(textString, path, 0, 0, paint);

and

canvas.save();
canvas.rotate(270);
canvas.drawText(textString, -getHeight() / 2, getWidth() - textGap, paint);
canvas.restore();

this works best, but bits and pieces of letters are still up to several 
pixels out from their origional position, as if the width of certain the 
letters changed. 

Even drawing the text onto a seperate canvas, rotated and drawn onto the 
current one doesnt seem to work as that forcibly applies antialiasing for 
some reason. That is even worse because the text is very small at 12 points 
and is better without it - the size of the text may or may not be a factor 
in my problem, though I would have thought a straight up 90 degree rotate 
would produce a perfect result regardless.

-Numeron

-- 
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 sqlite and multithreading

2011-04-15 Thread Evgeny Nacu
Hi everybody again!

So, advices here helped! Thanks!
After some research and testing this solutions seem to work OK:

I have only one!! writable sqlite db. (implemented using singleton as
some people suggested here)
Also, I've got some db code to synchronize write operations.
Only one thread can execute write transaction at one time. But I don't
care about opening Cursors and reading from them.
This solution works perfectly after some testing.

On 8 апр, 02:15, Dianne Hackborn hack...@android.com wrote:
 On Thu, Apr 7, 2011 at 2:04 PM, Nathan critter...@crittermap.com wrote:
  The database? I guess that would work if you only use ONE,
  statically determined database.
  Since I don't have just one, I think I need a singleton hash table of
  opened databases, like I mentioned.

 You are making this too complicated.

 class StuffDatabase {
   SQLiteDatabase mDatabase;
   static StuffDatabase getInstance();

 }

 class OtherStuffDatabase {
   SQLiteDatabase mDatabase;
   static OtherStuffDatabase getInstance();

 }
  I'll take your word for it. So if the user opens 10 or 100 databases
  in a session, I'll just leave them all open. That simplifies the
  singleton implementation if I don't have to do reference counting.

 Why in the world do you have 10s of databases?

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
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: How to force use only gprs even though wifi is available

2011-04-15 Thread kiran
Yes you are right, But thing is my application itself making wifi on.
Is it not possible to on wifi and gprs at a time?


On Apr 14, 2:34 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 You can disable WiFi by calling WifiManager.setWifiEnabled(false).

 Just don't forget to tell the user you're doing this.

 -- Kostya

 14.04.2011 13:18, saikiran n пишет:

  Hi,

  I am using internet in some application. If any wifi configuration is
  available while my application is running it is switching to wifi
  instead gprs.
  How can stop switching. My requirement is i have to use only gprs.
  Thanks in advance

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

-- 
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: onSaveInstanceState(Bundle) onRestoreInstanceState(Bundle)

2011-04-15 Thread ravi teja
Presently, I am facing the same issue. How did you resolve it?

Best,
Ravi

--
Raviteja
http://about.me/raviteja

-- 
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: String to Float Performance Ideas

2011-04-15 Thread String
If you have the rest of the code in place, I'd be reluctant to toss it out 
and start over with a SQLite implementation. Although it might do the 
conversion for free, it's going to be a much more general-purpose 
conversion routine, and thus is unlikely to be as fast as one you've 
optimized for your specific use case. You could put together a quick 
benchmark to see, but that'd be my expectation. 

String

-- 
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] Geo Location and webview

2011-04-15 Thread Moose
I have a web app with a tool in it that uses google maps (the web tool, not 
the android one). On my computers web browser I test it and it works fine 
(gives a surprisingly accurate location, marked with a pin). However, when I 
try and use it in the webview within my app, it does not get a fix on my 
location or place a pin. Shortly after the map loads, I get the Location 
set by GPS notification (Android 3.0 XOOM), however closing the map tool 
and reopening it does not change the result.

I have setGeoLocation(true) and both fine and coarse permissions are enabled 
in the manifest.

I do not need the location to updated constantly, I just need it to update 
once (in the future I may wish to have it update every n minutes or 
something). I don't want to have the GPS running constantly, as that would 
be a battery drain. I have been disappointed by the lack of a supplied 
sample, and all of the tutorials I can find don't (appear) to apply to a 
webview.

Note: I do not currently have access to the source code for the webapp, 
however I do know that it uses this:
( http://code.google.com/p/geo-location-javascript/wiki/SupportedPlatforms )
I could potentially obtain the relevant code, however as the problem does 
not exist on a computer browser, or on the stock browser, I know that the 
issue is with my app.

-- 
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 Debugger is DOG Slow

2011-04-15 Thread String
Sure, apps run slower when attached to the debugger, but that's hardly 
surprising given the overhead.

I have noticed that one of my apps seems to slow down more than the others, 
which leads me to believe that certain operations are more affected than 
others. It's never been problematic enough for me to dig further into it 
than that, but it might well be that your app is heavy on operations in this 
class. I'd suggest you profile a debugger run and post the results here. If 
it's something specific, it might well be something the toolchain folks at 
Google can improve upon for a future release.

String

-- 
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 Open failed

2011-04-15 Thread String
I see a handful of these in my Dev Console error logs, but have never had it 
happen somewhere I can chase it down. Here's a typical stack trace:

android.database.sqlite.SQLiteException: unable to open database file
Caused by: android.database.sqlite.SQLiteException: unable to open database 
file
at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
at android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java:1899)
at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:881)
at 
android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:168)

In one of my apps, where I ship a static database in /assets, I was able 
to work around this by catching the exception, deleting the offending .db 
file, then recreating it from my copy in the APK (same as I do on first 
installation). But you can't do that for user data.

In summary, I believe it's a platform bug, but nebulous enough that it's 
hard to create an error report for. :^(

String

-- 
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: in app purchase question for RESTORE_TRANSACTIONS

2011-04-15 Thread LA_
You'll get that in onPurchaseStateChange in the sample app (called
after RESTORE_TRANSACTIONS):
{nonce:4728283427316410369,orders:
[{orderId:1694851887421222,packageName:tv.app,productId:tv.options,purchaseTime:
1302452718521,purchaseState:2,developerPayload:null},
{orderId:509818957061234,packageName:tv.app,productId:options,purchaseTime:
1302718834942,purchaseState:0,developerPayload:null}]}

On 14 апр, 22:40, Andrei gml...@gmail.com wrote:
 For a managed item, how do I get order number for item
 that was once purchased and the app is installed on new device
 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] JOIN GRUP

2011-04-15 Thread ROYSUN TJHIU
THNKAS ADD GROPP

-- 
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: Vertical text on canvas

2011-04-15 Thread String
Have you tried Paint.setSubpixelText(false)? Or possibly 
Paint.setAntiAlias(false), if you're going the intermediate-canvas route.

String

-- 
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] Problem with Bouncing ListView

2011-04-15 Thread st0le
We have an application that has a listview which shows some contacts,
there are about 20 contacts shown at one time, and the user can use
the swipe gesture to move to the next 20, (or the previous) page

It works fine. Now, we've noticed Samsung (and maybe more) Devices
have augmented the listview to include a bounce effect, it lets you
pull (scroll) the Listview away from the border (leaving empty space
between the border and the first list item). When released the
listview kinda bounces on the top(or bottom) returns to normal.

Now, The actual problem.

The thing is when i swipe diagonally (orthogonally, it works fine), it
does 2 things simultaneously
1) pulls the listview to the middle
2) moves to the next page (shows a progress dialog and then reloads
the same listview with new records)

but the Listview doesn't retract to the top...instead it just stays
there in the middle (basically the bounce effect doesn't get a chance
to finish), to correct it the user has to scroll again.

It's hard to explain, if it's unclear i'll try and post a screenshot.

Any ideas how to make the bounce effect complete itself?

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] Native PDF Viewer

2011-04-15 Thread Diogo Salaberri
Hi..

I need to know if the android have ,as a native mode, a PDF viewer.
And if don't have, he has a lib native that can I work easily with
PDF.

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] about cursor

2011-04-15 Thread amey bura
Hi..initialize Cursor  properly..  can any one tell how  to
initialize Cursor  properly..?

-- 
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] Can we create UI component in a seperate XML file and load it

2011-04-15 Thread akruti patel
How can i leave this group.I have joint by mistake so how can i leave this?


On Wed, Apr 13, 2011 at 10:57 PM, Nasif Noorudeen nas...@gmail.com wrote:

 By using LayoutInflater
 On Wed, Apr 13, 2011 at 10:27 PM, usher usher...@gmail.com wrote:

 So I have created this activity, and setContentView() with mail.xml
 layout file.
 Now I want to add some textView dynamically into this screen. I
 already have these text view defined in a seperate xml file named
 view.xml.

 How can I instantiate these textview components and add them into
 screen?
 In
 I know we have inflate method, but once we call inflate, this view.xml
 will be added to screen automaticallyhow can we achieve this?

 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


  --
 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

-- 
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] Using cursor

2011-04-15 Thread amey bura
hi.. i have created login(empname , passwd) table.. I am trying to
fetch passwd from table for perticular empname by calling a function
getpwd ()from another activity ..
I am using following query..


public String getpwd(String uname)  throws SQLException

{
Cursor c  = db.rawQuery(select passwd from emp where
empname='+uname+' ,null);
  if(c!=null)
   c.moveToFirst();
  password = c.getString(4);

}

This code giving an error in logcat as
java.lang.IllegalStateException:   initialise cursor properly..

can anyone plz tell me how to remove this errors..?

any  suggetions  are welcome..

-- 
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] Progressive download with MediaPlayer

2011-04-15 Thread Fernando Valente
Hey,

I'm using MediaPlayer for audio streaming. I'd like to be able to
progressive download the audio and save it to the disk(i.e. record the
audio). Does anyone knows a way to do that?

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] java/lang/IllegalStateException

2011-04-15 Thread amey bura
How to prevent or avoid java/lang/IllegalStateException when dealing
with Cursors. The program is giving this error while accessing data
from database..

-- 
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] Capturing screens and sending it across from a device to another

2011-04-15 Thread gaurang...@gmail.com
Hi,

I am trying to build an application which shares an android device
screen with another android device. Mainly the way VNC or Microsoft
remote desktop connection works.

To do this i thought to capture the screen of the host android device
and send it across to the secondary android device. The problem i am
facing in the implementation of this application is that i am unable
to get any native api to capture my screen. I searched and came across
a good utility in eclipse to capture the screen but that does not help
me in what i intend to do. It helps you get an image and store it in
your development environment. My requirement is to capture the host
screen and then send it across to a different device.

Going further i would like to discuss the my approach later once i am
through with this preliminary step of my application, :)

The vantage point of this application will be when a user while
chatting and discussing an application or a display feature they have
will be able to share the screen of their own devices with any other
user. The way we do it in general with mstsc, rdc, nautilus on linux
or vnc

Any help in this will be highly appreciated.
--
Thanks  Regards,
Gaurang Mathur

-- 
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] Webview Certificate

2011-04-15 Thread Valen
In webview,I saw public method setCertificate and getCertificate.Can
we use setCertifiacate to add a CA certificate into webview?Will
webview use it to check websites' certificate?Or those two methods are
used to set and get websites' certificate?Thanks a lot!

-- 
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: java.lang.NullPointerException encountered while running Android Pre Compiler.

2011-04-15 Thread Ganesh
The problem is not due to Eclipse version but due to the outdate
examples on the internet particularly app-for-android
You can fix this by adding

 uses-sdk android:minSdkVersion=11 /

In the Manifest.xml file and copying the proguard.cfg file from a
blank project to the example project.


~gk

On Mar 12, 6:41 am, Xavier Ducrohet x...@android.com wrote:
 As we mention, you need to update to Eclipse 3.5.









 On Fri, Mar 11, 2011 at 4:06 AM, Dato dato...@gmail.com wrote:
  hi,

  I have the same issue. I'm using ADT10.0.0, eclipse3.4 on MacOsx

  --
  !ENTRY org.eclipse.ui 2 0 2011-03-11 19:59:38.453
  !MESSAGE Build problems
  !SUBENTRY 1 org.eclipse.core.resources 2 75 2011-03-11 19:59:38.453
  !MESSAGE Errors during build.
  !SUBENTRY 2 com.android.ide.eclipse.adt 2 75 2011-03-11 19:59:38.453
  !MESSAGE Errors running builder 'Android Pre Compiler' on project
  'SharePrice'.
  !SUBENTRY 2 com.android.ide.eclipse.adt 2 75 2011-03-11 19:59:38.453
  !MESSAGE java.lang.NullPointerException encountered while running
  Android Pre Compiler.
  !STACK 0
  java.lang.NullPointerException
         at
  com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.buil 
  d(PreCompilerBuilder.java:
  198)
         at org.eclipse.core.internal.events.BuildManager
  $2.run(BuildManager.java:633)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
         at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  170)
         at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  201)
         at org.eclipse.core.internal.events.BuildManager
  $1.run(BuildManager.java:253)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
         at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  256)
         at
  org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j 
  ava:
  309)
         at
  org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
  341)
         at 
  org.eclipse.core.internal.resources.Workspace.build(Workspace.java:
  330)
         at org.eclipse.ui.actions.GlobalBuildAction
  $1.run(GlobalBuildAction.java:182)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

  --
  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

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.http://developer.android.com|http://tools.android.com

 Please do not send me questions directly. 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] Android and External Keyboard

2011-04-15 Thread Indresh Gajbhiye
Hi,
I am working on connecting android phone 2.1 with external keyboard
with bluetooth connectivity.
Can suggest possible method to connect these two things, since the
external keyboard has no display.

Thanks n advance..
Indresh

-- 
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: MapActivity( 424): Couldn't get connection factory client

2011-04-15 Thread Ayush Sharma
could someone pls help me ?

On Thu, Apr 14, 2011 at 11:12 PM, ayush ayush.sha...@gmail.com wrote:

 Hello Experts,

 I am facing the error mentioned in subject line on loading my app. I
 have generated the key as per the right method and added it at the
 right place in mail.xml.
 I also read that it might happen because of wrong debug.keystore. i
 also went and regenerated keystore  corresponding key but no luck.
 Can some one pls help me with this.

 regards,
 ayush

-- 
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] Use Google Spreadsheets API in Android

2011-04-15 Thread Reptil
Hi,
I have already made a Web Application using the Google Spreadsheets
API with the following code giving my the liste of spreasheets i have
in my google account:

SpreadsheetService service = new SpreadsheetService(exampleCo-
exampleApp-1);
service.setUserCredentials(j...@gmail.com, mypassword);

URL metafeedUrl = new URL(https://spreadsheets.google.com/feeds/
spreadsheets/private/full);
SpreadsheetFeed feed = service.getFeed(metafeedUrl,
SpreadsheetFeed.class);
ListSpreadsheetEntry spreadsheets = feed.getEntries();
for (int i = 0; i  spreadsheets.size(); i++) {
  SpreadsheetEntry entry = spreadsheets.get(i);
  System.out.println(\t + entry.getTitle().getPlainText());
}

But that doesnt work in an Android Application because the gdata
library doesnt work with it.
So i have already know that i must work with the google-api-java-
client library..but i doesnt know how to make the conection with my
google docs account,like i have made above,but for Android ( working
with the  google-api-java-client library)

In the example here:http://code.google.com/p/gdata-java-client/wiki/
MigratingToGoogleApiJavaClient

We have:
HttpRequest request = transport.buildGetRequest();
  request.url = url;
  VideoFeed videoFeed = request.execute().parseAs(VideoFeed.class);
But in my own code i have:
HttpRequest request = transport.buildGetRequest();
request.url = metafeedUrl;
SpreadsheetFeed feed =
request.execute().parseAs(SpreadsheetFeed.class);
But SpreadsheetFeed is not a type of feed in this library.Wich kind of
feed i should have their?

Thank You

-- 
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] Option to unlock the boot loader for Sony Ericsson Android Gingerbread phones now available.

2011-04-15 Thread Carl
Hi,

It is now possible to unlock the boot loader for certain series of
Sony Ericsson 2011 Android™ Gingerbread phones.

Go to http://unlockbootloader.sonyericsson.com to get instructions and
a key to unlock the boot loader.

Please note that you may void the warranty of your phone if you unlock
the boot loader. See your phone’s warranty statement for details.
More information is available on the unlock boot loader web site.

For any questions, Sony Ericsson will monitor this thread on Google
groups. However, we cannot guarantee an answer for every question
asked in this forum. Please remember that you are unlocking the boot
loader at your own risk.

Br,
Carl Johansson
Sony Ericsson Developer World

-- 
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] Not able to connect with bluetooth keyboard using port

2011-04-15 Thread Tansen.In
I am not able to connect with blue tooth keyboard listening via port.
I do get some beep in the keyboard initially but after that nothing
happens.
using android  xperia phone and bluetooth keyboards (microsoft)

can body  suggest does this method listening via port is ok..

-- 
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: usb-serial controller

2011-04-15 Thread Gerhard
You have to load an additional driver for the specific device, look
for a pl2303.ko, which is the driver for your prolific converter. If
you cannot find it you have to compile it from the kernel sources.

I would be very interested in your findings, because I do some testing
with rs232 conversion on my zte blade. Communction with USB keyboard
and USB key work perfectly, but both converters I have are making
problems during communication.

The log is full with
7[04-09 00:28:21.503955] usb usb1: clear tt buffer port 1, a0 ep0
t00080a88
errors.

Which device do you use?

-Gerhard



On Apr 12, 4:26 pm, Giorgio Ascani gasc...@gmail.com wrote:
 Hi, i'd like to send/receive data from a device connected 
 byUSB-SerialController. When I connect the cable Android seems to recognize
 it because the logcat show:

 usb 1-2.2: new full speed USB device using ehci-omap and address 11
 usb 1-2.2: New USB device found, idVendor=067b, idProduct=2303
 usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 usb 1-2.2: Product:USB-SerialController
 usb 1-2.2: Menr: Prolific Technology Inc.

 but there's no reference to the device in /dev/ttyUSB0. How can i
 access to the device byUSB-SerialController?

 Cheers
 Giorgio

-- 
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] Keyboard in Gmail rich text

2011-04-15 Thread Pradeep
Hi,

If in Froyo we set browser user agent to desktop and then try to
compose a message in gmail.com. Keyboard does not get launched until
we move to plain text.

Has anyone faced this problem ? What might be the reason  ?

Regards,
Pradeep

-- 
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: Database shared by Activity and Service. What's the best approach?

2011-04-15 Thread bogde
Thank you both for taking the time to reply.

I read about ContentProvider and also read the thread you gave me. It
definitely looks like CP is the best approach for me. So I will have
the service write data to the database via CP, and the Activity will
use CP to display data. I wonder if this adds any unneeded overhead to
the whole application. The application runs on a WM8505 based Chinese
tablet with only 128 MB of RAM. The purpose of the entire hardware and
software is to record and display two values. I really hope the
hardware is good enough for the requirements.

Thanks again!

Bogdan


On Apr 14, 7:58 am, gjs garyjamessi...@gmail.com wrote:
 Hi,

 +1 contentprovider.

 This thread is possibly worth reading -

 http://groups.google.com/group/android-developers/browse_thread/threa...

 Regards

 On Apr 14, 2:22 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:

  On Tue, Apr 12, 2011 at 5:32 PM, bogde bogde...@gmail.com wrote:
    My question is, what would be the best way to
   accomplish this? How to share the database between the service that
   runs all the time and an activity?

  Content provider?

-- 
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] MapActivity( 424): Couldn't get connection factory client

2011-04-15 Thread ayush
Hello Experts,

I am facing the error mentioned in subject line on loading my app. I
have generated the key as per the right method and added it at the
right place in mail.xml.
I also read that it might happen because of wrong debug.keystore. i
also went and regenerated keystore  corresponding key but no luck.
Can some one pls help me with this.

regards,
ayush

-- 
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] Unable to get system library for project

2011-04-15 Thread Greg Brown
 On Wed, Apr 13, 2011 at 8:59 AM, Greg Brown gk_br...@verizon.net wrote:
 Does anyone have any suggestions as to how I might be able to permanently 
 resolve this?
 
 In the project settings is an Android entry. Under there is where you should 
 be specifying your build target. Try changing it to something else (like 1.6 
 or whatever) hit OK, the go back and change it again to what you really want 
 it to be. Maybe that will make it stick.

Thanks for the suggestion. I'll try this and let you know how it goes.

 There should be no need to manually set the Android library reference.

I agree.  :-)

 If all else fails, reinstall the SDK and / or Eclipse (making sure you have 
 at least 3.5 which the latest tools now require).

I have actually done this a couple of times already.  :-(  FWIW, I'm using 
Eclipse 3.6.

G

-- 
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] remove app natives

2011-04-15 Thread Diego Barbosa
Hi Guys
I wonder if it 's possible to leave my android running without anything, a
clean room ...all without android market, browser, anything ... just running
 my application 
it 's possible?

Hugs

-- 
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] services

2011-04-15 Thread SIC
Hi,
I have a doubt about android services and how to properly use them. I
will formulate my question by firstly explaining a scenario of an
application.
1) The application has to get current data of different sensors and
networks such as GPS, acceleration, orientation, magnetic field,
bluetooth/NFC stream, gsm/wifi network information etc.
2) There could be 1 or more data streams monitored at once at a
different rate, for example monitoring GPS data would be at much lower
rate than acceleration, however all the values will be related after
that.
3) There are 2 modes: monitoring mode and recording mode. When using
the second one the application has to continue recording even after
main activity is finished(foreground service) until not terminated by
the user.

I would like to say that I have read all the documents on this and
also a lot of forums but didn't obtain any certain answers from that.
So I will divide this questions in some sub questions:

Q1) What is the bast way to do the monitoring part only which has to
share data between activities.
Option1: using parcelable objects to send between activities and
starting new Sensor/GPS Listeners on every new activity. (note that
there could be external blue tooth sensors which implies bluetooth
connection each time)
Option2: using a service which will collect all the data and current
statistics and share to activities

(Q2,3 and 4 are quite related.)

Q2) What is the best Service Approach in terms of stability and
performance (we don't want the service to get accidentally killed and
for example static variables lost).

Option1: Using a service on a separate thread using AIDL interface
Option2: Using a service on the same thread but start heavy processes
(such as bluetooth connection) on a separate thread inside the servise

Q3) What is the best way of communicating with a service
Option1: AIDL interface
Option2: callbacks to/from the service
Option3: Using a content observer
Option4: Using static variables in the service
Option5: Using messages

Q4) What is the best way of get announcements from a service
Option1: Callbacks from the service
Option2: Using a content observer
Option3: Using messages
Option4: Using Broadcasting


Again my aim is to consider for Stability and Performance, thus I am
looking for specific reasons why one method is better than the other.

Thank you for your help!

-- 
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] Ticker

2011-04-15 Thread yf2zhang
Hi there,

I follow the codes in the link below and Ticker doesn't work. I can't
find ticker interface or anything about ticker in the reference at
Android Reference. Please help!
http://java.dzone.com/articles/google-android-tutorial?page=0,3

Thank youv ery much.

-- 
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] Programmatically play DTMF tones during a call

2011-04-15 Thread keithfry
I've read that it does not seem possible to play audio files while in
a phone call. However, I'd like to have an application play a DTMF
tone during a phone call. There shouldn't be any hw restriction on
this as the dial pad does this already when you press one of the
number keys. Instead I would like to have an application play this
tone automatically without requiring the user to touch the screen. An
example use case would be to recognize when the user has called their
voicemail number and automatically play the tones required to enter
their security code then begin listening to messages.

I've tried using the AudioManager.requestAudioFocus() to get access to
the voice call stream (AudioManager.STREAM_VOICE_CALL) but it always
returns REQUEST_FAILED. I can play the tone using ToneGenerator
without requesting audio focus, but it doesn't play over the voice
call just over the headset speaker.

Any suggestions?

-- 
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 SeekBar View with x thumbs design

2011-04-15 Thread lmp
Hi group,

I'm trying to make a custom seekbar that can have more than one thumb
much like this one:
http://jqueryui.com/demos/slider/#range-vertical (mine should be able
to be both vertical and horizontal though).

I'm trying to get my head around how to start - I've already looked
into the existing Andriod SeekBar view and derriving from ProgressBar
view.
As I see it none of those fit the purpose 100%. So I decided to roll
my own.

I've extended the View class, and played around.
It would be nice to have features that let users set the
background,colors etc. attributes for the seekbar and thumb(s) both in
code and with xml.

I'm quite uncertain how would be the best way to design this and where
to start?
Any pointers will be greatly appreciated.

Thanks
--
lmp

-- 
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 get the position of cursor in webview?

2011-04-15 Thread Bay
Dear all:

I am developing an application that could allow users to annotate in
webview page.

The concept is just like the software Moon+ Reader and Dolphin
Browser  that

could highlight, underline, and pop up a menu above the selected text.
Because the

function of one touch word selection is implemented in android 2.3,
I think that

they might edit from the source code. But I couldn't find where the
class is!

Could someone help me? 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] Android2.1and External Bluetooth Keyboard

2011-04-15 Thread Indresh Gajbhiye
Hi,

I like to know which is the best method of connecting the external
bluetooth keyboard and android2.1.
Rfcomm method
Does there is any other method

Let me know ...pls..

regards
indresh

-- 
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 run my applications more efficiently

2011-04-15 Thread Joseph Du
When I was using Eclipse or IntelliJ to run my own android
application, the IDE would start the emulator to verify how the
application works. The period of starting the emulator is so long. Do
you guys have any idea on how to reduce the cost on starting the
emulator or some ways to deploy my applications without reboot the
emulator, please? Thanks a lot 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


Re: [android-developers] new to andriod

2011-04-15 Thread Android K
http://developer.android.com/guide/basics/what-is-android.html

On Thu, Apr 14, 2011 at 8:17 AM, TreKing treking...@gmail.com wrote:

  On Wed, Apr 13, 2011 at 5:52 AM, shwet shweta.ta...@gmail.com wrote:

 I wanted to know how can I proceed


 Read the documentation?


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


 --
 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


-- 
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] C2DMBroadcastReceiver in Activity

2011-04-15 Thread nino
I have an application that uses C2DM notifications. I'm pretty new to
Android development because I think my problem is actually quite
simple and I just don't know how the android architecture works so
here it goes, I hope you guys can help.

What I did basically is copy the classes C2DMBaseReceiver,
C2DMBroadcastReceiver and C2DMMessaging from the chrometophone
project. I then created a C2DMReceiver extends C2DMBaseReceiver and
created the override events. The onMessage event works, as I added a
log entry to output the data I push to the device. Now I have an
activity and would like to pop up an alert box from the (already
opened) activity, as soon as a message is pushed to my device. I'm
really lost here, as I can't figure it out.

Google and many different forums/mailing lists are suggesting me to
initiate a BroadCastReceiver in the activity and override the
onReceive method. The problem is that the C2DMBroadcastReceiver has
declared the onReceive method as final, so there is no way to
overwrite it. So I started to think, that this is not the right way to
go...

I found some other example, telling me to send a broadcast from my
C2DMReceiver and watch this from my Activity, I think this sounds
reasonable, but I have no idea how to implement it.. Does anyone of
you have some examples on how to get started here?

-- 
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] Tree View

2011-04-15 Thread JS
Hi,
I am looking for some pointers on how to write a n level tree using
expandable list view. Any suggestions or pointers to code samples will
be great.
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] [How To] Custom Component: hide parent class attributes

2011-04-15 Thread Nihal
Hello,

I am kind of new to android development and I am developing custom
components.
I implemented InputField that extends EditText but do some validation
according to class attributes ( I have done also the XML attributes
part)

My question is:
How do I extend a specific widget and hide some XML attributes, as I
want to put static value to them.
For example, I want to extend the EditText and make the InputType
field hidden so only me can set it in my class.

Thanks a lot,
Nihal

-- 
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] Trying to load a list of overlay positions from file

2011-04-15 Thread matt h
Hi, I am trying to develop an app to list the bus stops for my local Public
Transit buses on a google map map,
but i seem to be having problem loading the overlay markers locations from a
text file

Heres the code i use to load a new overlay onto the mapview:


[CODE]
public void AddOverlayItem(int intLat, int intLong, String
strStop,String strType) {
 Toast.makeText(HelloGoogleMaps.this.getBaseContext(), intLat + , +
intLong + , + strStop + , + strType,Toast.LENGTH_SHORT).show();
 // TODO Auto-generated method stub
 ListOverlay mapOverlays = mapView.getOverlays();
 Drawable drawable = this.getResources().getDrawable(R.drawable.viva);

 if (YRT.equals(strType)) {
 drawable = this.getResources().getDrawable(R.drawable.yrt);
 }

 HelloItemizedOverlay itemizedoverlay = new
HelloItemizedOverlay(drawable,this);

 GeoPoint point = new GeoPoint(intLat,intLong);
 OverlayItem overlayitem = new OverlayItem(point, strStop, strType);

 itemizedoverlay.addOverlay(overlayitem);

 mapOverlays.add(itemizedoverlay);


}
[/CODE]


When i call the above code from a button i click from within my app all
works fine, settings get saved and marker appears on screen:

[CODE]
WriteSettings(HelloGoogleMaps.this,String.valueOf((int)(longitude*1E6))
+  +
 String.valueOf((int)(latitude*1E6)) +  +
  etStop.getText().toString() +  +
YRT);

AddOverlayItem((int)(latitude*1E6),(int)(longitude*1E6),
etStop.getText().toString(),YRT);
[/CODE]

But the problem i am having is when i call the following code at the end of
the onCreate method, my overlays do not appear:

[CODE]
public void RefreshStops() {
 // Refreshes the list of bus stop's
 //Find the directory for the SD Card using the API
 //*Don't* hardcode /sdcard
 File sdcard = Environment.getExternalStorageDirectory();

 //Get the text file
 File file = new File(sdcard,LocFile);

 try {
BufferedReader br = new BufferedReader(new FileReader(file));
String line;

while ((line = br.readLine()) != null) {
 String LineSplit[] = line.split();
 
AddOverlayItem(Integer.parseInt(LineSplit[0]),Integer.parseInt(LineSplit[1]),LineSplit[2],
LineSplit[3]);
}
 }
 catch (IOException e) {
//You'll need to add proper error handling here

Toast.makeText(HelloGoogleMaps.this.getBaseContext(),e.getMessage(),Toast.LENGTH_SHORT).show();
 }


}
[/CODE]

Contents of file being read:
longitudelatitudestopnumberbus-service

[CODE]
cat BusLoc2.txt
-79261518440062802511YRT
-79161518440062803243YRT
-79161518440062806465YRT
-7916151844006280675YRT
[/CODE]

I know the AddOverlayItem() method is being called from the RefreshStops()
method because i have put a 'toast' in the AddOverlayItem() method for debug
purposes and can see the info being passed to it correctly but for some
reason they are not appearing??

Any one have any idea why my markers are not being added?
Thanks for any help

-- 
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 find bandwidth usage by different activity

2011-04-15 Thread Rajesh Rathod
Hi,

I want to develop such application where we can find network bandwidth
used by different activity installed in mobile device. I gone through
google and found that TrafficStat class can provide some of the
information.

In there any other most efficient way to retrieve such information for
Wifi/3G/4G networks?

-- 
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] WebView in service.

2011-04-15 Thread Android K
Answer to this one is you can't do it. It's not a good idea to run webview
in a service.

On Tue, Apr 12, 2011 at 9:24 AM, Newbie interconnectt...@gmail.com wrote:

 Hi,
 I am trying to run the webview.loadurl() in the service. I have
 javascript that sends notification to App asynchronously. Is this
 possible to do?

 I can easily call the javascript from App and App from the javascript.
 But later doesn't work when running as service.

 TIA.
 Newbie!

 --
 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

-- 
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] Memory Management between NDK based app Dalvik VM based App

2011-04-15 Thread AndriodDev
Hi,

I want to know how internally memory management happen between NDK
based app and Dalvik VM based App as  lots of things are different in
android like app not able to kill...get killed when memory require

-- 
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] ApiDemos

2011-04-15 Thread Don
Hi
Is any one who can show where  ApiDemos Project is located. I just
join this group and  wishing to complete all project until Jul
Donatien

-- 
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] Is http://developer.android.com down...?

2011-04-15 Thread Lars
Not here

On Thursday 14 April 2011 13:59:13 Jitesh dedhiya wrote:
 

-- 
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] Sending data continuously over NFC in mode P2P

2011-04-15 Thread azahara
Hello,

I have an android application that is intended to send data over NFC
in p2p mode based on the API demo provided by Android. I have already
tested the program using two Nexus S (both with android 2.3.3). The
program runs well; however it is possible to send only one message per
device in one tap. That is, I cannot send more than one NdefMessage
per tap. The only way to continue the exchange of new NdefMessages is
to put the mobile phones away and tap then again (but again only one
message is possible to send for the current tap).

I am using the enableForegroundNdefPush() and
enableForegroundDispatch() functions provided by the API to send a
message, and disable the corresponding functions in the onPause()
state of the activity. Does anybody know why should I have to tap many
times the phones in order to send continuously data in p2p mode?.
This behavior corresponds to a feature of NFC, that only allows to
send one message per tap, or a problem concerned with the management
of the intent sent to the application when a NdefMessage is received
more than once?

Any clue, I will thank a lot.

-- 
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] Content P

2011-04-15 Thread Android K
Hi,
With my one week old knowledge of Android I am trying use content
provider. I get this exception, it seems to occur if AndroidManifest.xml
didn't have it. But my file does have it.

Any pointers are appreciated.

TIA.

Newbie.





04-14 20:15:03.029: ERROR/ActivityThread(637): Failed to find provider info
for com.providers.SubscribeContentProvider

I get this exception.

provider android:name=com.providers.SubscribeContentProvider

android:authorities=com.providers.SubscribeContentProvider

/provider

-- 
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] HTC hero z images problem

2011-04-15 Thread maidul
HI all.
I am maidul .I have one year exp with andoid os.

Currently I face a problem that HTC DESIRE Z does not show images from
sd card or gallary.

I want to show images .How  I show images by coding.

Can anyone give some coding hints.

Thanks and Regards
Maidul Islam

-- 
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] Eclipse Loan calculator help!

2011-04-15 Thread Jester
Hello all!

I'm starting out and new to the development of android applications
and also new to the java programming.  I'm trying to make a app that
will allow me to calculate a loan but I am running into some trouble
and need assistance.  Having virtually 0 experience with java I
researched java code that I could use but it did not seem to convert,
I have went through and tried to changed most the of the what I
thought needed to be changed but eclipse does not seem to recognize
what a parseDouble is.  How can I make this code work? below is the
code that i have in my main java file:

package com.android.loancalc;

import java.text.DecimalFormat;
import java.text.NumberFormat;

import com.project.calculator.R;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;


public class main extends Activity
{
 double principal; // original principal

  double intRate; // interest rate

  double numYears; // length of loan in years

  final int payPerYear = 12;
  NumberFormat nf;

public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

final DecimalFormat df = new DecimalFormat (#,###.##);

final TextView txtAnswer =
(TextView) findViewById(R.id.txt_payments);

Button btCal = (Button) findViewById(R.id.bt_calc);

btCal.setOnClickListener(new View.OnClickListener()

{

public void onClick(View arg0)
{
double result = 0.0;

TextView amountStr = (TextView) 
findViewById(R.id.txt_pricipal);
TextView periodStr = (TextView) 
findViewById(R.id.txt_years);
TextView rateStr = (TextView) 
findViewById(R.id.txt_interest);

try {
if (amountStr.length() != 0  
periodStr.length() != 0
   rateStr.length() != 0) {

principal = 
Double.parseDouble(amountStr);
numYears = 
Double.parseDouble(periodStr);
intRate = 
Double.parseDouble(rateStr) / 100;

result = compute();


txtAnswer.setText(nf.format(result));
}

}
catch (NumberFormatException exc)
{
txtAnswer.setText(Opps);
Log.v(myApp,exc.toString());
}
}


double compute()
{
double numer;
double denom;
double b, e;

numer = intRate * principal / payPerYear;

e = -(payPerYear * numYears);
b = (intRate / payPerYear) + 1.0;

denom = 1.0 - Math.pow(b, e);

return numer / denom;
}
});
}
}


Thanks for the help!

-- 
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] Creating scalable LinearLayout Background image

2011-04-15 Thread fr3sh
Hello,

is it possible to create a LinearLayout background image that
scales ?

As for the EditText widgets, I am able to create background images
(via draw9patch tool). There, I can define which image parts can be
(horizontally/vertically) stretched and which not. So the resulting
image is highly flexible.

LinearLayout background images do scale with the height/width per
default. But if my background image contains some sort of horizontal
line on the very top, this line is vertically stretched as soon as the
height of the Layout increases. Is it somehow possible to use
draw9patch to create a scale-intelligent background image?

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] Secure transport data between client and server

2011-04-15 Thread steben steben
Hi,
I work into securing data between webservice and client android, I
deloy my web service with https url,before that I created the server
and client certficate,so when I try to access on it into android it
gives me errors

 WARN/System.err(: org.apache.http.NoHttpResponseException: The target
server failed to respond
 WARN/System.err(: at
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:
85)
 WARN/System.err(at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:
174)
at
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:
179)
 at
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:
235)
at
org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:
259)


Here is it the code that I used to access to my web service

protected ClientConnectionManager createClientConnectionManager() {

SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme(http, PlainSocketFactory
.getSocketFactory(), 80));
registry.register(new Scheme(https, newSslSocketFactory(), 
8181));

HttpParams params = new BasicHttpParams();
params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 
30);
params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE,
new ConnPerRouteBean(30));
params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, 
false);
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
android.util.Log.d(ok2, ok1);
ClientConnectionManager cm = new 
ThreadSafeClientConnManager(params,
registry);
android.util.Log.d(ok, ok3);
return cm;
}

private SSLSocketFactory newSslSocketFactory() {
try {
KeyStore trusted = KeyStore.getInstance(BKS);
InputStream in = context.getResources().openRawResource(
R.raw.client);


trusted.load(in, changeit.toCharArray());

SSLSocketFactory sf = new SSLSocketFactory(trusted);

// Hostname verification from certificate
// 
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e506

sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);

return sf;
} catch (Exception e) {
throw new AssertionError(e);
}
}

-- 
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] C2DM : SERVICE_NOT_AVAILABLE

2011-04-15 Thread vokvince
Hi,

Yesterday i was developing an application with C2DM and my
registration was ok, I obtained a key :
APA91bHL5-
hShZFAMTNpQVwYXCxlvEPuXelUtpESrpFu96gbK-0dXC_5HLKk3h_mkoyHDr7ehudSb8ykx25NPdt7TApC2Cmd4w

It seems pretty good.
Unfortunately, today I try my application and i have an
error :SERVICE_NOT_AVAILABLE
My login (...@gmail.com) and my password are the same.

Eclipse error :
01-01 16:27:23.480: ERROR/C2DMRegistrar(2659): [C2DMReg] handleRequest
caught javax.net.ssl.SSLException: Not trusted server certificate

I don't understand why, someone can help me ?

Thx

-- 
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] REQ: Webmethods Developer (F2F interview in Chicago)

2011-04-15 Thread pradeep kumar
Hello Partners,

Please go through the following requirement I have with my client and let me
know if you have any suitable resume.

*Title: *Webmethods Developer
*Location: *Chicago, IL (*LOCALS ONLY*, *need In-Person Interview*)
*Duration: *6 months
*Rate: *market
*Description:
*

I need a webmethods Developer for JPMC in Chicago.  They must interview in
person

 Must have experience with webMethods 7.1
- Must have 5+ years using webMethods Developer
- Must have 3+ years using webMethods Websphere MQ adpater
- Must have 3+ years using webMethods Trading Networks
- Must have 3+ years exposing flow services as SOAP-Messaging web services
in webMethods Developer
- webMethods 8 experience a plus
* Please respond asap with the suitable resume.
*

Regards,



*Pradeep*

Sage IT, Inc.

Ph: 972-996-0650 Ext: 324 |Fax: 214-619-2034

pradeep.pagad...@sageitinc.com| vijay.ja...@sageitinc.com%7C
www.sageitinc.com

-- 
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] Augmented Reality - Please Help

2011-04-15 Thread vix
Hi ,

I am trying to work on Augmented Reality.

Can you please help with some :

Tools or

some material or

links etc.

Please Help .

Thanks
Vikas Dhar


-- 
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] Is it possible to create Auto Call Recording ??

2011-04-15 Thread Manu
Hi,

I am new to this technology  so i am doing some test projects in
various aspects..now my question is can we record calls automatically
in android os? if so pls explain it  how can we do that? will be
very thankful to u if provide some example program. 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] nexus s mifare desfire ev1

2011-04-15 Thread v.houba
Hello,

im trying out some new nexus s nfc functionality. since mifare
emulation is not (so far?) available for this device (or just
software?) im playing with proximity cards.
basically, i have a mifare desfire ev1 chip but for some reason i
cannot communicate it using NfcA.transcieve - im gettin IOException
with null getMessage().
Below is found the code i use. I can get valid id and techlist from
the tag. This code uses its own thread as well.

try {
Tag tag = 
intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);

txtTagId.setText(Tools.getHexString(tag.getId()));
txtTagTech.setText(Tools.join(, , tag.getTechList()));

NfcA T = NfcA.get(tag);

T.connect();

final byte[] APDU_getVersion = new byte[] { 0x60 };

byte[] response = T.transceive(APDU_getVersion);

T.close();

// notifyAll();
} catch (Exception e) {
Tools.DisplayException(e, ctx);
} finally {

}

Do you suggest any changes to the code?

-- 
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] Android widget eBook

2011-04-15 Thread Aungswee
The essential guide to Android widgets, an eBook featuring the top
ten Android widgets from various categories provides practical
information about widgets to help you choose the best widgets for your
device. http://www.smashwords.com/books/view/49216

-- 
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] Correct way of accessing vibrator for haptic feedback in Andorid

2011-04-15 Thread Shreshtha
Hi, vibrator hardware is present in audio module and there is ASoC driver in
kernel for same.
In actual vibrator hardware (rotary) is connected to D class amplifier of
audio chip (similar to how headphones are connected).
set of alsa_amixer -Dhw set/sset vibrator commands ...  configures
(set the route, path, sound volume etc.) the vibrator and make it play.
I want to use vibrator for haptic feedback. How to link haptic feedback to
vibrator playback. Should I use ALSA APIs to perform same? Where should it
be placed in android dir structure?
I see one implementation using timed_output driver with sysfs interface
(sys/class/timed_output/vibrator/enable).
But accessing ALSA device from inside the kernel (from timed_output vibrator
driver) is prohibited.
(http://mailman.alsa-project.org/pipermail/alsa-devel/2011-April/038865.html
)

Please suggest

BR
Shreshtha

-- 
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] VIDEO PLAYER Problem

2011-04-15 Thread Ansh
  Other recipients:   
  hey i m new to android and when i m trying to play a video file using the 
below code i m having the proble m tht its  not forwading (buffering is not 
being done)the video.and it is displying the first 
scene only.

HERE IS THE CODE:

package com.examples;

import java.io.InputStream;

import android.app.Activity;
import android.graphics.PixelFormat;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.MediaController;
import android.widget.VideoView;

public class MediaVedio extends Activity {
/** Called when the activity is first created. */
private MediaController mc;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.main);
   
  VideoView video = (VideoView) findViewById(R.id.videoView1);
  Uri uri = Uri.parse(android.resource:// +getPackageName()+ 
/+R.raw.ansh1);
  mc = new MediaController(MediaVedio.this);
  video.setMediaController(mc);  
  video.setVideoURI(uri);

  video.requestFocus();
  video.isPlaying();
  video.start();
  
}
}

-- 
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 make it fast Android - Tls connection

2011-04-15 Thread lkalove

To make TLS connection using SSLSocketFactory between android App, it
takes more than 10 Sec.
(only the first time.. Once the it is completed,  no need to wait 10
sec to make a connection.)

I think TLS library has problem. but I can't figure it out.
Do you know how to make connection properly?

-- 
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] about single user login in android

2011-04-15 Thread Prasanna
Hi want to make app for single user.how should i make it.

-- 
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] media player

2011-04-15 Thread Ansh
hey i m new to android and when i m trying to play a video file using the 
below code i m having the proble m tht its  not forwading (buffering is not 
being done)the video.and it is displying the first 
scene only.

HERE IS THE CODE:

package com.examples;

import java.io.InputStream;

import android.app.Activity;
import android.graphics.PixelFormat;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.MediaController;
import android.widget.VideoView;

public class MediaVedio extends Activity {
/** Called when the activity is first created. */
private MediaController mc;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.main);
   
  VideoView video = (VideoView) findViewById(R.id.videoView1);
  Uri uri = Uri.parse(android.resource:// +getPackageName()+ 
/+R.raw.ansh1);
  mc = new MediaController(MediaVedio.this);
  video.setMediaController(mc);  
  video.setVideoURI(uri);

  video.requestFocus();
  video.isPlaying();
  video.start();
  
}
}

-- 
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] Secure transport data between client and server

2011-04-15 Thread steben steben
Hi,
I work into securing data between webservice and client android, I
deloy my web service with https url,before that I created the server
and client certficate,so when I try to access on it into android it
gives me errors

 WARN/System.err(: org.apache.http.NoHttpResponseException: The target
server failed to respond
 WARN/System.err(: at
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:
85)
 WARN/System.err(at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:
174)
at
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:
179)
 at
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:
235)
at
org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:
259)


Here is it the code that I used to access to my web service

protected ClientConnectionManager createClientConnectionManager() {

SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme(http, PlainSocketFactory
.getSocketFactory(), 80));
registry.register(new Scheme(https, newSslSocketFactory(), 
8181));

HttpParams params = new BasicHttpParams();
params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 
30);
params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE,
new ConnPerRouteBean(30));
params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, 
false);
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
android.util.Log.d(ok2, ok1);
ClientConnectionManager cm = new 
ThreadSafeClientConnManager(params,
registry);
android.util.Log.d(ok, ok3);
return cm;
}

private SSLSocketFactory newSslSocketFactory() {
try {
KeyStore trusted = KeyStore.getInstance(BKS);
InputStream in = context.getResources().openRawResource(
R.raw.client);


trusted.load(in, changeit.toCharArray());

SSLSocketFactory sf = new SSLSocketFactory(trusted);

// Hostname verification from certificate
// 
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e506

sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);

return sf;
} catch (Exception e) {
throw new AssertionError(e);
}
}

-- 
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] ANDROID IMAGE TRANSMISSION IN A LOOP CONTINUOUSLY

2011-04-15 Thread Raghavaraju K
HI,
  I am a new  to android programming  and  I want to know how to move
an image in a loop continuously on android layout

1)I have stored the Image in res/drawable folder
2)   The Image which I stored is a hand Image and that Image should
show the button which is at the bottom of thelayout

3)   The hand Image should move up and down in the middle of the
layout continuously in a loop


PLEASE HELP ME WITH THE SAMPLE CODE FOR THIS



Help is always appreciated
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] ANDROID IMAGE TRANSMISSION

2011-04-15 Thread Raghavaraju K
HI,

I am new bie to android and i want to know how can we place two images
on a layout and move them in a opposite sides

1) I have placed the two images in two image-views

2) I want to apply transmission animation on the Images so that the
two Images will move,one Image towards left side and towards right
side
and these two images should dissappear after moving towards opposite
sides



PLEASE HELP ME WITH THE SAMPLE CODE

Help is always appreciated
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] Get text to string from website

2011-04-15 Thread Rob
I've got an environment set up where a call to a coldfusion page
(http://apps.company.com/appstartup.cfm) will return nothing but a
text string (no HTML, just the text string). I need my app to grab
that and build a string in the background when my app starts up. I
have no idea how to get the HTTP connection working for it. I have
looked at some samples but just ended up confused. :/

Can you guys help me?

-- 
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] ApiDemos

2011-04-15 Thread yogendra G
Hi Donatien,

It will be located in C:\android-sdk-windows\samples\android-10\ApiDemos

Regards,
Yogi

On Fri, Apr 15, 2011 at 6:54 AM, Don musamudonat...@gmail.com wrote:

 Hi
 Is any one who can show where  ApiDemos Project is located. I just
 join this group and  wishing to complete all project until Jul
 Donatien

 --
 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

-- 
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: How to export the project as a JAR file.

2011-04-15 Thread Dan
 You generally do not export the project as a JAR file.

 If you would take the time to explain precisely and clearly what it is
 that you are trying to accomplish, we may be better able to provide
 assistance.

I have a similar issue that I would have described the same way, but
I'll go with some details:

I have a nice .apk with a service and 4 activities, a shared native
library with some jni goodness, some drawable files in the res
directory and some other data in the assets directory.   Another
company would like to package the functionality of my .apk along
with their .apk so the user only has to make one download.

I would like to take their money with as small amount of work for
myself and their engineers as possible.  My current solution is to
send them a .zip file with all my classes, the assets, the resources,
and the native .so library, and the manifest, and my .mk files and
have them copy bits of the manifest into theirs, put the resources
and assets next to theirs, do the build process so the new R.java
is generated and then compile all my classes.

I would prefer not to give them the source code to my classes, but
the resources in R.java make that rough.  I do my builds through
ant on the command line, they use eclipse so there tends to be
some finger pointing when some functionality doesn't work.  Is
there a better solution than what I am currently doing and where
would I look for the details of what sort of things will bite me when
trying to pack files in a jar for someone else to reuse?  (E.g. is
there a workaround for providing a drawable ID for a notification?)

-- 
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: Vertical text on canvas

2011-04-15 Thread Numeron
subpixel and antialiasing are both off for drawing the text, and the image 
is even drawn with a paint with both these off though it still appears 
antialiased anyway. Same result as drawing the image with a null paint.

I think that the canvas rotate uses its interpretation algorithm even for 
orthagonal cardinal rotations, when it should be translating directly. Seems 
a bit silly.

-- 
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] Augmented Reality - Please Help

2011-04-15 Thread Robin Talwar
There is Layar API available and wikitude api is also good

But if you are using any of the above mentioned api's then the device must
have the Layar or Wikitude application
installed respectively.

considering the complexity of AR if you wanna develop a stand alone
application then its HARD

On Fri, Apr 15, 2011 at 10:52 AM, vix vikas.dh...@gmail.com wrote:

 Hi ,

 I am trying to work on Augmented Reality.

 Can you please help with some :

 Tools or

 some material or

 links etc.

 Please Help .

 Thanks
 Vikas Dhar


 --
 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

-- 
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] Can we create UI component in a seperate XML file and load it

2011-04-15 Thread Kostya Vasilyev

Start by reading the bottom of this email.

15.04.2011 11:01, akruti patel ?:
How can i leave this group.I have joint by mistake so how can i leave 
this?



On Wed, Apr 13, 2011 at 10:57 PM, Nasif Noorudeen nas...@gmail.com 
mailto:nas...@gmail.com wrote:


By using LayoutInflater
On Wed, Apr 13, 2011 at 10:27 PM, usher usher...@gmail.com
mailto:usher...@gmail.com wrote:

So I have created this activity, and setContentView() with
mail.xml
layout file.
Now I want to add some textView dynamically into this screen. I
already have these text view defined in a seperate xml file named
view.xml.

How can I instantiate these textview components and add them into
screen?
In
I know we have inflate method, but once we call inflate, this
view.xml
will be added to screen automaticallyhow can we achieve this?

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
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-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
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-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 



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
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: How to force use only gprs even though wifi is available

2011-04-15 Thread Jens
It is.

http://developer.android.com/reference/android/net/ConnectivityManager.html#TYPE_MOBILE_HIPRI


On 15 Apr, 07:18, kiran saikiran@gmail.com wrote:
 Yes you are right, But thing is my application itself making wifi on.
 Is it not possible to on wifi and gprs at a time?

 On Apr 14, 2:34 pm, Kostya Vasilyev kmans...@gmail.com wrote:

  You can disable WiFi by calling WifiManager.setWifiEnabled(false).

  Just don't forget to tell the user you're doing this.

  -- Kostya

  14.04.2011 13:18, saikiran n пишет:

   Hi,

   I am using internet in some application. If any wifi configuration is
   available while my application is running it is switching to wifi
   instead gprs.
   How can stop switching. My requirement is i have to use only gprs.
   Thanks in advance

  --
  Kostya Vasilyev --http://kmansoft.wordpress.com



-- 
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] Can we create UI component in a seperate XML file and load it

2011-04-15 Thread Robin Talwar
First create a class file not an activity and extend it with linearlayout
This will create your custom view .

Now lets suppose the package of your custom view is org.customView and class
is mylayoutfile.class

Then in the main.xml you can add this layout file just as you add a button,
textview or any widget but the important thing is how to write the name of
the widget.
Name of the widget will be the complete name of your custom view java file
like :-

org.customView.mylayoutfile android:id=
android:layout_width=...  /

instantiate this id in your main class

Dont forget to add constructors like :-

public NavigationBar(Context context, AttributeSet attrs) {
super(context, attrs);
}

public NavigationBar(Activity context) {
super(context);
}

This will be it now you just need to know how to iniflate it in your custom
view class :)

On Wed, Apr 13, 2011 at 10:27 PM, usher usher...@gmail.com wrote:

 So I have created this activity, and setContentView() with mail.xml
 layout file.
 Now I want to add some textView dynamically into this screen. I
 already have these text view defined in a seperate xml file named
 view.xml.

 How can I instantiate these textview components and add them into
 screen?

 I know we have inflate method, but once we call inflate, this view.xml
 will be added to screen automaticallyhow can we achieve this?

 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

-- 
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: String to Float Performance Ideas

2011-04-15 Thread Kostya Vasilyev

I haven't see the native part, but it's probably only useful for two things:

1 - Doing the final scaling by a power of ten, being able to handle very 
large or very small exponent values.


You could have your own lookup table for the range you need, say from 
10^-20 to 10^30, and use it when the final scaling factor is within this 
range. This would take just one floating point multiplication.


2 - To control the rounding behavior for this scaling.

This is a pretty expensive operation on the x86, as it involves 
saving/setting/restoring the FPU's control flags. Probably not much 
better on the ARM, if this is actually done.


It's important for 3D graphics (normals, intersections), but for 2D you 
can probably just let it be.


-- Kostya

15.04.2011 3:47, Paul пишет:

OK, have stripped the FloatingPointParser bare, but can't run it as
the native method, parseFltImpl() is throwing an
UnsatisfiedLinkError...

Maybe a silly question, but any ideas what to do from here?



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
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: Database shared by Activity and Service. What's the best approach?

2011-04-15 Thread Kostya Vasilyev

Two values?

Service running all the time?

Just put them into static variables accessible from both your Service 
and Activity classes. Back up into shared preferences or a file, so you 
can reload the latest values if/when the service/process is killed.


-- Kostya

14.04.2011 11:17, bogde пишет:

Thank you both for taking the time to reply.

I read about ContentProvider and also read the thread you gave me. It
definitely looks like CP is the best approach for me. So I will have
the service write data to the database via CP, and the Activity will
use CP to display data. I wonder if this adds any unneeded overhead to
the whole application. The application runs on a WM8505 based Chinese
tablet with only 128 MB of RAM. The purpose of the entire hardware and
software is to record and display two values. I really hope the
hardware is good enough for the requirements.

Thanks again!

Bogdan




--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
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] java/lang/IllegalStateException

2011-04-15 Thread Kostya Vasilyev

Most likely, by not closing the cursors before you read data from them.

Can't tell for sure until you post a stack trace from logcat.

-- Kostya

14.04.2011 11:01, amey bura пишет:

How to prevent or avoid java/lang/IllegalStateException when dealing
with Cursors. The program is giving this error while accessing data
from database..




--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
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: new to andriod

2011-04-15 Thread gjs
Hi,

Copy and paste 
http://developer.android.com/resources/samples/LunarLander/index.html
? The moon has long days, so there should be plenty of time ;-)

Regards

On Apr 14, 10:20 pm, Android K interconnectt...@gmail.com wrote:
 http://developer.android.com/guide/basics/what-is-android.html







 On Thu, Apr 14, 2011 at 8:17 AM, TreKing treking...@gmail.com wrote:
   On Wed, Apr 13, 2011 at 5:52 AM, shwet shweta.ta...@gmail.com wrote:

  I wanted to know how can I proceed

  Read the documentation?

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

  --
  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

-- 
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: Fragment Support forward compatibility?

2011-04-15 Thread alevapi
 in the current static library animations are broken.
 I have a fix that will be available in a later update

When do you think the fixed version will be available?
I'd love to use fragments on Gingerbread, but fragments with no
transition animation are a little too boring :(

--
Alexis.

On 11 mar, 03:14, Dianne Hackborn hack...@android.com wrote:
 Note that in the current static library animations are broken.  I have a fix
 for this that will be available in a later update.









 On Thu, Mar 10, 2011 at 4:57 PM, davemac davemac...@gmail.com wrote:
  There are some subtle differences between the Fragment compatability
  library and the native Fragment support in Android 3.0. For example,
  the setCustomAnimations() method on FragmentTransaction can use the
  new ObjectAnimator in Android 3.0 (see android.R.animator), but must
  use the older anim transitions pre-3.0 (see android.R.anim).

  - dave

  On Mar 9, 7:54 pm, Mark Murphy mmur...@commonsware.com wrote:
   On Mon, Mar 7, 2011 at 5:35 PM, Neal Sanche thorins...@gmail.com
  wrote:
I guess I just wanted to ask if, when this compatibility library was
developed, the design intent was to allow applications to run on
Android 1.6 - Android 3.0 inclusive without needing to change the
code?

   Yes, that was the intent.

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

   Android Training Worldwide: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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
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: C2DM : SERVICE_NOT_AVAILABLE

2011-04-15 Thread vokvince
I find the problem ! It was because I didn't have SIM , so the
synchronization didn't work.

+

On Apr 14, 3:12 pm, vokvince vokvi...@gmail.com wrote:
 Hi,

 Yesterday i was developing an application with C2DM and my
 registration was ok, I obtained a key :
 APA91bHL5-
 hShZFAMTNpQVwYXCxlvEPuXelUtpESrpFu96gbK-0dXC_5HLKk3h_mkoyHDr7ehudSb8ykx25NPdt7TApC2Cmd4w

 It seems pretty good.
 Unfortunately, today I try my application and i have an
 error :SERVICE_NOT_AVAILABLE
 My login (...@gmail.com) and my password are the same.

 Eclipse error :
 01-01 16:27:23.480: ERROR/C2DMRegistrar(2659): [C2DMReg] handleRequest
 caught javax.net.ssl.SSLException: Not trusted server certificate

 I don't understand why, someone can help me ?

 Thx

-- 
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 play inputstream from file?

2011-04-15 Thread Hitendrasinh Gohil
hi,

I am having mp3 file stored on my sdcard.Is there anyway to play
stream from that file.

i.e  i dont want to give a direct  file url in mediaplayer.i just want
to set inputstream to media player.

Is there anyway  to do this?

-- 
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 Apps, move apps into phone's memory, or switch them into external memory.

2011-04-15 Thread sblantipodi
I note that you are always here answering posts all the day, you
should improve
the management of your time so don't think to my time, think to
yours :)

Ok, just if someone is searching for this:
http://developer.android.com/guide/appendix/install-location.html

On Apr 15, 2:22 am, TreKing treking...@gmail.com wrote:
 On Thu, Apr 14, 2011 at 6:58 PM, sblantipodi
 perini.dav...@dpsoftware.orgwrote:

  I can't find this info in the doc, so I asked here,

 You didn't state that you even tried looking. Since this information is
 readily available, I could only assume you had not.

  If you don't want to answer, simply save posts and time ;)

 If I didn't want to answer, I wouldn't, but I did, so I did.
 If you can find the answer in the docs, simply save posts and time ;)

 Try this:http://developer.android.com/search.html#q=sdcardt=0
  http://developer.android.com/search.html#q=sdcardt=0
 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] Backward compatibility when compiling.

2011-04-15 Thread Marcin Orlowski
On 15 April 2011 11:26, sblantipodi perini.dav...@dpsoftware.org wrote:

 Hi,
 I have some apps that can run without problem in Android 1.6 so I
 compile them using Android 1.6.

Do you think that is better to compile using the newer SDK?


Don't fix it until is broken.


 Is it safe to do it in terms of compatibility? What about the
 automatic obfuscation when compiling using new SDK?


Obfuscation is not SDK dependant.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
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] remove app natives

2011-04-15 Thread Marcin Orlowski
On 14 April 2011 17:10, Diego Barbosa diegobcarne...@gmail.com wrote:

  I wonder if it 's possible to leave my android running without anything,
 a clean room ...all without android market, browser, anything ... just
 running my application 
 it 's possible?


Theoretically yes, but it's quite odd if you ask. And do not match to this
group profile, so do not ask here how and what to remove.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
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: Backward compatibility when compiling.

2011-04-15 Thread sblantipodi


 Don't fix it until is broken.


Ok, this is common but what is the real answer? :)
I would like to add this attribute to my manifest:
android:installLocation=preferExternal
but this requires SDK Level 8 to build the source.

Isn't safe to compile using Level 8 SDK only for this attribute and
than
run my apps on Level 4?


 Obfuscation is not SDK dependant.


I mean that from SDK 2.3 proguard has been integrated into the into
the SDK, this could be really useful for a
netbeans user like me.

-- 
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: Backward compatibility when compiling.

2011-04-15 Thread Marcin Orlowski
On 15 April 2011 11:57, sblantipodi perini.dav...@dpsoftware.org wrote:


   Don't fix it until is broken.

 Ok, this is common but what is the real answer? :)
 I would like to add this attribute to my manifest:
 android:installLocation=preferExternal
 but this requires SDK Level 8 to build the source.


Ok, so you got the real reason :) In this case you have to use higher SDK as
I am not aware of any other trick you could use for Manifest to add new
attribute and still be able to build against older SDK.


 Isn't safe to compile using Level 8 SDK only for this attribute and
 than run my apps on Level 4?


It can be assume such. If your code works fine now and the only thing you
want to change is the Manifest as said, then you can do it without risk. If
you are going to switch to Eclipse, you may want to try API Analysis plugin
Kostya linked lately: http://code.google.com/p/adt-addons/ looks promising
and intended to help in such cases.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

-- 
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] Backward compatibility when compiling.

2011-04-15 Thread sblantipodi
Hi,
I have some apps that can run without problem in Android 1.6 so I
compile them using Android 1.6.

Do you think that is better to compile using the newer SDK?
Is it safe to do it in terms of compatibility? What about the
automatic obfuscation when compiling using new SDK?

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


Re: [android-developers] Re: How to export the project as a JAR file.

2011-04-15 Thread Mark Murphy
On Fri, Apr 15, 2011 at 3:03 AM, Dan dan.schm...@gmail.com wrote:
 I have a nice .apk with a service and 4 activities, a shared native
 library with some jni goodness, some drawable files in the res
 directory and some other data in the assets directory.   Another
 company would like to package the functionality of my .apk along
 with their .apk so the user only has to make one download.

 I would like to take their money with as small amount of work for
 myself and their engineers as possible.

How are you with a gun? You'll get free wallets along with the money that way.

:-)

 My current solution is to
 send them a .zip file with all my classes, the assets, the resources,
 and the native .so library, and the manifest, and my .mk files and
 have them copy bits of the manifest into theirs, put the resources
 and assets next to theirs, do the build process so the new R.java
 is generated and then compile all my classes.

 I would prefer not to give them the source code to my classes, but
 the resources in R.java make that rough.  I do my builds through
 ant on the command line, they use eclipse so there tends to be
 some finger pointing when some functionality doesn't work.  Is
 there a better solution than what I am currently doing and where
 would I look for the details of what sort of things will bite me when
 trying to pack files in a jar for someone else to reuse?  (E.g. is
 there a workaround for providing a drawable ID for a notification?)

Well, the best answer would be an Android library project:

http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject
http://developer.android.com/guide/developing/projects/projects-cmdline.html#SettingUpLibraryProject

I do not know how well that handles NDK stuff, and my memory is fuzzy
on assets. The rest would be no problem.

Initially, you will wind up with stuff that will look like that you
need to ship Java code. However, there are workarounds for that.
Quoting myself from one of my books:

Android library projects are designed for distributing source code.
That may or may not be palatable in all cases. You can create a
binary-only library project via the following steps:

-- Create an Android library project, with your source code and such —
this is your master project, from which you will create a version of
the library project for distribution

-- Compile the Java source (e.g., ant compile) and turn it into a JAR file

-- Create a distribution Android library project, with the same
resources as the master library project, but no source code

-- Put the JAR file in the distribution Android library project's
libs/ directory

The resulting distribution Android library project will have
everything a main project will need, just without the source code.

You may also want to use some sort of unique prefix on your resource
files and names, so that you do not accidentally collide with a
project that is using your library.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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] In android how to search that sharedpreference contains some value or not?

2011-04-15 Thread Prasanna
In android how to search that sharedpreference contains some value or
not?

Actually I m making application which takes password and confirm
password as fields.when user start app for first time he must enter
both password and confirm password. But i want when user restart that
app he must ask to enter only password.

For that i store password in sharedPreferences but now how do i know
that their is already password exists in sharedPreferences or not?

so that if their is no password in sharedPreferences i can show the
activity which contains both password and confirm password to enter
AND if there exists password then i wl show activity that contains
only password to enter.

If Anyone have idea then please help me.

-- 
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] Is it possible to create Auto Call Recording ??

2011-04-15 Thread Mark Murphy
You have no access to the in-call audio stream, unless the device
happens to be in speakerphone mode.

On Fri, Apr 15, 2011 at 2:16 AM, Manu sathyamanoj.andr...@gmail.com wrote:
 Hi,

 I am new to this technology  so i am doing some test projects in
 various aspects..now my question is can we record calls automatically
 in android os? if so pls explain it  how can we do that? will be
 very thankful to u if provide some example program. 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




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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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] How to run my applications more efficiently

2011-04-15 Thread Mark Murphy
Leave the emulator running. Eclipse, at least, will deploy to the
existing running emulator rather than start a new one. A normal
development day would have you start the emulator once in the morning
and leave it run all day.

On Thu, Apr 14, 2011 at 11:07 AM, Joseph Du josephdu...@gmail.com wrote:
 When I was using Eclipse or IntelliJ to run my own android
 application, the IDE would start the emulator to verify how the
 application works. The period of starting the emulator is so long. Do
 you guys have any idea on how to reduce the cost on starting the
 emulator or some ways to deploy my applications without reboot the
 emulator, please? Thanks a lot 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




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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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] Programmatically play DTMF tones during a call

2011-04-15 Thread Mark Murphy
On Thu, Apr 14, 2011 at 10:53 AM, keithfry keith...@gmail.com wrote:
 I've read that it does not seem possible to play audio files while in
 a phone call.

You can play audio files while in a phone call, but they only come out
the earpiece or speaker of the phone your app is running on. The only
way the other end might hear it is if you are in speakerphone mode,
and I don't know how murky that turns out.

 I've tried using the AudioManager.requestAudioFocus() to get access to
 the voice call stream (AudioManager.STREAM_VOICE_CALL) but it always
 returns REQUEST_FAILED. I can play the tone using ToneGenerator
 without requesting audio focus, but it doesn't play over the voice
 call just over the headset speaker.

 Any suggestions?

What you want is not supported, sorry.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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] Capturing screens and sending it across from a device to another

2011-04-15 Thread Mark Murphy
On Fri, Apr 15, 2011 at 1:28 AM, gaurang...@gmail.com
gaurang...@gmail.com wrote:
 I am trying to build an application which shares an android device
 screen with another android device. Mainly the way VNC or Microsoft
 remote desktop connection works.

This is not possible with an ordinary SDK application.

 The problem i am
 facing in the implementation of this application is that i am unable
 to get any native api to capture my screen.

Correct.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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: Backward compatibility when compiling.

2011-04-15 Thread sblantipodi
 Ok, so you got the real reason :) In this case you have to use higher SDK as
 I am not aware of any other trick you could use for Manifest to add new
 attribute and still be able to build against older SDK.


I have the real reason yes but if this reason will damage backward
compatibility
I will prefer to forget this real reason.

 If your code works fine now and the only thing you
 want to change is the Manifest as said, then you can do it without risk.

You are talking about obfuscation now or about compiling with SDK
Level 8 and maintain compatibility with Level 4?


 If you are going to switch to Eclipse

We have too many to do with Netbeans, I will not switch to eclipse
only for Android since I don't feel the necessityu :)

-- 
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] Native PDF Viewer

2011-04-15 Thread Mark Murphy
On Thu, Apr 14, 2011 at 1:14 PM, Diogo Salaberri caxix...@gmail.com wrote:
 I need to know if the android have ,as a native mode, a PDF viewer.

No.

 And if don't have, he has a lib native that can I work easily with
 PDF.

Android has nothing built in for PDFs. Some Android devices ship with
PDF viewers, but they are not part of the operating system. There are
third-party libraries available (e.g., vudroid) that you are welcome
to experiment with.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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] In android how to search that sharedpreference contains some value or not?

2011-04-15 Thread Mark Murphy
On Fri, Apr 15, 2011 at 7:05 AM, Prasanna prasanna.kada...@gmail.com wrote:
 For that i store password in sharedPreferences but now how do i know
 that their is already password exists in sharedPreferences or not?

Read in the value using getString() on SharedPreferences. Supply null
as the 2nd parameter to getString(). If you get null as the return
value, that means the user has not supplied a password.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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


  1   2   3   >