[android-developers] illegal/unsupported escape sequence

2016-06-23 Thread 'alex b' via Android Developers
I'm getting the error in the subject line using Android studio 2.1.2 on 
Win7 x64, on the following lines:

String sep = "\\";

also with

Character sep = '\\';

very strange.


-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/fddc5081-a5ef-4275-ad45-ee08454550fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] resizing a webview dynamically

2013-08-14 Thread alex b
I'm trying to resize a webview in a relativelayout when a user clicks a 
button but it's proving to be quite difficult.  Here's what I've tried.  In 
every case the webview simply repositions itself but never resizes.
 



*protected* *void* toggleMap(){

...

lp*=new* RelativeLayout.LayoutParams(800,600);

//lp=new 
RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);

lp.addRule(RelativeLayout.

*BELOW*,R.id.*lblTop*);

web.setLayoutParams(lp);

// web.invalidate();

// web.refreshDrawableState();

// web.requestLayout();

// web.reload();

}

 

Here's my layout...



 

 

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


[android-developers] Re: activity looses ArrayList<> items

2012-07-05 Thread alex b
I've isolated the problem and this has nothing to do with ArrayList or 
Vector and everything to do with Garbage Collector.  Both of those are 
working fine exactly as I coded them when I run the code in an isolated 
activity.  Apparently GC is destorying my activity and recreating it and 
my onSaveInstanceState()/onRestoreInstanceState() code isn't working 
correctly.
 

On Thursday, July 5, 2012 1:35:07 PM UTC-7, alex b wrote:

> I saw the notice about the syncronization of the Vector type, but it 
> didn't help me find a solution to the problem.  What I believe i need to do 
> is...
>  
> lock the ArrayList, Vector whatever
> update the ArrayList
> unlock the ArrayList
>  
> but I don't know how to accomplish this.
>
>  
>
> On Tuesday, July 3, 2012 1:36:58 PM UTC-7, RichardC wrote:
>
>> I don't think Vector is thread safe in the way you expect did you read: 
>>
>> *"This class is equivalent to 
>> ArrayList<http://developer.android.com/reference/java/util/ArrayList.html> 
>> with 
>> synchronized operations. This has a performance cost, and the 
>> synchronization is not necessarily meaningful to your application: 
>> synchronizing each call to get, for example, is not equivalent to 
>> synchronizing on the list and iterating over it (which is probably what you 
>> intended). If you do need very highly concurrent access, you should also 
>> consider 
>> CopyOnWriteArrayList<http://developer.android.com/reference/java/util/concurrent/CopyOnWriteArrayList.html>
>> . "
>> *
>> http://developer.android.com/reference/java/util/Vector.html 
>>
>> The implication of the above is that your Vector change be changed from 
>> another thread whilst you are trying to serialize it.
>>
>>
>> On Monday, July 2, 2012 8:52:46 PM UTC+1, alex b wrote: 
>>>
>>> I have an activity that contains a private Vector, thread safe 
>>> version of ArrayList.  The activity adds items to the ArrayList, and in 
>>> onSaveInstanceState() I save the data (see code below).  The problem is 
>>> that it looses items and it seems to have after the GC runs.  So what am I 
>>> missing?
>>>
>>>
>>> private static RecentItems _lstRecent;
>>> 
>>> @Override
>>> public void onCreate(Bundle savedInstanceState) {
>>> 
>>> super.onCreate(savedInstanceState);
>>> setContentView(R.layout.main);
>>> 
>>>  restoreRecents(savedInstanceState);
>>> }
>>>
>>> @Override
>>> protected void onSaveInstanceState(Bundle outState){
>>> super.onSaveInstanceState(outState);
>>> 
>>> String s=serializeIt(_lstRecent);
>>> bundle.putString("lstRecent", s);
>>> }
>>> 
>>> @Override
>>> protected void onRestoreInstanceState(Bundle outState){
>>> super.onSaveInstanceState(outState);
>>> 
>>> this.restoreRecents(outState);
>>> }
>>>
>>> private void restoreRecents(Bundle bundle){
>>>  if (bundle!=null){
>>>  String s = bundle.getString("lstRecent");
>>> _lstRecent=deserializeIt(s);
>>> }
>>>  
>>> if (_lstRecent ==null)
>>> _lstRecent=new RecentItems();//unt
>>>
>>> }
>>>
>>>

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

[android-developers] Re: activity looses ArrayList<> items

2012-07-05 Thread alex b
I saw the notice about the syncronization of the Vector type, but it didn't 
help me find a solution to the problem.  What I believe i need to do is...
 
lock the ArrayList, Vector whatever
update the ArrayList
unlock the ArrayList
 
but I don't know how to accomplish this.

 

On Tuesday, July 3, 2012 1:36:58 PM UTC-7, RichardC wrote:

> I don't think Vector is thread safe in the way you expect did you read: 
>
> *"This class is equivalent to 
> ArrayList<http://developer.android.com/reference/java/util/ArrayList.html> 
> with 
> synchronized operations. This has a performance cost, and the 
> synchronization is not necessarily meaningful to your application: 
> synchronizing each call to get, for example, is not equivalent to 
> synchronizing on the list and iterating over it (which is probably what you 
> intended). If you do need very highly concurrent access, you should also 
> consider 
> CopyOnWriteArrayList<http://developer.android.com/reference/java/util/concurrent/CopyOnWriteArrayList.html>
> . "
> *
> http://developer.android.com/reference/java/util/Vector.html 
>
> The implication of the above is that your Vector change be changed from 
> another thread whilst you are trying to serialize it.
>
>
> On Monday, July 2, 2012 8:52:46 PM UTC+1, alex b wrote: 
>>
>> I have an activity that contains a private Vector, thread safe 
>> version of ArrayList.  The activity adds items to the ArrayList, and in 
>> onSaveInstanceState() I save the data (see code below).  The problem is 
>> that it looses items and it seems to have after the GC runs.  So what am I 
>> missing?
>>
>>
>> private static RecentItems _lstRecent;
>> 
>> @Override
>> public void onCreate(Bundle savedInstanceState) {
>> 
>> super.onCreate(savedInstanceState);
>> setContentView(R.layout.main);
>> 
>>  restoreRecents(savedInstanceState);
>> }
>>
>> @Override
>> protected void onSaveInstanceState(Bundle outState){
>> super.onSaveInstanceState(outState);
>> 
>> String s=serializeIt(_lstRecent);
>> bundle.putString("lstRecent", s);
>> }
>> 
>> @Override
>> protected void onRestoreInstanceState(Bundle outState){
>> super.onSaveInstanceState(outState);
>> 
>> this.restoreRecents(outState);
>> }
>>
>> private void restoreRecents(Bundle bundle){
>>  if (bundle!=null){
>>  String s = bundle.getString("lstRecent");
>> _lstRecent=deserializeIt(s);
>> }
>>  
>> if (_lstRecent ==null)
>> _lstRecent=new RecentItems();//unt
>>
>> }
>>
>>

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

Re: [android-developers] activity looses ArrayList<> items

2012-07-03 Thread alex b
Thanks for the suggestion, however when I debug the app the items get lost 
before serialization, i.e. If I set a breakpoint before serialization 
usually the correct items appear but occassionally all items will disappear 
from the vector object and it seems to have just after the GC message in 
LogCat.

 

On Monday, July 2, 2012 1:33:23 PM UTC-7, TreKing wrote:

> On Mon, Jul 2, 2012 at 2:52 PM, alex b  wrote:
>
>> The problem is that it looses items and it seems to have after the GC 
>> runs.  So what am I missing?
>
>
> I would guess your "serializeIt" and "deserializeIt" methods are buggy. 
> Debug your app.
>
> Also, both onCreate and onRestoreInstanceState will be called when 
> necessary, so you should not duplicate the same code in both methods (in 
> your case, calling "restoreRecents".
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
> transit tracking app for Android-powered devices
>
>

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

[android-developers] activity looses ArrayList<> items

2012-07-02 Thread alex b
I have an activity that contains a private Vector, thread safe 
version of ArrayList.  The activity adds items to the ArrayList, and in 
onSaveInstanceState() I save the data (see code below).  The problem is 
that it looses items and it seems to have after the GC runs.  So what am I 
missing?


private static RecentItems _lstRecent;

@Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.main);

 restoreRecents(savedInstanceState);
}

@Override
protected void onSaveInstanceState(Bundle outState){
super.onSaveInstanceState(outState);

String s=serializeIt(_lstRecent);
bundle.putString("lstRecent", s);
}

@Override
protected void onRestoreInstanceState(Bundle outState){
super.onSaveInstanceState(outState);

this.restoreRecents(outState);
}

private void restoreRecents(Bundle bundle){
 if (bundle!=null){
 String s = bundle.getString("lstRecent");
_lstRecent=deserializeIt(s);
}
 
if (_lstRecent ==null)
_lstRecent=new RecentItems();//unt

}

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

[android-developers] Re: TO COMPARE TWO BITMAP FILES AND SHOW RESULT USING BUTTON

2012-07-02 Thread alex b
Developer forums are for getting help with code that you have ALREADY 
written.  It's generally frowned upon to ask the forum to write the code 
for you.

What you want to do doesn't sound trivial, but i would guess you'll need to 
compare each bit of each bitmap and come up with some kind of threshold for 
determining how close two colors are to each other.  

Post your code after you've given it a stab and you may get more help.


On Thursday, June 28, 2012 6:04:31 AM UTC-7, chain_chelliah wrote:
>
> I'm new to this group. Hope you're all support me well. My things that i 
> want to compare two or more bitmap files each other and showing the results 
> by clicking on BUTTON. please suggest good one.
>
> Thanks in Advance.
>

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

[android-developers] Re: Share to unlock functions

2012-07-02 Thread alex b
it doesn't sound like such a new idea, i.e. i think a lot of apps already 
do that.  So i would guess it's OK to do.


On Thursday, June 28, 2012 7:57:59 AM UTC-7, Oliver wrote:
>
> Hi, 
>
> So I have an idea for making my app more popular. It's a free app, but 
> some functions are not available by default. To unlock them, you would 
> have to type in a key. You can get this key by sharing a link to the 
> app's Google Play page and as soon as 5 friends of you have clicked on 
> it, you receive the unique key via email. 
>
> So, my main concern is, whether this strategy is allowed for apps at 
> Google Play?

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

[android-developers] Re: Cannot Find create new android project in ecllipse

2012-07-02 Thread alex b
Here's a link to the first android tutorial that covers creating a project 
and building a hello world app:

http://developer.android.com/training/basics/firstapp/creating-project.html 

If you have a problem with the installation that is preventing the new 
project wizard from lauching, I would suggest reinstalling the sdk.  If 
you're installing on Windows make sure you run the install as an 
administrator.

good luck


On Saturday, June 30, 2012 11:36:51 AM UTC-7, naidu harish wrote:
>
> Hi all, 
>I am new in android development, I have Installed ADK20 in 
> ecllipse and SDK for android and set the Android in the preferences. 
> When i am trying to create a new project i cannot find Android project 
> when i go in File->new->project and in drop down i found android 
> applicatioo project. 
> How can i create new android project please  help me. 
> Thanks in advance.

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

[android-developers] Re: about the communication channels between android apps

2012-06-14 Thread alex b
I don't know of any way that an application can communicate with another 
app outside of the OS.  It's my understanding that in order for an app to 
communicate with another app it has to call startActivityForResult() and 
then it would get the result of the activity that it started.  It can also 
pass parameters to the activity that it starts.  I imagine services may 
have the ability to communicate with each othr but I don't know much about 
that.
 

On Tuesday, June 12, 2012 10:33:47 PM UTC-7, michael wrote:

> Hi, 
>
> the following is one statement, is it correct? : 
> that applications do not run natively and inter-app communications 
> must take place via IPC is not entirely true. There are ways for 
> application to communicate without going through pre-defined OS 
> provided channels. 
>
>
> Thanks a lot for your reply 
>
> M

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

[android-developers] Re: understanding unique visitors on mobiles

2012-06-14 Thread alex b
'more precise' is a matter of what you want to know.  Do you care about how 
many users are using your app (unique visitors), or how much your users are 
using the app (visitors)?  I can see both numbers being important under 
differenct scenarios.  I noticed your android app has twice the number of 
visitors as your iphone app.  Apparently the android app is hitting the 
site more often.
 

On Wednesday, June 13, 2012 7:06:06 AM UTC-7, Patman wrote:

> hi, 
> I have a problem understanding the unique visitors number of my mobile 
> application. 
> (i know what those two kpi's are about but i just don't get it for the 
> mobile apps) 
>
> On my webpage i have a difference from visitors to unique visitors 
> arround 10% which makes totally sense to me. 
>
> However on the mobile versions I have on the mobile versions something 
> about 75% 
> to be more exact: 
> On the android: 
> visitors: 18k; unique visitors: 2,5k. 
> iPhone: 
> visitors: 9k; unique visitors: 2,7k 
>
> I guess thats because ppl just are idle and don't close the app. But 
> is there also this 30mins delay? Or is this somehow treated 
> differently? 
> Isn't than the visitors count the more precise one to describe how 
> users are using my apps? 
>
> Thanks for explaining that. 
> Best 
> Patrick 
>

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

[android-developers] GridLayout cannot be found after installing android support package

2012-06-14 Thread alex b
I'm trying to use the Android Support package in my Android 2.3.3 eclipse 
app.  I've downloaded the package, created the \libs folder, copied 
'android-support-v7-gridlayout.jar' into that folder, and added it to the 
build path, however when I attempt to add a  tag to my layout I 
get the compiler error: GridLayout cannot be found.  I've cleaned the 
project,and restarted everything without any luck.
 
Any ideas anyone?

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

[android-developers] could not find class 'com.google.gson.GsonBuilder' after upgrading android sdk

2012-05-22 Thread alex b
I received a message yesterday indicating that I had to upgrade to
android sdk v 17+.  So I downloaded the latest version (v18) and
installed it.   After some pain, I'm now getting the error in the
subject line with com.google.gson.

Upgraded gson to v 2.2.1, but that didn't help.

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


[android-developers] Re: E/dalvikvm: Could not find class 'xxx', referenced from method yyy

2012-05-22 Thread alex b
It's looking like the latest android upgrade is causing this

I'm getting the error with com.google.gson, after I upgraded the
android sdk too.

I upgraded gson after i began getting this error but that didn't help.




On Apr 5, 1:48 pm, Jens Axelsson  wrote:
> I have the same issue. Even just following the 
> examplehttps://developers.google.com/mobile-ads-sdk/docs/android/fundamentals
> I get "04-05 22:31:17.203: E/dalvikvm(28635):Couldnotfindclass
> 'com.google.ads.AdView', referenced from method
> se.phidev.yxa.YxaActivity.onCreate", this was working fine until I
> upgraded to ADT-17.
>
> On 4 Apr, 17:56, Steve  wrote:
>
>
>
> > I met this issue too. I can'tfindthe way to work around or fix it
> > Anyone can help me?
>
> > On Friday, March 9, 2012 6:46:15 PM UTC+8, alex2k8 wrote:
>
> > > I have migrated to adt-17-preview (http://tools.android.com/download/
> > > adt-17-preview ),
> > > because I had issues (http://code.google.com/p/
> > > android/issues/detail?id=21031)
> > > with previous versions... Now I have
> > > such setup:
>
> > > ProjC -> ProjB -> ProjA
>
> > > Where
>
> > >   ProjA: Java Project
>
> > >   ProjB: Android Library
> > >     - Properties > Android > Library > [x] Is Library
> > >     - Properties > Java Build Path > Projects > ProjA
>
> > >   ProjC: Android Project
> > >     - Properties > Android > Library: ProjB
> > >     - Properties > Java Build Path > Projects > ProjA
>
> > > ProjA has:
>
> > >     publicclassA {
> > >         public void m1() {}
> > >     }
>
> > > ProjB has:
>
> > >     publicclassB {
> > >         public void m1() {
> > >             new A().m1();
> > >         }
> > >     }
>
> > > ProjC has:
>
> > >     public void onCreate(Bundle savedInstanceState) {
> > >         ...
> > >         B b = new B();
> > >         b.m1();
> > >     }
>
> > > The application crashes with such errors:
>
> > > 03-09 14:33:05.730: E/dalvikvm(6508):Couldnotfindclass
> > > 'com.test.A', referenced from method com.test.B.m1
> > > 03-09 14:33:05.730: W/dalvikvm(6508): VFY: unable to resolve new-
> > > instance 5 (Lcom/test/A;) in Lcom/test/B;
> > > 03-09 14:33:05.730: D/dalvikvm(6508): VFY: replacing opcode 0x22 at
> > > 0x
> > > 03-09 14:33:05.730: D/dalvikvm(6508): DexOpt: unable to opt direct
> > > call 0x0004 at 0x02 in Lcom/test/B;.m1
> > > 03-09 14:33:05.730: D/AndroidRuntime(6508): Shutting down VM
> > > 03-09 14:33:05.730: W/dalvikvm(6508): threadid=1: thread exiting with
> > > uncaught exception (group=0x40a3b1f8)
> > > 03-09 14:33:05.740: E/AndroidRuntime(6508): FATAL EXCEPTION: main
> > > 03-09 14:33:05.740: E/AndroidRuntime(6508):
> > > java.lang.NoClassDefFoundError: com.test.A
> > > 03-09 14:33:05.740: E/AndroidRuntime(6508):         at
> > > com.test.B.m1(B.java:
> > > 6)
> > > 03-09 14:33:05.740: E/AndroidRuntime(6508):         at
> > > com.test.MainActivity.onCreate(MainActivity.java:14)
>
> > > Q: What can I do to fix this error?- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] webview and javascript in android 2.3

2012-05-15 Thread alex b
Been going round and round with a webview and javascript in android
2.3.  I understand the javascriptinterface doesn't work in this
version of android, fine.  Are there also issues with javascript?  I
can get the webchromeclient to return alerts from the page
using .LoadUrl() pointed to a local resource, sometimes.  Seems to
work only once then it hangs.  Mostly it just fails without error.
Pretty basic stuff here.

There seems to be an awful lot of devices still running this android
version, so it's really the version we want to target but i'm at my
wits end with this stuff.

Any good ways to debug this stuff?

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


[android-developers] Re: Navigation Directions from 3rd side Application

2012-05-15 Thread alex b
Apparently the word on the net is that Navigation is no longer supported in 
the Android sdk (sounds like a plot by Google to maintain an unfair 
advantage).  You can use the Directions service in the Google Maps 
javascript api, though.
 
 

On Sunday, May 13, 2012 1:51:18 PM UTC-7, tal wrote:

> Hello, 
> I am trying to Pass directions (via Text ,but Long/Lat does not work 
> also) 
> to Google Navigation NOT "google maps" . 
> i want to pass the directions and that the Google Navigation will be 
> used as a normal GPS . 
> i tried it with WAZE already and it has a bug or somthing, i tried to 
> use the "google Navigation" but everyone refers me to somehow to use 
> "google Maps" but there i only get the distance etc. i want to use it 
> as the GPS. 
>
> need help please

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

[android-developers] Re: Is there a way to get character density from a HTML or CSS file?

2012-05-15 Thread alex b
The WebView control already does that.  I believe if you set the width of 
the control to fill_parent all of the html content should fit the screen.
 

On Monday, May 14, 2012 12:00:05 PM UTC-7, nmoe wrote:

> I'm trying to split a HTML file to fit a specific screen and would 
> like to somehow calculate how many characters fit. 
>
> Thanks.

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

[android-developers] Re: How to know the request is from Android 4.0 phone or Android 4.0 Tablet?

2012-05-11 Thread alex b
I believe you can check the screen size, i.e. if it's greater than 450x600 
or something than it's a tablet.  I'm not exactly sure where you find that 
but it must be passed by the browser because I've seen analytics from 
google that show the screen size of the device hitting the site.
 
 

On Wednesday, May 9, 2012 9:25:01 PM UTC-7, Kevin Chang wrote:

> I woudl like to develop a Web Application. It has different UI design for 
> Phone and Tablet because they have different screen size. I always Take 
> user agent of browser to know what device access my application. Then I can 
> know to give appropriate size of UI. 
>
> User Angent of Android 4.0 Table and Android 4.0 Phone are similiar. There 
> is no way to distinguish them like (iPhone and iPad did). 
>
> Can any one shed a light to know that the access is from Tablet or Phone 
> of Android 4.0?
>
> Thanks,
> -Kevin 
>

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

[android-developers] javascript in webview on android 2.3 fires only once

2012-05-11 Thread alex b
I've got the following test.htm in the assets directory:
 
 




 

function showAlert(t) { 

alert(t);

}


 
which I'm loading like so...
 
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebChromeClient(new WebChromeClient(){
@Override
 public boolean onJsAlert(WebView view, String url, String message, 
JsResult result){
 Toast.makeText(_ctx, message, Toast.LENGTH_SHORT).show();
   return true;
 }
});
webView.loadUrl("file:///android_asset/test.htm");
 
When I click the button the first time, the alert() displays.  If i click 
the button a second time nothing happens.  In fact the button stays 
selected (orange) and I cannot click on anything else, i.e. the page seems 
to hang.
 
I noticed an unresolved issue with the javascriptinterface for this android 
version.   Is this also just broken in android 2.3?
 

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

[android-developers] xml ok - same android code fails

2012-04-05 Thread alex b
This xml in my layout file displays a line...



This code in my activity fails (notice the similarity to the xml above)

ImageView lbl=new ImageView(this);
lbl.setLayoutParams(new LayoutParams(320,2));
lbl.setBackgroundResource(R.drawable.bg_line);
layout.addView(lbl);

All of my other code generated views display fine, just the line doesn't.  
What gives?

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

[android-developers] Re: Hide the virtual keyboard

2009-06-23 Thread Alex B

Thanks Lexxuz. The solution you provided works only in the sense that
it prevents the soft keyboard from revealing itself - but it is still
a hack. Here's why: I have a hint in each of my text fields (EditText
input fields). When I *press* into the fields (i.e. focus them), the
hints disappear - whereas normally, the fields only disappear if
something is *entered* (inputted). Also, when the field is emptied,
the hints normally re-appear -- however, with the above solution they
don't. Therefore, this solution is a kind of hack.

It blows my mind that Google introduced this soft keyboard without any
documentation about how to suppress it.

If anyone out there has figured this out in a way that does not lose
the usual functionality of the input fields, please reply.

Google Android Engineers please help in this regard.

Thank you.

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



[android-developers] Re: Hide the virtual keyboard

2009-06-02 Thread Alex B

I'm still trying to figure out how to suppress the soft keyboard from
showing because I have my own custom buttons for input. I have several
EditText input fields, and all of them get filled by the custom on-
screen buttons. I don't want the soft keyboard to show up at all.
Could someone please help?

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



[android-developers] Re: Hide the virtual keyboard

2009-06-01 Thread Alex B

I guess I could setfocus when the field is touched, but that feels
like I'm manually adding functionality back to the text field
(edittext) -- which leads me to ask: what other functionality is lost
by eatting the touch event? Frankly, I feel that this capture-the-
touch-event-and-eat-it approach to suppressing the soft keyboard is a
kind of hack. Is there a graceful way of suppressing the soft
keyboard?



On Jun 1, 7:38 am, Sujay Krishna Suresh 
wrote:
> arent u able to use setfocus to give ur keypad the focus???
>
>
>
> On Mon, Jun 1, 2009 at 8:03 PM, Alex B  wrote:
>
> > Anyone know how to suppress the soft keyboard?
>
> > On May 29, 8:59 am, Alex B  wrote:
> > > Actually, there's still a problem.
>
> > > I only want suppress the softkeyboardfrom showing up -- because I
> > > have a custom on-screen keypad. Consuming the touch event suppresses
> > > the softkeyboard, but it also holds the focus on the text field,
> > > making it impossible to touch another text field. I have two text
> > > fields, and I want to suppress thekeyboardon both, but of course
> > > both fields must still be touchable.
>
> > > Any idea how to suppress the softkeyboard, but not have the above
> > > mentioned negative side effect?
>
> > > On May 28, 11:19 pm, Alex B  wrote:
>
> > > > Indeed, Sujay, thank you!
>
> > > > This will disable (suppress) the softkeyboard:
>
> > > > editText_input_field.setOnTouchListener(otl);
>
> > > > private OnTouchListener otl = new OnTouchListener()
> > > > {
> > > >         public boolean onTouch (View v, MotionEvent event)
> > > >         {
> > > >                 return true; // the listener has consumed the event
> > > >         }
>
> > > > };
>
> --
> Regards,
> Sujay
> George Bernard 
> Shaw<http://www.brainyquote.com/quotes/authors/g/george_bernard_shaw.html>
> - "A government that robs Peter to pay Paul can always depend on the
> support of Paul."
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Hide the virtual keyboard

2009-06-01 Thread Alex B

Anyone know how to suppress the soft keyboard?


On May 29, 8:59 am, Alex B  wrote:
> Actually, there's still a problem.
>
> I only want suppress the softkeyboardfrom showing up -- because I
> have a custom on-screen keypad. Consuming the touch event suppresses
> the softkeyboard, but it also holds the focus on the text field,
> making it impossible to touch another text field. I have two text
> fields, and I want to suppress thekeyboardon both, but of course
> both fields must still be touchable.
>
> Any idea how to suppress the softkeyboard, but not have the above
> mentioned negative side effect?
>
> On May 28, 11:19 pm, Alex B  wrote:
>
> > Indeed, Sujay, thank you!
>
> > This will disable (suppress) the softkeyboard:
>
> > editText_input_field.setOnTouchListener(otl);
>
> > private OnTouchListener otl = new OnTouchListener()
> > {
> >         public boolean onTouch (View v, MotionEvent event)
> >         {
> >                 return true; // the listener has consumed the event
> >         }
>
> > };
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Hide the virtual keyboard

2009-05-29 Thread Alex B

Actually, there's still a problem.

I only want suppress the soft keyboard from showing up -- because I
have a custom on-screen keypad. Consuming the touch event suppresses
the soft keyboard, but it also holds the focus on the text field,
making it impossible to touch another text field. I have two text
fields, and I want to suppress the keyboard on both, but of course
both fields must still be touchable.

Any idea how to suppress the soft keyboard, but not have the above
mentioned negative side effect?



On May 28, 11:19 pm, Alex B  wrote:
> Indeed, Sujay, thank you!
>
> This will disable (suppress) the softkeyboard:
>
> editText_input_field.setOnTouchListener(otl);
>
> private OnTouchListener otl = new OnTouchListener()
> {
>         public boolean onTouch (View v, MotionEvent event)
>         {
>                 return true; // the listener has consumed the event
>         }
>
> };
>

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



[android-developers] Re: Hide the virtual keyboard

2009-05-28 Thread Alex B

Indeed, Sujay, thank you!

This will disable (suppress) the soft keyboard:

editText_input_field.setOnTouchListener(otl);

private OnTouchListener otl = new OnTouchListener()
{
public boolean onTouch (View v, MotionEvent event)
{
return true; // the listener has consumed the event
}
};


On May 28, 10:23 pm, Sujay Krishna Suresh 
wrote:
> Hi alex i think u could solve ur problem by using the onTouchListener
> rather
> since it returns a boolean stating whether u handled the event or not
> if u want to show the keyboard return false... else return true...
> i'm not very sure that this is wat u want... but u can give it a try
>

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



[android-developers] Re: Hide the virtual keyboard

2009-05-28 Thread Alex B

Hi Dianne,

How to "eat" it? I too want to prevent the soft keyboard from showing
when the EditText is touched.

private OnClickListener ocl = new OnClickListener()
{
public void onClick(View v)
{
// how to eat the event?
}
};


On May 13, 9:36 am, Dianne Hackborn  wrote:
> That means that your text field is no longer really an editor (though it may
> have some stuff lying around that make it kind-of work).  If you want a tap
> to not show the soft keyboard, just capture the click event on the text view
> and eat it.
>

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



[android-developers] Re: Regarding LBS - MASF client

2009-03-15 Thread Alex B

Hi, Kumar.

See:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=location/java/com/android/internal/location/LocationMasfClient.java

The comment there says: "Service to communicate to the Google Location
Server (GLS) via MASF server"

and according to a quick web search, MASF stands for "Mobile
Application Sensing Framework".



On Mar 12, 10:43 pm, Kumar  wrote:
> Hi , I tried searching on net but could not find any information on
> MASF client orLocationMasfclient.java, Network Location provider
> makes use of Masf service in networkLocationProvider.java, Would Some
> one who had worked on networklocationprovider.java  know about Masf
> client? and what is its role in Android platform ?,  and i am also
> wondering what would MASF actually mean. There is no documention
> available in android website nor in the code.
>
> Regards
> Sunil.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: remote service process persists (i.e. won't disappear from process table)

2009-02-24 Thread Alex B

Google employees... any ideas about this? Thanks.

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



[android-developers] remote service process persists (i.e. won't disappear from process table)

2009-02-21 Thread Alex B

Hello service developers!

At a certain point in my program, when I'm completely done with my
service, my activity executes unbindService() and stopService() -- yet
the process persists. I can tell that it persists because I run "ps"
in "adb -e shell":

USER PID   PPID  VSIZE RSS   WCHANPC NAME
app_19   2041  23108360 16128  afe0c534 S
com.example.helloactivity
app_19   2049  2395732 13336  afe0c534 S
com.example.helloactivity:remote

Thanks to "adb logcat", I can show you the sequence of events:

ACTIVITY: context.unbindService(serviceConnection);

SERVICE: onUnbind();

ACTIVITY: stopService(serviceIntent); & returns true!

SERVICE: onDestroy();

First, my activity calls unbindService(serviceConnection). According
to the documentation, unbindService() will "Disconnect from an
application service. You will no longer receive calls as the service
is restarted, and the service is now allowed to stop at any time." So
that is fine, and it is happening.

Appropriately, we see the onUnbind() call happen on the service side.
According to the documentation, onUnbind() is called when "all clients
have disconnected from a particular interface published by the
service." So this confirms the correct service connection is being
passed, and that the service is responding accordingly.

Next, my activity calls stopService(serviceIntent), and returns true.
According to the documentation, stopService() does the following: "If
there is a service matching the given Intent that is already running,
then it is stopped and true is returned; else false is returned."
Again, this is happening and returning true.

In response, the service's onDestroy() method is called. According to
the documentation, onDestroy() is "Called by the system to notify a
Service that it is no longer used and is being removed. The service
should clean up any resources it holds (threads, registered receivers,
etc) at this point. Upon return, there will be no more calls in to
this Service object and it is effectively dead."

At this point I expect the process to disappear from the process
table. Yet it remains indefinitely. But why?

Also, the process is so persistent that I can bind to it again, and I
see that it is the same exact process responding because the PID
(process ID) is the same!

Can anyone shed any light on this?

Also, can anyone out there use "ps" to see if their process is still
there when you think it should be gone?

Thanks a lot!

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



[android-developers] Re: docs/reference/keywords.html

2009-02-18 Thread Alex B

Initially I went to the issues tracker, but the New Issue Description
says "NOTE: This form is only for reporting bugs. For questions,
comments, or advice please visit:  
http://groups.google.com/group/android-developers";.
As this is not a bug, I posted here. I'm hoping that a Google employee
will notice this thread and pass my request for reincorporating
keywords.html to the documentation team. Also, it would be helpful for
the developer docs search box to be case insensitive. Thank you.

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



[android-developers] docs/reference/keywords.html

2009-02-15 Thread Alex B

It seems that keywords.html has been removed from the docs as of
1.1_r1.

Even if the developer docs search box was case insensitive (which it
isn't), it would not live up to keywords.html.

I found keywords.html incredibly useful and would like to request that
it gets reincorporated with the next update.

Thank you kindly.

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



[android-developers] Re: remove|delete res/raw files

2009-02-12 Thread Alex B

Marco, I'm really grateful for your reply because you've saved me from
spending any more time trying to figure this out. Is this mentioned in
the docs? If so, I missed it. If not, it should be mentioned as
explicitly as you did. This is a minor set back, but an acceptable one
given the reasoning. It looks like I have no choice but to download
the files -- so now my quest is to figure that out: downloading!
Thanks again!

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



[android-developers] remove|delete res/raw files

2009-02-12 Thread Alex B

Is it possible to remove files from res/raw once the program is
running? I'd like to include some mp3s in the app I'm making, but if
the user doesn't like them, I'd like to provide the option to delete
those files. Is there a way to delete files from res/raw once the app
is running?

How are you guys packaging files with your apps? In res/raw? Or a
different approach?

Thanks!

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



[android-developers] input configuration changed (when keyboard revealed or hidden)

2008-12-17 Thread Alex B

Hi!

I am having trouble finding the API call to obtain information about
whether the keyboard is revealed or not.

When I am in portrait mode (keyboard hidden), and I slide the screen
out (to reveal the keyboard), the following line is printed:

I/WindowManager(   51): Input configuration changed: { scale=1.0
imsi=0/0 locale=en_US touch=3 key=2/1 nav=3 orien=2 }

When I am in landscape mode (keyboard revealed), and I slide the
screen in (to hide the keyboard), the following line is printed:

I/WindowManager(   51): Input configuration changed: { scale=1.0
imsi=0/0 locale=en_US touch=3 key=2/2 nav=3 orien=1 }

Notice the "orien" values, 1 and 2. 1 seems to correspond to portrait
mode, while 2 seems to correspond to landscape mode.

My question is... how can I obtain the "orien" value?

The reason for this is that I want to show or hide particular UI
elements based on whether the keyboard is showing or not.

I understand that one way (perhaps the superior way) is to have
independent res/layout xml files; however I would still like to be
able to control certain elements based on the "orien" value. Is there
an input configuration change listener? How have you determined this
input configuration state?

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



[android-developers] Re: G1 activation problem

2008-12-17 Thread Alex B

Vladimir, you only need data access for the 5 minute activation
process. Beyond activation, the data plan is only necessary for
"always-on-networking"; however, if you do not care for always-on-
networking, you can definitely just use Wi-Fi networking
intermittently -- that is, whenever you obtain a Wi-Fi signal (an open
one, or one that you have a password for).

Indeed, as Michael answered, there is no way for your carrier to know
that you are using Wi-Fi. If money is tight, do not hesitate to cancel
your data plan. As long as you have a Wi-Fi router at home, you'll be
fine.

I sense a bit of underlying fear in your second question -- fear of
the carrier. I share your sentiment, and believe that most subscribers
do too. The reason is that the carriers have traditionally held the
power due to the lack of regional competition -- they mostly exist in
regional monopolies -- and any violation of their rules normally
results in monetary penalties. I believe that Google recognizes this,
and is addressing this issue in a meaningful way -- they have filed a
patent for "devices, systems and methods" that would automatically
poll nearby wireless services to find the best price for a voice or a
data connection: http://blog.wired.com/gadgets/2008/09/google-files-pa.html

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



[android-developers] Re: G1 activation problem

2008-12-16 Thread Alex B

Solution!

I was able to connect via the *new* Fido SIM cards using the following
APN settings:

Name: Fido
APN: internet.fido.ca
Username: fido
Password: fido
MCC: 302
MNC: 370

* The new SIM cards (3G) use code 370 (three-seven-zero). The old Fido
SIM cards (2G) use mobile network code 37 (three-seven).

The best way to avoid SIM card (and general activation) issues, is to
*first* add the SIM card to the phone, and *then* add the new APN. The
reason for this
order is that the MCC (mobile country code), and more importantly, the
MNC (mobile network code), are added automatically based on the SIM
card. The
old Fido SIM cards (whose serial numbers begin with 893023701) will
automatically acquire MNC 37, while the new SIM cards (whose serial
numbers begin with 893023702) will automatically acquire MNC 370.

The quickest way to tell old from new is to look at the 701 versus the
702 on the flip side of the SIM card. "1" is old, "2" is new.

Why might you do things in a different order to the above? Because if
you had any issues activating, there's a good chance that you'll (1)
try different APN settings found online, and (2) try different SIM
cards. In doing these kinds of trials, there's a good chance that you
will mismatch the MNC codes (due to different SIM cards). For
instance, you might innocently try two different Fido cards, not
knowing that they have differing MNC codes. *Therefore*, no matter
what APN settings you find online, it is important that when you
insert each new SIM card, you determine its corresponding MNC code --
do this by accessing the menu item "add a new APN" and scrolling down
to see what MNC code the SIM card automatically acquires.

Knowing the SIM card's associated MNC code, you can then play around
modifying/testing different APN settings (presumably the ones you
already have
saved in your APNs list) -- primarily APN, username, and password, and
secondarily, proxy or server, and port.

For activation, you will not have to set anything for the other
available fields: MMSC, MMS proxy, MMS port, and APN type. MMS* is for
Multimedia Messaging Service (for sending messages that include
multimedia stuff like photos).

Also, if you don't have a data plan, do NOT try activating via a pay-
as-you-go plan. Fido charges pay-as-you-go customers 5 cents per
kilobyte! Clearly someone at Fido arbitrarily chose this figure, and
didn't consider its implications, because that works out to $50/MB. If
you don't want to get a data plan, I advise you to go to a Fido store
and ask them to borrow their in-store data-provisioned SIM card to
activate your phone -- it should only take like 5 minutes.

Anyway, hope this helps others in Canada and beyond.

p.s. For Rogers SIM cards, see the following site:

http://oliverfisher.blogspot.com/2008/10/android-g1-phone-in-canada-on-rogers.html

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



[android-developers] G1 activation problem

2008-11-24 Thread Alex B

Has anyone been able to surf the web from their G1 *strictly* via Wi-
Fi?

... how about, the wifi network created by their Mac laptop's Airport
Internet Sharing?

Has anyone in Canada been able to successfully connect via Fido (or
any other carrier)?

I am a developer in Canada -- and we don't have T-Mobile here -- so I
purchased an unlocked G1 on eBay (CAN$820 or US$665 for the device,
unlocking, shipping, and taxes). The phone arrived and worked as
expected according to a few minutes of superficial use without
networking being involved. The phone was unlocked by the eBay seller,
and the notification bar had a message saying that there was a problem
syncing (to the eBay seller's gmail account). Naturally there was a
problem syncing, because no networking was turned on. I decided to try
to figure out how to input my own Google account username and
password, and get the G1 synced accordingly. However, there was no
apparent way to do this. My next thought was to at least try to
establishing network connectivity, after all, the G1 is has wifi
support (i.e. I should not need a carrier's data plan -- just a wifi
connection).

My plan was to connect to my own wifi network (using Mac OS X's
Airport "Internet Sharing"). This is where the problems started. First
of all, the name of my network (in the list of wifi networks) was
appearing and disappearing, yet I was right in front of the laptop
serving wifi. Moving away, to other parts of the apartment, did not
alter this flaky behaviour. Just from that experience, I was starting
to feel uneasy, as I've never had a problem with other devices sharing
my wifi signal. The connection would get established periodically,
with a private IP address obtained! I then clicked "home", opened the
"browser", and couldn't load the google home page. Two hours of
efforts were futile -- the G1 simply would not load google.com (or any
website for that matter). Note that my other laptop had no problem
connecting to the same wifi network.

At last I was frustrated enough that I thought that perhaps there was
some setting that I was not aware of that was causing this issue. So I
found the "reset" option somewhere in the G1's "settings". A dialog
warned that all the data would be erased, but I didn't mind because I
hadn't loaded any data. Following a power cycle, the device showed an
animation of a box and a G1 being removed from within (presumably to
indicate that this is an "out of the box" state). I only ever got to
see this out-of-the-box animation that one time. From that point on, I
have been stuck in the following "activation" loop:

(1) A screen with the Android logo, "Welcome to T-Mobile G1" and
"Touch the android to begin." Touching the android shows a screen
titled "Setting up your T-Mobile G1", and then the on-screen buttons
are "Emergency dial" and "Next". The physical "menu" button brings up
one item: "APN settings".

(2) Touching "Next" brings up a screen with two buttons -- one to
"Create" a Google account, and one to "Sign in". Again, the physical
"menu" button brings up only the APN settings item. As I have a Google
account, I touch "Next", which brings me to a sign-in screen.

(3) The sign-in screen has two text fields: username and password. The
on-screen buttons are "Back" and "Sign in". The physical "menu"
buttons still only has APN settings.

(4) When I attempt to sign in, the screen says "Signing in...", "Your
phone is communicating with Google servers and setting up your
account. This may take up to five minutes." There is a kind-of
progress bar and the process times out within a minute.

(5) The screen following the time out says "There is a problem
communicating with the Google servers.", "This could be a temporary
problem or your SIM card may not be provisioned for data services. If
it continues, call Customer Care." There is a "Try again" button, and
the usual "APN settings" menu.

(6) The "APN settings" menu has a list of APNs, and a submenu "New
APN".

That's it. That's my loop. I cannot get to the "HOME" screen. I've
talked to the following support lines:

- Fido technical support
- Rogers support
- T-Mobile's technical support
- HTC
- Google (yes, I've even called Google, and I was told that they don't
support the G1, and that T-Mobile wanted to handle the support)

I've even gone to Fido and Rogers stores, and used their in-store data-
provisioned SIM cards to no avail.

I have also eased the APN process by deleting all the T-Mobile APNs,
and just working on one Fido APN setting at a time. Why you ask?
Because not even Fido has a definitive answer for what their settings
are. Try surfing the web for this info, and you will see a variety of
settings. The only way for me to be somewhat sure that I have the
right settings is to have deleted all the APNs, and then adjusted one
variable at a time -- my indicator of success is the GPRS/EDGE
"service connected, data flowing" icons. When I have a good setting,
those icons show up, and once in a while light up th

[android-developers] Re: get position of cursor in EditText

2008-11-22 Thread Alex B

Thank you so much! That is indeed the way to do it!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] get position of cursor in EditText

2008-11-18 Thread Alex B

Hi!

How does one determine the cursor position in an
android.widget.EditText text view?

Example:

User types: "quick browm fox".

User realizes the typo (browm).

User touches the text view just after the "m", thereby positioning the
cursor there.

Now the view looks like this: "quick browm| fox" -- where | is the
cursor.

The user should be able to press a virtual "backspace" button (on the
screen), and expect to erase the "m" and then type "n".

Problem:

I would like to obtain the cursor position with something like
getCursorPosition(), but cannot find anything resembling such a
method. Knowing the position, I would be able to convert the EditText
into android.text.Editable and erase the character.

Perhaps there is a different way to do this. Any information in this
regard will be greatly appreciated.

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



[android-developers] get position of cursor in EditText

2008-11-17 Thread Alex B

Hi!

How does one determine the position of the cursor in
android.widget.EditText?

I am dealing with a situation where the user should be able to touch
the text view, positioning the cursor where their finger touched, and
then be able to press a virtual "backspace" button (on the screen),
expecting to erase the character before the cursor.

It is my understanding that I need the cursor position in the
substring to the task of deleting the preceding character. It seems as
though getCursorPosition() is missing.

Any information in this regard will be greatly appreciated.

Thank you.

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



[android-developers] Re: Issue with Calendar APIs

2008-10-24 Thread Alex B

In your Android SDK directory, look inside: tools/lib/res/default/xml/
time_zones_by_country.xml

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



[android-developers] Re: Determining size of SD Card?

2008-10-22 Thread Alex B

This is indeed a significant issue. We should be able to check for
space availability -- this is one important source of error
information that we could be passing on to the user.

Supposedly the media is mounted:
android.os.Environment.MEDIA_MOUNTED.equals("mounted")

Supposedly I can write to the direcotry:
sampleDir.canWrite()

So I try to create a file:
mSampleFile = File.createTempFile(SAMPLE_PREFIX, SAMPLE_EXTENSION,
sampleDir);

But get this uninsightful IO error:
java.io.IOException: Cannot create: /sdcard/x28335.amr

So, one extra check could be for space -- but currently this seems to
be an API limitation.

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



[android-developers] Re: MapActivity onTouchEvent

2008-04-02 Thread Alex B

Sorry, I meant dispatchTouchEvent. I'm correcting it in case anyone
searches for that keyword.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MapActivity onTouchEvent

2008-04-02 Thread Alex B

Indeed, you are right.  Using dispathTouchEvent worked.  Thank you
kindly!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] MapActivity onTouchEvent

2008-04-02 Thread Alex B

Hi,

Has anyone managed to override onTouchEvent within MapActivity?  I
know that overriding onTouchEvent in MapView is possible, and I have
done that, but I need to do it in MapActivity.  I see it in the API in
the section "Methods inherited from class android.app.Activity".  I
have written the code, and it complies, but the event is not
honoured.  Please let advise me if you have succeeded in this.

Thank you.

@Override
public boolean onTouchEvent(MotionEvent me)
{
// do stuff
return true;
}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---