[android-developers] is there anyone using spotify?

2011-04-28 Thread Hitendrasinh Gohil
hi,

In spotify there are offline playlist mode in which it stores songs on
sdcard in number of chunks.and if we select a particular chunk with
renamed extension .mp3 it cant be played even with spotify.

so can anyone tell me how it works?

is there any encryption or any game with id3 header or something else?

regards,
hitendrasinh gohil

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

2011-04-28 Thread Robert Massaioli
I know it has been a while but in case you wanted a JAXB replacement in 
Android you should use the Simple 
library: 
http://massaioli.homelinux.com/wordpress/2011/04/21/simple-xml-in-android-1-5-and-up/

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

2011-04-28 Thread mort
On 27 Apr., 21:24, Dianne Hackborn hack...@android.com wrote:
 Um.  This API was introduced in Froyo/2.2 (that is API 8).

Oops, sorry, mixed up the version numbers... :o

 ACTION_DOCK_EVENT is about the device being placed in a dock.  Calling that
 API puts the device in to car mode, but that doesn't cause it to be placed
 in to a dock.

OK. I think this separation between dock mode and dock event is a
bit confusing, I expected those to belong together, even if only
emulated. But of course there might be situations where this
separation is useful...

So if I understood this correctly:
ACTION_DOCK_EVENT is for apps that want to respond to real dock
changes, like showing some activity, notification, or toast. It's
supported since Android 2.0, and can't be emulated since 2.2.
UiModeManager and Configuration.uiMode allow to query the current
mode, which is the way to go if the app should e.g. show different
layouts depending on the dock mode, but only exists since Android 2.2.
UiModeManager also allows to (de)activate the car mode.
Right?

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

2011-04-28 Thread kaushik p
on click of a button i am launching googlemaps , on which the current
location of the user is present . But my application crashes each time i
click the button . Please help me solve this problem


public void launchmaps() {
Intent i = new Intent(this,com.kaushik.android.ShowMap.class);
Toast.makeText(getBaseContext(), loading of  map under process...
 ,
Toast.LENGTH_SHORT).show();
startActivity(i);
}
-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.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] Phone for development

2011-04-28 Thread Pepijn Van Eeckhoudt
I agree with that review. As I already said in the set of devices I have 
available, that one's my 'favorite'.


A couple of my colleagues have one for personal use as well and are very 
happy with it. BTW, there's also a revamped 'S' version of the desire 
which is a gingerbread device. It's probably a bit more expensive than 
the regular desire though.


Pepijn

On 27/04/2011 22:22, Tommy wrote:


Here is engadgets review of the desire... 
http://www.engadget.com/2010/04/01/htc-desire-review/


Accoding the the last section called Wrap-up the first paragraph reads:

The Desire is yet another fine piece of work from HTC -- build quality 
is top notch as usual, and there's little to complain about the 
software except for the Flash performance. Some may argue that the 
Desire lacks freshness since the Nexus One's already shown it all, but 
we'd disagree -- at the end of the day it's mainly about the software 
andservice 
http://www.engadget.com/2010/02/09/google-starts-live-phone-support-to-nexus-one-owners/, 
plus the Desire is available from more carriers to begin with (outside 
the US, anyway).


If I were looking into buy the phone given the review I wouldn't feel 
bad about buying it, but that's me.


*From:*android-developers@googlegroups.com 
[mailto:android-developers@googlegroups.com] *On Behalf Of *Raghav Sood

*Sent:* Wednesday, April 27, 2011 1:42 PM
*To:* android-developers@googlegroups.com
*Subject:* Re: [android-developers] Phone for development

Thanks.

Is the Desire a good choice?

On Wed, Apr 27, 2011 at 10:31 PM, Tommy droi...@gmail.com 
mailto:droi...@gmail.com wrote:


I would HIGHLY recommend HTC THEY ARE BEAUTIFUL PHONES! One of my 
phones is the HTC Aria I use for development and my main personal 
phone Great phones. An example My wife threw a pair of paints 
at me as hard as she could (we were playing around she wasn't trying 
to kill me) but she didn't know my HTC was in my pocket... Well the 
pants missed me by a mile(probably b/c she is a girl J) and hit the 
oak bed back I heard the phone hit and just assumed the phone was 
trashed... It hit really hard... The only thing that happened was the 
case popped off... No cracks... no breaks... Phone still works like it 
did when it was knew


I recommend HTC to anyone and everyone until they show me they don't 
deserve to be recommended.


*From:*android-developers@googlegroups.com 
mailto:android-developers@googlegroups.com 
[mailto:android-developers@googlegroups.com 
mailto:android-developers@googlegroups.com] *On Behalf Of *Raghav Sood

*Sent:* Wednesday, April 27, 2011 11:35 AM


*To:* android-developers@googlegroups.com 
mailto:android-developers@googlegroups.com


*Subject:*Re: [android-developers] Phone for development

Thanks Pepijn. That helps a lot. I'll most probably do with a HTC now.

Thanks everyone.

On Wed, Apr 27, 2011 at 8:45 PM, Pepijn Van Eeckhoudt 
pep...@vaneeckhoudt.net mailto:pep...@vaneeckhoudt.net wrote:


On 27/04/2011 16:12, Raghav Sood wrote:

Okay. I'll check that out. Still can someone suggest a reasonably 
priced android 2.2 or above phone?

Thanks

Since no one's giving you any advice I'll give it a try ;)

The dev phones I use myself are Motorola Milestone XT720, HTC Desire, 
Samsung Galaxy S and a Google Nexus S; one for each OS revision. I 
know these are all high-end devices, but I can try to extrapolate my 
experience with those.
Objectively, they're all fairly similar for development purposes. I 
don't use these phones for anything besides testing so I can't comment 
on any Android customizations each vendor might have made. 
Subjectively, I prefer the HTC the most in terms of feel and build 
quality. HTC seems to do a pretty good with their OS updates as well 
and they actually use OTA updates rather than requiring some buggy 
proprietary tool.


If you stick with HTC the only model they seem to have in the 230 euro 
/ Rp. 15000 price range is the wildfire. The wildfire is listed in 
Belgium at 229 euro and the wildfire S at 289 euro. The first one is a 
Froyo device, the second one Gingerbread.


I don't know about the specific Samsung model you mentioned, but the 
Galaxy and Nexus are pretty good too FWIW. The only downsides to 
Samsung IMO is that you have to use Kies to perform upgrades which can 
be a pain and they feel rather flimsy, plasticy. The HTC has a 
sturdier feel to it.


Hope this helps,

Pepijn




--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to 
android-developers@googlegroups.com 
mailto:android-developers@googlegroups.com

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com 
mailto:android-developers%2bunsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en




--
Raghav Sood
http://www.raghavsood.com/
http://www.androidappcheck.com/


[android-developers] Re: Android: Get Recently used Apps

2011-04-28 Thread Goodwin
Add the following.
uses-permission android:name=android.permission.GET_TASKS/uses-
permission

On 4月27日, 下午9时14分, Simon carep...@gmail.com wrote:
 Hello!

 I need a little bit help getting information about the last lets say 5
 application that was opened/used.

 ActivityManager m =
 (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
 RecentTaskInfo task = m.getRecentTasks(5,0).get(0);

 Then i used:

 String output  = the last application you've executed is '+task.id
 +' and the PID is '+task.toString()+';
 But it didnt work out well. I think im on the right track with
 ActivityManager to track the latest app.

 Thank you!

 And ye i only need to get enough information so i can run/start them
 later.

 //Simon

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

2011-04-28 Thread Droid
My app was tested in India (I knew this cos of an inn app widget
giving me locations) and three weeks later appeared in Amazon market.

It is a free app and gets hardly any downloads or feedback whereas in
google market it get loads of downloads and feedback.

Not impressed with Amazon app store yet. Google market way way way
better.




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

2011-04-28 Thread Igor
Hi,

I'm missing these packages:

 com.android.common.speech

 com.android.common.userhappiness


Anybody know wher eI can find them?


Thanks in advanced

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] BitmapSize exceeds VM budget out of memory error

2011-04-28 Thread Droid
I use images that often me this error: BitmapSize exceeds VM budget
out of memory error.
It depends on  the device

Can I check my devices VM budget programmatically or in technical
specs? I have no idea which devices
have good VM budgets and which have low budgets, so I cannot target.

At present I am using a try catch for programme flow, but its bad bad
programming and very clunky too.

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

2011-04-28 Thread blindfold
Similar here. My free app gets between 100 and 200 downloads a day on
Android Market, and only about 1 per day via Amazon Appstore.

On Apr 28, 9:06 am, Droid rod...@gmail.com wrote:
 My app was tested in India (I knew this cos of an inn app widget
 giving me locations) and three weeks later appeared in Amazon market.

 It is a free app and gets hardly any downloads or feedback whereas in
 google market it get loads of downloads and feedback.

 Not impressed with Amazon app store yet. Google market way way way
 better.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] why can't draw text with OpenGL!!!

2011-04-28 Thread a a
Nothing can see with following code which come from
http://stackoverflow.com/questions/1339136/draw-text-in-opengl-es-android

public void drawTag() {
Bitmap bg = Bitmap.createBitmap(256, 256, Bitmap.Config.ARGB_);
bg.eraseColor(0);

Canvas canvas = new Canvas(bg);

Drawable drawable =
mRootLayer.getContext().getResources().getDrawable(R.drawable.default_background);
drawable.setBounds(0,0,256,256);
drawable.draw(canvas);

 // Draw the text
Paint textPaint = new Paint();
textPaint.setTextSize(32);
textPaint.setAntiAlias(true);
textPaint.setARGB(0xff, 0x00, 0x00, 0x00);
// draw the text centered
canvas.drawText(Hello World, 16,112, textPaint);

int[] textures = new int[1];
GL11 gl = mGL;
//Generate one texture pointer...
gl.glGenTextures(1, textures, 0);
//...and bind it to our array
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);

//Create Nearest Filtered Texture
gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);

//Different possible texture parameters, e.g. GL10.GL_CLAMP_TO_EDGE
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_REPEAT);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_REPEAT);

//Use the Android GLUtils to specify a two-dimensional texture
image from our bitmap
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bg, 0);

//Clean up
bg.recycle();
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: why can't draw text with OpenGL!!!

2011-04-28 Thread a a
2011/4/28 a a harvey.a...@gmail.com:
 Nothing can see with following code which come from
 http://stackoverflow.com/questions/1339136/draw-text-in-opengl-es-android
(at 16th floor)

    public void drawTag() {
        Bitmap bg = Bitmap.createBitmap(256, 256, Bitmap.Config.ARGB_);
        bg.eraseColor(0);

        Canvas canvas = new Canvas(bg);

        Drawable drawable =
 mRootLayer.getContext().getResources().getDrawable(R.drawable.default_background);
        drawable.setBounds(0,0,256,256);
        drawable.draw(canvas);

     // Draw the text
        Paint textPaint = new Paint();
        textPaint.setTextSize(32);
        textPaint.setAntiAlias(true);
        textPaint.setARGB(0xff, 0x00, 0x00, 0x00);
        // draw the text centered
        canvas.drawText(Hello World, 16,112, textPaint);

        int[] textures = new int[1];
        GL11 gl = mGL;
        //Generate one texture pointer...
        gl.glGenTextures(1, textures, 0);
        //...and bind it to our array
        gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);

        //Create Nearest Filtered Texture
        gl.glTexParameterf(GL10.GL_TEXTURE_2D,
 GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
        gl.glTexParameterf(GL10.GL_TEXTURE_2D,
 GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);

        //Different possible texture parameters, e.g. GL10.GL_CLAMP_TO_EDGE
        gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
 GL10.GL_REPEAT);
        gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
 GL10.GL_REPEAT);

        //Use the Android GLUtils to specify a two-dimensional texture
 image from our bitmap
        GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bg, 0);

        //Clean up
        bg.recycle();
 }


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

2011-04-28 Thread Bob Kerns
I'm not sure we're not talking past each other. Let me make my case against
using device identity a bit more clear, and see if you don't agree.

Let's say we have a device, the iDroidMax, which has the nasty habit of the
screen cracking, if you perchance display a certain icon, an apple.

You're writing your code, you have heard about the bug. So you detect the
device. Let's consider three example detections:
* iDroidMax
* iDroidMax Rev0
* iDroidMax Rev0 Android 2.3

Take your pick -- or come up with your own detection. Decide now, and write
your code -- display a peach if it's this device.

Now, let's move into the future, and consider some events.

* The iDroidSuperMax comes out. It has the same bug.
* The iDroidMax Rev 1 comes out. It fixes the bug.
* The iDroidMax Rev 0 is updated to Android 2.3.1, which doesn't have the
bug, but Android 3.x builds don't have the fix until Android 3.0.1

Did you make the right choice? Of course not -- there is no right choice
with direct device detection. Not even if you have a crystal ball.

The problem is, keying things directly to device identity locks you in.

Now, consider a different world. In this one, you don't tie your workaround
(displaying a peach icon) to the device identity. Instead, you tie it to a
little database of characteristics. Let's call it iDroidMaxDamage. It
doesn't matter what we call it of course -- we could even call it iDroidMax,
since it's the defining characteristic of the device. But even with the name
being the same, the outcome is different.

The user starts your app, after one of the above events. If he's not run it
before, or the identity has changed in any detail, we figure it would be a
good time to check for an update to the database -- something we'd get
around to anyway.

Now, once the data makes it into the database, all your iDroidSuperMax users
are protected. And all your iDroidMax Rev 1 and iDroidMax Rev 0 Android
2.3.1 and 3.0.1 users get their nice apple icons like the documentation
says.

And everyone is happy.

So that's what I'm talking about not using device identity. Now, as for
bug/feature detection code -- that's a different story, a different benefit,
and a different cost.  This is an area that has been well-explored by
various Javascript packages that work around various browser bugs and
incompatibilities. The big advantage of direct feature detection is that
it's automatic. Nobody needs to do the work to update every device on every
software or hardware upgrade, and if someone plops a custom build on there
that fixes the bug -- the bug is detected as fixed. Instantly.

So this is a real nice-to-have, because it makes it cheaper to maintain and
more accurate.

But it costs more to develop -- sometimes just a tiny cost -- like detecting
whether a method is present.

Other times, it's prohibitively expensive in one way or another.  For
example, some tests could be security holes, or take too much time, or be
hard to develop.

And sometimes, it's impossible.

That may be what you meant by you can make the whole thing much lighter.
If so -- you misread my intent. I was describing the overall flow, and where
this sort of thing should fit in. If we detect a camera, and assert the
device has a camera, then we assume it has a camera -- but we can override
that for a device that claims to have a camera, and has a camera -- but to
get to it, you have to take out the battery. Then, your model-based feature
derivation would override this detection, and assert the device does not
have a camera (perhaps with additional localizable explanatory text, if you
want to get fancy).

And then in the final step, you go on to assert that if it doesn't have a
camera, we set the LiveWebCamCapable attribute to false.

If has a camera is detected, you save on having every model's feature set
supply that information. Likewise, the basic characteristics of the camera.
You get all the benefits of using the native API to determine this
information, but you also get the benefit of additional information --
including corrections, missing information, etc.

Actually -- this also brings up a model issue. It's not just devices and
attributes -- but also resources. For example, a description of internal and
external SD-card memory capabilities would be helpful -- asking about SD
cards might give a list of SD descriptions: [{name=internal0,
removable=false, location=/sdcard}, {name=external1, removable=true,
location=/sdcard/1}, {name=external2, removable=true, location=/sdcard/2}].
Asking about cameras might give you front-and-rear, and point out the nice
flash is attached to the front-facing camera to blind yourself with, and not
helpful for taking that family photo.

But we can start with device attributes, and the core is the ones based on
model identity.

On Tue, Apr 26, 2011 at 9:00 PM, Brill Pappin bpap...@sixgreen.com wrote:

 I think with all the comments we have a good start to what it *should* be.
 I agree with you bob, that we don't want the 

[android-developers] Re: How is your app selling on the Amazon Appstore?

2011-04-28 Thread Zsolt Vasvari
I have to add, I have both a free and a paid app on the Android
Market, but I am only offering the paid one on the Amazon Market.

 Similar here. My free app gets between 100 and 200 downloads a day on
 Android Market, and only about 1 per day via Amazon Appstore.

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


Re: [android-developers] How is your app selling on the Amazon Appstore?

2011-04-28 Thread Nikolay Elenkov
On Thu, Apr 28, 2011 at 2:52 PM, Nikolay Elenkov
nikolay.elen...@gmail.com wrote:
 On Thu, Apr 28, 2011 at 2:16 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
 Mine started out very slow, but has picked up some steam lately.  It's
 still too few downloads to establish a pattern, but it's something for
 nothing, so I can't complain.

 How is your experience?


 Very slow. It took ages (2-3 weeks?, can't be sure because there is
 no timeline for status changes) to get approved.

And now I noticed, that not only did they change the descriptions (I can
mostly live with that), but they also changed the category of one the apps.

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

2011-04-28 Thread Ali Chousein

a) Don't do time consuming calculations in the main thread. If you do,
the man thread gets blocked and your application will be killed by the
framework. If you need to do time consuming calculations, use threads
for that purpose. If you don't block the main thread, the framework is
not going to kill your application, unless you are doing something
else wrong.

-Ali

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

2011-04-28 Thread Bob Kerns
Thanks; I was seriously considering starting something, but won't have time
for a few days, so I'm glad you dove in.  I'd be pleased if you added me to
the project.

I do have one little quibble -- 'defect'. While detecting defects is perhaps
the most important use case, I don't think we want to limit it to defect
detection, and I think it somewhat biases the model.

I think it's better to think of it as device attributes, which can include
defects, but can also include corrected screen dimensions, camera color
model information, actual measured optical resolution, accelerometer
sensitivity and noise floors, icons that match the icons on the buttons on
the device to plug into your help text...

Defects are the place to start, though -- the most bang for the buck.

On Wed, Apr 27, 2011 at 8:07 PM, Brill Pappin bpap...@sixgreen.com wrote:

 project created.

 http://code.google.com/p/aosddl/

 i haven't sent any code up yet (not that there is much to send up) but will
 do so shortly.
 Those that wish to participate, please make yourself know to the project :)

 - Brill

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

2011-04-28 Thread Ali Chousein
Can you post your code?

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


[android-developers] Re: Update Contacts

2011-04-28 Thread Stefan S
_context.getContentResolver().notifyChange(
ContactsContract.Contacts.CONTENT_URI, null);
ArrayListContentProviderOperation ops = new
ArrayListContentProviderOperation();
int nIndex = ops.size();

ops.add(ContentProviderOperation.newUpdate(ContactsContract.Contacts.CONTENT_URI)

.withSelection(ContactsContract.RawContacts._ID, new String[]
{String.valueOf(_nContactID)})

.withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME,
_sFamilyName)

.withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,
_sGivenName)

.withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME,
_sMiddleName)
.build());
try {

_context.getContentResolver().applyBatch(ContactsContract.AUTHORITY,
ops);

it doesn't matter if _nContactID is the RAW_CONTACT_ID or the normal
CONTACT_ID.
I always get an out of bounds error...

I've also read that the ID should be the data row id. But I don't know
what row id this is...

On Apr 28, 9:56 am, Ali Chousein ali.chous...@gmail.com wrote:
 Can you post your code?

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


Re: [android-developers] Button code

2011-04-28 Thread Marcin Orlowski
Create object of Button class and add it to your layout. All is in
documentation. All you need it is to read it.

Regards,
Marcin Orlowski

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



On 27 April 2011 23:43, rishabh agrawal android.rish...@gmail.com wrote:

 How to crate button  also called without using xml.

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

2011-04-28 Thread Marcin Orlowski
Hi,

Anyone is using Acer's Iconia A500 for development and want to shares
pro/cons of that model on that subject?

PS: I know specs are not stunning - I do not care - it have to be cheapest
one available with Honeycomb that works. And Transformer seems to be out of
stock everywhere I checked, so this one is second on the list.

Regards,
Marcin Orlowski

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

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

[android-developers] Re: Menus for tabs do not show in action bar

2011-04-28 Thread Steve
An good workaround is described in the docs, under User Interface,
Creating Menus.  This will allow me to implement dynamic menus in
TabActivity.

On Android 2.3 and lower, the system calls onPrepareOptionsMenu() each
time the user opens the Options Menu.

On Android 3.0 and higher, you must call invalidateOptionsMenu() when
you want to update the menu, because the menu is always open. The
system will then call onPrepareOptionsMenu() so you can update the
menu items.


Despite this, the behavior of onCreateOptionMenu on honeycomb is still
not what I expected.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] CheckedTextView and filtering of list not working well together

2011-04-28 Thread Lowell Kirsh
Ok, thanks. Turns out I didn't have to hook into the filtering at all. As 
you said, I added a selected flag to my backing model and all works well now 
:-)

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

2011-04-28 Thread Krischik Martin
On 27 Apr., 05:35, J J andde...@gmail.com wrote:

 a) How to prevent my application from being killed?
 or
 b) How to restart my application automatically after it is killed or
 force stopped?

Care to tell me which app you are working on so I can make sure that I
never ever download it. Because what you are asking for is EVIL.

Martin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problem Sony Xperia Neo Camera zoom-support = false

2011-04-28 Thread Johan Abramsson
Hi,
Your phone does give you a correct answer. Zoom in the Camera API  is
not supported right now.
It will be supoprted in the 4.0.x.y.z Version of the phone software
which will be released by SonyEricsson during late Q2 according to the
present plans.

Kind regards
  /Johan
Sony Ericsson Developer Support

On Apr 27, 6:38 am, CG learn@gmail.com wrote:
 Hi all,
    I have a problem and hope that somebody who encountered this before
 can give me some hints..

 I am developing a app which use the camera on Sony Xperia Neo 
 (http://www.sonyericsson.com/cws/products/mobilephones/overview/xperia-neo?cc...)
 which support Camera Zooming.

 When I tried to check the Zoom Support using
 parameter.isZoomSupported() , it returns false which I think is
 wrong.

 I then try to check the HashMap in the Camera.parameter looking for
 the value of zoom-supported , and the value is also false.
 Besides, zoom=0, max-zoom

 Therefore, my app cannot control the zooming of the Camera preview
 because of this.

 I wonder why it happens ? is it because the Sony's SDK does not return
 the correct value ?

 The same code running on HTC wildfire  Nexus One do not have problem.

 Thanks in advanced for any help ..

 Development OS : Ubuntu 10.04

 Development SDK : 2.2

 Sony Xperia Android : 2.3

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


[android-developers] Re: Button code

2011-04-28 Thread Zsolt Vasvari
Me no likey docy.

On Apr 28, 5:03 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:
 Create object of Button class and add it to your layout. All is in
 documentation. All you need it is to read it.

 Regards,
 Marcin Orlowski

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

 On 27 April 2011 23:43, rishabh agrawal android.rish...@gmail.com wrote:



  How to crate button  also called without using xml.

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

 - Show quoted text -

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


[android-developers] Https connection to webservice

2011-04-28 Thread elioncho
Hello guys,

I'm trying to connect to a webservice through my android application.
In which order should I add these certs to my app's keystore?

1 Subject CN=*.heroku.com, O=Heroku, Inc., L=San Francisco,
ST=California, C=US
   Issuer  CN=DigiCert High Assurance CA-3, OU=www.digicert.com,
O=DigiCert Inc, C=US

 2 Subject CN=DigiCert High Assurance CA-3, OU=www.digicert.com,
O=DigiCert Inc, C=US
   Issuer  CN=DigiCert High Assurance EV Root CA, OU=www.digicert.com,
O=DigiCert Inc, C=US

 3 Subject CN=DigiCert High Assurance EV Root CA, OU=www.digicert.com,
O=DigiCert Inc, C=US
   Issuer  CN=Entrust.net Secure Server Certification Authority,
OU=(c) 1999 Entrust.net Limited,   OU=www.entrust.net/CPS incorp. by
ref. (limits liab.), O=Entrust.net, C=US

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

2011-04-28 Thread Zsolt Vasvari
It can't be any worse than using the emulator -- that's for sure.

On Apr 28, 5:06 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:
 Hi,

 Anyone is using Acer's Iconia A500 for development and want to shares
 pro/cons of that model on that subject?

 PS: I know specs are not stunning - I do not care - it have to be cheapest
 one available with Honeycomb that works. And Transformer seems to be out of
 stock everywhere I checked, so this one is second on the list.

 Regards,
 Marcin Orlowski

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

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


[android-developers] Non-US buyers still charged in US$.

2011-04-28 Thread Zsolt Vasvari
I have prices set in all the different currencies supported by the
Android Market, but still, frequently, I got buyers who get charged in
US$ even though they are in a country that has a supported currency.
It seems to happen the most often with UK buyers.  With this, I am
losing quite a bit of money as my prices are higher outside of the US.

It not at all surprising that the Google Market Team couldn't even get
this right, but before I complain to them (to no avail, for sure),
does anybody else get 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: Menus for tabs do not show in action bar

2011-04-28 Thread Zsolt Vasvari
Here's the class (basically) I use to safely call
invalidateOptionsMenu() on Honeycomb or pre-Honeycomb:


public class SDKLevel11TabletBridge
{
private static SDKLevel11TabletInterface intf;
private static boolean   intfLoaded;


private interface SDKLevel11TabletInterface
{
void invalidateOptionsMenu(Activity activity);
}


private static class SDKLevel11TabletInterfaceImpl implements
SDKLevel11TabletInterface
{
@Override
public void invalidateOptionsMenu(Activity activity)
{
activity.invalidateOptionsMenu();
}
}


private SDKLevel11TabletBridge()
{
// Nothing to do
}


static
{
intfLoaded = false;
}


private static void ensureInterface()
{
if (!intfLoaded)
{
if (Build.VERSION.SDK_INT =
Build.VERSION_CODES.HONEYCOMB)
intf = new SDKLevel11TabletInterfaceImpl();

intfLoaded = true;
}
}


public static void invalidateOptionsMenu(Activity activity)
{
ensureInterface(activity);

if (intf != null)
intf.invalidateOptionsMenu(activity);
}
}


I am saying basically, because I am also checking that it is actually
a tablet by putting a bool resource into the values-xlarge-v11 folder.


On Apr 28, 5:22 pm, Steve rascal2...@gmail.com wrote:
 An good workaround is described in the docs, under User Interface,
 Creating Menus.  This will allow me to implement dynamic menus in
 TabActivity.

 On Android 2.3 and lower, the system calls onPrepareOptionsMenu() each
 time the user opens the Options Menu.

 On Android 3.0 and higher, you must call invalidateOptionsMenu() when
 you want to update the menu, because the menu is always open. The
 system will then call onPrepareOptionsMenu() so you can update the
 menu items.

 Despite this, the behavior of onCreateOptionMenu on honeycomb is still
 not what I expected.

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


Re: [android-developers] how to use scrollview in java code.

2011-04-28 Thread Mark Murphy
On Wed, Apr 27, 2011 at 4:39 PM, rishabh agrawal
android.rish...@gmail.com wrote:
 I want to know that how i use the scrollview in java code

Can you be more specific? What is use?

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

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

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


[android-developers] Mapactivity

2011-04-28 Thread kaushik p
hi all ,

In my application i am trying to start a mapactivity from another activity .
I have been searching every where , i dint get correct information . Please
help me ,

Is it possible to intent mapactivity from an existing activity ?


-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.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] Notify when media file is inserted in MediaStore

2011-04-28 Thread manigault
Hi all. How can i be notified when new media file is inserted into
media store. For example when is downloaded from the net. I found some
posts on this topic but they are not very helpful.

http://stackoverflow.com/questions/230643/android-api-for-detecting-new-media-from-inbuilt-camera-mic
http://stackoverflow.com/questions/4604223/how-to-detect-file-or-folder-changes-in-android

Is there a way to register BroadcastReceiver to listen listen for some
broadcasts when the file is inserted ? The only solution i see which i
don't want to implement is to use use long live service on to register
ContentObserver and somehow to keep track of the new tracks. So any
help will be helpful.

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

2011-04-28 Thread arpit
this is about sending SMS.. so help me out now..this is regarding my
college project..

On Apr 27, 10:05 pm, Peter Webb r.peter.w...@gmail.com wrote:
 Messages?

 You mean email? You mean instant messaging? You mean SMS? You mean via
 bluetooth? You mean via direct sockets connections? You mean via
 Facebook/Twitter etc APIs ?

 These are all completely different problems, and would be solved in
 very different ways.

 What are you really trying to do, and why? If this is just some random
 problem you picked for fun, and you are new to applications
 development, my advice would be to find a simpler and better defined
 problem to start on.

 On Apr 28, 2:30 am, arpit arpit2...@gmail.com wrote:



  I am new in this app development field,
  I have decided to make a simple application regarding messaging, i.e.
  just send and receive messages..
  so can u help me out in this.. how the messages are sent from one
  device to another..?? or do i have to stay on sending message from one
  emulator to another.??
  what are the overall requirements??(i've fully installed eclipse and
  integrated android too)..
  any particular book having a vast information on messaging services
  and android Telephony package...

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

2011-04-28 Thread Mark Murphy
You call startActivity() on a MapActivity the same as you would with
any other Activity.

On Thu, Apr 28, 2011 at 6:25 AM, kaushik p kaushiks...@gmail.com wrote:
 hi all ,
 In my application i am trying to start a mapactivity from another activity .
 I have been searching every where , i dint get correct information . Please
 help me ,
 Is it possible to intent mapactivity from an existing activity ?

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

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

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


[android-developers] Permission Denial at Receiving SMS

2011-04-28 Thread Dario Enser
Hi all...  Im trying to make an application that receives SMS, but i
can't do it.
I tried a lot of piece of codes that it supposed to works fine but all
of them are from 2008, 2009 or 2010...
It seems to none of them, works now.
And Im very stucked and frustrated.
I dont know what can i do.

I have this in the Manifest:uses-permission
android:name=android.permission.RECEIVE_SMS/

But it always says:
Permission Denial: receiving Intent
{ act=android.provider.Telephony.SMS_RECEIVED (has extras) to 
requires android.permission.RECEIVE_SMS due to sender
com.android.phone (uid 1001)  }

 is the name of my App and the name of All Apps i imported to my
workspace to try it, but the result is the same again and again.

can you help me please ?

Thanks

Dario

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

2011-04-28 Thread Jim
My existing native 'c' code uses libcurl to make http requests.  I'd
like to continue to make these calls from the native code.

Option 1 - port curl to android.  I have had no luck with this so
far.  Various people claim to have done it, but I can't figure it
out.  Some people said you have to recompile the android system code
to get it to work.

Option 2 - make reverse calls (figure out how to call Java (HttpPost)
from the native 'c' code).

Both of these are turning into mini projects in and of themselves.

Any suggestions from all you experts?

Jim

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


[android-developers] problem for send sms

2011-04-28 Thread jaafar zbeiba
I realize a sublist for example when a user clicks on an available
balance message will be sent to the server in the background but the
problem it gives me the sms application
appel function
if (position==4){
Boitedialog.bloc=8;
i1 =new Intent(this, EnvoiSms.class);
startActivity(i1);
}
function sms
import android.app.Activity;
import android.os.Bundle;
import  android.telephony.SmsManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class EnvoiSms extends Activity {

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

Button btnEnvoie = (Button)findViewById(R.id.envoyer);

final EditText numero =(EditText)findViewById(R.id.numero);
final EditText message = (EditText)findViewById(R.id.message);

btnEnvoie.setOnClickListener(new OnClickListener() {

public void onClick(View v) {

String num =sms:// + 87012;
String msg =S;

if(num.length()= 4  msg.length()  0){



SmsManager.getDefault().sendTextMessage(num, null, msg, null,
null);

numero.setText();
message.setText();
}else{

Toast.makeText(EnvoiSms.this, Enter le 
numero et/ou le message,
Toast.LENGTH_SHORT).show();
}

}
});
}
}

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


[android-developers] Android Developer console not updating

2011-04-28 Thread AI Factory
It is a source of frustration that the Android market Console is
erratic in its updating. For example one of our apps has seen no
updates for download counts for 10 days now, but is rapidly climbing
the charts, so is clearly doing well. The new statistics button
provided shows the downloads are happening as it lists download totals
for multiple successive days that proves that the main tabulated
summary is way out-of-date. So Android clearly do have these figures
at hand, as the stats prove, but the logged tabulated totals somehow
do not get these.

This is common to all our apps, but usually more typically with a 2 to
4 days when updates do not happen. This is an annoying impediment for
our product tracking.

I'm looking for a place to effectively complain about this!

I assume that others are seeing the same thing?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Audio input funciton via 3.5mm / headphone jack?

2011-04-28 Thread Drew
How do I receive input from the audio jack (from a headset with built
in microphone)? Is it auto switched when the headset is inserted? Is
it a function of HeadsetObserver.java?

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


[android-developers] Custom view and horizontal scrolling

2011-04-28 Thread yasir perwez

I am facing two issue here.

1. If I create HorizontalScrollView and add custom view using
HorizontalScrollView.addview() the application did not crash but

my custom view is not display. It onDraw never gets called.

2. In other approach if I use XML and specify my custom view as child
of HorizontalScrollView then the application crashes.
And I could not figure out how to provide agrument if to custom
view constructor when using XML approach.

Regards,
Yasir


-- Forwarded message --
From: Dianne Hackborn hack...@android.com
Date: Wed, Apr 27, 2011 at 5:47 AM
Subject: Re: Custom view and horizontal scrolling
To: android-platf...@googlegroups.com


You need to make the view that is a child of the scroll view actually
larger in size than the scroll view so there is something to scroll.
Further questions on this would best be asked on android-developers or
StackOverflow.

On Tue, Apr 26, 2011 at 7:03 PM, yasir perwez jugnoya...@gmail.com
wrote:

I have a custom view derived from View class. Where I am drawing a
graph using Canvas and I have implemented onDraw. This view is
horizontally bigger then screen.
I want to make is scrollable horizontally. The custom take sevaral
argument it it constructor. I tried various option

Like make layout xml and

?xml version=1.0 encoding=UTF-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent

HorizontalScrollView android:id=@+id/scroll
android:layout_width=fill_parent
android:layout_height=fill_parent
android:fillViewport=true

com.yasir.canvasTest.GraphView
android:layout_width=fill_parent
  android:layout_height=fill_parent/

/HorizontalScrollView 

/LinearLayout

then

in onCreate of Activity

setContentView(R.layout.horscroll);

Question :- How will I specify argument to the contructor of my
custom view.

I also tried creating HorizontalScrollView and adding custom view
using HorizontalScrollView.addview() the application did not crash but
my custom view is not display. It onDraw never gets called.

Please suggest me how to solve this issue.

--
Yasir Perwez

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


[android-developers] How to run application at startup (Java app)

2011-04-28 Thread dani maoz
Hi
I have created an APK of java application and i have 2 questions
1. After APK installation what is the installed directory where application
located
2. I would like to run the application at boot time , how can i do that
thank you

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

[android-developers] I'm trying to build Library(libwebcore.so) that works on emulator and target(Nexus s).

2011-04-28 Thread JangRok LEe
Hi. I'm trying to build a library(customized libwebcore.so) which work
on not only emulator but also target(Nexus s).

If I build with lunch generic option it works on emulator but nexus s
occur below linking error.

04-28 18:02:49.900: ERROR/AndroidRuntime(12194): Caused by:
java.lang.UnsatisfiedLinkError: Cannot load library:
reloc_library[1311]:
74 cannot locate '__aeabi_f2uiz'...

If I build with lunch crespo option it works on nexus s but emulator
occur linking error.


Is there a way to solve this problem? Or Do I have to build
libwebcore.so separately?

Please Let Me Know asap!!!

PS) For the Froyo, replacing libstlport to static solve 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] Monkeyrunner extension library

2011-04-28 Thread Eing
FYI, for monkeyrunner users, check out androidlib.py which is an
extension to the library -

https://github.com/eing/moet/blob/master/common/androidlib.py

 moet
usage :
moet -d android  [-os os]  [-ic] [-res resolution] [-ic] [-s serial]
[file]
For interactive mode,   use -i
For image capture mode, use -c

 moet -h -d android

available android commands:

backspaces(num),
enter(string) # supports spaces in strings
scroll('up'/'down'/'left'/'right', num)
back(), home(), menu(),
record(), playback()

touch(x,y), drag(fromX, fromY, toX, toY)
touch('x%','y%'), drag('fromX%', 'fromY%', 'toX%', 'toY%')

connect(serial), getDevice(), launch(appActivity)
screenshot(filename)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Missing USB driver for WiFi Galaxy Tab?

2011-04-28 Thread UdneyHay
Since the android-beginners forum is apparently no more, I'm hoping
someone here might help me. If not please redirect to an appropriate
forum.

I'm attempting to test an android app on my brand new wifi Tab. The
app is working in the emulator but neither adb nor the SDK manager can
find the Tab. When I plug the Tab into the USB port of my Windows7 PC
and use Mass Storage mode I can transfer files in and out of the Tab
with no problem. But when I switch the Tab to enable USB debugging and
then plug it in I get no indication that the PC can see it. Is there a
separate or additional USB driver that needs to be loaded to get the
Tab to work in USB debug mode? I see links to OEM USB Drivers in the
Dev Guide but the link for the WiFi Galaxy seems to be broken?

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

2011-04-28 Thread jaafar zbeiba
help me please

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

[android-developers] openning PDF with password

2011-04-28 Thread Marco Antonio Abreu
Hello guys,

I'm creating an application that needs to open some PDFs, but for copyright
reasons, they have password. Is there a way to open the PDFs sending the
password in the Intent, something like it.putExtra (password , 123456) ?

Thanks.

[]'s
--
Marco Antonio Abreu
mabreu...@gmail.com
System Analist/Developer/DBA

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

[android-developers] problem for send sms

2011-04-28 Thread jaafar zbeiba
I realize a sublist for example when a user clicks on an available
balance message will be sent to the server in the background but the
problem it gives me the sms application

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

2011-04-28 Thread Jose H. Espinosa
Hi all,

I am trying to run emma code coverage inside the android simulator using maven.

This are the steps that I am following:
1. Build, install and test my app
   mvn clean install
2. Try to run the application with emma enable
   adb shell am instrument -w -e coverage true
com.example.android.apis.tests/android.test.InstrumentationTestRunner

But I get this error:
Error: Failed to generate emma coverage. Is emma jar on classpath?

The problem is that the target application has not been Emma
instrumented.  I have succesfully get the coverage data using ant as
provided by the sdk but I need to stick with maven.

Can anybody shade some light on how to run Emma code coverage from Maven?

Thanks,
Jose Espinosa

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] onDraw not getting called for a custom view derived from view in layout.

2011-04-28 Thread yasir perwez
Hello All,

I have a custom view
.

package com.yasir.canvasTest;


import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.util.Log;
import android.view.View;


public class GraphView extends View {

private static final String TAG = GraphView;
public static boolean BAR = true;
public static boolean LINE = false;

private Paint paint;
private float[] values;
private String[] horlabels;
private String[] verlabels;
private String title;
private boolean type;
public Canvas tmpCanvas = null;

public GraphView(Context context, float[] values, String title, String[]
horlabels, String[] verlabels) {
super(context);
//setScrollContainer(true);
Log.v(TAG,On GraphView==);




paint = new Paint();

setWillNotDraw(false);
requestLayout();
invalidate();
}

@Override
protected void onDraw(Canvas canvas) {




Log.v(TAG,==On Draw);

/// drawing code here
invalidate();
}

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
Log.v(TAG,On onMeasure==);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);

int parentWidth = MeasureSpec.getSize(widthMeasureSpec);
int parentHeight = MeasureSpec.getSize(heightMeasureSpec);
setMeasuredDimension(
parentWidth * 2, parentHeight);
}

}
...
Activity: onCreate
...
setContentView(R.layout.horscroll);



HorizontalScrollView hsView = (HorizontalScrollView)
findViewById(R.id.hzsv);

LinearLayout ll = (LinearLayout) findViewById(R.id.linearParent);
ll.removeAllViews();


// create custom view and add to laywout
GraphView graphView = new GraphView(this, values,
GraphViewDemo,horlabels, verlabels, GraphView.LINE);


hsView.requestLayout();
hsView.setWillNotDraw(false);

ll.requestLayout();
ll.setWillNotDraw(false);
ll.addView(graphView);

.
Xml

?xml version=1.0 encoding=utf-8?

HorizontalScrollView
 android:id=@+id/hzsv
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 xmlns:android=http://schemas.android.com/apk/res/android;
LinearLayout android:id=@+id/linearParent
android:layout_width=fill_parent
android:layout_height=fill_parent/LinearLayout
 /HorizontalScrollView
..


Regards,
Yasir Perwez

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

2011-04-28 Thread midimid
For those who've used medialets - having a problem dynamically setting
the ap_id.

I have a couple of apps that use an android Library. Medialets uses an
app_id string in the strings.xml of the app. All of the
functionality for the ads is in the Library code (see below), but each
app needs to have its own unique medialets app id.

Here's how the app is laid out:

App1 - MainActivity.class - extends Activity, sets up some
parameters, starts the Library's main activity and finishes.
App1's strings.xml has the medialets app_id.

Library - LibraryActivity.class - extends an abstract Medialets
wrapper class, and runs a method of that class to initiate the ads.
Library - Medialets wrapper class - extends AdManager (Medialets)

Here's the problem - if the Library does not have a proper medialets
app_id in its strings.xml, the ads fail. As soon as I make sure it has
a proper app_id, it works fine.

The Android docs make it very clear that when using a Library,
conflicting files are merged with the Library and the class using
the Library always overrides. When I debug Medialets, I can in fact
confirm that the proper key is being sent to them. But sure enough,
unless a proper app_id is IN the Library's strings.xml, the ads do not
work.

Any thoughts?

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

2011-04-28 Thread Reynold Rosch
I am using an Android Virtual Device and I had the same problem until
I changed the first line of HelloItemizedOverlay(Drawable
defaultMarker, Context context) from

super(defaultMarker);

to

super(boundCenterBottom(defaultMarker);

After adding the call to boundCenterBottom, it display the marker.

I hope this helps,
...Reynold

On Mar 13, 6:58 pm, Dominik Schury dominik.sch...@googlemail.com
wrote:
 Hello Developers,

 I am new at Android development and I work through the tutorials.
 TheHelloGoogleMapsTutorial

 http://developer.android.com/resources/tutorials/views/hello-mapview

 does not work on my phone. The map is shown but not the marker. So I
 want to ask if someone has a working source code of the tutorial?
 I can not understand that Google does not provide!

 Thank you 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] Changing the row color in ListView

2011-04-28 Thread Nouman Naseer
Hi All,

I'm using a listview with customAdapter extending from base adapter.
Everything is working fine the data is populating and click events are
also firing. Now the scenario is; while I'm downloading the data, that
will show up onClick Event of the List, I want to disable the click
event and want the color of each row in listview to be gray. I'm
maintaining a check which notify me that the data is downloaded
successfully and after which I want enable the click event and change
the color of each row back to black. Any idea how I can do that.

I'm using Android SDK 2.2

Thank You

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


[android-developers] Emulator Orientation Change on Mac

2011-04-28 Thread marcello
On iMac:
./emulator -help-keys
gives
[...]KEYPAD_MINUS, Ctrl-F6   Volume down button
Ctrl-KEYPAD_5, Ctrl-F3  Camera button
KEYPAD_7, Ctrl-F11  switch to previous layout
KEYPAD_9, Ctrl-F12  switch to next layout
F8  toggle cell network on/off
  [...]
but on my Mac
to change orientation of the emulator
I need to
fn+ctrl+F11

Possible update needed in help of emulator?

I hope this helps,
best regards,
Marcello

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 a background running service to auto turn on/off auto sync when wifi is turned on/off

2011-04-28 Thread Omkar
Hi,
I want to create a background running service which will get auto
triggered and then set background data and sync property on / off
automatically when wifi is set on / off.

So basically I need a no UI service which will set background data and
sync properties on / off depending on whether Wifi is turned on / off.
The service need not be constantly running / started at boot time, if
there are other alternatives to starting the same.

Pls guide, if this is possible in Android (specifically Froyo and and
above) and basic steps to do so.

Thanks
Omkar

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

2011-04-28 Thread nigel
Thanks Amit;
I already tired that until my fingers were blue.

I got it working in the end with a rule that looked like this

SUBSYSTEMS==usb,ATTRS{idVendor}==1004,SYMLINK+=android_adb,MODE=0666

Not sure of the reasoning behind it - just googled and tried every option I 
found. I don't know why one handset worked with the rule in the first post 
and the other one didn't - I assume there is some other rule somewhere that 
covers it.

Anyway working now, so happy.

If anyone can explain the need for the SYMLINK+=android_adb bit, I'd be 
interested, but this is an Ubuntu question really.

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

2011-04-28 Thread dani maoz
Hi
i have created a java application, i would like to run the application at
boot time
do i need to use RECEIVE_BOOT_COMPLETED
if yes can is there an example someone can post
thank you

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

Re: [android-developers] Problem installing android sdk in ubuntu 10.10

2011-04-28 Thread Nandagopal T
Hi,

Try with this,

https://dl-ssl.google.com/android/eclipse/

Thank you

With Regards,
Nandagopal T

On Sun, Apr 24, 2011 at 3:56 PM, Saurav to.saurav.mukher...@gmail.comwrote:

 Hi all,

 I am trying to install android sdk, but the for every try, the android sdk
 manager gives this error message:

 Failed to fetch URL
 http://dl-ssl.google.com/android/repository/addons_list.xml, reason:
 Connection timed out

 It may look silly, but has anybody solved this? And I have tried with and
 without https!

 Thanks in advance.


 Regards,
 Saurav Mukherjee.

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

2011-04-28 Thread homero nishiwaki
homero nishiwaki

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

2011-04-28 Thread MOHIT SHARMA
Hi  Arpit ,
I hope ur talking about SMS sending utility .

In this case u need to start two emulator at same time . id of the  emulator
would be there no of the emulator .

There many example online for this . In case you find any difficulty contact
me .. i will send u the source code of the application i have development.


And Please give detail description of your queries from next time .


Mohit Sharma


+91-9312340032


On Thu, Apr 28, 2011 at 10:35, Peter Webb r.peter.w...@gmail.com wrote:

 Messages?

 You mean email? You mean instant messaging? You mean SMS? You mean via
 bluetooth? You mean via direct sockets connections? You mean via
 Facebook/Twitter etc APIs ?

 These are all completely different problems, and would be solved in
 very different ways.

 What are you really trying to do, and why? If this is just some random
 problem you picked for fun, and you are new to applications
 development, my advice would be to find a simpler and better defined
 problem to start on.




 On Apr 28, 2:30 am, arpit arpit2...@gmail.com wrote:
  I am new in this app development field,
  I have decided to make a simple application regarding messaging, i.e.
  just send and receive messages..
  so can u help me out in this.. how the messages are sent from one
  device to another..?? or do i have to stay on sending message from one
  emulator to another.??
  what are the overall requirements??(i've fully installed eclipse and
  integrated android too)..
  any particular book having a vast information on messaging services
  and android Telephony package...

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

2011-04-28 Thread milind kurandwadkar
Hi All,

We are trying to extract meta data information using OpenSL ES APIs
(Metadataextraction object), But it looks like the feature is not supported
yet. Can anyone confirm this please? Also is this expected in later
releases? We tried this on 2.3.3 release. So as of now what is the
alternative for getting Meta data information?

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: Update Contacts

2011-04-28 Thread Phuong Thai
Hi Ali,
I've read your blog. It's really useful and interesting.
Thanks for sharing.

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

2011-04-28 Thread crossdev
hello bob,

try this code bellow, coded by MattC:

import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;

import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.params.ClientPNames;
import org.apache.http.client.params.CookiePolicy;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;

import android.util.Log;

public class HttpRequest{

DefaultHttpClient httpClient;
HttpContext localContext;
private String ret;

HttpResponse response = null;
HttpPost httpPost = null;
HttpGet httpGet = null;

public HttpRequest(){
HttpParams myParams = new BasicHttpParams();

HttpConnectionParams.setConnectionTimeout(myParams, 1);
HttpConnectionParams.setSoTimeout(myParams, 1);
httpClient = new DefaultHttpClient(myParams);
localContext = new BasicHttpContext();
}

public void clearCookies() {
httpClient.getCookieStore().clear();
}

public void abort() {
try {
if (httpClient != null) {
System.out.println(Abort.);
httpPost.abort();
}
} catch (Exception e) {
System.out.println(Your App Name Here + e);
}
}

public String sendPost(String url, String data) {
return sendPost(url, data, null);
}

public String sendJSONPost(String url, JSONObject data) {
return sendPost(url, data.toString(), application/json);
}

public String sendPost(String url, String data, String
contentType) {
ret = null;

 
httpClient.getParams().setParameter(ClientPNames.COOKIE_POLICY,
CookiePolicy.RFC_2109);

httpPost = new HttpPost(url);
response = null;

StringEntity tmp = null;

Log.d(Your App Name Here, Setting httpPost headers);

httpPost.setHeader(User-Agent, SET YOUR USER AGENT STRING
HERE);
httpPost.setHeader(Accept, text/html,application/
xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/
*;q=0.5);

if (contentType != null) {
httpPost.setHeader(Content-Type, contentType);
} else {
httpPost.setHeader(Content-Type, application/x-www-form-
urlencoded);
}

try {
tmp = new StringEntity(data,UTF-8);
} catch (UnsupportedEncodingException e) {
Log.e(Your App Name Here, HttpUtils :
UnsupportedEncodingException : +e);
}

httpPost.setEntity(tmp);

Log.d(Your App Name Here, url + ? + data);

try {
response = httpClient.execute(httpPost,localContext);

if (response != null) {
ret = EntityUtils.toString(response.getEntity());
}
} catch (Exception e) {
Log.e(Your App Name Here, HttpUtils:  + e);
}

Log.d(Your App Name Here, Returning value: + ret);

return ret;
}

public String sendGet(String url) {
httpGet = new HttpGet(url);

try {
response = httpClient.execute(httpGet);
} catch (Exception e) {
Log.e(Your App Name Here, e.getMessage());
}

//int status = response.getStatusLine().getStatusCode();

// we assume that the response body contains the error
message
try {
ret = EntityUtils.toString(response.getEntity());
} catch (IOException e) {
Log.e(Your App Name Here, e.getMessage());
}

return ret;
}

public InputStream getHttpStream(String urlString) throws
IOException {
InputStream in = null;
int response = -1;

URL url = new URL(urlString);
URLConnection conn = url.openConnection();

if (!(conn instanceof HttpURLConnection))
throw new IOException(Not an HTTP connection);

try{
HttpURLConnection httpConn = (HttpURLConnection) conn;
httpConn.setAllowUserInteraction(false);
httpConn.setInstanceFollowRedirects(true);
httpConn.setRequestMethod(GET);
httpConn.connect();

response = httpConn.getResponseCode();

if (response == HttpURLConnection.HTTP_OK) {
in =
httpConn.getInputStream();
}
} catch (Exception e) {
throw new IOException(Error connecting);
} // end try-catch

return in;
}
}



On Apr 27, 5:37 am, bob 

[android-developers] Create an Activity at Runtime

2011-04-28 Thread Mohit sharma
Hi ,

I was doing some project in which i need to create UI at runtime which
implies that i need create activity dynamically .

I have googled a lot about how to create activity dynamically but
couldn't find thing relevant . Please help me on how to create
activity at runtime .


Thanx in advance :)

Mohit Sharma

+91-9312340032

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

2011-04-28 Thread Prayag
Hi guys,

I am a Newbie and I have a basic question for which I couldnt get any
answer yet.
What is the need to use two keywords to express that the given
activity is the main activity.
eg. We write the code

action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.LAUNCHER /

My question is that cant it be implicit that the main activity will
launch itself. If not, it would be great if somebody can give me an
example in which the activity is a main activity and not a launcher or
vice versa.

Regards,

Prayag

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

2011-04-28 Thread shiva
Hi,

I am Android developer with experience of more than 40 applications
launched on Android Market.

I have developed a straight forward app which pulls huge data from web
services in XML format and process the data and renders them on the
app as per the business logic. I am using Sony Xperia x10 for testing
and the app is running without any issues. Also tested on some other
models/devices the app is running perfectly. Whereas the same app
crashes and some times facing trouble in receiving data If tested on
Samsung Galaxy S phone under the same test conditions. I went through
the logs and No clue what's happening.

Can anybody help or share their thoughts who have faced problems on
Samsung Galaxy S phone?

Are there any performance issues in Samsung Galaxy S from a Firmware
perspective?

Thanks in advance.

Looking forward for your valuable inputs.

Regards,
Shiva

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

2011-04-28 Thread Mark Murphy
You would need to ask that question of the author of whichever PDF
viewer you are trying to use, or the authors of all PDF viewers if you
are trying to support all of them.

None of them are part of the Android OS or SDK.

On Wed, Apr 27, 2011 at 1:42 PM, Marco Antonio Abreu
mabreu...@gmail.com wrote:
 Hello guys,

 I'm creating an application that needs to open some PDFs, but for copyright
 reasons, they have password. Is there a way to open the PDFs sending the
 password in the Intent, something like it.putExtra (password , 123456) ?

 Thanks.

 []'s
 --
 Marco Antonio Abreu
 mabreu...@gmail.com
 System Analist/Developer/DBA

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



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

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

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


Re: [android-developers] Permission Denial at Receiving SMS

2011-04-28 Thread Kostya Vasilyev

Dario,

Check to make sure that the permission is directly inside the 
manifest tag, not inside receiver.


-- Kostya

28.04.2011 10:08, Dario Enser пишет:

Hi all...  Im trying to make an application that receives SMS, but i
can't do it.
I tried a lot of piece of codes that it supposed to works fine but all
of them are from 2008, 2009 or 2010...
It seems to none of them, works now.
And Im very stucked and frustrated.
I dont know what can i do.

I have this in the Manifest:uses-permission
android:name=android.permission.RECEIVE_SMS/

But it always says:
Permission Denial: receiving Intent
{ act=android.provider.Telephony.SMS_RECEIVED (has extras) to 
requires android.permission.RECEIVE_SMS due to sender
com.android.phone (uid 1001)  }

 is the name of my App and the name of All Apps i imported to my
workspace to try it, but the result is the same again and again.

can you help me please ?

Thanks

Dario




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

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


[android-developers] Re: Option to unlock the boot loader for Sony Ericsson Android Gingerbread phones now available.

2011-04-28 Thread Carl
Hi

Thanks for your feedback here on Google groups and the Developer blog.
At the moment there is no turning back after unlocking the bootloader
which is clearly stated in the instructions.
However, we are looking into alternatives such as sharing information
on how to build your own custom ROM with root access.

Best
Carl Johansson

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

2011-04-28 Thread Mark Murphy
On Wed, Apr 27, 2011 at 9:12 PM, Jim j...@harmonicsystems.net wrote:
 Option 1 - port curl to android.  I have had no luck with this so
 far.

Since curl runs on lots of platforms, I am surprised that there are
problems here. You might inquire on the [android-ndk] list with your
specific problems, rather than a generic had no luck statement.
There are people over there that have discussed this issue:

http://groups.google.com/group/android-ndk/msg/d7fccf8638523d20
http://groups.google.com/group/android-ndk/browse_thread/thread/d51a63c077a775e0/c178446407ab5238

And, for any NDK/JNI work, the [android-ndk] list is the proper list,
not this list.

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

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

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


Re: [android-developers] Create an Activity at Runtime

2011-04-28 Thread Mark Murphy
On Thu, Apr 28, 2011 at 1:02 AM, Mohit sharma mohit7...@gmail.com wrote:
 I was doing some project in which i need to create UI at runtime which
 implies that i need create activity dynamically .

 I have googled a lot about how to create activity dynamically but
 couldn't find thing relevant . Please help me on how to create
 activity at runtime .

You cannot create an activity at runtime.

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

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

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


[android-developers] Re: dispatch key events to other activities.

2011-04-28 Thread Nguyen Dat
Dear all,

Relate with question can't dispatch event when change Activity, i have
litle concern about
Long press key event have abort while timing change Activity like
Scenario as bellow:
[Activit1] - [Activity2]

Does anyone known which class, method or document indicate while
change Activity key event have been clear ?

Regards,
DatNQ

P/s:
As my remember on old mobile platform writing in C/C++, when change
Screen, key event stack have clear:
clearKeyEventQueue()





On Mar 12, 8:24 am, Dianne Hackborn hack...@android.com wrote:
 Correct you can't do this, very much by design.

 On Fri, Mar 11, 2011 at 7:05 AM, Justin Anderson magouyaw...@gmail.comwrote:



  AFAIK that is not possible... I don't think you can redirect events to
  other activities that you don't control.  That would be a big security risk.

  Thanks,
  Justin Anderson
  MagouyaWare Developer
 http://sites.google.com/site/magouyaware

  On Fri, Mar 11, 2011 at 3:44 AM, praveen kumar 
  praveendiscussi...@gmail.com wrote:

  Hi,
  I want to override the back key of the Android device to display a
  dialog,
  which consists of two buttons say Back and Exit. when you press
  the Back button
  in dialog it should dispatch back key to the top activity which is
  currently running, i can able to get
  system context by adding following code snippet to
  android_source_directoryframeworks/
  base/services/java/com/android/server/WindowManagerService.java.

  ActivityThread at = ActivityThread.currentActivityThread();
         if (at == null) {
             Looper.prepare();
             at = ActivityThread.systemMain();
         }
         if(at != null){
             sysContext = at.getSystemContext();
             Log.d(TAG, SystemContext =  + sysContext);
         }

  to display the dialog i added following code
  Dialog dialog = new Dialog(myContext);
  dialog.setContentView(com.android.internal.R.layout.my-layout-name);
  dialog.setTitle(Custom Dialog);
  dialog.show();

  Using sysContext, I can able to display toast, and I can able to
  launch the activity, but
  when i try to display a dialog using the same sysContext i got the
  error saying,
  unable to add window window token is null it would be great if you
  give any input
  why it is not able to display dialog using sysConttext?

  i added the following code, snippet to get top activity pid

  am = (ActivityManager)
  myContext.getSystemService(Activity.ACTIVITY_SERVICE);
  currentPackageName =
  am.getRunningTasks(1).get(0).topActivity.getPackageName();

  ListActivityManager.RunningAppProcessInfo processes;
  processes = am.getRunningAppProcesses();
  for(ActivityManager.RunningAppProcessInfo info: processes) {
         Log.i(Process:, info.processName);
         if(currentPackageName.equalsIgnoreCase(info.processName)){
            Log.i(TAG, Found !);
            mpid = info.pid; //pid of top Activity
            muid = 0; // will be always 0
          }
  }

  private Handler msgHandler = new Handler(){
      //this method will handle the calls from other threads.
     public void handleMessage(Message msg) {
         int result = -1;
         switch (msg.what) {
             case TPMUHelper.DISPATCH_BACK_KEY:
                 Log.d(TAG, Dispatching Back_Key);
                 code = KeyEvent.KEYCODE_BACK;
                 KeyEvent backEvent = new KeyEvent(downTime,
  eventTime,
  action, code, repeatCount, metaState,
                 deviceId, scancode, KeyEvent.FLAG_FROM_SYSTEM);
                 Log.i(TAG, PID =  + mpid + , UID =  +muid);
                 result = dispatchKey(backEvent, mpid, muid);
                 Log.d(TAG, Dispatch Key Returns =  + result);
             break;
       }
   }
  };

  When i send DISPATCH_BACK_KEY message from my-activity Back button
  press event, it comes here
  and dispatch back key, dispatchkey(KeyEvent event, int pid, int uid)
  returns '1', i am success with
  this, however currently running activity is not getting closed. simply
  what i need is, i want to
  send back key to whichever the activity is currently running, (system
  application or 3rd party
  application). input regarding the same is appreciated.

  Thanks  Regards
  Praveen

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

 --
 Dianne Hackborn
 Android framework 

[android-developers] Re: How to check telephony is available

2011-04-28 Thread vadim
Checking the phone number will not necessarily work. As I understand
it, it's up to the carrier to write the phone number onto the SIM
card, and some don't. My T-Mobile Nexus One reports it as unknown.

On Apr 26, 1:38 am, cool rss feed coolrssfe...@gmail.com wrote:
 I am not sure the PackageManager.FEATURE_TELEPHONY will return false
 as you described.

 But if what you described is correct, why dont you check the IMSI or
 the phone number?

 Terence

 On Apr 26, 4:30 pm, b_t bartata...@gmail.com wrote:

  Hi,

  Is there any way to check if telephony is available?

  Checking for PackageManager.FEATURE_TELEPHONY feature is not a
  solution because
  there are phones that says false to this feature but has telephony.

  Thanks, Tamás

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


Re: [android-developers] RECEIVE_BOOT_COMPLETED Request Info

2011-04-28 Thread Mark Murphy
On Wed, Apr 27, 2011 at 2:58 PM, dani maoz maoz.d...@gmail.com wrote:
 i have created a java application, i would like to run the application at
 boot time
 do i need to use RECEIVE_BOOT_COMPLETED
 if yes can is there an example someone can post

https://github.com/commonsguy/cw-advandroid/tree/master/SystemEvents/OnBoot

The right reason to use this is to set up an AlarmManager schedule to
get control on a periodic basis.

99.99% of Android apps do not need to have a service start up at boot
time and remain running all of the time.

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

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

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


Re: [android-developers] Mapactivity

2011-04-28 Thread kaushik p
But for every other activity it works fine , but for only mapactivity it
gives force close . I am not getting any kind of information on googling
also please help me


On Thu, Apr 28, 2011 at 4:01 PM, Mark Murphy mmur...@commonsware.comwrote:

 You call startActivity() on a MapActivity the same as you would with
 any other Activity.

 On Thu, Apr 28, 2011 at 6:25 AM, kaushik p kaushiks...@gmail.com wrote:
  hi all ,
  In my application i am trying to start a mapactivity from another
 activity .
  I have been searching every where , i dint get correct information .
 Please
  help me ,
  Is it possible to intent mapactivity from an existing activity ?

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

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

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




-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.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] Mapactivity

2011-04-28 Thread Mark Murphy
On Thu, Apr 28, 2011 at 6:54 AM, kaushik p kaushiks...@gmail.com wrote:
 But for every other activity it works fine , but for only mapactivity it
 gives force close . I am not getting any kind of information on googling
 also please help me

Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
LogCat and look at the stack trace associated with your force close.
Then, fix the bug(s).

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

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

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


Re: [android-developers] Creating a background running service to auto turn on/off auto sync when wifi is turned on/off

2011-04-28 Thread Amit Pundir
On Thu, Apr 28, 2011 at 1:18 PM, Omkar omkar.ghai...@gmail.com wrote:
 Hi,
    I want to create a background running service which will get auto
 triggered and then set background data and sync property on / off
 automatically when wifi is set on / off.

 So basically I need a no UI service which will set background data and
 sync properties on / off depending on whether Wifi is turned on / off.
 The service need not be constantly running / started at boot time, if
 there are other alternatives to starting the same.

 Pls guide, if this is possible in Android (specifically Froyo and and
 above) and basic steps to do so.

I did something like this using on device-added-* and on
device-removed-* triggers in init.rc.

In init.rc --

service xyz /system/bin/xyz
  disabled

on device-added-/dev/wlan_dev_node
  xyz start

on device-removed-/dev/wlan_dev_node
  xyz stop

Regards,
Amit Pundir


 Thanks
 Omkar

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

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


Re: [android-developers] Mapactivity

2011-04-28 Thread Mohammed Hossain Doula
Did you enable the GoogleMap from another Apps and then again Run your Apps?

On Thu, Apr 28, 2011 at 4:54 PM, kaushik p kaushiks...@gmail.com wrote:

 But for every other activity it works fine , but for only mapactivity it
 gives force close . I am not getting any kind of information on googling
 also please help me


 On Thu, Apr 28, 2011 at 4:01 PM, Mark Murphy mmur...@commonsware.comwrote:

 You call startActivity() on a MapActivity the same as you would with
 any other Activity.

 On Thu, Apr 28, 2011 at 6:25 AM, kaushik p kaushiks...@gmail.com wrote:
  hi all ,
  In my application i am trying to start a mapactivity from another
 activity .
  I have been searching every where , i dint get correct information .
 Please
  help me ,
  Is it possible to intent mapactivity from an existing activity ?

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

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

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




 --
 ThanksRegards
 Kaushik Pendurthi

 http://kaushikpendurthi.blogspot.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




-- 
*--
Mohammed Hossain Doula
Software Engineer
desme INC.*
*www: http://www.hossaindoula.com
@: ron...@desme.com hossaindo...@nibssolutionslimited.com*
*facebook: http://www.facebook.com/ROnyWorld*
*twitter: http://www.twitter.com/hossaindoula*
*blogspot: hossaindoul.blogspot.com
GSM: 00880-167-4347101*

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

2011-04-28 Thread Jernej K.
I found the problem!

I used the if statement wrong :)

But I can confirm you have in Android native code accessibility to
local files created in java - files create on application level, where
other applications can not see your file!

Now I can write to files in native code and read them in java!

On Apr 22, 1:17 pm, Mark Murphy mmur...@commonsware.com wrote:
 Do not make the file MODE_WORLD_WRITEABLE unless you don't mind when
 people hack your files.









 On Fri, Apr 22, 2011 at 4:41 AM,JernejK. jernej.klan...@gmail.com wrote:
  Thank you both for your answer!

  The thing is, in my company we already have working libraries and that
  is the reason why I have to use jni.
  So most of the work is done in native code, most of time I use Java
  for GUI part..

  So I think i would be a performance issue (applications is constantly
  managing with changes..I few times in a second) if I were calling from
  native java methods if we write something to a file..

  So I will send getFilesDir() to my native library and also change the
  write permission for the file - MODE_WORLD_WRITEABLE (if it really has
  a different ID, then it will be visible for others). I will also post
  this to the NDK group..but thanks again!

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

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

 Android Training in NYC:http://marakana.com/training/android/

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


[android-developers] what is possibly wrong in this SIMPLE animation???

2011-04-28 Thread Rakib
when the button is clicked, i want it to move down by 100 pixels and fade 
out i want it all to happen in 2 seconds.

AnimationSet myAnimationSet = new AnimationSet(true);
myAnimationSet.setDuration(2000);
myAnimationSet.addAnimation(new AlphaAnimation(1.0f, 0.0f));
myAnimationSet.addAnimation(new TranslateAnimation(0, 0, 0, 100));
System.out.println(before starting animation);
v.startAnimation(myAnimationSet);
System.out.println(after starting animation);

both the *System.out.println* messages appear when this code is executed. 
But on the device, the buttons just disappear in a split second and come 
back again without having any of the fade out translation animations

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

Re: [android-developers] Creating a background running service to auto turn on/off auto sync when wifi is turned on/off

2011-04-28 Thread Amit Pundir
I completely misunderstood your problem, please ignore my last mail.

Regards,
Amit Pundir

On Thu, Apr 28, 2011 at 4:30 PM, Amit Pundir pundira...@gmail.com wrote:
 On Thu, Apr 28, 2011 at 1:18 PM, Omkar omkar.ghai...@gmail.com wrote:
 Hi,
    I want to create a background running service which will get auto
 triggered and then set background data and sync property on / off
 automatically when wifi is set on / off.

 So basically I need a no UI service which will set background data and
 sync properties on / off depending on whether Wifi is turned on / off.
 The service need not be constantly running / started at boot time, if
 there are other alternatives to starting the same.

 Pls guide, if this is possible in Android (specifically Froyo and and
 above) and basic steps to do so.

 I did something like this using on device-added-* and on
 device-removed-* triggers in init.rc.

 In init.rc --

 service xyz /system/bin/xyz
      disabled

 on device-added-/dev/wlan_dev_node
      xyz start

 on device-removed-/dev/wlan_dev_node
      xyz stop

 Regards,
 Amit Pundir


 Thanks
 Omkar

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


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


Re: [android-developers] Mapactivity

2011-04-28 Thread kaushik p
no , i have used google maps from some other application [app from internet
which used google maps ],but not from the the code of other app .

On Thu, Apr 28, 2011 at 4:30 PM, Mohammed Hossain Doula 
hossaindo...@gmail.com wrote:

 Did you enable the GoogleMap from another Apps and then again Run your
 Apps?

 On Thu, Apr 28, 2011 at 4:54 PM, kaushik p kaushiks...@gmail.com wrote:

 But for every other activity it works fine , but for only mapactivity it
 gives force close . I am not getting any kind of information on googling
 also please help me


 On Thu, Apr 28, 2011 at 4:01 PM, Mark Murphy mmur...@commonsware.comwrote:

 You call startActivity() on a MapActivity the same as you would with
 any other Activity.

 On Thu, Apr 28, 2011 at 6:25 AM, kaushik p kaushiks...@gmail.com
 wrote:
  hi all ,
  In my application i am trying to start a mapactivity from another
 activity .
  I have been searching every where , i dint get correct information .
 Please
  help me ,
  Is it possible to intent mapactivity from an existing activity ?

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

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

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




 --
 ThanksRegards
 Kaushik Pendurthi

 http://kaushikpendurthi.blogspot.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




 --
 *--
 Mohammed Hossain Doula
 Software Engineer
 desme INC.*
 *www: http://www.hossaindoula.com
 @: ron...@desme.com hossaindo...@nibssolutionslimited.com*
 *facebook: http://www.facebook.com/ROnyWorld*
 *twitter: http://www.twitter.com/hossaindoula*
 *blogspot: hossaindoul.blogspot.com
 GSM: 00880-167-4347101*

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




-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.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] Create an Activity at Runtime

2011-04-28 Thread Gergely Juhász
You dont have to create an activity at realtime.
You have to create the view elements of your activity at real time.
Check out for example this:
http://www.brighthub.com/mobile/google-android/articles/48845.aspx

On 28 April 2011 12:51, Mark Murphy mmur...@commonsware.com wrote:

 On Thu, Apr 28, 2011 at 1:02 AM, Mohit sharma mohit7...@gmail.com wrote:
  I was doing some project in which i need to create UI at runtime which
  implies that i need create activity dynamically .
 
  I have googled a lot about how to create activity dynamically but
  couldn't find thing relevant . Please help me on how to create
  activity at runtime .

 You cannot create an activity at runtime.

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

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

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


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

2011-04-28 Thread Muhammad Nabeel Arif
I am new to android development. I am trying to create a folder on
sdCard and set it's  visibility to false. That is, I want to create a
hidden folder on sdcard. Can anybody please share a piece of code to
do that. Thanks.

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


[android-developers] My phone is available for programming in it?

2011-04-28 Thread ruby Bautista
Hi,

I got a phone BLU-tango (http://www.bluproducts.com/downloads.html
with android) and i want to start developing something in it.

I have windows vista and I read that in order to test my application
on the device I need the OEM USB Drivers, the problem is that I find
nothing about this phone (so that it can use as a device developer)

Anyone have ideas? Can you help me? Can i use other drivers for this
phone?

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] NDK CRC errors

2011-04-28 Thread Steve Graham
I just downloaded the latest NDK and got multiple CRC errors when
extracting it using Power Archiver 2011.  Has anyone else has this
experience?  Is it safe to use?

Thanks, Steve

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

2011-04-28 Thread Shushu
My calender is not working! I have deadlines to meet

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


[android-developers] Java SE Development Kit (JDK) not found

2011-04-28 Thread Steve Graham
I have downloaded and installed the Java SE Development Kit and
Classic Eclipse.  When I try to install the Android SDK Tools, I get
the following message.

I'm on a Windows 7 Home Premium 64-bit system.

Any help would be appreciated.

Thanks, Steve

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


[android-developers] Re: Java SE Development Kit (JDK) not found

2011-04-28 Thread Steve Graham
On Thu, Apr 28, 2011 at 1:34 AM, Steve Graham solitary.wandere...@gmail.com
 wrote:

 I have downloaded and installed the Java SE Development Kit and
 Classic Eclipse.  When I try to install the Android SDK Tools, I get
 the following message.

 I'm on a Windows 7 Home Premium 64-bit system.

 Any help would be appreciated.

 Thanks, Steve


Found the answer:  Hit Back, then Next.

Odd.

Steve

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

[android-developers] Video on 2.1 causes browser text to increase

2011-04-28 Thread Rebecca Sliter
Quick question regarding a weird bug I've found on the mobile site I'm
building--

Whenever I play video on my phone (running 2.1), exiting the video to
return to the site causes all text on the page to increase in size.
Any ideas why this would happen?

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

2011-04-28 Thread kenichi kato
hi guys.

i try to set 3 empty view to ListView.

at first, i try to set LinearLayout to EmptyView.
but it doesn't work.

so, i try this code.
listView.setEmptyView(findViewById(R.id.emptyImage));
listView.setEmptyView(findViewById(R.id.emptyButton));
listView.setEmptyView(findViewById(R.id.emptyText));

but it shows only R.id.emptyImage.

is there any way to set mutilple EmptyView to ListView?

thanks.

-- 
-
smokerpg
PC: smokerpg...@gmail.com ke...@jcom.home.ne.jp

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

2011-04-28 Thread Josh
Does anyone have any thoughts?  Or would more information be useful?  Still 
stuck on this and it's driving me crazy.

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

2011-04-28 Thread bappa
Hi

I want to implement google map 5 3D API in my application. I have
updated the goole map to 5 in my target device.

Can you please tell me what I have to do to accomplish this?

Thanks
Ritwik

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

2011-04-28 Thread Josh
I'm currently using a BroadcastReceiver on
android.intent.action.PHONE_STATE to detect when an incoming call is
arriving.  Then, after checking a few user values, I attempt to alter
the ringer volume using the following code.


aMan = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
aMan.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
aMan.setStreamVolume(AudioManager.STREAM_RING,
aMan.getStreamVolume(AudioManager.STREAM_RING), 0);
Toast.makeText(context, We Made It!, Toast.LENGTH_LONG).show();

This code works fine on several phones (N1, Evo, Droid) but a few it
doesn't work on (Epic 4g, Moment).  From my testing, it looks like
once the ringtone starts playing on those problem phones, the newly
adjusted ringer volume isn't taken into account.  Silent mode is
turned off and the ringer volume is turned up, but no ringtone can be
heard for the current incoming call.

Is there a way to fix this?  If I could get a reference to the global
ringtone and restart it somehow that would work.  Any thoughts you
have would be greatly appreciated.

Thanks!

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

Re: [android-developers] Programming Android without any other experience......

2011-04-28 Thread Francisco Dalla Rosa soares
A good start, and it was pretty much my start:

First of all, http://developer.android.com/ is your friend. The developer
website may not have everything but it is very detailed and has a lot of
material to start.

So here we go:

1. Do the Hello World Tutorial (it seems like you did it already, congrats!)
http://developer.android.com/resources/tutorials/hello-world.html

- Here you'll learn how to set up the environment and the very very basic
stuff.


2.Do the notebook tutorial
http://developer.android.com/resources/tutorials/notepad/index.html

- Now that you have a very very basic app and the environment there,  let's
learn something nicer. Here you'll learn some more concepts that you're
gonna use in almost every app you make.

3. Check the Hello Views Tutorial to understand how to make the layout you
want (at least the basics)
http://developer.android.com/resources/tutorials/views/index.html

4. Try to understand the concepts behind Android:
Activities -
http://developer.android.com/guide/topics/fundamentals/activities.html
Services -
http://developer.android.com/guide/topics/fundamentals/services.html
Content Providers -
http://developer.android.com/guide/topics/providers/content-providers.html
Intent Filters -
http://developer.android.com/guide/topics/intents/intents-filters.html
Processes and Threads -
http://developer.android.com/guide/topics/fundamentals/processes-and-threads.html
User Interface - http://developer.android.com/guide/topics/ui/index.html
Resources - http://developer.android.com/guide/topics/resources/index.html
Data Storage -
http://developer.android.com/guide/topics/data/data-storage.html
Security and Permissions -
http://developer.android.com/guide/topics/security/security.html
Android Manifest -
http://developer.android.com/guide/topics/manifest/manifest-intro.html

5.Check out the sample codes to have an idea of how to do the stuff you
wanna do
http://developer.android.com/resources/browser.html?tag=sample

6.Google the stuff you don't know

7. Ask here or at Stack Overflow the stuff you don't understand

Good luck ;D


2011/4/26 Joshua Germon joshger...@gmail.com

 I've learnt some of Java but very very little in order to start
 developing with Android at this website here  The Java™ Tutorials.
 I've only got up to Learning the Java LanguageObjects and Classes
 Declaring Methods on the site. I have also watched many other Android
 tutorials but can't seem to even write a basic application (other than
 following a tutorial or a simple Hello World app). I would just like
 to know if any one started of like and could share how they started
 off or anyone who can give me a solid start as I have been looking at
 doing this since mid last year. I know that I need practice but how
 when I can't write an app!? Anyway all help is very much
 appreciated!!!

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

2011-04-28 Thread freecoder
hello everyone
when i try to install android sdk tools it says java se devolopment
kit(JDK) not found
 so i insall jdk-6u25-windows-i586.exe(I have 32 bit windows) from
location 
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
and still it say  java se devolopment kit(JDK) not found
what can ido now
please help me out..
please check have i insall right jdk or not for 32 bti windows

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

2011-04-28 Thread rishabh agrawal
I want to take the TextView in the xml file.So in this project i want
convert my object to array type.



package com.assign.ment;

import java.net.URL;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Gravity;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class agrawal_first extends Activity {
Button first,second;
String st=Rishabh;
  /** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

LinearLayout layout = new LinearLayout(this);
layout.setOrientation(1);

/** Create a new textview array to display the results */
   TextView name[];





TextView website[];
TextView category[];





try {

URL url = new URL(
http://meherwin7.99k.org/assignment.xml;);
DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new InputSource(url.openStream()));
doc.getDocumentElement().normalize();

NodeList nodeList =
doc.getElementsByTagName(CityWeatherForecast);

/** Assign textview array lenght by arraylist size */
name = new TextView[nodeList.getLength()];
website = new TextView[nodeList.getLength()];
category = new TextView[nodeList.getLength()];

for (int i = 0; i  nodeList.getLength(); i++) {

Node node = nodeList.item(i);

name[i] = new TextView(this);
website[i] = new TextView(this);
category[i] = new TextView(this);

Element fstElmnt = (Element) node;
NodeList nameList =
fstElmnt.getElementsByTagName(BulletinName);
Element nameElement = (Element) nameList.item(0);
nameList = nameElement.getChildNodes();
name[i].setText(BulletinName = 
+ ((Node) nameList.item(0)).getNodeValue());

NodeList websiteList =
fstElmnt.getElementsByTagName(BulletinType);
Element websiteElement = (Element) websiteList.item(0);
websiteList = websiteElement.getChildNodes();
website[i].setText(BulletinType = 
+ ((Node) websiteList.item(0)).getNodeValue());

NodeList aList =
fstElmnt.getElementsByTagName(BulletinProvider);
Element aElement = (Element) aList.item(0);
aList = aElement.getChildNodes();
category[i].setText(BulletinProvider = 
+ ((Node) aList.item(0)).getNodeValue().toUpperCase());



layout.addView(name[i]);
layout.addView(website[i]);
layout.addView(category[i]);

}
} catch (Exception e) {
System.out.println(XML Pasing Excpetion =  + e);
}

/** Set the layout view to display */
setContentView(layout);
setContentView(R.layout.main_first);

}
}

How it is possible.Please correct it

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


[android-developers] Adjust ringer volume for incoming calls

2011-04-28 Thread Josh
I'm currently using a BroadcastReceiver on
android.intent.action.PHONE_STATE to detect when an incoming call is
arriving.  Then, after checking a few user values, I attempt to alter
the ringer volume using the following code.


aMan = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
aMan.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
aMan.setStreamVolume(AudioManager.STREAM_RING,
aMan.getStreamVolume(AudioManager.STREAM_RING), 0);
Toast.makeText(context, We Made It!, Toast.LENGTH_LONG).show();

This code works fine on several phones (N1, Evo, Droid) but a few it
doesn't work on (Epic 4g, Moment).  From my testing, it looks like
once the ringtone starts playing on those problem phones, the newly
adjusted ringer volume isn't taken into account.  Silent mode is
turned off and the ringer volume is turned up, but no ringtone can be
heard for the current incoming call.

Is there a way to fix this?  If I could get a reference to the global
ringtone and restart it somehow that would work.  Any thoughts you
have would be greatly appreciated.

Thanks!

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


[android-developers] Calling menu from an item in a ListView

2011-04-28 Thread Rpuccini
Hi,
I have a ListView, that exibits data from my database.
What I want to do, is to click on the item from the ListView and call
the Menu.

The Menu is called normally if I click on the menu button in the
phone.
But I couldnt find a way to call the menu since I click on one item
from the ListView.

 final ListView listProfile =
((ListView)findViewById(R.id.lvListView));
listProfile.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView? adapter, 
View view,  int
position, long id){
idRow = position; //t
 WHAT  I WOULD LIKE TO DO IS CALL THE
onCreateOptionsMenu  HERE
THAT MEANS, WHEN o CLICK ON THE ITEM IN THE ListView
}
});

 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
 super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.menu, menu);
return true;
 }

Any idea how to do that?
thanks

P.s. - using api 2.2 level 8

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

2011-04-28 Thread freecoder
hello everyone
when i try to install android sdk tools it says java se devolopment
kit(JDK) not found
 so i insall jdk-6u25-windows-i586.exe(I have 32 bit windows) from
location 
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
and still it say  java se devolopment kit(JDK) not found
what can ido now
please help me out..
please check have i insall right jdk or not for 32 bti windows

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


  1   2   3   >