[android-developers] Multiple image on single image.

2011-07-01 Thread Satya
I want to create a bitmap / image which has many images like
"Collage" which has more then one images in a single picture.
I have overlay all my images in a view but now i want to create a
single image from all those images. And even i implement image move
but can't implement rotation and re-size image.
so what can be the way to do this ? any sort of help / example
will be helpful.




Thanks
Satya

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


[android-developers] WindowBackground attribute for Fragments

2013-01-24 Thread satya
Hi.. 

Iam trying give custom theme to fragments, 
Actually in case of activity --  we have "android:windowBackground" is 
there..
but i need to apply for this attribute to fragments..(diff backgrounds for 
two fragments in one activity)

can u give the solution for this..

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] Highlight Text in Webview

2012-03-26 Thread Satya
Hi All,

I need to highlight the text in webview can any one give me the
solution.

Thanks
Satya

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

2012-03-26 Thread Satya


Guys please respond need help...
Thanx

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


[android-developers] Selection and Highlight text in Webview

2012-04-01 Thread Satya
Hi All,

I need to select and highlight text in webview.
I already used clipboard manager and javascript solutions but i need
to select any paragraph and highlight it permanently can any one help
me for this..

Thanks
Satya

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

2012-04-05 Thread Satya
Hi All,

Can any one knows how could this possible?
Please help me.

Thanks
Satya

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


[android-developers] Alarm list

2011-07-12 Thread Satya
Can any one tell me how to get all previously set alarm list.



Thanks
Satya

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

2011-07-13 Thread Satya
thanks for replying
yes am referring to AlarmManager is there any way where i can stored
this in my app?

On Jul 13, 10:03 am, TreKing  wrote:
> On Tue, Jul 12, 2011 at 10:51 PM, Satya  wrote:
> > Can any one tell me how to get all previously set alarm list.
>
> If you're referring to the alarms set by AlarmManager, you can't, AFAIK.
>
> --- 
> --
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] purpose of R.java file

2011-08-04 Thread satya
h
Iam interested to know what is the purpose of R.java file.How
the id's are created.why the id's are created and what is the use of
generating the id's.

 plz send the reply..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] purpose of R.java file

2011-08-04 Thread satya
h
Iam interested to know what is the purpose of R.java file.How
the id's are created.why the id's are created and what is the use of
generating the id's.

 plz send the reply..thanks

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


[android-developers] Re: DOM problem!!! getNodeValue() doesn't work!!

2009-01-12 Thread satya

PL first check if the node has child nodes. if it has child nodes then
we can't get the nodeValue. In that case we can only get the list of
child elements.

If the node is a text node then only we can get its value.Then we have
to add a check for a text node then get the value.
You can use the check like if (node==Node.TextNode) then statements;
Please note that text nodes are created using statements like var
theText4 = document.createTextNode(' in your document');
Pl try this and let me know.
If problem is not resolved then send me source code and the line
giving the problem.

On Jan 12, 1:37 am, Cattivik  wrote:
> I have a big problem!!
> I want to get e value of dom document Node with getNodeValue() but it
> does't work.
>
> Example:
> Node node = childs.item(i);
> String value = node.getNodeValue()
>
> Please HELP!!!
> It is urgent

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

2010-12-16 Thread Satya
Hi,
Does the Voice search application requires  the Mobile to use WIFI
only.
We dont have WIFI or GPRS connection. Our hardware is a development
board which currently uses ethernet.
When we run the 'VOICE search' application we get the following
connection.

I/ActivityManager(  966): Starting activity: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] }
D/GoogleLoginService( 1102): onBind: Intent
{ act=android.accounts.AccountAuthenticator
cmp=com.google.android.gsf/.loginser}
W/GoogleLoginService( 1102): Device has no accounts: sending Intent
{ act=com.google.android.gsf.LOGIN_ACCOUNTS_MISSING }
I/RecognitionController( 1191):
startRecognition(#Intent;action=android.intent.action.MAIN;category=android.intent.category.)
I/RecognitionController( 1191): State change: STARTING -> STARTING
E/RecognitionController( 1191): No active network found
E/RecognitionController( 1191): ERROR_NETWORK

Does any one have ever faced this issue.

Thanks and Regards,
KSP




On Dec 2, 9:02 pm, Satya  wrote:
> Hi,
>
> I am new to Audio module and new to Android.
> I am getting the following error when I start "Voice Search"
> application.
>
> #
> W/InputManagerService(  965): Window already focused, ignoring focus
> gain of: com.android.internal.view.IInputMethodClient$S8
> D/dalvikvm( 1196): GC_EXPLICIT freed 1145 objects / 53992 bytes in
> 80ms
> I/ActivityManager(  965): Starting activity: Intent
> { act=android.intent.action.MAIN
> cat=[android.intent.category.LAUNCHER] }
> I/ActivityManager(  965): Displayed activity
> com.google.android.voicesearch/.RecognitionActivity: 539 ms (total 539
> ms)
> I/AudioService(  965):  AudioFocus  requestAudioFocus() from
> android.media.audiomana...@43f1eb48
> I/MicrophoneInputStream( 1196): Starting voice recognition with audio
> source VOICE_RECOGNITION
> W/AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
> 16000
> D/ALSAModule(  919): open called for devices 0004 in mode 0...
> E/ALSALib (  919): external/alsa-lib/src/pcm/pcm.c:2210:
> (snd_pcm_open_noupdate) Unknown PCM AndroidCapture
> I/ALSAModule(  919): Initialized ALSA CAPTURE device default
> D/AcousticsModule(  919): Acoustics set_params stub called with 0.
> W/AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
> 16000
> E/AudioRecord( 1196): Recording parameters are not supported:
> sampleRate 16000, channelCount 1, format 1
> E/AudioRecord-JNI( 1196): Error creating AudioRecord instance:
> initialization check failed.
> E/AudioRecord-Java( 1196): [ android.media.AudioRecord ] Error code
> -20 when initializing native AudioRecord object.
> W/GoogleRecognitionService( 1196): Audio problem
> W/GoogleRecognitionService( 1196): java.lang.IllegalStateException:
> not open
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.endpointer.MicrophoneInputStream.(Microphone)
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService.setupMicrophoneInputStrea)
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService.setupMicrophone(GoogleRec)
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService.startRecognitionInternal()
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService.access
> $000(GoogleRecognit)
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService
> $1.handleMessage(GoogleRec)
> W/GoogleRecognitionService( 1196):      at
> android.os.Handler.dispatchMessage(Handler.java:99)
> W/GoogleRecognitionService( 1196):      at
> android.os.Looper.loop(Looper.java:123)
> W/GoogleRecognitionService( 1196):      at
> android.os.HandlerThread.run(HandlerThread.java:60)
> W/AudioPolicyManagerBase(  919): getOutput() could not find output for
> stream 3, samplingRate 0, format 0, channels c, flags0
> E/MediaPlayer( 1196): error (-19, 0)
> E/MediaPlayer( 1196): Error (-19,0)
> D/dalvikvm( 1040): GC_EXPLICIT freed 1822 objects / 107272 bytes in
> 89ms
> #
>
> As per my understanding, the sample rate that the Voicesearch
> Application is trying to set is not being supported by the
> AudioHardwareInterface module:
>
> AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
> 16000
>
> Even in the code the function(in AudioHardwareInterface.cpp) is
> returning error if the sample rate any other value other than 8000:
>
> ##
> size_t AudioHardwareBase::getInputBufferSize(uint32_t sampleRate, int
> format, int channelCount)
> {
>     i

[android-developers] Re: Voice search/Record Error

2011-01-03 Thread Satya
Hi,

My issue is resolved. I thought it may be helpful for others. So
posting the solution for the issue I was facing.

For the samplerate problem, we commented the code in frameworks/base/
libs/audioflinger/AudioHardwareInterface.cpp in

size_t AudioHardwareBase::getInputBufferSize(uint32_t sampleRate, int
format, int channelCount) function

 /* if (sampleRate != 8000) {
LOGW("getInputBufferSize bad sampling rate: %d", sampleRate);
return 0;
}*/

Incase you don't have voicesearch.apk in your hardware you can get it
from net. I got it from this link http://www.chadhaney.com/droidXDefault/

You should also have GoogleServicesFramework.apk. you can download
from the above link

Also you need to download libspeech.so. You can get it in net.

Initially we were getting 'Connection problem'  when we ran the
application. Even though we are connected to the network (using
ethernet).

Since Androidframework didnt have support for ethernet in the
connectivity framework, application is not able to connect to
internet.

So to add ethernet support we took the patches from following links:

https://review.source.android.com/#dashboard,1001873
https://review.source.android.com/#dashboard,1001874

If you have wifi or data connection you need not use the above
patches.


Thanks and Regards,
ksp

On Dec 2 2010, 9:02 pm, Satya  wrote:
> Hi,
>
> I am new to Audio module and new to Android.
> I am getting the following error when I start "Voice Search"
> application.
>
> #
> W/InputManagerService(  965): Window already focused, ignoring focus
> gain of: com.android.internal.view.IInputMethodClient$S8
> D/dalvikvm( 1196): GC_EXPLICIT freed 1145 objects / 53992 bytes in
> 80ms
> I/ActivityManager(  965): Starting activity: Intent
> { act=android.intent.action.MAIN
> cat=[android.intent.category.LAUNCHER] }
> I/ActivityManager(  965): Displayed activity
> com.google.android.voicesearch/.RecognitionActivity: 539 ms (total 539
> ms)
> I/AudioService(  965):  AudioFocus  requestAudioFocus() from
> android.media.audiomana...@43f1eb48
> I/MicrophoneInputStream( 1196): Starting voice recognition with audio
> source VOICE_RECOGNITION
> W/AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
> 16000
> D/ALSAModule(  919): open called for devices 0004 in mode 0...
> E/ALSALib (  919): external/alsa-lib/src/pcm/pcm.c:2210:
> (snd_pcm_open_noupdate) Unknown PCM AndroidCapture
> I/ALSAModule(  919): Initialized ALSA CAPTURE device default
> D/AcousticsModule(  919): Acoustics set_params stub called with 0.
> W/AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
> 16000
> E/AudioRecord( 1196): Recording parameters are not supported:
> sampleRate 16000, channelCount 1, format 1
> E/AudioRecord-JNI( 1196): Error creating AudioRecord instance:
> initialization check failed.
> E/AudioRecord-Java( 1196): [ android.media.AudioRecord ] Error code
> -20 when initializing native AudioRecord object.
> W/GoogleRecognitionService( 1196): Audio problem
> W/GoogleRecognitionService( 1196): java.lang.IllegalStateException:
> not open
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.endpointer.MicrophoneInputStream.(Micr­ophone)
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService.setupMicrophoneInpu­tStrea)
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService.setupMicrophone(Goo­gleRec)
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService.startRecognitionInt­ernal()
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService.access
> $000(GoogleRecognit)
> W/GoogleRecognitionService( 1196):      at
> com.google.android.voicesearch.GoogleRecognitionService
> $1.handleMessage(GoogleRec)
> W/GoogleRecognitionService( 1196):      at
> android.os.Handler.dispatchMessage(Handler.java:99)
> W/GoogleRecognitionService( 1196):      at
> android.os.Looper.loop(Looper.java:123)
> W/GoogleRecognitionService( 1196):      at
> android.os.HandlerThread.run(HandlerThread.java:60)
> W/AudioPolicyManagerBase(  919): getOutput() could not find output for
> stream 3, samplingRate 0, format 0, channels c, flags0
> E/MediaPlayer( 1196): error (-19, 0)
> E/MediaPlayer( 1196): Error (-19,0)
> D/dalvikvm( 1040): GC_EXPLICIT freed 1822 objects / 107272 bytes in
> 89ms
> #
>
> As per my understanding, the sample rate that the Voicesearch
> Application is trying to set is not being supported by the
> AudioHardwareInterface module:
>
> AudioHardwareInterface(  919): getInputBufferSize bad 

[android-developers] Query on Customs Map application

2010-11-17 Thread Satya
Hi,

We have developed a custom Maps application based on froyo 2.2 which
works fine on emulator.
But the same application fails at the installation stage itself on the
target(ARM based hardware).
(Getting " Package com.androidbook requires unavailable shared library
com.google.android.maps; failing!")
We need some clarification regarding the same.

1. If we pull Google MAPS application from an Android phone say Nexus
One and use the same on our target will the map application work?

2. How and where do we get "com.google.android.maps" package?

Thanks in advance.

Regards,
Satya

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

2010-11-22 Thread Satya
Hi trek,

Thanks for your response.
WRT the second point. If at all some application developer develops a
custom Maps application then how can he put that on to the target
because all custom Maps applications needs to include
"com.google.android.maps" in the respective Manifest files. By default
you wont get this library when downloaded from the net (Say Froyo
2.2).
So my undersatnding is we have to get intouch with Google to get these
additional packages.  Let me know  your thouts on this.

Thanks and Regards,
Satya



On Nov 20, 1:54 am, TreKing  wrote:
> On Mon, Nov 15, 2010 at 12:49 AM, Satya  wrote:
> > 1. If we pull Google MAPS application from an Android phone say Nexus One
> > and use the same on our target will the map application work?
>
> No. The Google Maps API Add-On (the library you have to link against) !=
> Google Maps App (a stand-alone application that may use said add-on).
>
> > 2. How and where do we get "com.google.android.maps" package?
>
> You don't, AFAIK. It comes pre-installed on some devices. I have no idea
> what goes into getting it installed on some devices.
>
> ---­--
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Voice search/Record Error

2010-12-02 Thread Satya
Hi,

I am new to Audio module and new to Android.
I am getting the following error when I start "Voice Search"
application.

#
W/InputManagerService(  965): Window already focused, ignoring focus
gain of: com.android.internal.view.IInputMethodClient$S8
D/dalvikvm( 1196): GC_EXPLICIT freed 1145 objects / 53992 bytes in
80ms
I/ActivityManager(  965): Starting activity: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] }
I/ActivityManager(  965): Displayed activity
com.google.android.voicesearch/.RecognitionActivity: 539 ms (total 539
ms)
I/AudioService(  965):  AudioFocus  requestAudioFocus() from
android.media.audiomana...@43f1eb48
I/MicrophoneInputStream( 1196): Starting voice recognition with audio
source VOICE_RECOGNITION
W/AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
16000
D/ALSAModule(  919): open called for devices 0004 in mode 0...
E/ALSALib (  919): external/alsa-lib/src/pcm/pcm.c:2210:
(snd_pcm_open_noupdate) Unknown PCM AndroidCapture
I/ALSAModule(  919): Initialized ALSA CAPTURE device default
D/AcousticsModule(  919): Acoustics set_params stub called with 0.
W/AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
16000
E/AudioRecord( 1196): Recording parameters are not supported:
sampleRate 16000, channelCount 1, format 1
E/AudioRecord-JNI( 1196): Error creating AudioRecord instance:
initialization check failed.
E/AudioRecord-Java( 1196): [ android.media.AudioRecord ] Error code
-20 when initializing native AudioRecord object.
W/GoogleRecognitionService( 1196): Audio problem
W/GoogleRecognitionService( 1196): java.lang.IllegalStateException:
not open
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.endpointer.MicrophoneInputStream.(Microphone)
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService.setupMicrophoneInputStrea)
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService.setupMicrophone(GoogleRec)
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService.startRecognitionInternal()
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService.access
$000(GoogleRecognit)
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService
$1.handleMessage(GoogleRec)
W/GoogleRecognitionService( 1196):  at
android.os.Handler.dispatchMessage(Handler.java:99)
W/GoogleRecognitionService( 1196):  at
android.os.Looper.loop(Looper.java:123)
W/GoogleRecognitionService( 1196):  at
android.os.HandlerThread.run(HandlerThread.java:60)
W/AudioPolicyManagerBase(  919): getOutput() could not find output for
stream 3, samplingRate 0, format 0, channels c, flags0
E/MediaPlayer( 1196): error (-19, 0)
E/MediaPlayer( 1196): Error (-19,0)
D/dalvikvm( 1040): GC_EXPLICIT freed 1822 objects / 107272 bytes in
89ms
#

As per my understanding, the sample rate that the Voicesearch
Application is trying to set is not being supported by the
AudioHardwareInterface module:

AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
16000

Even in the code the function(in AudioHardwareInterface.cpp) is
returning error if the sample rate any other value other than 8000:


##
size_t AudioHardwareBase::getInputBufferSize(uint32_t sampleRate, int
format, int channelCount)
{
if (sampleRate != 8000) {
LOGW("getInputBufferSize bad sampling rate: %d", sampleRate);
return 0;
}
if (format != AudioSystem::PCM_16_BIT) {
LOGW("getInputBufferSize bad format: %d", format);
return 0;
}
if (channelCount != 1) {
LOGW("getInputBufferSize bad channel count: %d",
channelCount);
return 0;
}

return 320;
}



Not able to understand why this restriction on SampleRate/channelCount
is there in the hardware Interface layer
Are we expected to change this code to suit our hardwares.Can some one
help me in resolving this error.

Thanks in Advance.

Regards,
Satya

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


[android-developers] Where is android.provider.Gmail

2010-06-29 Thread Satya
I have installed Android SDK 2.2, Tools, API, Samples, Documentation,
Google APIs, USB driver package using the eclipse plug-in.

While developing a sample application, I wanted to access
android.provider.Gmail but cannot find it in classpath.

Where can I find these classes related to standard android
applications like Gmail, Calendar etc..?

I am trying to find the below classes..
android.provider.Calendar
android.provider.Alarms
android.provider.Gmail

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] Informational: are there any charting packages for Android

2010-03-24 Thread Satya Komatineni
A few folks have asked me this question. Here is a link to the
research I have started on this subject

http://www.androidbook.com/akc/display?url=DisplayNoteIMPURL&ownerUserId=android&reportId=3465

Here is a brief summary


JQuery based flot
http://code.google.com/p/flot/

Chart Droid
http://code.google.com/p/chartdroid/

AChartEngine
http://www.achartengine.org/index.html

Chart from J4L
http://www.java4less.com/charts/chart.php?info=android

Android Chart from keepedge.com
http://www.keepedge.com/products/android_charting

http://code.google.com/p/charts4j/
Charts4J

http://code.google.com/apis/charttools/index.html
Google Charts API

Thanks
Satya Komatineni
(http://www.androidbook.com)
(http://www.satyakomatineni.com)

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Is there a way to navigate android SDK documentation online for multiple releases??

2009-04-18 Thread Satya Komatineni

Going forward will Android maintain the sites for multiple SDKs that
might be in use.

For example at this very moment there may development teams that are
working on 1.0, 1.1 and possibly 1.5.

If the main site carries documentation only for 1.1 (current release)
will Android make an effort to make the documentation available online
for both 1.1 and 1.5 simultaneously when 1.5 is released?

Or the online docs only reflect the current release?

Appreciate your response
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 there a way to drop a collection of apps into a folder on the homepage programmatically?

2009-04-21 Thread Satya Komatineni

If I want to take 3 apps that I write and target them for a folder
called "my corporation" folder is there a way to do this
programmatically?  Will live folders help here in such a case?

Thanks
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 do live folders register for change in content?

2009-04-22 Thread Satya Komatineni

If I create a content provider to service a live folder, and if this
content provider is just a wrapper aggregating other content
providers, how does the live folder know if the real content has
changed somewhere down the line.

For example, I have a live folder that has items pointing to video,
audio, and notes. Each item in the cursor (such as an aggregated
matrix cursor) may be pointing to a different underlying content
provider. But each item will have its own uri.

Does the live folder view register for content changes for each uri?
Or is it the responsibility of the wrapper content provider to
register for content changes and then notify its client the live
folder?

Appreciate your help
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 does "requery" know what the original where clause is that returned the cursor?

2009-04-22 Thread Satya Komatineni

I know that in a content provider "query" method one can indicate to
the cursor a "notify uri". The cursor knows what this uri is. Does the
cursor uses this uri to update itself? Does it result in a call to
"query" method of the contentprovider for a query. How does the cursor
know what the additional where clause arguments are?

thanks for help
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 "requery" know what the original where clause is that returned the cursor?

2009-04-22 Thread Satya Komatineni

Looks like it is the responsibility of the cursor to do this and
remember the where clauses. So it won't go back to the content
provider for retrieving data.

That makes me wonder what happens to such things as MatrixCursor that
doesn't seem to have a specific "requery" semantics.

On Wed, Apr 22, 2009 at 3:20 PM, Satya Komatineni
 wrote:
> I know that in a content provider "query" method one can indicate to
> the cursor a "notify uri". The cursor knows what this uri is. Does the
> cursor uses this uri to update itself? Does it result in a call to
> "query" method of the contentprovider for a query. How does the cursor
> know what the additional where clause arguments are?
>
> thanks for help
> Satya
>

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



[android-developers] Re: How do live folders register for change in content?

2009-04-22 Thread Satya Komatineni

Dianne,
thanks for the reply.

In that case the updates to the view will rely on the "requery" method
of the cursor that is used. This will work for an SQLLiteCursor
because its "requery" method goes back to the data source to retrieve
the rows.

But if I were to use something like "MatrixCursor" which doesn't have
a specific "requery" mechanism, I will have to build that refresh
logic in  a derived cursor class. Is this interpretation right?

Satya

On Wed, Apr 22, 2009 at 3:55 PM, Dianne Hackborn  wrote:
> Is the same thing as anything else showing a cursor -- it looks for data
> change callbacks that are generated by the content provider when its data
> changes.
>
> On Wed, Apr 22, 2009 at 8:21 AM, Satya Komatineni
>  wrote:
>>
>> If I create a content provider to service a live folder, and if this
>> content provider is just a wrapper aggregating other content
>> providers, how does the live folder know if the real content has
>> changed somewhere down the line.
>>
>> For example, I have a live folder that has items pointing to video,
>> audio, and notes. Each item in the cursor (such as an aggregated
>> matrix cursor) may be pointing to a different underlying content
>> provider. But each item will have its own uri.
>>
>> Does the live folder view register for content changes for each uri?
>> Or is it the responsibility of the wrapper content provider to
>> register for content changes and then notify its client the live
>> folder?
>>
>> Appreciate your help
>> Satya
>>
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> >
>

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



[android-developers] Re: How do live folders register for change in content?

2009-04-22 Thread Satya Komatineni

Dianne, Mark,
Thank you both for looking into this
Satya

On Wed, Apr 22, 2009 at 7:50 PM, Mark Murphy  wrote:
>
>>     But if I were to use something like "MatrixCursor" which doesn't have
>>     a specific "requery" mechanism, I will have to build that refresh
>>     logic in  a derived cursor class. Is this interpretation right?
>
> Yes that interpretation should be correct.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
> >
>

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



[android-developers] Here is some sample code for a live folder example

2009-04-24 Thread Satya Komatineni

http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3014&ownerUserId=satya

If you see any errors or discrepancies, I will appreciate it if you let me know

Thanks
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: "R cannot be resolved" after updating to 1.5 SDK Pre, and trying to compile for 1.1

2009-04-27 Thread Satya Komatineni

considering that R.java is a generated file, try deleting it and see
if the environment rebuilds according to your preference.


On Mon, Apr 27, 2009 at 8:57 AM, hc  wrote:
>
> I updated to 1.5 SDK pre, together with the ADT. I followed the
> instruction to select Android 1.5 as target by right clicking on the
> project, Preferences>Android. In this window there are 3 options,
> Android 1.1
> Android 1.5
> Google APIs
>
> I selected Android 1.5 and Apply, clicked OK. Application compiled
> nicely.
>
> If I go back to the same Preferences and select Android 1.1, Apply, I
> can no longer compile my application successfully.
> I get hundreds of the same error
> R cannot be resolved
>
> Then I try to open this project in another computer that I have not
> updated the SDK yet. I get the same error. Can anyone help to solve
> this? I'm trapped until the new SDK is out.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml

2009-11-16 Thread Satya Komatineni
On windows/XP I couldn't make this work directly from the AVD manager by itself.

I had to do it through the Eclipse plugin for ADT (which in turn can
invoke the AVD manager internally in eclipse)

Must be something to do with jdk version or the java version when run
outside(I am thinking)

Here are few more notes if you are trying this on windows:

http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3001&ownerUserId=satya

Satya

On Mon, Nov 16, 2009 at 6:24 AM, JuanEG  wrote:
> Hi, I had the same problem in Ubuntu 9.10 and solved it thanks to
> StLin comment.
> Cheers.
> Juan
>
> On 1 nov, 03:48, MobileDev  wrote:
>> I too am running running on Ubuntu version 9.10 as well.
>>
>> Adding sdkman.force.http=true to ~/.android/androidtool.cfg allowed me
>> to retrieve the Sites, Packages, and Archives via the Android SDK and
>> AVD Manager.
>>
>> However, nothing happens when I select one of the and click "Install
>> Selected" (button), nothing happens, when I select one of the items
>> from the list to install by clicking on "install selected".
>>
>> Any help will be greatly appreciated.
>>
>> On Oct 30, 10:13 am, Hans  wrote:
>>
>> > Adding sdkman.force.http=true to ~/.android/androidtool.cfg allowed me
>> > to retrieve the Sites, Packages, and Archives via the Android SDK and
>> > AVD Manager.
>>
>> > However, when I select, for example, "SDK Platform Android 2.0, API 5,
>> > revision 1", and click "Install Selected" (button), nothing happens.
>>
>> > I am running on Ubuntu version 9.10 x64 (released version).  The
>> > machine has 4GB RAM.  JDK 6-15-1, via the Synaptic Package Manager, is
>> > installed (along with the dependencies).
>>
>> > On Oct 29, 1:24 pm, Xavier Ducrohet  wrote:
>>
>> > > On Wed, Oct 28, 2009 at 9:23 PM, orange80  wrote:
>>
>> > > > We already know about that... our problem is that the "force http"
>> > > > workaround DOES NOT work for us either.
>>
>> > > which, frankly, is mind boggling.
>> > > Can you give me the exact output of the status window in the SDK
>> > > Manager when you try to update from the repository?
>>
>> > > Also, can you tell me which JDK you are using, OS config, etc..
>>
>> > > thanks!
>> > > Xav
>>
>> > > --
>> > > Xavier Ducrohet
>> > > Android SDK Tech Lead
>> > > Google Inc.
>>
>> > > Please do not send me questions directly. Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2009-11-16 Thread Satya Komatineni
Hopefully you have figured out what the problem is.

I can't say I fully understand it.

But one thing is sure with "onNewIntent()". I have looked at it when I
was configuring an activity on behalf of "search" functionality.

This method is invoked ONLY IF this activity is on top of the visible
stack. That means if you are navigating somewhere else to invoke your
icons, and if this activity is not on top because of that, then the
"onNewIntent()" is not invoked.

Typically if this activity is to invoke itself for whatever reason, or
a service is to invoke it while it is on top then you will see the
"onNewIntent()".

Hope this is useful

Satya
(http://www.satyakomatineni.com)

On Sat, Nov 14, 2009 at 6:58 AM, João Sauer  wrote:
> Hi,
>
> What I'm trying to do was supposed to be very simple, but is not
> working. :)
> I would like to have 2 Icons that will call my activity, that is the
> only one in the package.
> But, when the activity is called, I would like to know which of these
> Icons was used.
> In the logs, I'm able to see that the Intent sent asap after press the
> icon is sending this message like:
> I(  569:0x23d) Starting activity: Intent
> { action=android.intent.action.MAIN categories=
> {android.intent.category.LAUNCHER} flags=0x1020 comp={teste.teste/
> teste.teste.alias1} }
>
> But, my override of onNewIntent is never called and the onResume is
> receiving a modified version of the Intent:
> D(  896:0x380) Intent is Intent { action=android.intent.action.MAIN
> categories={android.intent.category.LAUNCHER} flags=0x1020 comp=
> {teste.teste/teste.teste.mainapp} }
>
> As you can see, the alias1 packagename was modified to mainapp. And
> because of this, I'm unable to check which button was applied.
>
> My code in the manifest file is simple:
>  
>             android:launchMode="singleTop">
>                        
>                                 android:name="android.intent.action.MAIN" />
>                        
>                
>                 android:icon="@drawable/icon" android:targetActivity=".mainapp"
> android:launchMode="singleTop" >
>                        
>                                 android:name="android.intent.action.MAIN" />
>                                 android:name="android.intent.category.LAUNCHER" />
>                        
>                
>                 android:icon="@drawable/icon" android:targetActivity=".mainapp"
> android:launchMode="singleTop">
>                        
>                                 android:name="android.intent.action.MAIN" />
>                                 android:name="android.intent.category.LAUNCHER" />
>                        
>                
>                
>                        
>                                 android:name="android.intent.action.BOOT_COMPLETED" />
>                                 android:name="android.intent.category.HOME" />
>                        
>                
>        
>
> As you can see, I'm using the singleTop definition, as a requirement
> for onNewIntent call.
>
> Any ideas what could be wrong here? Or, How can I have a way to check
> which Icon was used to call my Acitivity?
>
> Thank you,
> Joao Sauer
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: AppAccelerator for Android and iPhone

2009-08-11 Thread Satya Komatineni

I am positive on the approach that "Titanium" and other appcelerator
products are taking for applicationd development.

I am currently doing a bit of research to see the capabilities.

You can take a look at the larger set of my notes here:

http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3263&ownerUserId=satya

At a high level Titanium seems to be a wrapper around "webkit" which
forms the core of many open source browsers including chrome, android,
safari, firefox etc.

Titanium supplements the 'webit' capabilities with some needed apis
from the native os platform which includes such things as android,
iphone, windows etc.

It doesnt look like a big deal on the initial thought, but combine it
with something like "jquery" which gives all of a sudden legs to
webkit allowing you to:

1. Render html and forms in your native app
2. run javascript in your native app
3. use javascript and jquery (or an equivalent) tool to create rich UIs

I haven't gotten to the "android" interface yet but I will report on
it as soon as I get a good sample app running,

I think this gives an "additional" tool kit for someone that is
working on Android. This may or may completely replace your android
development model but supplements it immensely.

The power of titanium comes from familiar technologies: webkit,
javascript, jquery, etc.

This is what I gathered in the last few days playing with it.
Hope this helps
Satya



On Mon, Aug 10, 2009 at 5:56 AM, Premier wrote:
>
> does someone knows and uses appaccelerator (http://
> www.appcelerator.com/products/titanium-mobile/) for android? What do
> you think about?
> >
>

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

2009-08-11 Thread Satya Komatineni

By the way this is also a similar approach taken by "Adobe AIR" and
advanced IDEs like "Aptana Studio" can provide the needed IDE support
around these ideas.

Satya

On Tue, Aug 11, 2009 at 8:12 AM, Satya
Komatineni wrote:
> I am positive on the approach that "Titanium" and other appcelerator
> products are taking for applicationd development.
>
> I am currently doing a bit of research to see the capabilities.
>
> You can take a look at the larger set of my notes here:
>
> http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3263&ownerUserId=satya
>
> At a high level Titanium seems to be a wrapper around "webkit" which
> forms the core of many open source browsers including chrome, android,
> safari, firefox etc.
>
> Titanium supplements the 'webit' capabilities with some needed apis
> from the native os platform which includes such things as android,
> iphone, windows etc.
>
> It doesnt look like a big deal on the initial thought, but combine it
> with something like "jquery" which gives all of a sudden legs to
> webkit allowing you to:
>
> 1. Render html and forms in your native app
> 2. run javascript in your native app
> 3. use javascript and jquery (or an equivalent) tool to create rich UIs
>
> I haven't gotten to the "android" interface yet but I will report on
> it as soon as I get a good sample app running,
>
> I think this gives an "additional" tool kit for someone that is
> working on Android. This may or may completely replace your android
> development model but supplements it immensely.
>
> The power of titanium comes from familiar technologies: webkit,
> javascript, jquery, etc.
>
> This is what I gathered in the last few days playing with it.
> Hope this helps
> Satya
>
>
>
> On Mon, Aug 10, 2009 at 5:56 AM, Premier wrote:
>>
>> does someone knows and uses appaccelerator (http://
>> www.appcelerator.com/products/titanium-mobile/) for android? What do
>> you think about?
>> >>
>>
>

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

2009-08-15 Thread Satya Komatineni

I must disclose first that I am one of the co-authors of the
Pro-Android. So you shouldn't consider this a good recommendation.

The book was set to release when 1.5 was just released also. So we
worked the 1.5 content very late in the book. This content is covered
in the last chapters. This content includes

Chapter 12 Coming to Grips with 1.5
 Installing the ADT Plug-in for Android 1.5 Development
 Getting Started with Android 1.5
 Creating an Android Virtual Device
 Exploring Improvements to the Media Framework
 Using the MediaRecorder Class for Video Capture.
 Exploring the MediaStore Class
 Scanning the Media Store for Media Content
 Exploring Voice Recognition
 Introducing the Input-Method Framework

Chapter 13 Simplifying OpenGL and Exploring Live Folders
  Simplifying OpenGL
  Reimplementing the Simple Triangle OpenGL Drawing
  OpenGL Animation Example
  Exploring Live Folders
  How a User Experiences Live Folders
  Building a Live Folder
 The Future of Android and the 1.5 SDK
  Key Online Resources for the 1.5 SDK

we are in the process reorganizing the content for a december release
of the book as well.

Hope this helps.

Satya Komatineini
http://www.satyakomatineni.com


On Sat, Aug 15, 2009 at 5:03 PM, bboyes wrote:
>
> Not an e-book, but Pro Android from apress covers 1.5. It seems very
> well written but does neglect to tell you to create the avd in the
> hello world example.
>
> Bruce
> >
>

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



[android-developers] why would a javascript "alert" doesn't show on a locally loaded html file through webkit?

2009-08-18 Thread Satya Komatineni

If an html file is locally loaded from the assets directory into the
webkit and if that html has an "alert" on it, what could be a reason
it won't show a dialog?

Thanks
Satya

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



[android-developers] Does anyone know if the "donut" branch if built will have the sample programs that usually come with a release?

2009-08-26 Thread Satya Komatineni

Does anyone know if the "donut" branch if built will have the sample
programs that usually come with a release?

Thanks
Satya

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



[android-developers] Is it possible to build a "windows" distribution of a "donut" release?

2009-08-26 Thread Satya Komatineni

Is it possible to build a "windows" distribution of a "donut" release?

Thanks
Satya

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

2009-09-05 Thread Satya Komatineni

Al,
Thank you. this is great help
Satya

On Sat, Sep 5, 2009 at 11:04 AM, Al Sutton  wrote:
>
> If you want to play with the Donut SDK & ADT eclipse plug-in, I've just built 
> them both from the open source repository and you can get them at;
>
> http://andappstore.com/AndroidApplications/sdk/
>
> The latest code from the repo includes the WVGA and QVGA skins and the 
> supports-screens manifest tag (and who knows what else) so it might be worth 
> giving your apps a spin to see how the look on bigger and smaller screens.
>
> Remember: These are built from the open repository, so don't expect any 
> support from the Google guys as their repo may have a different set of 
> sprinkles.
>
> Al.
>
> --
>
> * Looking for Android apps?, try http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the
> company number  6741909. The registered head office is Kemp House,
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not
> necessarily those of Funky Android Limited, it's associates, or it's
> subsidiaries.
>
>
>
> >
>

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



[android-developers] will the device wake up if there is a widget instance on the homepage but the widget provider or receiver is disabled?

2009-09-16 Thread Satya Komatineni

will the device wake up if there is a widget instance on the homepage
but the widget provider or receiver is disabled?

If I have a widget instance on the home page, but if I were to disable
the widget provider from receiving messages by disabling the
component, and if I have no components receiving the messages targeted
for that widget, will Android still wake up the device?

Thanks
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: will the device wake up if there is a widget instance on the homepage but the widget provider or receiver is disabled?

2009-09-16 Thread Satya Komatineni

Diane,
Perhaps I got my question wrong. But the following url

http://developer.android.com/guide/topics/appwidgets/index.html

indicates that

""Note: If the device is asleep when it is time for an update (as
defined by updatePeriodMillis), then the device will wake up in order
to perform the update. "

This is based on 1.5.

Thanks again
Satya

On Wed, Sep 16, 2009 at 3:51 PM, Dianne Hackborn  wrote:
> It doesn't wake up for app widgets at all.  Alarms wake up the device, if
> they are using a type that does so.
>
> On Wed, Sep 16, 2009 at 12:29 PM, Satya Komatineni
>  wrote:
>>
>> will the device wake up if there is a widget instance on the homepage
>> but the widget provider or receiver is disabled?
>>
>> If I have a widget instance on the home page, but if I were to disable
>> the widget provider from receiving messages by disabling the
>> component, and if I have no components receiving the messages targeted
>> for that widget, will Android still wake up the device?
>>
>> Thanks
>> Satya
>>
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> >
>

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



[android-developers] Can I keep a broadcast receiver process alive by creating a service that stays around?

2009-09-16 Thread Satya Komatineni

The app widget documentation indicates that the "widget provider"
being a receiver of a broadcast service may not exist (the process)
beyond the completion of the call.

If I want to maintain state between two broadcast events, such as say
widgetProvider.onUpdate(), can I start a local service and leave it
hanging there until my widgets are disabled? If I didn't explicitly
stop that service will it be loaded again and resumed when the device
wakes up.

Thanks
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Can I keep a broadcast receiver process alive by creating a service that stays around?

2009-09-17 Thread Satya Komatineni

Mark,

thanks for the response.


You are right if the state can be kept in a persistent store, it is
the way to go.

However if you want the widget to be a window to what a service does,
can one of the buttons on a widget start the service, stop the
service, and also collect some stats from the servcie.

In such a case can the widget provider and the service stay in the apk
file and can the update messages rely on the static variables that the
service keeps around.

Thanks
Satya

On Thu, Sep 17, 2009 at 5:59 AM, Mark Murphy  wrote:
>
> Satya Komatineni wrote:
>> The app widget documentation indicates that the "widget provider"
>> being a receiver of a broadcast service may not exist (the process)
>> beyond the completion of the call.
>>
>> If I want to maintain state between two broadcast events, such as say
>> widgetProvider.onUpdate(), can I start a local service and leave it
>> hanging there until my widgets are disabled? If I didn't explicitly
>> stop that service will it be loaded again and resumed when the device
>> wakes up.
>
> Oh, please don't. There should be no need to keep a service in memory
> just to maintain some state. Since the app widget itself does not reside
> in your process, the widget framework allows you to keep your widget up
> to date without consuming much memory.
>
> Just persist whatever state you want to a file, SharedPreferences,
> database, etc.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Need help for your Android OSS project? http://wiki.andmob.org/hado
>
> >
>

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



[android-developers] Can I have multiple widgets in the same apk file?

2009-09-18 Thread Satya Komatineni

The configuration seem to allow it, however both widgets show up with
the same label in the "widget list".

I guess it may be a bad idea to do so as well due to shared space and
multiple widgets needing to behave quite differently with different
requirements.

Thanks
Satya

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



[android-developers] An approach and very **drafty** sample code for utilizing "models" for storing widget state..

2009-09-21 Thread Satya Komatineni

I have been experimenting with widgets for a few days, and I needed a
simple abstract means of saving the widget state.

I want to be able to do something like the following:

private void updateAppWidget(String name, String dob)
{
   //create a widget model with its own data
   BDayWidgetModel m = new BDayWidgetModel(mAppWidgetId,name,dob);

   //paint it
   updateAppWidget(this,AppWidgetManager.getInstance(this),m);

   //save it for next time
   m.save(this);
}

To accomodate this I have used a widget model abstraction where a
derived widget model will identiy some of its members as persistable
and knows how to set them back when retrieved.

This allowed me to quickly accomodate all kinds of widget models and
not think about persistence model all the time.

Anyway, if you want to get to the source code you can use the following link

http://www.knowledgefolders.com/akc/display?url=DisplayNoteIMPURL&reportId=3307&ownerUserId=satya

Now this is a very drafty work around or framework, however you deem
to call it. I can see a handfull of variants that can make this lot
bettter, but this is quick and dirty for your experimental work.

Hope this is useful to someone
Satya

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

2009-09-22 Thread Satya Komatineni

My understanding is the same as well. You have access to these view
objects only through the RemoteViews class.

Here is the API for that
http://developer.android.com/reference/android/widget/RemoteViews.html

So you seem to have only limited functionality exposed through this
class.  The exposed functionality include a few gets and sets and then
you can register an onclick event.

And as per the docs the only views allowed are

FrameLayout
LinearLayout
RelativeLayout

AnalogClock
Button
Chronometer
ImageButton
ImageView
ProgressBar
TextView


Satya


On Tue, Sep 22, 2009 at 12:39 PM, nEx.Software
 wrote:
>
> There is not a whole lot that you can do to access the text view.
> AFAIK, everything must be done through the RemoteViews object and its
> appropriate "set..." functions like you have here :
> updateViews.setTextViewText(R.id.myTxt,"Helloworld");
>
> You can access some other functions of TextView via functions like
> setInt(), setDouble(), setFloat()...
> But I am not positive which ones are accessible in this way.
>
> On Sep 22, 9:13 am, ColletJb  wrote:
>> The problem is that findViewById() belongs to Activity, not
>> AppWidgetProvider.
>>
>> How could I do then ? (access myTxt field on that example)
>>
>> Example :
>>
>> public class Widget extends AppWidgetProvider
>> {
>>         @Override
>>         public void onUpdate(Context context, AppWidgetManager
>> appWidgetManager,
>>                         int[] appWidgetIds) {
>>                 context.startService(new Intent(context, 
>> UpdateService.class));
>>         }
>>         public static class UpdateService extends Service {
>>
>>                 @Override
>>                 public IBinder onBind(Intent intent) {
>>                         return null;
>>                 }
>>
>>                 public void onStart(Intent intent, int startId) {
>>                         RemoteViews updateViews = null;
>>                         try {
>>                                 updateViews = buildUpdate(this);
>>                         } catch (Exception e) {
>>                                 Log.i("INFO", e.toString());
>>                         }
>>
>>                        // Push update for this widget to the home screen
>>                        ComponentName thisWidget = new ComponentName(this,
>> Widget.class);
>>                        AppWidgetManager manager = 
>> AppWidgetManager.getInstance
>> (this);
>>                        manager.updateAppWidget(thisWidget, updateViews);
>>                 }
>>
>>                 private RemoteViews buildUpdate(Context context)
>> throws Exception {
>>                         RemoteViews updateViews = null;
>>                         updateViews = new 
>> RemoteViews(context.getPackageName(),
>> R.layout.widget_bg);
>>                         updateViews.setTextViewText(R.id.
>> myTxt,"Helloworld");
>>
>>                         return updateViews;
>>                 }
>>
>>         }
>>
>> }
>>
>> On 16 sep, 19:07, Jack Ha  wrote:
>>
>> > Try:
>>
>> >     TextView tv = (TextView)findViewById(R.id.myTxt);
>>
>> > --
>> > Jack Ha
>> > Open Source Development Center
>> > ・T・ ・ ・Mobile・ stick together
>> > The coverage you need at the price you want
>>
>> > The views, opinions and statements in this email are those of
>> > the author solely in their individual capacity, and do not
>> > necessarily represent those of T-Mobile USA, Inc.
>>
>> > On Sep 16, 5:34 am,ColletJb wrote:
>>
>> > > Hi,
>>
>> > > I have already developed some widgets for android, but every time, I
>> > > have the same problem... I Can' access my XML layout's elements from
>> > > my java code.
>>
>> > > For example :
>>
>> > > 
>> > > > > >         xmlns:android="http://schemas.android.com/apk/res/android";
>> > >         android:layout_width="fill_parent"
>> > >         android:layout_height="fill_parent">
>>
>> > >         > > >                 android:id="@+id/myTxt"
>> > >                 android:Text="HelloWorld !"
>> > >                 android:layout_width="wrap_content"
>> > >                 android:layout_height="wrap_content" />
>>
>> > > 
>>
>> > > With this layout, how can I access my "myTxt" object ?
>>
>> > > Thank you for your help
>>
>> > >ColletJb
>>
>> > > PS : In an Activity, the equivalent is "findViewById(int)".
>>
>>
> >
>

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



[android-developers] Wondering if someone can clarify this android 2.0 and 1.6

2009-09-28 Thread Satya Komatineni

There was a talk some months ago that Android 2.0 is donut. However I
see that 1.6 is just out and it indeed is "donut".

Can someone clarify what Android 2.0 is then and how soon befor it hit
the ropes?

Thanks
Satya

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

2009-10-20 Thread Satya Komatineni

As I have been looking into the android quick search box, here is a
series of pictures that digs into the nature of the new Android
Search.

http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3325&ownerUserId=satya

These pictures should be helpful as you read through the Android docs on search

http://developer.android.com/reference/android/app/SearchManager.html

Thanks
Satya

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



[android-developers] what does this icon mean in Android Search Box

2009-10-21 Thread Satya Komatineni

In android global search suggestions, I see an icon that looks like a
closed box with the android icon slapped on it half way.

You can see the image here

http://www.knowledgefolders.com/akc/filestorage/satya/documentfiles/3325/what-does-this-mean.gif

The suggestion items are previously entered by me for searching a local app.

When I click on this line itemed suggestion I see the following image
presented by a content resolver

http://www.knowledgefolders.com/akc/filestorage/satya/documentfiles/3325/what-does-this-mean2.gif

Are these just recently searched terms which Android is giving an
option to search with???

Thanks for your help
Satya

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



[android-developers] A possible bug??: global mode type-to-search not closing if the search is self directed with suggestions

2009-10-21 Thread Satya Komatineni

Here is what is happening

1. I have an activity that is responding to searches. Call this
"search results activity"
2. the "search results activity" is enabled type-to-search global keys
3. I see the global search box show up if type some text on the activity
4. I type in a pattern such as "g" or "gh"
5. The local suggestion provider shows up as "More"
6. I click on "More..."
7. search now narrows to just "g" and "gh" as provided by this application
8. I click on any of these items or even click on the magnifying glass
9. I would expect the search to close and take me back to the "search
results activity" with a newintent
10. However the search box wont close.
11. I do see the newintent firing in logcat

I havent tested it, but only thing I can think of is that the new
intent is not explicitly altering the "search results activity" UI.
Still I would have expected the search screen to close.

Thanks for your help
Satya

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



[android-developers] Is it possible to invoke an external activity, such as a browser, from a custom suggestion provided by a custom suggestion provider

2009-10-23 Thread Satya Komatineni

when I examine the intent raised by clicking on a suggestion provided
by a custom suggestion provider it looks like this

launching Intent {
act=android.intent.action.VIEW
dat=http://www.google.com
flg=0x1000
cmp=com.ai.android.search.custom/.SearchActivity (has extras)
}

This is assuming that I have an intent action column and also intent
data column. My hope was that when a user clicks on the suggestion
there will be an intent with out the explicit "component" in it
allowing the invocation of the browser.

Is that always the case? Is that a security restriction?

Your comments are much appreciated.
Satya

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



[android-developers] help! Odd behavior with a search activity

2009-10-24 Thread Satya Komatineni

I have a package with two activities

1. A main activity
2. A search activity

The search activity is invoked by a search suggestion provider in two
possible ways

1. By clicking directly on a suggestion invoking the search activity
through a VIEW action
2. By clicking on the explicit search icon invoking the activity
through SEARCH action

If it is invoked through SEARCH I stay on the search activity and show
some text to the user. Now when I click the back button I go back
CORRECTLY to the home page.

ODD Behaviour:
However if I came to the search activity through the VIEW, I invoke a
browser activity and call finish() on the search activity. Now I have
the browser in my view. If I now go back I would expect to go back to
teh device home page. But from now where the "main activity" is
showing up.

I see in the logcat a message from ActivityManager indicating

moveTaskToBack: 8

I have tried various flags to invoke the browser activity
the tried flags include

new task
previous is top

and I have also tried both a singleTop and otherwise with the
SearchActivity as well.

Same end result.

Thanks for your insight on this one
Satya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: help! Odd behavior with a search activity

2009-10-24 Thread Satya Komatineni

Here is some more research on this:

quick summary once again: I have two activities

1. main
2. search activity

Nature of search activity

1. invoke a browser
2. finish after that
3. As a result browser will be showing when this search activity is invoked

When does it work

If I have never invoked the MAIN activity of this application then the
back button on the invoked browser activity will take me back to where
I came from. (home)

when does it NOT work
**
If I invoked the MAIN activity at any time prior to the global search,
then the back button on the browser will take me quite disconcertingly
I should say to the MAIN activity irrespective of how far back in the
history it is.

The behavior seem un changed even if I set the

  android:allowTaskReparenting="false"

What alternative I have

In my case the MAIN activity happens to be spurious and unnecessary
and I had it just for debugging. I had to remove this activity from
the application to make this work reliably

Hope these notes would be of some help if you were to stray this way.

well anyways if you have some ideas I would love to hear them

Thanks
Satya

On Sat, Oct 24, 2009 at 9:10 AM, Satya Komatineni
 wrote:
> I have a package with two activities
>
> 1. A main activity
> 2. A search activity
>
> The search activity is invoked by a search suggestion provider in two
> possible ways
>
> 1. By clicking directly on a suggestion invoking the search activity
> through a VIEW action
> 2. By clicking on the explicit search icon invoking the activity
> through SEARCH action
>
> If it is invoked through SEARCH I stay on the search activity and show
> some text to the user. Now when I click the back button I go back
> CORRECTLY to the home page.
>
> ODD Behaviour:
> However if I came to the search activity through the VIEW, I invoke a
> browser activity and call finish() on the search activity. Now I have
> the browser in my view. If I now go back I would expect to go back to
> teh device home page. But from now where the "main activity" is
> showing up.
>
> I see in the logcat a message from ActivityManager indicating
>
> moveTaskToBack: 8
>
> I have tried various flags to invoke the browser activity
> the tried flags include
>
> new task
> previous is top
>
> and I have also tried both a singleTop and otherwise with the
> SearchActivity as well.
>
> Same end result.
>
> Thanks for your insight on this one
> Satya
>

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

2009-05-05 Thread Satya Komatineni

perhaps is there a way to intercept all key events globally before
they are dispatched to the apps?

On Tue, May 5, 2009 at 8:51 AM, Taísa Cristina  wrote:
>
> My application behavior is similar to voice call, but I need also to handle
> key events. My application is still running in background and the activity
> is paused. Is there a way to receive key events in such situation? When the
> call screen is paused, it receives "end call" key event. Can I receive a
> specific key event in a similar situation? Is there a way to register my
> activity (or my application) for that?
>
> Taísa Cristina Costa dos Santos
> Computer Engineer
> Brazil, SP
> 55 19 8152-7453
>
>
> On Tue, May 5, 2009 at 8:02 AM, ellipsoidmob...@googlemail.com
>  wrote:
>>
>> If what you want is to have a notification that the user can swipe
>> down and click to go back to your application, then you don't really
>> need to be handling key events whilst your activity is paused. What
>> you could do is create a service which displays the notification, and
>> then use an intent to launch your activity when the notification is
>> clicked.
>>
>> BUT - I'm not sure that this is good usability design. If the user has
>> navigated away from your activity and if you don't need to do any
>> continual background processing, then you probably shouldn't show
>> anything in the notification panel. The user can always get back to
>> your app from the homescreen or via a long press on the home button.
>>
>
>
> >
>

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

2009-05-06 Thread Satya Komatineni

What about "function keys"? Is it possible to tie together a set of
function keys (if they exist) to a service or an activity that is in
the background?

On Tue, May 5, 2009 at 6:19 PM, Mark Murphy  wrote:
>
> Taísa Cristina wrote:
>> In fact I do need to handle key strokes.
>
> Find another UI pattern.
>
>> It would be easier if I could
>> handle home key, so that I could prevent the user from going to home
>> screen.
>
> Find another UI pattern. "Prevent the user from going to home screen" is
> fairly evil and is a tactic I would expect to find from malware.
>
>> And it would be very boring for the user to go back to
>> the Activity whenever he wanted to press a key and make stuff...
>
> Find another UI pattern.
>
>> Is there a way to register for receiving key strokes if my application
>> is compiled with the emulator/device image? (should I ask it on
>> android-platform?)
>
> A list on http://source.android.com/discuss is a better place for
> questions about modifying firmware.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books.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
-~--~~~~--~~--~--~---



[android-developers] Here is an approach to draw a regular polygon using Android OpenGL.

2009-07-07 Thread Satya Komatineni

If you are new to OpenGL and also happen to be experimenting with
OpenGL and Android here is an article that I cooked up that explains
how to draw any regular polygon at any origin on the scene.

The design approach is simple enough: start by defining a regular
polygon with the help of a radius, number of sides and its origin.
Then calculate the vertices for each side of the polygon. Use
GL_TRIANGLES to draw multiple triangles to make up the polygon. Then
have the RegularPolygon provide these vertices and necessary indecies
as an array to the drawing class.

You can see the full article and source code at

http://www.knowledgefolders.com/akc/display?url=DisplayNoteIMPURL&reportId=3189&ownerUserId=satya

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



[android-developers] Who recovers the memory of allocateDirect of java nio buffers? (A helpful note)

2009-07-07 Thread Satya Komatineni

While programming in OpenGL on Android one will be using the native
nio buffers from the core java package. In many of the opengl samples
you will see that these native buffers are being allocated. But you
will not see that memory anywhere being "un" allocated. So a question
begs to be asked:

Who recovers the memory of allocateDirect of java nio buffers?

I did some research on the topic. Here is the summary.

The java.nio package is there to allocate memory space outside of the
java heap that can be directly used by such systems as OpenGL or file
i/o etc.

The nio buffers are actually java objects that eventually point to the
native buffer. These objects are garbage collected. When they are
garbage collected they go ahead and delete the native memory. Java
programs doesn't have to do anything special to unallocate or free the
memory.

However the "gc" won't get fired unless there is memory needed in the
java heap. This means you can run out of native memory and gc may not
realize it.

One implementation in the references below points to an approach where
an outof memory exception will trigger a "gc" and tries it again.

Importantly for the sake of simple OpenGL under ordinary circumstances
one can allocate the native buffers and not worry about releasing
explicitly as that is done by the gc.

You can read more details of the research at the following url

http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3184&ownerUserId=satya

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



[android-developers] An OSCON 2009 session on (introductory) Animation and OpenGL on Android

2009-07-22 Thread Satya Komatineni

If you are looking to find a comprehensive introduction to Animation
and OpenGL on Android you can take a look at this presentation that I
have prepared for OSCON 2009.

The link for the presenation summary is

http://en.oreilly.com/oscon2009/public/schedule/detail/8108

You can download the power point from

http://www.knowledgefolders.com/akc/display?url=DisplayNoteIMPURL&reportId=3203&ownerUserId=satya

I will also be keeping notes on the over all OSCON' 09 here

http://www.knowledgefolders.com/akc/display?url=NotesiMPURL&ownerUserId=satya&folderName=oscon-2009&order_by_format=news

If you have read this far, here is my web log as well which has links
to other Android development information
http://www.satyakomatineni.com

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



Re: [android-developers] Trying to get a ProgressDialog to display.

2011-05-28 Thread Satya Komatineni
UI, including dialogs, is fundamentally an asynchronous process served
by the same thread.

A show() on a dialog is a "delayed instruction" to tell the main
thread to show the dialog when it comes back around the loop to
process that message.  However if you follow the "show" with a
"dismiss" in the same thread then you cancel each other out (may be
with a bit of delay).

If you inject some processing between show and dismiss, as long as you
are on the same main thread of execution it is ineffective.

You should try to use an AsyncTask along with a progress dialog to
accomplish what you are looking for.

Or if you insist not to use the asynctask then you need to post
yourself a message (through a handler) after showing the dialog so
that you can pick up the processing and at the end ofthe processing
you can dismiss the dialog.

There are quite a few articles on the web on asynctask.

I have link below that is a bit more detailed and if you have patience
to read through that it could be helpful

http://www.satyakomatineni.com/item/3536


On Sat, May 28, 2011 at 10:00 AM, B Lyon  wrote:
> I've never used that one, but I'm wondering if the second ".show()" is
> necessary, and/or if it is somehow causing weirdness?  This person
> (http://www.helloandroid.com/tutorials/using-threads-and-progressdialog)
> didn't do that.
>
> On Sat, May 28, 2011 at 9:43 AM, EmilDiego  wrote:
>> I have a function inside one of my activities that calculates some
>> statistics and takes a little time to generate a report.  I want to
>> display a progressDialog while this is going on to give the user some
>> feedback that something is happening while he is waiting.  The problem
>> I am having is that I can't get my progressDialog to display no matter
>> what I do.  Is there some obscure factoid that I am missing out on
>> here that is preventing this to work.  This problem is particularly
>> perplexing because I am using similar code elsewhere in the Activity
>> and that works ok.  Any ideas
>>
>>
>> Here is my code:
>>
>> //* ADD THE CODE FOR THE PROGRS DIALOG
>>                //* Start the progress dialog
>>                xReportProgress = ProgressDialog.show(this, "", "Preparing
>> Report.");
>>                xReportProgress.show();
>>
>>                switch(iReportFormat)
>>                {
>>                        case callLog.REPORT_FORMAT_CSV:
>>                                sReportOutput = this.createCSVReport();
>>                                break;
>>
>>                        case callLog.REPORT_FORMAT_XML:
>>                                sReportOutput = this.createXMLReport();
>>                                break;
>>
>>                        default:
>>                                
>> ed.app.commTracker.main.systemLog.logError("Invalid report
>> format.");
>>                                return;
>>
>>                }
>>
>>                //* Close the dialog so we can display the intent chooser
>>                xReportProgress.dismiss();
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] Re: Are dialogs supposed to be modal?

2011-06-02 Thread Satya Komatineni
Common guys. Give him a bit of credit.

Yes. I agree it is a GOOD recommendation to not use private APIs. It
is especially good recommendation to not use them for a general
purpose facility.

Other than that it is a good effort.

Someone thinks differently let him experiment.

Satya

On Thu, Jun 2, 2011 at 2:04 AM, Zsolt Vasvari  wrote:
> Of course, it's wise, but frankly, only an idiot would use that piece
> of code -- and you cannot really help those people.
>
> On Jun 2, 2:00 pm, Chris  wrote:
>> The suggestion to avoid using private APIs is wise.  I had a company once
>> that built a model on WinNT 4 and when XP/5.0 came out was rendered
>> obsolete.
>>
>> Just sayin' is all.
>>
>> - C
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] Re: Java book (like C K&R and C++ Programming Language)

2011-06-11 Thread Satya Komatineni
C++ by Stroustroup is one of the best books in languages that I have
read (especially the ARM book).

On Java I still prefer the simplicity of the first edition by the
creator of Java. to the point. brief. clear and concise.

The more recent topics you can probably learn from on line sources
such as generics, genericized lists etc..


On Sat, Jun 11, 2011 at 7:26 AM, John  wrote:
>
>> I have a C and C++ background and i'm looking for "THE" java book, like the
>> "C Programming Language, best know as K&R, for C and the "C++ Programming
>> Language" by Bjarne Stroustrup for C++.
>
> I have always liked the Core Java books (two volumes) by Horstmann and
> Cornell. now in their eighth edition.  See 
> http://www.horstmann.com/corejava.html
> for more details.  I also support the other poster's recommendation of
> Josh Bloch's book entitled Effective Java as an excellent reference,
> but not necessarily as a first source for learning Java.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


[android-developers] Info: Research notes on using GSON for Mobile App Storage

2012-12-28 Thread Satya Komatineni
Article: GSON for Mobile App Storage
http://satyakomatineni.com/item/4440

Here is an abstract:

You will be surprised how GSON can propel your mobile app productivity
especially release 1 candidates. In this approach you will represent
the persistent state of your apps as JSON. You will use the
"Beautiful" tool GSON from google to convert your application objects
to JSON and persist the resulting JSON string either in a shared
preference or on internal storage as files.

This article answers the following questions


What does Android recommend for data storage options? The Official line!
The JSON solution
What is GSON?
  What is GSON's homepage?
  Is there a user guide for GSON?
  Can I save nested objects?
  Can I save nested collections of objects?
  How are characters in strings escaped?
How do you add external jar files to Android APK file?
What are shared preferences?
Difference between getSharedPreferences and getPreferences?
How to get a context independent of an activity?
Where are shared preference files stored?
How do you save JSON to a shared preference file?
What does the saved preference file look like?
How do you read JSON from shared preferences back as Java Objects?
How does escape characters work in android preferences?
What is internal storage?
How do you save to internal storage?
How do you restore objects from internal storage?
Should you use external storage like the SD card?
What are the useful references while working with this approach?
How do you code such a way that you can migrate in the future to SqlLite?
What Next?

Thanks
Satya

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

2013-02-15 Thread Satya Komatineni
Ravi,
what you need is a custom view and some 2D graphics API details.

Some of the material might be of some help

Essential Custom View Code snippets
http://satyakomatineni.com/item/4330

Also you will see here links for custom layouts research as well if
you were to arrange buttons or images in a circular layout.

On Fri, Feb 15, 2013 at 7:23 AM, ravi .  wrote:
> Hi All
> I want to design a menu just like the attached screen. I had tried in many
> ways but couldn't get a solution.
>
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] 5 free chapters from the previous editions of Pro Android

2012-03-29 Thread Satya Komatineni
I have made available some valuable published content from the
previous editions of Pro Android for free. we had to remove these
chapters from our latest edition ProAndroid 4
(http://androidbook.com/proandroid4)  due to size and other reasons.

The chapters are

OpenGL
Search API
Live Folders
Text to Speech
Titaninum

These 5 free android sdk chapters are avilable at

http://androidbook.com/item/4060

Bootstrapping developers on the Android SDK
http://twitter.com/SatyaKomatineni
http://androidbook.com/training
http://satyakomatineni.com
http://androidbook.com

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


Re: [android-developers] onUpdate function is never being called from widget

2012-01-02 Thread Satya Komatineni
Do you have a widget configurator activity? if so the first onUpdate() is
not going to get called but subsequent onUpdates() will.

Also if you were to overload "onReceive()" make sure you call the parent
"onReceive()" otherwise you are disabling yourself from calling the rest of
the widget callbacks.

Good luck with your debugging

Satya

On Fri, Dec 30, 2011 at 12:31 PM, Eyal T  wrote:

> Hi all
>
> I try create a clickable widget.
> I saw that the clickable notification is not configured because
> onUpdate function is never being called (so I cannot set the
> notification)
> * I did not saw the log in the LogCat so I assume that the function is
> never being called
> * The Log in the onRecieve is being execute when I add the widget to
> the screen, and once in 30 minutes.
>
>
> Can anyone help me?
>
> Thanks Eyal
>
>
> public class AnimationWidget extends AppWidgetProvider {
>public static int imageNumber = 0;
>private static final String ACTION_WIDGET_RECEIVER =
> "ActionRecieverWidget";
>
>
>
>
>   /** Called when the activity is first created. */
>
>
>
>   @Override
>   public void onUpdate(Context context, AppWidgetManager
> appWidgetManager,
> int[] appWidgetIds) {
>
>  Log.i("print from main", "widget id: ");
>
> }
>
> @Override
>public void onReceive(Context context, Intent intent) {
>
>
>   Log.i("print from main", "onReceive " +
> intent.getAction());
> }
>
> http://schemas.android.com/apk/res/android";
>  package="com.animation.widget"
>  android:versionCode="1"
>  android:versionName="1.0">
>
>
>   
>
>android:label="@string/app_name">
> 
>  android:name="android.appwidget.action.APPWIDGET_UPDATE" />
>  
>  android:name="android.appwidget.provider"
>  android:resource="@xml/widget_info" />
>   
>   
>
>
>
>   
>
>
>
> 
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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

[android-developers] Kudos: Android Team, You have done a fantastic job on OpenGL documentation

2012-07-24 Thread Satya Komatineni
http://developer.android.com/guide/topics/graphics/opengl.html

The lessons and tutorials here are excellent!
http://developer.android.com/training/graphics/opengl/index.html

Real thanks
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

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

2012-08-16 Thread Satya Komatineni
Hopefully you have a good reason to structure  your classes they way
you have done.

To start BlaRenderer is a proper derived class that will get called.
So this is a concrete class by itself.

Number 2, the player class looks more like a utilitiy class and hence
doesn't need to derive from BlaRenderer. In your code I don't see the
Player class playing the role of a renderer.

Number 3, BlaRenderer has a local variable pointing to a Player class.
So the variables of Player class are physically separate from the
variables of BlaRenderer. if your intention is to have the Player as a
utility class, then

1. Don't inherit from Renderer
2. Remove the local variables in the BlaRenderer which are now
controlled by Renderer

Hope that helps
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni


On Wed, Aug 15, 2012 at 8:37 PM, Braindrool  wrote:
> I've been programming for years, but I have very little experience with 3D
> graphics. I thought OpenGL would be the most efficient in this project. It's
> coming along alright, I am still studying the API and documentation. But I
> have encountered a problem using multiple classes. For instance, here I try
> to use a separate class for the player model. (Yes, currently it's just a
> cube.)
>
> Renderer:
>
> Code:
>
> package com.braindrool.bla;
>
> import java.nio.ByteBuffer;
> import java.nio.ByteOrder;
> import java.nio.FloatBuffer;
> import java.nio.ShortBuffer;
>
> import javax.microedition.khronos.egl.EGLConfig;
> import javax.microedition.khronos.opengles.GL10;
>
> import android.opengl.GLSurfaceView.Renderer;
>
> public class BlaRenderer implements Renderer {
>
>   int nrOfVertices;
>   float A;
>   Player player = new Player();
>
>   public void onSurfaceCreated(GL10 gl, EGLConfig config) {
>   // TODO Auto-generated method stub
>
>   gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
>   gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
>
>   gl.glEnable(GL10.GL_CULL_FACE);
>
>   gl.glFrontFace(GL10.GL_CCW);
>   gl.glCullFace(GL10.GL_BACK);
>
>   gl.glClearColor(0.3f, 0.8f, 0.9f, 1);
>
>   //  initTriangle();
>   player.initPlayer();
>
>   }
>
>   public void onDrawFrame(GL10 gl) {
>   // TODO Auto-generated method stub
>
>   
>
>   gl.glLoadIdentity();
>
>   gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
>
>   // gl.glRotatef(A * 2, 1f, 0f, 0f);
>   // gl.glRotatef(A, 0f, 1f, 0f);
>   //
>   // gl.glColor4f(0.5f, 0, 0, 1);
>
>   gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
>   gl.glColorPointer(4, GL10.GL_FLOAT, 0, colorBuffer);
>   gl.glDrawElements(GL10.GL_TRIANGLES, nrOfVertices,
>   GL10.GL_UNSIGNED_SHORT, indexBuffer);
>   // A++;
>
>   }
>
>   public void onSurfaceChanged(GL10 gl, int width, int height) {
>   // TODO Auto-generated method stub
>   gl.glViewport(0, 0, width, height);
>
>   }
>
>   private FloatBuffer vertexBuffer;
>   private ShortBuffer indexBuffer;
>
>   private FloatBuffer colorBuffer;
>
>   private void initTriangle() {
>
>   float[] coords = { 0, 0.5f, 0, -0.5f, -0.5f, 0.5f, 0.5f, -0.5f, 
> 0.5f,
>   0, 0, -0.5f };
>
>   nrOfVertices = coords.length;
>
>   ByteBuffer vbb = ByteBuffer.allocateDirect(nrOfVertices * 3 * 
> 4);
>   vbb.order(ByteOrder.nativeOrder());
>   vertexBuffer = vbb.asFloatBuffer();
>
>   ByteBuffer ibb = ByteBuffer.allocateDirect(nrOfVertices * 2);
>   ibb.order(ByteOrder.nativeOrder());
>   indexBuffer = ibb.asShortBuffer();
>
>   ByteBuffer cbb = ByteBuffer.allocateDirect(4 * nrOfVertices * 
> 4);
>   cbb.order(ByteOrder.nativeOrder());
>   colorBuffer = cbb.asFloatBuffer();
>
>   float[] colors = { 1f, 0f, 0f, 1f, // point 1
>   0f, 1f, 0f, 1f, // point 2
>   0f, 0f, 1f, 1f, // point 3
>   };
>
>   short[] indices = new short[] {
>   // indices
>   0, 1, 2, 0, 2, 3, 0, 3, 1, 3, 1, 2
>
>   };
>
>   vertexBuffer.put(coords);
>   indexBuffer.put(indices);
>   colorBuffer.put(colors);
>
>   vertexBuffer.position(0);
>   indexBuffer.position(0);
>   colorBuffer.position(0);
>
>   }
>
> }
>
> And now the player class.
>
> Code:
>
> package com.braindrool.bla;
>
> import java.nio.ByteBuffer;
> import java.nio.ByteOrder;
> import java.nio.FloatBuffer;
> import java.nio.ShortBuffer;
>
> import javax.microedition.khronos

Re: [android-developers] Can't make new Android project in Eclipse.

2012-08-16 Thread Satya Komatineni
Johannes,
Your tools may be more recent. Otherwise an "android application
project" is similar to "android project" in earlier tool versions.
There should be enough parallels to extrapolate.

http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

On Sun, Aug 12, 2012 at 10:53 AM, Johannes  wrote:
> Hey guys. I'm trying to make an application for Android in Eclipse.
> However when I try to follow guides like this one: 
> http://androidcodemonkey.blogspot.dk/2010/01/hello-world-your-first-android.html
>
> I get a problem from the start. When I go to File > New there is no "Android 
> Project" even though I installed multiple Android packages to Eclipse. All i 
> can find is under file > new > project > Android and then things like 
> "Android Application Project" and "Android Sample Project". However these are 
> not alike the once i see in the tutorial.
>
> I hope anyone got the answer for why I can't make an Android Application like 
> the one in the tutorial.
>
> Thanks - Johannes.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] App Not Installed

2012-08-16 Thread Satya Komatineni
Where are you installing the app? are you doing it on the emulator or
a real device? If it is a real device you can do that with out
creating an unsigned package directly through eclipse. Otherwise you
will need to sign it to install on the device as a proper app.

And the image you have included seem to have lot of Java errors. It is
not clear from the image what they are. You have to debug them or show
someone that is close by to you to take a look.

http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

On Sun, Aug 12, 2012 at 10:36 AM, EeLeng Tee  wrote:
> Hello..
> Im new to eclipse.
> I've tried to play with android sample project from SDK.
> I export any project to unsigned apk file and install it
> But comes out "App not installed" message.
> Everything looks fine but just cant be installed.
> Anyone help? Thanks
>
> Oh ya i also encountered this problem which is java problem shown.
>
> http://i50.tinypic.com/r7rdkz.png
>
> Hope you guys can help because its important for my final year project =)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Error in an XML file: aborting build.

2012-08-16 Thread Satya Komatineni
You typically install the ".apk" file on the emulator or the device
and then locate the icon for your application and use that icon to
click on it to run.

If you are using eclipse, you can use eclipse to run the project
automatically on the emulator or the device. (Eclipse will compile and
make the .apk file, and loads it and also starts the application
automatically with out locating the icon).

The typical sequence of events are

1. Get your source code
2. Make a project in eclipse
3. Compile the project in eclipse (Eclispse is usually set to
auto-compile the project)
4. Create an emulator (AVD) that matches with the SDK API level that
is used to compile the project
5. Use eclipse to run that project on that specific AVD
6. You can also use the real device instead (But it can be a bit
involved in having the eclipse identify the device)


http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni


On Fri, Aug 10, 2012 at 3:58 PM, James Spinella  wrote:
> Hey all,
>
> I'm brand new to Android development, well except for rooting, custom ROMs,
> etc. I'm going through Google's "lessons" in development, and I'm stuck at
> the part where it says to run my app that it just had me make... I've tried
> USB Debugging with my phone, as well as the emulator and whenever I try to
> run activity_main.xml, I get the aforementioned error.
>
> I have a feeling I am trying to run the wrong thingis this what Google
> wants me to run as per
> http://developer.android.com/training/basics/firstapp/running-app.html ?
>
> It has to be the wrong thing, I followed directions to a tee
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Back face culling

2012-08-20 Thread Satya Komatineni
Hi,

I don't see any image except a blank screen. There may be, and quite
likely, more reasons why your figure is not showing (if it is not showing).
You may want to check your eye positioning, check your view port, check
your frustum etc. More importantly close trace your sample that works and
the one that doesn't.

Now coming to winding I believe the following triangles are would in the
opposite to the rest

The wrong ones are:

7,6,3
7,4,5
0,1,5
2,6,5


Because if you spin a right hand screw in that order the screw needs to
go-in or come-out facing the outside of the cube's surface. By that
logic they are likely
7,3,6
7,5,4
0,5,1
2,5,6

But again even if they were wrong you would have seen something on the
screen.

Here is a quick note on winding and hiding a hidden surface
http://satyakomatineni.com/item/4230

Here is how to hide hidden surfaces
http://satyakomatineni.com/item/4192

Here are my notes on as I have been working through OpenGL
http://satyakomatineni.com/item/opengl

If it helps here is a free chapter on OpenGL 1.1 and a bit on ES 2.0
http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=4060&downerUserId=satya


Hope that helps
Satya
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

On Sun, Aug 19, 2012 at 7:57 PM, Braindrool  wrote:

> I have returned to this group, once again. In search of assistance.
> Dealing with OpenGL ES 1.0, I'm having trouble getting back face culling to
> work. I have been following a variety of random tutorials that I've found
> for OpenGL, but this 
> one<http://www.droidnova.com/android-3d-game-tutorial-part-v,376.html>in 
> particular. The sample code works fine, but I'm not sure what I'm doing
> wrong. All I know is that it is about how I wind the vertices into the
> index buffer.
>
> For instance, I try to create a cube. I get this.
>
> <http://imgur.com/07nbH.png>
>
>
> The vertices / indices for that would be:
>
> [code]float[] coords = {
> -0.5f, 0.5f, -0.5f,
> -0.5f, -0.5f, -0.5f,
> 0.5f, -0.5f, -0.5f,
> 0.5f, 0.5f, -0.5f,
> -0.5f, 0.5f, 0.5f,
> -0.5f, -0.5f, 0.5f,
> 0.5f, -0.5f, 0.5f,
> 0.5f, 0.5f, 0.5f,
>
> };
>
> short[] indices = new short[] {
>  //Front
> 0,1,2,
> 2,3,0,
>  //Right
> 3,2,6,
> 7,6,3,
>  //Back
> 7,6,5,
> 7,4,5,
>  //Left
> 0,1,5,
> 0,4,5,
>  //Bottom
> 1,5,2,
> 2,6,5,
>  //Top
> 0,3,4,
> 3,7,0,
>
> };[/code]
>
>
> No idea what I'm doing wrong, help greatly appreciated!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: Back face culling

2012-08-20 Thread Satya Komatineni
No difference at all where you start.

On Mon, Aug 20, 2012 at 4:27 PM, Braindrool  wrote:

> Your fix didn't work, but something I am getting confused about. Does it
> matter what vertex is the starting point in a counter clockwise winding?
> Example:
>
> 
>
> Would it matter if you go:
>
> 0,1,3,
> 3,1,2
>
>
> or
> 1,3,0,
> 1,2,3?
>
> Any difference?
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

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

2012-08-22 Thread Satya Komatineni
If you are still looking for advice I have created a note a while ago called

How I have learned Android SDK: An authors note
http://www.satyakomatineni.com/item/3784

See if this is of some help
(Disclosure: Yes I do have a book on the subject)


http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

On Wed, Aug 22, 2012 at 11:13 AM, cham herbias wrote:

> im sorry. what do you mean notepad example?
>
>
> On Wed, Aug 22, 2012 at 8:07 AM, Michael Leung wrote:
>
>> Start with Notepad Example, that is good
>>
>> On Thu, Aug 23, 2012 at 1:01 AM, cham herbias wrote:
>>
>>> Thank you for the help nirav. i appreciate it.
>>>
>>>
>>> On Tue, Aug 21, 2012 at 6:44 AM, Nirav Parmar wrote:
>>>
 Hello Cham,
 In my opinion Developer site is best..it has good examples..Also you
 can download API demos for each platform.You can learn lot from that
 demos.. Best of luck..

 Regards,
 Nirav

 On Tue, Aug 21, 2012 at 2:29 PM, cham herbias 
 wrote:

> I am a computer engineering student. Can you help me with some
> suggestions about basic android app? . I have a very basic background of
> android programming and i want to learn more.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to
> android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




 --
 Regards,

 Nirav Parmar.


  --
 You received this message because you are subscribed to the Google
 Groups "Android Developers" group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
>>>
>>>
>>>
>>>
>>> --
>>>
>>>archie herbias
>>>  
>>>  
>>>  
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
>>
>> --
>> Regards,
>> Michael Leung
>> http://www.itblogs.info - My IT Blog
>> http://diary.skynovel.info - My Blog
>> http://www.michaelleung.info - My Homepage
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
>
>archie herbias
>  
>  
>  
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] How do I read an XML Data in Android?

2012-08-27 Thread Satya Komatineni
See if this SDK doc helps

http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html

Here is some earlier research I have done on XML treatment on Android
(This may be a bit outdated as I haven't revisited it in a year)

What XML libraries are available for Android
http://satyakomatineni.com/item/3731

http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni


On Sun, Aug 26, 2012 at 9:36 AM, Guilherme Bernardi
 wrote:
> I'm developing an application that uses XML data...
>
> I consumed an wcf web service with SOAP, convert the object to a basic XML
> and save on sdcard, but now I need to read this data file to edit, confer
> and save?
>
> How can I do that? Can anyone help me?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-08-28 Thread Satya Komatineni
Victor,
I am not entirely sure. But I can suggest a couple of experiments to
debug. May be inheriting a View directly is too simplisitic. Try
inheriting a TextView first. And if it works then you can look at what
other base methods of the "View" you will need to inherit.

Take a look at this item from the docs

http://developer.android.com/training/custom-views/custom-drawing.html

to see what other methods you need to override.

Also if you are intending to use some custom attributes you may want
to look at some detailed notes I have gathered at

http://satyakomatineni.com/item/4169

This goes into how attrs.xml and declare styleables work.

Also let me know what you find.
Thanks
Satya
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni
On Mon, Aug 27, 2012 at 2:09 PM, Victor Reboucas  wrote:
> Hi, I'm new to Android development and I'm trying to implement a custom view
> to act as a "custom menu button" for my app.
>
> I followed the instructions at
> http://developer.android.com/training/custom-views/create-view.html but by
> the end of the implementation I get a message saying "Unfortunately
> customviews1 has stopped" and the app just shut's down.
>
> My approach is very simple and I cannot find any reference about solving
> this basic problem. Here's what I'm doing:
>
> 1. create a new Android project in Eclipse named "customviews1"
>
> 2. I run the project and it shows a "Hello World" TextView on the
> "activity_main.xml" layout file
>
> 3. I add a new class that extends "View" to the "src" folder of the project:
>
> public class MyCustomView extends View {
>
> public MyCustomView(Context context, AttributeSet attrs) {
> super(context, attrs);
> }
>
> }
>
> 4. I remove the "TextView" from activity_main.xml and add a "customview1" to
> it:
>
>
> http://schemas.android.com/apk/res/android";
> xmlns:tools="http://schemas.android.com/tools";
> android:layout_width="match_parent"
> android:layout_height="match_parent">
>
> 
> 
>
> 5. I run the app again and I got the message saying "Unfortunately
> customviews1 has stopped" and the app shuts down.
>
>
> Is there any code I'm missing here?
>
>
> Thanks for any clue,
> Regards,
> Victor Reboucas
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Are there any official Google sponsored training seminars/classes, etc?

2012-08-28 Thread Satya Komatineni
See if something like this helps

http://androidbook.com/training

Also if you have a set number of folks (about 10) I don't mind
travelling with in the US for a week to teach.

http://androidbook.com/training
http://androidbook.com
http://satyakomatineni.com
http://twitter.com/SatyaKomatineni

On Tue, Aug 28, 2012 at 4:00 PM, RKS  wrote:
> I'm looking for information on officially sponsored training
> seminars/classes etc? I'm not really interested in online but will take some
> info on that if you have it. What I'm really interested in are
> seminars/courses that you pay for, have to go to the location, and take
> classes ranging from fundamentals to advanced. I've seen a couple of
> workshops posted around the interwebs and these might be just as productive
> as something Google sponsors but without any reviews or anything I don't
> know how comfortable I am giving just anyone $1K+ on an advertisement for
> training.
>
> Local colleges have options as well, but mainly I'm looking for more of a
> workshop style that isn't intending on teaching you from scratch. We've got
> guys who are already senior programmers in other languages that are not
> going to be interested in going to school for a semester! A week long course
> would be perfect to go out and bring home a few things.
>
> So does anyone know of anything like 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

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

2012-09-01 Thread Satya Komatineni
Guich,
Given a number of ways how to do the same thing in OpenGL it will be quite
hard to debug.

On Sat, Sep 1, 2012 at 9:11 AM, guich  wrote:

> Hi,
>
> I've spent a full day trying to draw a series of points using GL_POINTS. I
> know i could use a texture, but i want to learn how to draw points. The
> resulting image (zoomed) is shown here:
>
> The code is written below. Any help on why are only 4 points appearing is
> greatly appreciated. Although it is possible to create your model, view,
> and projection matrices, it is better to use Matrix class and use the
> methods available on that class to generate the required matrices.
>

To get the view matrix you can call
Matrix.setLookAtM(viewMatrix)

To get the projection matrix
Matrix.frustumM(projectionMatrix)

Then you can get your ModelViewProjection matrix by doing
Matrix.multiplyMM(mvp, projmatrix, viewmatrix)

Finally to get your gl_position = mvp * gl_position; and not the other way.

I would start with a simple program that works and then gradually increase
the complexity. A triangle or a square is a good place to start and then
make it work using the examples in the tutorial on the android developer
site.

If there is a specific issue that you are not clear ask that specifically
and you may be able to debug it that way

http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni


>
> 
>
> public class MainActivity extends Activity
> {
>class MyGLSurfaceView extends GLSurfaceView
>{
>   public MyGLSurfaceView(Context context)
>   {
>  super(context);
>
>  setEGLContextClientVersion(2); // Create an OpenGL ES 2.0 context.
>  setEGLConfigChooser(8, 8, 8, 8, 0, 0);
>  getHolder().setFormat(PixelFormat.RGBA_);
>  setRenderer(new MyGLRenderer()); // Set the Renderer for drawing
> on the GLSurfaceView
> // setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); // Render
> the view only when there is a change in the drawing data (must be after
> setRenderer!)
>   }
>}
>
>public void onCreate(Bundle savedInstanceState)
>{
>super.onCreate(savedInstanceState);
>setContentView(new MyGLSurfaceView(this));
>}
> }
>
> class MyGLRenderer implements GLSurfaceView.Renderer
> {
>byte[][] bitmap = {
>  {1,1,1,1,1,1,1,1},
>  {1,0,0,1,1,0,0,1},
>  {1,0,0,1,1,0,0,1},
>  {1,0,0,1,1,0,0,1},
>  {1,0,0,1,1,0,0,1},
>  {1,0,0,1,1,0,0,1},
>  {1,0,0,1,1,0,0,1},
>  {1,0,0,1,1,0,0,1},
>  {1,1,1,1,1,1,1,1}};
>
>static final int COORDS_PER_VERTEX = 3;
>
>// Set color with red, green, blue and alpha (opacity) values
>float color[] = { 0,0,0, 1.0f };
>float coords[] = new float[4 * COORDS_PER_VERTEX];
>int w,h;
>
>public void onSurfaceCreated(GL10 unused, EGLConfig config)
>{
>}
>
>public void onDrawFrame(GL10 unused)
>{
>   try
>   {
>  drawText();
>   } catch (Exception e) {debug(e.getMessage());}
>}
>
>private String vertexShaderCode(int w, int h)
>{
>   return // http://www.songho.ca/opengl/gl_projectionmatrix.html
>  "attribute vec4 vPosition;" +
>  "mat4 projectionMatrix = mat4( 2.0/"+w+".0, 0.0, 0.0, -1.0,"+
>   "0.0, -2.0/"+h+".0, 0.0, 1.0,"+
>   "0.0, 0.0, -1.0, 0.0,"+
>   "0.0, 0.0, 0.0, 1.0);"+
>  "void main() {gl_Position = vPosition*projectionMatrix;}"; // the
> matrix must be included as a modifier of gl_Position
>}
>
>private final String fragmentShaderCode =
>   "precision mediump float;" +
>   "uniform vec4 vColor;" +
>   "void main() {gl_FragColor = vColor;}";
>
>private int mProgram;
>private int mPositionHandle;
>private int mColorHandle;
>
>public void onSurfaceChanged(GL10 unused, int width, int height)
>{
>   w = width; h = height;
>   // Adjust the viewport based on geometry changes, such as screen
> rotation
>   GLES20.glViewport(0, 0, width, height);
>
>   // prepare shaders and OpenGL program
>   int vertexShader =
> MyGLRenderer.loadShader(GLES20.GL_VERTEX_SHADER,vertexShaderCode(width,height));
>   int fragmentShader =
> MyGLRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER,fragmentShaderCode);
>
>   mProgram = GLES20.glCreateProgram(); // create empty
> OpenGL Program
>   GLES20.glAttachShader(mProgram, vertexShader);   // add the vertex
> shader to program
>   GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment
> shader to program
>   GLES20.glLinkProgram(mProgram);  // create OpenGL
> program executables
>   GLES20.glUseProgram(mProgram); // Add program to OpenGL environment
>
>   // get handle 

Re: [android-developers] GL_POINTS not drawing points

2012-09-02 Thread Satya Komatineni
Sorry this line

Finally to get your gl_position = mvp * gl_position; and not the other way.

should read

Finally to get your gl_position = mvp * positionAttributeVariable; and not
the other way.

On Sat, Sep 1, 2012 at 11:10 PM, Satya Komatineni <
satya.komatin...@gmail.com> wrote:

> Guich,
> Given a number of ways how to do the same thing in OpenGL it will be quite
> hard to debug.
>
> On Sat, Sep 1, 2012 at 9:11 AM, guich  wrote:
>
>> Hi,
>>
>> I've spent a full day trying to draw a series of points using GL_POINTS.
>> I know i could use a texture, but i want to learn how to draw points. The
>> resulting image (zoomed) is shown here:
>>
>> The code is written below. Any help on why are only 4 points appearing is
>> greatly appreciated. Although it is possible to create your model, view,
>> and projection matrices, it is better to use Matrix class and use the
>> methods available on that class to generate the required matrices.
>>
>
> To get the view matrix you can call
> Matrix.setLookAtM(viewMatrix)
>
> To get the projection matrix
> Matrix.frustumM(projectionMatrix)
>
> Then you can get your ModelViewProjection matrix by doing
> Matrix.multiplyMM(mvp, projmatrix, viewmatrix)
>
> Finally to get your gl_position = mvp * gl_position; and not the other way.
>
> I would start with a simple program that works and then gradually increase
> the complexity. A triangle or a square is a good place to start and then
> make it work using the examples in the tutorial on the android developer
> site.
>
> If there is a specific issue that you are not clear ask that specifically
> and you may be able to debug it that way
>
> http://satyakomatineni.com/android/training
> http://satyakomatineni.com
> http://androidbook.com
> http://twitter.com/SatyaKomatineni
>
>
>>
>> <https://lh5.googleusercontent.com/-lelPSZoY4dw/UEIH5mVQfII/AD4/o5q5GMFuL00/s1600/points.png>
>>
>> public class MainActivity extends Activity
>> {
>>class MyGLSurfaceView extends GLSurfaceView
>>{
>>   public MyGLSurfaceView(Context context)
>>   {
>>  super(context);
>>
>>  setEGLContextClientVersion(2); // Create an OpenGL ES 2.0
>> context.
>>  setEGLConfigChooser(8, 8, 8, 8, 0, 0);
>>  getHolder().setFormat(PixelFormat.RGBA_);
>>  setRenderer(new MyGLRenderer()); // Set the Renderer for drawing
>> on the GLSurfaceView
>> // setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); // Render
>> the view only when there is a change in the drawing data (must be after
>> setRenderer!)
>>   }
>>}
>>
>>public void onCreate(Bundle savedInstanceState)
>>{
>>super.onCreate(savedInstanceState);
>>setContentView(new MyGLSurfaceView(this));
>>}
>> }
>>
>> class MyGLRenderer implements GLSurfaceView.Renderer
>> {
>>byte[][] bitmap = {
>>  {1,1,1,1,1,1,1,1},
>>  {1,0,0,1,1,0,0,1},
>>  {1,0,0,1,1,0,0,1},
>>  {1,0,0,1,1,0,0,1},
>>  {1,0,0,1,1,0,0,1},
>>  {1,0,0,1,1,0,0,1},
>>  {1,0,0,1,1,0,0,1},
>>  {1,0,0,1,1,0,0,1},
>>  {1,1,1,1,1,1,1,1}};
>>
>>static final int COORDS_PER_VERTEX = 3;
>>
>>// Set color with red, green, blue and alpha (opacity) values
>>float color[] = { 0,0,0, 1.0f };
>>float coords[] = new float[4 * COORDS_PER_VERTEX];
>>int w,h;
>>
>>public void onSurfaceCreated(GL10 unused, EGLConfig config)
>>{
>>}
>>
>>public void onDrawFrame(GL10 unused)
>>{
>>   try
>>   {
>>  drawText();
>>   } catch (Exception e) {debug(e.getMessage());}
>>}
>>
>>private String vertexShaderCode(int w, int h)
>>{
>>   return // http://www.songho.ca/opengl/gl_projectionmatrix.html
>>  "attribute vec4 vPosition;" +
>>  "mat4 projectionMatrix = mat4( 2.0/"+w+".0, 0.0, 0.0, -1.0,"+
>>   "0.0, -2.0/"+h+".0, 0.0, 1.0,"+
>>   "0.0, 0.0, -1.0, 0.0,"+
>>   "0.0, 0.0, 0.0, 1.0);"+
>>  "void main() {gl_Position = vPosition*projectionMatrix;}"; //
>> the matrix must be included as a modifier of gl_Position
>>}
>>
>>private final String fragmentShaderCode =
>>   "precision mediump float;" +

Re: [android-developers] GL_POINTS not drawing points

2012-09-02 Thread Satya Komatineni
I am on my way to take my kids to the beach. I will look at it a bit closer
next week. May be just give me the simple problem defintion and I will try
to create the program for you and send the zip file.

ButI will try a quick answer

Say you want a 20x20 graph.

Specify your point vertices as (0,0) (1,1,)(5,5) all x,y and specify the z
as 0 if needed.

Then you need to set your camera using

Matrix.setLookAtM(mVMatrix, 0, 0, 0, -15, 0f, 0f, 0f, 0f, 1.0f, 0.0f);

This is saying set your camera on the 'z' axis at -15 and look at the
origin (0,0,0) and make it look up (0,1,0) See the docs for full detail.
This populate your client memory mVMatrix.

then do

//take your width and height of the window and do
float ratio = (float) w / h;
Matrix.frustumM(mProjMatrix, 0, -ratio * 30, ratio * 30, -30 //top,
30//bottom, 3, 7);

Read up on frustum to give it enough height and width and some depth to fit
your coords. You get the projection matrix.

Now do Matrix.Multiply to do

final MVP = projection * mVMarix;

then send your position attributes to the shader and in the shader

gl_position = final MVP * your_position_attribute; //like all matrix
multiplications order is important


On Sun, Sep 2, 2012 at 10:39 AM, Satya Komatineni <
satya.komatin...@gmail.com> wrote:

> Sorry this line
>
> Finally to get your gl_position = mvp * gl_position; and not the other way.
>
>
> should read
>
> Finally to get your gl_position = mvp * positionAttributeVariable; and not
> the other way.
>
>
> On Sat, Sep 1, 2012 at 11:10 PM, Satya Komatineni <
> satya.komatin...@gmail.com> wrote:
>
>> Guich,
>> Given a number of ways how to do the same thing in OpenGL it will be
>> quite hard to debug.
>>
>> On Sat, Sep 1, 2012 at 9:11 AM, guich  wrote:
>>
>>> Hi,
>>>
>>> I've spent a full day trying to draw a series of points using GL_POINTS.
>>> I know i could use a texture, but i want to learn how to draw points. The
>>> resulting image (zoomed) is shown here:
>>>
>>> The code is written below. Any help on why are only 4 points appearing
>>> is greatly appreciated. Although it is possible to create your model, view,
>>> and projection matrices, it is better to use Matrix class and use the
>>> methods available on that class to generate the required matrices.
>>>
>>
>> To get the view matrix you can call
>> Matrix.setLookAtM(viewMatrix)
>>
>> To get the projection matrix
>> Matrix.frustumM(projectionMatrix)
>>
>> Then you can get your ModelViewProjection matrix by doing
>> Matrix.multiplyMM(mvp, projmatrix, viewmatrix)
>>
>> Finally to get your gl_position = mvp * gl_position; and not the other
>> way.
>>
>> I would start with a simple program that works and then gradually
>> increase the complexity. A triangle or a square is a good place to start
>> and then make it work using the examples in the tutorial on the android
>> developer site.
>>
>> If there is a specific issue that you are not clear ask that specifically
>> and you may be able to debug it that way
>>
>> http://satyakomatineni.com/android/training
>> http://satyakomatineni.com
>> http://androidbook.com
>> http://twitter.com/SatyaKomatineni
>>
>>
>>>
>>> <https://lh5.googleusercontent.com/-lelPSZoY4dw/UEIH5mVQfII/AD4/o5q5GMFuL00/s1600/points.png>
>>>
>>> public class MainActivity extends Activity
>>> {
>>>class MyGLSurfaceView extends GLSurfaceView
>>>{
>>>   public MyGLSurfaceView(Context context)
>>>   {
>>>  super(context);
>>>
>>>  setEGLContextClientVersion(2); // Create an OpenGL ES 2.0
>>> context.
>>>  setEGLConfigChooser(8, 8, 8, 8, 0, 0);
>>>  getHolder().setFormat(PixelFormat.RGBA_);
>>>  setRenderer(new MyGLRenderer()); // Set the Renderer for
>>> drawing on the GLSurfaceView
>>> // setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); // Render
>>> the view only when there is a change in the drawing data (must be after
>>> setRenderer!)
>>>   }
>>>}
>>>
>>>public void onCreate(Bundle savedInstanceState)
>>>{
>>>super.onCreate(savedInstanceState);
>>>setContentView(new MyGLSurfaceView(this));
>>>}
>>> }
>>>
>>> class MyGLRenderer implements GLSurfaceView.Renderer
>>> {
>>>byte[][] bitmap = {
>>>  {1,1,1,1,1,1,1,1},
>>>  {1,0,0,1,1,0,0,1},
>>>

[android-developers] How come there is no PROFILE specific URI for raw contact data in the contact api?

2011-11-21 Thread Satya Komatineni
I see that there is a URI for inserting/contributing a raw contact to
the new (4.0) personal profile

ContactsContract.Profile.CONTENT_RAW_CONTACTS_URI

I am able to use this URI to insert a raw contact (with a specific
account type and name) into the personal profile.

However I don't see a corresponding URI for the Data contract such as

ContactsContract.Data.PROFILE_CONTENT_URI

How do one go about addint a data element to a raw contact that
contributes to a profile?

For example I ran the following code

private void insertPhoneNumber(long rawContactId)
{
  ContentValues cv = new ContentValues();
  cv.put(Data.RAW_CONTACT_ID, rawContactId);
  cv.put(Data.IS_USER_PROFILE, "1");
  cv.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
  cv.put(Phone.NUMBER,"P123 123 " + rawContactId);
  cv.put(Phone.TYPE,Phone.TYPE_HOME);
  this.mContext.getContentResolver().insert(Data.CONTENT_URI, cv);
  if (puri == null) {
  log("Not able to insert phone number");
  }
  else {
  log("Not able to insert phone number");   
  }
}

This returns a NULL phone uri indicating that the operation failed.

I am not able to get a clear picture from the documentation. I see
that there are two databases: one for the regular contacts
(contacts.db) and one for the profile contacts (profile.db). I also
see that the raw contacts for profile and the regular contacts are
kept separately.

However I am not able to insert a data value for a personal profile
raw contact.

Appreciate if someone can clarify

Thanks
Satya

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 come there is no PROFILE specific URI for raw contact data in the contact api?

2011-11-22 Thread Satya Komatineni
The immediate problem seem to be "my over caution" that made me put

 cv.put(Data.IS_USER_PROFILE, "1");

My reasoning was that this will be used to distinguish whether to add
the data element to the profile raw contact or the plain raw contact.

That paranoia seem to be unfounded.

when I remove this the code worked fine even with the same
Data.CONTENT_URI with out the need for Data.PROFILE_CONTENT_URI.

The code underneath seem to know this difference by merely looking at
the raw contact id passed in. There must be some logic the code is
using to see where this raw contact id is from.

Anyways temporarily I understand a little m ore.

(Ali, thanks for the link as well)

On Mon, Nov 21, 2011 at 3:48 PM, Satya Komatineni
 wrote:
> I see that there is a URI for inserting/contributing a raw contact to
> the new (4.0) personal profile
>
> ContactsContract.Profile.CONTENT_RAW_CONTACTS_URI
>
> I am able to use this URI to insert a raw contact (with a specific
> account type and name) into the personal profile.
>
> However I don't see a corresponding URI for the Data contract such as
>
> ContactsContract.Data.PROFILE_CONTENT_URI
>
> How do one go about addint a data element to a raw contact that
> contributes to a profile?
>
> For example I ran the following code
>
> private void insertPhoneNumber(long rawContactId)
> {
>  ContentValues cv = new ContentValues();
>  cv.put(Data.RAW_CONTACT_ID, rawContactId);
>  cv.put(Data.IS_USER_PROFILE, "1");
>  cv.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
>  cv.put(Phone.NUMBER,"P123 123 " + rawContactId);
>  cv.put(Phone.TYPE,Phone.TYPE_HOME);
>  this.mContext.getContentResolver().insert(Data.CONTENT_URI, cv);
>  if (puri == null) {
>      log("Not able to insert phone number");
>  }
>  else {
>      log("Not able to insert phone number");
>  }
> }
>
> This returns a NULL phone uri indicating that the operation failed.
>
> I am not able to get a clear picture from the documentation. I see
> that there are two databases: one for the regular contacts
> (contacts.db) and one for the profile contacts (profile.db). I also
> see that the raw contacts for profile and the regular contacts are
> kept separately.
>
> However I am not able to insert a data value for a personal profile
> raw contact.
>
> Appreciate if someone can clarify
>
> Thanks
> Satya
>



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


[android-developers] Help: I have git on windows. I just want to a) see b) download a speciifc android repository

2011-11-23 Thread Satya Komatineni
This is really frustrating try to see/get android source code on windows.

Previously this is fine with the online browsing as the repositories
were available for online browsing.

Anyways, I have downloaded git on windows.

I dont need to compile on windows. I just want to download a
repository to see the source for clarification,

I will seriously appreciate if some can answer the following questions:

1. is there a new git URL that I can use the git clone on?
2. How can I see a list of repositories that could comprise android?
3. Can I clone one of these repositories with just git?


Thank you so very much
(Yes I did read about 50 messages on stackoverflow and here...)
(I am really not prepared to install a linux to get a repository
out..How may operating systems does it take to change a light bulb!!)
-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


[android-developers] Re: Help: I have git on windows. I just want to a) see b) download a speciifc android repository

2011-11-23 Thread Satya Komatineni
Ok, I may be getting somewhere, the following seem to work

git clone https://android.googlesource.com/platform/manifest.git

and

git clone https://android.googlesource.com/platform/frameworks/base.git

will keep you posted

On Wed, Nov 23, 2011 at 7:59 AM, Satya Komatineni
 wrote:
> This is really frustrating try to see/get android source code on windows.
>
> Previously this is fine with the online browsing as the repositories
> were available for online browsing.
>
> Anyways, I have downloaded git on windows.
>
> I dont need to compile on windows. I just want to download a
> repository to see the source for clarification,
>
> I will seriously appreciate if some can answer the following questions:
>
> 1. is there a new git URL that I can use the git clone on?
> 2. How can I see a list of repositories that could comprise android?
> 3. Can I clone one of these repositories with just git?
>
>
> Thank you so very much
> (Yes I did read about 50 messages on stackoverflow and here...)
> (I am really not prepared to install a linux to get a repository
> out..How may operating systems does it take to change a light bulb!!)
> --
> Satya Komatineni
> http://www.satyakomatineni.com
> http://www.androidbook.com
>



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] Help: I have git on windows. I just want to a) see b) download a speciifc android repository

2011-11-23 Thread Satya Komatineni
Mark,
thank you very much. Really appreciate your help on this forum.

The google code search doesnt seem to bring out the 4.0 code. At lease
on my initial search. For instance the contact provider implementation
doesnt seem to match what is there in the API docs.

I will check again. may be i am missing something on code search.

Also I am glad to know, if that is going to be really true, that the
online browsing may be coming back soon.

again thanks a bunch
Satya

On Wed, Nov 23, 2011 at 8:13 AM, Mark Murphy  wrote:
> On Wed, Nov 23, 2011 at 7:59 AM, Satya Komatineni
>  wrote:
>> This is really frustrating try to see/get android source code on windows.
>>
>> Previously this is fine with the online browsing as the repositories
>> were available for online browsing.
>
> Use Google Code Search, at least for the next five weeks.
>
>> Anyways, I have downloaded git on windows.
>>
>> I dont need to compile on windows. I just want to download a
>> repository to see the source for clarification,
>>
>> I will seriously appreciate if some can answer the following questions:
>>
>> 1. is there a new git URL that I can use the git clone on?
>
> There never was just a single git URL, AFAIK. You use the repo command
> in Cygwin to download a whole boatload of repositories.
>
> Instead, clone:
>
> https://android.googlesource.com/platform/manifest
>
> Look at default.xml. It contains a bunch of elements like:
>
> 
>
> The path appears to be relative to
> https://android.googlesource.com/platform, so you can then clone:
>
> https://android.googlesource.com/platform/packages/apps/Email
>
>> 2. How can I see a list of repositories that could comprise android?
>
> I think that page was lost when the GitWeb interface was taken down.
>
>> 3. Can I clone one of these repositories with just git?
>
> See my answer to #1.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] Help: I have git on windows. I just want to a) see b) download a speciifc android repository

2011-11-23 Thread Satya Komatineni
Thank you very much for all the help for this question. This has been
a fruitful morning after all.

I used the following command

git clone 
https://android.googlesource.com/platform/packages/providers/ContactsProvider

to download the latest contacts provider that deals with personal profiles.

Great.

I have uploaded the manifest default.xml that Mark referenced here for
a quick view

http://www.satyakomatineni.com/item/3920

As stated by Mark, you can use this reference to locate the repository
that you want and use the git clone feature to get the latest.

Note that some repositories (such as base.git) are quite large. If you
are using a laptop, plug it in.

thanks again folks, perhaps now I will be able to see some internals
of how personal profile in ics is integrated with the rest of the
contacts

Thanks again

Happy Thanksgiving

Satya

On Wed, Nov 23, 2011 at 8:38 AM, Mark Murphy  wrote:
> On Wed, Nov 23, 2011 at 8:32 AM, Satya Komatineni
>  wrote:
>> The google code search doesnt seem to bring out the 4.0 code. At lease
>> on my initial search. For instance the contact provider implementation
>> doesnt seem to match what is there in the API docs.
>
> It at least has Gingerbread -- I just did a search on CalendarView and
> it popped up. Looks like it might even be something we could pull into
> a separate library project...
>
> But, yeah, it doesn't seem to be indexing ICS, as the new Switch
> widget isn't there. Nor is GridLayout.
>
>> Also I am glad to know, if that is going to be really true, that the
>> online browsing may be coming back soon.
>
> Well, I hope it does, someday. However, if Google Code Search really
> does get shut down, I may cry.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] Emulator takes 15 minutes to start an app, something wrong ?

2011-12-13 Thread Satya Komatineni
I ran for 2 years on 2Gig of RAM. With ICS, on a spur, I have paid 30
dollars to upgrade my 2 year old laptop to 4Gig of RAM.

Everything runs so much better. 2 Gig for a tablet emulator on windows
7 is just not practical.

You will need 4 Gig of RAM on windows boxes, was my conclusion.

On Tue, Dec 13, 2011 at 9:45 PM, Yang Bo  wrote:
> I think it is normal,it start very slow in my laptop (2G cpu,3G RAM)
> either...
>
> 在 2011-12-14 上午10:35,"SL@maxis" 写道:
>
>>
>> I am just playing with some sample applications, eg LunarLander.
>>
>> It takes about 10-15 minutes to start when run the application. Have I
>> missed something ?
>>
>> My machine: XP SP2, 1GB RAM, 10GB free space.
>>
>> Thanks.
>>
>> --
>> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] Updating a database without freezing

2011-09-04 Thread Satya Komatineni
You may want to look at using an asynctask

Here are some research notes on async task (This is not a tutorial but
could point you to do some work)
http://www.satyakomatineni.com/item/3536

On Fri, Sep 2, 2011 at 5:23 PM, Jared Kass  wrote:
> Hi,
> I'm working on an app that records information for a study and posts
> it to a database. An alert dialog prompts the user with a question and
> the answer is recorded and sent. I'm successfully updating the
> database using httpclient and httppost, however it takes a varying
> amount of time, usually several seconds. This is unacceptable, and I
> was wondering how to go about having this run in the background. Any
> advice you could give me would be great, thanks!
>
> -Jared
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] XML parsing in android

2011-09-04 Thread Satya Komatineni
Krishna,
here are research notes I have on XML processing in Android

http://www.satyakomatineni.com/item/3731

You may be able to use XmlPullParser facility but you may need to work
as you process each node sequentially.

If you have the option of JSON the following research link may help

http://www.satyakomatineni.com/item/3687


On Fri, Sep 2, 2011 at 4:00 AM, Krishna Prasad
 wrote:
> Is It possible to parse a dynamically created xml in android?
>
> I want  to display the xml based on fields in the xml.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


[android-developers] my_activity -> brower-activity (How can I go back to my activity)??

2011-09-11 Thread Satya Komatineni
My Activity A  starts BrowserActivity with a URL. (No flags)

I press BACK button while in the browser

Browser follows its own history back and not come back to my activity A.

Because I am starting the browser activity (I do realize it is a
singletask) is there any flag I can set to have the browser honor the
activity that is invoking it?

Appreciate your help

Satya

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

2011-10-08 Thread Satya Komatineni
A,

My understanding is that if your refresh rate is above 30 mins, then
it will impact accordingly. The recommendation is to put it no quicker
than 30 mins and I believe starting somewhere around 2.0 this was
enforced by either making it 30 mins at least.

Bottom line appears to be place this above 30mins to save power and is
enforced as such.


On Sat, Oct 8, 2011 at 9:35 AM, A. Purohit  wrote:
> Hi all,
>     I read that widget is refreshed after 30mins and there is almost no
> meaning of refresh rate specified in XML file.
> To overcome this, we have to use AlarmManager if we want to make refresh
> rate < 30mins!
>
> Is this still valid or this was true till Android 1.5 only?
>
> Thanks,
> -A
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

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


Re: [android-developers] ImageView.getWidth() at the start of my App

2012-05-12 Thread satya attili
hi...

how to implement payment gate way in android application...

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

[android-developers] what are the restrictions on the declare-styleable name attribute? (Does it allow sub packages?)

2012-05-22 Thread Satya Komatineni
what happens if I have two custom views

com.mycompany.projectname.CustomView
com.mycompany.projectname.subpkg.CustomView

How do I declare styleable resoruce for these classes? (of course I
can name them differently, but is that the only way?)

Here is an example



   .



would I then do for the second sub package custom view?



   .



If so how does the constant

R.styleable.CustomView

look for the sub pakcage "subpkg.CustomView?"

I suppose I can try it and see but If one of you is kind enough to
throw some light

Thanks
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

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


[android-developers] A free article on Android custom attributes

2012-06-15 Thread Satya Komatineni
It turns out there is a little bit of depth to android custom
attributes. These are the XML attributes that you can use for your own
custom views in layout files.

I have collected my research notes into a proper article and posted it at

http://satyakomatineni.com/item/4169

This article will answer the following questions

What are custom attributes?
Why use custom attributes?
How do you code a custom class?
How do you specify a custom attribute?
Do you have to define a custom attribute to Android?
Where do you have to define a custom attribute to Android?
What is AttributeSet?
What is TypedArray?
How do you read a custom attribute in your java code?
What is the styleable tag?
What is attrs.xml?
Does the name of a styleable tag need to match your java custom view name?
How do you declare a namespace for your custom attribute?
Do you need to declare your namespace differently if you have a sub package?
Do you need to specify package/sub-package name for your custom view
class in a styleable?
Does an attribute name has to be unique in your entire package?
Can a styleable grouping avoid attribute name uniqueness constraint?

http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

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


Re: [android-developers] My AVD is super slow

2012-09-15 Thread Satya Komatineni
what is your computer and OS?

if it is windows it helps to have 4G or more. It could still be slow
but much better exprience. It further helps if you have a solid state
drive. It also helps to keep the AVD running once it has started.

http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

On Fri, Sep 14, 2012 at 11:37 PM, _Chilling  wrote:
> Hi All,
>
> I am pretty new to Android SDK. I am trying to write my first hello world
> program. The AVD that I have created is super slow in performance and I am
> pretty sure this is not ow a real world phone performs.
>
> Any tips on making this better ?
>
> My AVD is set up as
>
> Android 4.0.3 // assuming this is the current biggest market share and the
> right decision to code against
> CPU ARM
> SD card size 512 mB
> Skin - Default WVGA800
>
> lcd density: 240
> cpumodel: cortex-a8
> vm.headsize:48
> vm.ramsize: 512
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en


i

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

2012-10-04 Thread Satya Komatineni
May be this is a long shot. But may be you can look at 3D modelling
tools like AutoDesk and see if you can export the 3D structures to be
consumed by Android.


Just a thought. I expect lot of work but worth doing... Tue, Oct 2,
2012 at 4:18 PM, ANDRÉS LEONARDO MOLINA

Good luck
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni


 wrote:
> Hi,
>
> Actually I´m working in a very important project at UDFJC University In
> Colombia. I have an idea--- Create a software application about structural
> design...
> Do you give me some information of resources what I need for this
> development??? The application includes 3D Modeling, calculation of
> materials and basic costs module. I´m a little confused about how to start,
> what platforms to generate code that is compatible with android and other---
>
> Could you please help me???
> Some info, please let me know!!!
>
>
> Regards!
>
> --
> ANDRÉS LEONARDO MOLINA B.
> Tecnólogo Mecánico
> Universidad Distrital Francisco José de Caldas
> Diseñador • ezGo S.A.
> (57) 1 747 0252 Ext. 406 • 313 264 6258
> Bogotá, Colombia
>
> P Salva un árbol... no imprimas este e-mail si no es necesario.
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] optimized way to get large data from webservice(json or xml)

2012-10-09 Thread satya attili
Hi  Friends..

This is satya, new to android development, can anybody...

fetching the data from json or xml format, ok..

how can we achieve the the best optimized way to do this...


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: optimized way to get large data from webservice(json or xml)

2012-10-09 Thread satya attili
Thank you.
but..
let us understand my problem..

i have an json or xml data in the server with large amount of data...
at the time of fetching and i want to show in listview..
so its takes so long time to ready my listview...

alternate to this, any better solution... like fetch the data with time
interval ?

i hope u got it..

i have an idea like this, first fetch the total data to my SQLite DB after
that i will add to my list view...
is it good??






On Wed, Oct 10, 2012 at 12:04 AM, Matt Kanninen wrote:

> Try:
>
>
> http://stackoverflow.com/questions/10254872/download-sqlite-database-from-internet-and-load-into-android-application
>
> -MK
>
>
> On Tuesday, October 9, 2012 11:30:24 AM UTC-7, satyaandroid wrote:
>>
>> Hi  Friends..
>>
>> This is satya, new to android development, can anybody...
>>
>> fetching the data from json or xml format, ok..
>>
>> how can we achieve the the best optimized way to do this...
>>
>>
>> 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

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

[android-developers] Does an onDraw() get called if I don't do "invalidate()" but did the "requestLayout()"?

2012-10-20 Thread Satya Komatineni
For a UI action in the same thread:

//On my view I call requestLayout()
ViewRoot schedules a traversal

//I don't call invalidate() on my view
So, no rectangle is invalid (I am assuming that is the assertion
because I didn't call invalidate)


Is it possible that the layout phase may invalidate() some of the
views? I suppose for those views that don't change their position or
size, I am assuming onDraw() won't be called.

Wondering if someone could comment on this.

Thanks a lot.
Satya

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Does an onDraw() get called if I don't do "invalidate()" but did the "requestLayout()"?

2012-10-21 Thread Satya Komatineni
Thank you very much. That helps.

what if the layout results in shifting a view in its placement (origin
change but not size). will that result in using the cached results of
the previous draw?


On Sat, Oct 20, 2012 at 4:19 PM, Romain Guy  wrote:
> requestLayout() itself does not lead to a draw pass but some views might
> react to a
> Layout change by calling invalidate.
>
> On Oct 20, 2012 12:59 PM, "Satya Komatineni" 
> wrote:
>>
>> For a UI action in the same thread:
>>
>> //On my view I call requestLayout()
>> ViewRoot schedules a traversal
>>
>> //I don't call invalidate() on my view
>> So, no rectangle is invalid (I am assuming that is the assertion
>> because I didn't call invalidate)
>>
>>
>> Is it possible that the layout phase may invalidate() some of the
>> views? I suppose for those views that don't change their position or
>> size, I am assuming onDraw() won't be called.
>>
>> Wondering if someone could comment on this.
>>
>> Thanks a lot.
>> Satya
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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



-- 
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

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


[android-developers] Is it redundant to call "invalidate()" in the onSizeChanged method?

2012-10-22 Thread Satya Komatineni
I looked at the "setFrame()" method of the parent view class. This
method calls onSizeChanged() only if there is a change in size of that
view. If there is a change in size it also calls "invalidate()".

So am I right in thinking that it is redundant to call invalidate() in
onSizeChanged() method.

Also I don't see any difference between taking the width and height
from the onSizeChanged() or from the view methods of getTop(),
getLeft() etc. am I missing something here?

Thanks a lot
Satya

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

2012-10-22 Thread Satya Komatineni
I am doing more research to see if this indeed is the case. But here
are the symptoms



   
  
  


In the custom circleview constructor I set the minimum height and width.

I was hoping these minimum sizes will be used if the height of my
custom view is "wrap_content". But looks like linear layout never
sends out the "unspeicified" but only does the 'at_most' making the
getDefaultSIze return the entire space after the first text view. In
fact the last textview is beyond the screen below.

Do I have to write onMeasure() in the custom view and deal with
"wrap_content" separately? why is LinearLayout not measuring the
desired size?

Your insights are greatly appreciated

Thanks
Satya

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

2012-10-22 Thread Satya Komatineni
Does "wrap_content" always result in "AT_MOST"?

If it says 411 pixles at most, I would have thought I will take all of
it because I could use that. I would not have thought to give back my
"content" size. Just thinking aloud.

what will "match_parent" do? Does that come in as "EXACT", matching
the size of the parent?

Thank you so much for your help. It saved me hours of agony that I am
about to jump into  ...
Satya

On Mon, Oct 22, 2012 at 5:40 PM, Romain Guy  wrote:
> LinearLayout is doing the right thing. wrap_content results in an
> AT_MOST MeasureSpec. If you are writing a custom view that extends the
> base View class you really should override onMeasure().
>
> On Mon, Oct 22, 2012 at 2:33 PM, Satya Komatineni
>  wrote:
>> I am doing more research to see if this indeed is the case. But here
>> are the symptoms
>>
>>
>> 
>>
>>   
>>   
>> 
>>
>> In the custom circleview constructor I set the minimum height and width.
>>
>> I was hoping these minimum sizes will be used if the height of my
>> custom view is "wrap_content". But looks like linear layout never
>> sends out the "unspeicified" but only does the 'at_most' making the
>> getDefaultSIze return the entire space after the first text view. In
>> fact the last textview is beyond the screen below.
>>
>> Do I have to write onMeasure() in the custom view and deal with
>> "wrap_content" separately? why is LinearLayout not measuring the
>> desired size?
>>
>> Your insights are greatly appreciated
>>
>> Thanks
>> Satya
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] What is the norm these days to save the state of a custom view

2012-10-24 Thread Satya Komatineni
The literature seem to indicate a number of alterantives

1. Just have the activity or fragment call a dedicated save and
restore methods especially if the base class of your SpecialView is
View.
2. Use the View's capabilities of onSaveInstanceState() and ignore the
"null" from the VIew implementation
3. Or use the BaseSaveState pattern that is used by things like TextView etc.

Appreciate your thoughts and comments.

Thanks
Satya

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


  1   2   3   >