[android-developers] Fwd: startActivityForResult problem

2012-01-19 Thread vani reddy
-


Hi friends,

In my application I am switching betweeen 4 activities

ActivityA , ActivityB,ActivityC, ActivityD

while returning from actvityD i am setting
Intent in = new Intent();
in.putIntegerArrayListExtra("items", sel_supp);
setResult(RESULT_OK, in);
finish();
i have set noHistory=true for  ActivityB and ActivityC
In activtiy A

onActivityResult(int requestCode, int resultCode, Intent data)  i am
getting the values but it is throwing

: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null,
 request=1, result=0, data=null}

How to resolve this

I

-- 
Regards,
Vani Reddy




-- 
Regards,
Vani Reddy

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

2012-01-19 Thread rachana govilkar
I did write this code but its of no use as my Chronometer is not
getting displayed only.
And hence this time ticking is not taking place.
Do I need to add some code in code I mentioned above???


On Jan 19, 7:41 am, Brian Dols  wrote:
> before you call chrono.start(), try adding a tick listener:
>                         chrono.setOnChronometerTickListener(new 
> OnChronometerTickListener()
> {
>
>                                 @Override
>                                 public void onChronometerTick(Chronometer 
> chronometer) {
>                                         long elapsedTime = 
> (System.currentTimeMillis() -
> chronometer.getBase()) / 1000;
>                                         String currentTime = 
> Utils.verboseTime(elapsedTime);
>                                         chronometer.setText(currentTime);
>                                 }
>                         });
>
> On Jan 18, 4:55 am, rachana govilkar 
> wrote:
>
> > Hello All,
>
> > Using MediaRecorder I could capture Video.But I want to show timer to
> > the user exactly same as it shown in
> > built-in Camera app.
> > So i implemented Chronometer logic
>
> > private Chronometer chrono;
> > chrono = (Chronometer)findViewById(R.id.chronometer1);
> > chrono.setBase(SystemClock.elapsedRealtime());
> > chrono.start();
>
> > but no luck.
>
> > Can anybody help me on this issue??

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


[android-developers] startActivityForResult problem

2012-01-19 Thread vani reddy
Hi friends,

In my application I am switching betweeen 4 activities

ActivityA , ActivityB,ActivityC, ActivityD

while returning from actvityD i am setting
Intent in = new Intent();
in.putIntegerArrayListExtra("items", sel_supp);
setResult(RESULT_OK, in);
finish();

-- 
Regards,
Vani Reddy

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

2012-01-19 Thread rachana govilkar


On Jan 18, 4:16 pm, skink  wrote:
> rachana govilkar wrote:
> > Hello All,
>
> > Using MediaRecorder I could capture Video.But I want to show timer to
> > the user exactly same as it shown in
> > built-in Camera app.
> > So i implemented Chronometer logic
>
> > private Chronometer chrono;
> > chrono = (Chronometer)findViewById(R.id.chronometer1);
> > chrono.setBase(SystemClock.elapsedRealtime());
> > chrono.start();
>
> > but no luck.
>
> > Can anybody help me on this issue??
>
> yiu didn't say what your issue is. no luck?

no luck is chronometer is not getting displayed and once it did but
its not showing me time.It just showed 00.00 all the time.
>
> pskink

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

2012-01-19 Thread cindy
Hi All,

I have got PCM data. I use canvas.drawLines(mPoints, mForePaint) to
draw the wave data. But it doesn't like the wave in google voice
search? In google voice search, the wave has round edge. Which method
I can use to draw wave like that?

Thanks!

Cindy

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


Re: [android-developers] Re: Eclipse

2012-01-19 Thread Christopher Van Kirk
Sometimes it's advisable to quote the mail you're responding to. I don't 
think anyone knows what you're talking about.


Eclipse. Me too.

Huh?

On 1/20/2012 2:08 PM, Mrinal wrote:

Hi
I am facing a similar issue. Did you get any workaround ?

Thanks
mrinal



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


[android-developers] Re: Android codesearch replacement?

2012-01-19 Thread joebowbeer
Thanks. The android.jar source code can also be downloaded via SDK
Manager and integrated with an IDE.

I'm looking for a deeper search into android.git.kernel.org (aka
github.com/android). The aapt source, for example.

I thought that is what code search used to provide.

On Jan 19, 10:20 pm, Morrison Chang  wrote:
> Using the Android SDK Reference Search Chrome plug-in
>
> https://chrome.google.com/webstore/detail/hgcbffeicehlpmgmnhnkjbjoldk...
>
> Morrison
>
> On Jan 19, 2:36 pm, joebowbeer  wrote:
>
>
>
>
>
>
>
> > Now that Google code search is shut down, how are Android developers
> > compensating for their loss of queries like the following?
>
> >  http://www.google.com/codesearch#/&exact_package=android
> >  http://www.google.com/codesearch#cZwlSNS7aEw/
>
> > The announcement(*) says:
>
> > "If ChromiumOS or Android are important to you, reach out to whatever
> > contacts you have at Google *now* and let them know!"
>
> > I am reaching out.
>
> > (*)https://groups.google.com/group/google-code-search/browse_thread/thre...

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

2012-01-19 Thread s.rawat
Hi  Michael ,
You mean page 12 , section *5.3 Reading Binary Block*.
I tried that, i found as soon as I send the command the green light on the
card reader turns Red for the time being(which I fear is some operation
failed signal) , accompanied by the 63 00 response .I am using the *TestResMan
*tool.Even though it shows Command is sent successfully and response
is received in XXX secs.
Can you tell me the name of card reader where we cant see
this behavior (reader automatically performed protocol selection up to ISO
14443-4 / APDU layer)

Rgds,
Saurabh

"..pain is temporary.quitting lasts forever.."



On Thu, Jan 19, 2012 at 6:14 PM, Michael Roland  wrote:

> Hallo Saurabh,
>
> > I am getting This ATR now : *3B 8A 80 01 00 31 C1 73 C8 40 00 00 90 00
> > 90* , which I have read in this group that it is for SmartMX.
>
> Correct, that's the PC/SC ATR for the SmartMX.
>
> > I am looking into writing onto it but so far I am getting 63 00
> > response(which means error)
> > I am trying to load., authenticate the keys and then read -write and
> > then read back from the SmartMX (Secure Element).
> >
> > *_Here is my list of commands : _*
> >
> > FF82006006// load keys
> > FF86050100026000// authenticate
> > FFB210//read sector 2
> > FFD6000210// write sector 2
> > FFB210 // read sector 2 again
> >
> > I followed this -- > http://www.nfc-reader.com/
> > NFC-smart-card-reader/ACR122-API-Manual/API_ACR122.pdf
>
> I would guess, that the reader automatically performed protocol
> selection up to ISO 14443-4 / APDU layer. In that state it is not
> possible to access the MIFARE part of the chip with reader-side MIFARE
> emulation. You could try the example on page 12ff of this document.
>
> br,
> Michael
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Android Custom Streaming Media Player

2012-01-19 Thread Ken
Bump, can somebody help?

On Jan 19, 4:52 pm, Ken  wrote:
> I have an application that streams videos from my server. The files
> end in .mp4 and play fine in the default android player. The thing is
> I don't get enough out of the ads displayed on the app as the time of
> the user spent on my app is very less compared to the time spent while
> watching videos. So, I was thinking of integrating my own custom video
> player to the app I made and display banner ads in it while the video
> is streaming.
>
> How can this be done?
>
> 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] How to manually dispatch key event for power button in android

2012-01-19 Thread ashiq sayyad
I have an implementation to lock the phone .I checked the device admin
API.It is introduced after 2.1.So to have lock functionality for all
versions devices,I am planning to dispatch power button event through code.

If is there any other way to lock the phone via code ,please let me know...

Thanks & Regards,
Ashiq Sayyad

On 20 January 2012 02:37, Kristopher Micinski wrote:

> Why are you trying to do this anyway?
>
> kris
>
> On Thu, Jan 19, 2012 at 3:56 PM, Mark Murphy 
> wrote:
> > This would do you no good. Not only can't you attack the device by
> > simulating a power button press, but you cannot respond to power
> > button events.
> >
> > On Wed, Jan 18, 2012 at 7:11 AM, ashiq sayyad 
> wrote:
> >> Hi,
> >>
> >> I want to dispatch key event for Power button programatically.I tried
> >> following line of code but its not working..
> >>
> >>  dispatchKeyEvent(new
> >> KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_POWER));
> >>
> >> But this is not working..
> >>
> >> Any help on this most welcome..
> >>
> >> Thanks & Regards,
> >> Ashiq  Sayyad
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to
> android-developers@googlegroups.com
> >> To unsubscribe from this group, 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
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: DevicePolicyManager LockNow problem

2012-01-19 Thread ashiq sayyad
Thanks.I will check that.

One more is there any way to implement lock on earlier android
versions(before 2.2)

Thanks & Regards.
Ashiq Sayyad

On 20 January 2012 12:00, albnok  wrote:

> You might have missed something in the implementation - it should
> cause the Device Administrators window to pop up, and you need to
> Activate your app as a Device Admin.
>
> Then only isAdminActive() will return true.
>
>
> On Jan 18, 2:58 pm, ashiq sayyad  wrote:
> > I have checked the  lockNow implementation in API demos & tried the
> > same thing in my app. But I am not able to lock the device(Google
> > nexus)
> >
> > Is there any restriction on this API call for thrid party application?
> > isAdminActive() method is returning me false...
> >
> > One more doubt,how to implement screen lock functionality for below
> > 2.3 devices as there in no direct APIS  for tat..
> >
> > Awaiting for help
> >
> > Thanks & Regards,
> > Ashiq Sayyad
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: DevicePolicyManager LockNow problem

2012-01-19 Thread albnok
You might have missed something in the implementation - it should
cause the Device Administrators window to pop up, and you need to
Activate your app as a Device Admin.

Then only isAdminActive() will return true.


On Jan 18, 2:58 pm, ashiq sayyad  wrote:
> I have checked the  lockNow implementation in API demos & tried the
> same thing in my app. But I am not able to lock the device(Google
> nexus)
>
> Is there any restriction on this API call for thrid party application?
> isAdminActive() method is returning me false...
>
> One more doubt,how to implement screen lock functionality for below
> 2.3 devices as there in no direct APIS  for tat..
>
> Awaiting for help
>
> Thanks & Regards,
> Ashiq Sayyad

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


[android-developers] Re: Android codesearch replacement?

2012-01-19 Thread Morrison Chang
Using the Android SDK Reference Search Chrome plug-in

https://chrome.google.com/webstore/detail/hgcbffeicehlpmgmnhnkjbjoldkfhoin

Morrison

On Jan 19, 2:36 pm, joebowbeer  wrote:
> Now that Google code search is shut down, how are Android developers
> compensating for their loss of queries like the following?
>
>  http://www.google.com/codesearch#/&exact_package=android
>  http://www.google.com/codesearch#cZwlSNS7aEw/
>
> The announcement(*) says:
>
> "If ChromiumOS or Android are important to you, reach out to whatever
> contacts you have at Google *now* and let them know!"
>
> I am reaching out.
>
> (*)https://groups.google.com/group/google-code-search/browse_thread/thre...

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


[android-developers] Installing Android SDK

2012-01-19 Thread vivek elangovan
Hi members,
   i m facing difficulty in installing Android SDK
when i checked the SDK Manager log i found that it is not fetching
anything from the following url  "http://innovator.samsungmobile.com/
android/repository/repository.xml".
because of this i m not able to select packages and not able to create
AVD.

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


[android-developers] Re: Eclipse

2012-01-19 Thread Mrinal
Hi 
I am facing a similar issue. Did you get any workaround ?

Thanks
mrinal

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


Re: [android-developers] Regarding Android Apps Development

2012-01-19 Thread yogendra G
Hi,

Thanks for reply. In this i need to bid and all,which i had tried before
also but i was not good at bidding and all so i dint get any free lancing
projects still now so please give me some other suggestions.

Br,
Yogendra G

On Fri, Jan 20, 2012 at 11:32 AM, unicus unicus  wrote:

> check for freelancing.com
> --
> More info,
> http://androidbasic-answer.blogspot.com/
>
> On Fri, Jan 20, 2012 at 10:37 AM, yogendra G  wrote:
>
>> Hi All,
>>
>> Anyone please let me know were can i get some *Android Applications like
>> free lancing so that i can develop more applications or if any one require
>> help on app development i can help out on that*.
>>
>> Thanks in Advance.
>>
>> Br,
>> Yogendra G
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Forcing an item in a GridView to remain highlighted after clicking

2012-01-19 Thread rperi...@yahoo.com
I would like to make the blue border around a gridview item remain
highlighted after clicking on it as a reminder to the user which item
was slected while making the second choice. I have tried a number of
methods from the View class and none of them seem to have any effect -
the border disappears after a short while. Any ideas how to do this?

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


Re: [android-developers] How to iterate Class

2012-01-19 Thread Giuseppe Porcelli
Want to do a for to create a string array to use with an arrayadaptarer.

Giuseppe Porcelli

Il giorno 20/gen/2012, alle ore 01:41, Kristopher Micinski 
 ha scritto:

> What?  Why would you do it inside of a for each?
> 
> Mark already answered this, but this question sounds very confused...
> 
> Don't use a for, just read the values..
> 
> kris
> 
> On Thu, Jan 19, 2012 at 6:38 AM, Giuseppe  wrote:
>> I need to get the  MediaRecorder.AudioSource constants list, es.
>> 
>> CAMCORDER
>> DEFAULT
>> MIC
>> VOICE_CALL
>> VOICE_COMMUNICATION
>> VOICE_DOWNLINK
>> VOICE_RECOGNITION
>> DEFAULT
>> VOICE_UPLINK
>> 
>> and their INT value.
>> 
>> How to do it inside a for each?
>> 
>> 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
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Regarding Android Apps Development

2012-01-19 Thread unicus unicus
check for freelancing.com
-- 
More info,
http://androidbasic-answer.blogspot.com/

On Fri, Jan 20, 2012 at 10:37 AM, yogendra G  wrote:

> Hi All,
>
> Anyone please let me know were can i get some *Android Applications like
> free lancing so that i can develop more applications or if any one require
> help on app development i can help out on that*.
>
> Thanks in Advance.
>
> Br,
> Yogendra G
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread hzakimoto
Hi,

Thank you all for replying. And sorry for being off-topic. I didn't
know it's off-topic. My apology for my stupidity.

The thought of using FF music never crossed my mind until I heard
Chrono Trigger song from one of the Top Free game.

I can create my own music. No problem with that. But if you're also FF
(Music) fan, I think you understand why I want to include some tracks
in my game. It's a dream.

But judging from the answers, I'd better off creating my own music as
I always do. =)

Thanks again.

On Jan 20, 4:12 am, TreKing  wrote:
> On Thu, Jan 19, 2012 at 2:50 PM, hzakimoto  wrote:
> > Directly using the song is obviously illegal. But what if I remix the song
> > myself?
>
> Plagiarism is obviously illegal, but what if I re-arranged the words myself?
>
> > I'm also a musician.
>
> Then come up with your own music?
>
> As has been stated, you need a lawyer. This is way off-topic for this list.
> In general, if you have to ask "is this OK?", it's probably best to assume
> it's not.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Regarding Android Apps Development

2012-01-19 Thread yogendra G
Hi All,

Anyone please let me know were can i get some *Android Applications like
free lancing so that i can develop more applications or if any one require
help on app development i can help out on that*.

Thanks in Advance.

Br,
Yogendra G

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

[android-developers] How to open smm file of samsung galaxy?

2012-01-19 Thread Samuel
Hi,

Do you know a software that can open smm file of samsung galaxy in
Windows or what software can be used to convert the smm file into ms.
word?

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] Best way to have Service inform Activity where user currently is

2012-01-19 Thread Kristopher Micinski
This seems like a pretty straightforward of binding to the service and
using a messenger..

http://developer.android.com/guide/topics/fundamentals/bound-services.html

kris

On Thu, Jan 19, 2012 at 9:59 PM, James Black  wrote:
> My navigation program is all in an Activity, and now I need to have the part
> that makes the determination where the user is.
>
> So, the activity will be in charge of drawing on the MapOverlay, but the
> Service will be getting the location updates.
>
> How should the service inform the drawing activity of the current location
> and the path?
>
> It would seem that the activity should probably just poll the service, so
> that if there is no request for information then the service will just
> quietly keep track of what is going on, and just put up a notification when
> the user reaches their endpoint.
>
> But I am not certain if this is the best approach.
>
> Thank you.
>
> --
> "I know that you believe you understand what you think I said, but I'm not
> sure you realize that what you heard is not what I meant."
> - Robert McCloskey
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Best way to have Service inform Activity where user currently is

2012-01-19 Thread James Black
My navigation program is all in an Activity, and now I need to have the
part that makes the determination where the user is.

So, the activity will be in charge of drawing on the MapOverlay, but the
Service will be getting the location updates.

How should the service inform the drawing activity of the current location
and the path?

It would seem that the activity should probably just poll the service, so
that if there is no request for information then the service will just
quietly keep track of what is going on, and just put up a notification when
the user reaches their endpoint.

But I am not certain if this is the best approach.

Thank you.

-- 
"I know that you believe you understand what you think I said, but I'm not
sure you realize that what you heard is not what I meant."
- Robert McCloskey

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

2012-01-19 Thread gjs
Hi,

You could make minor? improvements by doing the standard optimizations
of moving various static queries and variable initilizations to
outside of the onPreview method.

For example, most of this code does not need to be executed for every
onPreview method call -

Camera.Parameters parameters = camera.getParameters();
int format = parameters.getPreviewFormat();
 //YUV formats require more conversion
if (format == ImageFormat.NV21 /*|| format ==
ImageFormat.YUY2 || format == ImageFormat.NV16*/)
{
int w = parameters.getPreviewSize().width;
int h = parameters.getPreviewSize().height;

...

// Convert YuV to Jpeg
Rect rect = new Rect(0, 0, 320, 240);
ByteArrayOutputStream output_stream = new
ByteArrayOutputStream();

Also you might query camera parameters to see if you can change the
preview frame rate -

http://developer.android.com/reference/android/hardware/Camera.Parameters.html#setPreviewFpsRange(int,
int)

Regards

On Jan 20, 1:44 am, "muhammad.ume...@hotmail.com"
 wrote:
> hi,
>     I am getting frames from onPreviewFrame, compress to jpeg image
> with YUV and send over the network(TCP),
> but the problem is, i want to increase the frame rate. Now it is 4fps
> but i want 15fps and my image size is 4- 6 kb what can i do to
> increase frame rate, here is my code
>
> public void onPreviewFrame(byte[] data, Camera camera) {
>
>                 Camera.Parameters parameters = camera.getParameters();
>                 int format = parameters.getPreviewFormat();
>
>                  //YUV formats require more conversion
>                 if (format == ImageFormat.NV21 /*|| format ==
> ImageFormat.YUY2 || format == ImageFormat.NV16*/)
>                 {
>                 int w = parameters.getPreviewSize().width;
>                 int h = parameters.getPreviewSize().height;
>
>                 // Get the YuV image
>                 YuvImage yuv_image = new YuvImage(data, format, w, h,
> null);
>                 // Convert YuV to Jpeg
>                 Rect rect = new Rect(0, 0, 320, 240);
>                 ByteArrayOutputStream output_stream = new
> ByteArrayOutputStream();
>                 yuv_image.compressToJpeg(rect, 30, output_stream);
>                 byte[] byt=output_stream.toByteArray();
>
>                          try {
>
>                                   obj.writeObject(byt);
>                                   obj.flush();
>
>                            //     Log.d(TAG, "onPictureTaken - wrote bytes: " 
> +
> data.length);
>                               } catch (FileNotFoundException e) {
>                                 e.printStackTrace();
>                              } catch (IOException e) {
>                                 e.printStackTrace();
>                              } finally {
>                              }
>
>                            Preview.this.invalidate();
>                        }
>                  }
>
> Thanks and Regards
> umer

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

2012-01-19 Thread Jan Burse

Mark Murphy schrieb:

You are missing the point. If I am understanding the documentation for
MemoryPoolMXBean, there cannot be "some other lib". I believe that you
will be needing to remove the ties to javax.management, not replace
them.


Since I only need the memory threshold functionality
I could easily implement the functionality in Android
by myself by polling Runtime.freeMemory() in a thread.
The later is available in Android.

But it would be more handy if there is some existing
lib or even an API in Android that I did not yet see.

Bye

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

2012-01-19 Thread Kristopher Micinski
What?  Why would you do it inside of a for each?

Mark already answered this, but this question sounds very confused...

Don't use a for, just read the values..

kris

On Thu, Jan 19, 2012 at 6:38 AM, Giuseppe  wrote:
> I need to get the  MediaRecorder.AudioSource constants list, es.
>
> CAMCORDER
> DEFAULT
> MIC
> VOICE_CALL
> VOICE_COMMUNICATION
> VOICE_DOWNLINK
> VOICE_RECOGNITION
> DEFAULT
> VOICE_UPLINK
>
> and their INT value.
>
> How to do it inside a for each?
>
> 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

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

2012-01-19 Thread Kristopher Micinski
can this not be fixed using a partial wake lock?

kris

On Thu, Jan 19, 2012 at 11:23 AM, crennie  wrote:
> I found that if I'm connected with USB and watching Logcat my accelerometer
> sensor is still firing even when the screen is off. When I run the same
> program with out the USB connected the sensor stop a few seconds after the
> screen goes dark. I wonder if there is a work around here waiting to be
> found. Can you fool the phone into thinking it is connected to USB?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: javax.management

2012-01-19 Thread Mark Murphy
On Thu, Jan 19, 2012 at 7:09 PM, Jan Burse  wrote:
> I was originally using JDK 1.7 from Oracle and openjdk 1.7
> on various platforms (Windows, Mac, Linux).
>
> Both provide javax.management.* and java.lang.management.*
> and the application loaded fine.
>
> I am now trying to port the application to android, but
> the android version doesn't load, since the classes are missing.
>
> I can freely change the application for android, and use
> some other lib if its available.

You are missing the point. If I am understanding the documentation for
MemoryPoolMXBean, there cannot be "some other lib". I believe that you
will be needing to remove the ties to javax.management, not replace
them.

-- 
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: javax.management

2012-01-19 Thread Jan Burse

Mark Murphy schrieb:

On Thu, Jan 19, 2012 at 6:42 PM, Jan Burse  wrote:

I would need:

- javax.management.ListenerNotFoundException;
- javax.management.NotificationEmitter;
- java.lang.management.ManagementFactory;
- java.lang.management.MemoryPoolMXBean;
- javax.management.Notification;
- javax.management.NotificationListener;
- java.lang.management.MemoryNotificationInfo;


MemoryPoolMXBean, in particular, should require firmware-level
changes, as I understand it. If this is third-party code you are
attempting to use, it is unlikely that it is designed with Android in
mind and likely will need to be rewritten.



I was originally using JDK 1.7 from Oracle and openjdk 1.7
on various platforms (Windows, Mac, Linux).

Both provide javax.management.* and java.lang.management.*
and the application loaded fine.

I am now trying to port the application to android, but
the android version doesn't load, since the classes are missing.

I can freely change the application for android, and use
some other lib if its available.


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


Re: [android-developers] Re: Share file or an variable between 2 apps

2012-01-19 Thread Chihwah


Hello Kristopher,

=) you are right about my teacher, he loves Unix and everything with 
*ix. I don't blame him about
giving us such assignment. Althought the assignment was not super, we 
did learn about Android SDK, NDK, JNI. Overall: it has not been a waste.


Thank you for the link about serialization will read and learn. Every 
bits of information help. Some more then others.


Thank you A. Elk for telling about serialization at the first place. I 
really did not have a clue where to look.


Thumbs up!

Cwli

Op 20-1-2012 0:07, Kristopher Micinski schreef:

Unfortunately, it sounds that your teacher just read a few pages and
asked you to do something which shouldn't be allowed;  it's dumb in
the sense that Android development practices work against sharing
information like this, and the preferred way would be to either bind
to a service offering some bit of communication (when you need to do
ipc-ish things) or simply use a content provider, which I think is the
use case here.  It seems otherwise that your teacher said: make it do
this, and you have to make a nasty system hack.

And in the wide majority of cases, if you're developing two "apps"
you're going off in the wrong direction.

I suspect that this assignment stemmed from someone trying to shoehorn
a UNIX mentality onto the Android system..., for example, these types
of assignments are typical of old world unix ipc relics that have been
superseded by modern APIs -- In Android's case the contentprovider
interface..

kris

On Thu, Jan 19, 2012 at 6:00 PM, Chihwah  wrote:

Hello A. Elk,

Yes, I am doing MPNA "make an high performance networking application"
During the course we learned about C programming, threading, networking, etc
My teacher himself read about Android and it's possibility to share data
between two apps and gave us the assignment to find out about having the
same UID and be able to communicate.
After searching for weeks, I know that android security is not fond of such
practices, Android has a few ways to communicate, for example content
manager.

We have have made a server / client app using sockets in C, because that was
the easiest and most straightforward way we knew. But even then I like to
know how to share data using the same UID.
Just to show our teacher "found it!" Althought the assignment was not clear
or good enough we tried our best.

Would be great if someone could tell about sharing with UID, even thought it
will not influence our assigment results any longer. If you or someone else
knows, do send an e-mail. So that we might close the "quest" with good
content

Kindest regards,

Cw


Op 19-1-2012 23:18, A. Elk schreef:


Are you sure that this is the assignment?

You can force two applications to have the same UID by using an attribute
of the  element in AndroidManifest.xml. This is documented in
Security and Permissions,
http://developer.android.com/guide/topics/security/security.html. This guide
also describes the ramifications of sharing a UID. Once you do this, the two
application are treated as "one" by Android, so they share the same
"sandbox". This means that a file written by one can be read by another. To
share a variable, you could create an object and then serialize it to a
file.

However, I strongly recommend against doing this sort of thing. It's not
the way Android is designed to work. Applications should avoid knowing too
much about one another. An application A should use common APIs to send
information to an application B, with the assumption that B could be
anything.

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


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


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


Re: [android-developers] Re: javax.management

2012-01-19 Thread Mark Murphy
On Thu, Jan 19, 2012 at 6:42 PM, Jan Burse  wrote:
> I would need:
>
> - javax.management.ListenerNotFoundException;
> - javax.management.NotificationEmitter;
> - java.lang.management.ManagementFactory;
> - java.lang.management.MemoryPoolMXBean;
> - javax.management.Notification;
> - javax.management.NotificationListener;
> - java.lang.management.MemoryNotificationInfo;

MemoryPoolMXBean, in particular, should require firmware-level
changes, as I understand it. If this is third-party code you are
attempting to use, it is unlikely that it is designed with Android in
mind and likely will need to be rewritten.

-- 
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] Accounts required to publish application on Android Market Place

2012-01-19 Thread TreKing
On Thu, Jan 19, 2012 at 7:56 AM, Bushra  wrote:

> is it required to have all accounts with the same email?
>

No.


> can we use these 3 account for publishing applications on Android market?
>

Yes, you can publish will all three, but only one can publish a given app.


> If there is a complete tutorial (written tutorial or video or screenshots,
> anything can help) shows account setup step by step, please provide me the
> link.
>

Signing up for a website is not something that generally carries a tutorial
with it.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: javax.management

2012-01-19 Thread Jan Burse

Jan Burse schrieb:

Dear All,

Just noticed that javax.management is not available
on Android. Any substitute recommendation?

Bye



I would need:

- javax.management.ListenerNotFoundException;
- javax.management.NotificationEmitter;
- java.lang.management.ManagementFactory;
- java.lang.management.MemoryPoolMXBean;
- javax.management.Notification;
- javax.management.NotificationListener;
- java.lang.management.MemoryNotificationInfo;

Bye

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

2012-01-19 Thread Kristopher Micinski
On Thu, Jan 19, 2012 at 6:11 PM, Chihwah  wrote:
>
> Don't understand how to do the following:
>
>> To share a variable, you could create an object and then serialize it to a
>> file.
>
>
> Cwli

http://java.sun.com/developer/technicalArticles/Programming/serialization/

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

2012-01-19 Thread Chihwah


Don't understand how to do the following:
To share a variable, you could create an object and then serialize it 
to a file. 


Cwli

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

2012-01-19 Thread Kristopher Micinski
Unfortunately, it sounds that your teacher just read a few pages and
asked you to do something which shouldn't be allowed;  it's dumb in
the sense that Android development practices work against sharing
information like this, and the preferred way would be to either bind
to a service offering some bit of communication (when you need to do
ipc-ish things) or simply use a content provider, which I think is the
use case here.  It seems otherwise that your teacher said: make it do
this, and you have to make a nasty system hack.

And in the wide majority of cases, if you're developing two "apps"
you're going off in the wrong direction.

I suspect that this assignment stemmed from someone trying to shoehorn
a UNIX mentality onto the Android system..., for example, these types
of assignments are typical of old world unix ipc relics that have been
superseded by modern APIs -- In Android's case the contentprovider
interface..

kris

On Thu, Jan 19, 2012 at 6:00 PM, Chihwah  wrote:
>
> Hello A. Elk,
>
> Yes, I am doing MPNA "make an high performance networking application"
> During the course we learned about C programming, threading, networking, etc
> My teacher himself read about Android and it's possibility to share data
> between two apps and gave us the assignment to find out about having the
> same UID and be able to communicate.
> After searching for weeks, I know that android security is not fond of such
> practices, Android has a few ways to communicate, for example content
> manager.
>
> We have have made a server / client app using sockets in C, because that was
> the easiest and most straightforward way we knew. But even then I like to
> know how to share data using the same UID.
> Just to show our teacher "found it!" Althought the assignment was not clear
> or good enough we tried our best.
>
> Would be great if someone could tell about sharing with UID, even thought it
> will not influence our assigment results any longer. If you or someone else
> knows, do send an e-mail. So that we might close the "quest" with good
> content
>
> Kindest regards,
>
> Cw
>
>
> Op 19-1-2012 23:18, A. Elk schreef:
>
>> Are you sure that this is the assignment?
>>
>> You can force two applications to have the same UID by using an attribute
>> of the  element in AndroidManifest.xml. This is documented in
>> Security and Permissions,
>> http://developer.android.com/guide/topics/security/security.html. This guide
>> also describes the ramifications of sharing a UID. Once you do this, the two
>> application are treated as "one" by Android, so they share the same
>> "sandbox". This means that a file written by one can be read by another. To
>> share a variable, you could create an object and then serialize it to a
>> file.
>>
>> However, I strongly recommend against doing this sort of thing. It's not
>> the way Android is designed to work. Applications should avoid knowing too
>> much about one another. An application A should use common APIs to send
>> information to an application B, with the assumption that B could be
>> anything.
>>
>> In summary, I think it's a bad assignment.
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Share file or an variable between 2 apps

2012-01-19 Thread Chihwah


Hello A. Elk,

Yes, I am doing MPNA "make an high performance networking application"
During the course we learned about C programming, threading, networking, etc
My teacher himself read about Android and it's possibility to share data 
between two apps and gave us the assignment to find out about having the 
same UID and be able to communicate.
After searching for weeks, I know that android security is not fond of 
such practices, Android has a few ways to communicate, for example 
content manager.


We have have made a server / client app using sockets in C, because that 
was the easiest and most straightforward way we knew. But even then I 
like to know how to share data using the same UID.
Just to show our teacher "found it!" Althought the assignment was not 
clear or good enough we tried our best.


Would be great if someone could tell about sharing with UID, even 
thought it will not influence our assigment results any longer. If you 
or someone else knows, do send an e-mail. So that we might close the 
"quest" with good content


Kindest regards,

Cw


Op 19-1-2012 23:18, A. Elk schreef:

Are you sure that this is the assignment?

You can force two applications to have the same UID by using an 
attribute of the  element in AndroidManifest.xml. This is 
documented in Security and Permissions, 
http://developer.android.com/guide/topics/security/security.html. This 
guide also describes the ramifications of sharing a UID. Once you do 
this, the two application are treated as "one" by Android, so they 
share the same "sandbox". This means that a file written by one can be 
read by another. To share a variable, you could create an object and 
then serialize it to a file.


However, I strongly recommend against doing this sort of thing. It's 
not the way Android is designed to work. Applications should avoid 
knowing too much about one another. An application A should use common 
APIs to send information to an application B, with the assumption that 
B could be anything.


In summary, I think it's a bad assignment.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: content provider

2012-01-19 Thread A. Elk
A sync adapter doesn't automatically communicate data to and from the 
cloud. It's more of a convenience class that scopes out the methods you'll 
need to implement in order to *synchronize* data linked to a particular 
user account, and do it on a regular schedule. In that way, a sync adapter 
ties into the synchronization infrastructure that's part of the OS.

The documentation uses content providers because the primary use case for a 
sync adapter is communicating data from a cloud service to and from a 
central repository of data on the device. The easiest way to manage such a 
repository is a content provider, but it's not mandatory.

>From what you've said, you want to move the files from the device to the 
cloud. Do you want to move files from the cloud to the device, such that 
you can force the cloud and the device to have the same versions? 
Synchronization is not just moving files back and forth; it's *intelligent* 
movement 
that guarantees that two places have the same data. If you need that, then 
you need synchronization. Of course, even if you're *not* synchronizing, 
you need some sort of network transport, but if you're just sending files 
to the cloud then you don't need a sync adapter.

The Android sync adapter framework assumes that sending data to the cloud 
requires authentication and authorization, which is reasonable for 
real-world use cases. The sync adapter is associated with a user account, 
so the user doesn't have to enter credentials every time a sync occurs. The 
rest of the work is having the sync adapter figure out what needs to be 
updated on the device, and then what needs to be updated on the cloud. Even 
if you're using files, it's easier to track the device state within a 
content provider. You can write a content provider that tracks metadata in 
tables but also has URI links to files you have stored on the device.

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

2012-01-19 Thread Mark Murphy
Better yet would be to have the WebView in a dynamic fragment with
setRetainInstance(true). Passing a widget between activity instances
requires some patch-up work to avoid memory leaks -- you're better
served letting existing Android code handle that.

On Thu, Jan 19, 2012 at 5:15 PM, TreKing  wrote:
> On Wed, Jan 18, 2012 at 11:07 AM, IndianDragon 
> wrote:
>>
>> How to retain the form data in the webview after the change
>> the orientation ?
>
>
> Not sure if it's the best solution, but you could use
> onRetainNonConfigurationInstance() to keep the same WebView instance alive
> across Activity changes.
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
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: Share file or an variable between 2 apps

2012-01-19 Thread A. Elk
Are you sure that this is the assignment?

You can force two applications to have the same UID by using an attribute 
of the  element in AndroidManifest.xml. This is documented in 
Security and Permissions, 
http://developer.android.com/guide/topics/security/security.html. This 
guide also describes the ramifications of sharing a UID. Once you do this, 
the two application are treated as "one" by Android, so they share the same 
"sandbox". This means that a file written by one can be read by another. To 
share a variable, you could create an object and then serialize it to a 
file.

However, I strongly recommend against doing this sort of thing. It's not 
the way Android is designed to work. Applications should avoid knowing too 
much about one another. An application A should use common APIs to send 
information to an application B, with the assumption that B could be 
anything.

In summary, I think it's a bad assignment.

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

2012-01-19 Thread TreKing
On Wed, Jan 18, 2012 at 11:07 AM, IndianDragon wrote:

> How to retain the form data in the webview after the change
> the orientation ?
>

Not sure if it's the best solution, but you could use
onRetainNonConfigurationInstance() to keep the same WebView instance alive
across Activity changes.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Android 2.3.4 Sony Xperia Neo GPS strange problem

2012-01-19 Thread Mtx4
Up

On 6 Gen, 19:32, Mtx4  wrote:
> Hello
>
> i have an XperiaNeowith android 2.3.4 and the last build from Sony.
> There is a strange gps issue (i think a bug). Every 5 minutes the
> signal gps drops for few seconds without reason.
> This happen every 5:00 minutes without exception. It is not important
> the quality or intensity of the signal, it drops anyway, with all
> software (maps, sygic, navigon, gps status etc).
> My phone settings are as follows: Gsm only, data connection off,
> roaming data off, my sim is disabled for traffic data, so no internet
> connection.
> Somewhere I read is the agps try to connect and keep data, but if is
> so, it is a bug, agps must not work during navigation.
> And now the strange thing, when i set Flight Mode ON, the gps work
> properly without problem !!!
> It is absolutely perfect and precise.
>
> Why this situation?

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

2012-01-19 Thread TreKing
On Tue, Jan 17, 2012 at 9:23 PM, Asad  wrote:

> but startActivity doesn't work !!


http://www.catb.org/~esr/faqs/smart-questions.html

"doesn't work!!" is useless. Try explaining your crash, or posting a
stacktrace, for starters.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread TreKing
On Thu, Jan 19, 2012 at 2:50 PM, hzakimoto  wrote:

> Directly using the song is obviously illegal. But what if I remix the song
> myself?
>

Plagiarism is obviously illegal, but what if I re-arranged the words myself?


> I'm also a musician.
>

Then come up with your own music?


As has been stated, you need a lawyer. This is way off-topic for this list.
In general, if you have to ask "is this OK?", it's probably best to assume
it's not.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread Christopher Van Kirk
You're assuming that they didn't pay for the right to use that song. If 
you pay the copyright holder, you don't necessarily have to credit them. 
Whether or not you credit is up to the agreement you have with the 
copyright holder.


Anyway, this is a question of law not Android, so it doesn't belong on 
this list. Go talk to a lawyer.




On 1/20/2012 4:50 AM, hzakimoto wrote:

Marble Blast:
https://market.android.com/details?id=com.ezjoynetwork.marbleblast

And here's the song mentioned:
http://www.youtube.com/watch?v=m1qbVI9iTBU

They didn't use the song directly though. It's obvious they remix it.
(The original song is a 16 bit sound from SNES system)

Directly using the song is obviously illegal. But what if I remix the
song myself? I'm also a musician.

Thanks again!

On Jan 20, 3:26 am, TreKing  wrote:

On Thu, Jan 19, 2012 at 2:08 PM, hzakimoto  wrote:

I also saw a top game on Android Market using music(ending theme)
from Chrono Trigger.
It's a zuma-type game sitting on the Top Free page in the Android Market.

Which game?

-
TreKing  - Chicago
transit tracking app for Android-powered devices


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


Re: [android-developers] How to manually dispatch key event for power button in android

2012-01-19 Thread Kristopher Micinski
Why are you trying to do this anyway?

kris

On Thu, Jan 19, 2012 at 3:56 PM, Mark Murphy  wrote:
> This would do you no good. Not only can't you attack the device by
> simulating a power button press, but you cannot respond to power
> button events.
>
> On Wed, Jan 18, 2012 at 7:11 AM, ashiq sayyad  wrote:
>> Hi,
>>
>> I want to dispatch key event for Power button programatically.I tried
>> following line of code but its not working..
>>
>>  dispatchKeyEvent(new
>> KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_POWER));
>>
>> But this is not working..
>>
>> Any help on this most welcome..
>>
>> Thanks & Regards,
>> Ashiq  Sayyad
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread Jona
I would recommend you make your own music... These types of music are so 
simple!  Just copy the structure of the song... And apply your own keys 
:)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread Kristopher Micinski
> Directly using the song is obviously illegal. But what if I remix the
> song myself? I'm also a musician.
>

Nobody here can give you legal advice, that's for a lawyer to do.

In my opinion this will still be considered illegal, almost certainly,
but -- as I said -- I'm not a lawyer

kris

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

2012-01-19 Thread Mark Murphy
This would do you no good. Not only can't you attack the device by
simulating a power button press, but you cannot respond to power
button events.

On Wed, Jan 18, 2012 at 7:11 AM, ashiq sayyad  wrote:
> Hi,
>
> I want to dispatch key event for Power button programatically.I tried
> following line of code but its not working..
>
>  dispatchKeyEvent(new
> KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_POWER));
>
> But this is not working..
>
> Any help on this most welcome..
>
> Thanks & Regards,
> Ashiq  Sayyad
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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


[android-developers] Re: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread hzakimoto
Marble Blast:
https://market.android.com/details?id=com.ezjoynetwork.marbleblast

And here's the song mentioned:
http://www.youtube.com/watch?v=m1qbVI9iTBU

They didn't use the song directly though. It's obvious they remix it.
(The original song is a 16 bit sound from SNES system)

Directly using the song is obviously illegal. But what if I remix the
song myself? I'm also a musician.

Thanks again!

On Jan 20, 3:26 am, TreKing  wrote:
> On Thu, Jan 19, 2012 at 2:08 PM, hzakimoto  wrote:
> > I also saw a top game on Android Market using music(ending theme)
> > from Chrono Trigger.
> > It's a zuma-type game sitting on the Top Free page in the Android Market.
>
> Which game?
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Service Being paused on screen off.

2012-01-19 Thread Kristopher Micinski
I didn't see the original thread you're responding to, so what's your question?

As in you want your service to stop using resources when the screen is
off, or the opposite.  In one of those situations you can hold a wake
lock to keep the cpu on, but not the screen, I believe.

kris

On Thu, Jan 19, 2012 at 11:18 AM, crennie  wrote:
> I found the same thing. The accelerometer still fires when the screen is off
> but connected to USB and logcat. There might be a work around here
> somewhere. I'm just not savy enough to figure it out. Andyone else care to
> hack 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

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

2012-01-19 Thread chengdong diao
It seams like you encrypted the files as one file .
maybe you can stop  the encryption after one file is encrypted ,and restart
the encryption when the followed  file comes in.

sorry for my poor english .

2012/1/17 chander 

> Hi all,
>
> I am making a File encryption application,i am using AES encryption
> for doing this. In this, i listed all files stored on the SD card and
> then i gave a checkbox infront of files.
>
> 1- User can select multiple files and on clicking ENCRYPT, these files
> will be encrypted in ".enc" format, i am storing files for passing
> into encryption algorithm in an Array List.
>
> 2- But now i am decrypting the files in reverse order, i have to
> decrypt all files which are selected by user from ".enc" extension to
> their orignal extension. how i can move forward to do this, tell me
> the best way for doing decryption here?
>
> i am confused here at this point, how i decrypt to orignal extension.
> Please suggest me the way so that i can move forward.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: Service Being paused on screen off.

2012-01-19 Thread crennie
I found the same thing. The accelerometer still fires when the screen is 
off but connected to USB and logcat. There might be a work around here 
somewhere. I'm just not savy enough to figure it out. Andyone else care to 
hack this?

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

[android-developers] Re: Android Multiline Textbox Inside Flash WebView - Cannot Insert Linebreak with Enter Key

2012-01-19 Thread Elad Nava
Hey,
It's been a week and still haven't found a solution. Bumping this to
see if anyone knows a workaround?

On Jan 14, 5:07 pm, Elad Nava  wrote:
> I am facing a very strange bug with Flash rendering in Android.
>
> **The enter key in the soft keyboard does not insert a line-break into
> the focused textarea in Flash.**
>
> To reproduce: please visit this URL via your android 
> browser:http://tinyurl.com/826nd6a
>
> The original 
> URL:http://www.flashwonderland.com/control-components/textarea.html
>
> That page contains an example of a multi-line textarea in Flash.
>
> Try editing this textarea via Android and inserting a line break.
> Nothing happens when you press the return key in the soft keyboard. :-
> ( This is what I'm trying to solve.
>
> I have tried feeding KeyEvents to the WebView with different keyCodes,
> I tried 13 (ASCII line break), 66 (Android Enter key), nothing
> actually made a line-break appear in the code. When I tried other
> keyCodes (for example, a letter) the letter was appended to the
> textarea as expected. It seems as if the flash object blocks all line-
> breaks.
>
> I even tried feeding a line-break event via jQuery to the flash
> object, but couldn't get it to work.
>
> Does anyone know how to work around this bug?
>
> **Reproduction code:**
>
>     public void onCreate(Bundle savedInstanceState)
>     {
>         super.onCreate(savedInstanceState);
>         requestWindowFeature(Window.FEATURE_NO_TITLE);
>
>         TestView = new WebView( this );
>
>         TestView.getSettings().setPluginsEnabled(true);
>         TestView.getSettings().setJavaScriptEnabled(true);
>
>         setContentView( TestView );
>
>         TestView.loadUrl( "http://www.flashwonderland.com/control-
> components/textarea.html" );
>     }

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

2012-01-19 Thread crennie
I found that if I'm connected with USB and watching Logcat my accelerometer 
sensor is still firing even when the screen is off. When I run the same 
program with out the USB connected the sensor stop a few seconds after the 
screen goes dark. I wonder if there is a work around here waiting to be 
found. Can you fool the phone into thinking it is connected to USB? 

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

2012-01-19 Thread skipjack
Hi guys,

I am new to the android programming. I installed the adt plugin in
Spring Source Tool Suite, but I am unable to fetch the updates when I
start sdk manager.exe . At the time I installed the ADT plugin, I was
using a proxy address. But now I am using .pac file for the proxy
settings. Is there any way to fetch the updates by specifying
this .pac file anywhere in the IDE or sdk manager . Please help to
resolve this issue. I've been stuck in this stage for more than 3
days.

--skipjack--

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


[android-developers] neiboringcellinfo SAMSUNG Galaxy GT-S5830

2012-01-19 Thread Asad
hi,
can any one let me know,  does SAMSUNG Galaxy GT-S5830, support to
work with"neiboringcellinfo" or not?
when I am trying to work with it, its just crashing the code :(
can you please help me on it? or I should use any other emulator to
work with it? which emulator is that?
otherwise should I have to buy a new phone to work with
neiboringcellinfo ? which mobile will bw good for it?
thnx !

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

2012-01-19 Thread Brian Dols

before you call chrono.start(), try adding a tick listener:
chrono.setOnChronometerTickListener(new 
OnChronometerTickListener()
{

@Override
public void onChronometerTick(Chronometer 
chronometer) {
long elapsedTime = 
(System.currentTimeMillis() -
chronometer.getBase()) / 1000;
String currentTime = 
Utils.verboseTime(elapsedTime);
chronometer.setText(currentTime);
}
});

On Jan 18, 4:55 am, rachana govilkar 
wrote:
> Hello All,
>
> Using MediaRecorder I could capture Video.But I want to show timer to
> the user exactly same as it shown in
> built-in Camera app.
> So i implemented Chronometer logic
>
> private Chronometer chrono;
> chrono = (Chronometer)findViewById(R.id.chronometer1);
> chrono.setBase(SystemClock.elapsedRealtime());
> chrono.start();
>
> but no luck.
>
> Can anybody help me on this issue??

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


[android-developers] Share file or an variable between 2 apps

2012-01-19 Thread chihwah li


Hello all,

Been searching about the following subject but did not find anything
usefull. Hopefully there is someone who knows the answer to my
question (my school assignment:

"Share a file or variable between 2 apps using the same UID"

I read a lot of controdicting posts on the internet, and that it's not
supposed to be used by "normal" developers. I want to write data on
app 1 and read it from app 2, just by using sharedUserID and direct
access to the variable or file.

I need to have proof for my school assignment that the same UID  in
both Android apps can let them communicate.

Will someone who is not "normal" (aka "Android super expert") and
knows the secrets of UID, please tell me how Been searching for
long...

Big thanks in advance =)

Chihwah Li

PS: my only demo apps is: 2 apps with the same package name then
access the file from 2nd app. But this demo is useless because the 2nd
app is de-installed because it's using the same packet name

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


[android-developers] startActivity crash in Android graph view

2012-01-19 Thread Asad
hi all,

I have a code but it doesn't work ! can you please help me on it? it
will show graph in android field. but startActivity doesn't work !!
can anyone help me please ?

>>>

int DataCnt = 6;
SortedData[][] //This is an 2D array
---
[[FASTWEB-2012, -66, 0], [FASTWEB-1-001CA2B8E818, -85, 0],
[FASTWEB-2012, -66, 5], [FASTWEB-1-001CA2B8E818, -85, 5],
[FASTWEB-2012, -66, 10], [FASTWEB-1-001CA2B8E818, -85, 10]]
TerminalCount[][] This is an 2D array
---
[[FASTWEB-2012, 3], [FASTWEB-1-001CA2B8E818, 3]]


XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer();

switch (TermDimenSnRow) //suppose I have TermDimenSnRow = 2
{
case 1:
break;

case 2:
TimeSeries series2 = new TimeSeries("WiFi 1");
TimeSeries series3 = new TimeSeries("WiFi 2");
for( int i2 = 0; i2 < DataCnt; i2++)
{
if(TerminalCount[0][0].equals(SortedData[i2][0]))
{
int WifiRSSIVal = (Integer.parseInt(String.valueOf(SortedData[i2]
[1])));
int WifiTimeVal = (Integer.parseInt(String.valueOf(SortedData[i2]
[2])));
series2.add(WifiRSSIVal, WifiTimeVal);
}
}
for( int i3 = 0; i3 < DataCnt; i3++)
{
if(TerminalCount[1][0].equals(SortedData[i3][0]))
{
int WifiRSSIVal = (Integer.parseInt(String.valueOf(SortedData[i3]
[1])));
int WifiTimeVal = (Integer.parseInt(String.valueOf(SortedData[i3]
[2])));
series3.add(WifiRSSIVal, WifiTimeVal);
}
}
dataset.addSeries(series2);
XYSeriesRenderer renderer2 = new XYSeriesRenderer();
mRenderer.addSeriesRenderer(renderer2);

dataset.addSeries(series3);
XYSeriesRenderer renderer3 = new XYSeriesRenderer();
mRenderer.addSeriesRenderer(renderer3);
break;
case 3:
break;
-
-
-
-
-


case 10:
break;

Intent intent = ChartFactory.getLineChartIntent(context, dataset,
mRenderer, "Graph 1");
this.startActivity(intent); //I have tried here by this
(startActivity(intent))
<<

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


[android-developers] Augmented Reality

2012-01-19 Thread tofeeq ahmad
I am working on Augmented Reality from last 7 days.I implement AndAR
API library for this purpose.My problem is creating marker.I used some
online marker generator.But all has one limitation that every pattern
should have black border around it otherwise it will not make a
pattern.
This is limitation is barrier for my app.I want to detect Physical
object like real bulb. If i make pattern for bulb by putting it on
black square paper then marker generator generate pattern and AndAR
detect bulb with background black square,But if i remove background
image then it do not able to detect bulb.


My aim to detect physical bulb.And physical bulb does not have any
black border around it.So how to make pattern for physical object and
then detect them

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


[android-developers] Android Custom Streaming Media Player

2012-01-19 Thread Ken
I have an application that streams videos from my server. The files
end in .mp4 and play fine in the default android player. The thing is
I don't get enough out of the ads displayed on the app as the time of
the user spent on my app is very less compared to the time spent while
watching videos. So, I was thinking of integrating my own custom video
player to the app I made and display banner ads in it while the video
is streaming.

How can this be done?

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] Accounts required to publish application on Android Market Place

2012-01-19 Thread Bushra
Hi,

I'm new in this field and need help in the account setup please, I
already search for an answer, but didn't get one, and I didn't take
the risk to register and try (I need to register with the correct
email)

we are going to create a developers account with Android/Google, we
already have Google checkout merchant account and Gmail account, but
they are registered with different email, is it required to have all
accounts with the same email?

Our Google checkout account registered with email : (xxx@company-
name.com)
Gmail Account with email: (company-n...@gmail.com)
we are going to register: (y...@company-name.com) for the Android
account

can we use these 3 account for publishing applications on Android
market?
If there is a complete tutorial (written tutorial or video or
screenshots, anything can help) shows account setup step by step,
please provide me the link.

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] DevicePolicyManager LockNow problem

2012-01-19 Thread ashiq sayyad
I have checked the  lockNow implementation in API demos & tried the
same thing in my app. But I am not able to lock the device(Google
nexus)

Is there any restriction on this API call for thrid party application?
isAdminActive() method is returning me false...

One more doubt,how to implement screen lock functionality for below
2.3 devices as there in no direct APIS  for tat..


Awaiting for help

Thanks & Regards,
Ashiq Sayyad

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

2012-01-19 Thread IndianDragon
How to retain the form data in the webview after the change the
orientation ? I have used onSaveInstanceState() and I have restored
the previous state using restoreState(savedInstanceState). This
successfully restores the previous state before the change in
orientation but it does not restore the data in the text box of the
form in the webview.

What should be done to retain the data in the text box of the forms in
webview after the change in orientation ?

Note: I would not be using android:configChanges="keyboardHidden|
orientation as I need keyboard input for my application after
orientation changes.

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] How to manually dispatch key event for power button in android

2012-01-19 Thread ashiq sayyad
Hi,

I want to dispatch key event for Power button programatically.I tried
following line of code but its not working..

  dispatchKeyEvent(new
KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_POWER));

But this is not working..

Any help on this most welcome..

Thanks & Regards,
Ashiq  Sayyad

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


[android-developers] How to make soft keyboard enter button say “Search” in 3.2?

2012-01-19 Thread Aleksander Kholyavko
I tried to use EditText's attribute android:imeOptions="actionSearch"
combined with android:inputType="text" but have no luck.

Also i tried to set attributes from code:
EditText edt = (EditText) findViewById(R.id.editText1);
edt.setImeOptions(EditorInfo.IME_ACTION_SEARCH);
edt.setInputType(InputType.TYPE_CLASS_TEXT);

Problem present at Motorola Xoom with firmware version 3.2 and at
emulators

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread TreKing
On Thu, Jan 19, 2012 at 2:08 PM, hzakimoto  wrote:

> I also saw a top game on Android Market using music(ending theme)
> from Chrono Trigger.
> It's a zuma-type game sitting on the Top Free page in the Android Market.
>

Which game?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread Kristopher Micinski
> I also saw a top game on Android Market using music(ending theme) from
> Chrono Trigger.
> It's a zuma-type game sitting on the Top Free page in the Android
> Market. So I believe this is doable...?

The answer is probably:

This is technically illegal but this game hasn't been pulled from the
market because the market is very big and nobody has reported a
copyright violation yet, if anybody ever does, then this app will
probably be pulled very quickly.  The market tends to take a hard line
on copyright inquires, and doesn't side with the developer too well,
you can read through this list's archives to find the horror
stories...

kris

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread Christopher Van Kirk

On 1/20/2012 4:08 AM, hzakimoto wrote:

For example, if I remix battle themes from Final Fantasy series and
use it in my game. Will I get into copyright problem?

I'd be more than happy to put some credit text like this in my game:
"Battle theme originally composed by Nobuo Uematsu, remixed by [my
name here]"

I also saw a top game on Android Market using music(ending theme) from
Chrono Trigger.
It's a zuma-type game sitting on the Top Free page in the Android
Market. So I believe this is doable...?

Thanks in advance!


Ask your lawyer.

I bet he'll tell you "No you can't do that"


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


[android-developers] Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-19 Thread hzakimoto
For example, if I remix battle themes from Final Fantasy series and
use it in my game. Will I get into copyright problem?

I'd be more than happy to put some credit text like this in my game:
"Battle theme originally composed by Nobuo Uematsu, remixed by [my
name here]"

I also saw a top game on Android Market using music(ending theme) from
Chrono Trigger.
It's a zuma-type game sitting on the Top Free page in the Android
Market. So I believe this is doable...?

Thanks in advance!

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


[android-developers] Re: content provider

2012-01-19 Thread Ab Caballero
Thanks folks

On Jan 19, 11:06 am, Mark Murphy  wrote:
> On Thu, Jan 19, 2012 at 1:11 PM, Ab Caballero  wrote:
> > there seems to be documentation about using the SyncAdapter for this
> > type of operation but that the implementation requires
> > ContentProviders.
>
> You are welcome to use AbstractThreadedSyncAdapter and kin. They do
> not actually do any syncing. Transport is up to you.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] change fastscroll overlay size

2012-01-19 Thread elliotn
I have a ListView which has fastscrolling enabled with the index to my data 
being between 1 and 4 characters long. Unfortunately, the 4 character index 
text is wider than the fastscroll overlay. 

I'd like to change the width of the fastscoll overlay. I see 
fastscroll_overlay_size defined in dimens.xml and used by 
FastScroller.java, but I don't see something like 
setFastscrollOverlaySize(). 

I don't suppose there is an easy way to change the overlay size 
programmatically that I'm missing? 

Thanks-
Elliot



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

2012-01-19 Thread joebowbeer
Now that Google code search is shut down, how are Android developers
compensating for their loss of queries like the following?

 http://www.google.com/codesearch#/&exact_package=android
 http://www.google.com/codesearch#cZwlSNS7aEw/

The announcement(*) says:

"If ChromiumOS or Android are important to you, reach out to whatever
contacts you have at Google *now* and let them know!"

I am reaching out.


(*) 
https://groups.google.com/group/google-code-search/browse_thread/thread/fa2e2908c47df068

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 developers] bluetooth insecure connection still requests pairing on my ICS

2012-01-19 Thread rapgaroo
I own a Nexus S and it's currently running ICS 4.0.3 (OTA from T-
Mobile). I have my own application which does Bluetooth connection
stuff using Insecure method to ignore the boring pairing process.
After when I updated my Android OS to ICS 4.0.3, my app is requesting
for a pairing with the Bluetooth device even though I'm using
createInsecureRfcommSocketToServiceRecord method. I already changed
API to 4.0.3 for the application but I cannot find any clear answer to
this type of problem.

I observed LogCat and the BondState goes from 10 to 11 when the device
requests for pairing. If I do the pairing for once, it does not ask
for pairing of course but it is not listed under paired device on the
Android system.

Also, in this case, the BondState goes from 10 to 12 when it
successfully connects to the device.

Anyone has advice or idea to this matter?

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


Re: [android-developers] Re: content provider

2012-01-19 Thread Mark Murphy
On Thu, Jan 19, 2012 at 1:11 PM, Ab Caballero  wrote:
> there seems to be documentation about using the SyncAdapter for this
> type of operation but that the implementation requires
> ContentProviders.

You are welcome to use AbstractThreadedSyncAdapter and kin. They do
not actually do any syncing. Transport is up to you.

-- 
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] Re: content provider

2012-01-19 Thread Kristopher Micinski
I think you seem to be misunderstanding the use of content providers in Android.

In Android, there is a heavily sandboxed model.  If you write an app,
there are a variety of ways that you can persist information.
SharedPreferences, files on SD, databases, just to name a few.
However, in theory apps should not be allowed to touch other apps'
data (however you will note this is not the case on either a rooted
device or some situations in which you put files on the SD card,
etc..).  A content provider solves the problem of presenting a common
interface to external apps who might want to interface with your app
to exchange data, it's not intended for interfacing with things like
external web services.  This isn't to say it wouldn't be of utility if
you wanted to exchange data with another app on the device that synced
data with the server, or a number of other uses you might envision in
this scenario.

But in brief, if you want to sync with an external service, you don't
want to be using a content provider, you want to be using some library
which will do communication with the server using whatever protocol
you need (restfully, etc...)

kris

On Thu, Jan 19, 2012 at 1:11 PM, Ab Caballero  wrote:
> Hi, Mark.
>
> there seems to be documentation about using the SyncAdapter for this
> type of operation but that the implementation requires
> ContentProviders. Ideally, my app would be able to sync with the cloud
> on some basis, say hourly, the same way sugarsync does with my phone,
> table and laptop. Am I misunderstanding the role of the SyncAdapter?
>
>
> On Jan 19, 9:56 am, Mark Murphy  wrote:
>> A content provider would have nothing much to do with it.
>>
>> If you wish to upload files, upload them. If you wish to download
>> files, download them. There is nothing in the Android SDK that is a
>> "sync this directory of stuff with this online counterpart". I'm not
>> even aware of a third-party solution for that, though I seem to recall
>> there was some work going on for a git client library.
>>
>> On Thu, Jan 19, 2012 at 12:53 PM, Ab Caballero  wrote:
>> > I have an application that stores files to the SD card of the device.
>> > If I want to sync that data with the google cloud, do i need to write
>> > a content provider, or is there some other way to share the data?
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, 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
>>
>> 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


Re: [android-developers] javax.management

2012-01-19 Thread Kristopher Micinski
On Thu, Jan 19, 2012 at 12:03 PM, TreKing  wrote:
> On Thu, Jan 19, 2012 at 10:54 AM, Jan Burse  wrote:
>>
>> Just noticed that javax.management is not available on Android. Any
>> substitute recommendation?
>
>
> What is "javax.management" and what do you need from it?
>

http://docs.oracle.com/javase/1.5.0/docs/api/javax/management/package-summary.html

But echoing, what do you need from it?  Typically when Android does
not include something, it's because those things don't make sense
w.r.t the Android way of doing things.

kris

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

2012-01-19 Thread Ab Caballero
Hi, Mark.

there seems to be documentation about using the SyncAdapter for this
type of operation but that the implementation requires
ContentProviders. Ideally, my app would be able to sync with the cloud
on some basis, say hourly, the same way sugarsync does with my phone,
table and laptop. Am I misunderstanding the role of the SyncAdapter?


On Jan 19, 9:56 am, Mark Murphy  wrote:
> A content provider would have nothing much to do with it.
>
> If you wish to upload files, upload them. If you wish to download
> files, download them. There is nothing in the Android SDK that is a
> "sync this directory of stuff with this online counterpart". I'm not
> even aware of a third-party solution for that, though I seem to recall
> there was some work going on for a git client library.
>
> On Thu, Jan 19, 2012 at 12:53 PM, Ab Caballero  wrote:
> > I have an application that stores files to the SD card of the device.
> > If I want to sync that data with the google cloud, do i need to write
> > a content provider, or is there some other way to share the data?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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
>
> 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: How can I get a user-defined sysproperty in an Android app?

2012-01-19 Thread petter


On Jan 19, 5:20 pm, Mark Murphy  wrote:
> On Thu, Jan 19, 2012 at 11:14 AM, petter  wrote:
> > How can I get a user-defined sysproperty in an Android app?
>
> There is no such concept in Android.
>
> > In a plain Java app I can do something like:
>
> >    
> >        
> >          
> >        
> >    
>
> > And in main.java I do:
>
> >    String gitSha1 = System.getProperty("git.revision");
>
> > But how can I do this in an Android App?
>
> You don't, because you aren't in control of the VM.
>
> > I can get predefined system
> > properties like "java.specification.vendor" etc. but I don't know how
> > to attach my userdefined sysproperty to the dex generation.
>
> You don't, because "userdefined sysproperty" has nothing to do with
> "dex generation" any more than it does "stock Java VM bytecode

True. I was thinking there was a hook already to generate userdefined
properties, e.g. using a properties file or similar.


> generation". As you note, in standard Java, you are defining system
> properties via command-line arguments -- there are no command-line
> arguments for SDK apps.
>
> > I can also get around this by generating a source file containting the
> > properties, but I was hoping for a more suitable method.
>
> You could generate a resource file containing the properties (e.g., an
> XML resource).
>
> Or, generate an asset file containing the properties.

This is probably the simplest way.

> Or, drop the properties entirely.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] Re: How can I get a user-defined sysproperty in an Android app?

2012-01-19 Thread petter


On Jan 19, 5:19 pm, Nikolay Elenkov  wrote:
> On Fri, Jan 20, 2012 at 1:14 AM, petter  wrote:
> > How can I get a user-defined sysproperty in an Android app?
>
> > In a plain Java app I can do something like:
>
> >    
>
> Looks more like Ant than plain Java...

Correct. Ant building a plain java app.

> > And in main.java I do:
>
> >    String gitSha1 = System.getProperty("git.revision");
>
> > But how can I do this in an Android App? I can get predefined system
> > properties like "java.specification.vendor" etc. but I don't know how
> > to attach my userdefined sysproperty to the dex generation.
>
> Calling System.setProperty() on startup? (the property will only be
> visible to the app process).

I need to pass them from ant to my app somehow. ISeems like file
generation is the best option.

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

2012-01-19 Thread Mark Murphy
A content provider would have nothing much to do with it.

If you wish to upload files, upload them. If you wish to download
files, download them. There is nothing in the Android SDK that is a
"sync this directory of stuff with this online counterpart". I'm not
even aware of a third-party solution for that, though I seem to recall
there was some work going on for a git client library.

On Thu, Jan 19, 2012 at 12:53 PM, Ab Caballero  wrote:
> I have an application that stores files to the SD card of the device.
> If I want to sync that data with the google cloud, do i need to write
> a content provider, or is there some other way to share the data?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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


[android-developers] content provider

2012-01-19 Thread Ab Caballero
I have an application that stores files to the SD card of the device.
If I want to sync that data with the google cloud, do i need to write
a content provider, or is there some other way to share the data?

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

2012-01-19 Thread vishal garg
Hi mark,

I feel I explained things loosely. Let me get into the specifics. I
have an application which does two things - collects GPS data and
sends to server in the backend and on frontend shows a
website(contains my customized maps). I am trying to get things work
simultaneously and it works fine on emulator but when I tested it on
the real device - samsung galaxy ace; the thing worked. Now, here is
the problem - if I analyze the data, though the application started
the GPS location finder but never sent anything to server. The website
loads once partially and then afterwards the whole application is
hung.

I tried to incorporate threading and Asynctask class but no solution -
gave Application Not Responding(ANR) error. Would like if anyone could
refer to similar examples or suggest a solution.

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

//downloading the website
setupWebView();
//getting the GPS coordinates and sending to server
getLocation();
}

private void getLocation() {
LocationManager locationManager =
  (LocationManager)getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_FINE);
String provider = locationManager.getBestProvider(criteria,true);
locationManager.requestLocationUpdates(provider, 1, 0, this);
}

 private void setupWebView(){   
  webView = (WebView) findViewById(R.id.webview);
  webView.setWebViewClient(new HelloWebViewClient());
  webView.getSettings().setJavaScriptEnabled(true);
  webView.loadUrl(MAP_URL);
  }
=
Thanks.

-vishal garg


On Sat, Jan 14, 2012 at 5:25 PM, Mark Murphy  wrote:
> On Sat, Jan 14, 2012 at 1:41 AM, vishal garg  wrote:
>> I have an android app code where
>>
>> 1) 1st process : checks for user location constantly after every t
>> minutes.
>> 2) 2nd process : displays an image on the screen
>
> Why are these two processes? 99.99% of Android applications do not
> need more than one process. There is nothing in this description that
> would justify the cost to the user in CPU, RAM, and battery from your
> decision.
>
>> The processes are independent and but the code gets stuck in the first
>> process as a result of which second process does not load. I am
>> thinking of using threading to resolve but unable to understand/find
>> documentation. Please help.
>
> Please ask specific questions, not just "please help".
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://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

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

2012-01-19 Thread TreKing
On Thu, Jan 19, 2012 at 10:54 AM, Jan Burse  wrote:

> Just noticed that javax.management is not available on Android. Any
> substitute recommendation?
>

What is "javax.management" and what do you need from it?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] javax.management

2012-01-19 Thread Jan Burse

Dear All,

Just noticed that javax.management is not available
on Android. Any substitute recommendation?

Bye

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

2012-01-19 Thread Somasundaram Sekar
Yes there is some thing called Wake Lock which you need to acquire and
release as per your need

On Thu, Jan 19, 2012 at 8:00 PM, TreKing  wrote:

> On Thu, Jan 19, 2012 at 7:47 AM, sktniran wrote:
>
>> my application getting force closed. it says like
>> IllegalStateException. how to solve this probelm?
>>
>
> What's the stack trace?
>
>
>> it is there any way to prevent screen from locking untill complete this
>> download process?
>>
>
> Maybe, but that should not be necessary.
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: TTS not working

2012-01-19 Thread TreKing
Try reading the log cat "Caused By"

On Thu, Jan 19, 2012 at 3:30 AM, Prathamesh  wrote:

> 01-19 14:55:34.037: ERROR/AndroidRuntime(346): Caused
> by: java.lang.RuntimeException: Binary XML file line #13: *You must
> supply a layout_height attribute.*
>

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] How can I get a user-defined sysproperty in an Android app?

2012-01-19 Thread Mark Murphy
On Thu, Jan 19, 2012 at 11:14 AM, petter  wrote:
> How can I get a user-defined sysproperty in an Android app?

There is no such concept in Android.

> In a plain Java app I can do something like:
>
>    
>        
>          
>        
>    
>
> And in main.java I do:
>
>    String gitSha1 = System.getProperty("git.revision");
>
> But how can I do this in an Android App?

You don't, because you aren't in control of the VM.

> I can get predefined system
> properties like "java.specification.vendor" etc. but I don't know how
> to attach my userdefined sysproperty to the dex generation.

You don't, because "userdefined sysproperty" has nothing to do with
"dex generation" any more than it does "stock Java VM bytecode
generation". As you note, in standard Java, you are defining system
properties via command-line arguments -- there are no command-line
arguments for SDK apps.

> I can also get around this by generating a source file containting the
> properties, but I was hoping for a more suitable method.

You could generate a resource file containing the properties (e.g., an
XML resource).

Or, generate an asset file containing the properties.

Or, drop the properties entirely.

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

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

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


Re: [android-developers] How can I get a user-defined sysproperty in an Android app?

2012-01-19 Thread Nikolay Elenkov
On Fri, Jan 20, 2012 at 1:14 AM, petter  wrote:
> How can I get a user-defined sysproperty in an Android app?
>
> In a plain Java app I can do something like:
>
>    

Looks more like Ant than plain Java...

> And in main.java I do:
>
>    String gitSha1 = System.getProperty("git.revision");
>
> But how can I do this in an Android App? I can get predefined system
> properties like "java.specification.vendor" etc. but I don't know how
> to attach my userdefined sysproperty to the dex generation.
>

Calling System.setProperty() on startup? (the property will only be
visible to the app process).

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 can I get a user-defined sysproperty in an Android app?

2012-01-19 Thread petter
How can I get a user-defined sysproperty in an Android app?

In a plain Java app I can do something like:



  



And in main.java I do:

String gitSha1 = System.getProperty("git.revision");

But how can I do this in an Android App? I can get predefined system
properties like "java.specification.vendor" etc. but I don't know how
to attach my userdefined sysproperty to the dex generation.

I can also get around this by generating a source file containting the
properties, but I was hoping for a more suitable method.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: No Video but audio present when using MediaPlayer on the emulator

2012-01-19 Thread rperi...@yahoo.com
Okay I got it done using the DDMS file manager. I have to say your
original thoughts about reasons for the video not playing is
absolutely correct. With your app I can also hear the audio but cannot
see any video. I can also see the all the control buttons and the
progress bar. I do not get the control buttons on my app but in my app
I'm using the MediaPlayer directly - not through MediaController.

I guess I will need to move to using a real device.

On Jan 19, 4:49 am, Mark Murphy  wrote:
> In your AVD Manager, you define how large of a virtual SD card to have
> in the AVD. It's called "SD Card".
>
> You then transfer files to it using the DDMS File Manager, or via the
> adb push command.
>
>
>
>
>
> On Thu, Jan 19, 2012 at 2:54 AM, rperi...@yahoo.com  
> wrote:
> > Okay I'm still stuck trying to figure out how to use the SD card
> > filesystem on the emulator. I followed the instructions in the
> > documentation and created a sd card image using mksdcard. However, I
> > cannot figure out how to push the test.mp4 file on to the image. The
> > documentation mentions mtools but I cannot seem to find a version for
> > Windows - all the downloads seem to be for Unix. Any ideas?
>
> > On Jan 18, 3:57 am, Mark Murphy  wrote:
> >> On Wed, Jan 18, 2012 at 2:45 AM, rperi...@yahoo.com  
> >> wrote:
> >> > Thanks again for the reply. I actually subscribed to your books - they
> >> > are well written.
>
> >> Thanks!
>
> >> > I downloaded the video sample and tried to run it
> >> > but the screen remains blank. However I suspect it is becuase it
> >> > cannot find the file. It seems like it is designed run the file
> >> > "test.mp4" on an SD card on a real device.
>
> >> Or a test.mp4 file on the emulated SD card on an emulator. It still
> >> will not play well in an emulator, but the lack of the MP4 file will
> >> not stop you.
>
> >> > Can I make the sample work on the emulator.
>
> >> Yes. Put a file named test.mp4 in the emulated SD card on the
> >> emulator. The specific MP4 file I used in those screenshots is the
> >> "Documentaries and You" video from here:
>
> >>http://www.law.duke.edu/cspd/contest/finalists/
>
> >> --
> >> Mark Murphy (a Commons 
> >> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> >> _The Busy Coder's Guide to Android Development_ Version 3.7 Available!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!- 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


Re: [android-developers] Re: App installs on emulator but not on device

2012-01-19 Thread J Handal
[?]

Hi Madlymad,

Please can you explained more in detail,Are you meaning "unknown Sources"?
[?]
You could also change the device settings to accept all application
even the developer signed files!

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

Re: [android-developers] How to Increase frame rate (fps) from onPreviewFrame??

2012-01-19 Thread TreKing
On Thu, Jan 19, 2012 at 8:55 AM, Muhammad UMER
wrote:

> I am really sorry, but i need it and i not get the appropriate answer.


Well, sorry, but if no one has presented an appropriate answer at this
point, than continuing to post the same question over and over is not
likely to change things.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: App installs on emulator but not on device

2012-01-19 Thread J Handal
On Thu, Jan 19, 2012 at 9:31 AM, J Handal  wrote:

> [?]
>
> Hi Madlymad,
>
> Please can you explained more in detail,Are you meaning "unknown Sources"?
> [?]
>  You could also change the device settings to accept all application
> even the developer signed files!
>
>

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

Re: [android-developers] Re: How to implement scrolling for custom layout?

2012-01-19 Thread Kostya Vasilyev
Have you looked at AbsListView.OnScrollListener?

http://developer.android.com/reference/android/widget/AbsListView.html#setOnScrollListener(android.widget.AbsListView.OnScrollListener)

As for breakpoints, perhaps the framework sources you use for debugging are
not quite the same as used by the device.

-- Kostya

19 января 2012 г. 17:49 пользователь harvinder  написал:

> I have looked into the listview and abslistview classes of android.
>
> Scrolling in not initiating a call on onMeasure or onLayout, but only
> invalidate.
> For some reason I am not been able to debug these classes (can put
> breakpoint only in abslistview but not listview).
>
> Where does children laid out when scrolling starts (layoutChildren is not
> getting called by a call to invalidate)?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Is possible use AlarmManager to schedule run a Service

2012-01-19 Thread Johan Appelgren
Because all pending alarms for an app are removed when it is killed (force 
closed). So don't kill your app. 

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

[android-developers] Is possible use AlarmManager to schedule run a Service

2012-01-19 Thread Tomas Prochazka
I use this code to to schedule run Service.

AlarmManager alarmManager = (AlarmManager) 
getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(this, MyService.class);
PendingIntent pintent = PendingIntent.getService(this, 0, i, 
PendingIntent.FLAG_UPDATE_CURRENT);
alarmManager.set(AlarmManager.ELAPSED_REALTIME, 
SystemClock.elapsedRealtime() + RECHECK_INTERVAL, pintent);

It works. But when I kill the app in task manager. Alarm doesn't run it 
again.
Why? Where is problem?

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

RE: [android-developers] How to Increase frame rate (fps) from onPreviewFrame??

2012-01-19 Thread Muhammad UMER

I am really sorry, but i need it and i not get the appropriate answer. Sorry 
again.

From: treking...@gmail.com
Date: Thu, 19 Jan 2012 08:49:50 -0600
Subject: Re: [android-developers] How to Increase frame rate (fps) from 
onPreviewFrame??
To: android-developers@googlegroups.com

Could you do this group a favor and stop asking the same question every 2 days? 
Hmmm? Thanks.
https://groups.google.com/groups/profile?show=more&enc_user=lar4IxsAAADNYP7nVARJZ-sgplZcu2aEW0rZFdfcaar5x5y0kptMbA&group=android-developers
 



-
TreKing - Chicago transit tracking app for Android-powered devices








-- 

You received this message because you are subscribed to the Google

Groups "Android Developers" group.

To post to this group, send email to android-developers@googlegroups.com

To unsubscribe from this group, send email to

android-developers+unsubscr...@googlegroups.com

For more options, visit this group at

http://groups.google.com/group/android-developers?hl=en 
  

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

  1   2   >