[android-beginners] obtain the SDK level

2010-06-02 Thread Jeffrey Blattman
how can i programmatically obtain the SDK level?
thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] alarm manager question

2010-01-13 Thread Jeffrey Blattman
my understanding of the alarm manager service is that it's something 
similar to cron. the service always runs, and sends intents at the 
specified time. it doesn't require that any aspect of your app / service 
is running. so for example, i could start my app which schedules an 
alarm, and then kill off any related app / service / receiver processes. 
the alarm should still be delivered.


is this correct?
--
<>-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Passing object references

2010-01-13 Thread Jeffrey Blattman
i don't think putExtra() passes a reference, it uses serialization, 
which is why the object you pass needs to implement serializable. a 
subtle difference that may or may not be relevant.


On 1/13/10 3:58 AM, Sean Hodges wrote:

Use Intent.putExtra():
http://developer.android.com/intl/fr/reference/android/content/Intent.html#putExtra(java.lang.String,
android.os.Bundle)

An example can be found here: http://www.agilemedicine.com/medBlog/?tag=putextra

Something like this should work for you:

Intent i = new Intent("ww.main.LOCATOR_SERVICE");
i.putExtra(myObject);
context.startService(i);

Ensure the class for "myObject" implements Serializable.


On Wed, Jan 13, 2010 at 11:40 AM, Nick Burton
  wrote:
   

I'm a bit confused about passing object references... if we start a
service using intents, how can we pass refs between the class where
this code sits, and the service? There's no object created by me so I
can't pass parameters...

--
Intent i = new Intent("ww.main.LOCATOR_SERVICE");
context.startService(i);
--

Or am I starting the service incorrectly?

Cheers,

Nick

--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


 


--
<>-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] purchases across multiple phones

2010-01-06 Thread Jeffrey Blattman
i was curious how the market treats multiple phones for a given google 
ID. if i have two phones, will i be able to install a purchased app on 
both? or would i need to re-purchase the app for each phone?


--
<>-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Android Map API Key

2009-12-16 Thread Jeffrey Blattman
http://code.google.com/android/add-ons/google-apis/mapkey.html#getdebugfingerprint

On 12/14/09 8:19 PM, Linh, Peter wrote:
> Hi all,
>
> I just start android app development few days ago since im quite
> excited with the google map. But i find problem finding the map api
> key for using it in my app. As i know, i need to register the MD5
> fingerprint from debug.keystore. However, i have no clue of finding
> this file in my computer.
>
> FYI, i use eclipse for my development and all the SDK, JRE are
> installed. Please help me on this!
>
> Thanks.
>
>

-- 

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

Re: [android-beginners] Seeing What Phone Numbers Are Around You

2009-12-16 Thread Jeffrey Blattman
that would be a bit of a security problem if you could do that. you 
could write a simple peer-peer app that would need to be running on all 
discoverable phones. of the the user needs to explicitly run the app.

On 12/14/09 8:54 PM, Taylor Perkins wrote:
> Hi group,
>
> I have an idea, and I was wondering if it was possible to see what
> phone numbers are around a single phone.
>
> For example, if I am a Motorola Droid, and there is a Motorola Droid 2
> feet away from me, I want to be able to see what phone number that
> Droid has.
>
> Anyone have any ideas, or links to point me in the right direction?
>
> Thanks!
>
>

-- 

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

Re: [android-beginners] How to just upgrade from 1.5 to 1.6?

2009-12-14 Thread Jeffrey Blattman
talk to your provider. they push out OTA updates, on their schedule.

On 12/11/09 7:57 AM, Eduardo Luis wrote:
> Hi,
>
> I just a bought a brand new HTC Magic from Vodafone Portugal. This one
> brings the 1.5 version.
> How can I OFFICIALY upgrade to 1.6? Not unlock. Just upgrade.
>
> Thanks.
>
>

-- 

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

Re: [android-beginners] adb push ..... system/lib

2009-12-14 Thread Jeffrey Blattman
do you have /system mounted read / write?
http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html

On 12/10/09 7:30 PM, me,Ramesh Yankati wrote:
> Hi Have you installed USB driver??.
>
>
>
>
> Regards
> Ramesh
> On 12/11/09, Zlate87  wrote:
>
>> Hi,
>>
>> I'm trying to install voice search to my t-mobile pulse.
>>
>> However I run in to a problem, I need to run this command "adb push C:
>> \libspeech.so system/lib", but I get error: "read-only file system".
>>
>> I read that "adb remount" will help, but when I run it, I get this
>> error: "operation not permitted".
>>
>> I also read that "adb root" will help, but when I run it, I get this
>> error: "adbd cannot run as root in production builds".
>>
>> I have enabled USB debugging in Settings->Applications->  Development.
>>
>> Can someone please help me?
>>
>> Thanks in advance :)
>>
>> Regards,
>> Zlatko Stamatov
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>> To post to this group, send email to android-beginners@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-beginners+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>  
>

-- 

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

[android-beginners] Re: Can't make columns of RadioButtons in a RadioGroup

2009-12-13 Thread Jeffrey
I don't think so, I ran into the same problem with my code, and I
simply made an onClickListener for every radio button that when
clicked would run a method that set all the radio buttons
to .setChecked(false) and then  the listener would .setChecked(true)
the one they clicked. It's a ghetto way of doing it but it works. I
wish they would fix little things like this. And don't even get me
started on trying to make vertical seekbars...

On Dec 13, 1:24 am, launchpadtt  wrote:
> Hello,
>
> I have a bunch of radiobuttons in a radiogroup and I would like for
> them to be arranged in two columns. The reason being so that they fit
> on the screen and so that I can change the columns to be four in
> landscape mode. I thought to intermingle the tablelayout with the
> radiogroup. with the following code:
>
>  android:layout_height="wrap_content"
> android:layout_width="fill_parent">
>   
>      android:layout_height="wrap_content"
> android:layout_width="fill_parent">
>        android:text="One" android:id="@+id/RadioButtonOne"
> android:layout_weight="1" android:layout_width="fill_parent"> RadioButton>
>        android:text="Two" android:id="@+id/RadioButtonTwo"
> android:layout_width="fill_parent" android:layout_weight="1"> RadioButton>
>     
>      android:layout_height="wrap_content"
> android:layout_width="fill_parent">
>        android:text="Three" android:id="@+id/RadioButtonThree"
> android:layout_weight="1" android:layout_width="fill_parent"> RadioButton>
>        android:text="Four" android:id="@+id/RadioButtonFour"
> android:layout_weight="1" android:layout_width="fill_parent"> RadioButton>
>     
>   
> 
>
> In this setup, the radio buttons show up in neat columns but the
> problem is the instant that I do that it takes them out of the
> radiogroup.
>
> I tried leaving them in the TableLayout and just changing the parent
> of the radiobuttons by using radiogroup.addView(eachbutton) but that
> wouldn't work since they were already defined in the xml.
>
> I also tried just having a regular radiogroup with the radiobuttons in
> them and then just changing the orientation to horizontal, so that I
> could set the width programatically based on the screen width
>
>  android:layout_weight="1">
>    android:layout_width="fill_parent" android:layout_height="fill_parent"
> android:layout_weight="1" android:orientation="horizontal">
>      android:text="One" android:id="@+id/RadioButtonOne"
> android:layout_width="wrap_content">
>      android:text="Two" android:id="@+id/RadioButtonTwo"
> android:layout_width="wrap_content">
>   
> 
>
> but that wouldn't work either. as many as would fit into one row would
> fit and the rest would be off the screen.
>
> Is there a way to arrange them in such a fashion while still keeping
> them in the radiogroup?

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


Re: [android-beginners] a 2.0 simple project revert to 1.5

2009-12-05 Thread Jeffrey Blattman
right click on the project in eclipse, and select properties, then android.
you can choose the SDK level here.

On Sat, Dec 5, 2009 at 3:02 AM, Marton Kodok  wrote:

> I have project created with SDK 2.0, and I want to deploy on a phone having
> 1.5
> The project doesn't use any SDK specific calls, so it should be straight
> forward.
>
> How can I create/deploy my app for 1.5?
>
> --
> Márton
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> To post to this group, send email to android-beginners@googlegroups.com
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en

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

[android-beginners] WebView.loadData(), encoding? missing chars?

2009-12-04 Thread Jeffrey Blattman
this code,
 ...
 s = "\u02c8\u0254\u0279\u0292\u0259";
 mWebView.loadDataWithBaseURL("fake://", s, "text/html", 
"utf-8", "about:blank");

results in garbage chars in the web view,



in the debugger. i actually read the string from somewhere else using 
utf-8 encoding, so it must be a utf-8 encoded string.

printed to the terminal, the string looks correct.



the string

\u00e6\u00f8\u00e5

passed to the webview renders the correctly. i'm pretty confused about 
what's going on. it appears that i am correctly passing the string to 
the webview as the second string renders correctly. could the engine 
behind the webview be missing a mapping for some utf-8 characters? i'm 
not even sure if that question makes sense.

and ideas are appreciated.

-- 

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

Re: [android-beginners] AlertBuildeer Problem

2009-12-04 Thread Jeffrey Blattman
you can inflate a custom layout and call setView(). set whatever width / 
height you want there.

On 12/3/09 9:05 PM, vinny.s...@gmail.com wrote:
> HI
> How can i reduce the size of alertbuilder and show in middle with
> paerticular width and height
>
>

-- 

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

[android-beginners] listen for / notify on widget removal?

2009-12-01 Thread Jeffrey Blattman
is there a way to listen for the removal of a widget? i have a widget 
that updates itself via setting alarms. when the widget is removed, the 
service behind the widget continues to run. that's not what the user 
expects i think.

any ideas are appreciated.

-- 

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

[android-beginners] emulator sleep?

2009-12-01 Thread Jeffrey Blattman
i am writing a widget and trying to prove that it doesn't run when the 
phone is in deep sleep as i am setting an alarm with type ELAPSED_REALTIME.

when i hit the end call on the emulator the device screen goes blank, 
but i still see my alarms being delivered. am i missing something?

thanks.

-- 

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

Re: [android-beginners] Can I update my Motoblur firmware 1.5 to the 2.0?

2009-11-30 Thread Jeffrey Blattman
even if you root your phone, you still need a build of android for your 
device. the "motorblur" dist of android comes from motorola so assuming 
you can find a build of android for your device, you will lose that 
motoblur garbage.

On 11/30/09 11:03 AM, Justin Anderson wrote:
> Only if you root your phone... otherwise the update needs to come from 
> your cell phone carrier
> --
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> --
>
>
> On Sun, Nov 29, 2009 at 10:57 AM, placerex  > wrote:
>
> I want to know, i want to be updated.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> To post to this group, send email to
> android-beginners@googlegroups.com
> 
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> 
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> To post to this group, send email to android-beginners@googlegroups.com
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en 

-- 

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

[android-beginners] Buttons within custom dialog?

2009-11-10 Thread Jeffrey
I am trying to get a custom dialog to have buttons that manipulate the
progress of a seekbar. I've set up the dialog layout through xml but I
can't get the buttons to work.

This is the code I'm getting stuck on:

protected Dialog onCreateDialog(int id) {
Dialog WoundSlider = new Dialog(this);
Button BDOWN = (Button) WoundSlider.findViewById(R.id.BDOWN);
BDOWN.setOnClickListener(new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {

}
});

I keep getting an error that says: "The method setOnClickListener
(View.OnClickListener) in the type View is not applicable for the
arguments (new DialogInterface.OnClickListener(){})"

It then lists several other listeners that it suggest I change to but
I get the same error for all of them. How do I set up a listener
within a custom dialog?

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


Re: [android-beginners] Re: Suggestions on tutorials

2009-11-09 Thread Jeffrey Blattman
shawn,

you do not have to define your layout in XML. you are free to build it 
up your android layout view programmatically, if you so wish. as a side 
note, if you are doing any sort of development, on any platform, you 
will be hard pressed to avoid XML. that's just a fact so don't kill the 
messenger.

what XML is good at is providing an easily parsable machine 
communication mechanism. a lot of what you say is true, but only because 
XML is being misused. the ADT plugin provides GUI wrappers around most 
(all?) of the XML you need to write, but of course the plugin is lacking 
so you quickly get to a point where you need to get into the XML.

good luck.

On 11/9/09 1:36 PM, Indicator Veritatis wrote:
> If you really want to learn to code using the  Android SDK, then you
> WILL use the XML. Otherwise, you simply are not using Android after
> all. In that case, you should give up your membership in the Google
> Beginner's group, since you will get nothing out of it.
>
> On Nov 7, 1:20 pm, sfitzjava  wrote:
>
>> Wow thought I said I "Please no .. benefits of XML (BECAUSE YOU
>> ARE WRONG. [PERIOD])".
>> So thanks for wasting my time reading your diatribe and you are wrong
>> still.  Sadly you would jump over a cliff if some
>> script kiddie told you it was the new thing to do.
>>
>> So to quickly cut through all of your BS.
>> XML in android is processed down to Java at compile time.
>> XML does not make your system any more flexible than writing it in
>> standard java (unless you don't know how to program)
>> XML is error prone
>> XML is not a programming language
>> XML is BLOATED!
>> XML is a data description syntax for communication between
>> heterogeneous system.
>> XML is a data description syntax which supports data versioning.
>> XML can not be debugged
>> XML has to be gen'ed into the R.class
>> XML tag has to match what is typed in the java code, and there is no
>> validation since the R.class is not constantly regen'ed.
>> XML is not validated, nor has any javadocs, nor has any code
>> completion support.
>> XML can not be visualized without building and running the app.
>>
>> Now if Google wants to make a decent tool such as Apple has with XCode
>> InterfaceBuilder  (not calling xcode perfect but it does a very nice
>> job) then I don't care what they save their files in, and I will
>> happily jump back and forth if it saves me time, boilerplate coding,
>> code bloat that gets in the way of debugging, and helps with the
>> maintainability of the codebase.  To date XML in android does none of
>> these.
>>
>> Also don't talk to me like I have no idea about technology, ESPECIALLY
>> MOBILE!!!
>> It is clear that you use technology and do not understand it.  Your
>> use of the statement "XML is used everywhere"
>> as some type of validation demonstrates that.  Millions of people
>> believed for hundreds of years that the world was flat,
>> that the earth was the center of everything, more recently that
>> Quantum physics was a pipe-dream.
>>   If XML is the greatest then why was JSON developed?
>>
>> So unless you can answer my question you need not reply.
>> Again to be clear the question is, "Any tutorials for android that do
>> not require XML".
>>
>> -Shawn
>>
>> On Nov 3, 12:33 am, confetti  wrote:
>>
>>  
>>> Shawn,
>>>
>>  
>>> I'm not going to tell you that you should use xml because I'll be the
>>> first to admit, it's a hard thing to learn. However, saying there are
>>> absolutely no benefits to xml is wrong. There are benefits and costs
>>> to every computer related technology. Xml can offer a flexible, easy
>>> to change GUI. In android, it lets you define several different
>>> layouts for a single activity without ever having to change a piece of
>>> code.
>>>
>>  
>>> On the other hand, I also understand the benefits of hardcoding a UI.
>>> It requires less jumping between files, and less resource management
>>> (although android makes that very easy indeed).
>>>
>>  
>>> I would like to point out that rejecting a widely used technology like
>>> xml completely is going to make it very difficult for you to compete
>>> in today's tech industry. Xml is a part of everything. If you didn't
>>> know, Google Groups, gmail, iGoogle, bing, msn.com, and thousands of
>>> other websites use a technology called AJAX, in which xml is an
>>> integral part. Without it, we couldn't have the cool behaviors like
>>> partial-page refreshes. On the software side, xml is used in thousands
>>> of applications across the world as a standard for transferring data
>>> between places. Even Microsoft Office and OpenOffice.org save all of
>>> their documents and files in xml now.
>>>
>>  
>>> To answer your question, the only way to "truly" learn to program
>>> android applications is to do it. Just like with any language and
>>> platform, you can't become good at it without practice. I find the
>>> easiest way for me to learn is to come up with a too

[android-beginners] trust all certs using http client?

2009-11-04 Thread Jeffrey Blattman
i'm trying to use the httpclient.* API in the android SDK to make an 
HTTPS connection. i would like to accept self-signed certs automatically 
(trust all certs) i found references to EasySSLProtocolSocketFactory, 
which is part of standard apache httpclient, but it's not in android.

has anyone tackled this?

-- 

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

android-beginners@googlegroups.com

2009-11-02 Thread Jeffrey Blattman
well ... what carrier was the phone made for?

i know at&t and t-mo's 3g networks are not compatible. so if it's locked 
to say t-mo and you want to unlock it and use it on at&t, you won't get 
3g (you'll get edge only). if you are just staying with t-mo (or 
whoever), then unlocking won't affect it.


On 11/1/09 11:20 PM, baddestguy wrote:
> Hey Jeffery, If i were to unlock my motorola cliq would the 3g
> coverage, mms and other stuff still work on my t-mobile?
> Thanks!!!
>
>
>
>
> On Oct 17, 6:35 pm, Jeffrey Blattman
> wrote:
>
>> that's how unlocking works for many other smartphones ... pay some shady
>> company $5 to $30  and get a code in the mail in 24 hours or less. it's
>> how i unlocked my g1.
>>
>> On 10/17/09 4:15 PM, Vladimir Kelman wrote:
>>
>>  
>>> BTW, I found this... may be a scam, what you think?
>>>
>>  
>>> http://cgi.ebay.com/%3D%3DUNLOCK-CODE-FOR-T-MOBILE-MOTOROLA-CLIQ%3D%3...
>>>
>>  
>>> On Oct 17, 5:28 pm, Vladimir Kelmanwrote:
>>>
>>  
>>>> I'd be happy to be able to unlock Motorola Cliq and to use with AT&T.
>>>> Any experience with that? (It was easy 
>>>> enoughhttp://pro-thoughts.blogspot.com/2009/09/how-to-upgrade-android-devph...
>>>> to set up Android Dev Phone 1 (HTC) to work in AT&T, except that
>>>> Internet is a bit slow, because AT&T uses non-compatible frequency...)
>>>>  
>> --
>>  
>

-- 

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

Re: [android-beginners] Slow emulator

2009-11-02 Thread Jeffrey Blattman
on my mac, i find the emulator runs at about the same speed as my phone. 
i don't know if that's by design or just a coincidence. how slow is "slow"?

On 11/1/09 1:44 PM, Curran wrote:
> Hi guys,
>
> Pretty new to the whole Android idea, I am buying the HTC hero soon
> and would quite like to develop for it. I have found on my PC that the
> emulator runs really slowly- to get to actually being able to use my
> app when emulating takes around a minute and a half. Can anyone
> suggest why? I use Eclipse, with Windows 7 and a good-but-not-amazing
> spec laptop. Please help! Thanks
>
>

-- 

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

Re: [android-beginners] Re: alarm manager confusion

2009-11-02 Thread Jeffrey Blattman
hmmm. i'd suggest not killing any processes. the problem would be if 
under normal OS usage, the alarm is not activated. i can't say i 
understand exactly how the OS handles alarms, but perhaps forcefully 
killing processes interrupts it's workings.

On 10/30/09 4:04 AM, marc wrote:
> jeffrey, how did you solve the problem?
> i made a own process for the broadcastreceiver (as said in the linked
> theme), so i have 2 processes now:
> cycle:
> 1. user starts application
> 2. user schedules the alarm in the application
>
> current processes:
> - application
>
> 3. scheduled alarm expires, broadcastreceiver will be started
> 4. broadcastreceiver execute his work and SCHEDULES A NEW ALARM
>
> current processes:
> - application
> - broadcastreceiver
>
> 5. scheduled alarm expires, broadcastreceiver will be started
> 6. broadcastreceiver execute his work and SCHEDULES A NEW ALARM
>
>
> if i kill the application after step 2, the scheduled alarm survives.
> if i kill the alarm after step 4. the scheduled alarm is lost, step
> 5/6 will not be executed.
>
> how did you do it?!
>
> thank you for a answer.
> marc
>
>
> On Sep 13, 12:33 am, Jeffrey Blattman
> wrote:
>
>> well, i found this,http://code.google.com/p/android/issues/detail?id=2886
>>
>> works for me now.
>>
>> On 9/12/09 2:00 PM, Mark Murphy wrote:
>>
>>
>>
>>  
>>> Jeffrey Blattman wrote:
>>>
>>  
>>>> mark, "perhaps some sort of service" is a little vague.
>>>>  
>>  
>>> Generally speaking, if your manifest-registered BroadcastReceiver will
>>> be doing things that are short (say, under a second), you won't need one
>>> -- just do all your work in the BroadcastReceiver.
>>>
>>  
>>> If you are going to do things that may take longer than that, such as
>>> uploading something via the Internet, you'll need to delegate that work
>>> to a service that can do things in a background thread (e.g.,
>>> IntentService). A manifest-registered BroadcastReceiver cannot fork a
>>> thread, and it is called on the "UI thread", which does not support
>>> time-consuming operations.
>>>
>>  
>>>> the AM schedules an alarm that calls a receiver that does three things,
>>>>  
>>  
>>>> 1. updates some data that is shared with the activity
>>>>  
>>  
>>> You don't indicate where, but I'm going to assume the data is on the
>>> device, not the Internet.
>>>
>>  
>>>> 2. sends notifications
>>>> 3. broadcasts back to another receiver that updates the activity, if
>>>> it's running (the activity registers / unregisters the receiver in
>>>> onResume(), onPause(), so it doesn't get called if it's paused or stopped).
>>>>  
>>  
>>>> i *could* have the scheduled BR call a service like in your example, but
>>>> why can't i just have the scheduled BR do the work?
>>>>  
>>  
>>> Assuming #1 above is not too time-consuming, you can.
>>>
>>  
>>>> why would that make
>>>> a difference as to whether the BR is being called or not, which is the
>>>> root of my problem?
>>>>  
>>  
>>> In my first reply, I wrote:
>>>
>>  
>>> "You could encounter that behavior if you registered your
>>> BroadcastReceiver via Java, instead of via the manifest."
>>>
>>  
>>> You never stated, in any of your messages, how your code sets up your
>>> BroadcastReceiver. And, since the only way to really use AlarmManager
>>> effectively is to use a BroadcastReceiver registered via the manifest, I
>>> have been trying to steer you in that direction.
>>>
>>  
>>> If I am correct, and presently your alarm-catching BroadcastReceiver is
>>> registered via registerReceiver() in some Java code, then that will only
>>> respond to alarms so long as whatever contains it (e.g., activity) is
>>> running. In this case, change your application logic to have the
>>> BroadcastReceiver be its own standalone public class (vs. an inner class
>>> of something else), dump the registerReceiver() and unregisterReceiver()
>>> calls for it, put it in the manifest via aelement, and see
>>> if that improves your results. The example I have been pointing you to
>>> demonstrates receivers registered this way. There are a few other
>>> examples of this technique in the SystemEvents set of projects.
>>>
>>  
>>> If you *do* have your BroadcastReceiver registered via the manifest,
>>> though, and you're not getting the alarms, then something else is afoot.
>>>
>> --
>>  
>

-- 

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

Re: [android-beginners] Re: How to Replace of existing default Application by the Application created by me without user intervention

2009-11-02 Thread Jeffrey Blattman
there are several home replacement apps on the market. you might try 
contacting the developers and seeing if they can give you some pointers, 
or if their apps are open source you could take a look at the source.

On 10/29/09 11:54 PM, Anne wrote:
> I want to replace the Androids Default Home screen with my Home
> Application.
> How can I remove these Properties form the Androids Default Home
> screen?
>
> One more Query I had Was.
> Is it possible to write an application with an Activity containing a
> Button, and on click of the Button the default Home application is
> replaced with my Home Screen Application( not using the
> ResolverActivity Dialogue Box)?
>
> Any suggestions on how to do is appreciated.
>
>   Thanking in Anticipation
> -Anne
>
>
> On Oct 29, 4:55 pm, sbruno74  wrote:
>
>> You need to make sure that the activity you want to be the home
>> activity is the only one having category MAIN and category LAUNCHER
>> properties. It seems that you forgot to remove those properties for
>> the previous activity so android doesn't know which one to use a.d ask
>> you to make a.choice.
>>
>> Stéphane
>>
>> On Oct 29, 12:47 am, Anne  wrote:
>>
>>  
>>> Hello All,
>>>
>>  
>>> I Was trying toreplacetheexistinghomeapplicationwith my home
>>> application.
>>>
>>  
>>> In the Manifest file of myapplicationI have put the category as
>>> DEFAULT.
>>> now when the home is launched for the 1st time the Dialogue box
>>> (ResolverActivity) pops up askinguserto select adefault
>>> application.
>>>
>>  
>>> Can any one please tellmeif there is a way to set myapplicationas
>>> DefaultApplicationwith outUserIntervention.
>>> Some Package manager API that can set myapplicationasdefaultor
>>> something like that.
>>>
>>  
>>> Thanking you in Anticipation.
>>>
>>  
>>> Regards,
>>> Anne.
>>>
>

-- 

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

Re: [android-beginners] RGB from bitmap

2009-11-02 Thread Jeffrey Blattman
http://developer.android.com/reference/android/graphics/Color.html

On 10/31/09 4:31 AM, Andareena Vootog wrote:
> hi
> if you are using bitmap, use an integer array to store the 
> bitmap. use bitmap.getPixel() to get the corresponding bitmap in 
> integer array. By using bitwise rotation operation, we will get RGB 
> values. (Also byte array can be used). See the code below.
>
>  int[] pix = new int[picw * pich];
> bitmap.getPixels(pix, 0, picw, 0, 0, picw, pich);
>
> int R, G, B,Y;
>
> for (int y = 0; y < pich; y++)
> for (int x = 0; x < picw; x++)
> {
> int index = y * picw + x;
> int R = (pix[index] >> 16) & 0xff; //bitwise shifting
> int G = (pix[index] >> 8) & 0xff;
> int B = pix[index] & 0xff;
>
> //R,G.B - Red, Green, Blue
>  //to restore the values after RGB modification, use 
> //next statement
> pix[index] = 0xff00 | (R << 16) | (G << 8) | B;
> }
>
>
>
> Thanks and Regards,
>
> Andarena Vootog
> Vootog Information Systems  Pvt Ltd.
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> To post to this group, send email to android-beginners@googlegroups.com
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en 

-- 

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

[android-beginners] Re: listen for when my app is installed

2009-10-28 Thread Jeffrey Blattman




ehhh ... they are sample files that the user is allowed to edit. i was
trying to keep track of things, like when the user edits an asset file,
copy it to the sdcard and ignore the asset file from then on ... and
doing something like when the user removes the file, mark it removed by
adding a *-removed file to the SD card. all of that was getting
confusing. it's much simpler if i can just assume one location for file
where i know they can be edited without having to worry about this r/o
file mirror in another place.

as suggested, i just have some code in onCreate() that copies the
assets to the SD card, if they don't exist there already. simple and
easy. i was over complicating things by trying to listen for app
installation.

On 10/28/09 4:12 PM, Raphael wrote:

  
Out of curiosity, why do you want to copy your assets on the sdcard
anyway? They are already nicely zipped in your APK.
R/

On Wed, Oct 28, 2009 at 9:45 AM, Jeffrey Blattman
 wrote:
  
  

i would like to copy some files from assets to the SD card when my app is installed. i see the PACKAGE* intents, but i'm unclear which one (or set) i should be listening for. i am sure this is a common pattern, can someone point me to a page that describe the proper way to do this?

thanks.

--

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

  


-- 





[android-beginners] Re: listen for when my app is installed

2009-10-28 Thread Jeffrey Blattman




thanks yes that's a good point about being dependent on the SD card.

On 10/28/09 10:19 AM, Sean Hodges wrote:

  On Wed, Oct 28, 2009 at 4:45 PM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  
i would like to copy some
files from assets to the SD card when my app
is installed. i see the PACKAGE* intents, but i'm unclear which one (or
set) i should be listening for. i am sure this is a common pattern, can
someone point me to a page that describe the proper way to do this?


  
  
Could you not just check for their existence on the SD card before
copying them over?
  
Otherwise, when the user changes their SD card, your app will no longer
have these files available. Your app will be dependent on the SD card
that was plugged in when it was installed... There may also be
compatibility issues with backup/restore programs. 
  
  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 
Groups "Android Beginners" group. 
To post to this group, send email to android-beginners@googlegroups.com
  
To unsubscribe from this group, send email to 
android-beginners+unsubscr...@googlegroups.com 
For more options, visit this group at 
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---
  


-- 





[android-beginners] listen for when my app is installed

2009-10-28 Thread Jeffrey Blattman




i would like to copy some files from assets to the SD card when my app
is installed. i see the PACKAGE* intents, but i'm unclear which one (or
set) i should be listening for. i am sure this is a common pattern, can
someone point me to a page that describe the proper way to do this?

thanks.

-- 





[android-beginners] Re: Android 2.0 SDK is here!

2009-10-27 Thread Jeffrey Blattman




new and updated tools. regardless of the SDK version, you can always
develop your app to target previous SDK versions. in your manifest,
look for the line,

    

3 is for 1.5, 4 for 1.6 ... 

On 10/27/09 10:42 AM, Matt Raffel wrote:

  
how does this apply if my phone is currently 1.5 and I wanted my app to 
work on it?  Do I stick to 1.5?

Matt

Xavier Ducrohet wrote:
  
  
Hello everyone!

We've just announced the Android 2.0 SDK
http://android-developers.blogspot.com/2009/10/announcing-android-20-support-in-sdk.html

If you already have the 1.6 SDK, note that you can simply use the SDK
Manager to add Android 2.0 to your SDK. Make sure you also get the new
SDK Tools (revision 3), as the SDK Manager in revision 2 (the one that
shipped with 1.6) doesn't enforce dependencies between platforms and
Tools (fixed in rev 3)

For more information about using the SDK Manager, see:
http://developer.android.com/sdk/adding-components.html

Have fun!
Xav

  
  

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

  


-- 





[android-beginners] Re: ADB and T-Mobile Pulse

2009-10-26 Thread Jeffrey Blattman




under settings > applications > development is usb debugging
enabled?

On 10/26/09 6:09 AM, marktyers wrote:

  
Hi
I have purchased a T-Mobile pulse for the purpose of testing some
applications but it does not show up when I run ./adb devices or when
I test my apps using Eclipse. Please can someone help otherwise  Iam
left with a useless lump of plastic :-(

ps. I am an absolute beginner to this so please be gentle...

Mark

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

  


-- 





[android-beginners] Re: file chooser?

2009-10-26 Thread Jeffrey Blattman




it seems like the approach most people take is to assume some
directory, then just take file names as input.

On 10/26/09 2:09 PM, Paul Turchenko wrote:

  
There's nothing like windows' FileOpenDialog if that's what you
want...

On Oct 26, 7:34 am, Jeffrey Blattman 
wrote:
  
  
this has to be an easy one. i want to bring up a file chooser to be able
to read a file from say the SD card. i'd rather not roll my own. is
there some standard way to do this?

--

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

  


-- 





[android-beginners] file chooser?

2009-10-25 Thread Jeffrey Blattman




this has to be an easy one. i want to bring up a file chooser to be
able to read a file from say the SD card. i'd rather not roll my own.
is there some standard way to do this?

-- 





[android-beginners] Re: Is it possible to append a value to R.string or any resource under R.?

2009-10-25 Thread Jeffrey Blattman




On 10/24/09 5:10 PM, David wrote:

  
@Farproc

Ah yes, the R.xx.xx are integer constants created automatically in the
R.java file (i.e., h1=0x7f050002, h2=0x7f050003, etc.).  Now it makes
sense why constructing a string to reference them does not work.


@Jeffrey

I have a couple of questions.  I just finished reading up a bit on
resource bundles but things are still a little cloudy for me.  Would I
need to populate the 312 key:value pairs into the rb bundle?

  

yes. 

  If so, then what benefits does the bundle approach have over the the
ElseIf approach?  It seems that putting 312 strings (even if small)
into a resource bundle would be more memory usage than required when,
in the alternative, the one desired string could be called directly
from an ElseIf approach, albeit with more lines of code.

  

one line of code vs. 312 ... and being forced to use a 2nd way to store
your resource strings. 


  Similar to your bundle idea, I thought about creating an XML array
with each string as a member but, again, all of the strings would be
pulled into memory to create the array when all I need is *one* of the
312 strings.  Too bad there isn't a way to dynamically construct a
reference to the R. resources . . .

  

XML is going to be heavier weight than a simple key, val mapping. btw,
if they are localized strings, use resource bundle. if not, just use
java.util.Properties.

  Thanks for answering questions from a new Java-Android developer
coming from the PHP side of things.




On Oct 24, 7:17 am, Jeffrey Blattman 
wrote:
  
  
using standard java res bundles,

textView.setText(rb.getString(desiredString));

and in your res bundle,

=
=
...

that is, the RB keys are the possible values of desiredString, and the
values are the proper mapping from a particular value of desired string.

On 10/23/09 6:59 PM, David wrote:





  Screen A permits the user to input a value into an EditText field.
Screen B populates a TextView using one of the entries in strings.xml
based upon the TextView value.  For example, if the user inputs "2" on
Screen A then Screen B should populate the TextView with
R.strings.h2.  I have tried the following:
  




        // get the bundle extras from Screen A's intent
      Bundle extras = getIntent().getExtras();
      // pull out the value from the UserInput EditText sent from
Screen A
      Str desiredString = extras != null ? extras.getString
("UserInput") : "";
      // popluate textView with the string R.string.h + whatever the
user put on Screen A
      textView.setText(R.string.h + desiredString);
  




  I get a "cannot resolve R.string.h resource" error message because,
evidently, the desiredString value is not appended onto R.string.h.
So, I decided to come at it from another angle:
  




        switch (desiredString) {
      case 1:
           textView.setText(R.string.h1);
      case 2:
           textView.setText(R.string.h2);
      . . .
      case 312:
           textView.setText(R.string.h312);
  




  Note that you cannot switch on a string so I tried Integer.parseInt on
the string but I wind up with a blank Screen B with the switch
statement above.  It seems that the string is not turned into an int.
So, my question is twofold: (1) is it possible to append a variable
onto a R. entry and (2) if I am obliged to use the larger and uglier
switch approach, how do I turn an EditText string value into an Int
value?  Thanks.
  


--

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

  


-- 





[android-beginners] Re: listview height

2009-10-24 Thread Jeffrey Blattman
Yes I tried that thanks. I ended up just setting a static height. Everything
I read says not to embed a listview in a scrollview (from the experts).
Seems kind of short sighted to me. A listview offers a lot more than just
the fact that it can scroll.

On Oct 24, 2009 9:00 PM, "Justin Anderson"  wrote:

Try giving the view a higher layout weight in the xml...

android:layout_weight=""

Thanks,
Justin

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--

On Thu, Oct 22, 2009 at 5:58 PM, Jeffrey Blattman <
jeffrey.blatt...@gmail.com> wrote: > > i have ...

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



[android-beginners] Re: Is it possible to append a value to R.string or any resource under R.?

2009-10-24 Thread Jeffrey Blattman




using standard java res bundles,

textView.setText(rb.getString(desiredString));

and in your res bundle,

=
=
...

that is, the RB keys are the possible values of desiredString, and the
values are the proper mapping from a particular value of desired string.

On 10/23/09 6:59 PM, David wrote:

  
Screen A permits the user to input a value into an EditText field.
Screen B populates a TextView using one of the entries in strings.xml
based upon the TextView value.  For example, if the user inputs "2" on
Screen A then Screen B should populate the TextView with
R.strings.h2.  I have tried the following:

 // get the bundle extras from Screen A's intent
 Bundle extras = getIntent().getExtras();
 // pull out the value from the UserInput EditText sent from
Screen A
 Str desiredString = extras != null ? extras.getString
("UserInput") : "";
 // popluate textView with the string R.string.h + whatever the
user put on Screen A
 textView.setText(R.string.h + desiredString);

I get a "cannot resolve R.string.h resource" error message because,
evidently, the desiredString value is not appended onto R.string.h.
So, I decided to come at it from another angle:

 switch (desiredString) {
 case 1:
  textView.setText(R.string.h1);
 case 2:
  textView.setText(R.string.h2);
 . . .
 case 312:
  textView.setText(R.string.h312);

Note that you cannot switch on a string so I tried Integer.parseInt on
the string but I wind up with a blank Screen B with the switch
statement above.  It seems that the string is not turned into an int.
So, my question is twofold: (1) is it possible to append a variable
onto a R. entry and (2) if I am obliged to use the larger and uglier
switch approach, how do I turn an EditText string value into an Int
value?  Thanks.

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

  


-- 





[android-beginners] Re: Regular expressions help

2009-10-23 Thread Jeffrey Blattman




hi,

i think it has to do with the multiline flag. that causes it to eat the
newline (read the javadocs).  i don't see any neat way to do it, other
than treating whitespace and newlines separately. for example,
something lime

    String s1 = "hello\n  hello\n\n    hello\n hi\n";
    Pattern p = Pattern.compile("^[ \t]+|[ \t]+$|\n$",
Pattern.MULTILINE);
    Matcher m = p.matcher(s1);
    s1 = m.replaceAll("");

On 10/23/09 9:16 AM, jax wrote:

  
I am trying to strip all whitespace from "each line" in a EditText
View.  The _expression_ I am using is this

String result =	Pattern.compile("^\\s+|\\s+$",
Pattern.MULTILINE).matcher(input).replaceAll("");

This works for the following input


hello
  hello
   hello
 hi

This will produce:
hello
hello
hello
hi


but

hello
  hello

   hello
 hi

will produce:
hello
hellohello
hi

Notice the new line (\n).  This is causing the problem.  What I want
is:
hello
hello
hello
hi

Any ideas about how to fix this?

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

  


-- 





[android-beginners] Re: user can't see my app in market?

2009-10-23 Thread Jeffrey Blattman




never mind, version issue.

On 10/23/09 8:35 AM, Jeffrey Blattman wrote:

  
i have an app published to the market, and a user is telling me that
they can't see it ... through searching, or even when they scan the QR
code i comes up as not found. 
  
the user is not in the US, but i published it to "all locations".
  
any ideas?
  -- 
  


-- 





[android-beginners] user can't see my app in market?

2009-10-23 Thread Jeffrey Blattman




i have an app published to the market, and a user is telling me that
they can't see it ... through searching, or even when they scan the QR
code i comes up as not found. 

the user is not in the US, but i published it to "all locations".

any ideas?
-- 





[android-beginners] listview height

2009-10-22 Thread Jeffrey Blattman




i have a listview that is enclosed in a few other views. the view
height of the listview is only about the size of one entry. i can't
seem to figure how to make the listview expand to show more entries at
a time. i'd like to be able to set the max height of the listview, or
something like that.

any ideas?

-- 





[android-beginners] Re: Is your Android app on Archos Market ?

2009-10-22 Thread Jeffrey Blattman




On 10/22/09 1:31 AM, arnouf wrote:

  
Hi Jeffrey,

On 20 oct, 17:29, Jeffrey Blattman  wrote:
  
  
some comments on the appslib market,

1. no way to unpublish an app?

  
  Yes you have. When you created an application, you have a link at the
bottom to add release or unpublish release (one ar all)
  

i see a link to "deactive all releases" (it actually says "desactive
all releases"), but it doesn't delete the app from the store. it just
deactivates it. that means the app is still on your servers i assume.

  
2. no way to unpublish an app release?

  
  see response above
  

see my response above.

  
3. no way to edit an app release (comments, binary, or anything else)

  
  You have an input box to indicate comments
  

really where? after i publish the release, the only thing i can click
on is the "publish/unpublish" link.

  


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

  


-- 





[android-beginners] Re: how to i check if an EditText is empty

2009-10-20 Thread Jeffrey Blattman
toString().length() == 0?

On Oct 20, 2009 1:48 PM, "JasonMP"  wrote:


using "if(someEditText.getText().toString == null) " doesnt work

im passing information from this editText into a database.  Ive
already limited it to 2 characters and numbers only in the xml file,
but i need to run a check to fill its defaults to 0 if nothing is
entered.  I could set its default to 0, but then my hint text would
show up.  Could someone give me a hand with this?

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



[android-beginners] Re: path to pwd

2009-10-20 Thread Jeffrey Blattman




it might be built into the shell.

On 10/19/09 5:30 AM, T wrote:

  
In android, in the terminal i can write ls and pwd. I have found ls
in /system/bin. However, I can't find pwd. Where is the link pwd
pointing to?

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

  


-- 





[android-beginners] Re: Is your Android app on Archos Market ?

2009-10-20 Thread Jeffrey Blattman




please refrain from discussing the android market market until my
patent clears.

On 10/20/09 8:36 AM, Jason Van Anden wrote:
Clearly the solution to this is an Android Market Market. 
  
;)
  
Jason Van Anden
  http://www.BubbleBeats.com
  
  On Tue, Oct 20, 2009 at 11:29 AM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  

some comments on the appslib market,

1. no way to unpublish an app?
2. no way to unpublish an app release?
3. no way to edit an app release (comments, binary, or anything else)
4. app description doesn't maintain newlines

so yes, make sure you really want your app there, forever, before you
publish it.

in general, i wish "the" android market  would just facilitate this
sort of thing ... i know they now allow tagging by cell provider,
tagging by device seems a small stretch.  this proliferation of markets
could really dilute android. developers now have to manage their apps
across N markets, and users have to browse N different markets to look
for apps :(



On 10/20/09 1:56 AM, arnouf wrote:

  If you  have developed or if you are developing applications, and they
are on the Android Market - Great! - But these apps are only
available for devices that have contracts with Google.

Archos, a major PMP manufacturer, launched its first device on 25th of
September: the Archos 5 IT. Archos has a real community of fans who
are waiting for applications for their devices. This device is the
first of a long product line (the first Archos phone should be
available soon too!).

It's a new opportunity for your applications to find new fans! 

You can post your apps, for free, on the Archos Market called Appslib
(http://www.appslib.com).

Today, only free applications are available for distribution on
AppsLib, but Archos promises the possibility to distribute your paid
apps soon !

Don't wait : more applications, more users, more fans...and more
revenue (soon)!

Arnaud

  




-- 


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


-- 





[android-beginners] Re: Cannot install packages on new phone

2009-10-20 Thread Jeffrey Blattman
Just a guess but could it be that the new device is 1.5 and u r compiling to
1.6?

On Oct 20, 2009 9:28 AM, "Neilz"  wrote:


Hi all.

I've been developing for a few weeks now, and testing them on a
friend's phone (HTC Magic). I never had any problems.

Today my new phone arrived (HTC Hero) and now I can't install my
packages. I get the error "There is a problem parsing the package".

I have set it to allow packages from unknown sources, but I don't know
what else I can try... help please?

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



[android-beginners] Re: Is your Android app on Archos Market ?

2009-10-20 Thread Jeffrey Blattman




some comments on the appslib market,

1. no way to unpublish an app?
2. no way to unpublish an app release?
3. no way to edit an app release (comments, binary, or anything else)
4. app description doesn't maintain newlines

so yes, make sure you really want your app there, forever, before you
publish it.

in general, i wish "the" android market  would just facilitate this
sort of thing ... i know they now allow tagging by cell provider,
tagging by device seems a small stretch.  this proliferation of markets
could really dilute android. developers now have to manage their apps
across N markets, and users have to browse N different markets to look
for apps :(

On 10/20/09 1:56 AM, arnouf wrote:

  
If you  have developed or if you are developing applications, and they
are on the Android Market - Great! - But these apps are only
available for devices that have contracts with Google.

Archos, a major PMP manufacturer, launched its first device on 25th of
September: the Archos 5 IT. Archos has a real community of fans who
are waiting for applications for their devices. This device is the
first of a long product line (the first Archos phone should be
available soon too!).

It's a new opportunity for your applications to find new fans! 

You can post your apps, for free, on the Archos Market called Appslib
(http://www.appslib.com).

Today, only free applications are available for distribution on
AppsLib, but Archos promises the possibility to distribute your paid
apps soon !

Don't wait : more applications, more users, more fans...and more
revenue (soon)!

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

  


-- 





[android-beginners] Re: Is your Android app on Archos Market ?

2009-10-20 Thread Jeffrey Blattman




ok well is back the escape key? looks like it.

On 10/20/09 8:04 AM, Steve Oliver wrote:
the Menu button is done with the PAGE UP key
  
  
  On Tue, Oct 20, 2009 at 7:57 AM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  

and the menu button?


On 10/20/09 7:48 AM, Steve wrote:


  
  I tried the Archos emulator on your web site, but can't figure out how
to simulate the BACK button?  Is there a key for it? thanks.

On Oct 20, 1:56 am, arnouf  wrote:
  
  
If you  have developed or if you are developing applications, and they
are on the Android Market - Great! - But these apps are only
available for devices that have contracts with Google.

Archos, a major PMP manufacturer, launched its first device on 25th of
September: the Archos 5 IT. Archos has a real community of fans who
are waiting for applications for their devices. This device is the
first of a long product line (the first Archos phone should be
available soon too!).

It's a new opportunity for your applications to find new fans! 

You can post your apps, for free, on the Archos Market called Appslib
(http://www.appslib.com).

Today, only free applications are available for distribution on
AppsLib, but Archos promises the possibility to distribute your paid
apps soon !

Don't wait : more applications, more users, more fans...and more
revenue (soon)!

Arnaud

  
  



-- 


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


-- 





[android-beginners] Re: Is your Android app on Archos Market ?

2009-10-20 Thread Jeffrey Blattman




and the menu button?

On 10/20/09 7:48 AM, Steve wrote:

  
I tried the Archos emulator on your web site, but can't figure out how
to simulate the BACK button?  Is there a key for it? thanks.

On Oct 20, 1:56 am, arnouf  wrote:
  
  
If you  have developed or if you are developing applications, and they
are on the Android Market - Great! - But these apps are only
available for devices that have contracts with Google.

Archos, a major PMP manufacturer, launched its first device on 25th of
September: the Archos 5 IT. Archos has a real community of fans who
are waiting for applications for their devices. This device is the
first of a long product line (the first Archos phone should be
available soon too!).

It's a new opportunity for your applications to find new fans! 

You can post your apps, for free, on the Archos Market called Appslib
(http://www.appslib.com).

Today, only free applications are available for distribution on
AppsLib, but Archos promises the possibility to distribute your paid
apps soon !

Don't wait : more applications, more users, more fans...and more
revenue (soon)!

Arnaud

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

  


-- 





[android-beginners] Re: Android Getting started

2009-10-19 Thread Jeffrey Blattman
  
  On Mon, Oct 19, 2009 at
12:46 PM, Niamathullah sharief <android...@gmail.com> wrote:
  
i tried to set the path. But it seems wrong

shar...@sharief-desktop:~$ export
PATH-$PATH:/home/sharief/Desktop/SDK/android-sdk-linux_x86-1.5_r3/tools/emulator
bash: export:
`PATH-/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/sharief/Desktop/SDK/android-sdk-linux_x86-1.5_r3/tools/emulator':
not a valid identifier
shar...@sharief-desktop:~$ 



can anyone help me to set the exact path..







On Mon, Oct 19, 2009
at 9:20 AM, Niamathullah sharief <android...@gmail.com> wrote:
No
jeffrey. There is no "android app" in "Run as"..
      
  
  
  On Mon, Oct 19, 2009
at 9:07 AM, Jeffrey Blattman <jeffrey.blatt...@gmail.com> wrote:
  

if you "run as>android app" in eclipse, it will start the emulator,
deploy your app, and run it.



On 10/18/09 8:34 PM, Niamathullah sharief wrote:
OK. and another one
is, i have installed eclipse on my
system. is this another way to start an android?if yes i have created
ADT plugin in eclipse. now how to start an emulator in eclipse?
  
  On Mon, Oct 19,
2009 at 8:58 AM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  
 http://www.linuxheadquarters.com/howto/basic/path.shtml



On 10/18/09 8:26 PM, Niamathullah sharief wrote:
sorry jeffey. I
am novice. Could you please
tell me how to
set the path? Could you please explain me in detail?
  
  On Mon, Oct
19, 2009 at 8:54 AM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  
that means the emulator
isn't in your path. add $ANDROID_HOME/tools to
your path.



On 10/18/09 8:22 PM, Niamathullah sharief wrote:

  Ok...I am using UBUNTU
distribution. In that when i try
to
start
an emulator i am getting the following error..
  
  
  
  shar...@sharief-desktop:~/Desktop/SDK/android-sdk-linux_x86-1.5_r3/tools$
emulator -avd sharief
bash: emulator: command not found
  
  
  
  can anyone tell me why it
happens?
  
  On Sun,
Oct 18, 2009 at 6:11 PM,
Mark
Murphy <mmur...@commonsware.com>
wrote:
  


Niamathullah sharief wrote:
> Hi i am new to android. I am having some doubt when i tried to do
my
> first project in android. When i select new new project in
eclipse. Is
> ask some details. In that i saw one option called "package name"..I
> don't know what to give in that field. Can anyone help me. I am
not much
> expert in Java. Thank you



I recommend spending a bit of time to get familiar with Java *outside*
of Android. Android is just unusual enough that learning Java and
Android at the same time may prove frustrating.

The package that Eclipse is asking for is the main Java package for your
application:

http://en.wikipedia.org/wiki/Java_package

For example, I might use a package of:

com.commonsware.a

[android-beginners] Re: Install on SD

2009-10-19 Thread Jeffrey Blattman




i forgot to mention, there is an app (apps?) that allow you to "back
up" an app to the SD card, then re-install it at a later date. pretty
lame solution, but thought i'd mention it.

this is a well-known and well-despised deficiency of current gen
phones. hopefully it'll be fixed in g2 that are being released soon. i
just looked up the motorola cliq and it reportedly has only 256MB as
well ...

On 10/19/09 7:03 PM, Vinicius Carvalho wrote:

  
Thanks to the quick response, this is very very frustranting news
tough, given that the phone memory is really small (256mb) it seems
that android gave a step back in this direction. My old N95 would
allow me to install apps on the SD to save phone memory. I wonder what
will happen when Apps start to blow in size (what if android becomes a
good gaming platform such as iphone) what users will be able to do.

Just hope that they fix it soon, just like nintendo did with Wii and
now we can save our games on the SD and run them from there

Regards

On Oct 20, 12:00 am, Jeffrey Blattman 
wrote:
  
  
yes they get installed to phone memory and you can't change that. you
can however setup "apps2sd" which in which case you create a linux
partition on your SD card and mount it where the OS can install apps.
several 3rd party dists come with apps2sd enabled and if you have a
linux part in the right place they will just use it. for example,

http://forum.xda-developers.com/showthread.php?t=566130

it was my impression that installing apps2sd from scratch was a little
hairy, so IMHO it's better to install a dist that has it enabled.
there's a little bit of a learning curve to setting all this up, so be
prepared to spend some time educating yourself.

bear in mind that the SD card is much slower than the phone's memory, so
consequently your phone will be slower overall loading apps. this is why
(i assume) android doesn't install apps on the SD in any standard, stock
android install.

On 10/19/09 6:51 PM, Vinicius Carvalho wrote:



  Hi, this sounds kinda stupid, but is it possible to install the apps
from the market on the SD card? When I download the apps It does not
ask me where to store them, and since I have only 40mb left on the
device I wonder if they are all getting installed on the phone memory
instead of SD.
  




  Regards
  


--

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

  


-- 





[android-beginners] Re: Install on SD

2009-10-19 Thread Jeffrey Blattman




yes they get installed to phone memory and you can't change that. you
can however setup "apps2sd" which in which case you create a linux
partition on your SD card and mount it where the OS can install apps.
several 3rd party dists come with apps2sd enabled and if you have a
linux part in the right place they will just use it. for example,

http://forum.xda-developers.com/showthread.php?t=566130

it was my impression that installing apps2sd from scratch was a little
hairy, so IMHO it's better to install a dist that has it enabled.
there's a little bit of a learning curve to setting all this up, so be
prepared to spend some time educating yourself.

bear in mind that the SD card is much slower than the phone's memory,
so consequently your phone will be slower overall loading apps. this is
why (i assume) android doesn't install apps on the SD in any standard,
stock android install.

On 10/19/09 6:51 PM, Vinicius Carvalho wrote:

  
Hi, this sounds kinda stupid, but is it possible to install the apps
from the market on the SD card? When I download the apps It does not
ask me where to store them, and since I have only 40mb left on the
device I wonder if they are all getting installed on the phone memory
instead of SD.

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

  


-- 





[android-beginners] Animate the resize (not scale) of a view or layout?

2009-10-19 Thread Jeffrey

Hello,

I'm trying to resize a layout over time (like an animation) however I
do not want the view to scale, only resize it's bounding box. If the
view is to small to contain the children, the children would simply be
clipped. I can set the layout to various sizes on load however I can't
seem to figure out how to do it dynamically over time.

Is there an existing way I can use the animation framework to achieve
this?

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



[android-beginners] Re: Android Getting started

2009-10-18 Thread Jeffrey Blattman




if you "run as>android app" in eclipse, it will start the emulator,
deploy your app, and run it.

On 10/18/09 8:34 PM, Niamathullah sharief wrote:
OK. and another one is, i have installed eclipse on my
system. is this another way to start an android?if yes i have created
ADT plugin in eclipse. now how to start an emulator in eclipse?
  
  On Mon, Oct 19, 2009 at 8:58 AM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  

http://www.linuxheadquarters.com/howto/basic/path.shtml



On 10/18/09 8:26 PM, Niamathullah sharief wrote:
sorry jeffey. I am novice. Could you please
tell me how to
set the path? Could you please explain me in detail?
  
  On Mon, Oct 19, 2009 at 8:54 AM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  
that means the emulator
isn't in your path. add $ANDROID_HOME/tools to
your path.



On 10/18/09 8:22 PM, Niamathullah sharief wrote:

  Ok...I am using UBUNTU distribution. In that when i try
to
start
an emulator i am getting the following error..
  
  
  
  shar...@sharief-desktop:~/Desktop/SDK/android-sdk-linux_x86-1.5_r3/tools$
emulator -avd sharief
bash: emulator: command not found
  
  
  
  can anyone tell me why it happens?
  
  On Sun, Oct 18, 2009 at 6:11 PM,
Mark
Murphy <mmur...@commonsware.com>
wrote:
  


Niamathullah sharief wrote:
> Hi i am new to android. I am having some doubt when i tried to do
my
> first project in android. When i select new new project in
eclipse. Is
> ask some details. In that i saw one option called "package name"..I
> don't know what to give in that field. Can anyone help me. I am
not much
> expert in Java. Thank you



I recommend spending a bit of time to get familiar with Java *outside*
of Android. Android is just unusual enough that learning Java and
Android at the same time may prove frustrating.

The package that Eclipse is asking for is the main Java package for your
application:

http://en.wikipedia.org/wiki/Java_package

For example, I might use a package of:

com.commonsware.android.sample

or

com.commonsware.android.yes.he.really.posts.a.lot

or even

com.commonsware.android.and.he.sometimes.gets.a.wee.bit.goofy

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

Android App Developer Training: http://commonsware.com/training.html


  
  
  
  
  




-- 


  
  
  
  
  


-- 




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


-- 





[android-beginners] Re: Android Getting started

2009-10-18 Thread Jeffrey Blattman




http://www.linuxheadquarters.com/howto/basic/path.shtml

On 10/18/09 8:26 PM, Niamathullah sharief wrote:
sorry jeffey. I am novice. Could you please tell me how to
set the path? Could you please explain me in detail?
  
  On Mon, Oct 19, 2009 at 8:54 AM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  

that means the emulator isn't in your path. add $ANDROID_HOME/tools to
your path.



On 10/18/09 8:22 PM, Niamathullah sharief wrote:

  Ok...I am using UBUNTU distribution. In that when i try to
start
an emulator i am getting the following error..
  
  
  
  shar...@sharief-desktop:~/Desktop/SDK/android-sdk-linux_x86-1.5_r3/tools$
emulator -avd sharief
bash: emulator: command not found
  
  
  
  can anyone tell me why it happens?
  
  On Sun, Oct 18, 2009 at 6:11 PM, Mark
Murphy <mmur...@commonsware.com>
wrote:
  


Niamathullah sharief wrote:
> Hi i am new to android. I am having some doubt when i tried to do
my
> first project in android. When i select new new project in
eclipse. Is
> ask some details. In that i saw one option called "package name"..I
> don't know what to give in that field. Can anyone help me. I am
not much
> expert in Java. Thank you



I recommend spending a bit of time to get familiar with Java *outside*
of Android. Android is just unusual enough that learning Java and
Android at the same time may prove frustrating.

The package that Eclipse is asking for is the main Java package for your
application:

http://en.wikipedia.org/wiki/Java_package

For example, I might use a package of:

com.commonsware.android.sample

or

com.commonsware.android.yes.he.really.posts.a.lot

or even

com.commonsware.android.and.he.sometimes.gets.a.wee.bit.goofy

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

Android App Developer Training: http://commonsware.com/training.html


  
  
  
  
  




-- 


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


-- 





[android-beginners] Re: Android Getting started

2009-10-18 Thread Jeffrey Blattman




that means the emulator isn't in your path. add $ANDROID_HOME/tools to
your path.

On 10/18/09 8:22 PM, Niamathullah sharief wrote:

  Ok...I am using UBUNTU distribution. In that when i try to start
an emulator i am getting the following error..
  
  
  
  shar...@sharief-desktop:~/Desktop/SDK/android-sdk-linux_x86-1.5_r3/tools$
emulator -avd sharief
bash: emulator: command not found
  
  
  
  can anyone tell me why it happens?
  
  On Sun, Oct 18, 2009 at 6:11 PM, Mark Murphy
  
wrote:
  


Niamathullah sharief wrote:
> Hi i am new to android. I am having some doubt when i tried to do
my
> first project in android. When i select new new project in
eclipse. Is
> ask some details. In that i saw one option called "package name"..I
> don't know what to give in that field. Can anyone help me. I am
not much
> expert in Java. Thank you



I recommend spending a bit of time to get familiar with Java *outside*
of Android. Android is just unusual enough that learning Java and
Android at the same time may prove frustrating.

The package that Eclipse is asking for is the main Java package for your
application:

http://en.wikipedia.org/wiki/Java_package

For example, I might use a package of:

com.commonsware.android.sample

or

com.commonsware.android.yes.he.really.posts.a.lot

or even

com.commonsware.android.and.he.sometimes.gets.a.wee.bit.goofy

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

Android App Developer Training: http://commonsware.com/training.html


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


-- 





[android-beginners] Re: Rooting?

2009-10-18 Thread Jeffrey Blattman




you do not need to root your phone to develop applications or to
upgrade to 1.6. however, you will need to root your phone to install CM
or some other 3rd party dists.

On 10/18/09 7:29 PM, Vinicius Carvalho wrote:

  
Hello there, could someone please tell me if I need rooting on Android
Dev Phone? Or only locked phones? I wish to upgrade from 1.0 -> 1.6
(also considering the legal version o Cyanogenmod).

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

  


-- 





[android-beginners] Re: Is Android really open platform or not?

2009-10-18 Thread Jeffrey Blattman




android has been around for 3 or so years now. are there any examples
where individual, or small not-for-profit projects have ported android
to alternative hardware? i don't know of any. the answer to that will
probably give you a good idea of the difficulty VY.

On 10/18/09 1:36 PM, Mark Murphy wrote:

  
VY wrote:
  
  
How difficult is it to port Android onto novel hardware?

  
  
Depends on how big of a team you have and their skill level. Device
manufacturers do not seem to be having much trouble. On the other hand,
it would be a fair amount of work for an individual, I imagine.

  


-- 





[android-beginners] Re: R class outside of activity

2009-10-18 Thread Jeffrey Blattman




yes of course that's the whole point of resources ... there's better
ways to do it. Context is a massive class with UI-centric
functionality. even the android Resources class has UI functionality.
localization could have been factored out into a smaller non-UI class.
in std Java i have Locale and ResourceBundle and those are used no
matter what system framework i'm coding to.

On 10/18/09 3:06 AM, RichardC wrote:

  
The need to pass the context around is because your strings (and all
resources) may be different for localization, layout, screen size etc.
So accessing a string (resource) without an application context does
not make sence.

--
RichardC

On Oct 18, 11:04 am, RichardC  wrote:
  
  
Try this:http://developer.android.com/guide/topics/resources/index.html

--
RichardC

On Oct 18, 10:48 am, jax  wrote:



  I have made a regular class that needs to use string from the R class.
  




  I have imported the R class into the activity and am able to access
all the variables.
  




  My Question is, how do you convert them to string,
  




  For example: If I access R.string.myString it will return as an int
not a String
  




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

  


-- 





[android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE:

2009-10-18 Thread Jeffrey Blattman




well ... i don't want to write the code for you, but what you are
asking for is possible. if you aren't using the eclipse plugin, do
that. it gives an okay GUI editor for layouts ... so you can try things
out quickly and see what looks correct. some things to watch out for
are setting weights, setting gravity, and setting layout widths.

On 10/18/09 2:39 AM, Clave Yard wrote:

  

  
Yes. You are right. android:orientation="horizontal" is
helping a lot. But i want to keep three controls(image, button and
text) on Top in a single line. And one slider control in the second
line, below of that three controls. For ex: If you see built-in Volume
control, there will be Volume speaker icon and volume text one line,
and below you can see the volume slider. Same like that i wanted to do.


--- On Sun, 10/18/09, Jeffrey Blattman 
wrote:
    
From: Jeffrey Blattman 
Subject: [android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE:
To: android-beginners@googlegroups.com
Date: Sunday, October 18, 2009, 9:03 AM
  
   are you using a listview or no? i'll
assume no ... yes,  to get three
views positioned horizontally across the page, you would use a
LinearLayout and specify android:orientation="horizontal".
  
On 10/18/09 2:00 AM, Clave Yard wrote:
  

  

  Do you mean, using layout we can't achieve this? Is there
any sample provided by Android team to do such thing, creating custom
controls?
      
--- On Sun, 10/18/09, Jeffrey Blattman 
wrote:
  
From: Jeffrey Blattman 
Subject: [android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE:
To: android-beginners@googlegroups.com
Date: Sunday, October 18, 2009, 8:48 AM

 i assume you mean you want
your list
view's rows to be complex. in
summary,

1. create a custom adapter
2. in the adapter's getView(), inflate your custom view and populate it
as you wish

On 10/18/09 1:03 AM, Clave Yard wrote:

  

  
ALL,

CAN SOME ONE TELL ME HOW TO MAKE THREE CONTROLS IN A SINGLE LINE USING
LAYOUT? I WANT TO SHOW AN IMABE, A BUTTON AND TEXT LABEL IN A SINGLE
LINE. I TRIED THAT ON LAYOUT IN ECLIPSE. BUT IT ACCEPTS ONLY ONE
CONTROL FOR ONE LINE, IF ADD NEXT CONTROL IT GOES TO NEXT LINE(ROW). I
WANT TO MAKE THREE CONTROLS TO BE IN SINGLE LINE. HOW DO I ACHIEVE THIS?

APPRECIATE YOUR HELP ON THIS.



  

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


-- 


  
  

  


  
  
  -- 
  
  


  

  
  


-- 





[android-beginners] Re: R class outside of activity

2009-10-18 Thread Jeffrey Blattman




Context.getResources().getString(int id).

so yes, you need to pass around a Context. i think android is deficient
here. for example, i like to separate the data model from the UI
classes. what if the data model needs a resource string? it can't use
android's resource mechanism, it has to fall back to std java resource
bundles ... unless you pollute the data model with UI classes.

the other deficiency (sorry, OT here) is that android doesn't allow
dynamic resource keys. i tend to use this a lot when there are plugin
classes that want to look up their resources based on their class, or
some other unique ID.

On 10/18/09 2:48 AM, jax wrote:

  
I have made a regular class that needs to use string from the R class.

I have imported the R class into the activity and am able to access
all the variables.

My Question is, how do you convert them to string,

For example: If I access R.string.myString it will return as an int
not a String
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---

  


-- 





[android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE:

2009-10-18 Thread Jeffrey Blattman




are you using a listview or no? i'll assume no ... yes,  to get three
views positioned horizontally across the page, you would use a
LinearLayout and specify android:orientation="horizontal".

On 10/18/09 2:00 AM, Clave Yard wrote:

  

  
Do you mean, using layout we can't achieve this? Is there
any sample provided by Android team to do such thing, creating custom
controls?

--- On Sun, 10/18/09, Jeffrey Blattman 
wrote:
    
From: Jeffrey Blattman 
Subject: [android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE:
To: android-beginners@googlegroups.com
Date: Sunday, October 18, 2009, 8:48 AM
  
   i assume you mean you want your list
view's rows to be complex. in
summary,
  
1. create a custom adapter
2. in the adapter's getView(), inflate your custom view and populate it
as you wish
  
On 10/18/09 1:03 AM, Clave Yard wrote:
  

  

  ALL,
  
CAN SOME ONE TELL ME HOW TO MAKE THREE CONTROLS IN A SINGLE LINE USING
LAYOUT? I WANT TO SHOW AN IMABE, A BUTTON AND TEXT LABEL IN A SINGLE
LINE. I TRIED THAT ON LAYOUT IN ECLIPSE. BUT IT ACCEPTS ONLY ONE
CONTROL FOR ONE LINE, IF ADD NEXT CONTROL IT GOES TO NEXT LINE(ROW). I
WANT TO MAKE THREE CONTROLS TO BE IN SINGLE LINE. HOW DO I ACHIEVE THIS?
  
APPRECIATE YOUR HELP ON THIS.
  
  
  

  



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 
Groups "Android Beginners" group. 
To post to this group, send email to android-beginners@googlegroups.com

To unsubscribe from this group, send email to 
android-beginners+unsubscr...@googlegroups.com

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

  
  
  -- 
  
  


  

  
  


-- 





[android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE:

2009-10-18 Thread Jeffrey Blattman




i assume you mean you want your list view's rows to be complex. in
summary,

1. create a custom adapter
2. in the adapter's getView(), inflate your custom view and populate it
as you wish

On 10/18/09 1:03 AM, Clave Yard wrote:

  

  
ALL,

CAN SOME ONE TELL ME HOW TO MAKE THREE CONTROLS IN A SINGLE LINE USING
LAYOUT? I WANT TO SHOW AN IMABE, A BUTTON AND TEXT LABEL IN A SINGLE
LINE. I TRIED THAT ON LAYOUT IN ECLIPSE. BUT IT ACCEPTS ONLY ONE
CONTROL FOR ONE LINE, IF ADD NEXT CONTROL IT GOES TO NEXT LINE(ROW). I
WANT TO MAKE THREE CONTROLS TO BE IN SINGLE LINE. HOW DO I ACHIEVE THIS?

APPRECIATE YOUR HELP ON THIS.



  

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


-- 





android-beginners@googlegroups.com

2009-10-17 Thread Jeffrey Blattman




that's how unlocking works for many other smartphones ... pay some
shady company $5 to $30  and get a code in the mail in 24 hours or
less. it's how i unlocked my g1. 

On 10/17/09 4:15 PM, Vladimir Kelman wrote:

  
BTW, I found this... may be a scam, what you think?
 
http://cgi.ebay.com/%3D%3DUNLOCK-CODE-FOR-T-MOBILE-MOTOROLA-CLIQ%3D%3D_W0QQitemZ320424082577QQcmdZViewItemQQimsxZ20090914?IMSfp=TL090914166005r4614

On Oct 17, 5:28 pm, Vladimir Kelman  wrote:
  
  
I'd be happy to be able to unlock Motorola Cliq and to use with AT&T.
Any experience with that? (It was easy enoughhttp://pro-thoughts.blogspot.com/2009/09/how-to-upgrade-android-devph...
to set up Android Dev Phone 1 (HTC) to work in AT&T, except that
Internet is a bit slow, because AT&T uses non-compatible frequency...)

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

  


-- 





[android-beginners] Re: send SMS, RESULT_ERROR_GENERIC_FAILURE

2009-10-17 Thread Jeffrey Blattman




hi mark,

no, there was nothing at all until i added the receivers ... and then,
only the result code.

On 10/17/09 3:59 PM, Mark Murphy wrote:

  
Jeffrey Blattman wrote:
  
  
got it. i was trying to be smart and set the "source address" to my
phone number. note to self: read docs first next time.

On 10/17/09 3:16 PM, Jeffrey Blattman wrote:


  i am trying to send an SMS. followed the example, but no message was
sent. i then added the receivers to try to find out what's going on.
every time, the "sent" receiver gets the result code
RESULT_ERROR_GENERIC_FAILURE.

any ideas how to debug this?
  

  
  
Out of curiosity, did LogCat show any log messages here with more
details of your problem? RESULT_ERROR_GENERIC_FAILURE is a fairly, um,
generic failure, so I would hope the SMS system would provide more error
info at least as log errors or warnings or something.

  


-- 





[android-beginners] Re: send SMS, RESULT_ERROR_GENERIC_FAILURE

2009-10-17 Thread Jeffrey Blattman




got it. i was trying to be smart and set the "source address" to my
phone number. note to self: read docs first next time.

On 10/17/09 3:16 PM, Jeffrey Blattman wrote:

  
i am trying to send an SMS. followed the example, but no message was
sent. i then added the receivers to try to find out what's going on.
every time, the "sent" receiver gets the result code
RESULT_ERROR_GENERIC_FAILURE. 
  
any ideas how to debug this?
  
thanks.
  -- 
  


-- 





[android-beginners] send SMS, RESULT_ERROR_GENERIC_FAILURE

2009-10-17 Thread Jeffrey Blattman




i am trying to send an SMS. followed the example, but no message was
sent. i then added the receivers to try to find out what's going on.
every time, the "sent" receiver gets the result code
RESULT_ERROR_GENERIC_FAILURE. 

any ideas how to debug this?

thanks.
-- 





[android-beginners] Re: Which phone to use for developer?

2009-10-16 Thread Jeffrey Blattman




i think it's safe to assume if it has google maps (the app) then it has
the google SDK.

On 10/16/09 1:34 PM, jotobjects wrote:

  
Do all phones have the Google Maps API add-on library?  How to find
out which phones have that?

On Oct 16, 12:50 pm, RichardC  wrote:
  
  
Best advice I can give is to make sure any phone you want to buy has:

a) The Google Market Place Application (and also the other Google
Apps)

and

b) From the font menu button you can get to:
    [Menu] > Settings > Applications > Development >
        USB Debugging
        Stay awake
        Allow mock locations

Making sure the above are are all present will give you a phone
suitable for development of Android applicatons.

--
RichardC

On Oct 15, 8:56 am, kengheng  wrote:



  Hi All, I would like to check which phone to use for the android
development ?
  




  Thanks.
  




  --
Best regards,
KengHeng. Chan
Mobile : +6-016-717-0273
SQL Technology Sdn Bhdhttp://www.mysql.cc
c...@mysql.cc
  

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

  


-- 





[android-beginners] BroadcastReceiver.onReceive(), intent extra data missing?

2009-10-15 Thread Jeffrey Blattman




this has to be a simple answer. i have code that calls a broadcast
receiver, in the receiver, i try to get the extra data from the intent,
but it's null. 

so,

        Intent i = new Intent("test", null, context,
                MyReceiver.class);
        i.putExtra("org.jtb.name", "blah");
        context.sendBroadcast(i);

and in the BroadcastReceiver.onReceiver(),

        String name = i.getStringExtra("org.jtb.name");

but name is null. what am i missing?

-- 





[android-beginners] parcelable encountered class not found?

2009-10-14 Thread Jeffrey Blattman




i have an activity and an intent service. i create a pending intent to
call the intent service, and put a serializable object as extra data.
when i get the alarm manage, and call setRepeating(), i see the trace
below.

any ideas? everything is in the same process and the same app, so i'm
at a loss for how to debug this.

10-14 13:43:56.292: WARN/Intent(571): Failure filling in extras
10-14 13:43:56.292: WARN/Intent(571): java.lang.RuntimeException:
Parcelable encounteredClassNotFoundException reading a Serializable
object (name = org.jtb.httpmon.model.Monitor)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Parcel.readSerializable(Parcel.java:1890)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Parcel.readValue(Parcel.java:1761)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Parcel.readMapInternal(Parcel.java:1947)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Bundle.unparcel(Bundle.java:169)
10-14 13:43:56.292: WARN/Intent(571): at
android.os.Bundle.putAll(Bundle.java:242)
10-14 13:43:56.292: WARN/Intent(571): at
android.content.Intent.fillIn(Intent.java:4530)
10-14 13:43:56.292: WARN/Intent(571): at
com.android.server.am.PendingIntentRecord.send(PendingIntentRecord.java:185)
10-14 13:43:56.292: WARN/Intent(571): at
android.app.PendingIntent.send(PendingIntent.java:400)
10-14 13:43:56.292: WARN/Intent(571): at
com.android.server.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:636)

-- 





[android-beginners] Re: linked text view?

2009-10-14 Thread Jeffrey Blattman




continuing on my possible solution ... it appears that android won't
let me underline text (hint, hint: maybe i shouldn't be doing this). it
looks like i can set the link mask to everything, get the associated
URL spans, and set the on click listeners for those. 

On 10/14/09 10:53 AM, Jeffrey Blattman wrote:

  
i would like to have a textview that is hyperlinked, but not to web
resources. i would like the link click to invoke an "on click". is this
possible?
  
it strikes me that i could style the text to look hyperlink (color,
underline), and then just add an on click listener, but i was hoping
there is some standard way to accomplish this. all i can find in the
docs is how to linkify text for URLs.
  
or perhaps this violates the style guidelines ...
  
thanks.
  
  -- 
  


-- 





[android-beginners] linked text view?

2009-10-14 Thread Jeffrey Blattman




i would like to have a textview that is hyperlinked, but not to web
resources. i would like the link click to invoke an "on click". is this
possible?

it strikes me that i could style the text to look hyperlink (color,
underline), and then just add an on click listener, but i was hoping
there is some standard way to accomplish this. all i can find in the
docs is how to linkify text for URLs.

or perhaps this violates the style guidelines ...

thanks.

-- 





[android-beginners] why use onCreateDialog?

2009-10-14 Thread Jeffrey Blattman




i've been wondering this. why would i implement
Activity.onCreateDialog()? why wouldn't i just create a new instance of
the dialog i want, and call .show() on it? usually a dialog will close
itself, but if i doesn't, i just keep a handle to it in a member field
and call .dismiss().

-- 





[android-beginners] Re: Please tell me how to update firmware of HT-03A from Android 1.5 to 1.6.

2009-10-12 Thread Jeffrey Blattman




that's interesting. i never got an update. can you point me to
information that describes this?

On 10/12/09 11:46 AM, Disconnect wrote:
Updates come down regardless of carrier. (The phone
periodically polls an update server and downloads the update in a zip.)
  
  On Mon, Oct 12, 2009 at 1:41 PM, Jeffrey
Blattman <jeffrey.blatt...@gmail.com>
wrote:
  

you should get an OTA update from your provider. or you can install a
3rd party dist such as cyanogenmod. 

i have an unlocked t-mobile g1 on at&t (us), so my only option was
to install a 3rd party dist, as at&t wasn't going to be pushing
updates to me. i also looked into the idea of installing the HTC ADP1
1.6 image, but for all i could tell, this won't work on a G1.



On 10/11/09 4:31 PM, Jack wrote:

  My HT-03A firm ware is Android 1.5.  But my computer's Android SDK is
1.6. So I 'd like to update firmware of HT-03A. But I don't know where
is a update package of HT-03A. please tell me for them.

Thanks.



  




-- 


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


-- 





[android-beginners] Re: Please tell me how to update firmware of HT-03A from Android 1.5 to 1.6.

2009-10-12 Thread Jeffrey Blattman




you should get an OTA update from your provider. or you can install a
3rd party dist such as cyanogenmod. 

i have an unlocked t-mobile g1 on at&t (us), so my only option was
to install a 3rd party dist, as at&t wasn't going to be pushing
updates to me. i also looked into the idea of installing the HTC ADP1
1.6 image, but for all i could tell, this won't work on a G1.

On 10/11/09 4:31 PM, Jack wrote:

  
My HT-03A firm ware is Android 1.5.  But my computer's Android SDK is
1.6. So I 'd like to update firmware of HT-03A. But I don't know where
is a update package of HT-03A. please tell me for them.

Thanks.


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

  


-- 





[android-beginners] Re: Updating Google Ion from 1.5 to 1.6

2009-10-10 Thread Jeffrey Blattman
i have an unlocked, rooted t-mobile g1, running on at&t. i am wondering how
i'll get to 1.6 considering google is shutting down the 3rd party
distributions.

i wish i understood what the real requirement is to install the developer
1.6 build mentioned below. is it just that the phone is rooted? or is there
something special about the developer phone?

On Sat, Oct 10, 2009 at 8:23 PM, Justin Grammens wrote:

>
> Hi,
> I'm hoping this page will help you.
>
> http://developer.htc.com/google-io-device.html
>
> Let us know if you have problems. I haven't followed these steps, but
> am going to be trying to upgrade my Google Ion in the next few days.
>
>
> On Oct 7, 9:29 pm, gyy  wrote:
> > I have a Google Ion (the version of the HTC Magic that was handed out
> > at the Google IO Developers Conference) that was given to me as a
> > gift.  Unfortunately, I have no idea how to update the OS on the phone
> > to 1.6.  I looked up the HTC support website and I have all the
> > necessary files, but I have no idea how to execute any of the
> > instructions.  HTC tech support directed me to this community.  Just
> > to highlight my level of ignorance: I don't know how to use a command
> > line, I have no idea what a bootloader is, I don't know how to use the
> > SDK (although I have it on my computer and I installed Eclipse as
> > well), etc.
> >
> > If anybody has time to run through a true "Android for Dummies" guide
> > to upgrade my phone to 1.6, I would be forever grateful.  Thanks!
> >
> > Gene
> >
>

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



[android-beginners] Re: plz help with sdcard image file and push command not working!!

2009-10-07 Thread Jeffrey Blattman




http://developer.android.com/guide/tutorials/views/hello-gallery.html

On 10/7/09 5:03 PM, wahib haq wrote:

  
thanks john. how to enter images in the gallery ???

On 10/7/09, jbrohan  wrote:
  
  

I'm a beginner too.
I use ddms. Run the command window in Windows, then type ddms here. If
you have the paths set up properly it will work, else you need to go
to /tools and enter ddms. This program links with
the debugger and provides real time readings of logcat and also
device>file explorer shows the files and offers an easy upload and
download.

Images as such do not show up in teh gallery, they need to be entered
into the gallery which creates a thumbnail for them.
best of luck
John
On Oct 5, 10:40 pm, wahib  wrote:


  hi !! I have created a image file in a folder /androidimages and when
i try to run emulator from terminal giving path to this image file it
gives error:

i try => $ emulator -sdcard /home/soms/androidemuimages/androidnew.img
-avd androidnew
error=> SDL init failure, reason is: No available video device

as a second alternative i give path to this image file in AVD manager
in eclipse but even it doesnt recognises it i guess. coz when i try to
use camera it display the toast that sdcard is not enabled.

=

second problem is that when i try to push a .bmp file to sdcard using
$ adb push bar3.bmp /sdcard
there is no error but there is no change in logcat and no image added
to gallery. or is it somewhere else?:S

Plz forgive if i sound childish.

Thanks in advance,
regards,
wahib

  



  
  

  


-- 





[android-beginners] read phone's number?

2009-10-07 Thread Jeffrey Blattman




is there a way to read the phone's (current) phone number? i realize
this would require a permission grant at least.

thanks.

-- 


-- 





[android-beginners] Re: application in notificaiton bar

2009-10-07 Thread Jeffrey Blattman
You can create an ongoing / persistent notification. This can act as a
pointer to your app. Music player and many other apps do this.

On Oct 7, 2009 7:14 AM, "Saikat"  wrote:


Can I put my application in the top notification bar so that it can be
accessed from any application?

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



[android-beginners] Re: Is there a Java API Spec for Android

2009-10-06 Thread Jeffrey Blattman
mark,

as far as the language goes, is android java 1.6 or 1.5? i assume 1.6 but i
couldn't find anything that stated that explicitly.

the other thing i don't understand is binary compatibility. i had assumed i
could not take a class compiled with something other than the android SDK
and use it in android, but it appears that is not that case as i've seen
that one can take an arbitrary JAR and use it in an android project ... with
the limitation i assume that it can't use parts of the Java SE SDK that
aren't part of android. is this correct?

thanks.

On Tue, Oct 6, 2009 at 8:25 PM, Mark Murphy  wrote:

>
> > It looks like most (but not all) of Java SE is there other than awt.
>
> Uh, no. Swing and other packages are missing outright, and various classes
> are missing from other packages (e.g., most of java.beans).
>
> > Are all the included packages complete per Java SE 1.5?
>
> No.
>
> > What happens if you try to use a class in javax.xml.xpath for example?
>
> I suspect it may cause a rupture in the space-time continuum. If you could
> avoid doing that, it'd be appreciated... ;-)
>
> > Can you only find this kind of mistake by testing?
>
> Testing or reading the SDK docs to see if the class in question is part of
> the public SDK.
>
> > Who decides what part of Java is included.
>
> First tier is the Apache Harmony project, from which Android gets its
> java.* and javax.* packages.
>
> After that, it's the core Android team.
>
> > I'm just trying to understand how the platform is defined.
>
> The same way any class library is defined: by its documentation.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
>
>
> >
>

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



[android-beginners] zoomToSpan() then setZoom()

2009-10-05 Thread Jeffrey Blattman




i have some code that uses zoomToSpan(...), then calls getZoomLevel()
and based on the result may call setZoom(...). this is to ensure a
minimum zoom level. 

what i am seeing is that the call to setZoom(...) is ignored and the
level is not set. does zoomToSpan() introduce some sort of pending
operation that when executed overwrites the call to setZoom()? perhaps
the operation hasn't animated to the value yet?

not sure if there's another way to do this ... as i don't think there's
any way to go directly from a lat-lng span to a zoom level other than
calling zoomToSpan() and getting the result.

any ideas?

thanks.

-- 





[android-beginners] Re: Creating a Lite and Pro version of an application

2009-10-05 Thread Jeffrey Blattman




what's missing from the market is dependencies. i often had the idea of
publishing an "app" that is just a service for use by other apps ...
but the fact that the user needs to manually download the service first
sort of rules that out.

if we had dependencies, you could have an app core and then have a free
and paid app "check" that depend on the core. all the checker activity
does it set some bit and then launch the core.  yes i know that's a lot
of hand waving.

On 10/5/09 1:55 PM, Steve Oliver wrote:
So a user would need to download both the free app, as
well as the paid app (which unlocks features in the free app)?
  
  
  Is there a way where a user could download just the paid app?
  
  On Mon, Oct 5, 2009 at 1:34 PM, Justin
Anderson 
wrote:
  The
method is to have a main application and an application that acts a key
to "unlock" functionality in the main app.  You can't upload two
products with the same package to the android market.

Doing it the way I described in the other thread allows the main
application to contain all the functionality to run in both "lite" and
"paid" modes.  The mode that the application runs in is determined by
whether you have the key installed, which of course would have to have
a separate package name because you are not allowed to upload two
projects with the same package name.  

The application that acts as a key never even has to run... it just has
to exist. Although, in my case, I have my key program set to just
launch my main app and quit.

Pulling common stuff out into a separate library would "work" (kind of)
but it would not be as easy as my method.


Thanks,
Justin

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--





On Mon, Oct 5, 2009 at 2:19 PM, Steve 
wrote:

  
I don't think the other thread explained how to do this without
creating two package names.  You would either have to re-name your
package each time you published, or you would need two different
projects, wouldn't you?
  
Another approach is to try to pull out as much common functionality as
you can into a 3rd Java-only project, with each of your projects (paid
and free).  The tough part is that you can't move anything that
references resources into a Java-only project.
  
On Oct 5, 11:58 am, Justin Anderson 
wrote:
> I have already asked the same question, and later the solution on
another
> thread.  Just do a quick search for "code base" and you will find
out how to
> do this.
>
> If you have done this already, then you can ignore this, but a lot
of
> duplicate questions can be eliminated simply by searching for an
answer
> before posting a new question...
>
> Thanks,
> Justin
>
>
--
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
>
--
>
>
>
  
  
  > On Sun, Oct 4, 2009 at 7:48 PM, jax  wrote:
>
> > I want to crete two seperate android applications.
>
> > 1.  A "Lite" version with limited functionality
> > 2.  A upgrade to the lite version (Pro version) with extended
> > functionality (This will cost money)
>
> > Can someone tell me the best way to approach thisproject
setup
> > etc.
  
  
  







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


-- 





[android-beginners] Re: emulator + 1.6, cannot set location

2009-10-04 Thread Jeffrey Blattman
never mind. geo fix ... was working, but i had "use network" enabled on the
emulator. if this is the case, it returns the network provider, which does
not give a location (returns null from getLastKnown...).

On Sun, Oct 4, 2009 at 7:00 AM, Jeffrey Blattman  wrote:

> in 1.5, i could set a location into the emulator by telnet'ing to the
> emulator's port, and doing "geo fix  ". since moving to 1.6 (and
> i'm on a new OS if that matters which i assume it doesn't), the telnet and
> command work fine but it doesn't appear that the emulator picks it up. when
> i do "my location" on google maps, it eventually comes back and says "your
> location is temporaily unavailable".
>
> did i forget something?
>

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



[android-beginners] emulator + 1.6, cannot set location

2009-10-04 Thread Jeffrey Blattman
in 1.5, i could set a location into the emulator by telnet'ing to the
emulator's port, and doing "geo fix  ". since moving to 1.6 (and
i'm on a new OS if that matters which i assume it doesn't), the telnet and
command work fine but it doesn't appear that the emulator picks it up. when
i do "my location" on google maps, it eventually comes back and says "your
location is temporaily unavailable".

did i forget something?

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



[android-beginners] Re: onCreate() and current tab

2009-10-04 Thread Jeffrey Blattman
thanks mark.

my answer is what you'd expect. i thought it would make the app most
modular. your approach would have been better. in retrospect, the use case
for "tabs as activities" is probably only to allow someone to quickly stick
an existing, stand alone activity in a tab. for some reason inflater is
never intuitive to me.

to get around this i ended up moving the initialization code out of
onCreate(), adding a listener for tab change, and sending a message to
initialize the activities separately. another problem with the "tabs as
activities" approach is that in general i have quite a lot of code dedicated
to communciation between the tab activity and the tabs' activities.

On Sun, Oct 4, 2009 at 5:48 AM, Mark Murphy  wrote:

> Frankly, I have yet to figure out what that sex appeal is of putting
> activities in tabs. AFAICT, it results in more fragile code. If you need
> the same things to be in a tab *and* in a separate activity, reuse the
> inflation and view logic between a standalone activity and just using the
> View for a tab's contents. All the tabs-as-activities code seems to do is
> launch the activity, then rip the root view out of that activity and put
> it in the tab.
>
> So, if you really want control over what happens when, I'd skip the
> tabs-as-activities approach, and just put ordinary views in the tabs.
>
> But, that's just me.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
>
>
> >
>

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



[android-beginners] Re: onCreate() and current tab

2009-10-03 Thread Jeffrey Blattman
actually, i was mistaken. onCreate() for all the added tabs is called.
considering, it seems less likely that there's a solution ... i'd like to
only call onCreate() for the selected tab.

On Sat, Oct 3, 2009 at 9:43 PM, Jeffrey Blattman  wrote:

> i have a tab host that saves the last selected tab into a preference, and
> loads it again in onCreate(). i add the tabs to the tab host through an
> intent, such as,
>
>
> mTabHost.addTab(mTabHost.newTabSpec("closest").setIndicator("Closest",
>
> getResources().getDrawable(R.drawable.location)).setContent(
> new Intent(this, ClosestActivity.class)));
>
> the problem is that i only want the onCreate() method of the selected tab
> to be called. however, the onCreate() method of the first tab added through
> addTab() is always called, regardless of the selected tab. i figure this is
> happening because i'm calling addTab() before i've called setCurrentTab().
> since there's no selected tab set when i call addTab(), it assumes it's the
> first one added.
>
> assuming i'm correct there, is there a way to delay the tab host's
> "initialization" of the selected tab, until i can set it manually? or maybe
> i'm missing some other sublety.
>
>
>

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



[android-beginners] onCreate() and current tab

2009-10-03 Thread Jeffrey Blattman
i have a tab host that saves the last selected tab into a preference, and
loads it again in onCreate(). i add the tabs to the tab host through an
intent, such as,


mTabHost.addTab(mTabHost.newTabSpec("closest").setIndicator("Closest",
getResources().getDrawable(R.drawable.location)).setContent(
new Intent(this, ClosestActivity.class)));

the problem is that i only want the onCreate() method of the selected tab to
be called. however, the onCreate() method of the first tab added through
addTab() is always called, regardless of the selected tab. i figure this is
happening because i'm calling addTab() before i've called setCurrentTab().
since there's no selected tab set when i call addTab(), it assumes it's the
first one added.

assuming i'm correct there, is there a way to delay the tab host's
"initialization" of the selected tab, until i can set it manually? or maybe
i'm missing some other sublety.

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



[android-beginners] Re: Apple Mac

2009-10-02 Thread Jeffrey Blattman




yes, the android SDK is available for mac.

On 10/2/09 2:11 AM, c.mcgor...@gmail.com wrote:

  Can Android be programmed on an Apple Mac, have recently switched over. 

Thanks. 


Sent via my BlackBerry from Vodacom - let your email find you!

-Original Message-
From: ITWizard 
Date: Fri, 2 Oct 2009 02:09:55 
To: Android Beginners
Subject: [android-beginners] Re: Compile C on Android Phone


Hei cookiemonsta,

"yes, you can!" to quote somebody famous.

To get it started consult the Android NDK package -
http://developer.android.com/sdk/ndk/1.5_r1/index.html
it also has 2 applications to get you started from the basics of it.

For a more complex application including Java and C++, you can also
check our website - http://www.itwizard.ro/category/android-cc
You can also download the source code and play a bit with the app.

Best regards,
IT Wizard



On Oct 2, 10:43 am, Paul Turchenko  wrote:
  
  
Doubt that.

On Oct 1, 4:36 am, cookiemonsta  wrote:



  i would like to know if there is a compiler that can be installed ON
the android phone to be used to compile C programms.
  

  
  

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

  


-- 





[android-beginners] Re: Web Service

2009-10-02 Thread Jeffrey Blattman




apparently you can use netbeans to develop android apps, but any
documentation you find is going to reference eclipse ... if you google
for netbeans + android you'll find one page, but other than that you
are on your own.

On 9/30/09 5:33 AM, Eray Ince wrote:
I am newbie @Android, but I have experience with J2ME.
  
I would like to start a forecast application using Netbeans which will
use webservice.
Could anybody provide me a guide, link, etc.?
Thanks in Advance
Kind Regards
  
  
-- 
--
Eray
  
  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 
Groups "Android Beginners" group. 
To post to this group, send email to android-beginners@googlegroups.com
  
To unsubscribe from this group, send email to 
android-beginners-unsubscr...@googlegroups.com 
For more options, visit this group at 
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---
  


-- 





[android-beginners] Re: Pass data between activitys

2009-09-29 Thread Jeffrey Blattman




yes, the object needs to be serializable or parcelable.

On 9/29/09 2:22 PM, DWischer wrote:

  


On 29 Sep., 20:11, Mark Murphy  wrote:
  
  
Use putExtra() on the Intent you use to launch the new Activity. The new
Activity can then use getExtra() to retrieve them.

  
  
Is it possible to pass complete Java objects via putExtra? I just
found functions for passing simple data types.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---

  


-- 





[android-beginners] question: adp1 images on a t-mobile g1?

2009-09-29 Thread Jeffrey Blattman




what is special about the adp1 images that makes them only flashable on
an adp1? that's what htc claims. is it something for subtle, for
example, root access is required? or is there something special about
the adp1's hardware that really prevents it from being installed on a
g1?

i ask because i own an unlocked g1 used with at&t, and with the
removal of modded android dists, i no longer have an upgrade path.

thanks.

-- 





[android-beginners] Re: HTC Hero

2009-09-28 Thread Jeffrey Blattman




yes. my understanding is that the motorola cliq is doing something
similar  ... android, but with an altered front end. it sent a chill
down my spine. IMHO, these companies should be putting effort into
android to improve its theme mechanism until it can cover their needs.
then we should be able to install the hero theme, or the cliq theme on
any phone.

now, maybe motorola / htc would not license use of the theme on other
phones, but it should be possible technically.



On 9/28/09 12:40 PM, Jonas Petersson wrote:

  
Jeffrey Blattman wrote:
  
  
android apps are write once run anywhere (in theory).

  
  
Technically, yes. However, my experience is that many Hero users expect 
apps to also LOOK like most of the apps that come with their Hero from 
the start and since HTC has significantly altered the look&feel an app 
that looks "normal" on the G1/G2 may very well be considered "ugly" on 
the Hero.

I've had one Hero user rate one of my apps with a single star just 
because of this (even though he claimed the app did everything he 
expected). Sure, I could dismiss this user as ignorant, but don't we all 
hope that every single noob should own an android? As Hero is the most 
common android around here, I decided to alter the way my app looks. 
Ideally there should be a way to skin all apps the same, but alas it is 
not there yet. Maybe we can hope for 2.0?

			Best / Jonas

  
  
On 9/28/09 12:16 PM, Eros Stein wrote:


  Hi everyone.
Does anyone know if there are differences between the G2 and Hero.
Software differences.
Will the app I wrote for G2 work the same way on a Hero?
  

  
  


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

  


-- 





[android-beginners] Re: HTC Hero

2009-09-28 Thread Jeffrey Blattman




android apps are write once run anywhere (in theory).

On 9/28/09 12:16 PM, Eros Stein wrote:
Hi everyone.
Does anyone know if there are differences between the G2 and Hero. 
Software differences.
Will the app I wrote for G2 work the same way on a Hero?
  
Thanks.
  
-- 
Eros Eduardo Stein
Técnico de Informática / Em breve analista.
USE >> http://www.ekaaty.org
  http://www.erosstein.info
  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 
Groups "Android Beginners" group. 
To post to this group, send email to android-beginners@googlegroups.com
  
To unsubscribe from this group, send email to 
android-beginners-unsubscr...@googlegroups.com 
For more options, visit this group at 
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---
  


-- 





[android-beginners] Re: Motorola Krave zn4 run on android?

2009-09-28 Thread Jeffrey Blattman




as far as i can tell it doesn't run linux. regardless, running linux is
one thing, having an android dist for that hardware is completely
different.

On 9/26/09 9:32 PM, candyman wrote:

  
As most of you know the Moto Krave zn4 runs on linux, but is it
possible to run android on this device?

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

  


-- 





[android-beginners] Re: Possible to use same object in a Service?

2009-09-28 Thread Jeffrey Blattman




not possible that i am aware of. the service, your objects, and classes
(including static objects) can be kicked from memory at any point ...
by design. if every app did what you are trying to do, the larger
system would suffer. 

without knowing why you want to keep the object in memory, it's hard to
suggest other approaches.

On 9/28/09 6:09 AM, Oskar wrote:

  
Hi,

I have a service (extends service) that has an object called mailbox.
Every time i enter my service via an intent I would like to use the
same object to call some put and get methods. I don't want the object
to reload from scratch every time I enter the service.

Is this possible?

Example code would be very appreciated.

Thanks.

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

  


-- 





[android-beginners] Re: remote app commands sent via http

2009-09-27 Thread Jeffrey Blattman




no, there's a default read timeout. the only thing i noticed wrong was
that you were writing to URL itself to the stream.

On 9/27/09 11:42 AM, HTN wrote:

  
Seems like I was on the right track as I had url.openconnection. Is
the ReadTimout portion what I was doing wrong?

I'll try the code out when I get back home tomorrow. Thanks for the
help.


On Sep 27, 2:21 pm, Jeffrey Blattman 
wrote:
  
  
nah. first, he said that the endpoint wants GET params, and you are
opening with POST method below. you don't need to write data to the
stream. the data is passed to the endpoint as GET params.

if you just want to pass the get params, it's enough to just call
openConnection(). depending on how the endpoint returns a response, you
can check the response code with getResponseCode(), or you can read a
data response (XML, JSON, etc) by calling getInputStream(). here's the
simplest case,

             URL url = "" URL(urlString);
             HttpURLConnection uc = (HttpURLConnection)
url.openConnection();
             uc.setReadTimeout(30 * 1000); // 30 seconds

             if (uc.getResponseCode() != 200) {
                 //TODO: handle error and return
             }

             reader = new BufferedReader(new
InputStreamReader(uc.getInputStream(), "ISO-8859-1"), 8192);
             while ((line = reader.readLine()) != null) {
                 result.append(line);
                 result.append('\n');
             }

             // result data is in "result"

On 9/27/09 11:07 AM, Alok Kulkarni wrote:







  This works
URL url = "" URL(serverURL);
  




              // open the conncetion
            HttpURLConnection connection =
(HttpURLConnection)url.openConnection();
  




              // Let the run-time system (RTS) know that we want input.
            connection.setDoInput(true);
            // Let the RTS know that we want to do output
            connection.setDoOutput(true);
            // No caching, we want the real thing
            connection.setUseCaches(false);
            // set the content type property
            connection.setRequestProperty("Content-type",strContenttype);
  




              // set request method
            connection.setRequestMethod("POST");
            // create the post body to send
            String content = credDevPair.toString();
            Log.i("Request ... ",content);
            DataOutputStream printout = new DataOutputStream (
connection.getOutputStream () );
  




              // send the data
            printout.writeBytes(content);
            printout.flush();
            printout.close();
  




  On Sun, Sep 27, 2009 at 11:25 PM, HTN <revil...@gmail.com
> wrote:
  




      It's through GET parameters. I can type in the following command in a
    browser's URL box and it works:
   http://192.168.0.12/output_format=xml&DeviceNum=13&action="">...
    
  




      I'm used to sending commands through TCP sockets so I'm sure what's
    the best way to send a URL command. I'm guessing the "opening" a URL
    part isn't adequate.
  




      On Sep 26, 8:49 pm, Jeffrey Blattman <jeffrey.blatt...@gmail.com
    >
    wrote:
    > you are opening a URL, then writing that URL to the stream you
    open at
    > the URL. that's probably not what you wanted. what's the URL,
    and what
    > is the "command" you are trying to pass? how does the endpoint
    accept
    > the command? by reading POST data? through GET parameters?
  




      > On 9/25/09 7:31 PM, HTN wrote:
  




      > > I'm developing a remote app that sends commands via http.
    Normally I
    > > type in a link in a browser and the command will work. With
    Android, I
    > > would like it to work with a press of a button. I tried the
    following
    > > code and it didn’t work:
  




      > >             URL url = "" URL(urlString);
  




      > >              URLConnection connection = url.openConnection();
    > >              connection.setDoOutput(true);
  




      > >              OutputStreamWriter out = new OutputStreamWriter
    > > (connection.getOutputStream());
    > >            out.write(urlString);
    > >            out.close();
  




      > > "urlstring&q

[android-beginners] Re: remote app commands sent via http

2009-09-27 Thread Jeffrey Blattman




nah. first, he said that the endpoint wants GET params, and you are
opening with POST method below. you don't need to write data to the
stream. the data is passed to the endpoint as GET params.

if you just want to pass the get params, it's enough to just call
openConnection(). depending on how the endpoint returns a response, you
can check the response code with getResponseCode(), or you can read a
data response (XML, JSON, etc) by calling getInputStream(). here's the
simplest case,

    URL url = "" URL(urlString);
    HttpURLConnection uc = (HttpURLConnection)
url.openConnection();
    uc.setReadTimeout(30 * 1000); // 30 seconds

    if (uc.getResponseCode() != 200) {
    //TODO: handle error and return
    }

    reader = new BufferedReader(new
InputStreamReader(uc.getInputStream(), "ISO-8859-1"), 8192);
    while ((line = reader.readLine()) != null) {
    result.append(line);
    result.append('\n');
    }

            // result data is in "result"

On 9/27/09 11:07 AM, Alok Kulkarni wrote:
This works
URL url = "" URL(serverURL);
  
              // open the conncetion
  
            HttpURLConnection connection =
  
(HttpURLConnection)url.openConnection();
  
  
              // Let the run-time system (RTS) know that we want
input.
  
            connection.setDoInput(true);
  
            // Let the RTS know that we want to do output
  
            connection.setDoOutput(true);
  
            // No caching, we want the real thing
  
            connection.setUseCaches(false);
  
            // set the content type property
  
           
connection.setRequestProperty("Content-type",strContenttype);
  
  
              // set request method
  
            connection.setRequestMethod("POST");
  
            // create the post body to send
  
            String content = credDevPair.toString();
  
            Log.i("Request ... ",content);
  
            DataOutputStream printout = new DataOutputStream (
  
connection.getOutputStream () );
  
  
            // send the data
  
            printout.writeBytes(content);
  
            printout.flush();
  
            printout.close();
  
  
  On Sun, Sep 27, 2009 at 11:25 PM, HTN <revil...@gmail.com>
wrote:
  
It's through GET parameters. I can type in the following command in a
browser's URL box and it works:
http://192.168.0.12/output_format=xml&DeviceNum=13&action="">

I'm used to sending commands through TCP sockets so I'm sure what's
the best way to send a URL command. I'm guessing the "opening" a URL
part isn't adequate.

On Sep 26, 8:49 pm, Jeffrey Blattman <jeffrey.blatt...@gmail.com>
wrote:

> you are opening a URL, then writing that URL
to the stream you open at
> the URL. that's probably not what you wanted. what's the URL, and
what
> is the "command" you are trying to pass? how does the endpoint
accept
> the command? by reading POST data? through GET parameters?
>
> On 9/25/09 7:31 PM, HTN wrote:
>
>
>
>
>
> > I'm developing a remote app that sends commands via http.
Normally I
> > type in a link in a browser and the command will work. With
Android, I
> > would like it to work with a press of a button. I tried the
following
> > code and it didn’t work:
>
> >             URL url = "" URL(urlString);
>
> >              URLConnection connection = url.openConnection();
> >              connection.setDoOutput(true);
>
> >              OutputStreamWriter out = new OutputStreamWriter
> > (connection.getOutputStream());
> >            out.write(urlString);
> >            out.close();
>
> > "urlstring" is the http command link.
>
> > Any ideas? Am I on the wrong track? I'm confused because
technically I
> > don't need to write anything to the link. I would think it
would work
> > if I just open the connection.
>
> > Thanks.
>
> --



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


-- 





[android-beginners] Re: Confused how to get root access to my adp1 phone

2009-09-27 Thread Jeffrey Blattman




you can always get root access regardless of the current state of your
phone. here's one guide.
http://forum.xda-developers.com/showthread.php?t=548924

On 9/26/09 11:40 PM, William Heath wrote:
Hi All,
  
  
  I am working with a borrowed phone from google and they said it
was a "dev phone".  The back just says with Google.  When I go to
setting->about phone I see:
  
  
  Model Number:  Android Dev Phone 1
  Firmware version 1.5
  
  
  Kernel Version:  2.6.27-00399-gc7f8bce
  Build number:  CRC56
  
  
  adb root gives:
  
  
  
  adb root
  adbd cannot run as root in production builds
  
  
  I am confused by this.  I was told I would automatically have
root access because this was a dev phone.  Anyway, what can I try/do to
get root access?  I also want to build my own custom builds, does this
mean I can't?
  
  
  http://recluze.wordpress.com/2009/07/20/flashing-android-dev-phone-1/
  
  
  Anyway, thanks for the help!
  
  
  -Tim
  
  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 
Groups "Android Beginners" group. 
To post to this group, send email to android-beginners@googlegroups.com
  
To unsubscribe from this group, send email to 
android-beginners-unsubscr...@googlegroups.com 
For more options, visit this group at 
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---
  


-- 





[android-beginners] Re: Should anyone be allowed to alter Android OS and Applications?

2009-09-27 Thread Jeffrey Blattman




the big deal is that the license does not grant the right to
re-distribute. this is pretty standard for a closed source license. 

while it's true that most (all?) android phones come with the google
apps today, there's no requirement of that and it may not be the case
in the future. mr. cell phone maker can take AOSP and build their own
dist and choose not to include the google apps. google doesn't want mr.
happy phone owners to be able to install a 3rd party dist that includes
the google apps. why not? because mr. happy vendor didn't license the
apps from google, and the apps weren't tested on mr. happy vendor's
hardware.

On 9/26/09 11:03 PM, Fugita wrote:

  
Understood but they come with the phone already so what is the big
deal? It is not like CM is altering the Google Applications.  He is
altering the OS.

On Sep 26, 10:09 pm, Jeffrey Blattman 
wrote:
  
  
unfortunately, it's not that simple. there are parts of android dists
like CM that are not in AOSP. the google apps are a major, glaring
example. their license clearly does not allow them to be re-distributed.
so you can make a custom android dist, but it can't include google mail,
google maps, google contacts, etc. the analogy would be if you created a
custom linux dist and bundled a bunch of for-pay, closed-source software
with it. no one would question why that is illegal.

i think a lot of people just assume that those google android apps are
open source. they aren't.

On 9/26/09 6:56 PM, Fugita wrote:



  It is an Open Operating System with the code released for all to use
but developers have stopped Modifying the Stock OS because it seems it
is illegal! WHAT... I mean really it is OPEN!  Meaning we can do what
we want with the code as long as we are not selling it for profit,
right?
  




  I just don't get it.  I mean with developers out there like Cyanogen
making the OS better, I'd be looking at his work to see what could be
done to add changes to the OS and MAKE IT BETTER!
  




  Why not listen to the community instead of trying to shut them down!
  


--

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

  


-- 





[android-beginners] Re: Should anyone be allowed to alter Android OS and Applications?

2009-09-26 Thread Jeffrey Blattman




unfortunately, it's not that simple. there are parts of android dists
like CM that are not in AOSP. the google apps are a major, glaring
example. their license clearly does not allow them to be
re-distributed. so you can make a custom android dist, but it can't
include google mail, google maps, google contacts, etc. the analogy
would be if you created a custom linux dist and bundled a bunch of
for-pay, closed-source software with it. no one would question why that
is illegal.

i think a lot of people just assume that those google android apps are
open source. they aren't.

On 9/26/09 6:56 PM, Fugita wrote:

  
It is an Open Operating System with the code released for all to use
but developers have stopped Modifying the Stock OS because it seems it
is illegal! WHAT... I mean really it is OPEN!  Meaning we can do what
we want with the code as long as we are not selling it for profit,
right?

I just don't get it.  I mean with developers out there like Cyanogen
making the OS better, I'd be looking at his work to see what could be
done to add changes to the OS and MAKE IT BETTER!

Why not listen to the community instead of trying to shut them down!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---

  


-- 





[android-beginners] ADP1 available again

2009-09-26 Thread Jeffrey Blattman




just fyi, the ADP1 is again available for purchase. 

-- 





[android-beginners] Re: Is it possible to pass a set of data to an Intent?

2009-09-26 Thread Jeffrey Blattman




Intent#putExtra(key, ...)

On 9/26/09 6:15 AM, Jordan B. wrote:

  
Hi!

I want to show a picture using the Camera App's image viewer. Thus,
I'm using the following :

Uri pictureUri = ContentUris.withAppendedId
(Media.EXTERNAL_CONTENT_URI, id);
Intent viewPicture = new Intent(Intent.ACTION_VIEW, pictureUri);
this.startActivity(viewPicture);

It works well. But once the image is being displayed, then the user
can browse through the whole set of images available on the phone. I
would like to be able to show a picture, but also limit the scope of
pictures that can be viewed (in the slideshow, and by clicking on the
next and previous buttons).

Is there an EXTRA field that can be set on the Intent so that the
ViewImage activity gets the possible set of data to browse?

If it is not possible, I thought about making my own ContentProvider,
and passing the URI of the image using this ContentProvider. The
latter will only contain the set of images that the user may browse.

Will it work with my own ContentProvider?

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

  


-- 





[android-beginners] Re: remote app commands sent via http

2009-09-26 Thread Jeffrey Blattman




you are opening a URL, then writing that URL to the stream you open at
the URL. that's probably not what you wanted. what's the URL, and what
is the "command" you are trying to pass? how does the endpoint accept
the command? by reading POST data? through GET parameters?

On 9/25/09 7:31 PM, HTN wrote:

  
I'm developing a remote app that sends commands via http. Normally I
type in a link in a browser and the command will work. With Android, I
would like it to work with a press of a button. I tried the following
code and it didn’t work:

   URL url = "" URL(urlString);

URLConnection connection = url.openConnection();
connection.setDoOutput(true);

OutputStreamWriter out = new OutputStreamWriter
(connection.getOutputStream());
		out.write(urlString);
		out.close();

"urlstring" is the http command link.

Any ideas? Am I on the wrong track? I'm confused because technically I
don't need to write anything to the link. I would think it would work
if I just open the connection.

Thanks.

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

  


-- 





[android-beginners] HorizontalScrollView snap to page?

2009-09-25 Thread Jeffrey Sambells
Is there a way to make a HorizontalScrollView "snap" to a page? Let's say I
have a hsv with an overall width of 800 but only 200 viewable. I'd like to
have the scroll position snap every 200 pixels so that the resting position
is always 200 offset from the origin (thus always displaying a full "page").
Is there an easy way to do this or do I have to somehow override the gesture
interactions?

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



  1   2   >