[android-developers] Hiding SMS notifications

2010-07-26 Thread Andrea Rota
Hello all,

I am working on a research project and I need to write an Android
application that is able to intercept SMS's and, according to their
content, route them to a web services without showing any alert.

I tried to register a broadcast receiver on the intent SMS_RECEIVED,
but the default SMS application is still notifying the SMS in the
notification bar. The only way to achieve what is manually disabling
the message notification from the default SMS application's menu.

I found that the "SMS Guard" application, available on the market, is
able to filter messages out without any notification, without touching
any default configuration (I wrote to the developer, no answer yet).

Any 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


Re: [android-developers] My MapActivity is not showing the map

2010-07-26 Thread Mark Murphy
On Mon, Jul 26, 2010 at 2:58 AM, Amit  wrote:
> Hi All,
>
> I am trying to create a sample application to explore Google maps
> through android.
>
> When I try to run the application I only get the blank grid. no map is
> displayed.
>
> If i see the DDMS logcat i get erros "Couldn't get connection factory
> client".
>
> Please help me in this regard.
>
> Surprisingly the already installed  Google Maps app of emulator is
> working fine and showing me the maps

That means you do not have a valid API key, or possibly that you do
not hold the INTERNET permission in your application.

> The manifest file looks like -
>
> 
> http://schemas.android.com/apk/res/android";
>        package="com.eterno" android:versionCode="1"
> android:versionName="1.0">
>        
>                
>                
>                
>                        
>                                 android:name="android.intent.action.MAIN" />
>                                 android:name="android.intent.category.LAUNCHER" />
>                        
>                
>
>        
> 

 needs to be a child element of , not of
. Move that to the proper spot, and your activity should
start working.

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

_Android Programming Tutorials_ Version 2.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] Change application preferences programmaticaly

2010-07-26 Thread Andrea Rota
Hello all,

I have been looking for a method to change the default SMS
application's preference programmatically.

I found that those preferences are stored as "shared preferences",
probably in data/data/com.android.sms/something.xml, but I am not able
to get to that directory since I haven't rooted my phone.

Do you have any clue?

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: Android market rules are changed, you must accept it within 30 days but...

2010-07-26 Thread William Ferguson
That was my conclusion as well. The problem with that is that your
target audience is now a great deal less.
How many Android users (especially as Android phones becomes more
mainstream) will venture outside of the offical Android market?
And that's assuming that their phone can actually install apps from
"Unknown sources" ..

On Jul 26, 9:32 am, Indicator Veritatis  wrote:
> Where does it leave you? It could leave you considering alternatives
> to Google's Android Market, such ashttp://slideme.orgorhttp://www.getjar.com/.
>
> The former in particular is proud of their achievement of being usable
> for both buyers and sellers from almost any country in the world.
>
> On Jul 24, 5:35 pm, William Ferguson 
> wrote:
>
> > So where does this leave those of us who are outside the half dozen
> > countries that can't *sell* apps on the market?
>
> > I had hoped to provide a free crippled version on the market, and
> > provide a paid unlock key from another site.
> > Is my crippled app allowed or disallowed under the market rules?
>
> > On Jul 25, 4:19 am, Pent  wrote:
>
> > > > So,I'm not authorized to put on the market a FREE trial version,
> > > > and ask customers who want the full version to buy it on my official
> > > > site?
>
> > > 3.3 ...Such free trials for Products are encouraged. However, if you
> > > want to collect fees after the free trial expires, you must collect
> > > all fees for the full version of the Product through the Payment
> > > Processor on the Market
>
> > > Seems quite clear.
>
> > > 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


Re: [android-developers] J2ME

2010-07-26 Thread kavitha chidambaram
Hi All,
   the below link for converting J2ME application into Android
application(.apk). Use this to run J2ME application on Android platrom.

http://www.netmite.com/android/
http://www.netmite.com/android/srv/2.0/getapk.php

Thanks,
Kavitha


On Fri, Jul 23, 2010 at 9:43 AM, perumal316  wrote:

> Hi All,
>
> Is there any way to convert J2ME applications into Android
> applications?
>
> The only way I have come across is using microemulator which if I used
> to convert J2ME app that uses Camera or Bluetooth APIs doesn't work.
>
> Is there any other way?
>
> Regards,
> Perumal
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: My MapActivity is not showing the map

2010-07-26 Thread Amit
Dear Mark,

I have done the change suggested by you and regenerated the API key as
well but no success at all.

I am putting the logcat on my system as well- Please help me as i
can't move ahead unless is works for me.

07-26 13:15:30.971: ERROR/ActivityThread(781): Failed to find provider
info for com.google.settings
07-26 13:15:36.881: INFO/MapActivity(781): Handling network change
notification:CONNECTED
07-26 13:15:36.946: ERROR/MapActivity(781): Couldn't get connection
factory client
07-26 13:15:38.402: WARN/ActivityManager(604): Launch timeout has
expired, giving up wake lock!
07-26 13:15:39.722: WARN/ActivityManager(604): Activity idle timeout
for HistoryRecord{4358a5d8 {com.eterno/com.eterno.MapsActivity}}
07-26 13:15:40.023: DEBUG/dalvikvm(781): GC freed 4606 objects /
284400 bytes in 574ms
07-26 13:15:41.091: INFO/ActivityManager(604): Displayed activity
com.eterno/.MapsActivity: 12769 ms



On Jul 26, 12:02 pm, Mark Murphy  wrote:
> On Mon, Jul 26, 2010 at 2:58 AM, Amit  wrote:
> > Hi All,
>
> > I am trying to create a sample application to explore Google maps
> > through android.
>
> > When I try to run the application I only get the blank grid. no map is
> > displayed.
>
> > If i see the DDMS logcat i get erros "Couldn't get connection factory
> > client".
>
> > Please help me in this regard.
>
> > Surprisingly the already installed  Google Maps app of emulator is
> > working fine and showing me the maps
>
> That means you do not have a valid API key, or possibly that you do
> not hold the INTERNET permission in your application.
>
>
>
>
>
> > The manifest file looks like -
>
> > 
> > http://schemas.android.com/apk/res/android";
> >        package="com.eterno" android:versionCode="1"
> > android:versionName="1.0">
> >        
> >                
> >                 > />
> >                 > android:label="@string/
> > app_name">
> >                        
> >                                 > android:name="android.intent.action.MAIN" />
> >                                 > android:name="android.intent.category.LAUNCHER" />
> >                        
> >                
>
> >        
> > 
>
>  needs to be a child element of , not of
> . Move that to the proper spot, and your activity should
> start working.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.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: 2.2 Google Api emulator not booting up

2010-07-26 Thread Tapomay
andywebsdale  gmail.com> writes:

> 
> 
> On Jun 2, 12:20 pm, Ashok Jeevan  wrote:
> 
> > When I checked the log, it shows a MountService with message 'waiting too
> > long for mReady!'
> >
> > What should be done inorder to boot the emulator?
> 
> I'm having exactly the same issue - have you got anywhere with this
> problem?
> Perhaps I have misconfigured something - can anyone suggest where I
> may be going wrong?
> 


Plus one for the issue. 
Waiting for a solution.

Regards,
Tapomay.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Change application preferences programmaticaly

2010-07-26 Thread Mark Murphy
On Mon, Jul 26, 2010 at 3:05 AM, Andrea Rota  wrote:
> I have been looking for a method to change the default SMS
> application's preference programmatically.

First, there is no single "defalut SMS application". Each device may
have different ones.

Second, the AOSP Messaging application (com.android.sms) is not part
of the Android SDK, and so there are no documented APIs for
manipulating it.

> I found that those preferences are stored as "shared preferences",
> probably in data/data/com.android.sms/something.xml, but I am not able
> to get to that directory since I haven't rooted my phone.
>
> Do you have any clue?

You cannot modify settings in another application, any more than other
applications can hack into yours. Sorry!

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

_Android Programming Tutorials_ Version 2.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


Re: [android-developers] Re: My MapActivity is not showing the map

2010-07-26 Thread Mark Murphy
On Mon, Jul 26, 2010 at 3:49 AM, Amit  wrote:
> I have done the change suggested by you and regenerated the API key as
> well but no success at all.

An incorrect API key or a missing/invalid INTERNET permission are the
only two causes of missing map tiles that I know of, if the built-in
Maps application is working.

> I am putting the logcat on my system as well-

Nothing from that is a relevant message. For example, "Couldn't get
connection factory client" happens all of the time, IIRC.

Here is a project that works, once you replace my API key with yours:

http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/

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

_Android Programming Tutorials_ Version 2.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: Choosing an Image

2010-07-26 Thread Kumar Bibek
You should be better off using the Constants values available.
RESULT_OK or RESULT_CANCELLED.

Just a suggestion.

-Kumar Bibek
http://tech-droid.blogspot.com

On Jul 24, 9:34 am, KG  wrote:
> Never mind, I just realized that -1 is the correct value I want
>
> On Jul 23, 6:02 pm, KG  wrote:
>
> > That gets me the Uri but still returns -1 as a resultCode.  Do you
> > have any idea why?
>
> > Also, I need to be able to take a picture via the Camera app.  I can't
> > test it on the emulator but I have this right now:
>
> > Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
> > startActivityForResult(cameraIntent, CAMERA_RESULT);
>
> > Does that look right?
>
> > On Jul 23, 5:52 pm, jeffro  wrote:
>
> > > Try this instead:
>
> > > Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
> > > photoPickerIntent.setType("image/*");
> > > startActivityForResult(photoPickerIntent, 1);
>
> > > Jeff
> > > Visit Trackaroo.com!
> > > Trackmaster - Motorsports Lap Timer
> > > Dynomaster - Performance Dyno
>
> > > On Jul 23, 4:44 pm, KG  wrote:
>
> > > > Hi Everyone,
>
> > > > I'm trying to allow the user to choose an image to load into my app
> > > > using the default image browser on the phone.
> > > > Here is what I have so far:
>
> > > > Intent findImageIntent = new Intent(Intent.ACTION_GET_CONTENT);
> > > > findImageIntent.setType("image/*");
> > > > startActivityForResult(Intent.createChooser(findImageIntent, "Select
> > > > Picture"), IMAGE_SELECT);
>
> > > > This correctly launches the image chooser and I'm able to click one
> > > > which returns me to my main activity.  However, it does not load the
> > > > image I selected, returning a -1 for resultCode in onActivityResult.
>
> > > > Anyone know what I'm doing wrong?
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Scanning a Text File In Android

2010-07-26 Thread anil kukreti
hmm..

My objective is to scan a text or image file and if there's any phone no
present in that file i could call that no. through my app.

Thanks

On Mon, Jul 26, 2010 at 8:12 AM, TreKing  wrote:

> On Sun, Jul 25, 2010 at 1:33 AM, anil kukreti 
> wrote:
>
>> I mean if theres' any phone no in file ,, the android application can call
>> it.
>
>
> I still have no idea what you're trying to do ...
>
>
>
> -
> 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
>



-- 
Thanks for Cooperating!
 Anil Kukreti

Network transforms ideas to reality.
09312646623
Linked In : http://in.linkedin.com/in/anilkukreti
Blog : http://androidosbeginning.blogspot.com/
Skype Id : anil.kleward

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Populating child list in Expandable lists using dynamic multidimensional arrays

2010-07-26 Thread AlanLawrence

Shouldn't you just override getChildrenCount(int) to return the number
of children for that particular group, rather than the maximum over
all groups?

On Jul 26, 5:07 am, Pravin Parulekar  wrote:
> Hello Gurus,
> I am using a simple expandable list that is populated by two arrays
> ( group array for the groups and a multi dimensional children array
> for the child).
>
> The arrays are built dynamically in the program and some group items
> have more children than others. So I end up defining the highest
> number as the array size for the multidimensional child array.
> After populating the child array, some positions are left null, as
> there are no values for those group items (explained above).
> When I associate this with the expandable list adapter, the
> getChildView method throws a nullpointer exception when it comes
> across a position in child array that does noto have value.
> I have two questions:
>
> 1. Can I make the base adapter skip the shildview method if the value
> in that child is null? The current implementation of getchildView
> method has to return a view and even if I suppress the nullpointer
> exception, it adds a blank element in the child position in the list.
>
> 2. Is there a better way of associated multidimensional arrays that
> are populated at run time? The current set of examples only use
> hardcoded string array values. Even the cursor adapters examples use
> very basic setup.
>
> thank you so much for your attention and response.
>
> Best, Pravin

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My MapActivity is not showing the map

2010-07-26 Thread Amit
Dear Mark,

What does "Failed to find provider
info for com.google.settings" means...does it implies that its not
able to recognize my key to use google maps?

On Jul 26, 1:06 pm, Mark Murphy  wrote:
> On Mon, Jul 26, 2010 at 3:49 AM, Amit  wrote:
> > I have done the change suggested by you and regenerated the API key as
> > well but no success at all.
>
> An incorrect API key or a missing/invalid INTERNET permission are the
> only two causes of missing map tiles that I know of, if the built-in
> Maps application is working.
>
> > I am putting the logcat on my system as well-
>
> Nothing from that is a relevant message. For example, "Couldn't get
> connection factory client" happens all of the time, IIRC.
>
> Here is a project that works, once you replace my API key with yours:
>
> http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.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


Re: [android-developers] Re: My MapActivity is not showing the map

2010-07-26 Thread Mark Murphy
On Mon, Jul 26, 2010 at 4:24 AM, Amit  wrote:
> What does "Failed to find provider
> info for com.google.settings" means...does it implies that its not
> able to recognize my key to use google maps?

This has nothing to do with your problem, AFAIK.

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

_Android Programming Tutorials_ Version 2.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: Suggestions on howto start service without rebooting device

2010-07-26 Thread Bob Kerns
Well, OtherApp can't directly start the MapApp service, but it can
wake up MyApp, which can then start it itself.

In most cases, the ideal approach would be for OtherApp to start an
activity in MyApp, which can then provide the user-interface to inform
the user about what they've just installed, that it's starting the
service, etc. It's good to provide some non-intrusive feedback that
the operation was successful. It certainly makes it easier to be sure
it's working!

But OtherApp could also send a broadcast instead, and that could start
the service.

I do wish apps could activate on install. At the time of download is
the point where a user is (almost) guaranteed to remember what your
app is, and why she's installed it, and to introduce her to why it's
going to make her life so much better. Or simply to make sure it's
doing the task she downloaded it for.

I don't even think it would be horrible if EVERY app launched when
downloaded. As a user, that's generally what I want to do. The only
problem is, that download takes a bit of time, so I may have wandered
on to something else sometimes.

(Of course,the flip side of this is that users will usually launch you
soon after download anyway).

On Jul 25, 11:04 pm, ADman  wrote:
> sorry about the delayed response. I don't own the other app, but we
> need to communicate with each other...these are the requirements I
> have been given :(
>
> Its not doing anything fancy, just collecting usage data(phone calls,
> sms, etc). In order to make the data as correct as possible, I would
> like to make sure to start collection as soon as the app is installed,
> rather than until the next reboot.
>
> I figure out one way of doing this, not sure if this is very clean
> way. Since the OtherApp will always be installed before MyApp, the
> manfiest of OtherApp is modified to listen for package_add/remove/
> modify of the MyApp, and as soon as it gets this notification, it will
> start the MyApp service. It works, but i'm not sure if this is a good
> way. Any thoughts?
>
> On Jun 24, 10:07 am, TreKing  wrote:
>
>
>
> > On Jun 17, 6:40 pm, ADman  wrote:
>
> > > In my case, i have two apps- one runs as a service and collects data, the 
> > > other
> > > displays it.
>
> > Why do you have two apps?
>
> > > Any suggestions on how to achieve this?
>
> > Ask the users to start your app immediately?
> > You can't do this programmatically, for good reasons.
> > Why is your app so dependent on starting immediately? What is it doing
> > that it can't recover from?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 market rules are changed, you must accept it within 30 days but...

2010-07-26 Thread String
On Jul 25, 12:06 am, Zsolt Vasvari  wrote:

> Has the return policy gone from 1 to 2 days now, or has it always been
> worded like that?

It's not new - I think the 48-hour policy was included in the last
update to the agreement. AFAIK, though, the reality hasn't changed for
Market users yet; they still have only 24 hours to get a refund at the
moment.

String

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


[android-developers] Re: What is a WeakReference?

2010-07-26 Thread Bob Kerns
Um, slightly too strong a statement.

As soon as it's not used outside the cache, it's ELIGIBLE for garbage
collection, which is likely to happen soon.

There are times this is appropriate for a cache. If the objects you're
likely to look up again, are also likely to still be live, but
expensive to find, but can be expected to eventually drop out of use
(and liveness), then WeakReference is the right choice.

Or when your cached object is so big, you want them to go away as soon
as possible, but sometimes you reference them again before they've
gone dead, or before the GC actually got a chance to collect them.
Typically such a cache might only hold the one or two latest objects.

Not your typical general-purpose cache scenarios, however.

My main concern with your statement is that it would imply that
there's some mechanism that instantly nulls out the reference as soon
as the last live reference is dropped. It's not instant -- but that
WOULD be the ideal behavior for a GC, and one benefit of good GC
techniques is that they improve the odds of early collection of short-
lived garbage.

WeakReferences are more useful for associating an object for as long
as it exist, without prolonging that existence. I find it harder to
explain what that means, than to actually decide when they're needed.


On Jul 22, 11:26 am, Romain Guy  wrote:
> You definitely do NOT want to use a WeakReference to cache object. If
> you do so, as soon as your data is put in the cache and not used
> outside of the cache, it gets garbage collected.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Getting a FileDescriptor from a Socket

2010-07-26 Thread Alexandre Ferrieux


On Jul 24, 6:39 pm, Joseph Earl  wrote:
> For accessing a private member you'd have to use Reflection.
> Can't help you on the first point though I'm afraid.

Thanks anyway.

The solution I've come up with, is to create a pair of connected
LocalSockets in addition to my initial Socket, and a dedicated "noria"
thread that carries bytes from the OutputStream of the LocalSocket to
the InputStream of the Socket. Ugly, but working. But ugly ;-)

-Alex

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 is a WeakReference?

2010-07-26 Thread Bob Kerns
Actually, I would disagree with this characterization.

In many cases, it's completely infeasible to maintain the information
you'd need. For example, if you provide an API that accepts objects,
and you maintain some internal information about them -- you have no
opportunity to track the client's use of the API. You COULD warp the
API to require the client track this information for you -- but they'd
get it wrong, and  the result would be a less-efficient and more
unreliable package.

It's also inefficient to track that. Especially in cases with circular
references, where simple reference counting cannot work.

In many cases, what you end up having to do is to implement your own
GC of these objects. Using WeakReference means you don't have to do
that; the GC itself informs you.

So it's not just an easier way to avoid poor programming. It's far
more valuable and essential than that implies.

Let's say I have a persistence package, that maintains a huge mass of
information for immediate real-time access about a player. It streams
in from a database, and stays around in memory.

Now, let's say I have a client of that, that's one node in a grid.
Players come and go from grid to grid, join the game, leave the game,
even permanently.

And not just players -- objects come, go, are changed. you have a rich
mix of lightweight objects, and heavy-weight back-end data in support
of them.

A WeakReference is really the only sane way to manage this. The back-
end can associate its data with the Player and Object's using a
WeakReference. When a Player disappears from memory, perhaps moving on
to another realm, the back end can then persist any changes and free
the storage. (It can even arrange to be notified of this, or it can do
it as a background sweep when not busy).

I cast that as an MMO game to grab your interest, but it could also be
something much more mundane, like a shopper's web session, and loaded
product description objects. If no shoppers are browsing a product, it
can be GC'd. In this case, you might use a map with a WeakReference
for the key, and a SoftReference for the data. The WeakReference
allows you to drop the mapping when the shopper goes away; the
SoftReference allows you to reclaim the storage if you're running low
on memory. Without the WeakReference, you'd continue to hold onto the
shopper or player AND the mapping, just by remembering the association
in a table.

On Jul 22, 3:36 pm, DanH  wrote:
> " So you'd only want to use WeakReference when you think your activity
> might run out of memory?"
>
> Not exactly.  If you use poor programming techniques just about any
> long-running operation can run out of memory.  WeakReference is an aid
> to keep you from having to use much more complex techniques (like
> reference chains) while still having "good" programming practices.
>
> On Jul 22, 1:36 pm, GodsMoon  wrote:
>
>
>
> > So you'd only want to use WeakReference when you think your activity
> > might run out of memory?
> > But a list view already does efficient memory management for you
> > right?
>
> > You'd saying if I were create a large array or something like that
> > then it would be good to use WeakReference. right?
>
> > Thanks for the help guys,
> > David Shellabargerwww.nightshadelabs.com
>
> > On Jul 22, 2:26 pm, Romain Guy  wrote:
>
> > > You definitely do NOT want to use a WeakReference to cache object. If
> > > you do so, as soon as your data is put in the cache and not used
> > > outside of the cache, it gets garbage collected.
>
> > > On Thu, Jul 22, 2010 at 11:07 AM, Joseph Earl  
> > > wrote:
> > > > Suppose you had a long list of images. As the user scrolled down you
> > > > load the images from the net, and then display them.
> > > > To avoid having to reload the images again if the user scrolls back
> > > > up, you put the images in a cache (probably something like a
> > > > Map)
>
> > > > However because it is a long list you don't want to run into an out of
> > > > memory situation if the user scrolls very far down and lots of images
> > > > are put in the cache.
> > > > So instead of storing the Drawables directly in the map, you create a
> > > > Map> (although I would use SoftReference
> > > > for the purpose described here).
> > > > This means that if Android is going to encounter an out of memory
> > > > situation it will clear all of the Soft/Weak references (and thus
> > > > hopefully avoid running out of memory). You will have to load the
> > > > images again since your cache has been cleared, but this is far better
> > > > than your application running out of memory and crashing.
>
> > > > So you do something like:
>
> > > > // caching an image
> > > > Map cache = new HashMap > > > SoftReference>();
> > > > cache.put("http://mysite.com/images/1.jpg";, new
> > > > SoftReference.put(myDrawable));
>
> > > > // retrieve an image
> > > > if (cache.containsKey(url)) {
> > > >   // looks like we have this image cached
> > > >   Drawable drawable = cache.get(url).get();
>

[android-developers] ContactsContract.RawContacts two entry get Inserted for single contact why so ?

2010-07-26 Thread Atul Raut
Hi Google,

Need some info on
ContactsContract.RawContacts
 :

A row in the 
ContactsContract.RawContactstable
represents a set of data describing a person and
associated with a single account (for example, one of the user's Gmail
accounts).

I have found two entry for each contact get inserted when I do import
contact from SIM card.
Why it is so and is it right?

When I am trying to modify entry, compare function
from EditContactActivity.java get called.
/packages/apps/Contacts/src/com/android/contacts/ui/EditContactActivity.java

In this class in compare function checking accountType which is getting
null.
Wanted to know with which raw contact this comparison is happening ?
and Why it is getting crashed ?

Regards
Atul

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My MapActivity is not showing the map

2010-07-26 Thread Amit
Dear Mark,

I have tried the commons guy project as well by replacing my key. But
still no successdon't know where is the problem :(



On Jul 26, 1:29 pm, Mark Murphy  wrote:
> On Mon, Jul 26, 2010 at 4:24 AM, Amit  wrote:
> > What does "Failed to find provider
> > info for com.google.settings" means...does it implies that its not
> > able to recognize my key to use google maps?
>
> This has nothing to do with your problem, AFAIK.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.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: My MapActivity is not showing the map

2010-07-26 Thread Namrata
Amit, I m just curious about...are you signing your app with the same
certificate as that of used for MD5 generation for Map Key?

On Jul 26, 2:48 pm, Amit  wrote:
> Dear Mark,
>
> I have tried the commons guy project as well by replacing my key. But
> still no successdon't know where is the problem :(
>
> On Jul 26, 1:29 pm, Mark Murphy  wrote:
>
> > On Mon, Jul 26, 2010 at 4:24 AM, Amit  wrote:
> > > What does "Failed to find provider
> > > info for com.google.settings" means...does it implies that its not
> > > able to recognize my key to use google maps?
>
> > This has nothing to do with your problem, AFAIK.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > _Android Programming Tutorials_ Version 2.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] how to capture log messages to String

2010-07-26 Thread mkhwang
hi~ everyone.

can I capture log messages to String?

I have to assume some status via log message from another application.

do you know?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] getCellLocation() returns null

2010-07-26 Thread Vinay S
Hi,

I am trying to access the current cell location information. When I
try to call getCellLocation() it returns null.

I am unable to reason out this.. the same code works on 1.5 but fails
on 1.6 or 2.1.(Tested on G1 with 1.6 and HTC legend 2.1).

Can some one help me in correcting this bug? My code is below.


TelephonyManager tMgr = (TelephonyManager)
getSystemService(TELEPHONY_SERVICE) ;
outputView = (TextView) findViewById(R.id.output) ;

outputView.append("Device type:"+tMgr.getPhoneType()+"\n") ;

   GsmCellLocation gsmCellLocation = (GsmCellLocation)
tMgr.getCellLocation() ;
   if (gsmCellLocation != null) {
  String mCellId = "" + gsmCellLocation.getCid() ;
  String mLAC = "" + gsmCellLocation.getLac() ;
  Log.d("SDKService" , "Cell Id: "+mCellId+" LAC: "+mLAC) ;
  outputView.append("Cell Id: "+mCellId+" LAC: "+mLAC+" MCC: "+mMCC+"
MNC: "+mMNC+"\n") ;
   }


Also, I have added the following permissions :

ACCESS_FINE_LOCATION,
ACCESS_COARSE_LOCATION,
CONTROL_LOCATION_UPDATES.

Do I need to add any other permissions?

Kindly let me know where I have gone wrong.

Thanks in advance,
Regards,
Vinay

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My MapActivity is not showing the map

2010-07-26 Thread Amit
Dear All,

finally i got the application to work successfully and see the map on
my emulator.

Here is how I have achieved it.

Actually the debug.keystore that i was using was wrong.

On my Windows XP system Earlier I was using the "debug.keystore" from
the location - "C:\Documents and Settings\Amit Mishra\Local Settings
\Application Data\Android".

Since it was not working I have come across a reference in which it
was said that on XP systems you should use the "debug.keystore" from
the location "C:\Documents and Settings\Amit Mishra\.android".

SO i have generated the API key again and put it in my layout.xml and
magic happened :)

Thanks everyone for there help.

Thanks & Best Regards
Amit



On Jul 26, 3:15 pm, Namrata  wrote:
> Amit, I m just curious about...are you signing your app with the same
> certificate as that of used for MD5 generation for Map Key?
>
> On Jul 26, 2:48 pm, Amit  wrote:
>
>
>
> > Dear Mark,
>
> > I have tried the commons guy project as well by replacing my key. But
> > still no successdon't know where is the problem :(
>
> > On Jul 26, 1:29 pm, Mark Murphy  wrote:
>
> > > On Mon, Jul 26, 2010 at 4:24 AM, Amit  wrote:
> > > > What does "Failed to find provider
> > > > info for com.google.settings" means...does it implies that its not
> > > > able to recognize my key to use google maps?
>
> > > This has nothing to do with your problem, AFAIK.
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > _Android Programming Tutorials_ Version 2.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


Re: [android-developers] Re: dithering gradient on different devices

2010-07-26 Thread Martin Obreshkov
I also try to setDither(true) from java on G1 and the background was not
dithered i could only get dithering by
setting getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);

On Fri, Jul 23, 2010 at 4:02 PM, Martin Obreshkov wrote:

> Thanks for the reply :). But when i create grad_proxy.xml like this and use
> it as android:background nothing is shown android can't load grad_proxy and
> shows default background.
>
>
> On Fri, Jul 23, 2010 at 3:33 PM, Joseph Earl wrote:
>
>> I generally use a 'proxy' XML drawable to add dithering.
>> Suppose your drawable above was named grad.xml, I'd then create
>> something like:
>>
>> 
>> >xmlns:android="http://schemas.android.com/apk/res/android";
>> android:src="@drawable/grad"
>>android:dither="true" />
>>
>> and name it grad_proxy.xml. Then use @drawable/grad_proxy in place of
>> @drawable/grad.
>> You shouldn't need to use any extra Java code, the XML above should
>> work as is.
>>
>> On Jul 23, 12:59 pm, manigault  wrote:
>> > Hi all,
>> > In my activity i have simple grey gradient
>> > 
>> > http://schemas.android.com/apk/res/android";
>> > android:shape="rectangle">
>> > > > android:angle="270" />
>> > 
>> >
>> > and i use as background of some view. The problem is that the gradient
>> > looks pretty banding. After searching i found some solutions and posts
>> > about this problem but none of them works the way i want.
>> http://stackoverflow.com/questions/2928101/android-using-linear-gradi...http://stackoverflow.com/questions/2791045/is-it-possible-to-dither-a...http://stuffthathappens.com/blog/2010/06/04/android-color-banding/http://android.amberfog.com/?p=247
>> >
>> > The only i could smooth the gradient on htc tatoo was to set
>> > getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER) which
>> > dithers the whole window not only the gradient which is not what i
>> > want. Setting android:dither="true" and calling from Java
>> > GradientDrawable.setDither(true) has no effect. On nexus one
>> > getWindow().setFormat(PixelFormat.RGBA_) but on devices that don't
>> > have 8-bits per color i have to set FLAG_DITHER so what is the correct
>> > way to smooth gradient.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> When I raise my flashing sword, and my hand takes hold on judgment, I will
> take vengeance upon mine enemies, and I will repay those who haze me. Oh,
> Lord, raise me to Thy right hand and count me among Thy saints.
>



-- 
When I raise my flashing sword, and my hand takes hold on judgment, I will
take vengeance upon mine enemies, and I will repay those who haze me. Oh,
Lord, raise me to Thy right hand and count me among Thy saints.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Effect of copying assets in Internal memory?

2010-07-26 Thread Joseph Earl
When your app is first launched download them to the SD card.

On Jul 26, 7:36 am, garry  wrote:
> I wanna store large number of images and videos on the INTERNAL
> memory. I wanna know if there is some specific % size of memory that
> can be used or is it upto maximum? What effect it will cause?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Market comments disappearing over last few days

2010-07-26 Thread Geefer
Hi, every time I have looked at the market comments for my app over
the last few days some more comments have disappeared. This is whether
I look on the phone or on the developer console.

Unfortunately the comments that Google has chosen to 'lose' are my
most favourable comments leaving several "This app suxss" type
comments by the usual Neanderthals who like to be abusive. I have
checked with a helpful user who left a positive comment and they have
not removed them themselves or de-installed so what is going on?

It is seriously hurting my downloads/sales and the impression that
potential users of my app see when they look on the market.
I have emailed Google but no reply yet.

Is anyone else seeing this?
Paul

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 is a WeakReference?

2010-07-26 Thread DanH
That's odd, because Qt can do almost exactly the same stuff, without
weak references or implicit garbage collection, using reference chains
that the average user never has to think about.

On Jul 26, 4:20 am, Bob Kerns  wrote:
> Actually, I would disagree with this characterization.
>
> In many cases, it's completely infeasible to maintain the information
> you'd need. For example, if you provide an API that accepts objects,
> and you maintain some internal information about them -- you have no
> opportunity to track the client's use of the API. You COULD warp the
> API to require the client track this information for you -- but they'd
> get it wrong, and  the result would be a less-efficient and more
> unreliable package.
>
> It's also inefficient to track that. Especially in cases with circular
> references, where simple reference counting cannot work.
>
> In many cases, what you end up having to do is to implement your own
> GC of these objects. Using WeakReference means you don't have to do
> that; the GC itself informs you.
>
> So it's not just an easier way to avoid poor programming. It's far
> more valuable and essential than that implies.
>
> Let's say I have a persistence package, that maintains a huge mass of
> information for immediate real-time access about a player. It streams
> in from a database, and stays around in memory.
>
> Now, let's say I have a client of that, that's one node in a grid.
> Players come and go from grid to grid, join the game, leave the game,
> even permanently.
>
> And not just players -- objects come, go, are changed. you have a rich
> mix of lightweight objects, and heavy-weight back-end data in support
> of them.
>
> A WeakReference is really the only sane way to manage this. The back-
> end can associate its data with the Player and Object's using a
> WeakReference. When a Player disappears from memory, perhaps moving on
> to another realm, the back end can then persist any changes and free
> the storage. (It can even arrange to be notified of this, or it can do
> it as a background sweep when not busy).
>
> I cast that as an MMO game to grab your interest, but it could also be
> something much more mundane, like a shopper's web session, and loaded
> product description objects. If no shoppers are browsing a product, it
> can be GC'd. In this case, you might use a map with a WeakReference
> for the key, and a SoftReference for the data. The WeakReference
> allows you to drop the mapping when the shopper goes away; the
> SoftReference allows you to reclaim the storage if you're running low
> on memory. Without the WeakReference, you'd continue to hold onto the
> shopper or player AND the mapping, just by remembering the association
> in a table.
>
> On Jul 22, 3:36 pm, DanH  wrote:
>
> > " So you'd only want to use WeakReference when you think your activity
> > might run out of memory?"
>
> > Not exactly.  If you use poor programming techniques just about any
> > long-running operation can run out of memory.  WeakReference is an aid
> > to keep you from having to use much more complex techniques (like
> > reference chains) while still having "good" programming practices.
>
> > On Jul 22, 1:36 pm, GodsMoon  wrote:
>
> > > So you'd only want to use WeakReference when you think your activity
> > > might run out of memory?
> > > But a list view already does efficient memory management for you
> > > right?
>
> > > You'd saying if I were create a large array or something like that
> > > then it would be good to use WeakReference. right?
>
> > > Thanks for the help guys,
> > > David Shellabargerwww.nightshadelabs.com
>
> > > On Jul 22, 2:26 pm, Romain Guy  wrote:
>
> > > > You definitely do NOT want to use a WeakReference to cache object. If
> > > > you do so, as soon as your data is put in the cache and not used
> > > > outside of the cache, it gets garbage collected.
>
> > > > On Thu, Jul 22, 2010 at 11:07 AM, Joseph Earl  
> > > > wrote:
> > > > > Suppose you had a long list of images. As the user scrolled down you
> > > > > load the images from the net, and then display them.
> > > > > To avoid having to reload the images again if the user scrolls back
> > > > > up, you put the images in a cache (probably something like a
> > > > > Map)
>
> > > > > However because it is a long list you don't want to run into an out of
> > > > > memory situation if the user scrolls very far down and lots of images
> > > > > are put in the cache.
> > > > > So instead of storing the Drawables directly in the map, you create a
> > > > > Map> (although I would use SoftReference
> > > > > for the purpose described here).
> > > > > This means that if Android is going to encounter an out of memory
> > > > > situation it will clear all of the Soft/Weak references (and thus
> > > > > hopefully avoid running out of memory). You will have to load the
> > > > > images again since your cache has been cleared, but this is far better
> > > > > than your application running out of memory and crashing.

[android-developers] Problem uninstalling an Application package from Android device

2010-07-26 Thread Samuh
We have an application which on start up pulls up a Terms and
Conditions screen. When the user declines these terms we have to ask
the user if he wishes to delete the package.

So, from within the application we launch the following intent:

Uri uninstallUri = Uri.parse("package:some.package.name");
Intent intent = new Intent(Intent.ACTION_DELETE, uninstallUri);
startActivity(intent);

This brings the Settings-> Manage Applications -> Uninstall page for
our application.

The user can go ahead and uninstall the pacakge. But when he chooses
not to(by pressing Cancel) he is taken to our Terms and Conditions
Activity. If he presses Back again, he is taken out of application.
The problem is that now if we pull the launcher menu, our application
icon does not show up. We can see it in the "Recently Launched
application list" and the application is still there on the device.

Is this because PackageManager disabled our application? If so, how do
we re-enable it?

What did we miss here?

Please help.

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: Large jars in Android

2010-07-26 Thread DanH
Just a side note:  You DO NOT want to install your own encryption code
on the device!  If you do you have to get export permission/
certification for your application from the guys in trench coats.  (At
least if you ever sell a copy outside the US.)

On Jul 26, 12:03 am, Mark Murphy  wrote:
> On Mon, Jul 26, 2010 at 12:53 AM, kypriakos  wrote:
> > Bouncycastle jdk14
>
> Bouncy Castle is used internally by Android, and it is accessible via
> the javax.crypto package. You may have difficulty having another
> edition of that code in your project.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.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


Re: [android-developers] Effect of copying assets in Internal memory?

2010-07-26 Thread Webnet Android
On 26 July 2010 08:36, garry  wrote:
> I wanna store large number of images and videos on the INTERNAL
> memory. I wanna know if there is some specific % size of memory that
> can be used or is it upto maximum? What effect it will cause?

Most probably your app end being rather uninstalled than installed, and ends
with negative feedback and 1 star ratings in Market. Internal storage is quite
precious and  you shall not fill it with stuff you *might* want use
(or maybe not),
which looks like your case. Use SD card for this.

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


[android-developers] Re: Media streaming on Android

2010-07-26 Thread arsalank2
Thanks for the link, but the encoded video is not decoded by the
Mediaplayer on some devices. Do you know precise details on codec
which is correctly decoded by the Mediaplayer on every Android device?

On Jul 19, 8:34 pm, nation-x  wrote:
> Themediaplayer streams videos just fine but they have to be encoded
> properly for it to work. Try using VLC to encode the video.
>
> http://www.youtube.com/watch?v=G7itfBXq6ns
>
> Shawn
>
> On Jul 19, 5:32 am, arsalank2  wrote:
>
> > Hi Android developers,
>
> > I am trying to stream a video on an Android device, but default
> > Mediaplayer is not able to play the stream. The video can be played
> > offline from SD card. I have tried various codec (H.264, H.263,
> > MPEG-4, AAC etc..) with different profiles, but unable to come up with
> > correct format that is streamable.
>
> > Can someone please point me to officially supported codec with profile
> > information for networkstreamingon Android devices?
>
> > Please don't send me the following link, because this list only works
> > in offline mode:
>
> >http://developer.android.com/guide/appendix/media-formats.html
>
> > Alternatively, please suggest an application with settings to encode
> > the video.
>
> > Thanks,
>
> > Arsalan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ContentProvider and query

2010-07-26 Thread Natanael Arndt

Hello,
is it possible, to query an ContentProvider from within an other 
ContentProvider?


Natanael

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Media streaming on Android

2010-07-26 Thread Alex Xin
Which format you tried to stream? If it's MP4, you need to "hint" that video
in order to make it stream ready for RTP/RTSP/HTTP streaming.

Use MP4Box to do that work

On Mon, Jul 26, 2010 at 7:23 PM, arsalank2  wrote:

> Thanks for the link, but the encoded video is not decoded by the
> Mediaplayer on some devices. Do you know precise details on codec
> which is correctly decoded by the Mediaplayer on every Android device?
>
> On Jul 19, 8:34 pm, nation-x  wrote:
> > Themediaplayer streams videos just fine but they have to be encoded
> > properly for it to work. Try using VLC to encode the video.
> >
> > http://www.youtube.com/watch?v=G7itfBXq6ns
> >
> > Shawn
> >
> > On Jul 19, 5:32 am, arsalank2  wrote:
> >
> > > Hi Android developers,
> >
> > > I am trying to stream a video on an Android device, but default
> > > Mediaplayer is not able to play the stream. The video can be played
> > > offline from SD card. I have tried various codec (H.264, H.263,
> > > MPEG-4, AAC etc..) with different profiles, but unable to come up with
> > > correct format that is streamable.
> >
> > > Can someone please point me to officially supported codec with profile
> > > information for networkstreamingon Android devices?
> >
> > > Please don't send me the following link, because this list only works
> > > in offline mode:
> >
> > >http://developer.android.com/guide/appendix/media-formats.html
> >
> > > Alternatively, please suggest an application with settings to encode
> > > the video.
> >
> > > Thanks,
> >
> > > Arsalan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Android Market, how do you manage license and piracy protection?

2010-07-26 Thread nation-x
See Keyes Labs Open Sources Licensing Solution: http://keyeslabs.com/joomla/

Or Artfulbits Android Anti-Piracy: 
http://www.artfulbits.com/Android/antipiracy.aspx

Shawn


On Jul 25, 1:59 pm, Pent  wrote:
> > How do you protect your full copy from piracy?
>
> 1) Box in app to enter google order code
> 2) Script on server to query checkout CHARGED order codes
>
> 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] Re: ContactsContract.RawContacts two entry get Inserted for single contact why so ?

2010-07-26 Thread Atul Raut
Some inf found on this thread :

http://groups.google.com/group/android-developers/browse_thread/thread/77d579d60d803094?pli=1


Regards
Atul

On Mon, Jul 26, 2010 at 3:03 PM, Atul Raut  wrote:

> Hi Google,
>
> Need some info on 
> ContactsContract.RawContacts
>  :
>
> A row in the 
> ContactsContract.RawContactstable
>  represents a set of data describing a person and
> associated with a single account (for example, one of the user's Gmail
> accounts).
>
> I have found two entry for each contact get inserted when I do import
> contact from SIM card.
> Why it is so and is it right?
>
> When I am trying to modify entry, compare function
> from EditContactActivity.java get called.
>
> /packages/apps/Contacts/src/com/android/contacts/ui/EditContactActivity.java
>
> In this class in compare function checking accountType which is getting
> null.
> Wanted to know with which raw contact this comparison is happening ?
> and Why it is getting crashed ?
>
> Regards
> Atul
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 1.6, RTP live supported?

2010-07-26 Thread Yadnesh Phadke
Hi All,

For quiet some time now I am trying to stream over RTP files on my machine
to my Android device.  I am using FFMpeg to do the task of reading media
files and do the RTP packetization.  I am using the FFServer to work as RTSP
server for my stream.

The stream Video is in H.264 format and Audio is in AAC format.  See below
the SDP that is returned by FFServer.H.264 and AAC are Android supported
media formats.  But I am getting error (see below) when trying to play the
RTSP stream using application developed using MediaPlayer class.

Is streaming of video and audio in separate streams packetized using RTP
format supported in Android 1.6?  If RTP live is supported by MediaPlayer,
Can anyone please give tips about which encoder variation does Android 1.6
expects to have been used?  Within H.246/AAC there are many variations,
probably Android does not like the encoder that I am using :)

I have already gone through a relevant post Playing live stream (RTP) in
MediaPlayer:
http://groups.google.com/group/android-developers/browse_thread/thread/ebb4ca5b298a8d92/b4e94e9855cf2ff5?lnk=gst&q=RTP#.


But the details there added to my confusion:
I can see a post quoting that RTSP is broken on 1.6:

You simply pass the RTSP url to MediaPlayer (although I think
this functionality was somewhat broken before 2.1 so I can't be certain that
it will work in 1.6-2.0).

Also  I see another message that says it should work:

It is possible to play a stream by requesting it via a RTSP request
(both audio and video are sent over *RTP* and the MediaPlayer is able to
decode and play them).


Could anyone knowing Android internals or experienced with RTSP help resolve
the confusion?

SDP sent by RTSP server
=
o=- 0 0 IN IP4 127.0.0.1
s=No Title
c=IN IP4 0.0.0.0
t=0 0
a=tool:libavformat 52.73.0
m=audio 0 RTP/AVP 97
b=AS:16
a=rtpmap:97 MPEG4-GENERIC/44100/2
a=fmtp:97
profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdelta
length=3; config=1210
a=control:streamid=0
m=video 0 RTP/AVP 96
b=AS:64
a=rtpmap:96 H264/9
a=fmtp:96 packetization-mode=1;
sprop-parameter-sets=Z0LAC/QYJ0IAAAMAAgAAAwAoHih VQA==,aM48gA==
a=control:streamid=1
=


Player error in logcat
=
07-21 19:41:09.751: DEBUG/PlayerDriver(1501): buffering (0)
07-21 19:41:09.962: DEBUG/PlayerDriver(1501): buffering (0)
07-21 19:41:09.992: DEBUG/PlayerDriver(1501): buffering (100)
07-21 19:41:11.653: DEBUG/AudioSink(1501): bufferCount (4) is too small and
increased to 12
07-21 19:41:11.653: ERROR/AudioMIO(1501): latency could NOT be set !! set it
later
07-21 19:41:11.713: ERROR/PlayerDriver(1501): HandleErrorEvent:
PVMFErrCorrupt
07-21 19:41:11.713: ERROR/MediaPlayer(1467): error (1, -10)
07-21 19:41:11.713: ERROR/MediaPlayer(1467): Error (1,-10)
07-21 19:41:11.713: INFO/Media Player(1467): Unspecified media player error
-10
07-21 19:41:11.872: INFO/SV(1467): surfaceChanged W=192 H=144
07-21 19:41:12.152: WARN/PlayerDriver(1501): PVMFInfoErrorHandlingComplete
=

Regards,
Yadnesh
-- 

--
Christopher Morley - There is only one success - to be able to spend your
life in your own way.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Eclipse/Android environment issues

2010-07-26 Thread jack.n
[Solved] Found the "Problems" tab which indicated "The project cannot
be built until the build path errors are resolved." The resolution for
this is at http://www.scottdstrader.com/blog/ether_archives/000921.html

On Jul 23, 2:33 pm, "jack.n"  wrote:
> I can't seem to get rid of the following run/build error, but the
> Eclipse/Androidenvironmentwon't give a clue how to fix it.
> Your project contains error(s), please fix them before running your
> application.
> This has happened a couple of times already and I've been able to
> repair it by cleaning and rebuilding, sometimes having to restarting
> eclipse, sometimes having to restart my pc, but now it won't budge.
> I've gone back to a known working version of my app to remove that
> unknown. Typically I can find project errors in the Eclipse Package
> explorer, but my code is fine according to the Package Explorer. Any
> ideas? Any other project debug tools? Is this a known 
> Eclipse/Androidenvironmentissue?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Blank black screen while transiting to new activity.

2010-07-26 Thread Shekhar
Hi Murphy,

Thanks for your suggestion.I have observed that when I changed the
activity launch mode to the
"standard" the black screen is not observed(due to delay in the launch
of the activity).

I am interested to know if generally there is a delay observed in the
the platform layer in the launch of "singleInstance" activity as the
same app code works fine with the launch mode as "standard".

Thanks,
Shekhar

On Jul 16, 5:00 pm, Mark Murphy  wrote:
> On Fri, Jul 16, 2010 at 7:51 AM, Shekhar  wrote:
> > I am facing a problem.In my application I have 3 actvities A,B,C which
> > i have declared as singleInstance.I have observed that for the
> > first time when I launch these activities(like A > B or B > C) there
> > is a  delay observed and  I see a black screen for a while.
>
> > I see in the blanch screen the header text that gets displayed is the
> > application name which i have given in the android
> > manifest.xml(android:label="@string/app_name")
>
> > I amy unable to understand why this blank screen is observed? Experts
> > please comment on how to avoid it
>
> Build your UI faster. Use traceview to see where the slowdowns are:
>
> http://developer.android.com/guide/developing/tools/traceview.html
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] Re: Getting a FileDescriptor from a Socket

2010-07-26 Thread Alexandre Ferrieux


On Jul 26, 11:09 am, Alexandre Ferrieux 
wrote:
> On Jul 24, 6:39 pm, Joseph Earl  wrote:
>
> > For accessing a private member you'd have to use Reflection.
> > Can't help you on the first point though I'm afraid.
>
> Thanks anyway.
>
> The solution I've come up with, is to create a pair of connected
> LocalSockets in addition to my initial Socket, and a dedicated "noria"
> thread that carries bytes from the OutputStream of the LocalSocket to
> the InputStream of the Socket. Ugly, but working. But ugly ;-)

Ah, somebody else found a more elegant solution involving
ParcelFileDescriptor:

   
http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system

Bottom line:

  ParcelFileDescriptor.fromSocket(socket).getFileDescriptor();

reaches the well-hidden jewel :)

-Alex

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Blutooth API Problem

2010-07-26 Thread Sandeep
Hi All,

In Android 2.1 can we suppress the pairing dialoge while exching data
between 2 android devices using bluetooth API.
or is there any way that programatically we can do this without the
user interaction.

thansk
sandeep

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Numeric Keypad on WebView

2010-07-26 Thread Vishal
I am still unsolved with this problem.
Can anybody help me on this.
At least can any one tell me how can I get event when focus goes to a
Text box in WebView.

Vishal

On Jul 19, 10:38 am, Vishal  wrote:
> Hi,
>
> Android 2.1
>
> I am having a textbox in the the webview where only numeric input is
> require but when the soft keypad pops up, it shows the full qwerty
> keypad. As we know that few tags of HTML 5 is supported in android 2.1
> and this also can be achieved by putting some javascript in the web
> page but that is making the user experience very bad.
>
> Is there any way to show only numeric keypad or is there any way to
> grab the event where whenever any text box is focused so that I can
> set its IME and CLASS as defined in EditorInfo.
>
> Vishal

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 market rules are changed, you must accept it within 30 days but...

2010-07-26 Thread gcstang
This tells you what changed exactly and why

http://android-developers.blogspot.com/2010/07/adjustment-to-market-legals.html


On Jul 26, 3:52 am, String  wrote:
> On Jul 25, 12:06 am, Zsolt Vasvari  wrote:
>
> > Has the return policy gone from 1 to 2 days now, or has it always been
> > worded like that?
>
> It's not new - I think the 48-hour policy was included in the last
> update to the agreement. AFAIK, though, the reality hasn't changed for
> Market users yet; they still have only 24 hours to get a refund at the
> moment.
>
> String

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


Re: [android-developers] Re: Android market rules are changed, you must accept it within 30 days but...

2010-07-26 Thread Greg Donald
On Mon, Jul 26, 2010 at 2:24 AM, William Ferguson
 wrote:
> How many Android users (especially as Android phones becomes more
> mainstream) will venture outside of the offical Android market?

My experience up to now has been "almost zero".


-- 
Greg Donald
destiney.com | gregdonald.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: Scanning a Text File In Android

2010-07-26 Thread TreKing
On Mon, Jul 26, 2010 at 3:14 AM, anil kukreti wrote:

> My objective is to scan a text or image file and if there's any phone no
> present in that file i could call that no. through my app.
>

Oh, you want to find phone *numbers*. Standard Java I/O and those regex
classes should suffice for text files. No idea how you would read this data
from image files.

-
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: Scanning a Text File In Android

2010-07-26 Thread bschuhma
Are you looking for Linkify, which uses built-in types or custom
regexps to find the URLs, phone numbers, etc. in your text to make
them clickable?  If you linkify a phone number it becomes clickable so
the user can call the number just by clicking (pressing) on it.

Rgds,

Bret

On Jul 25, 2:33 am, anil kukreti  wrote:
> Ya Thanks
>
> I 'm right now googling for parsing regex in java. Then I will implement the
> same on Android. By parsing a text file and later image file,  I mean if
> theres' any phone no in file ,, the android application can call it.
>
> On Sun, Jul 25, 2010 at 10:49 AM, Maps.Huge.Info (Maps API Guru) <
>
> cor...@gmail.com> wrote:
> > Maybe he means java.util.regex
>
> > I suggest Googling that.
>
> > -John Coryat
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Thanks for Cooperating!
>  Anil Kukreti
>
> Network transforms ideas to reality.
> 09312646623
> Linked In :http://in.linkedin.com/in/anilkukreti
> Blog :http://androidosbeginning.blogspot.com/
> Skype Id : anil.kleward

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 market rules are changed, you must accept it within 30 days but...

2010-07-26 Thread Tomáš Hubálek
It is not only target audience but also supply.

I'm from country that can't even sell.

I have quite successful application (1300 users rated with more than
4,5 stars and I have a lot of positive comments) and currently I'm
covering costs of support and development from donations.

If Google does not give me a chance to sell using their processor I
will probably wait until they unpublish my app because of TOS
violation and leave Android at all.

I'm really frustrated from Google's approach to the developers. I'm
NOT citizen of some banana republic, I WANT give Google their portion
of the profit and they don't want it. They are loosing Android Market
opportunities in China an India and they are doing their best to lose
rest of the world too.

Tom

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 1.6, RTP live supported?

2010-07-26 Thread Yadnesh
I came across a topic "RTP stream video decoding" (http://
groups.google.com/group/android-developers/browse_thread/thread/
f963e8f7ac35b75b/481c181362eaa66c?show_docid=481c181362eaa66c#) on
this forum.

Here I see a post stating:
--
Essentially it seems that at this stage the only way to get an RTP
stream to work is a couple of hacks
--

Using this information, may I conclude that playing RTP live stream
over RTSP is not supported by default?

But Again a Google search tells me that many users are playing live
stream from Wowza media server.  Also there are notes suggesting that
users are watching RTP live streams on their Android G1.

Could anyone please clarify?

Regards,
Yadnesh

On Jul 26, 4:51 pm, Yadnesh Phadke  wrote:
> Hi All,
>
> For quiet some time now I am trying to stream over RTP files on my machine
> to my Android device.  I am using FFMpeg to do the task of reading media
> files and do the RTP packetization.  I am using the FFServer to work as RTSP
> server for my stream.
>
> The stream Video is in H.264 format and Audio is in AAC format.  See below
> the SDP that is returned by FFServer.    H.264 and AAC are Android supported
> media formats.  But I am getting error (see below) when trying to play the
> RTSP stream using application developed using MediaPlayer class.
>
> Is streaming of video and audio in separate streams packetized using RTP
> format supported in Android 1.6?  If RTP live is supported by MediaPlayer,
> Can anyone please give tips about which encoder variation does Android 1.6
> expects to have been used?  Within H.246/AAC there are many variations,
> probably Android does not like the encoder that I am using :)
>
> I have already gone through a relevant post Playing live stream (RTP) in
> MediaPlayer:http://groups.google.com/group/android-developers/browse_thread/threa
>
> But the details there added to my confusion:
> I can see a post quoting that RTSP is broken on 1.6:
>
>     You simply pass the RTSP url to MediaPlayer (although I think
> this functionality was somewhat broken before 2.1 so I can't be certain that
> it will work in 1.6-2.0).
>
> Also  I see another message that says it should work:
>
> It is possible to play a stream by requesting it via a RTSP request
> (both audio and video are sent over *RTP* and the MediaPlayer is able to
> decode and play them).
>
> Could anyone knowing Android internals or experienced with RTSP help resolve
> the confusion?
>
> SDP sent by RTSP server
> =
> o=- 0 0 IN IP4 127.0.0.1
> s=No Title
> c=IN IP4 0.0.0.0
> t=0 0
> a=tool:libavformat 52.73.0
> m=audio 0 RTP/AVP 97
> b=AS:16
> a=rtpmap:97 MPEG4-GENERIC/44100/2
> a=fmtp:97
> profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdelta
> length=3; config=1210
> a=control:streamid=0
> m=video 0 RTP/AVP 96
> b=AS:64
> a=rtpmap:96 H264/9
> a=fmtp:96 packetization-mode=1;
> sprop-parameter-sets=Z0LAC/QYJ0IAAAMAAgAAAwAoHih VQA==,aM48gA==
> a=control:streamid=1
> =
>
> Player error in logcat
> =
> 07-21 19:41:09.751: DEBUG/PlayerDriver(1501): buffering (0)
> 07-21 19:41:09.962: DEBUG/PlayerDriver(1501): buffering (0)
> 07-21 19:41:09.992: DEBUG/PlayerDriver(1501): buffering (100)
> 07-21 19:41:11.653: DEBUG/AudioSink(1501): bufferCount (4) is too small and
> increased to 12
> 07-21 19:41:11.653: ERROR/AudioMIO(1501): latency could NOT be set !! set it
> later
> 07-21 19:41:11.713: ERROR/PlayerDriver(1501): HandleErrorEvent:
> PVMFErrCorrupt
> 07-21 19:41:11.713: ERROR/MediaPlayer(1467): error (1, -10)
> 07-21 19:41:11.713: ERROR/MediaPlayer(1467): Error (1,-10)
> 07-21 19:41:11.713: INFO/Media Player(1467): Unspecified media player error
> -10
> 07-21 19:41:11.872: INFO/SV(1467): surfaceChanged W=192 H=144
> 07-21 19:41:12.152: WARN/PlayerDriver(1501): PVMFInfoErrorHandlingComplete
> =
>
> Regards,
> Yadnesh
> --
>
> --
> Christopher Morley - There is only one success - to be able to spend your
> life in your own way.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Android Market paid app download errors

2010-07-26 Thread TreKing
On Mon, Jul 26, 2010 at 1:27 AM, Sam  wrote:

> There are occasionally glitches in the android market "paid app download
> process".
>

"Occasional" is a massive understatement.

Try searching the Android Market "Help" forum for "download unsuccessful",
"stuck authorizing", "stuck downloading", etc, etc.

There are a ton of these issues reported every single day and have been for
months if not years not. The temporary workarounds that sometimes work /
sometimes don't usually finagling with one's Google account settings, which
indicates this is a problem on Google's server side. This is a massive
problem that they're either unwilling or incapable of solving - and both
these options make me really really sad.

On Wed, Jul 21, 2010 at 5:02 PM, Maps.Huge.Info (Maps API Guru) <
cor...@gmail.com> wrote:

> 
> I don't think it's that Google doesn't care, I think that Google's
> tireless engineers are working on a new version (demo'd at Google IO
> 2010) and as such, are letting the current, tired, old and forgotten
> system just languish. Once they debut the new and improved market,
> everyone will jump for joy and sing praises from the hills.
> 
>

I want some of whatever you're smoking =)

-
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] Query Google Maps

2010-07-26 Thread TreKing
On Mon, Jul 26, 2010 at 1:55 AM, KG  wrote:

> Does anyone have any ideas on how to do this?


May not be the "best" way, but you have your query and you the page it gives
you, which has links for the other pages with the remaining results. So
parse the first page then follow the links to the next few pages and parse
those too.

-
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: Unparsed aapt error

2010-07-26 Thread Patrick Noffke
Are there any google devs on here?  I get about one "thanks" a week (off
list) for my post.

Is there somewhere I can file this as a bug?

Pat

On Mon, Jul 26, 2010 at 6:01 AM, parag  wrote:

> thanks man,
> u really saved my time..
>
> On Mar 16, 6:57 pm, Patrick Noffke  wrote:
> > Hi all,
> >
> > I found some old posts on this problem, and I was having a similar issue,
> so
> > I thought I'd share what I learned.
> >
> > I was getting this error after modifying an XML file, and I was unable to
> > start a debug session until I fixed the problem.  It seems if there are
> > errors that cause aapt to fail, eclipse can get in a state where it
> doesn't
> > know when the problem gets fixed.  Deleting R.java did not work for me.
> >  What I ended up doing after I fixed the XML file is right-clicking on
> the
> > error message in the Problems view, and deleting the error.  Then modify
> > some files to force a rebuild and you should be okay.
> >
> > I found it helps to turn the android log level to Verbose (Preferences ->
> > Android -> Build).  This led me to know that once I fixed the XML file,
> aapt
> > was happy, but eclipse was not.
> >
> > Hopefully this will save someone else the 3 hours I burned trying to
> figure
> > it out!
> >
> > Patrick
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Hide context menu

2010-07-26 Thread André
Hello,
I have a context menu that starts to do some calculations when you
press one of the context menu items. Like this:

case 0: {
...
...
calculations();
...
...
return true;}

While the calculations are made I have a progressbar that I want to
show. The progressbar is called from the calculations() method. The
problem is that I can only see the context menu while the calculations
are being made and the phone is more or less frozen.

Does anyone have an idea how to solve this problem?

/André

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Hide context menu

2010-07-26 Thread TreKing
On Mon, Jul 26, 2010 at 8:21 AM, André  wrote:

> Does anyone have an idea how to solve this problem?


One word: AsyncTask.

-
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] Regarding the surfaceview

2010-07-26 Thread ameya dandekar
Hi,
   I am currently working on the app in which my media player class is
singleton, and i want to play the video files. I use surfaceView for the
video display part. But the problem i m facing is when i change the
orientation , the previous playback disappears (if was playing) and the new
surface view is  getting created ..but  the callback method surface created
is not getting called in which i want to take further action. Where am i
going wrong ?

Regards,
Ameya

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: PV omx_test_app missing in Froyo source code

2010-07-26 Thread praji
Hi Guys,

I got the problem.
Its a mistake from my side.
I was giving an MP4 container format stream(test.mp4) for the PV OMX
mpeg4 component.

We need to give elementary streams(e.g. test.m4v) for the component
(M4V).

Sorry for the confusions.

Thanks,
Prajeesh

On Jul 21, 11:02 am, praji  wrote:
> Hi Guys,
>
> In the Froyo release code, the PV omx_test_app & omx_test_app_enc
> folders are missing.
> path - external/opencore/codecs_V2/omx/
>
> But these folders are available in the android GIT.
>
> I wanted to run the decoder test application for MP4.
>
> Since the test app is not available in the source package, i
> downloaded the same from GIT and compiled. The build was fine.
>
> But when i run the test application for NORMAL_SEQ_TEST, it was giving
> segmentation fault.
>
> syntax -> test_omx_client /data/test.mp4 -o /data/output.yuv -c mpeg4 -
> t 11 11
>
> Have anyone tried running the PV omx_test_app in froyo?
>
> Please give your valuable inputs.
>
> Thanks,Prajeesh

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Code Coverage with EMMA or Ant

2010-07-26 Thread Robb G
I am also trying to accomplish the same thing.  Any help would be
greatly appriciated.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Code Coverage with EMMA or Ant

2010-07-26 Thread Joseph Earl
Would EclEmma do? Code coverage tool for Eclipse based on EMMA:
http://www.eclemma.org/

On Jun 24, 12:52 am, sirvalerius  wrote:
> hi guys i'm tryng to do some testing in my android application,
>
> I've set-up my project in eclipse and I can successfully run my code.
> I've alredy written some JUnit test cases, now I'm tryng to generate a
> code coverage report. However it seems that there are different ways
> to accomplish this and the documantation is not very clear.
>
> Can someone tell me what's the best solution considering that I've all
> my code in eclipse?
> What steps do I need to take to get the reports.
>
> (I've seen some posts about EMMA but the whole thing seems hackish and
> I'm not sure how it works when with eclipse, i.e. when the project is
> rebuilt).
>
> Thank you in 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


[android-developers] Re: Android market rules are changed, you must accept it within 30 days but...

2010-07-26 Thread Pent
> > How many Android users (especially as Android phones becomes more
> > mainstream) will venture outside of the offical Android market?
>
> My experience up to now has been "almost zero".

Mine is 1/6 (direct from website).

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] What are the supported formats over RTSP for the MediaPlayer?

2010-07-26 Thread Moto
Does anyone know what formats are supported by the MediaPlayer via
RTSP?  Would it be the same formats available as suggested by the
phone manufactures and Android site?

Thanks,
-Moto

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Transfer database file to Android

2010-07-26 Thread Doug Gordon

Mark Murphy wrote:
>> Another thought I've had is some way to store the converted file out 
in the

>> "cloud" somewhere and then have my app retrieve it from there.

>That is probably the simplest for now.

Any suggestions on what facilities are available out there for secure 
storage of files that can be uploaded from a PC and then downloaded by 
an Android device? Does Google provide anything like this?


 Doug Gordon

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Embeddable lightweight/simple webserver?

2010-07-26 Thread DanAtAndroid
I'm looking for an embeddable webserver for an android project I am
working on. ijetty is to big for me, I'm just trying to serve some
static content don't need an entire servlet container.

Something like 
http://java.sun.com/javase/6/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/package-summary.html
would be useful, but probably still overkill for what I need.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 specify a Serializable object in AIDL?

2010-07-26 Thread Jin Chiu
I'm need to pass Serializable objects to my remote service. Does AIDL
have native support of Serializable objects, or do I need to write a
Parcelable wrapper?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] CursorAdapter Problem

2010-07-26 Thread charles berman
can anyone tell me what im doing wrong with my cursorAdapter?
 its making my display choppy when i scroll. I used to have it within a
getview but was ripped (rightfully so) on IRC several times because thats
not the right place for it. Im still learning and just trying to correctly
wrap my head around things.

http://pastebin.com/Dc5ppHUM

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: android.graphics.Path editor or SVG converter?

2010-07-26 Thread Anton Persson
Hi,

sorry for the delay...

There is a complete example in the repository. It shows how to load, and the
render the SVG file to a canvas:

http://bazaar.launchpad.net/~pltxtra/libsvg-android/main/annotate/head:/src/com/toolkits/libsvgandroid/HelloSvgCanvas.java

Hope
it helps. If you have any further questions, please use this form:
https://answers.launchpad.net/libsvg-android/+addquestion

Best Regards
   Anton

On Mon, May 31, 2010 at 11:07 AM, Hermes  wrote:

> Hi, can you give an example how to use your port?
> Thank you
>
> On 28 май, 20:19, pltxtra  wrote:
> > Hi,
> >
> > I've ported libsvg to Android. Using this library you can load a svg
> > file and rasterize it to an Android canvas.
> >
> > https://code.launchpad.net/libsvg-android
> >
> > It has been tested on Android version 1.6, using the emulator. It
> > requires the NDK to build. Please note also that it is NOT extensively
> > tested at all, and that it is licensed partly under GPL v3...
> >
> > Regards
> >  Anton
> >
> > On Apr 23, 5:39 pm, rsung  wrote:
> >
> > > Hi, I'm looking for the same.  Please let me know if you found
> > > anything.  If not, I may have to write one myself.  Thanks.
> >
> > > On Apr 20, 5:09 pm, Ken  wrote:
> >
> > > > Anyone know of a graphical editor that will generate a
> > > > android.graphics.Path?
> > > > I'm looking for something like inkscape that would generate
> > > > appropriate commands to generate a android.graphics.Path or some kind
> > > > of conversion utility that would map SVG to an android.graphics.Path
> > > > so it can be used for drawing on a canvas...
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group athttp://
> groups.google.com/group/android-developers?hl=en
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group athttp://
> groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: use of fadeScrollbars

2010-07-26 Thread Mark Nuetzmann
yes.  you would want to do that anyway.  It is normally not a good
idea for the layouts to butt right up against the side of the device.
A little breathing room ads to the overall look of the app.  The
scrollbar simply displays over this 'whitespace' while scrolling and
then disappears.

thanks again Joseph

On Jul 25, 2:38 am, Zsolt Vasvari  wrote:
> I am not sure if that's true.  I need to add android:paddingRight="?
> android:attr/scrollbarSize", otherwise the scrollbar overlays the view
> for me.
>
> On Jul 25, 5:07 am, Mark Nuetzmann  wrote:
>
>
>
> > I am using android:fadeScrollbars="true" to show the scrollbar only
> > while scrolling.  Works great.  The only issue I seem to be having is
> > that the view still allocates the space on the right side to display
> > the scrollbar when I do scroll.  I really wish this worked like iPhone
> > where the scrollbar appeared over the top of the rest of the view and
> > still allowed the view to use all available space when not actually
> > scrolling.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: putInt force closes

2010-07-26 Thread scadaguru
John,
Thanks for the reply.
I am trying this app on Nexus One so it has WiFi.
Your question about value being null is that you are referring that
getApplicationContext() or getContentResolver() returns null?
I will check out the values before passing to putInt. This fails on
AVD also but I can take that AVD does not have WiFi but still it has
system setting which has that WIFI_SLEEP_POLICY to read and write.
Thanks again for your reply and any further help appreciated.
JP.

On Jul 26, 1:20 am, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> Is the value is null? What device does this user have? Does it even
> have a wifi?
>
> There could be lots of reasons, you should make your app bullet proof,
> or at least resistant by testing the value to make sure you have what
> you think before using putInt.
>
> -John Coryat

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


[android-developers] Creating build.xml stops Eclipse compilation

2010-07-26 Thread sasq
I use Eclipse for developing, but want a build.xml in my project so
people can compile without it.
However, after I create the ant file with "android update project..",
Eclipse refuses to run my code since it does not find a target in the
ant file.

Eclipse really shouldn't care about this since it's not using ant to
build - but that's a different issue...

What is the easiest way to fix this 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


[android-developers] Re: Unparsed aapt error

2010-07-26 Thread RichardC
b.android.com

On Jul 26, 2:17 pm, Patrick Noffke  wrote:
> Are there any google devs on here?  I get about one "thanks" a week (off
> list) for my post.
>
> Is there somewhere I can file this as a bug?
>
> Pat
>
> On Mon, Jul 26, 2010 at 6:01 AM, parag  wrote:
> > thanks man,
> > u really saved my time..
>
> > On Mar 16, 6:57 pm, Patrick Noffke  wrote:
> > > Hi all,
>
> > > I found some old posts on this problem, and I was having a similar issue,
> > so
> > > I thought I'd share what I learned.
>
> > > I was getting this error after modifying an XML file, and I was unable to
> > > start a debug session until I fixed the problem.  It seems if there are
> > > errors that cause aapt to fail, eclipse can get in a state where it
> > doesn't
> > > know when the problem gets fixed.  Deleting R.java did not work for me.
> > >  What I ended up doing after I fixed the XML file is right-clicking on
> > the
> > > error message in the Problems view, and deleting the error.  Then modify
> > > some files to force a rebuild and you should be okay.
>
> > > I found it helps to turn the android log level to Verbose (Preferences ->
> > > Android -> Build).  This led me to know that once I fixed the XML file,
> > aapt
> > > was happy, but eclipse was not.
>
> > > Hopefully this will save someone else the 3 hours I burned trying to
> > figure
> > > it out!
>
> > > Patrick

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Send/receiving files via Bluetooth

2010-07-26 Thread David Given
I would like my application to be able to send and receive files via
OBEX on Eclair. We have our own IANA MIME type.

My investigations of the (undocumented) Bluetooth APIs seem to suggest
that Eclair is hard-coded to only allow transfers of images, audio and
video. From the Bluetooth package manifest:

  
 
 
 
 
 
  

...and from the OBEX server itself:

  public static final String[] ACCEPTABLE_SHARE_INBOUND_TYPES =
  new String[] {
"image/*",
"video/*",
"audio/*",
"text/plain",
"text/html",
  };

Is this true? If so, is there any way around this restriction? Our MIME
type is "application/...", so unless we can somehow persuade the system
to handle other MIME types, we're pretty much stuffed.

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
│ --- Conway's Game Of Life, in one line of APL



signature.asc
Description: OpenPGP digital signature


[android-developers] Re: Query Google Maps

2010-07-26 Thread JP
On Jul 25, 11:55 pm, KG  wrote:
> I'd like to make an app that requires access to all (or many) search
> results of a maps query.

This used to be part of the googlenav package, back when M3-rc37 of
the SDK was out in 2007.
http://groups.google.com/group/android-developers/browse_thread/thread/bc1e6e1524dcca5a/0c4d20a769e666e5?lnk=gst&q=googlenav+search#0c4d20a769e666e5
This stuff was quickly removed from the SDK though.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: CursorAdapter Problem

2010-07-26 Thread blcooley
For a CursorAdapter, you don't normally Override getView. Instead,
you'll do all that work in bindView, which takes a Cursor as an
argument (this Cursor is the one that you provide when you instantiate
a new CursorAdapter for your ListView).

So, basically, you can move your implementation of getView into
bindView and clean it up a bit (e.g., you won't have to instantiate a
Cursor, just use the one that is passed in), then remove getView from
your implementation.

Best regards,
Brian Cooley

On Jul 26, 9:50 am, charles berman 
wrote:
> can anyone tell me what im doing wrong with my cursorAdapter?
>  its making my display choppy when i scroll. I used to have it within a
> getview but was ripped (rightfully so) on IRC several times because thats
> not the right place for it. Im still learning and just trying to correctly
> wrap my head around things.
>
> http://pastebin.com/Dc5ppHUM

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Wrapping content of a TableRow

2010-07-26 Thread Chris Stewart
Has anyone run into this?  Could use any advice. :)

Chris Stewart
cstewart...@gmail.com


On Sat, Jul 24, 2010 at 11:51 PM, Chris Stewart wrote:

> I'm adding TableRow objects to my view dynamically based upon how many
> items are in a collection I've loaded.  Everything loads fine and works
> nearly as expected.  The one issue I'm having is that the text does not wrap
> if it's too long for the screen, but instead goes off the side.  Can anyone
> take a peek and tell me what I'm missing?
>
> TableRow tr = new TableRow(this);
> tr.setId(100 + current);
> tr.setLayoutParams(new LayoutParams(
> LayoutParams.FILL_PARENT,
> LayoutParams.FILL_PARENT));
>
> TextView labelTV = new TextView(this);
> labelTV.setId(200 + current);
> labelTV.setText(rssItem.getTitle() + "\n" +
> rssItem.getSubTitle() + "\n" + rssItem.getDescription());
> labelTV.setTextColor(Color.WHITE);
> tr.addView(labelTV);
>
> tl.addView(tr, new TableLayout.LayoutParams(
> LayoutParams.FILL_PARENT,
> LayoutParams.FILL_PARENT));
>
> Chris Stewart
> cstewart...@gmail.com
> http://www.androidsdkforum.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] How to explicitly invoke AIDL compiler?

2010-07-26 Thread Jin Chiu
I'm using Eclipse with ADT to develop my project, but for some reason
my AIDL files are not getting compiled into Java files. Is there a way
to explicitly invoked the conversion of my AIDL files?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Jerky Scrolling when using SimpleCursorAdapter with ListView

2010-07-26 Thread Quinn Rohlf
Is there any way that this could be a problem in the database rather than
the listview? My query looks like this:
Cursor c = mDB.query(DB_TABLENAME, new String[]{"_id", "ICONID", "DATE",
"TITLE", "URL"}, null, null, null, null,"DATE DESC");

On Fri, Jul 23, 2010 at 12:59 PM, Quinn Rohlf  wrote:

> The icons aren't the issue - I've tried turning them off and it has no
> effect. I've encountered a similar scrolling issue with a custom ListAdapter
> extending BaseAdapter I wrote a while ago, and it was caused by not properly
> setting the view's values in getView() I resolved it using the fix posted
> at
> http://stackoverflow.com/questions/1320478/how-to-load-the-listview-smoothly-in-android,
> but I'm not really sure how to implement that fix when I'm using a stock
> SimpleCursorAdapter, or if that fix even applies to this situation.
>
>
> On Fri, Jul 23, 2010 at 12:43 PM, Joseph Earl wrote:
>
>> For images loading from your drawable folder you shouldn't have too
>> much of a problem and there isn't too much you can do about it (apart
>> from perhaps not load any thumbnails while the user is scrolling - as
>> per the Contacts app on 2.1+)
>>
>> For HTTP images, and possibly images from the SD card depending on how
>> large your thumbnails are, you'll want to
>> a) Load them in a separate thread, and
>> b) Not load any while the user is scrolling
>>
>> On Jul 23, 8:14 pm, Mark Murphy  wrote:
>> > Try getting rid of the icons briefly. If scrolling speed improves
>> > dramatically, then the problem is in your icons. This would
>> > particularly be true if the values you are trying to put into the
>> > ImageView are HTTP URLs or something.
>> >
>> >
>> >
>> > On Fri, Jul 23, 2010 at 3:10 PM, QR  wrote:
>> > >   I'm getting some very jerky scrolling while using the code below to
>> > > create a ListView from a Cursor. Is there something I'm doing wrong,
>> > > or any way to improve the performance of this ListView?
>> >
>> > > bookmarksListView = (ListView)findViewById(R.id.bookmarks_listview);
>> > >bookmarksDbCursor = bookmarkStore.getCursor();
>> > >startManagingCursor(bookmarksDbCursor);
>> > >String[] bookmarksColumns = new String[3];
>> > >bookmarksColumns[0] = "TITLE";
>> > >bookmarksColumns[1] = "URL";
>> > >bookmarksColumns[2] = "ICONID";
>> > >int[] bookmarksViews = new int[3];
>> > >bookmarksViews[0] = R.id.title_text;
>> > >bookmarksViews[1] = R.id.subtitle_text;
>> > >bookmarksViews[2] = R.id.icon_view;
>> > >bookmarksListAdapter = new
>> SimpleCursorAdapter(this,
>> > >R.layout.list_item,
>> > >bookmarksDbCursor,
>> > >bookmarksColumns,
>> > >bookmarksViews);
>> > >
>>  bookmarksListView.setAdapter(bookmarksListAdapter);
>> > >bookmarksListView.setOnItemClickListener(new
>> OnItemClickListener()
>> > > {
>> > >@Override
>> > >public void onItemClick(AdapterView
>> parent, View view,
>> > >int position, long id)
>> {
>> > >
>>  Toast.makeText(BookmarkHistoryTabActivity.this, "Clicked ID " +
>> > > Long.toString(id), Toast.LENGTH_SHORT).show();
>> > >}
>> > >});
>> > >registerForContextMenu(bookmarksListView);
>> >
>> > > Note: bookmarkStore.getCursor() returns an unmanaged cursor from a
>> > > sqlite database containing the columns from bookmarksColumns.
>> >
>> > --
>> > Mark Murphy (a Commons Guy)http://commonsware.com|
>> http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>> >
>> > Android Development Wiki:http://wiki.andmob.org
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Market paid app download errors

2010-07-26 Thread Edward Falk

> There are occasionally glitches in the android market "paid app
> download process".

There *were* occasional glitches in the market.  Now they're
continuous.

My customers can't download the app and they've been trying for a week
and nothing we've tried from either end helps.

> Try asking your customers to try again later, or the next day.

They've been trying for a week.

> Normally cancelling the order and making a new one will solve it.

Tried that.  Haven't heard back from the user yet.  I'll post an
update as soon as I have info.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: CursorAdapter Problem

2010-07-26 Thread charles berman
Brian,

Thank you for the response. I previously had it setup as a
SimpleCursorAdaptor and that is why i was using the getView(). I did as you
suggested,
Charles Berman



On Mon, Jul 26, 2010 at 11:44 AM, blcooley  wrote:

> For a CursorAdapter, you don't normally Override getView. Instead,
> you'll do all that work in bindView, which takes a Cursor as an
> argument (this Cursor is the one that you provide when you instantiate
> a new CursorAdapter for your ListView).
>
> So, basically, you can move your implementation of getView into
> bindView and clean it up a bit (e.g., you won't have to instantiate a
> Cursor, just use the one that is passed in), then remove getView from
> your implementation.
>
> Best regards,
> Brian Cooley
>
> On Jul 26, 9:50 am, charles berman 
> wrote:
> > can anyone tell me what im doing wrong with my cursorAdapter?
> >  its making my display choppy when i scroll. I used to have it within a
> > getview but was ripped (rightfully so) on IRC several times because thats
> > not the right place for it. Im still learning and just trying to
> correctly
> > wrap my head around things.
> >
> > http://pastebin.com/Dc5ppHUM
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: runQueryOnBackgroundThread on cursoradapter doesn't get called?

2010-07-26 Thread Zvi
Anybody please?

On Jul 25, 1:57 am, Zvi  wrote:
> Hi All,
>
> I have a listactivity as a startup screen in my application. Which is
> displaying database records using custom cursor adapter. On create I
> set the filterable flag - getListView().setTextFilterEnabled(true)
>
> My cursoradapter overrides runQueryOnBackgroundThread which runs
> corresponding query. The problem is that after typing some text and
> hitting enter, runQueryOnBackgroundThread never gets called. However,
> when the item click in the same view launches another activity(detail
> view of the record) and I come back to the original list activity,
> hitting back button, then text filtering works just fine.
> I don't call setTextFilterEnabled anywhere except during the
> initialization process and I can't really find any other API affecting
> this behavior, so any guesses why text filtering doesn't work
> initially, but all of the sudden starts working when I come back to
> the list activity from child activity?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] INTENT_SEND and attached files

2010-07-26 Thread David Given
My app wants to send a data file by email.

However, the data only exists inside the database. There is no physical
file containing it.

In order to make it possible to send this using INTENT_SEND, I need to
return a file descriptor in ContentProvider.openFile(). This means I
need to write my data out to a temporary file on disk somewhere so I can
open it to get a real file descriptor.

However, the email app doesn't necessarily use the file immediately, and
*doesn't tell me* when it's finished with it, so I don't know when to
remove the temporary file. As the file is likely to be quite large I
don't want to keep it around for long periods.

What I'd really like to do is to be able to avoid the whole issue by
using a callback to synthesise the data as and when the email app needs
it, using some sort of pipe. Unfortunately due to the real file
descriptor requirement I can't use Java pipes, there are no Unix fifo
APIs that I can find, and you can't create a ParcelFileDescriptor from a
Unix socket, which was my other option.

Is there any easy way to do what I want, or do I need to start messing
around with TCP sockets?

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
│ --- Conway's Game Of Life, in one line of APL



signature.asc
Description: OpenPGP digital signature


[android-developers] Calling a MapActivity from another activity

2010-07-26 Thread Pravin Parulekar
When I try the above,
I get a class not found exception.

I have included the required entry in manifest file.

The code in current activity is as follows:

Intent i = new Intent(MainListingA.this, DrawTheatreMap.class);

try{
startActivity(i);

}


The error I get is as follows:

07-26 23:03:20.259: WARN/dalvikvm(307): threadid=1: thread exiting
with uncaught exception (group=0x4001d800)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): FATAL EXCEPTION: main
07-26 23:03:20.397: ERROR/AndroidRuntime(307):
java.lang.NoClassDefFoundError: com.mobilo.movie.DrawTheatreMap
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
com.mobilo.movie.MainListingA$1.onItemClick(MainListingA.java:101)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
android.widget.AdapterView.performItemClick(AdapterView.java:284)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
android.widget.ListView.performItemClick(ListView.java:3382)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
android.widget.AbsListView$PerformClick.run(AbsListView.java:1696)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
android.os.Handler.handleCallback(Handler.java:587)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
android.os.Handler.dispatchMessage(Handler.java:92)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
android.os.Looper.loop(Looper.java:123)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
android.app.ActivityThread.main(ActivityThread.java:4627)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
java.lang.reflect.Method.invokeNative(Native Method)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
java.lang.reflect.Method.invoke(Method.java:521)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-26 23:03:20.397: ERROR/AndroidRuntime(307): at
dalvik.system.NativeStart.main(Native Method)

 Any help is highly appreciated.

On a standalone basis, the same map activity works fine.

Rgds, PP

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Eclipse debugger is skipping instructions!

2010-07-26 Thread ClarkBattle
Great insights.  I had broken everything out onto separate lines just
to force the compiler to evaluate each separately.  I never figured
that it would get all smart and ignore what I wrote.   I refactored
the code and now it runs as expected.

Clark

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Eclipse debugger is skipping instructions!

2010-07-26 Thread Kostya Vasilyev

FYI - these compiler optimizations especially affect scope-local variables.

Sometimes it helps if you move variable declaration from local scope to 
function scope.


26.07.2010 21:46, ClarkBattle пишет:

Great insights.  I had broken everything out onto separate lines just
to force the compiler to evaluate each separately.  I never figured
that it would get all smart and ignore what I wrote.   I refactored
the code and now it runs as expected.

Clark

   



--
Kostya Vasilev -- 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: HTC EVO can't see UDP broadcast packets?

2010-07-26 Thread JimmyC
Had the same symptom on my HTC Hero after upgrading to an Android 2.1
based ROM - phone could no longer see UDP broadcast traffic on wifi
(also affected ICMP broadcast).

Only just tracked it down to the wifi WPA utility '/system/bin/
wpa_supplicant' <-- replaced it with a version from an Android 2.2
ROM, and now I can see broadcast traffic again (still trying to work
out why).

-jc

On Jul 19, 4:45 pm, Robert Green  wrote:
> I'm pretty sure no one but me is using UDP broadcasts but in the rare
> chance that someone is - has any experienced this?  I use UDP
> broadcast to do LAN multiplayer games - it's how clients discover
> hosts of games.  The EVO can't ever see the games when all my other
> phones can.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] parseSDKContent failed Window 7 Netbook 32 bit Using Eclipse 3.5.2

2010-07-26 Thread Chris Maurer
Hi All,

Everytime I try and setup a new Android project I get the error
below.  I have the JDK 1.6.21 installed and the Android SDK
installed.  I have Eclipse pointing to my SDK folder and have some
target devices setup.  Can anyone help with a fix for this error?

parseSdkContent failed
java.lang.NullPointerException

Eclipse SDK
Version: 3.5.2
Build id: M20100211-1343

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: Steps/Procedure to add PayPal to existing Android mobile application

2010-07-26 Thread Pragati Ogal Rai
Please refer to the website x.com for detailed instructions. You can
even ask questions to the developers there. There are numerous apps
currently in market which have successfully integrated with PayPal.

Good luck!

On Jul 20, 6:22 am, Chiranjib  wrote:
> Hi ,
>
> I am developing an Android mobile application(Shopping cart) which
> involves the integration with PayPal for payment functionality.
> Kindly inform me about the procedure/steps on how to integrate with
> PayPal with an existing Android application.
>
> Also would like to know whether will Android Market approve this kind
> of application which uses a payment gateway other than Google
> Checkout.
>
> Warm Regards,
> Chiranjib

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird sqlite behaviour. Can somebody explain?

2010-07-26 Thread Sarwar Erfan
Hi,

Please look at this page:
http://www.sqlite.org/datatypes.html
Quote from the page:
"SQLite is "typeless". This means that you can store any kind of data
you want in any column of any table, regardless of the declared
datatype of that column"

Look at Section 4 of the attached page.

May be you can try, the || operator with an empty string. Or, separate
the + sign from the number and use something like "+"||"39123123"
while inserting

Regards
Sarwar Erfan


On Jul 25, 4:12 am, Federico Paolinelli  wrote:
> I spent a lot of time on this.
>
> I was trying to store an incoming call number in sqlite. I'm in Italy,
> so the number was something like +39123123.
>
> What happened was that after putting and removing it from sqlite as a
> string , the leading "+" was gone.
>
> In the table creation the record is a string.
> I call ContentValues.put(String, String) and then I get the value from
> the cursor using getString().
>
> Moreover; I tried to put something before the "+", like "aa+39123123",
> the query returns the expected value. I suspect that for some reason
> sqlite converts the String to a number, and when returns it back the +
> is not given back.
>
> What I think I am going to do (even if I am disgusted) is to add
> something to the string and remove it later.
>
> Anyway, does anybody has an explanation??
> Many thanks in advance,
>
> Federico

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 end a child activity and return to parent activity?

2010-07-26 Thread Corsair
An activity has method "finish".

On 25 Лип, 14:21, Mystique  wrote:
> Hi,
>
> I have a main screen with buttons to launch other subactivities.
> I have to press back button each time to go back to the main screen of
> my application.
> How do I finish a child activity and automatically return from the
> caller?
>
> 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] Sharing code between applications

2010-07-26 Thread BogDan
Hello,

I want to create a "main" service/application which will provide
different functionalities to other applications.

According to android docs I can use elements from an application/
service in other. "A central feature of Android is that one
application can make use of elements of other applications (provided
those applications permit it). ...".
There is any examples/documentation on this direction?
TicTacToeMain/TicTacToeLib example is not helping me because it seems
"TicTacToeLib" will be embedded in final TicTacToeMain apk file.
Also I want to ask if is possible to detect if "main" service/
application is missing (if is missing I want to tell user to install
it, or to install it automatically).

Thank you,
Regards,

BogDan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Listening to camera image capture

2010-07-26 Thread thiago
I'm quite new to android development and I'm doing some experiments to
try it out. Currently what I am trying to do is every time a picture
is taken get it's file path. I understand that Broadcast Receiver is
one way of implementing listeners in android.
I successfully implemented one (which listens to AIRPLANE_MODE and
outputs log messages), but for camera pictures I can't find an
appropriate intent. I already tried MEDIA_SCANNER_SCAN_FILE with no
success. Here is my current android manifest:

http://schemas.android.com/apk/res/android";
   package="test.app" android:versionCode="1"
   android:versionName="1.0">
   
  
 


 
  
   
   


Is this possible to achieve? Any clue anyone?

Thanks in advance,
Thiago Souza

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 switch from Activity to ListActivity

2010-07-26 Thread xrd
Hi there,

This post probably shows my ignorance of Android coding, but here
goes.  I have a sample app I am developing which starts by extending
Activity.  I have a main.xml layout which works great.  On a button
click from the main layout I'd like to load a ListView.  I think I
understand how to use ListView and seed data into it.  I have created
a new layout which contains this ListView.

I am confused, however, how I switch from a regular Activity to a
ListActivity so I get the convenience methods like setListAdapter()?
Should I be starting with a ListView, and then drawing the other view
on top once the app starts by inflating the layout and using it?  If
not, how do I create a ListActivity object inside my app, and where
should I create that?  If you have a sample application or tutorial
that shows how to do this, I would appreciate it.

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] shouldOverrideUrlLoading not always triggered?

2010-07-26 Thread Tim
I'm using WebView in an attempt to provide a custom browser for a
particular website.

I'm confused about when shouldOverrideUrlLoading is called.  It seems
like when a web page sets location.href via javascript I do not get
the chance to override this?

Also perhaps when a new page is set via a form submission?  Overall
I'm unclear on the exact details of the function.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] javaw.exe is taking up 50% of my CPU Usage!!

2010-07-26 Thread Ollie
Hi there, I'm trying to get on with doing some Android dev work. But
when I start to edit files in Eclipse, javaw.exe takes up 50% of my
CPU Usage and Eclipse crashes. Anyone know how to fix this problem?
I've tried simple possible solutions like killing certain processes as
well as doing a full restart of my laptop but still no luck.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 bluetooth client program

2010-07-26 Thread KwangWon
I wonder what would be the right java android bluetooth rfcomm client
code to connect to the following python bluetooth server program.
Thanks in advance.


#
# The following is the PyBluez-0.18 simple example : rfcomm-server.py
#

# desc: simple demonstration of a server application that uses RFCOMM
sockets
#
# $Id: rfcomm-server.py 518 2007-08-10 07:20:07Z albert $

from bluetooth import *

server_sock=BluetoothSocket( RFCOMM )
server_sock.bind(("",PORT_ANY))
server_sock.listen(1)

port = server_sock.getsockname()[1]

uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ee"

advertise_service( server_sock, "SampleServer",
   service_id = uuid,
   service_classes = [ uuid, SERIAL_PORT_CLASS ],
   profiles = [ SERIAL_PORT_PROFILE ],
#   protocols = [ OBEX_UUID ]
)

print "Waiting for connection on RFCOMM channel %d" % port

client_sock, client_info = server_sock.accept()
print "Accepted connection from ", client_info

try:
while True:
data = client_sock.recv(1024)
if len(data) == 0: break
print "received [%s]" % data
except IOError:
pass

print "disconnected"

client_sock.close()
server_sock.close()
print "all done"

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Mapview in tabhost

2010-07-26 Thread BEARbear
Hello~
I recently want to put mapview in tabhost

but now is the question
i can't figure out how to do this right!

here's my source code:

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

TabHost tabs = (TabHost) this.findViewById(R.id.my_tabhost);
tabs.setup();
TabSpec tspec1 = tabs.newTabSpec("First Tab");
 
tspec1.setIndicator("tab1",this.getResources().getDrawable(R.drawable.pencil));
tspec1.setContent(R.id.tab1content);
tabs.addTab(tspec1);
TabSpec tspec2 = tabs.newTabSpec("Second Tab");
 
tspec2.setIndicator("tab2",this.getResources().getDrawable(R.drawable.globalmap));
tspec2.setContent(R.layout.maptabview);
--->why i
can't put an xml in tab content?
tabs.addTab(tspec2);
TabSpec tspec3 = tabs.newTabSpec("Third Tab");
 
tspec3.setIndicator("Facebook",this.getResources().getDrawable(R.drawable.facebookicon));
tspec3.setContent(R.id.tab3content);
tabs.addTab(tspec3);
}
}
--

maptabview.xml
--
 
http://schemas.android.com/apk/res/
android"
android:id="@+id/maptablayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
 

--

please help me out !! Thank you for answering!!! :)
Hope you have a great day!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Simulating a Slot Machine

2010-07-26 Thread g0B
Hi,

I am looking to simulate a slot machine, now so far I am just
animating drawables and looping it to create the effect. I was
wondering if I could achieve this through a listview instead. I tried
looking at this approach but I cannot get it to loop back to the
beginning after it reaches the end.

Is there a better way to achieve what I am trying to do?

Thanks,
Govind

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


[android-developers] trying to save to internal memory; length of content always returns 0

2010-07-26 Thread bvh
Heya,

I'm trying to write something to the internal memory, but whenever I
try to check if it has written the right information, it returns
length 0.

The following code is triggered by a buttonpress, which is suppose to
store the information the user has written in a textform. 'Displaybox'
is a TextView which contains the user's addition.

String FILENAME = "geonag.txt";
String stringtowrite = 
Displaybox.getText().toString();
Log.i("reached", "convert" + stringtowrite);
FileOutputStream fos;
try {
fos = openFileOutput(FILENAME, 
Context.MODE_WORLD_READABLE);

OutputStreamWriter fred = new 
OutputStreamWriter(fos);

fred.write(stringtowrite.toCharArray(), 
0,
stringtowrite.length());
fos.flush();
fos.close();

Log.i("reached", "running text 1");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Log.i("reached", "after file creation");

// read this

FileInputStream fis2;
try {
fis2 = openFileInput(FILENAME);


InputStreamReader isr = new 
InputStreamReader(fis2);

Log.i("reached","length" + 
fis2.available());
char[] inputBuffer = new 
char[fis2.available()];
isr.read(inputBuffer);



String Retrievetext = new String(inputBuffer);
Log.i("reached", "extra"+ Retrievetext);
Displaybox.setText(Retrievetext);

fis2.close();
Log.i("reached", "running text 2");

} catch (FileNotFoundException e1) {
Log.i("reached", "file not found");
// TODO Auto-generated catch block
e1.printStackTrace();

} catch (IOException e) {

Log.i("reached", "ioexception");
// TODO Auto-generated catch block
e.printStackTrace();

}

Log.i("reached","length" + fis2.available()); --- this always seems to
return length 0.
Is there any way of checking whether the file is being created at all?
That would already help a lot.

Cheers,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do I set the selected state of an item in a gallery (the correct way)

2010-07-26 Thread mnuetzm...@handmark.com
thanks Joseph...  i have no idea why the selector background does not
JUST WORK...

I ended up having to 'force' the right backround in the onItemSelected
callback and in the getView of the adpater when the position ==
selected position of the gallery.

If anyone else knows why this is not working I would love to fix it so
I did not have to write custom code to handle what the platform should
be handling by default.

thanks, Mark

On Jul 24, 2:51 pm, Joseph Earl  wrote:
> Not setting anything interesting that I'm aware of.
>
> My getView in my adapter looks like:
>
> public View getView(int position, View convertView, ViewGroup parent)
> {
>         ImageView i;
>
>         if (convertView == null) {
>                 i = (ImageView) View.inflate(mContext, R.layout.gallery_item,
> null);
>         }
>         else {
>                 i = (ImageView) convertView;
>         }
>         i.setImageDrawable(R.drawable.image);
>         // some other stuff
>
>        return i;
>
> }
>
> And in the gallery_item layout XML file there is just an ImageView
> with the selector in my earlier post as the background.
>
> On Jul 24, 6:59 pm, Mark Nuetzmann  wrote:
>
>
>
> > I changed my selector to be exactly what you have (but using my
> > drawables ;) and it still behaves the same way; no selected state.
> > How are you setting the items that are being returned by the adapter?
> > Are you setting anything interesting on those views that might result
> > in it working for you?
>
> > On Jul 24, 12:45 pm, Joseph Earl  wrote:
>
> > > I use something like:
>
> > > http://schemas.android.com/apk/res/android";>
> > >     
> > >      > > android:drawable="@drawable/frame_gallery_thumb_pressed" />
> > >      > > android:drawable="@drawable/frame_gallery_thumb_pressed" />
> > >     
> > > 
>
> > > as a background for views in my gallery which seems to work perfectly.
> > > I should note that when the selected item is pressed it maintains the
> > > selected state drawable (it was how I wanted it) but you could show
> > > the default press state when the selected item is pressed.
>
> > > On Jul 24, 6:23 pm, Joseph Earl  wrote:
>
> > > > Try moving your state_selected statement above your state_pressed item
> > > > and see if it works.
>
> > > > On Jul 24, 6:07 pm, Mark Nuetzmann  wrote:
>
> > > > > I have a gallery that displays TextViews where the background of each
> > > > > view is the following:
>
> > > > > 
> > > > > http://schemas.android.com/apk/res/android";>
> > > > >      > > > >         android:state_pressed="true"
> > > > >         android:drawable="@drawable/item_pressed" />
> > > > >      > > > >         android:state_selected="true"
> > > > >         android:drawable="@drawable/item_selected" />
> > > > >      > > > >         android:drawable="@drawable/item_idle" />
> > > > > 
>
> > > > > This selector work just fine for the state_pressed and default (idle)
> > > > > states, but the selected item state is never displayed.  I REALLY do
> > > > > not want to force the background of the selected item by changing the
> > > > > background of the view when the onItemSelected event is called.  What
> > > > > is the correct state or correct way to get the TextView background to
> > > > > be set properly.  Is the selected (center) view in the gallery not
> > > > > really selected?  Is there some other state I should put in the
> > > > > selector drawable xml?
>
> > > > > Thanks, Mark.

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


[android-developers] Using DefaultHttpClient in Eclipse for AndroidApp

2010-07-26 Thread ArtworkAD
Hi all,

I just want to make a http request...thats all:

String url = "http://www.google.de";;
DefaultHttpClient client = new DefaultHttpClient();
HttpGet method = new HttpGet(url);
HttpResponse res = client.execute(method);

I started the debugger and viewed the params of client, all of them
are set to null. res var has a lot of 'null' too and execute has no
result

I do not see what is wrong...please 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] Inline "loading" graphic

2010-07-26 Thread samspade79
Hi all,

Can someone point me in the right direction on how to have a graphic
for "loading" showing in a view. I don't know what to call it but I
will describe it. The kind of "circle of dots" that rotate when you
are waiting for content to load, or an image to download, etc. Not the
progess dialogs, but the inline graphics. Is there a widget for this
or are people hard coding it? I tried an image view + rotate animation
but couldn't seem to stop it rotating with respect to 0,0.

Thanks in advance.

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


[android-developers] Re: How to explicitly invoke AIDL compiler?

2010-07-26 Thread Jin Chiu
Nevermind, figured it out- it's located under sdk/platforms/android-
/tools/aidl

On Jul 26, 12:26 pm, Jin Chiu  wrote:
> I'm using Eclipse with ADT to develop my project, but for some reason
> my AIDL files are not getting compiled into Java files. Is there a way
> to explicitly invoked the conversion of my AIDL files?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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   >