RE: [android-developers] add text to each image in gridview

2011-01-20 Thread Trung Liem Vo
Hi,

Your code is correct. 

Can you use each item contain imageview and textview. So your image will
have the label.

Best regards,
Trung Liem Vo 

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of pramod.deore
Sent: Thursday, January 20, 2011 11:40 AM
To: Android Developers
Subject: [android-developers] add text to each image in gridview

Hi, everybody

  I want to add label for each image in gridview how to do
this? I had tried with following code but it shows only images and not
text.

my xml file as:


http://schemas.android.com/apk/res/android";
android:id="@+id/myGrid"
android:text="Pramod"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:columnWidth="90dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"

/>

how to do 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


[android-developers] Problem with textview(WebTextView)

2011-01-20 Thread yogi
Hi All,

 I am have a problem, I created app in with webview in it.
Now when i open google.com and search a word. After that i just copy
and paste the content of the textview  again & again.
I saw that after some  repeated pastes the text is overlapping on the
with the previously existing text.
I was looking thought WebTextView.java but did not find any solution
here also for this problem.

Regards
Yogi

-- 
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: Locking and SQLIte

2011-01-20 Thread Kostya Vasilyev

Simon,

In your original message you wrote:


>  >  It used to be working pretty well until I started trying to put
>  >  progress spinners in which needed to go in a thread to display. (I
>  >  still can't get them to spin). At this point I started to get loads of
>  >  errors with database locks.


You definitely do not need a thread to display a progress dialog or a 
progress bar / wheel. I think using threads for this is the cause of 
your database issues, and actually you confirmed this too.


This describes progress dialogs:

http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog

I'd recommend implementing progress feedback as described there, by not 
using threads, to see if it makes a difference.


If you use threads to handle a lengthly insert / update operation, take 
a look at AsyncTask.


Now, with this being said, opening the database from two points in the 
code (application / service) and holding it for a length of time is not 
a good idea, as you already discovered.


Consider implementing a ContentProvider for your own use (you can mark 
it as non-exported, i.e. private to your application).


-- Kostya

20.01.2011 1:47, Simon Dean пишет:

Thanks for this. That explains why there's a lock from a read when I
try to do a write. But why does isLockedByOtherThreads() appear to
fail to work (bearing in mind Im calling it after I've read from the
database in the Service and just before I've ran the "INSERT" command
on the Activity)

Is "synchronized" a good way to get over this problem? And do you have
any links to real world examples? I've had a quick Google but Im
coming up with blanks.

Thanks
Simon

On Jan 19, 9:52 pm, DanH  wrote:

http://www.sqlite.org/lockingv3.html

On Jan 19, 8:00 am, Simon  Dean  wrote:


Im writing a scheduler/calendar type application.
The user enters some information and that gets stored in a database,
then I have a service which polls the database every sixty seconds
looking for events and spits them out via a notification.
It used to be working pretty well until I started trying to put
progress spinners in which needed to go in a thread to display. (I
still can't get them to spin). At this point I started to get loads of
errors with database locks.
I've done a lot of tidying up, now Im finding a problem between the
service and the insert commands.
The service utilises "getReadableDatabase" and "rawQuery", while the
separate updater function (user controlled) utilises
"getWritableDatabase" and "execSQL" to perform inserts.
I get errors in the log such as:
I/CMT (  405): Running Scheduler...
D/AndroidRuntime(  405): Shutting down VM
W/dalvikvm(  405): threadid=1: thread exiting with uncaught exception
(group=0x4001d800)
E/AndroidRuntime(  405): FATAL EXCEPTION: main
E/AndroidRuntime(  405): android.database.sqlite.SQLiteException:
error code 5: database is locked
E/AndroidRuntime(  405):at
android.database.sqlite.SQLiteStatement.native_execute(Native Method)
E/AndroidRuntime(  405):at
android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:
55)
E/AndroidRuntime(  405):at
android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:
1598)
E/AndroidRuntime(  405):at xxx.xxx.xxx.ProgramLocation:999)
I've asked elsewhere and I've looked for solutions such as using
synchronized (Im still trying to wrap my head around that at the
moment), but ideally what I want to know is why is this error being
generated. If I can find why things work instead of what the solutions
are, I'll be a better Android programmer.
Immediately before the insert, I check to see if the database
isLockedByOtherthreads(), but the answer is false. However it seems
when I open/read the database in the Service, Android then fails to be
able to do the Insert in the Activity and errors that the database is
locked.
Why does a read lock the database?
What is generating the lock?
Why does isLockedByOtherThreads() return false and then the Insert
fail?
Perhaps "database is locked" is an erroneous error and refers to it
not being able to generate an exclusive lock for the insert?
Is there a way to find out programmatically what locks there are on a
database?
And finally what are some solutions for this?
I presume I can do reads all over the app as I wish, but the problem
comes when I try to do a write at the same time a read is being
performed.
Perhaps I should disable the service while the update is in progress.
Or I've heard about synchronized but I really don't have any
experience with this and Im looking for some good (android related)
theory about what it is, how it works, why you do it, and how you do
it?
Thanks
Simon



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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

Re: [android-developers] Re: Will no longer support Android 1.5

2011-01-20 Thread Kostya Vasilyev

No, I'm not disputing those numbers at all.

What I meant is - it wasn't a weird phone made by a fringe manufacturer.

The phone a Motorola Backflip - AFAIK, it still runs 1.5 outside the US, 
and the 2.1 update in the US was not an OTA, so perhaps not everyone who 
could update actually did.


-- Kostya

20.01.2011 3:47, Indicator Veritatis пишет:

This is interesting: according to the dashboard, less than 5% of
individual phones connecting to the Google Android Market are still
running 1.5. Yet you call that 1.5 phone, "a certain quite popular
phone".

How could this be? I am curious to hear how either 1) the dashboard
sampling could be that far off or 2) how popular this phone really is.
Can you post the make and model# of the phone without compromising
confidentiality?

On Jan 17, 7:27 am, Kostya Vasilyev  wrote:

I recently ran into some 1.5 issues with my widgets that were caused by a
certain quite popular phone that still runs 1.5 ignoring @dimen values.

So supporting 1.5, understood as some kind of pure Platonic form, is no
problem at all, but dealing with bugs in particular firmware versions is not
fun at all.

For now, both my apps continue to support 1.5, but a new project I'm working
on will only run on 1.6+ - because that's the first version with
multi-resolution support, and one really needs that these days.

-- Kostya

2011/1/17 TreKing


On Mon, Jan 17, 2011 at 7:07 AM, Stringwrote:

For my own apps, I don't have a problem supporting 1.5, and I figure that
an extra 5% is nothing to sneeze at. But then, I've yet to run into anything
that was really problematic for me to support on 1.5. Some of the resource
handling is kind of annoying, but not really a big deal.
If I had some core feature that I just couldn't make backward-compatible,
then yes, I'd drop 1.5 too. But probably not until then, or until the
install percentage drops a few more points.

This. (Thanks for writing my post for me :-) )
-
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





--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] SIPDemo is not working...

2011-01-20 Thread Avi
I tried to use SIPDemo application on Android 2.3 - revision 9
emulator

But it returns null for the SIPManager.newInstance(this).

if

(manager == null) {
 manager = SipManager.newInstance(this);
}

On checking SIPManager.isAPISupported. It retruns false. Has any body
run SIPDemo application, any help is appreciated. I have already
specifed follwoing feature permissions in

the Manifest file:

<

uses-permission android:name="android.permission.INTERNET" />





Kindly please guide me how to fix this problem and run the SipDemo
application successfully.

-- 
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: Schedule notification instead of permanently check

2011-01-20 Thread Danny S.
Good Morning!

Wow, you helped me to get it work. I create a PendingIntent with a
unique id and store the intent mapped to their IDs in a HashMap. I
collect all intents with the known id and can the cancel them using
the AlarmManager. I dont know if it is recommended and efficient to
store those intents in a HashMap, but I need the PendingIntent when
I'll cancel the alarm and it worked.

Maybe I have to optimize something, but now I understood how to work
with the AlarmManager AND multiple scheduling tasks.

Thans a lot!
-Danny S.

On 19 Jan., 17:26, Kostya Vasilyev  wrote:
> Danny,
>
> The issue with multiple alarms comes up quite often, this is one of
> several responses:
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> -- Kostya
>
> 19.01.2011 19:09, Danny S. пишет:
>
>
>
>
>
>
>
>
>
> > Hi,
>
> > the AlarmManager is exactly what I need. It works fine, but I don't
> > figured out yet how to set more than 1 alarm on a AlarmManager.
>
> > I am using a BroadcastReceiver to receive that is called if the
> > scheduling time is reached. First I forgot to add the receiver- Tag in
> > the AndroidManifest.xml and wondered why the alarm is not fired ^^ But
> > now it works, but only for the last data I set on the manager.
>
> > Hope you can help, meanwhile I go home and do some searches on
> > Google :D
> > ´Thanks!
>
> > -Danny S.
>
> > On Jan 19, 10:49 am, "Danny S."  wrote:
> >> Hello Kostya,
>
> >> WOW, thank you very much, I'll have a look and reply with results and
> >> questions if I have ;-)
>
> >> -Danny S.
>
> >> On Jan 19, 9:09 am, Kostya Vasilyev  wrote:
>
> >>> 19.01.2011 10:07, Danny S. пишет:
>  Hi,
>  I have a service that is running in background. It needs to send
>  notifications to the user. In my application you can create data with
>  date and time. The service now can fetch this data and give the user a
>  notification t-x minutes before the saved time is reached ("remind for
>  appointments").
>  Can I set a fix moment when the service should send the user a
>  notification instead of listen/check all the time for (approximately)
>  time identity?
> >>> See AlarmManager
>  And a secondary question: how can I set "Autostart" for the
>  applications service?
> >>> See Intent.ACTION_BOOT_COMPLETED
> >>> -- Kostya
>  Thanks a lot!
>  -Danny S.
> >>> --
> >>> Kostya Vasilyev -- WiFi Manager + pretty widget 
> >>> --http://kmansoft.wordpress.com
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget 
> --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: Anyone with GL experience willing to take a contract/bounty?

2011-01-20 Thread Indicator Veritatis
Spend a little more time with "The Red Book" on OpenGL, and it will
make sense to you. It takes a couple of slight shifts in your way of
thinking, but one you change gears, it won't seem so unfriendly.

That said, the "slight shifts" are easier for those of us who used
homogeneous coordinates, orientable manifolds, combinatorial topology
and other similar mathematical ideas before;)

"The Red Book" is at http://fly.cc.fer.hr/~unreal/theredbook/ and for
OpenGL ES, is not out of date, even though that free copy is for
OpenGL 1.1.

One minor nuisance: the Red Book examples assume the use of OpenGL
commands using vertex lists built by bracketing drawing primitives
with glBegin() and glEnd(), but OpenGL ES does not support these. This
is a good idea why it is handy to learn OpenGL on your desktop first
before restricting yourself to the subset available in OpenGL ES...

On Jan 19, 6:58 pm, Brill Pappin  wrote:
> That explains a lot about why things didn't make sense to me... I kept trying 
> to tell it to simply draw points and connect them!
>
> It's actually those vertices that are giving me trouble... they are just not 
> friendly to an Application programmer :)
>
> - Brill Pappin
>
> On 2011-01-19, at 8:24 PM, Indicator Veritatis wrote:
>
> > OpenGL ES, the standard not just for Android but for all mobile phones
> > to date, only supports drawing triangles, not polygons. To get a
> > polygon, you have to triangulate it first, then pass an array of
> > vertices based on that triangulation.
>
> > Triangulation turns out to be a subtle combinatorial problem.
>
> > On Jan 17, 11:59 am, Brill Pappin  wrote:
> >> Thanks Robert. I'll take that advice.
>
> >> In particular what we want are some extensions to the framework(s) that 
> >> make
> >> supporting segmented maps easier for us to work with. Most frameworks have
>
>

-- 
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: Schedule notification instead of permanently check

2011-01-20 Thread Kostya Vasilyev

Danny,

Android already keeps a global registry of pending intents, so keeping a 
parallel hash map should not be necessary.


To cancel an alarm, you don't need a reference to the original Java 
object, you can just construct a pending intent the same way as you did 
when setting the alarm (including the request code).


The hash table can go away with the process, while alarms persist (with 
them being inside Android). If you're relying on the map being an 
up-to-date representation of your alarms, make sure that it's correctly 
reconstructed from scratch - or get rid of it altogether.


-- Kostya

20.01.2011 11:55, Danny S. пишет:

Good Morning!

Wow, you helped me to get it work. I create a PendingIntent with a
unique id and store the intent mapped to their IDs in a HashMap. I
collect all intents with the known id and can the cancel them using
the AlarmManager. I dont know if it is recommended and efficient to
store those intents in a HashMap, but I need the PendingIntent when
I'll cancel the alarm and it worked.

Maybe I have to optimize something, but now I understood how to work
with the AlarmManager AND multiple scheduling tasks.

Thans a lot!
-Danny S.

On 19 Jan., 17:26, Kostya Vasilyev  wrote:

Danny,

The issue with multiple alarms comes up quite often, this is one of
several responses:

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

-- Kostya

19.01.2011 19:09, Danny S. пишет:










Hi,
the AlarmManager is exactly what I need. It works fine, but I don't
figured out yet how to set more than 1 alarm on a AlarmManager.
I am using a BroadcastReceiver to receive that is called if the
scheduling time is reached. First I forgot to add the receiver- Tag in
the AndroidManifest.xml and wondered why the alarm is not fired ^^ But
now it works, but only for the last data I set on the manager.
Hope you can help, meanwhile I go home and do some searches on
Google :D
´Thanks!
-Danny S.
On Jan 19, 10:49 am, "Danny S."wrote:

Hello Kostya,
WOW, thank you very much, I'll have a look and reply with results and
questions if I have ;-)
-Danny S.
On Jan 19, 9:09 am, Kostya Vasilyevwrote:

19.01.2011 10:07, Danny S. пишет:

Hi,
I have a service that is running in background. It needs to send
notifications to the user. In my application you can create data with
date and time. The service now can fetch this data and give the user a
notification t-x minutes before the saved time is reached ("remind for
appointments").
Can I set a fix moment when the service should send the user a
notification instead of listen/check all the time for (approximately)
time identity?

See AlarmManager

And a secondary question: how can I set "Autostart" for the
applications service?

See Intent.ACTION_BOOT_COMPLETED
-- Kostya

Thanks a lot!
-Danny S.

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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: Android's default browser - help for directions

2011-01-20 Thread Indicator Veritatis
Shouldn't that be somewhere in the Android source? I never did figure
out how to navigate the source, despite the documentation at
http://source.android.com/source/index.html, but that is probably
where you should start.

One of the Google groups concerned with the Open Source Project or
with Porting is probably a better place for your question anyway.

On Jan 19, 8:44 pm, kypriakos  wrote:
> Does anyone know where the source code for the native browser is?
> Is it embedded in the android src distribution?
>
> Thanks
>
> On Jan 19, 1:01 am, kypriakos  wrote:> HI all,
>
> > I asked before how well Android's native browser handles AJAX
> > and javascript as it does seem to fall into the same-origin policies
> > that Firefox and other browsers handle properly. I also asked as
> > to how the comms between this clients running on the browser and
> > remote servers work. I haven't gotten any responses on this so I am
> > kindly asking:
> > (1) isn't Android's native browser a main feature of the Android OS?
> > I don't seem to find many people discussing it. Is Opera Mini or
> > Mobile
> > a more popular choice?
> > (2) Does anyone have details on how this browser is implemented
> > or where I can find that? Is it a derivative of the WebKit?
> > (3) I am barking at the wrong tree regarding my issues above? Are
> > there any other resources that I should be targetting to get
> > responses?
> > I did try Ajax, Opera etc. but not much luck there either,
>
> > Any information will be greatly appreciated.
>
> > Thanks again
>
>

-- 
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 launching Google Goggles from camera app

2011-01-20 Thread blindfold
I'm launching Google Goggles from my own camera app through an intent,
which generally works fine, but occasionally Google Goggles refuses to
launch, popping up an error message reading

> Camera Error
>
> Cannot connect to camera. You may need to restart your device.

and after pressing OK my app takes over again and successfully resumes
its own use of the camera (no device restart, and not even an app
restart). Now of course only one app at a time can use the camera, so
I explicitly first release() the camera and set my camera object to
null before launching Google Goggles.

Just waiting for camera==null to happen automatically after a
camera.release() does not work: log output shows that the camera
object remains non-null after doing a camera.release(), and I have to
explicitly set it to null as is common practice, but after that
something is sometimes still blocking reuse of the camera. I suspect
that some camera ownership flag is still floating around deep down in
Android, but if it is not somehow exposed such that I can check for it
then it is of no use.

So what *else* can I check for to make sure that the camera REALLY has
been released and *is* available before handing control to another
camera app? Or should it be filed as an Android bug?

The problem occurs on my HTC Desire running Android 2.2. BTW, I always
do camera.stopPreview() and camera.setPreviewCallback(null) before
doing camera.release().

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] Regarding Certification

2011-01-20 Thread jayavenkat
Hi,
 I need details about Android certification

-- 
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] Regarding Certification

2011-01-20 Thread Marcin Orlowski
On 20 January 2011 10:44, jayavenkat  wrote:
> Hi,
>     I need details about Android certification

we need details what is android certification

-- 
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] Preserve ListView position when using footers

2011-01-20 Thread Kwisatz
This is driving me crazy!

I have two applications with this problem, and I'm about to give up.
I'm out of ideas.

In these applications, I've constructed a pattern for the ListView
very similar to the Gmail app. I'm fetching information from the
server in small sets, and when a user scrolls down to the last
ListView position, he sees a download progress row. If something goes
wrong, that download row switches to an error row with an error
message and a button to retry the network request. When the data set
is retrieved, the ListView is updated at the bottom with the new data
set. The download view and the error view are done with ListView
footers.

So far, so good. It works greak. The problem is when the user clicks
an item in the ListView in order to go to another Activity. When he
comes back the the ListView, it resets the ListView, so that the first
visible position is always the first item of the ListView.

If I remove all the footer code, then it works as expected, and the
ListView remembers it's position when it comes back.

I use the getFirstVisiblePosition() and the setSelection() to
workaround this, although it's ugly because the ListView always shifts
a little. But even these are buggy and sometimes (about 5% of the
times) the getFirstVisiblePosition() returns 0. This just adds to the
frustration.

I'm about to give up on footers and eradicate them of my Android
vocabulary and stick with the Window title  indeterminate progress.

But... how does the Gmail app does it?! Does any one have an idea?

-- 
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 set images in screen have different click events on different area

2011-01-20 Thread Faheem Khatri
Thx I ll check

On Jan 18, 8:15 pm, viktor  wrote:
> you can add OnTouchListener and test area what you want.
>
> or, add layouts onto FrameLayout, where background is your image.
>
> On 18 Січ, 15:14,FaheemKhatri  wrote:
>
>
>
> > I have an single image in which it set has screen home page in which
> > it contains 5 menu icons,so i need to know how to set click events for
> > this icons- Hide quoted text -
>
> - Show quoted text -

-- 
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's default browser - help for directions

2011-01-20 Thread Sergey Glotov

On Wednesday, January 19, 2011 9:01:01 AM UTC+3, kypriakos wrote:
>
>
> (2) Does anyone have details on how this browser is implemented 
> or where I can find that? Is it a derivative of the WebKit? 
>

Source code of Android browser is here: 
http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a=tree

Regards
Sergey Glotov

-- 
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: google analytics jar does not seem to work now

2011-01-20 Thread David Liebman
just thought of a good question:

what URL did you use for your google analytics profile. When I did it,
I made up something descriptive. That should work, right?

On Jan 19, 10:54 am, David Liebman  wrote:
> @Manuel Ciosici
> sorry, I'm still not getting new tracking from Google Analytics. I do
> have another site that I use the analytics web page for (not android
> but a Google Code site instead) and I do get tracking for that site. I
> don't think I'm doing it wrong, but I may be. It did take a couple of
> days after I set up the android analytics before I got any feedback.
> You may just have to wait.
>
> @H
> sorry I'm getting back to this so late. My question now is, does
> google analytics work from the emulator for you?
>
> On Jan 17, 11:00 am, "Manuel R. Ciosici" 
> wrote:
>
> > I started using Google Analytics in my app yesterday, haven't seen any
> > data in Analytics. I see that people are using the app because the
> > downloads and ad requests numbers are increasing. With Analytics for
> > sites I can generally see data the following day.
>
> > Are you getting data now? Do you think it's just a matter of waiting?
>
> > Thanks,
> > Manuel R. Ciosici
>
> > On Jan 10, 2:30 pm, David Liebman  wrote:
>
> > > HI,
>
> > > I have google analytics incorporated in my android app. When I first
> > > added the code, and then updated my app on android market I got lots
> > > of hits. Now I get none. I know people might just be not using my app,
> > > but I started up the gingerbread emulator and did everything that was
> > > necessary for my app to report using analytics. When I looked at my
> > > google analytics page the next day there was nothing. I could swear
> > > that this worked (from the emulator) before. Unfortunately I have no
> > > access to an actual phone right now. Has anyone else had these
> > > problems? Below are the links to the google analytics android jar file
> > > instructions.
>
> > >http://www.google.com/url?sa=D&q=http://android-developers.blogspot.c...
>
> > >http://code.google.com/mobile/analytics/docs/android/
>
> > > Here is a link to the barcode for my app on the market if anyone would
> > > like to try it out.
>
> > >http://android-awesomeguy.blogspot.com/2010/10/awesomeguy-on-android-...
>
> > > 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 access com.android.internal.telephony.CallManager ?

2011-01-20 Thread Harsha
Hi, I am trying to access CallManager class object from
"com.android.internal.telephony" package. here is my code: {

classCallManager =
Class.forName("com.android.internal.telephony.CallManager");

Method method_getInstance; method_getInstance =
classCallManager.getDeclaredMethod("getInstance");
method_getInstance.setAccessible(true); Object callManagerInstance =
method_getInstance.invoke(null);

}

but this throwing ClassNotFoundException.

can any one help me on this? same way it is allowing me to access
"PhoneFactory", but not allowing to access CallManager

Thanks in Advance, Harsha C

-- 
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: Regarding Certification

2011-01-20 Thread pramod.deore
There is no any certification exam for Android

On Jan 20, 2:44 pm, jayavenkat  wrote:
> Hi,
>      I need details about Android certification

-- 
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-developer] Where are the codes that handles the browser anti aliasing?

2011-01-20 Thread archieval
Hi everyone,

I just wanted to disable anti-aliasing in the browser because it is
quite laggy when scrolling. Does anyone can point me where it is?
Thank you very much

Regards,
archieval

-- 
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: AdSense for Android: is it available in Europe?

2011-01-20 Thread ko5tik


On Jan 20, 6:00 am, Nightwolf  wrote:
> adMob allows using adSense as ads source.
> In case of adSense (without adMob) you have to register account and
> mention that you're going to show ads in mobile application.

Apparently not for me.   No way to activate this from control center...

-- 
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 Animation List Using Bitmaps Programatically

2011-01-20 Thread Amit
Hi All,

I am trying to achieve adding the animated gifs into my application.

1- I am able to download the animated gif from server.
2- I am able to decode the animated gif (using my custom decoder) and
have a separate Bitmap corresponding to its frames.

Now I want to animate it using the frame by frame animation. As i
read, to perform the frame by frame animation the first thing that is
required is "animation-list".

I want to know how i can create the required "animation-list"
programatically containing each Bitmap as a separate frame.

Kindly Help.

Thanks & Best Regards
Amit

-- 
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] Preserve ListView position when using footers

2011-01-20 Thread Kostya Vasilyev

20.01.2011 13:08, Kwisatz пишет:

I use the getFirstVisiblePosition() and the setSelection() to
workaround this, although it's ugly because the ListView always shifts
a little. But even these are buggy and sometimes (about 5% of the
times) the getFirstVisiblePosition() returns 0. This just adds to the
frustration.



Have you tried saving / restoring scroll position using pixels, rather 
than the first visible list item?


When you're leaving ListView, there can be a partially visible list item 
at the top, hence the shifting when you come back to the activity.


I'd try these View methods:

public final int getScrollY ()
public void scrollTo (int x, int y)

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Creating Animation List Using Bitmaps Programatically

2011-01-20 Thread Kostya Vasilyev

Based on the reference:

http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html

you just create a new AnimationDrawable, then call addFrame() for each 
frame image, and finally all start() to play it.


-- Kostya

20.01.2011 14:01, Amit пишет:

Hi All,

I am trying to achieve adding the animated gifs into my application.

1- I am able to download the animated gif from server.
2- I am able to decode the animated gif (using my custom decoder) and
have a separate Bitmap corresponding to its frames.

Now I want to animate it using the frame by frame animation. As i
read, to perform the frame by frame animation the first thing that is
required is "animation-list".

I want to know how i can create the required "animation-list"
programatically containing each Bitmap as a separate frame.

Kindly Help.

Thanks&  Best Regards
Amit




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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: Read Response from PHP server

2011-01-20 Thread Samsung Galaxy
@Frank Weiss

Yes you were right, I put all the code in a doPost method and now it
shows no error. thanks a lot.

I will get you back as i cannot test it right now bcz my server is
down.

@20pul10
In original code there is a serverURL. I can post my data in mySQL
using PHP but I want to show a message on the android device either
data is successfully sent or not.

Thanks guys for your help


Atif


On Jan 18, 11:06 pm, Frank Weiss  wrote:
> You may have already figured this out.
>
> String bytesSent;
>
> is a valid field definition, but the following line:
>
> httppost = new HttpPost(serverURL);
>
> is a statement and belongs in a method or initialized block.

-- 
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] Trying to return to a previous screen

2011-01-20 Thread barnes . tony
Thanks Kostya, I had actually figured it out and forgot to get back on here 
to post. That makes sense.

-- 
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: Pre DEX optimization Info

2011-01-20 Thread channa kad
can someone give some hint on the below query?

On Thu, Jan 20, 2011 at 5:38 PM, SOMA KOHLI wrote:

> Looks like the froyo version does not do the odex storing through the
> build system.
> It only stores the odex at runtime in the dalvik-cache folder.
> When you installl an apk , then also the the same thing happens.
>
> Maybe the google developers could help us get a better answer.
>
> rgds
> Soma
>
> On Thu, Jan 20, 2011 at 2:51 PM, channa kad 
> wrote:
> > Hi,
> > In GB it stores next to each APK in system/app folder.
> >
> > When i tried building for froyo, i can see the file
> > build/tools/dexpreopt/Config.mk starts emulator
> > before optimizing to odex. I am not optimizing APKs using dexopt_wrapper.
> I
> > am building as part of
> > my system image.
> >
> > In that case is it supported only for emulator in froyo?
> >
> > Thanks & Regards,
> > Channagoud
> >
> > On Thu, Jan 20, 2011 at 11:40 AM, SOMA KOHLI  >
> > wrote:
> >>
> >> Hi ,
> >> Could you tell me where does GB store the ODEX files?
> >>
> >> In Froyo, this is how you can get ODEX files.
> >> There is a separate executable called dexopt_wrapper.
> >> If you give a jar/apk as in, input,it gives a odex file as output.
> >>
> >> rgds
> >> Soma
> >>
> >> On Thu, Jan 20, 2011 at 12:10 AM, channa kad 
> >> wrote:
> >> > Hi,
> >> > I am trying to use DEX Pre optimization for andoird 2.2_R1 (Froyo),
> when
> >> > I
> >> > guild the froyo code as below:
> >> >
> >> >   $ make WITH_DEXPREOPT=true -j4
> >> >
> >> > I dont see any ODEX files getting generated for the APKs.
> >> >
> >> > When I do the same thing for 2.3 (gingerbread) , I can see ODEX files
> >> > getting generated for each APK.
> >> >
> >> > Also when I checked the build system for 2.2_R1 , It does not have
> >> > changes
> >> > to build ODEX files.
> >> >
> >> > Can someone let me know if the DEX Pre optimization is supported only
> in
> >> > Gingerbread?
> >> >
> >> > Or if its supported in froyo is there a way to get the ODEX files?
> >> >
> >> > Thanks & Regards,
> >> > Channagoud
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "android-platform" group.
> >> > To post to this group, send email to
> android-platf...@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> > android-platform+unsubscr...@googlegroups.com
> .
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/android-platform?hl=en.
> >> >
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "android-platform" group.
> >> To post to this group, send email to android-platf...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> android-platform+unsubscr...@googlegroups.com
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/android-platform?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-platf...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-platform+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> > http://groups.google.com/group/android-platform?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "android-platform" group.
> To post to this group, send email to android-platf...@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platform+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/android-platform?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] Sample code for service?

2011-01-20 Thread petter
I'm looking for a complete minimalistic code sample for a service.
Does such a thing exist? I've tried, but get some errors which I
assume is related to inconsistency between my xml and java code. I'm
simply using ant and and the CLI tools, e.g. not Eclipse.

-- 
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: getHitRect() returns hit to a different image item in a Customize List

2011-01-20 Thread Hari Edo

It's not clear what effect you're doing, but you will probably need
the inverse of the drawing transformation to determine the hits.
That is, if the drawing transformation is dividing by Z for depth
and perspective, the hit testing function should be multiplying by
Z to put the touch coordinates back into the button's coordinate
space.

On Jan 20, 2:45 am, argongold  wrote:
> Hi,
>
> I have developed a custom list with images and these images are
> displayed with different Z distance ( in 3D) as well as custom x,y and
> z angles for each image item.
>
> My problem is that when I hit an image on screen , the getHitRect()
> returns a different image hit and not the actual on which I hit on
> screen. Even though Images are not overlapping each other.
>
> Can any one suggest me how can I precisely get the hit of
> corresponding image.
>
> Note. I am using Camera and Matrix classes and
> getChildStaticTransformation() function to display the images.
>
> Thanks in advance .
>
> Regards,
> argongold

-- 
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: Anyone with GL experience willing to take a contract/bounty?

2011-01-20 Thread RyanMcNally
Here is some code:
http://code.google.com/p/rugl/source/browse/trunk/droid/DroidRUGL/src/com/ryanm/droid/rugl/util/geom/Tesselator.java
that will take a list of x,y vertex coordinates of a simple polygon
(concave is fine, self-intersecting is not) and spit out the vertex
and triangle index arrays suitable to be sent to opengl (in
GL_TRIANGLES format)

It should be pretty easy to pull out, there's only a few small utility
methods that it relies on. Failing that, the algorithm is pretty
simple and well-commented.

OpenGL is easier than you think, don't let it intimidate you!

Ryan

On Jan 20, 2:58 am, Brill Pappin  wrote:
> That explains a lot about why things didn't make sense to me... I kept trying 
> to tell it to simply draw points and connect them!
>
> It's actually those vertices that are giving me trouble... they are just not 
> friendly to an Application programmer :)
>
> - Brill Pappin
>
> On 2011-01-19, at 8:24 PM, Indicator Veritatis wrote:
>
>
>
>
>
>
>
> > OpenGL ES, the standard not just for Android but for all mobile phones
> > to date, only supports drawing triangles, not polygons. To get a
> > polygon, you have to triangulate it first, then pass an array of
> > vertices based on that triangulation.
>
> > Triangulation turns out to be a subtle combinatorial problem.
>
> > On Jan 17, 11:59 am, Brill Pappin  wrote:
> >> Thanks Robert. I'll take that advice.
>
> >> In particular what we want are some extensions to the framework(s) that 
> >> make
> >> supporting segmented maps easier for us to work with. Most frameworks have

-- 
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] Sample code for service?

2011-01-20 Thread Mark Murphy
I do not know what qualifies as "minimalistic", but here are some short ones:

https://github.com/commonsguy/cw-android/tree/master/Service/FakePlayer
https://github.com/commonsguy/cw-android/tree/master/Service/Downloader

On Thu, Jan 20, 2011 at 7:22 AM, petter  wrote:
> I'm looking for a complete minimalistic code sample for a service.
> Does such a thing exist? I've tried, but get some errors which I
> assume is related to inconsistency between my xml and java code. I'm
> simply using ant and and the CLI tools, e.g. not Eclipse.
>
> --
> 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

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

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


[android-developers] Re: Could I exec some codes after my app is installed

2011-01-20 Thread Jens
Yes. Which is bad.

Adding a BroadcastReceiver to your app for something that is spammed
often enough start your app without user interaction .. eventually.

For that extra abusive touch i recommend listening for
"ACTION_USER_PRESENT" - whenever the user wakes up his device & goes
past the key guard your app will be started/notified.

On 18 Jan, 11:03, Marcin Orlowski  wrote:
> On 18 January 2011 10:32, xeagle  wrote:
>
> > When my app is downloaded from Market and installed, could some code
> > be executed?
>
> No. Which is good.

-- 
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: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-20 Thread RyanMcNally
The values aren't identical. e.g.:

// right
frustum[ 0 ][ 0 ] = clip[ 3 ] - clip[ 0 ];
versus
// left
frustum[ 1 ][ 0 ] = clip[ 3 ] + clip[ 0 ];

Took me while to spot that myself though, this kind of stuff is well
over my head :-)

Ryan

On Jan 19, 10:07 pm, DanH  wrote:
> I'm kind of curious as to why you don't just copy the left, top, and
> near planes from the right, bottom, and far planes, vs recalculating
> the identical results.
>
> On Jan 18, 7:49 am, RyanMcNally  wrote:
>
>
>
>
>
>
>
> > Hello all
>
> > Hopefully someone out there can shed some light on this one, because
> > it's got me completely stumped.
>
> > I've received 5 reports, from 3 separate users on 2 different devices
> > (ZTE blade and HTC Liberty), of an ArrayIndexOutOfBoundsException that
> > I simply cannot explain.
>
> > The stacktrace:
> > java.lang.ArrayIndexOutOfBoundsException
> > at com.ryanm.droid.rugl.util.geom.Frustum.extractFromOGL(Frustum.java:
> > 180)
> > at com.ryanm.droid.rugl.util.FPSCamera.setPosition(FPSCamera.java:174)
> > at com.ryanm.minedroid.BlockView.draw(BlockView.java:318)
> > at com.ryanm.droid.rugl.Game.onDrawFrame(Game.java:247)
> > at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:
> > 1332)
> > at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
> > ...
>
> > You can view the offending file 
> > here:http://code.google.com/p/rugl/source/browse/trunk/droid/DroidRUGL/src...
>
> > Line 180 is:
> >    frustum[ 3 ][ 0 ] /= t;
> > However, the frustum array is declared as:
> >    private final float[][] frustum = new float[ 6 ][ 4 ];
> > so 3 and 0 are perfectly valid indices. The frustum array is not
> > altered after declaration - it's private and there are only 4 "new"s
> > in that file, none of which are redeclaring any of the frustum[]
> > arrays. In addition, line 172 is:
> >     frustum[ 3 ][ 0 ] = clip[ 3 ] - clip[ 1 ];
> > and no error is raised.
>
> > Possible causes that I've eliminated:
> > 1) Different versions of the class, so line numbers don't match up - I
> > wish it were that easy. The code was copied wholesale (url in the
> > class javadoc), javafied and committed. I haven't touched it since so
> > there are no other versions of this class.
> > 2) Someone else has taken the code, b0rked it, and is distributing
> > broken APKs - Seems unlikely, and the one user who responded to me
> > claims he downloaded directly from my site.
> > 3) The crash report is being mangled somewhere in the reporting
> > process - I'm using this 
> > class:http://code.google.com/p/rugl/source/browse/trunk/droid/DroidRUGL/src...
> > to capture exceptions. If someone can explain how that can mangle
> > reports sufficiently, I'd be grateful.
>
> > Remaining possibilities:
> > 1) Malicious users fabricating error reports - I'd have hoped that
> > three people would have better things to do than to conspire to troll
> > me with bizarre crash reports, but I suppose anything is possible :-/
> > 2) VM bug
>
> > It's always a sad state of affairs when it comes down to blaming the
> > VM, especially for such innocuous code. I very much enjoy trusting the
> > VM and knowing that any bugs are my own, but I just don't know what
> > else to make of this.
> > I'd be enormously grateful if someone could point out where I've gone
> > wrong.
>
> > On a side note, having AIOOBEs report the value of the incorrect index
> > -as in the JVM- would have been very handy in this case.
>
> > Regards
>
> > Ryan McNally

-- 
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] MediaPlayer not working properly - causing sounds to be truncated

2011-01-20 Thread Mark Murphy
On Wed, Jan 19, 2011 at 11:12 PM, Peter Carpenter
 wrote:
> I need to provide the facility to play multiple sounds (which could be
> large) concurrently and to know once each sound has finished playing.

:: snip ::

> I can’t use the soundpool as I want to detect when each sound has finished
> playing.

Use SoundPool and keep track of when the clips end on your own. You
know the duration of the clip, since it is your clip. You know when
you are starting up the sound, because you are the one starting
playback. Hence, you know when the sound has finished playing, through
addition.

Bear in mind that Android hardware is not designed to play a "large"
number of sounds "concurrently", due to slower CPUs and limited sound
hardware. The objective of SoundPool is specifically to *not* play
sounds, via a prioritization system, so high-priority sounds get
played while low-priority sounds get dropped so the whole thing
doesn't chew up all available CPU time. MediaPlayer is not designed to
play a "large" number of sounds "concurrently" at all.

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

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

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


[android-developers] Re: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-20 Thread RyanMcNally
No native code I'm afraid.

I've given the three users apk's with the improved exception logging,
and so begins the waiting game...

Ryan

On Jan 20, 1:12 am, fadden  wrote:
> That is definitely strange.  I can't see any reason why that exception
> would be thrown from that point.
>
> If you suspect that the object has been damaged, there's an excellent
> chance that your improved exception handler will throw an exception.
> Or crash.  Either way you will have learned something new. :-)
>
> Future versions of the VM do show additional detail on array index
> problems.
>
> Is there any native code involved?  JNI code can generate array bounds
> exceptions, and if somebody crossed up JNIEnv* it could end up on the
> wrong thread.  Of course, it's *highly* unlikely that multiple
> occurrences on different devices would have the same stack trace if
> the failure is actually happening elsewhere.
>
> There are no exceptions involved in floating-point division by zero on
> Android (other than whatever the VFP hardware does internally).

-- 
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 access com.android.internal.telephony.CallManager ?

2011-01-20 Thread Mark Murphy
On Thu, Jan 20, 2011 at 5:35 AM, Harsha  wrote:
> Hi, I am trying to access CallManager class object from
> "com.android.internal.telephony" package. here is my code: {
>
> classCallManager =
> Class.forName("com.android.internal.telephony.CallManager");
>
> Method method_getInstance; method_getInstance =
> classCallManager.getDeclaredMethod("getInstance");
> method_getInstance.setAccessible(true); Object callManagerInstance =
> method_getInstance.invoke(null);
>
> }
>
> but this throwing ClassNotFoundException.
>
> can any one help me on this? same way it is allowing me to access
> "PhoneFactory", but not allowing to access CallManager

Please don't do this.

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

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

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


[android-developers] facebook in 2.2 problem

2011-01-20 Thread Ramesh Solanki
hello dear
i am developing project in android which i want to integrate facebook
facebook is working well in 2.1 sdk 7 but it not working in 2.2. sdk 8
what is problem i have no any idea about that please suggest me
thnks in advance

-- 
Thanks & regards
Ramesh Solanki
Dignizant technology
Surat India
Email: rkindia1...@gmail.com
rkindia1...@yahoo.co.in

-- 
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: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-20 Thread DanH
You didn't put an exception handler around the subscript operation in
the exception handler.

On Jan 20, 6:38 am, RyanMcNally  wrote:
> No native code I'm afraid.
>
> I've given the three users apk's with the improved exception logging,
> and so begins the waiting game...
>
> Ryan
>
> On Jan 20, 1:12 am, fadden  wrote:
>
> > That is definitely strange.  I can't see any reason why that exception
> > would be thrown from that point.
>
> > If you suspect that the object has been damaged, there's an excellent
> > chance that your improved exception handler will throw an exception.
> > Or crash.  Either way you will have learned something new. :-)
>
> > Future versions of the VM do show additional detail on array index
> > problems.
>
> > Is there any native code involved?  JNI code can generate array bounds
> > exceptions, and if somebody crossed up JNIEnv* it could end up on the
> > wrong thread.  Of course, it's *highly* unlikely that multiple
> > occurrences on different devices would have the same stack trace if
> > the failure is actually happening elsewhere.
>
> > There are no exceptions involved in floating-point division by zero on
> > Android (other than whatever the VFP hardware does internally).

-- 
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: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-20 Thread DanH
BTW, I'm betting that the problem never reappears for those three
users.

On Jan 20, 6:38 am, RyanMcNally  wrote:
> No native code I'm afraid.
>
> I've given the three users apk's with the improved exception logging,
> and so begins the waiting game...
>
> Ryan
>
> On Jan 20, 1:12 am, fadden  wrote:
>
> > That is definitely strange.  I can't see any reason why that exception
> > would be thrown from that point.
>
> > If you suspect that the object has been damaged, there's an excellent
> > chance that your improved exception handler will throw an exception.
> > Or crash.  Either way you will have learned something new. :-)
>
> > Future versions of the VM do show additional detail on array index
> > problems.
>
> > Is there any native code involved?  JNI code can generate array bounds
> > exceptions, and if somebody crossed up JNIEnv* it could end up on the
> > wrong thread.  Of course, it's *highly* unlikely that multiple
> > occurrences on different devices would have the same stack trace if
> > the failure is actually happening elsewhere.
>
> > There are no exceptions involved in floating-point division by zero on
> > Android (other than whatever the VFP hardware does internally).

-- 
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: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-20 Thread RyanMcNally
There's been no indication that the arrays could be null so far, but I
guess at this point we are fully through the looking-glass so all bets
are off.

Welcome to bizarro-world, engage null-checks for your safety,
convenience and psychological integrity.

Ryan

On Jan 20, 1:07 pm, DanH  wrote:
> You didn't put an exception handler around the subscript operation in
> the exception handler.
>
> On Jan 20, 6:38 am, RyanMcNally  wrote:
>
>
>
>
>
>
>
> > No native code I'm afraid.
>
> > I've given the three users apk's with the improved exception logging,
> > and so begins the waiting game...
>
> > Ryan
>
> > On Jan 20, 1:12 am, fadden  wrote:
>
> > > That is definitely strange.  I can't see any reason why that exception
> > > would be thrown from that point.
>
> > > If you suspect that the object has been damaged, there's an excellent
> > > chance that your improved exception handler will throw an exception.
> > > Or crash.  Either way you will have learned something new. :-)
>
> > > Future versions of the VM do show additional detail on array index
> > > problems.
>
> > > Is there any native code involved?  JNI code can generate array bounds
> > > exceptions, and if somebody crossed up JNIEnv* it could end up on the
> > > wrong thread.  Of course, it's *highly* unlikely that multiple
> > > occurrences on different devices would have the same stack trace if
> > > the failure is actually happening elsewhere.
>
> > > There are no exceptions involved in floating-point division by zero on
> > > Android (other than whatever the VFP hardware does internally).

-- 
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] Which phone for hardware testing?

2011-01-20 Thread Rok
I'm looking to support all phones back to 1.5 so am wondering what
phone would be a good one to buy to test the application on slower
CPU, lower resolution, etc.?  Something in the nature of "if it works
on this, it'll work on mostly 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


Re: [android-developers] Which phone for hardware testing?

2011-01-20 Thread TreKing
On Thu, Jan 20, 2011 at 7:39 AM, Rok  wrote:

> I'm looking to support all phones back to 1.5 so am wondering what phone
> would be a good one to buy to test the application on slower CPU, lower
> resolution, etc.?  Something in the nature of "if it works on this, it'll
> work on mostly anything"...
>

The original: G1.

-
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

[android-developers] Re: Which phone for hardware testing?

2011-01-20 Thread Stephan Wiesner
Thats what I bought my SE Xperia Mini Pro for. Its not too expensive,
small enough that i can carry it around with me all the time and has a
hardware keyboard, which is great to make sure the app can be used
with it. As it has "only" 600 MHz, I use it for "performance testing",
though in many cases it is faster than my f... Samsung Galaxy S.
By now I don't support <2.1 anymore and upgraded the phone ( it is
delivered with 1.6.). I found that none of my users had older phones,
so...

Stephan

On 20 Jan., 14:39, Rok  wrote:
> I'm looking to support all phones back to 1.5 so am wondering what
> phone would be a good one to buy to test the application on slower
> CPU, lower resolution, etc.?  Something in the nature of "if it works
> on this, it'll work on mostly 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


Re: [android-developers] facebook in 2.2 problem

2011-01-20 Thread TreKing
On Thu, Jan 20, 2011 at 6:42 AM, Ramesh Solanki wrote:

> i am developing project in android which i want to integrate facebook
>

This group is for the Anroid SDK, not Facebook.


> facebook is working well in 2.1 sdk 7 but it not working in 2.2. sdk 8
>
what is problem i have no any idea about that please suggest me
>

With the highly detailed problem description of "working well in 2.1 sdk7
but it not working in 2.2 sdk 8", I can tell you will full confidence that
your problem is using 2.2 sdk 8.

-
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] Sample code for service?

2011-01-20 Thread TreKing
On Thu, Jan 20, 2011 at 6:22 AM, petter  wrote:

> I'm looking for a complete minimalistic code sample for a service.
> Does such a thing exist?
>

Did you try looking at the documentation? Because the Service class docs
themselves have a "minimalistic" example.

-
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] Re: Best, easiest, cleanest, way to make a game and cross platfrom.

2011-01-20 Thread brian purgert
Thanks i looked into it and i really like the unity game engine, and i just
bought a book for it and i think it will be a good next step for me.
On Jan 20, 2011 12:06 AM, "Nightwolf"  wrote:
> libgdx allows you to develop mostly on PC and then generate apk for
> android.
> Unity engine has iPhone and Android targets. However android version
> will cost you.
>
> On Jan 20, 3:30 am, brian purgert  wrote:
>> Well, I,ve decided that I want to make my next game a diffrent way, after
>> learning alot, i don't think i want to draw it with the canvas altough
very
>> easy for the concept im going with.
>> So what do you think about "andengine" or "corona sdk" or even straight
>> opengl i saw a little kid use it to make a game lol, so its probably
easy,
>> also i want it to be easy to transfer from platfrom to platfrom.
>>
>> What are my options, your advice..
>
> --
> 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] How to add a Search Bar

2011-01-20 Thread Lidia
Hello developers,

I have a huge misunderstanding.

I am trying for few days to add the search bar in my application like
one from http://developer.android.com/resources/articles/qsb.html

But, I do not think I understood exactly if I can use it just for the
search i need.
e.g.:  to retrieve the typed text and return my search response,
provided from a web service.

So, basically i need just the design, not it's functionality.

Can someone tell me if i can use this bar only for my personal data,
not a general search from internet or the hole phone,
and i would appreciate link for a simple and clear tutorial, because i
couldn't found anything concrete till now.

Thanks in advance,
Lidia


-- 
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] Implement Service in one application and access in another application

2011-01-20 Thread Hari Kumar
Hi All,

Currently I am trying to access the Service which is implemented in
one application and accessed by another application. But it is not
happening.

Below I explain the code for reference, Please check it out.
Consider the implemented Service application as "Server" and accessing
the Service application as "Client".

IRemoteService.aidl:(This class is append in both the Server and
Client application)
interface IRemoteService {
int getCounter();
}

Server Application:
RemoteService:(This is Service implemented class)
public class RemoteService extends Service {

private Handler serviceHandler;
private int counter;
private Task myTask = new Task();


@Override
public IBinder onBind(Intent arg0) {
Log.d(getClass().getSimpleName(), "onBind()");
return remoteServiceStub;
}

private IRemoteService.Stub remoteServiceStub =
new IRemoteService.Stub() {
public int getCounter() throws RemoteException {
return counter;
}};

@Override
public void onCreate() {
super.onCreate();
Log.d(getClass().getSimpleName(),"onCreate()");
}

@Override
public void onDestroy() {
super.onDestroy();
serviceHandler.removeCallbacks(myTask);
serviceHandler = null;
Log.d(getClass().getSimpleName(),"onDestroy()");
}

@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
serviceHandler = new Handler();
serviceHandler.postDelayed(myTask, 1000L);
Log.d(getClass().getSimpleName(), "onStart()");
}

class Task implements Runnable {
public void run() {
++counter;
serviceHandler.postDelayed(this,1000L);
Log.i(getClass().getSimpleName(),
"Incrementing counter in the run 
method");
}
}
}
Manifest file for Server Application:



Client Application:
RemoteServiceClientDemo : (This class accessing the method in the
interface)
public class RemoteServiceClientDemo extends Activity {

private IRemoteService remoteService;
private boolean started = false;
private RemoteServiceConnection conn = null;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Button start = (Button)findViewById(R.id.startButton);
Button stop = (Button)findViewById(R.id.stopButton);
Button bind = (Button)findViewById(R.id.bindButton);
Button release = (Button)findViewById(R.id.releaseButton);
Button invoke = (Button)findViewById(R.id.invokeButton);

start.setOnClickListener(new OnClickListener() {
public void onClick(View v){
startService();
}
});

stop.setOnClickListener(new OnClickListener() {
public void onClick(View v){
stopService();
}
});

bind.setOnClickListener(new OnClickListener() {
public void onClick(View v){
bindService();
}
});

release.setOnClickListener(new OnClickListener() {
public void onClick(View v){
releaseService();
}
});

invoke.setOnClickListener(new OnClickListener() {
public void onClick(View v){
invokeService();
}
});
}

private void startService(){
if (started) {
Toast.makeText(RemoteServiceClientDemo.this,
"Service already started", 
Toast.LENGTH_SHORT).show();
} else {
Intent i = new Intent();
i.setClassName("com.demo",
"com.demo.RemoteService");
startService(i);
started = true;
updateServiceStatus();
Log.d( getClass().getSimpleName(), "startService()" );
}
}

private void stopService() {
if (!started) {
Toast.makeText(RemoteServiceClientDemo.this,
"Service not yet started", Toast.LENGTH_SHORT).show();
} else {
Intent i = new Intent();
i.setClassName("com.demo",
"com.demo.RemoteService");
stopService(i);
started = false;
updateServiceStatus();
Log.d( getClass().getSimpleName(), "stopService()" );
}

[android-developers] openGLES different behavior on different devices

2011-01-20 Thread pedr0
Hi at all,
I have some strange  behavior issues on texture-mapping with OpenGL ES
1.1

1)This is the right picture (Samsung Galaxy S):
  http://i.imgur.com/j00Zy.png

2)This an wrong picture (HTC Magic):
  http://i.imgur.com/P8NCW.png

3)This is another wrong picture (Ideos):
 http://i.imgur.com/aOAza.png

I am very disappointed for that, could someone help me?
I have mapped a texture in a  Sphere using OpenGL ES 1.1, the OpenGL
need version is write in the AndroidManifest.xml file.

In the 2th case I can read a lot of this message:

E/libEGL  ( 2372): called unimplemented OpenGL ES API

I configured the checkError flag in OpenGLViewRender, but I cannot see
the OpenGL call which
cause this message.

Thanks a lot in advance.

pedr0

-- 
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: Preserve ListView position when using footers

2011-01-20 Thread Kwisatz
Thanks for the help, Kostya.

The getScrollY() didn't work, but it got me started to find out a way
that I could save the pixel offset of the top ListView row. And I got
it. It's something like this:

@Override
protected void onPause() {
super.onPause();
this.firstVisiblePosition =
myListView.getFirstVisiblePosition();
this.firstChildTop = myListView.getChildAt(0).getTop();
}

@Override
protected void onResume() {
super.onResume();
this.myListView.setSelectionFromTop(this.firstVisiblePosition,
this.firstChildTop);
}

But I still have the problem that sometimes the ListView is refreshed.
I've noticed that it's sometimes after the onPause(). Very weird. So,
I did my (so far) most ugly hack EVER! I'm sincerely ashamed of this,
and I will deny that this is my code, but... it gets the job done for
now :P

@Override
protected void onResume() {
super.onResume();
this.myListView.setSelectionFromTop(this.firstVisiblePosition,
this.firstChildTop);

new Handler().postDelayed(new Runnable() {
@Override
public void run() {
 
this.myListView.setSelectionFromTop(this.firstVisiblePosition,
this.firstChildTop);
}
   }, 200);
}

Cof, cof...

-- 
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] Bitmap factory and ICC aware JPG

2011-01-20 Thread Yahel
Hi all,

I'm fighting a weird battle over here.

Using this simple code :


URL bitmapURL = new URL("http://farm5.static.flickr.com/
4069/4432443443_3ece4b42d9.jpg");
HttpURLConnection connection =
(HttpURLConnection)bitmapURL.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
bitmapFromUrl = 
BitmapFactory.decodeStream(input);


I'm able to create a bitmap from the url of a jpg file. Well most of
the time.
The url included in the code is of a jpg that cannot be decoded by
bitmapfactory.

I narrowed it down to the fact that it uses an ICC color profile.
Which seems to me to be the only true difference from this other one
which loads fine :
http://farm2.static.flickr.com/1370/879345990_d778558446.jpg

I thought that icc color profile were headers and that decoders which
did not know what to do with it just ignore them. But it doesn't seem
to be the case for Android BitmapFactory.

Anyone has any idea how I could overcome this problem ?

Side note : If I feed the guilty url to a webview component, it
displays it fine with no problem. Could that be used in any way to
make a bitmap out of it ?

Thanks.

Yahel

-- 
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 add a Search Bar

2011-01-20 Thread gulbrandr
http://developer.android.com/guide/topics/search/adding-custom-suggestions.html

Have you read this? If no, it should help you.

On Jan 20, 3:19 pm, Lidia  wrote:
> Hello developers,
>
> I have a huge misunderstanding.
>
> I am trying for few days to add the search bar in my application like
> one fromhttp://developer.android.com/resources/articles/qsb.html
>
> But, I do not think I understood exactly if I can use it just for the
> search i need.
> e.g.:  to retrieve the typed text and return my search response,
> provided from a web service.
>
> So, basically i need just the design, not it's functionality.
>
> Can someone tell me if i can use this bar only for my personal data,
> not a general search from internet or the hole phone,
> and i would appreciate link for a simple and clear tutorial, because i
> couldn't found anything concrete till now.
>
> Thanks in advance,
> Lidia

-- 
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] RelativeLayout click events

2011-01-20 Thread BuckeyeDroid
Hi,

I have a RelativeLayout with two TextViews and a Button. Each of these
is a row. I want to be able to click anywhere on the row and get the
same effect as if I just clicked the button. Right now, only clicking
the button works. Clicking anywhere else on the row does not work.

Does anyone know how to fix this?

Thanks,
Bill

-- 
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: Preserve ListView position when using footers

2011-01-20 Thread Kostya Vasilyev

20.01.2011 17:59, Kwisatz пишет:

  So,
I did my (so far) most ugly hack EVER! I'm sincerely ashamed of this,
and I will deny that this is my code, but... it gets the job done for
now :P


I'm not going to tell anyone :)

BTW, have you thought about implementing header / footer rows right in 
your adapter? Takes just a few lines of code.


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Theme/Style in custom preference

2011-01-20 Thread Eric Crump
I created a custom PreferenceActivity.  Doing so removed all the text
style.  How do I apply the default style that you would normally see
in a preference activity to my custom one?

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


Re: [android-developers] RelativeLayout click events

2011-01-20 Thread Kostya Vasilyev
A view can only receive click events inside its boundaries. So make them 
larger, by using appropriate layout options.


If you want the button to look small and respond to clicks over a larger 
area, then add some kind of layout around it with width=fill_parent, and 
set the click handler on that (make sure you use a state-list drawable 
for the background, so there is visual feedback for clicking).


For TextViews, this is not necessary - you can stretch them full width 
without affecting how they draw text.


-- Kostya

20.01.2011 18:02, BuckeyeDroid пишет:

Hi,

I have a RelativeLayout with two TextViews and a Button. Each of these
is a row. I want to be able to click anywhere on the row and get the
same effect as if I just clicked the button. Right now, only clicking
the button works. Clicking anywhere else on the row does not work.

Does anyone know how to fix this?

Thanks,
Bill




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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: getHitRect() returns hit to a different image item in a Customize List

2011-01-20 Thread argon gold
Hi Hari Edo,

You can view the effect I am doing in movie at following youtube link.

http://www.youtube.com/watch?v=TMaMpp8eg4s

It is on the left side a deck of cards when slide up or a fling action
happen they moves upward  at different angles and finally at one stage each
card gets straighten and at this point I have implemented a touch on that
specific card.

I'll study your suggestion and test it if it works.

Thanks & regards,
argongold


On Thu, Jan 20, 2011 at 8:22 PM, Hari Edo  wrote:

>
> It's not clear what effect you're doing, but you will probably need
> the inverse of the drawing transformation to determine the hits.
> That is, if the drawing transformation is dividing by Z for depth
> and perspective, the hit testing function should be multiplying by
> Z to put the touch coordinates back into the button's coordinate
> space.
>
> On Jan 20, 2:45 am, argongold  wrote:
> > Hi,
> >
> > I have developed a custom list with images and these images are
> > displayed with different Z distance ( in 3D) as well as custom x,y and
> > z angles for each image item.
> >
> > My problem is that when I hit an image on screen , the getHitRect()
> > returns a different image hit and not the actual on which I hit on
> > screen. Even though Images are not overlapping each other.
> >
> > Can any one suggest me how can I precisely get the hit of
> > corresponding image.
> >
> > Note. I am using Camera and Matrix classes and
> > getChildStaticTransformation() function to display the images.
> >
> > Thanks in advance .
> >
> > Regards,
> > argongold
>
> --
> 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] Battery usage measurements

2011-01-20 Thread Prakash Iyer
On the phone there's is a what's been using the battery. This says display,
contacts etc. I assume this is reasonably accurate on a process level...
On Jan 19, 2011 9:33 PM, "Mark Murphy"  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

Re: [android-developers] Re: getHitRect() returns hit to a different image item in a Customize List

2011-01-20 Thread argon gold
Deck of cards is on the RIGHT side , sorry my mistake.

On Thu, Jan 20, 2011 at 11:28 PM, argon gold  wrote:

> Hi Hari Edo,
>
> You can view the effect I am doing in movie at following youtube link.
>
> http://www.youtube.com/watch?v=TMaMpp8eg4s
>
> It is on the left side a deck of cards when slide up or a fling action
> happen they moves upward  at different angles and finally at one stage each
> card gets straighten and at this point I have implemented a touch on that
> specific card.
>
> I'll study your suggestion and test it if it works.
>
> Thanks & regards,
> argongold
>
>
>
> On Thu, Jan 20, 2011 at 8:22 PM, Hari Edo  wrote:
>
>>
>> It's not clear what effect you're doing, but you will probably need
>> the inverse of the drawing transformation to determine the hits.
>> That is, if the drawing transformation is dividing by Z for depth
>> and perspective, the hit testing function should be multiplying by
>> Z to put the touch coordinates back into the button's coordinate
>> space.
>>
>> On Jan 20, 2:45 am, argongold  wrote:
>> > Hi,
>> >
>> > I have developed a custom list with images and these images are
>> > displayed with different Z distance ( in 3D) as well as custom x,y and
>> > z angles for each image item.
>> >
>> > My problem is that when I hit an image on screen , the getHitRect()
>> > returns a different image hit and not the actual on which I hit on
>> > screen. Even though Images are not overlapping each other.
>> >
>> > Can any one suggest me how can I precisely get the hit of
>> > corresponding image.
>> >
>> > Note. I am using Camera and Matrix classes and
>> > getChildStaticTransformation() function to display the images.
>> >
>> > Thanks in advance .
>> >
>> > Regards,
>> > argongold
>>
>> --
>> 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] Theme/Style in custom preference

2011-01-20 Thread Kostya Vasilyev

Eric,

I recently implemented a couple of ListPreference subclasses, and didn't 
run into any issues with themes or styles, even though my preference 
activity uses @android:style/Theme.Light.


My code (and a brief write-up) is here:

http://kmansoft.wordpress.com/2011/01/02/implementing-a-styleable-preference-for-a-list-of-integers/

Hope this helps.

-- Kostya

20.01.2011 18:14, Eric Crump пишет:

I created a custom PreferenceActivity.  Doing so removed all the text
style.  How do I apply the default style that you would normally see
in a preference activity to my custom one?




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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: Anybody seen comfortta.com?

2011-01-20 Thread kernelpanic
he's hosting on GoDaddy servers - won't be long before he has to move.


On Jan 20, 1:57 am, ko5tik  wrote:
> It seems that this is new app thief around here.   They just hacked my
> highscore lists to place URL on the top (not very scillfull, but it
> will require intervention to remove  entries)

-- 
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] Does Any one Building Android source code in Mac

2011-01-20 Thread Desu Vinod Kumar
Hi All,

Does any one using Mac Os for Building Android Source code.

How was performance & is it better compare to Ubuntu ?


I am planning to buy Mac Book Pro, please let me know your opinions.

TIA

-- 
Regards
---
D Vinod Kumar
R & D Engineer - Android Platform
Mobile : 09916009493
http://in.linkedin.com/in/desuvinodkumar

-- 
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] Guidewire Developer in MA 6+ months contract

2011-01-20 Thread arun panigrahi
-- 

*Position: Guidewire Developer*

*Location: Worcester MA*

*Duration: 6+ months*

* *

*Job Description:*

The candidate is required to have a minimum of *2 years experience with
Guidewire's UI (Screen configurations) & Rules and Integration* development
utilizing *Guidewire Claim Center 5.0 or 6.0, Guidewire Contact Center and
Payments components*. Experience in Rule writing using GOSU code is a must.
Very good understanding of Guidewire platform, and GOSU is a must.
Development experience in Claim Center integration is also required. The
ideal candidate must be able to work independently with minimal direction,
produce excellent quality results, work collaboratively, and communicate
clearly and effectively with all members of the team. Any experience in
Claim Center conversion projects is added advantage.

* *

The ideal candidate will also have a high level of proficiency in Object
Oriented technologies; familiarity with UML and other OO Tools. The
candidate will also have a working knowledge of Java J2EE, JSP & Web
Services along with modifying XML definitions, scripting (JavaScript, VB,
etc.), understanding of relational database concepts, and other skills
involved with implementing an advanced web application. Strong project
management, testing and debugging skills are also required.

* *

The candidate must have hands on experience analyzing, developing and
maintaining large scale Claim Center applications in a dynamic environment.
In addition, performing Development, candidate is expected to code reviews
and J-Unit testing will be part of the day to day responsibilities.



Arun Panigrahi
*Xpert**Tech Inc
*

**400 W Cummings Park,

Suite#2850

Woburn, MA-01801

Email: a...@xperttech.com
Phone: 781-926-0781
Fax: 781-207-0709
www.xperttech.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: openGLES different behavior on different devices

2011-01-20 Thread MrChaz
We're going to need to see the rendering code to be able to help.  You can 
use the debugger to step through and find the line that is causing the 
problem

-- 
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] Guidewire Developer in MA 6+ months contract

2011-01-20 Thread Haroon Khalid
dude stfu and go take a bath in some daal

On Thu, Jan 20, 2011 at 11:10 AM, arun panigrahi
wrote:

>
>
> --
>
> *Position: Guidewire Developer*
>
> *Location: Worcester MA*
>
> *Duration: 6+ months*
>
> * *
>
> *Job Description:*
>
> The candidate is required to have a minimum of *2 years experience with
> Guidewire's UI (Screen configurations) & Rules and Integration*development 
> utilizing
> *Guidewire Claim Center 5.0 or 6.0, Guidewire Contact Center and Payments
> components*. Experience in Rule writing using GOSU code is a must. Very
> good understanding of Guidewire platform, and GOSU is a must. Development
> experience in Claim Center integration is also required. The ideal candidate
> must be able to work independently with minimal direction, produce excellent
> quality results, work collaboratively, and communicate clearly and
> effectively with all members of the team. Any experience in Claim Center
> conversion projects is added advantage.
>
> * *
>
> The ideal candidate will also have a high level of proficiency in Object
> Oriented technologies; familiarity with UML and other OO Tools. The
> candidate will also have a working knowledge of Java J2EE, JSP & Web
> Services along with modifying XML definitions, scripting (JavaScript, VB,
> etc.), understanding of relational database concepts, and other skills
> involved with implementing an advanced web application. Strong project
> management, testing and debugging skills are also required.
>
> * *
>
> The candidate must have hands on experience analyzing, developing and
> maintaining large scale Claim Center applications in a dynamic environment.
> In addition, performing Development, candidate is expected to code reviews
> and J-Unit testing will be part of the day to day responsibilities.
>
>
>
> Arun Panigrahi
> *Xpert**Tech Inc
> *
>
> **400 W Cummings Park,
>
> Suite#2850
>
> Woburn, MA-01801
>
> Email: a...@xperttech.com
> Phone: 781-926-0781
> Fax: 781-207-0709
> www.xperttech.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

-- 
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: Inyect Assistance data to the GPS

2011-01-20 Thread ip332
> I wonder whether it is possible to send NMEA sentences to the GPS (for
> an A-GPS purpose)?
No, there is no API on the application level.

>Or is there any other way to provide/inject
> assistance data to the A-GPS chip?
Assistance data support is part of the GPS library implementation and
it belongs to the HAL in the Android SW stack.
That means two things: not every Android phone has assistance data
support and that you can do this as part of the porting efforts which
is a completely different scale of task.

If you have an external A-GPS receiver (USB, Bluetooth) you can use so
called "mock" location provider - create your own provider, utilize
TCP/IP to exchange data with your server, use Android's location
providers, etc.  Looks like a perfect approach for any experimental
thing.

On Jan 19, 4:49 am, ""  wrote:
> Dear All,
>
> I’m trying to develop an experimental non-cellular A-GPS system
> composed by an A-GPS server (recollects assistance data and provides
> it when needed through IP) and a A-GPS receiver (ask for the
> assistance data to the A-GPS server). I would like to use an Android
> device for the receiver but I don’t know if it is possible. As I have
> read it is possible to read NMEA sentences (GPSStatus.NMEAListener)
> and to read the position, etc. provided by the GPS device inside the
> Android device.
> I wonder whether it is possible to send NMEA sentences to the GPS (for
> an A-GPS purpose)? Or is there any other way to provide/inject
> assistance data to the A-GPS chip?
>
> 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] how to block the system notification of a message after broadcast has received it?

2011-01-20 Thread 陈彧堃


-- 
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: OpenJDK on Android

2011-01-20 Thread chris
> Imagine if we could run swing, rmi, if we could run all java code as
> it is, we could run enterprise application clients. We could have
> android apps running on the desktop and on the phone.

Great idea.

why think small ? I need a full J2EE stack to use EJB to manage
distributed transactions and simplify my synchronization.
anyone running Websphere on openjdk ?
:p




-- 
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: getHitRect() returns hit to a different image item in a Customize List

2011-01-20 Thread Streets Of Boston
I'm not sure if this would help, but you could take a list at
SonyEricsson's implementation of a 3D list, where contents of list-
items are transformed as well:

  http://blogs.sonyericsson.com/developerworld/?s=3d+list

And click on the three "Android Tutorial: Making your own 3D list"
parts for the info you may need.

On Jan 20, 10:37 am, argon gold  wrote:
> Deck of cards is on the RIGHT side , sorry my mistake.
>
>
>
> On Thu, Jan 20, 2011 at 11:28 PM, argon gold  wrote:
> > Hi Hari Edo,
>
> > You can view the effect I am doing in movie at following youtube link.
>
> >http://www.youtube.com/watch?v=TMaMpp8eg4s
>
> > It is on the left side a deck of cards when slide up or a fling action
> > happen they moves upward  at different angles and finally at one stage each
> > card gets straighten and at this point I have implemented a touch on that
> > specific card.
>
> > I'll study your suggestion and test it if it works.
>
> > Thanks & regards,
> > argongold
>
> > On Thu, Jan 20, 2011 at 8:22 PM, Hari Edo  wrote:
>
> >> It's not clear what effect you're doing, but you will probably need
> >> the inverse of the drawing transformation to determine the hits.
> >> That is, if the drawing transformation is dividing by Z for depth
> >> and perspective, the hit testing function should be multiplying by
> >> Z to put the touch coordinates back into the button's coordinate
> >> space.
>
> >> On Jan 20, 2:45 am, argongold  wrote:
> >> > Hi,
>
> >> > I have developed a custom list with images and these images are
> >> > displayed with different Z distance ( in 3D) as well as custom x,y and
> >> > z angles for each image item.
>
> >> > My problem is that when I hit an image on screen , the getHitRect()
> >> > returns a different image hit and not the actual on which I hit on
> >> > screen. Even though Images are not overlapping each other.
>
> >> > Can any one suggest me how can I precisely get the hit of
> >> > corresponding image.
>
> >> > Note. I am using Camera and Matrix classes and
> >> > getChildStaticTransformation() function to display the images.
>
> >> > Thanks in advance .
>
> >> > Regards,
> >> > argongold
>
> >> --
> >> 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- Hide quoted text -
>
> - Show quoted text -

-- 
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: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-20 Thread DanH
The main reason for the exception handler in the exception handler
would be to handle an array bounds exception on the indexing op.  It's
not nice to take an (unhandled) exception in an exception handler.

On Jan 20, 7:21 am, RyanMcNally  wrote:
> There's been no indication that the arrays could be null so far, but I
> guess at this point we are fully through the looking-glass so all bets
> are off.
>
> Welcome to bizarro-world, engage null-checks for your safety,
> convenience and psychological integrity.
>
> Ryan
>
> On Jan 20, 1:07 pm, DanH  wrote:
>
> > You didn't put an exception handler around the subscript operation in
> > the exception handler.
>
> > On Jan 20, 6:38 am, RyanMcNally  wrote:
>
> > > No native code I'm afraid.
>
> > > I've given the three users apk's with the improved exception logging,
> > > and so begins the waiting game...
>
> > > Ryan
>
> > > On Jan 20, 1:12 am, fadden  wrote:
>
> > > > That is definitely strange.  I can't see any reason why that exception
> > > > would be thrown from that point.
>
> > > > If you suspect that the object has been damaged, there's an excellent
> > > > chance that your improved exception handler will throw an exception.
> > > > Or crash.  Either way you will have learned something new. :-)
>
> > > > Future versions of the VM do show additional detail on array index
> > > > problems.
>
> > > > Is there any native code involved?  JNI code can generate array bounds
> > > > exceptions, and if somebody crossed up JNIEnv* it could end up on the
> > > > wrong thread.  Of course, it's *highly* unlikely that multiple
> > > > occurrences on different devices would have the same stack trace if
> > > > the failure is actually happening elsewhere.
>
> > > > There are no exceptions involved in floating-point division by zero on
> > > > Android (other than whatever the VFP hardware does internally).

-- 
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: google analytics jar does not seem to work now

2011-01-20 Thread H
HI David, yeah, analytics works fine for me in the emulator (*)

(*) depending on the avd you use. One of my avds was built from a custom rom 
with a custom hosts file that denied access to the analytics site and my 
logcat just filled up with exceptions "unable to resolve url" every ten 
seconds. But if you use all the default Android/Google avd's, this shouldn't 
be a problem at all.

I tend to find the analytics are available about 24 hours later. It's hard 
to tell precisely, but looking at the analytics for today, I can see some 
stuff with yesterday's date on it that isn't quite as a high as the previous 
day's figures yet.

-- 
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: Sample code for service?

2011-01-20 Thread petter
Thank you. It seem to be a problem with my xml file.

-- 
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: Sample code for service?

2011-01-20 Thread petter
> Did you try looking at the documentation? Because the Service class docs
> themselves have a "minimalistic" example.

If you by documentation refer to 
http://developer.android.com/reference/android/app/Service.html,
yes. But my problem is probably not the java code, but appears to be
that my xml file is not consistent.

-- 
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: Sample code for service?

2011-01-20 Thread petter
Yes I looked at http://developer.android.com/reference/android/app/Service.html,
but my problem appears to be with the xml file, and not the java code
itself. Hence I wanted a complete minimalistic example to learn how
these are tied together in a service.

-- 
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] Gingerbread BroadcastReceiver Issue

2011-01-20 Thread Jake Basile
I always try and assume it's my 
faultfirst,
 but I am completely without any idea as to how my code is causing the 
issue after spending q good chunk of effort searching. If I can fix this in 
my code I will; I hope it's mine because there is a 100% chance that I will 
fix it against a much smaller chance that the Android team will get to it.

I completely agree that I shouldn't need the service for this. I had no 
choice though, so I did it the only way that I could get it to work. My 
issue is that it stopped working on 2.3 with zero changes on my end. This 
means I will have to add *another* workaround (the startForeground one) so 
that 2.3 users can at least have a functioning app. This is also pretty 
terrible as it means I need to show an annoying notification icon at all 
times.

-- 
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: Sample code for service?

2011-01-20 Thread Kostya Vasilyev

Petter,

On the XML side, you just need something like this in the manifest:




Where ServiceClassName can be unqualified if it's right in the 
application package, or ".subpackage1.subpackage2.ServiceName" if it's 
nested inside another package - or a fully qualified name in either case.


Make sure that your  is inside 

And by the way, what do you get in the logcat?

-- Kostya

20.01.2011 20:19, petter пишет:

Yes I looked at http://developer.android.com/reference/android/app/Service.html,
but my problem appears to be with the xml file, and not the java code
itself. Hence I wanted a complete minimalistic example to learn how
these are tied together in a service.




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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: OpenJDK on Android

2011-01-20 Thread Jake Basile
It would be very convenient for developers, and a nightmare for phone users.

-- 
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] Calling WebView.addJavascriptInterface after onPageFinished

2011-01-20 Thread jamesh
Hi,

I'm trying to add Java objects to a WebView, such that they are
available to Javascript.

I can prove that if I do:

mWebView.addJavascriptInterface(myAvailableAtLoadTimeObject,
"MyJavaObject");
mWebView.load("file:///android_assets/index.html");

I can call methods from Javascript:

MyJavaObject.callableFunction(); // callableFunction is a Java method
on myAvailableAtLoadTimeObject.

or from Java:
mWebView.loadUrl("javascript:MyJavaObject.callableFunction();");

However, if WebViewClient.onPageFinished() has occurred, and then I
try:

mWebView.addJavascriptInterface(myAvailableOnlyLaterObject,
"MyLateJavaObject");
mWebView.loadUrl("javascript:MyLateJavaObject.callableFunction();");

I get an error reported from Javascript:
Uncaught ReferenceError: MyLateJavaObject is not defined

What am I missing, or doing wrong?

Thanks,

James

-- 
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] sound detection

2011-01-20 Thread manas gajare
1. I want to trigger a function when the sound level in the surrounding is
above some threshold level? How can I achieve that?
2. Is there any way to implement java sound api in android?

Manas

-- 
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: Receiving hard search button broadcasts within an app

2011-01-20 Thread ClarkBattle
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] Re: Does Any one Building Android source code in Mac

2011-01-20 Thread Hari Edo

A large number of app developers are using Eclipse (or other
tools) on Mac OS X to produce Android packages successfully.

The performance of a machine running Eclipse on Mac OS X will be
about the same as a similar configuration on Linux.  There is no
reason to expect a major shift between these two platforms.

Windows will also have similar performance, but I have heard that
there are some minor USB compatibility complaints or
compatibility with their still-immature 64-bit device layer.

On Jan 20, 10:59 am, Desu Vinod Kumar  wrote:
> Hi All,
>
> Does any one using Mac Os for Building Android Source code.
>
> How was performance & is it better compare to Ubuntu ?
>
> I am planning to buy Mac Book Pro, please let me know your opinions.
>
> TIA
>
> --
> Regards
> ---
> D Vinod Kumar
> R & D Engineer - Android Platform
> Mobile : 09916009493http://in.linkedin.com/in/desuvinodkumar

-- 
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: Guidewire Developer in MA 6+ months contract

2011-01-20 Thread Hari Edo


On Jan 20, 11:10 am, arun panigrahi  wrote:
- *Position: Guidewire Developer*
- The candidate is required to have a minimum of *2 years experience
with
- Guidewire's UI (Screen configurations) & Rules and Integration*
development
- utilizing *Guidewire Claim Center 5.0 or 6.0, Guidewire Contact
Center and
- Payments components*. Experience in Rule writing using GOSU code is
a must.
- Very good understanding of Guidewire platform, and GOSU is a must.
- Development experience in Claim Center integration is also required.

Does this have ANYTHING to do with Android development?  You don't
mention.

Why are you posting a public job ad, when you really just want to hire
from
within?  I'd wager there's only one person on the planet who meets
these
constraints and is looking for a job, and you know that person's name
already.

-- 
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: What's wrong with this maps intent?

2011-01-20 Thread Nathan
Adding DEFAULT didn't help, though I needed it anyway, but adding the
schema does.

Thanks.

Nathan

On Jan 19, 6:51 pm, Mark Murphy  wrote:
> Add android: to your scheme attribute.
>
> If that does not help, try adding  android:name="android.intent.category.DEFAULT" /> along with the
> BROWSABLE one.
>
>
>
>
>
>
>
>
>
> On Wed, Jan 19, 2011 at 6:29 PM, Nathan  wrote:
> > Thisintentfilter looks perfect(to me) to intercept a mapping url.
>
> >           
> >                
> >                 > android:name="android.intent.category.BROWSABLE"/>
> >                 > android:pathPrefix="/maps"/>
> >            
>
> > I have tried lots of other combinations too.
>
> > But I see this in the DDMS:
>
> > 01-19 15:13:48.378: INFO/ActivityManager(85): Starting activity:
> >Intent{ act=android.intent.action.VIEW
> > cat=[android.intent.category.BROWSABLE] dat=http://maps.google.com/
> >maps?q=12989%20NW%20SKYLINE%20B...@45.6168,-122.8727 cmp=android/
> > com.android.internal.app.ResolverActivity }
> > 01-19 15:13:48.828: INFO/ActivityManager(85): Displayed activity
> > android/com.android.internal.app.ResolverActivity: 376 ms (total 376
> > ms)
>
> > When the resolver activity comes up, this activity is *not* one of the
> > three choices.
>
> > Anyone care to point out something dumb I've done wrong? It doesn't
> > seem like this should be that hard.
>
> > Nathan
>
> > --
> > 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

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


[android-developers] Re: Underclocking to simulate other phones

2011-01-20 Thread Hari Edo

I think people rely on the software emulator instead.

If you know how to dive into the firmware at that level,
you would know whether you would impact the reliability
and consistent behavior of the device.  I wouldn't trust
the results, myself.

On Jan 19, 8:29 pm, brian purgert  wrote:
> Would that work underclocking my phone so it could simulate much slower
> phones then mine.

-- 
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] AudioManager.VOLUME_CHANGED_ACTION does not resolve

2011-01-20 Thread A Curtis
Hello,

I am trying to create a BroadcastReceiver that monitors for Volume
changes. Searching the internet and the GIT repository, it appears
that there is an AudioManager.VOLUME_CHANGED_ACTION. However Eclipse
does not recognize this and will not build the project.

The minSdkVersion is set to 9.

Has this changed?

TIA

-- 
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: CheckBox spacing

2011-01-20 Thread Doug
I don't know for certain, but I imagine the checkbox background
drawables are adding outside padding like the other Android widgets.
You could probably get away with just substituting your own drawables
to trim it down without changing the widget functionality.  Time to
dig into the SDK...

Doug

On Jan 19, 4:52 pm, John Lussmyer  wrote:
> I have a need to put a row (or column) of 9 checkboxes in a dialog.
> Each checkbox will only have a 1 character description (0-9)
> The problem is that the default CheckBox leaves HUGE amounts of space around
> it, which makes it impossible to fit 9 in the dialog.
> Is there any way to reduce the space a Checkbox uses?  Or do I have to write
> a custom widget to do this simple task?

-- 
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: AudioManager.VOLUME_CHANGED_ACTION does not resolve

2011-01-20 Thread Pent
> I am trying to create a BroadcastReceiver that monitors for Volume
> changes. Searching the internet and the GIT repository, it appears
> that there is an AudioManager.VOLUME_CHANGED_ACTION. However Eclipse
> does not recognize this and will not build the project.

It's not accessible from the official SDK. You can use the string.
Doesn't work on all devices.

Pent

-- 
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] error in my Android app

2011-01-20 Thread bob
I keep getting the following error in my Android app:


Thread [<1> main] (Suspended (exception RuntimeException))
ActivityThread.performLaunchActivity(ActivityThread
$ActivityClientRecord, Intent) line: 1622
ActivityThread.handleLaunchActivity(ActivityThread
$ActivityClientRecord, Intent) line: 1638
ActivityThread.access$1500(ActivityThread, ActivityThread
$ActivityClientRecord, Intent) line: 117
ActivityThread$H.handleMessage(Message) line: 928
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3647
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 507
ZygoteInit$MethodAndArgsCaller.run() line: 839
ZygoteInit.main(String[]) line: 597
NativeStart.main(String[]) line: not available [native method]

Anyone know what this means?

-- 
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] Radiogroup adding a radio button in listview

2011-01-20 Thread kiros88
Hi so basically im trying to have a list in extends ListActivity and
stuff but right now im trying to get a listview of radio buttons which
i guess works but now im trying to apply a radio group for the list.
This is the part im stuck on so basically

once i created my own array adapter i wanted to make in the getView
function every added View(which is radiobutton) to go into the array
adapter add to my radio group

public View getView(int position, View convertView, ViewGroup parent)
{
 // TODO Auto-generated method stub
 //return super.getView(position, convertView, parent);

 LayoutInflater inflater=getLayoutInflater();
 View row=inflater.inflate(R.layout.radio, parent, false);
 //CheckedTextView
label=(CheckedTextView)row.findViewById(R.id.text1);
 RadioButton label =
(RadioButton)row.findViewById(R.id.RadioButton01);
 mRadioGroup.addView(label, position, layoutParams);
 label.setText(zones.get(position));

 return row;

my layout radio.xml just has a

radiogroup
radiobutton inside radiogroup


so the only line that doesnt work is the call to add view in
mRadioGroup


-- 
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: Underclocking to simulate other phones

2011-01-20 Thread neuron
It's actually very simple.
# adb shell
# su
# cd /sys/devices/system/cpu/cpu0/cpufreq
Your looking for scaling_*. Basically scaling_max_freq (you can use the 
numbers from scaling_available_frequencies). To set a frequency simply write 
to scaling_max_freq.
Example:
# echo 1197000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

-- 
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] error in my Android app

2011-01-20 Thread Kostya Vasilyev

Hit "Resume" in Eclipse and let it crash all the way.

Then check the logcat for a detailed error message.

20.01.2011 22:09, bob пишет:

I keep getting the following error in my Android app:


Thread [<1>  main] (Suspended (exception RuntimeException))
ActivityThread.performLaunchActivity(ActivityThread
$ActivityClientRecord, Intent) line: 1622
ActivityThread.handleLaunchActivity(ActivityThread
$ActivityClientRecord, Intent) line: 1638
ActivityThread.access$1500(ActivityThread, ActivityThread
$ActivityClientRecord, Intent) line: 117
ActivityThread$H.handleMessage(Message) line: 928
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3647
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 507
ZygoteInit$MethodAndArgsCaller.run() line: 839
ZygoteInit.main(String[]) line: 597
NativeStart.main(String[]) line: not available [native method]

Anyone know what this means?




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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: Calling WebView.addJavascriptInterface after onPageFinished

2011-01-20 Thread Dan
James,

Have you verified your JavaScript isn't already executed before this
event occurs?

-Dan

On Jan 20, 9:43 am, jamesh  wrote:
> Hi,
>
> I'm trying to add Java objects to a WebView, such that they are
> available to Javascript.
>
> I can prove that if I do:
>
> mWebView.addJavascriptInterface(myAvailableAtLoadTimeObject,
> "MyJavaObject");
> mWebView.load("file:///android_assets/index.html");
>
> I can call methods from Javascript:
>
> MyJavaObject.callableFunction(); // callableFunction is a Java method
> on myAvailableAtLoadTimeObject.
>
> or from Java:
> mWebView.loadUrl("javascript:MyJavaObject.callableFunction();");
>
> However, if WebViewClient.onPageFinished() has occurred, and then I
> try:
>
> mWebView.addJavascriptInterface(myAvailableOnlyLaterObject,
> "MyLateJavaObject");
> mWebView.loadUrl("javascript:MyLateJavaObject.callableFunction();");
>
> I get an error reported from Javascript:
> Uncaught ReferenceError: MyLateJavaObject is not defined
>
> What am I missing, or doing wrong?
>
> Thanks,
>
> James

-- 
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] Radiogroup adding a radio button in listview

2011-01-20 Thread TreKing
On Thu, Jan 20, 2011 at 1:13 PM, kiros88  wrote:

> so the only line that doesnt work is the call to add view in mRadioGroup
>

What does "doesn't work" mean?

-
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

[android-developers] Re: Radiogroup adding a radio button in listview

2011-01-20 Thread kiros88
When i check log cat i basically get a saying that null pointer
exception with the line of code about addView so im not sure if its
placed in a bad spot because its in a overide function getView

I'm just trying to find a way to dynamically add radiobuttons to a
radiogroup without using a scrollView so my idea is to use a ListView
but I'm open to any new suggestions that just follow a criteria of
have a list of radiobuttons that are dynamically defined and all stay
in one radio group

On Jan 20, 11:26 am, TreKing  wrote:
> On Thu, Jan 20, 2011 at 1:13 PM, kiros88  wrote:
> > so the only line that doesnt work is the call to add view in mRadioGroup
>
> What does "doesn't work" mean?
>
> --- 
> --
> 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


[android-developers] savedInstanceState null?

2011-01-20 Thread Chris
Hi All,

I'm trying to save the state of my app while I shut it down but every
time I bring it back up savedInstanceState is always null..? I
couldn't seem to find much info on calling onSaveInstanceState
properly so here's what I did

onPause ()
{...
  Bundle test = new Bundle();
  this.onSaveInstanceState(test);
}
onSaveInstance(Bundle save)
{
  save.putBoolean("Run", true); // testing
  super.onSaveInstanceState(save);
}

I'd rather use this method than writing to a file or using the saved
preferences..

Can someone help me out?

Thanks,
Chris

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


[android-developers] Re: Best, easiest, cleanest, way to make a game and cross platfrom.

2011-01-20 Thread Robert Green
I'm currently writing clean cross platform games in C++.  I'll be
releasing a product very soon that is the foundation of what I'm doing
there.

On Jan 20, 6:16 am, brian purgert  wrote:
> Thanks i looked into it and i really like the unity game engine, and i just
> bought a book for it and i think it will be a good next step for me.
> On Jan 20, 2011 12:06 AM, "Nightwolf"  wrote:
>
>
>
>
>
>
>
> > libgdx allows you to develop mostly on PC and then generate apk for
> > android.
> > Unity engine has iPhone and Android targets. However android version
> > will cost you.
>
> > On Jan 20, 3:30 am, brian purgert  wrote:
> >> Well, I,ve decided that I want to make my next game a diffrent way, after
> >> learning alot, i don't think i want to draw it with the canvas altough
> very
> >> easy for the concept im going with.
> >> So what do you think about "andengine" or "corona sdk" or even straight
> >> opengl i saw a little kid use it to make a game lol, so its probably
> easy,
> >> also i want it to be easy to transfer from platfrom to platfrom.
>
> >> What are my options, your advice..
>
> > --
> > 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 > cr...@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: Radiogroup adding a radio button in listview

2011-01-20 Thread TreKing
On Thu, Jan 20, 2011 at 1:45 PM, kiros88  wrote:

> When i check log cat i basically get a saying that null pointer exception
> with the line of code about addView so im not sure if its placed in a bad
> spot because its in a overide function getView
>

Use your debugger to step through the code or use logging to determine what
at that point is null. Then make it so it's not null.


> I'm just trying to find a way to dynamically add radiobuttons to
> a radiogroup without using a scrollView so my idea is to use a ListView but
> I'm open to any new suggestions that just follow a criteria of have a list
> of radiobuttons that are dynamically defined and all stay in one radio group
>

You do not need a scroll view or list view for this. A RadioGroup is a
ViewGroup, which can hold children. You can shove in as many RadioButtons as
you want, and they will all be in that group.

-
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] savedInstanceState null?

2011-01-20 Thread TreKing
On Thu, Jan 20, 2011 at 1:48 PM, Chris  wrote:

> I'm trying to save the state of my app while I shut it down but every
> time I bring it back up savedInstanceState is always null..?
>

If your app is shut down completely, there is no state to save.


>  I couldn't seem to find much info on calling onSaveInstanceState properly
> so here's what I did
>

http://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)
http://developer.android.com/guide/topics/fundamentals.html#actlife



>
> onPause ()
> {...
>  Bundle test = new Bundle();
>  this.onSaveInstanceState(test);
> }
>

You're not supposed to be calling onSaveInstanceState - the system does this
for you as an indication that you are liable for axing.

-
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

[android-developers] Re: Best, easiest, cleanest, way to make a game and cross platfrom.

2011-01-20 Thread Phil Endecott
On Jan 20, 12:30 am, brian purgert  wrote:
> even straight opengl

Go for it.  Think of it as a learning investment.

You may then decide that you'd like to use some sort of layer on top
of that, to hide some of the details.  But it will help a lot if you
have had some exposure to the underlying stuff.

-- 
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: Calling WebView.addJavascriptInterface after onPageFinished

2011-01-20 Thread jamesh
Hi, Dan

The Javascript is already in memory (i.e. loaded by Webkit): I can
call functions/methods on that code from Java.

mWebView.loadUrl("file///android_assets/index.html"); // loads a bunch
of javascript.

The onPageFinished method runs, and the page is ready.

This javascript doesn't do anything except initialize itself and wire
up a few listeners/onclick type things.

I can verify that, by invoking a method on an JS object created in
global:

mWebView.loadUrl("javascript:mLoadedEarlier.method();");

It is not doing anything exotic e.g. setInterval() or tight looping.

Once I've done that, I'd like to add my newly minted javascript
interface - the Java object myAvailableOnlyLaterObject:

mWebView.addJavascriptInterface(myAvailableOnlyLaterObject,
"MyLateJavaObject");

Methods will be called on MyLateJavaObject in a click handler, i.e.
some time later. When the appointed time comes for the user to click,
triggering the call, the ReferenceError is reported.

Should I be able to do what I'm asking, and I'm doing it wrong? or am
I holding it wrong?

James

On Jan 20, 7:20 pm, Dan  wrote:
> James,
>
> Have you verified your JavaScript isn't already executed before this
> event occurs?
>
> -Dan
>
> On Jan 20, 9:43 am, jamesh  wrote:
>
> > Hi,
>
> > I'm trying to add Java objects to a WebView, such that they are
> > available to Javascript.
>
> > I can prove that if I do:
>
> > mWebView.addJavascriptInterface(myAvailableAtLoadTimeObject,
> > "MyJavaObject");
> > mWebView.load("file:///android_assets/index.html");
>
> > I can call methods from Javascript:
>
> > MyJavaObject.callableFunction(); // callableFunction is a Java method
> > on myAvailableAtLoadTimeObject.
>
> > or from Java:
> > mWebView.loadUrl("javascript:MyJavaObject.callableFunction();");
>
> > However, if WebViewClient.onPageFinished() has occurred, and then I
> > try:
>
> > mWebView.addJavascriptInterface(myAvailableOnlyLaterObject,
> > "MyLateJavaObject");
> > mWebView.loadUrl("javascript:MyLateJavaObject.callableFunction();");
>
> > I get an error reported from Javascript:
> > Uncaught ReferenceError: MyLateJavaObject is not defined
>
> > What am I missing, or doing wrong?
>
> > Thanks,
>
> > James

-- 
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] Quick Question about developer platform

2011-01-20 Thread kiros88
Hi i just wanted to know what ppl have been using for there developers
platform.
I'm basically using the raw version i guess using eclipse with android
and going through that way. I was curious if anyone else has any idea
which tools they use or another platform tool they use to develop
android apps taht make life so much easier

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