[android-developers] android developer wants to chat

2012-03-20 Thread android developer
---

android developer wants to stay in better touch using some of Google's
coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-5dd04db2b3-947e5a6ec4-58Pk-rVJyUPbXJ3v-wyzurb-FlU
You'll need to click this link to be able to chat with android developer.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with android developer, visit:
http://mail.google.com/mail/a-5dd04db2b3-947e5a6ec4-58Pk-rVJyUPbXJ3v-wyzurb-FlU

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

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

2012-03-20 Thread Abhilash baddam
Hi Friends,

 For my Application I am using target version as API Level 8 and I
mentioned minSdkVersion in manifest as 7.

1)  If the user is having SDCard automatically I want to install my
app in SDCard other wise in internal memory. For that I mentioned
android:installLocation="preferExternal" in the manifest file, but if
the user is not having SDcard whether the app will automatically
install in internal memory or not.

2) Whether this app will also run in the mobiles which contains 2.1 Android OS.

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


Re: [android-developers] Android, SQLite, massive (5000%+) loss of performance on a certain query, on a certain device

2012-03-20 Thread Zsolt Vasvari
I have 2 users (out of thousands) reporting this problem.  I am at a loss 
as to why this is happening, also.  It doesn't have anything to the data as 
the user claims they few rows.  I even had them recreate their database (I 
have a backup facility that that backs up/restores from JSON) and the 
problem still occurs.

One guy took the phone back because he suspected a hardware issue.  The 
other person never followed up, so I don't know if he solved it or what.



On Wednesday, March 21, 2012 6:54:30 AM UTC+8, Dianne Hackborn wrote:
>
> You can get the SQLite version to perform acceptably.  You just need to 
> use it correctly -- set up indices as appropriate as needed for joins and 
> such.  I am not a SQL (lite or otherwise) expect in any way so I can't help 
> you with the particulars, but at the very least make sure you are actually 
> setting indices on the columns that are involved in deciding what rows are 
> included in the query result.
>
> Also all you are doing by putting your query in the main thread of your 
> process is causing your process to ANR when it takes a long time.  The 
> query all happens in native code down in SQLite, so you won't see anything 
> in your java traces (nor typically anything interesting in native traces 
> either since most likely, yes, you are executing the query in SQLite).
>
> On Tue, Mar 20, 2012 at 3:22 PM, momo  wrote:
>
>> I'm rewriting a simple translation app with a SQLite db.  There is an 
>> extreme hit to performance between two queries, but only on certain devices.
>>
>> One query lists the english words in a ListView, the other lists the 
>> secondary language in a list view.  The data is structured differently, and 
>> is from a remote server.
>>
>> Both are single SQL statements, run via db.rawQuery.  Both use AsyncTask 
>> to keep heavy lifting in another thread.
>>
>> On both devices, the "english" query returns almost instantly (less than 
>> 1 second, every time): 
>>
>> return db.rawQuery("select _id as id, english as label from english_words 
>> order by english collate nocase", null);
>>
>> On one device, the "secondary_langauge" query returns almost instantly as 
>> well.  No problem there, ever.  This is a Samsung Galaxy SII.  On another 
>> device (Samsung Nexus S), this query takes around 30 seconds.  This query 
>> has some joins, as follows:
>>
>> return db.rawQuery("select definitions._id as id, secondary_language as 
>> label from english_words join definition_bridge on 
>> english_words._id=definition_bridge.word_id join definitions on 
>> definitions._id=definition_bridge.definition_id order by 
>> secondary_language", null);
>>
>> I ran it in the emulator once, and got the same result as the Nexus S 
>> (the 30 second hang).  It took a little 1.5 hours to download and parse the 
>> returns from the server on the emulator (which takes a few seconds on 
>> either device), so I gave up on further debug with the emulator at that 
>> point.
>>
>> This is the only difference between the two operations.  The listView is 
>> the same, the adapter is the same, the AsyncTask is the same.  The number 
>> of rows returned is different - there are about 2000 english words, and a 
>> little over 3000 words in the other language.  I don't think this explains 
>> the vast difference in performance.
>>
>> I took the query out of the AsyncTask to see if I could get some more 
>> debug info, and did get an ANR:
>>
>>   at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
>>   at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:73)
>>   at 
>> android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:287)
>>   at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
>>   at 
>> com.whatever.adapters.WordListAdapter.getCount(WordListAdapter.java:39)
>>
>> I rewrote the adapter's getCount method to return a cached count 
>> (determined during instantiation).  After, I didn't get an ANR again, but 
>> otherwise the performance was not improved and the query still took around 
>> 30 seconds.
>>
>> I'm totally at a loss.  As mentioned, everything but the queries is 
>> identical.  And on the Galaxy SII, there is no problem at all - less than a 
>> second to populate the ListView, even under abuse (touching the button that 
>> launches the request as fast as I could).
>>
>> At this point, I'm wondering if it'd be better to abandon SQLite 
>> entirely, and using a Java model to manage data.  Assuming I can't get the 
>> SQLite version to perform reasonably, what could I expect in terms of 
>> performance using Collections (with the number of entries mentioned above), 
>> when I need to do a search for example (which I imaging would require 
>> iterating over the whole thing on each key event).
>>
>> Any advice?
>>
>> TYIA.
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@go

[android-developers] Re: RelativeLayout layout_alignParentRight changes parent

2012-03-20 Thread Zsolt Vasvari
I have never noticed this and I have many-many Relative layouts.

On Wednesday, March 21, 2012 10:21:59 AM UTC+8, rdietrick wrote:
>
> I have a RelativeLayout that encapsulates several other views.  I have the 
> layout_width of the parent (RelativeLayout) set to "wrap_content."  If I 
> set the layout_alignParentRight attribute of one of the child views to 
> "true," it expands the parent layout horizontally to fill the screen.  Is 
> there a way around this?  I believe setting layout_alignParentBottom="true" 
> does the same thing vertically, while left and top don't.
>
> Thanks.
>
> -rob
>

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

2012-03-20 Thread Nicolas Embleton
Push notifications are availalbe since 2.3 or 2.2 ?  ( please remind me )

It is called C2DM, Cloud To Device Messaging.

And you can find the doc here: http://code.google.com/android/c2dm/

Nicolas.

On Wednesday, March 21, 2012 11:50:27 AM UTC+7, Hemant Chaudhari wrote:
>
> Hello All, 
>
> I want to implement Push Notifications for Android 4.0 Native app. 
> Is there any sdk available for it. 
>
>
> -Thanks 
> Hemant

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

[android-developers] Re: Android Project development cost

2012-03-20 Thread Zsolt Vasvari
I'll do it for US$100 a hour... 

On Wednesday, March 21, 2012 2:13:38 PM UTC+8, Lakshmi Vadupu wrote:
>
>
> Hi ,
>
> A senior android developer ,how much he will  cost for hourly or task or 
> project basis for Android Project development?
>
> Please let me know.
>
> Thanks in Advance.
>
>
>
> --
>
> Lakshmi 
>  
>
>

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

[android-developers] Android Project development cost

2012-03-20 Thread nvlakshmi vakiti
Hi ,

A senior android developer ,how much he will  cost for hourly or task or
project basis for Android Project development?

Please let me know.

Thanks in Advance.



--

Lakshmi

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

2012-03-20 Thread he.cao
I tried API level 13, and it does not work.
The problems occurs only when the GrantCredentialsPermissionActivity
launched, and with a custom account manager.
In order to reproduce the problem, the app and account manager
implement must signed with different certifications.
I found a similar post here : 
http://code.google.com/p/android/issues/detail?id=23421
where you can find an example.

On Mar 21, 1:21 pm, Spiral123  wrote:
> Works fine for me on 4.0.3.  I'm using APi Level 13 (not because of
> problems with oAuth).
>
> On Mar 20, 11:12 pm, "he.cao"  wrote:
>
>
>
>
>
>
>
> > hi all
>
> >     My app use account manager to share auth token and it works fine in
> > early 4.0.
> >     But when i try the app in my Nexus S (4.0.3) , NPE occurs every time i
> > call the getAuthToken method.
>
> >     Stack trace as follows:
>
> > E/AndroidRuntime( 5282): java.lang.RuntimeException: Unable to start
> > activity ComponentInfo{android/android.accounts.Gra
> > ntCredentialsPermissionActivity}: java.lang.NullPointerException
> > E/AndroidRuntime( 5282):        at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
> > E/AndroidRuntime( 5282):        at
> > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
> > E/AndroidRuntime( 5282):        at
> > android.app.ActivityThread.access$600(ActivityThread.java:123)
> > E/AndroidRuntime( 5282):        at
> > android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
> > E/AndroidRuntime( 5282):        at
> > android.os.Handler.dispatchMessage(Handler.java:99)
> > E/AndroidRuntime( 5282):        at android.os.Looper.loop(Looper.java:137)
> > E/AndroidRuntime( 5282):        at
> > android.app.ActivityThread.main(ActivityThread.java:4424)
> > E/AndroidRuntime( 5282):        at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > E/AndroidRuntime( 5282):        at
> > java.lang.reflect.Method.invoke(Method.java:511)
> > E/AndroidRuntime( 5282):        at
> > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 
> > 784)
> > E/AndroidRuntime( 5282):        at
> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
> > E/AndroidRuntime( 5282):        at dalvik.system.NativeStart.main(Native
> > Method)
> > E/AndroidRuntime( 5282): Caused by: java.lang.NullPointerException
> > E/AndroidRuntime( 5282):        at
> > android.accounts.GrantCredentialsPermissionActivity.onCreate(GrantCredentia 
> > lsPermissi
> > onActivity.java:84)
> > E/AndroidRuntime( 5282):        at
> > android.app.Activity.performCreate(Activity.java:4465)
> > E/AndroidRuntime( 5282):        at
> > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
> > E/AndroidRuntime( 5282):        at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
> > E/AndroidRuntime( 5282):        ... 11 more
> > W/ActivityManager(  151):   Force finishing activity
> > android/.accounts.GrantCredentialsPermissionActivity
>
> >      But, when i get google's AuthToken, it works fine.
> >      My question is :
> >           Are there something wrong in my code and how can i fix it?
> >           Or it is a bug in android and it will be fixed later?
>
> > thx

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

2012-03-20 Thread Spiral123
Works fine for me on 4.0.3.  I'm using APi Level 13 (not because of
problems with oAuth).

On Mar 20, 11:12 pm, "he.cao"  wrote:
> hi all
>
>     My app use account manager to share auth token and it works fine in
> early 4.0.
>     But when i try the app in my Nexus S (4.0.3) , NPE occurs every time i
> call the getAuthToken method.
>
>     Stack trace as follows:
>
> E/AndroidRuntime( 5282): java.lang.RuntimeException: Unable to start
> activity ComponentInfo{android/android.accounts.Gra
> ntCredentialsPermissionActivity}: java.lang.NullPointerException
> E/AndroidRuntime( 5282):        at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
> E/AndroidRuntime( 5282):        at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
> E/AndroidRuntime( 5282):        at
> android.app.ActivityThread.access$600(ActivityThread.java:123)
> E/AndroidRuntime( 5282):        at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
> E/AndroidRuntime( 5282):        at
> android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime( 5282):        at android.os.Looper.loop(Looper.java:137)
> E/AndroidRuntime( 5282):        at
> android.app.ActivityThread.main(ActivityThread.java:4424)
> E/AndroidRuntime( 5282):        at
> java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime( 5282):        at
> java.lang.reflect.Method.invoke(Method.java:511)
> E/AndroidRuntime( 5282):        at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 
> 784)
> E/AndroidRuntime( 5282):        at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
> E/AndroidRuntime( 5282):        at dalvik.system.NativeStart.main(Native
> Method)
> E/AndroidRuntime( 5282): Caused by: java.lang.NullPointerException
> E/AndroidRuntime( 5282):        at
> android.accounts.GrantCredentialsPermissionActivity.onCreate(GrantCredentia 
> lsPermissi
> onActivity.java:84)
> E/AndroidRuntime( 5282):        at
> android.app.Activity.performCreate(Activity.java:4465)
> E/AndroidRuntime( 5282):        at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
> E/AndroidRuntime( 5282):        at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
> E/AndroidRuntime( 5282):        ... 11 more
> W/ActivityManager(  151):   Force finishing activity
> android/.accounts.GrantCredentialsPermissionActivity
>
>      But, when i get google's AuthToken, it works fine.
>      My question is :
>           Are there something wrong in my code and how can i fix it?
>           Or it is a bug in android and it will be fixed later?
>
> thx

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 change shortcut icons dynamically on home screen in Android ?

2012-03-20 Thread Abhishek Kumar Gupta


Hi TreKing,

Thanks for the reply. I am able to change the shortcut icon of application 
only when I am moving the application from launcher screen to home screen( 
i.e. when I am creating the shortcut icon of application). But, my 
requirement is to change the icon of existing shortcut of application on 
home screen. If you give any suggestion that would be very helpful to me.

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

[android-developers] Dynamic Layouts

2012-03-20 Thread Hemant Chaudhari
Hello All,

I want to download layouts from server to my android phone and then
plugin that layout to my activity dynamically.

In simple word i want to update the layouts colors,fonts, images for
different season fetching them from my server.

I dont want package them all in to my native app.

-Thanks
hemant

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

2012-03-20 Thread Hemant Chaudhari
Hello All,

I want to implement Push Notifications for Android 4.0 Native app.
Is there any sdk available for it.


-Thanks
Hemant

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Go To ( http://adf.ly/20PrE )-)-) [android-developers] Re: documentBuilder.parse fails under android 4.0.3

2012-03-20 Thread kasimkk87

>
> what is the error?... display that... 

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

[android-developers] android crash while installing .apk

2012-03-20 Thread kiran nayak
hi all

i have booted android on my beagleboard.. but when i try to install a
simple helloworld.apk android crashes.

logcat says
W/Vold(  992): Ignoring unknown switch 'usb_connected'
W/Vold(  992): Ignoring unknown switch 'usb_connected'
D/Vold(  992): USB connected
D/Vold(  992): Share method ums now available
W/Vold(  992): Ignoring unknown switch 'usb_connected'
I/StorageNotification( 1113): UMS connection changed to true (media
state unmountable)
D/AndroidRuntime( 1318):
D/AndroidRuntime( 1318): >> AndroidRuntime START
com.android.internal.os.RuntimeInit <<
D/AndroidRuntime( 1318): CheckJNI is ON
D/dalvikvm( 1318): creating instr width table
D/AndroidRuntime( 1318): Calling main entry com.android.commands.pm.Pm
I/ActivityManager( 1041): Start proc com.android.defcontainer for
service com.android.defcontainer/.DefaultContainerService: pid=1326
uid=10011 gids={1015, 2001}
D/dalvikvm( 1326): GC_EXPLICIT freed 321K, 51% free 2715K/5511K,
external 716K/1038K, paused 27ms
W/ActivityManager( 1041): No content provider found for:
E/PackageManager( 1041): Couldn't create temp file for downloaded
package file.
W/dalvikvm( 1041): threadid=12: thread exiting with uncaught exception
(group=0x40129560)
E/AndroidRuntime( 1041): *** FATAL EXCEPTION IN SYSTEM PROCESS:
PackageManager
E/AndroidRuntime( 1041): java.lang.NullPointerException
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$FileInstallArgs.createCopyFile(PackageManagerService.java:4983)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$FileInstallArgs.copyApk(PackageManagerService.java:4991)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$InstallParams.handleStartCopy(PackageManagerService.java:4787)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$HandlerParams.startCopy(PackageManagerService.java:4638)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$PackageHandler.doHandleMessage(PackageManagerService.java:490)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$PackageHandler.handleMessage(PackageManagerService.java:435)
E/AndroidRuntime( 1041):at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1041):at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1041):at
android.os.HandlerThread.run(HandlerThread.java:60)
I/Process ( 1041): Sending signal. PID: 1041 SIG: 9
I/Zygote  (  995): Exit zygote because system server (1041) has
terminated
E/installd(  998): eof
E/installd(  998): failed to read size
I/installd(  998): closing connection
I/ServiceManager(  991): service 'isms' died
I/ServiceManager(  991): service 'simphonebook' died
I/ServiceManager(  991): service 'iphonesubinfo' died
I/ServiceManager(  991): service 'phone' died
I/ServiceManager(  991): service 'media.audio_flinger' died
I/ServiceManager(  991): service 'media.player' died
I/ServiceManager(  991): service 'media.camera' died
I/ServiceManager(  991): service 'media.audio_policy' died
I/ServiceManager(  991): service 'SurfaceFlinger' died
I/ServiceManager(  991): service 'audio' died
I/ServiceManager(  991): service 'uimode' died
I/ServiceManager(  991): service 'batteryinfo' died
I/ServiceManager(  991): service 'telephony.registry' died
I/ServiceManager(  991): service 'sensorservice' died
I/ServiceManager(  991): service 'entropy' died
I/ServiceManager(  991): service 'power' died
I/ServiceManager(  991): service 'usagestats' died
I/ServiceManager(  991): service 'content' died
I/ServiceManager(  991): service 'package' died
I/ServiceManager(  991): service 'diskstats' died
I/ServiceManager(  991): service 'backup' died
I/ServiceManager(  991): service 'appwidget' died
I/ServiceManager(  991): service 'account' died
I/ServiceManager(  991): service 'activity' died
I/ServiceManager(  991): service 'meminfo' died
I/ServiceManager(  991): service 'cpuinfo' died
I/ServiceManager(  991): service 'permission' died
I/ServiceManager(  991): service 'usb' died
I/ServiceManager(  991): service 'battery' died
I/ServiceManager(  991): service 'hardware' died
I/ServiceManager(  991): service 'vibrator' died
I/ServiceManager(  991): service 'alarm' died
I/ServiceManager(  991): service 'window' died
I/ServiceManager(  991): service 'device_policy' died
I/ServiceManager(  991): service 'input_method' died
I/ServiceManager(  991): service 'statusbar' died
I/ServiceManager(  991): service 'clipboard' died
I/ServiceManager(  991): service 'bluetooth' died
I/ServiceManager(  991): service 'bluetooth_a2dp' died
I/ServiceManager(  991): service 'bluetooth_Hid' died
I/ServiceManager(  991): service 'netstat' died
I/ServiceManager(  991): service 'network_management' died
I/ServiceManager(  991): service 'wifi' died
I/ServiceManager(  991): service 'connectivity' died
I/ServiceManager(  991): service 'throttle' died


some time i get error like

Failed to install 

[android-developers] android crash while installing .apk

2012-03-20 Thread kiran nayak
hi all

i have booted android on my beagleboard.. but when i try to install a
simple helloworld.apk android crashes.

logcat says
W/Vold(  992): Ignoring unknown switch 'usb_connected'
W/Vold(  992): Ignoring unknown switch 'usb_connected'
D/Vold(  992): USB connected
D/Vold(  992): Share method ums now available
W/Vold(  992): Ignoring unknown switch 'usb_connected'
I/StorageNotification( 1113): UMS connection changed to true (media
state unmountable)
D/AndroidRuntime( 1318):
D/AndroidRuntime( 1318): >> AndroidRuntime START
com.android.internal.os.RuntimeInit <<
D/AndroidRuntime( 1318): CheckJNI is ON
D/dalvikvm( 1318): creating instr width table
D/AndroidRuntime( 1318): Calling main entry com.android.commands.pm.Pm
I/ActivityManager( 1041): Start proc com.android.defcontainer for
service com.android.defcontainer/.DefaultContainerService: pid=1326
uid=10011 gids={1015, 2001}
D/dalvikvm( 1326): GC_EXPLICIT freed 321K, 51% free 2715K/5511K,
external 716K/1038K, paused 27ms
W/ActivityManager( 1041): No content provider found for:
E/PackageManager( 1041): Couldn't create temp file for downloaded
package file.
W/dalvikvm( 1041): threadid=12: thread exiting with uncaught exception
(group=0x40129560)
E/AndroidRuntime( 1041): *** FATAL EXCEPTION IN SYSTEM PROCESS:
PackageManager
E/AndroidRuntime( 1041): java.lang.NullPointerException
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$FileInstallArgs.createCopyFile(PackageManagerService.java:4983)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$FileInstallArgs.copyApk(PackageManagerService.java:4991)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$InstallParams.handleStartCopy(PackageManagerService.java:4787)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$HandlerParams.startCopy(PackageManagerService.java:4638)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$PackageHandler.doHandleMessage(PackageManagerService.java:490)
E/AndroidRuntime( 1041):at com.android.server.PackageManagerService
$PackageHandler.handleMessage(PackageManagerService.java:435)
E/AndroidRuntime( 1041):at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1041):at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1041):at
android.os.HandlerThread.run(HandlerThread.java:60)
I/Process ( 1041): Sending signal. PID: 1041 SIG: 9
I/Zygote  (  995): Exit zygote because system server (1041) has
terminated
E/installd(  998): eof
E/installd(  998): failed to read size
I/installd(  998): closing connection
I/ServiceManager(  991): service 'isms' died
I/ServiceManager(  991): service 'simphonebook' died
I/ServiceManager(  991): service 'iphonesubinfo' died
I/ServiceManager(  991): service 'phone' died
I/ServiceManager(  991): service 'media.audio_flinger' died
I/ServiceManager(  991): service 'media.player' died
I/ServiceManager(  991): service 'media.camera' died
I/ServiceManager(  991): service 'media.audio_policy' died
I/ServiceManager(  991): service 'SurfaceFlinger' died
I/ServiceManager(  991): service 'audio' died
I/ServiceManager(  991): service 'uimode' died
I/ServiceManager(  991): service 'batteryinfo' died
I/ServiceManager(  991): service 'telephony.registry' died
I/ServiceManager(  991): service 'sensorservice' died
I/ServiceManager(  991): service 'entropy' died
I/ServiceManager(  991): service 'power' died
I/ServiceManager(  991): service 'usagestats' died
I/ServiceManager(  991): service 'content' died
I/ServiceManager(  991): service 'package' died
I/ServiceManager(  991): service 'diskstats' died
I/ServiceManager(  991): service 'backup' died
I/ServiceManager(  991): service 'appwidget' died
I/ServiceManager(  991): service 'account' died
I/ServiceManager(  991): service 'activity' died
I/ServiceManager(  991): service 'meminfo' died
I/ServiceManager(  991): service 'cpuinfo' died
I/ServiceManager(  991): service 'permission' died
I/ServiceManager(  991): service 'usb' died
I/ServiceManager(  991): service 'battery' died
I/ServiceManager(  991): service 'hardware' died
I/ServiceManager(  991): service 'vibrator' died
I/ServiceManager(  991): service 'alarm' died
I/ServiceManager(  991): service 'window' died
I/ServiceManager(  991): service 'device_policy' died
I/ServiceManager(  991): service 'input_method' died
I/ServiceManager(  991): service 'statusbar' died
I/ServiceManager(  991): service 'clipboard' died
I/ServiceManager(  991): service 'bluetooth' died
I/ServiceManager(  991): service 'bluetooth_a2dp' died
I/ServiceManager(  991): service 'bluetooth_Hid' died
I/ServiceManager(  991): service 'netstat' died
I/ServiceManager(  991): service 'network_management' died
I/ServiceManager(  991): service 'wifi' died
I/ServiceManager(  991): service 'connectivity' died
I/ServiceManager(  991): service 'throttle' died


some time i get error like

Failed to install 

[android-developers] getAuthToken not working is ICS

2012-03-20 Thread he.cao
hi all

My app use account manager to share auth token and it works fine in 
early 4.0.
But when i try the app in my Nexus S (4.0.3) , NPE occurs every time i 
call the getAuthToken method.

Stack trace as follows:

E/AndroidRuntime( 5282): java.lang.RuntimeException: Unable to start 
activity ComponentInfo{android/android.accounts.Gra
ntCredentialsPermissionActivity}: java.lang.NullPointerException
E/AndroidRuntime( 5282):at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
E/AndroidRuntime( 5282):at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
E/AndroidRuntime( 5282):at 
android.app.ActivityThread.access$600(ActivityThread.java:123)
E/AndroidRuntime( 5282):at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
E/AndroidRuntime( 5282):at 
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5282):at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 5282):at 
android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime( 5282):at 
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 5282):at 
java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 5282):at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 5282):at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 5282):at dalvik.system.NativeStart.main(Native 
Method)
E/AndroidRuntime( 5282): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 5282):at 
android.accounts.GrantCredentialsPermissionActivity.onCreate(GrantCredentialsPermissi
onActivity.java:84)
E/AndroidRuntime( 5282):at 
android.app.Activity.performCreate(Activity.java:4465)
E/AndroidRuntime( 5282):at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
E/AndroidRuntime( 5282):at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
E/AndroidRuntime( 5282):... 11 more
W/ActivityManager(  151):   Force finishing activity 
android/.accounts.GrantCredentialsPermissionActivity


 But, when i get google's AuthToken, it works fine.
 My question is :
  Are there something wrong in my code and how can i fix it?
  Or it is a bug in android and it will be fixed later?

thx

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

2012-03-20 Thread rdietrick
I have a RelativeLayout that encapsulates several other views.  I have the 
layout_width of the parent (RelativeLayout) set to "wrap_content."  If I 
set the layout_alignParentRight attribute of one of the child views to 
"true," it expands the parent layout horizontally to fill the screen.  Is 
there a way around this?  I believe setting layout_alignParentBottom="true" 
does the same thing vertically, while left and top don't.

Thanks.

-rob

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

2012-03-20 Thread kronos
Hello:

I have an example similar to the Shakespeare example with one
ListFragment showing a list of items.  The second ListFragment shows a
second list based on the item the user clicks in the first fragment.
The data is taken from the Internet, so proper background threads are
used to leave the GUI thread do its thing.
The first thread loads the data OK.  But when the app loads the first
time, and every time I select an item from the first list, the second
list always shows a loading icon like a indefinite ProgressBar
component.  If I scroll a little, the ProgressBar goes away, but it
comes back every time I select a new item.

How do I tell Android the ListFragment has finished working on the
data ?

The second list is filled in onActivityCreate().  The ListFragment is
replaced with a new one as is done in the Shakespeare axample.  A new
Thread is run in onActivityCreate() to load the list in the
background.  Once the list is loaded a Handler.post() is issue to
update the actual list.

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] about the online source codes of Android 1.0 and 1.1

2012-03-20 Thread michael
Is there any good sources that I can explore the source code online?

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: Android, SQLite, massive (5000%+) loss of performance on a certain query, on a certain device

2012-03-20 Thread Gene
When you see huge differences like this on joins it often means one of
the inner columns is not in an index _and_ there exists at least one
pair of tables being joined that won't fit in cache. So I'd bet the
difference between the two devices is SQLlite caching, which could be
either RAM available to SQL or in th flash controller.

On Mar 20, 8:02 pm, momo  wrote:
> that was it - i had forgotten to pk one id column in one of the join tables
> - adding that and it's night-and-day - under 1 second, compared with ~30
> before.  thanks all for reinforcing that concept.  very glad i didn't try
> to convert the whole thing to a Java model.

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


[android-developers] Re: Android, SQLite, massive (5000%+) loss of performance on a certain query, on a certain device

2012-03-20 Thread momo
that was it - i had forgotten to pk one id column in one of the join tables 
- adding that and it's night-and-day - under 1 second, compared with ~30 
before.  thanks all for reinforcing that concept.  very glad i didn't try 
to convert the whole thing to a Java model.

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

Re: [android-developers] Re: Supporting Galaxy Note Issues Due To It Displaying Itself as a LARGE screen layout.

2012-03-20 Thread Brian Conrad
I just changed to the  qualifiers (or elements 
depending on which article you read) and filtering looks fine in the 
developer console.  But now my A500 is shown as incompatible.  For 10+" 
screens only I used:






Logically that should keep that version to 10" screens and 720p or 
higher.  But that is supported with the A500 so they must have their 
data wrong on the A500.


On 03/15/2012 06:22 PM, Zsolt Vasvari wrote:

Why are you surprised this is broken on Google Play.

For my app, the Acer Iconia A500 doesn't even show up on the supported
device list even though I have no filters/qualifiers/etc at all.



On Wednesday, February 8, 2012 7:38:57 AM UTC+8, Doug wrote:

On Feb 5, 6:22 am, Daniele Segato  wrote:

On 01/20/2012 02:40 PM, Chris wrote:


My app runs on Android 2.1+ , so I can't use the DPI based screen
differentiation ,

are you sure about this?

I can tell you that I created an emulator with Android version 2.3.3,
told it to be 1280x800, and it picked up my very specific layout that
I stored in layout-large-port-xhdpi-1280x800.  Was that a fluke?  I
don't know.  But we haven't had any complaints from Note users,
whereas if the old layout was used, we would definitely receive some
complaints.

I think Samsung was aware of the problems with the way that the Note
works with some apps, because my company was directly contacted by a
representative from Samsung who helped us work out the layout issue
with our app on the Note.

Doug



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


Re: [android-developers] Re: Does the file Manifest.java in Android source codes contain all the list of permissions?

2012-03-20 Thread Mark Murphy
https://github.com/android/platform_frameworks_base/blob/master/core/res/AndroidManifest.xml

On Tue, Mar 20, 2012 at 7:30 PM, michael  wrote:
> I know. what I meant is that *whether Android has the file that
> contains the list of permissions by itself*, disregarding the App
> side, only the Platform side.
>
> Apk cannot change the permissions in the Android platform, though they
> could define the other permissions by itself.
>
> There should be a data file that contains such information, otherwise,
> how could the platform verify the permission requests from apps?
>
>
>
> On Mar 20, 4:16 pm, Dianne Hackborn  wrote:
>> Any apk can define permissions.  There are core parts of Android that are
>> in other apks.  If you want to know about the permissions defined by an
>> apk, go look in its AndroidManifest.xml.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Mar 20, 2012 at 3:18 PM, michael  wrote:
>> > one addition: I only consider *Android* defined permissions.
>>
>> > Dianne Hackborn wrote:
>> > > No.
>>
>> > > On Tue, Mar 20, 2012 at 12:00 PM, michael  wrote:
>>
>> > > > Could I say that the Manifest.java file contains all the permissions
>> > > > for one version of  Android?
>>
>> > > > --
>> > > > You received this message because you are subscribed to the Google
>> > > > Groups "Android Developers" group.
>> > > > To post to this group, send email to
>> > android-developers@googlegroups.com
>> > > > To unsubscribe from this group, send email to
>> > > > android-developers+unsubscr...@googlegroups.com
>> > > > For more options, visit this group at
>> > > >http://groups.google.com/group/android-developers?hl=en
>>
>> > > --
>> > > Dianne Hackborn
>> > > Android framework engineer
>> > > hack...@android.com
>>
>> > > Note: please don't send private questions to me, as I don't have time to
>> > > provide private support, and so won't reply to such e-mails.  All such
>> > > questions should be posted on public forums, where I and others can see
>> > and
>> > > answer them.
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see and
>> answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



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

Android App Developer Books: http://commonsware.com/books

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


[android-developers] Re: Google Maps are very old on Android

2012-03-20 Thread g...@deanblakely.com
I was warned it would be weird over here.
Gary

On Mar 18, 7:09 pm, Zsolt Vasvari  wrote:
> You didn't specify:
>
> android:giveMeLatestMaps="true"
>
>
>
> On Monday, March 19, 2012 8:07:06 AM UTC+8, ga...@deanblakely.com wrote:
>
> > I'm going through some of the tutorials and just finished
> > HelloGoogleMaps tutorial.  It works alright but I notice that the map
> > is very old - much older than on Google.com.
>
> > Looking where  I live it's at least 7 years old.  On Google.com it's
> > no more than 2 years old.  Why would this be?
>
> > the main.xml is...
> >  >     xmlns:android="http://schemas.android.com/apk/res/android";
> >     android:id="@+id/mapview"
> >     android:layout_width="fill_parent"
> >     android:layout_height="fill_parent"
> >     android:clickable="true"
> >     android:apiKey="removedmyapikey"/>
>
> > thanks,
> > Gary- 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] Re: Does the file Manifest.java in Android source codes contain all the list of permissions?

2012-03-20 Thread michael
I know. what I meant is that *whether Android has the file that
contains the list of permissions by itself*, disregarding the App
side, only the Platform side.

Apk cannot change the permissions in the Android platform, though they
could define the other permissions by itself.

There should be a data file that contains such information, otherwise,
how could the platform verify the permission requests from apps?



On Mar 20, 4:16 pm, Dianne Hackborn  wrote:
> Any apk can define permissions.  There are core parts of Android that are
> in other apks.  If you want to know about the permissions defined by an
> apk, go look in its AndroidManifest.xml.
>
>
>
>
>
>
>
>
>
> On Tue, Mar 20, 2012 at 3:18 PM, michael  wrote:
> > one addition: I only consider *Android* defined permissions.
>
> > Dianne Hackborn wrote:
> > > No.
>
> > > On Tue, Mar 20, 2012 at 12:00 PM, michael  wrote:
>
> > > > Could I say that the Manifest.java file contains all the permissions
> > > > for one version of  Android?
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


Re: [android-developers] Re: Android, SQLite, massive (5000%+) loss of performance on a certain query, on a certain device

2012-03-20 Thread Kostya Vasilyev
Those two devices might be using different sqlite versions. I've found from
my work that version 3.7 can be significantly faster than 3.6 for some
queries.

There are performance analysis tools built into sqlite, one is the usual
"explain", the other is a low level virtual machine trace tool. You could
probably find a way to use them from your application, at least the first
one.

If you cannot find a way to use those tools from the app, consider
obtaining sqlite binaries for the PC having the same versions as found on
the devices, and doing the analysis there.

Finally, regarding getCount - it's one of those Cursor methods that
actually cause the query to be executed and the result loaded into memory.
This is expensive, unlike the SQL parsing that happens before. In other
words, since you can't avoid loading the actual data, it doesn't make much
sense to try and skip getCount, as you'll only be postponing the inevitable.
 21.03.2012 2:57 пользователь "Weston Weems"  написал:

> SQL performance often relies on indexing and quantity of data. Generally
> fields you join on are going to need to be indexed (as they appear to be
> pk's). Without a where criteria, you're effectively going to end up with a
> table scan on english words, and compounded by the joins.
>
> I dont know details about the devices specifically, but it is possible
> sqlite isnt optimized for the nexus.
>
> If you arent indexing your tables, do so.
>
>
> Weston
>
>
>
> On Tuesday, March 20, 2012 3:22:57 PM UTC-7, momo wrote:
>>
>> I'm rewriting a simple translation app with a SQLite db.  There is an
>> extreme hit to performance between two queries, but only on certain devices.
>>
>> One query lists the english words in a ListView, the other lists the
>> secondary language in a list view.  The data is structured differently, and
>> is from a remote server.
>>
>> Both are single SQL statements, run via db.rawQuery.  Both use AsyncTask
>> to keep heavy lifting in another thread.
>>
>> On both devices, the "english" query returns almost instantly (less than
>> 1 second, every time):
>>
>> return db.rawQuery("select _id as id, english as label from english_words
>> order by english collate nocase", null);
>>
>> On one device, the "secondary_langauge" query returns almost instantly as
>> well.  No problem there, ever.  This is a Samsung Galaxy SII.  On another
>> device (Samsung Nexus S), this query takes around 30 seconds.  This query
>> has some joins, as follows:
>>
>> return db.rawQuery("select definitions._id as id, secondary_language as
>> label from english_words join definition_bridge on
>> english_words._id=definition_**bridge.word_id join definitions on
>> definitions._id=definition_**bridge.definition_id order by
>> secondary_language", null);
>>
>> I ran it in the emulator once, and got the same result as the Nexus S
>> (the 30 second hang).  It took a little 1.5 hours to download and parse the
>> returns from the server on the emulator (which takes a few seconds on
>> either device), so I gave up on further debug with the emulator at that
>> point.
>>
>> This is the only difference between the two operations.  The listView is
>> the same, the adapter is the same, the AsyncTask is the same.  The number
>> of rows returned is different - there are about 2000 english words, and a
>> little over 3000 words in the other language.  I don't think this explains
>> the vast difference in performance.
>>
>> I took the query out of the AsyncTask to see if I could get some more
>> debug info, and did get an ANR:
>>
>>   at android.database.sqlite.**SQLiteQuery.native_fill_**window(Native
>> Method)
>>   at android.database.sqlite.**SQLiteQuery.fillWindow(**
>> SQLiteQuery.java:73)
>>   at android.database.sqlite.**SQLiteCursor.fillWindow(**
>> SQLiteCursor.java:287)
>>   at android.database.sqlite.**SQLiteCursor.getCount(**
>> SQLiteCursor.java:268)
>>   at com.whatever.adapters.**WordListAdapter.getCount(**
>> WordListAdapter.java:39)
>>
>> I rewrote the adapter's getCount method to return a cached count
>> (determined during instantiation).  After, I didn't get an ANR again, but
>> otherwise the performance was not improved and the query still took around
>> 30 seconds.
>>
>> I'm totally at a loss.  As mentioned, everything but the queries is
>> identical.  And on the Galaxy SII, there is no problem at all - less than a
>> second to populate the ListView, even under abuse (touching the button that
>> launches the request as fast as I could).
>>
>> At this point, I'm wondering if it'd be better to abandon SQLite
>> entirely, and using a Java model to manage data.  Assuming I can't get the
>> SQLite version to perform reasonably, what could I expect in terms of
>> performance using Collections (with the number of entries mentioned above),
>> when I need to do a search for example (which I imaging would require
>> iterating over the whole thing on each key event).
>>
>> Any advice?
>>
>> TYIA.
>>
>>  --
> You received this message because you a

Re: [android-developers] Re: Google Maps are very old on Android

2012-03-20 Thread Mark Murphy
On Tue, Mar 20, 2012 at 7:22 PM, g...@deanblakely.com
 wrote:
> The com.google.android.maps.MapView has been abandoned?

It has not been abandoned. It also has not been updated, in terms of
new capabilities.

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

Android App Developer Books: http://commonsware.com/books

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


[android-developers] Re: Google Maps are very old on Android

2012-03-20 Thread g...@deanblakely.com
TreKing,
The com.google.android.maps.MapView has been abandoned??  I must
misunderstand.  What tool do android developers use when they want to
display Google Maps in Android applications?  Where are those docs or
tutorials.  I figured that going to the Android developers center
would be the right place to go to learn about developing on Android.
No?
Gary

On Mar 18, 10:22 pm, TreKing  wrote:
> On Sun, Mar 18, 2012 at 7:07 PM, g...@deanblakely.com
> wrote:
>
> > Why would this be?
>
> The Google Maps add-on has essentially been abandoned. It has not received
> an update of any sort in several years now. I would think that the tiles
> would be updated server-side, but apparently that is also not a concern for
> Google at this time. Not much you can do about this.
>
> ---­--
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: serverSocket.accept();

2012-03-20 Thread Lew
Sumit wrote:
>
> Lew wrote:
>
>> Sumit wrote: 
>>>
>>> Gave me the link were you have post..
>>>
>>
>> Huh?
>>  
>> If you're asking where your own post is, I can't help you. But I'm not 
>> sure that's what you're saying.
>>
>> > Thanks,
>I read that.
 
If you read the answer, why haven't you answered the questions we asked? 
Why do you keep hijacking other threads instead of responding on that 
thread?

Are you serious about wanting assistance, or are you just trolling? 

If you are serious, and right now it does not seem that you are, you will 
interact appropriately. Respond on the thread where people responded to 
you. Answer our questions. Respond to our statements. Try out the advice. 
Don't be a troll, please.

-- 
Lew

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

Re: [android-developers] Does the file Manifest.java in Android source codes contain all the list of permissions?

2012-03-20 Thread Dianne Hackborn
Any apk can define permissions.  There are core parts of Android that are
in other apks.  If you want to know about the permissions defined by an
apk, go look in its AndroidManifest.xml.

On Tue, Mar 20, 2012 at 3:18 PM, michael  wrote:

> one addition: I only consider *Android* defined permissions.
>
> Dianne Hackborn wrote:
> > No.
> >
> > On Tue, Mar 20, 2012 at 12:00 PM, michael  wrote:
> >
> > > Could I say that the Manifest.java file contains all the permissions
> > > for one version of  Android?
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > > http://groups.google.com/group/android-developers?hl=en
> > >
> >
> >
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

[android-developers] Re: Android, SQLite, massive (5000%+) loss of performance on a certain query, on a certain device

2012-03-20 Thread Weston Weems
SQL performance often relies on indexing and quantity of data. Generally 
fields you join on are going to need to be indexed (as they appear to be 
pk's). Without a where criteria, you're effectively going to end up with a 
table scan on english words, and compounded by the joins.

I dont know details about the devices specifically, but it is possible 
sqlite isnt optimized for the nexus.

If you arent indexing your tables, do so. 


Weston



On Tuesday, March 20, 2012 3:22:57 PM UTC-7, momo wrote:
>
> I'm rewriting a simple translation app with a SQLite db.  There is an 
> extreme hit to performance between two queries, but only on certain devices.
>
> One query lists the english words in a ListView, the other lists the 
> secondary language in a list view.  The data is structured differently, and 
> is from a remote server.
>
> Both are single SQL statements, run via db.rawQuery.  Both use AsyncTask 
> to keep heavy lifting in another thread.
>
> On both devices, the "english" query returns almost instantly (less than 1 
> second, every time): 
>
> return db.rawQuery("select _id as id, english as label from english_words 
> order by english collate nocase", null);
>
> On one device, the "secondary_langauge" query returns almost instantly as 
> well.  No problem there, ever.  This is a Samsung Galaxy SII.  On another 
> device (Samsung Nexus S), this query takes around 30 seconds.  This query 
> has some joins, as follows:
>
> return db.rawQuery("select definitions._id as id, secondary_language as 
> label from english_words join definition_bridge on 
> english_words._id=definition_bridge.word_id join definitions on 
> definitions._id=definition_bridge.definition_id order by 
> secondary_language", null);
>
> I ran it in the emulator once, and got the same result as the Nexus S (the 
> 30 second hang).  It took a little 1.5 hours to download and parse the 
> returns from the server on the emulator (which takes a few seconds on 
> either device), so I gave up on further debug with the emulator at that 
> point.
>
> This is the only difference between the two operations.  The listView is 
> the same, the adapter is the same, the AsyncTask is the same.  The number 
> of rows returned is different - there are about 2000 english words, and a 
> little over 3000 words in the other language.  I don't think this explains 
> the vast difference in performance.
>
> I took the query out of the AsyncTask to see if I could get some more 
> debug info, and did get an ANR:
>
>   at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
>   at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:73)
>   at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:287)
>   at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
>   at 
> com.whatever.adapters.WordListAdapter.getCount(WordListAdapter.java:39)
>
> I rewrote the adapter's getCount method to return a cached count 
> (determined during instantiation).  After, I didn't get an ANR again, but 
> otherwise the performance was not improved and the query still took around 
> 30 seconds.
>
> I'm totally at a loss.  As mentioned, everything but the queries is 
> identical.  And on the Galaxy SII, there is no problem at all - less than a 
> second to populate the ListView, even under abuse (touching the button that 
> launches the request as fast as I could).
>
> At this point, I'm wondering if it'd be better to abandon SQLite entirely, 
> and using a Java model to manage data.  Assuming I can't get the SQLite 
> version to perform reasonably, what could I expect in terms of performance 
> using Collections (with the number of entries mentioned above), when I need 
> to do a search for example (which I imaging would require iterating over 
> the whole thing on each key event).
>
> Any advice?
>
> TYIA.
>
>

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

Re: [android-developers] Android, SQLite, massive (5000%+) loss of performance on a certain query, on a certain device

2012-03-20 Thread Dianne Hackborn
You can get the SQLite version to perform acceptably.  You just need to use
it correctly -- set up indices as appropriate as needed for joins and such.
 I am not a SQL (lite or otherwise) expect in any way so I can't help you
with the particulars, but at the very least make sure you are actually
setting indices on the columns that are involved in deciding what rows are
included in the query result.

Also all you are doing by putting your query in the main thread of your
process is causing your process to ANR when it takes a long time.  The
query all happens in native code down in SQLite, so you won't see anything
in your java traces (nor typically anything interesting in native traces
either since most likely, yes, you are executing the query in SQLite).

On Tue, Mar 20, 2012 at 3:22 PM, momo  wrote:

> I'm rewriting a simple translation app with a SQLite db.  There is an
> extreme hit to performance between two queries, but only on certain devices.
>
> One query lists the english words in a ListView, the other lists the
> secondary language in a list view.  The data is structured differently, and
> is from a remote server.
>
> Both are single SQL statements, run via db.rawQuery.  Both use AsyncTask
> to keep heavy lifting in another thread.
>
> On both devices, the "english" query returns almost instantly (less than 1
> second, every time):
>
> return db.rawQuery("select _id as id, english as label from english_words
> order by english collate nocase", null);
>
> On one device, the "secondary_langauge" query returns almost instantly as
> well.  No problem there, ever.  This is a Samsung Galaxy SII.  On another
> device (Samsung Nexus S), this query takes around 30 seconds.  This query
> has some joins, as follows:
>
> return db.rawQuery("select definitions._id as id, secondary_language as
> label from english_words join definition_bridge on
> english_words._id=definition_bridge.word_id join definitions on
> definitions._id=definition_bridge.definition_id order by
> secondary_language", null);
>
> I ran it in the emulator once, and got the same result as the Nexus S (the
> 30 second hang).  It took a little 1.5 hours to download and parse the
> returns from the server on the emulator (which takes a few seconds on
> either device), so I gave up on further debug with the emulator at that
> point.
>
> This is the only difference between the two operations.  The listView is
> the same, the adapter is the same, the AsyncTask is the same.  The number
> of rows returned is different - there are about 2000 english words, and a
> little over 3000 words in the other language.  I don't think this explains
> the vast difference in performance.
>
> I took the query out of the AsyncTask to see if I could get some more
> debug info, and did get an ANR:
>
>   at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
>   at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:73)
>   at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:287)
>   at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
>   at
> com.whatever.adapters.WordListAdapter.getCount(WordListAdapter.java:39)
>
> I rewrote the adapter's getCount method to return a cached count
> (determined during instantiation).  After, I didn't get an ANR again, but
> otherwise the performance was not improved and the query still took around
> 30 seconds.
>
> I'm totally at a loss.  As mentioned, everything but the queries is
> identical.  And on the Galaxy SII, there is no problem at all - less than a
> second to populate the ListView, even under abuse (touching the button that
> launches the request as fast as I could).
>
> At this point, I'm wondering if it'd be better to abandon SQLite entirely,
> and using a Java model to manage data.  Assuming I can't get the SQLite
> version to perform reasonably, what could I expect in terms of performance
> using Collections (with the number of entries mentioned above), when I need
> to do a search for example (which I imaging would require iterating over
> the whole thing on each key event).
>
> Any advice?
>
> TYIA.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

[android-developers] Android, SQLite, massive (5000%+) loss of performance on a certain query, on a certain device

2012-03-20 Thread momo
I'm rewriting a simple translation app with a SQLite db.  There is an 
extreme hit to performance between two queries, but only on certain devices.

One query lists the english words in a ListView, the other lists the 
secondary language in a list view.  The data is structured differently, and 
is from a remote server.

Both are single SQL statements, run via db.rawQuery.  Both use AsyncTask to 
keep heavy lifting in another thread.

On both devices, the "english" query returns almost instantly (less than 1 
second, every time): 

return db.rawQuery("select _id as id, english as label from english_words 
order by english collate nocase", null);

On one device, the "secondary_langauge" query returns almost instantly as 
well.  No problem there, ever.  This is a Samsung Galaxy SII.  On another 
device (Samsung Nexus S), this query takes around 30 seconds.  This query 
has some joins, as follows:

return db.rawQuery("select definitions._id as id, secondary_language as 
label from english_words join definition_bridge on 
english_words._id=definition_bridge.word_id join definitions on 
definitions._id=definition_bridge.definition_id order by 
secondary_language", null);

I ran it in the emulator once, and got the same result as the Nexus S (the 
30 second hang).  It took a little 1.5 hours to download and parse the 
returns from the server on the emulator (which takes a few seconds on 
either device), so I gave up on further debug with the emulator at that 
point.

This is the only difference between the two operations.  The listView is 
the same, the adapter is the same, the AsyncTask is the same.  The number 
of rows returned is different - there are about 2000 english words, and a 
little over 3000 words in the other language.  I don't think this explains 
the vast difference in performance.

I took the query out of the AsyncTask to see if I could get some more debug 
info, and did get an ANR:

  at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
  at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:73)
  at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:287)
  at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
  at com.whatever.adapters.WordListAdapter.getCount(WordListAdapter.java:39)

I rewrote the adapter's getCount method to return a cached count 
(determined during instantiation).  After, I didn't get an ANR again, but 
otherwise the performance was not improved and the query still took around 
30 seconds.

I'm totally at a loss.  As mentioned, everything but the queries is 
identical.  And on the Galaxy SII, there is no problem at all - less than a 
second to populate the ListView, even under abuse (touching the button that 
launches the request as fast as I could).

At this point, I'm wondering if it'd be better to abandon SQLite entirely, 
and using a Java model to manage data.  Assuming I can't get the SQLite 
version to perform reasonably, what could I expect in terms of performance 
using Collections (with the number of entries mentioned above), when I need 
to do a search for example (which I imaging would require iterating over 
the whole thing on each key event).

Any advice?

TYIA.

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

Re: [android-developers] Does the file Manifest.java in Android source codes contain all the list of permissions?

2012-03-20 Thread michael
one addition: I only consider *Android* defined permissions.

Dianne Hackborn wrote:
> No.
>
> On Tue, Mar 20, 2012 at 12:00 PM, michael  wrote:
>
> > Could I say that the Manifest.java file contains all the permissions
> > for one version of  Android?
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
> >
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


[android-developers] Re: Does the file Manifest.java in Android source codes contain all the list of permissions?

2012-03-20 Thread michael
the content of the Manifest.java file in Android source code(4.0.3) ,
for your reference, the following permissions list is complete?:

package android;
2  public final class Manifest
3  {
4  public static final class permission
5  {
6  public  permission() { throw new RuntimeException("Stub!"); }
7  public static final java.lang.String ACCESS_CHECKIN_PROPERTIES =
"android.permission.ACCESS_CHECKIN_PROPERTIES";
8  public static final java.lang.String ACCESS_COARSE_LOCATION =
"android.permission.ACCESS_COARSE_LOCATION";
9  public static final java.lang.String ACCESS_FINE_LOCATION =
"android.permission.ACCESS_FINE_LOCATION";
10 public static final java.lang.String ACCESS_LOCATION_EXTRA_COMMANDS
= "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS";
11 public static final java.lang.String ACCESS_MOCK_LOCATION =
"android.permission.ACCESS_MOCK_LOCATION";
12 public static final java.lang.String ACCESS_NETWORK_STATE =
"android.permission.ACCESS_NETWORK_STATE";
13 public static final java.lang.String ACCESS_SURFACE_FLINGER =
"android.permission.ACCESS_SURFACE_FLINGER";
14 public static final java.lang.String ACCESS_WIFI_STATE =
"android.permission.ACCESS_WIFI_STATE";
15 public static final java.lang.String ACCOUNT_MANAGER =
"android.permission.ACCOUNT_MANAGER";
16 public static final java.lang.String ADD_VOICEMAIL =
"com.android.voicemail.permission.ADD_VOICEMAIL";
17 public static final java.lang.String AUTHENTICATE_ACCOUNTS =
"android.permission.AUTHENTICATE_ACCOUNTS";
18 public static final java.lang.String BATTERY_STATS =
"android.permission.BATTERY_STATS";
19 public static final java.lang.String BIND_APPWIDGET =
"android.permission.BIND_APPWIDGET";
20 public static final java.lang.String BIND_DEVICE_ADMIN =
"android.permission.BIND_DEVICE_ADMIN";
21 public static final java.lang.String BIND_INPUT_METHOD =
"android.permission.BIND_INPUT_METHOD";
22 public static final java.lang.String BIND_REMOTEVIEWS =
"android.permission.BIND_REMOTEVIEWS";
23 public static final java.lang.String BIND_TEXT_SERVICE =
"android.permission.BIND_TEXT_SERVICE";
24 public static final java.lang.String BIND_VPN_SERVICE =
"android.permission.BIND_VPN_SERVICE";
25 public static final java.lang.String BIND_WALLPAPER =
"android.permission.BIND_WALLPAPER";
26 public static final java.lang.String BLUETOOTH =
"android.permission.BLUETOOTH";
27 public static final java.lang.String BLUETOOTH_ADMIN =
"android.permission.BLUETOOTH_ADMIN";
28 public static final java.lang.String BRICK =
"android.permission.BRICK";
29 public static final java.lang.String BROADCAST_PACKAGE_REMOVED =
"android.permission.BROADCAST_PACKAGE_REMOVED";
30 public static final java.lang.String BROADCAST_SMS =
"android.permission.BROADCAST_SMS";
31 public static final java.lang.String BROADCAST_STICKY =
"android.permission.BROADCAST_STICKY";
32 public static final java.lang.String BROADCAST_WAP_PUSH =
"android.permission.BROADCAST_WAP_PUSH";
33 public static final java.lang.String CALL_PHONE =
"android.permission.CALL_PHONE";
34 public static final java.lang.String CALL_PRIVILEGED =
"android.permission.CALL_PRIVILEGED";
35 public static final java.lang.String CAMERA =
"android.permission.CAMERA";
36 public static final java.lang.String CHANGE_COMPONENT_ENABLED_STATE
= "android.permission.CHANGE_COMPONENT_ENABLED_STATE";
37 public static final java.lang.String CHANGE_CONFIGURATION =
"android.permission.CHANGE_CONFIGURATION";
38 public static final java.lang.String CHANGE_NETWORK_STATE =
"android.permission.CHANGE_NETWORK_STATE";
39 public static final java.lang.String CHANGE_WIFI_MULTICAST_STATE =
"android.permission.CHANGE_WIFI_MULTICAST_STATE";
40 public static final java.lang.String CHANGE_WIFI_STATE =
"android.permission.CHANGE_WIFI_STATE";
41 public static final java.lang.String CLEAR_APP_CACHE =
"android.permission.CLEAR_APP_CACHE";
42 public static final java.lang.String CLEAR_APP_USER_DATA =
"android.permission.CLEAR_APP_USER_DATA";
43 public static final java.lang.String CONTROL_LOCATION_UPDATES =
"android.permission.CONTROL_LOCATION_UPDATES";
44 public static final java.lang.String DELETE_CACHE_FILES =
"android.permission.DELETE_CACHE_FILES";
45 public static final java.lang.String DELETE_PACKAGES =
"android.permission.DELETE_PACKAGES";
46 public static final java.lang.String DEVICE_POWER =
"android.permission.DEVICE_POWER";
47 public static final java.lang.String DIAGNOSTIC =
"android.permission.DIAGNOSTIC";
48 public static final java.lang.String DISABLE_KEYGUARD =
"android.permission.DISABLE_KEYGUARD";
49 public static final java.lang.String DUMP =
"android.permission.DUMP";
50 public static final java.lang.String EXPAND_STATUS_BAR =
"android.permission.EXPAND_STATUS_BAR";
51 public static final java.lang.String FACTORY_TEST =
"android.permission.FACTORY_TEST";
52 public static final java.lang.String FLASHLIGHT =
"android.permission.FLASHLIGHT";
53 public static final java.lang.String FORCE_BACK =
"android.permission.FORCE_BACK";
54 public static final java.la

Re: [android-developers] VpnService basic questions

2012-03-20 Thread Mark Murphy
On Mon, Mar 19, 2012 at 6:23 PM, mjl3434  wrote:
> There are two new classes added in ICS: VpnService and VpnService.Builder. I
> want to know if these classes would be useful for my goal of developing an
> app that has it's own UI and connects to a VPN endpoint with IPSec VPN (or
> maybe even SSL VPN). Unfortunately, the documentation doesn't really explain
> anything about the actual protocols. The documentation says the class
> is "for applications to extend and build their own VPN solutions. In
> general, it creates a virtual network interface, configures addresses and
> routing rules..."
>
> So here are some obvious unanswered questions:
> 1. What protocol is the VpnService using? Is it SSL based, IPSec,
> L2TP/IPSec, PPTP or what? Protocol matters to some people.

It is whatever you code yourself. You want SSL-based? Write it. You
want IPSec? Write it. You want L2TP/IPSec? Write it. You want PPTP?
Write it. In this respect, VpnService is to VPNs as Activity is to
user interfaces -- it is a necessary part of the framework that
provides some basic functionality, but the core of what you are trying
to do is what you write yourself.

> 2. What on earth do you do at the remote endpoint?

The other side of whatever you code yourself.

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

Android App Developer Books: http://commonsware.com/books

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


[android-developers] Re: Does the file Manifest.java in Android source codes contain all the list of permissions?

2012-03-20 Thread michael


On Mar 20, 2:20 pm, Dianne Hackborn  wrote:
> No.

Can you provide more detail about this?

So, which file contains such information? I cannot find other files
that have such info.

Thanks alot.

>
> On Tue, Mar 20, 2012 at 12:00 PM, michael  wrote:
> > Could I say that the Manifest.java file contains all the permissions
> > for one version of  Android?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


Re: [android-developers] Fragment within a fragment?

2012-03-20 Thread Mark Murphy
On Mon, Mar 19, 2012 at 7:47 PM, Pedro  wrote:
> I don't really want to nest the fragments, but I don't have a choice since
> I'm using ActionBar tabs, which by definition only accepts fragments to be
> added as tabs.

Nonsense. Just because you are handed a FragmentTransaction does not
mean you have to use it. You are welcome to do anything you want when
the user clicks an action bar tab.

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

Android App Developer Books: http://commonsware.com/books

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


[android-developers] Re: implementing fade-in/fade-out effects in Java with frame-based animation

2012-03-20 Thread Serdel
Yes the bitmaps are different, not only the angle changes (there is
also some kind of reflection effect on it and patterns). So rotating
the same image (which I guess is your suggestion) won't do the trick
here. I am also thinking about using the same fade in fade out effect
on another animation where a glowing bowl appears and hides in a a
kind of slow 'puls rythm' - here also the bitmaps are different and it
won't do with hiding in&out the same bitmap

On 20 Mar, 18:35, Justin Anderson  wrote:
> > Thanks for the response but the animation is a set of bitmaps that I
> > show, it can't be done with the Android shapes.
>
> Animations don't have to be done on Android Shapes... They can be done on
> any view, like an ImageView.  Is your set of bitmaps different in any way
> other than the rotation?  If the only difference in the frames is the
> rotation then you can use the approach I described.
>
> Thanks,
> Justin Anderson
> MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
> On Tue, Mar 20, 2012 at 11:23 AM, Serdel wrote:
>
> > Thanks for the response but the animation is a set of bitmaps that I
> > show, it can't be done with the Android shapes. So I need this
> > approach. However I was thinking if I can find a way to use the alfa
> > approach in my need. Or anything that would bring a similar fade-in/
> > out effect Is it possible?
>
> > On 20 Mar, 17:36, Justin Anderson  wrote:
> > > Is there any particular reason you are using a frame-based animation?  I
> > > haven't done any frame-based animations, but I know you could accomplish
> > > the same (or very similar) thing using an AnimationSet defined in XML.
>
> > > You could then specify a rotation to the image as well as a fade in/out
> > > with alpha...
>
> > > As a simple example, this could go in res/anim and be called something
> > like
> > > spin_fade_in.xml:
>
> > > 
> > > http://schemas.android.com/apk/res/android";>
> > >      > >         adroid:fromAlpha="0.0"
> > >         android:toAlpha="1.0"
> > >         android:duration="500"
> > >         android:startOffset="0"
>
> > >     />
>
> > >      > > android:toXScale=".85"        android:fromYScale="1"
> > > android:toYScale=".85"         android:duration="100"
> > > android:startOffset="0"        android:pivotX="50%"
> > > android:pivotY="50%"    />         > > android:fromDegrees="0"         android:toDegrees="360"
> > > android:pivotX="50%"         android:pivotY="50%"
> > > android:duration="500"        android:startOffset="0"    />
> > >  > >      android:fromYScale=".85"         android:toYScale="1"
> > > android:duration="100"         android:startOffset="400"
> > > android:pivotX="50%"        android:pivotY="50%"    />
> > > 
>
> > > Thanks,
> > > Justin Anderson
> > > MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
> > > On Tue, Mar 20, 2012 at 10:24 AM, Serdel  > >wrote:
>
> > > > Hi,
>
> > > > I am running an animation of a spinning star and I would like to add
> > > > some fade-in/fade-out effects. I am loading the animation in Java by
> > > > making the AnimationDrawable objects, and adding the bitmaps as frames
> > > > and then setting it to an ImageView using setBackgroundDrawable. I
> > > > there a way I can add fade-in fade-out effects to this animation? I
> > > > couldn't find any help on that subjects so far.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
>

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


[android-developers] Re: OnTouchListener with multiple views problem

2012-03-20 Thread metro
great example. thank you!


On Saturday, March 17, 2012 10:39:25 PM UTC+2, metro wrote:
>
> Hi, 
> I have a problem I can't solve. 
> I've dynamically  configured multiple views with the same 
> OnTouchListener 
> After I finish moving one view (ACTION_UP and return false), and 
> trying to touch and move other view, the OnTouch method is called with 
> the same first view as parameter, and that view is "jumping" to where 
> my finger is 
> How can I tell android I've finished with this view when the ACTION_UP 
> is called? 
>
> 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

Re: [android-developers] Gingerbread drag and drop

2012-03-20 Thread TreKing
On Mon, Mar 19, 2012 at 4:12 AM, metro  wrote:

> Any good example or library?


http://lmgtfy.com/?q=android+drag+drop

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

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

Re: [android-developers] Same permission defined in multiple applications

2012-03-20 Thread Dianne Hackborn
I would recommend using it for .apks that are going to be built in to the
system image (not distributed on Market) and want to have their code
running in a common shared process in order to reduce their overall memory
footprint.  That is the reason this facility was implemented.  I think it
was a mistake to let it get out into the public SDK.

On Tue, Mar 20, 2012 at 12:50 AM, Doug  wrote:

> Dianne, when would you recommend using sharedUserId?  Also, are these
> subtleties documented anywhere?
>
> Doug
>
>
> On Monday, March 19, 2012 5:57:33 PM UTC-7, Dianne Hackborn wrote:
>>
>> I strongly recommend avoiding sharedUserId.  Note that once you publish
>> an app with this, you can never go back.  It will have a lot of subtle
>> repercussions on your app that you may not like -- everything from all of
>> the apps with the same shared user ID being batched together in accounting
>> for battery use, to your processes being killed when one of your apps with
>> the shared user ID is updated.
>>
>> On Mon, Mar 19, 2012 at 10:23 AM, Justin Anderson 
>> wrote:
>>
>>> If you want to share things like preferences between the different apps
>>> then you will want to make sure that you also give them the same
>>> sharedUserId attribute in the manifest:
>>>
>>> http://developer.android.com/**guide/topics/manifest/**
>>> manifest-element.html#uid
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware
>>>
>>>
>>>
>>> On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy wrote:
>>>
 On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves 
 wrote:
 > I am developing two applications that will share functionality via
 their
 > activities. I would like to only allow applications signed with the
 same
 > certificate to start these activities.
 >
 > My plan is to create a custom permission with protection level of
 signature
 > and apply that permission to exported activities in both applications.
 > Either application can be installed first, so I will define the
 permission
 > in both application manifests.
 >
 > Are there problems with defining the same permission in multiple
 > applications?  I plan to release both applications on the Android
 market.

 AFAIK, that should work fine.

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

 _Android Programming Tutorials_ Version 4.1 Available!

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

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@**
>>> googlegroups.com 
>>> To unsubscribe from this group, send email to
>>> android-developers+**unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en
>>>
>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see and
>> answer them.
>>
>>
> On Monday, March 19, 2012 5:57:33 PM UTC-7, Dianne Hackborn wrote:
>>
>> I strongly recommend avoiding sharedUserId.  Note that once you publish
>> an app with this, you can never go back.  It will have a lot of subtle
>> repercussions on your app that you may not like -- everything from all of
>> the apps with the same shared user ID being batched together in accounting
>> for battery use, to your processes being killed when one of your apps with
>> the shared user ID is updated.
>>
>> On Mon, Mar 19, 2012 at 10:23 AM, Justin Anderson 
>> wrote:
>>
>>> If you want to share things like preferences between the different apps
>>> then you will want to make sure that you also give them the same
>>> sharedUserId attribute in the manifest:
>>>
>>> http://developer.android.com/**guide/topics/manifest/**
>>> manifest-element.html#uid
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaw

Re: [android-developers] Does the file Manifest.java in Android source codes contain all the list of permissions?

2012-03-20 Thread Dianne Hackborn
No.

On Tue, Mar 20, 2012 at 12:00 PM, michael  wrote:

> Could I say that the Manifest.java file contains all the permissions
> for one version of  Android?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

Re: [android-developers] Re: Progress bar and get info

2012-03-20 Thread Lew
Sumit wrote:
> Lew wrote:

> Sumit wrote:
>>>
>>> Hey, I am trying to connect my Pc and android using TCP/IP socket 
>>> programming 
>>> by making android as server side android my pc java code as client side.
>>> by at my server side there is a problem i.e, if freezez at line
>>>
>>>  socket=serverSocket.accept();
>>>
>>> can some on tell me the solution , or other way to do it.
>>>
>>
>> You have asked this question two other times. You have been answered. It 
>> is heinous that you would hijack an unrelated thread to ask it a third 
>> time. Do not be that rude, Sumit.
>>
>> Go back and learn from the answers you already got. Stop being rude, 
>> please.
>>
>
>
Hey Lew i tryed every other way to do so but it still freezes, actually it 
> does not accepting request from java code.
>
>
Continue this on the thread you already started. Do not hijack an unrelated 
thread. Did you not understand this from my post? This thread is for 
discussion of progress bars. Stop it, Sumit. Stop it.

Show some courtesy, please. That question was answered in another post you 
posted. Go back to that thread. Stop posting unrelated stuff in this 
thread. Please.

-- 
Lew

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

2012-03-20 Thread Justin Anderson
>
> I need help
>
Yes you do... This is the fourth time you have asked this question and you
have gotten answers.

No one is going to give you the code.  You are going to have to use that
thing on top of your neck called a head and do some thinking...  You have
asked this before and gotten answers... Now go do some work.

i am trying to send image from my java code on Pc to my android code, but
> does not workssince android does not support javax.imageio.*; package tell
> me the other way to do it.
>

STOP HIJACKING THREADS TO ASK YOUR OWN QUESTIONS!!! THIS IS THE SECOND TIME
YOU HAVE DONE THIS. IT IS RUDE AND INCONSIDERATE.


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


On Tue, Mar 20, 2012 at 3:05 PM, Sumit Tiwari <92450su...@gmail.com> wrote:

> Hey , It Free the native object associated with this bitmap, and clear the
> reference to the pixel data.
>
> I need help ,
>   i am trying to send image from my java code on Pc to my android code,
> but does not works
> since android does not support javax.imageio.*; package tell me the other
> way to do it.
>
>
> On Tue, Mar 20, 2012 at 8:28 PM, bob  wrote:
>
>> I'm looking at some of the samples in apidemos, and I saw this:
>>
>> Bitmap bitmap;
>>
>> try {
>>
>> bitmap = BitmapFactory.decodeStream(is);
>>
>> } finally {
>>
>> try {
>>
>>  is.close();
>>
>> } catch (IOException e) {
>>
>>  // Ignore.
>>
>> }
>>
>> }
>>
>> GLUtils.texImage2D(GL_TEXTURE_2D, 0, bitmap, 0);
>> bitmap.recycle();
>>
>>
>> Anyone know why they are calling bitmap.recycle()?  Is that really
>> necessary?  Isn't the garbage collection automatic?
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: Progress bar and get info

2012-03-20 Thread Sumit Tiwari
Hey Lew i tryed every other way to do so but it still freezes, actually it
does not accepting request from java code.

On Wed, Mar 21, 2012 at 2:30 AM, Lew  wrote:

> Sumit wrote:
>>
>> Hey, I am trying to connect my Pc and android using TCP/IP socket
>> programming
>> by making android as server side android my pc java code as client side.
>> by at my server side there is a problem i.e, if freezez at line
>>
>>  socket=serverSocket.accept();
>>
>> can some on tell me the solution , or other way to do it.
>>
>
> You have asked this question two other times. You have been answered. It
> is heinous that you would hijack an unrelated thread to ask it a third
> time. Do not be that rude, Sumit.
>
> Go back and learn from the answers you already got. Stop being rude,
> please.
>
> --
> Lew
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] bitmap.recycle()?

2012-03-20 Thread Sumit Tiwari
Hey , It Free the native object associated with this bitmap, and clear the
reference to the pixel data.

I need help ,
  i am trying to send image from my java code on Pc to my android code, but
does not works
since android does not support javax.imageio.*; package tell me the other
way to do it.

On Tue, Mar 20, 2012 at 8:28 PM, bob  wrote:

> I'm looking at some of the samples in apidemos, and I saw this:
>
> Bitmap bitmap;
>
> try {
>
> bitmap = BitmapFactory.decodeStream(is);
>
> } finally {
>
> try {
>
>  is.close();
>
> } catch (IOException e) {
>
>  // Ignore.
>
> }
>
> }
>
> GLUtils.texImage2D(GL_TEXTURE_2D, 0, bitmap, 0);
> bitmap.recycle();
>
>
> Anyone know why they are calling bitmap.recycle()?  Is that really
> necessary?  Isn't the garbage collection automatic?
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: Progress bar and get info

2012-03-20 Thread Lew
Sumit wrote:
>
> Hey, I am trying to connect my Pc and android using TCP/IP socket 
> programming 
> by making android as server side android my pc java code as client side.
> by at my server side there is a problem i.e, if freezez at line
>
>  socket=serverSocket.accept();
>
> can some on tell me the solution , or other way to do it.
>

You have asked this question two other times. You have been answered. It is 
heinous that you would hijack an unrelated thread to ask it a third time. 
Do not be that rude, Sumit.

Go back and learn from the answers you already got. Stop being rude, please.

-- 
Lew

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

Re: [android-developers] Re: Progress bar and get info

2012-03-20 Thread Justin Anderson
>
> Hey, I am trying to connect my Pc and android using TCP/IP socket
> programming
> by making android as server side android my pc java code as client side.
> by at my server side there is a problem i.e, if freezez at line
>
>  socket=serverSocket.accept();
>
> can some on tell me the solution , or other way to do it.
>

Please don't hijack this thread to ask a different question... Start your
own thread and ask your question again.

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


On Tue, Mar 20, 2012 at 2:56 PM, Sumit Tiwari <92450su...@gmail.com> wrote:

> Hey, I am trying to connect my Pc and android using TCP/IP socket
> programming
> by making android as server side android my pc java code as client side.
> by at my server side there is a problem i.e, if freezez at line
>
>  socket=serverSocket.accept();
>
> can some on tell me the solution , or other way to do it.
>
>
> On Wed, Mar 21, 2012 at 1:28 AM, Justin Anderson wrote:
>
>> Thanks but no this doesn't help me
>>>
>>
>> How does it not?  You have the documentation for the ProgressBar view,
>> and another link that gives you lots of tutorials about how to
>> programmatically get CPU usage info...  You shouldn't need any more than
>> that.
>>
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>>
>> On Tue, Mar 20, 2012 at 1:27 PM, oneking  wrote:
>>
>>> Thanks but no this doesn't help me
>>>
>>> On Mar 20, 4:31 pm, Justin Anderson  wrote:
>>> > > How to make a progress bar that tells me cpu usage or memory ram?
>>> >
>>> >
>>> http://developer.android.com/reference/android/widget/ProgressBar.htmlhttp://lmgtfy.com/?q=android+sdk+cpu+usage
>>> >
>>> > Thanks,
>>> > Justin Anderson
>>> > MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Tue, Mar 20, 2012 at 9:24 AM, oneking 
>>> wrote:
>>> > > How to make a progress bar that tells me cpu usage or memory ram?
>>> > > This is a example:
>>> > >
>>> http://www.androidwidget.info/wp-content/uploads/2011/05/Elixir-Sampl...
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> > > Groups "Android Developers" group.
>>> > > To post to this group, send email to
>>> android-developers@googlegroups.com
>>> > > To unsubscribe from this group, send email to
>>> > > android-developers+unsubscr...@googlegroups.com
>>> > > For more options, visit this group at
>>> > >http://groups.google.com/group/android-developers?hl=en
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: Progress bar and get info

2012-03-20 Thread Sumit Tiwari
Hey, I am trying to connect my Pc and android using TCP/IP socket
programming
by making android as server side android my pc java code as client side.
by at my server side there is a problem i.e, if freezez at line

 socket=serverSocket.accept();

can some on tell me the solution , or other way to do it.


On Wed, Mar 21, 2012 at 1:28 AM, Justin Anderson wrote:

> Thanks but no this doesn't help me
>>
>
> How does it not?  You have the documentation for the ProgressBar view, and
> another link that gives you lots of tutorials about how to programmatically
> get CPU usage info...  You shouldn't need any more than that.
>
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
>
> On Tue, Mar 20, 2012 at 1:27 PM, oneking  wrote:
>
>> Thanks but no this doesn't help me
>>
>> On Mar 20, 4:31 pm, Justin Anderson  wrote:
>> > > How to make a progress bar that tells me cpu usage or memory ram?
>> >
>> >
>> http://developer.android.com/reference/android/widget/ProgressBar.htmlhttp://lmgtfy.com/?q=android+sdk+cpu+usage
>> >
>> > Thanks,
>> > Justin Anderson
>> > MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Tue, Mar 20, 2012 at 9:24 AM, oneking  wrote:
>> > > How to make a progress bar that tells me cpu usage or memory ram?
>> > > This is a example:
>> > >http://www.androidwidget.info/wp-content/uploads/2011/05/Elixir-Sampl.
>> ..
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Android Developers" group.
>> > > To post to this group, send email to
>> android-developers@googlegroups.com
>> > > To unsubscribe from this group, send email to
>> > > android-developers+unsubscr...@googlegroups.com
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: Progress bar and get info

2012-03-20 Thread Justin Anderson
>
> Thanks but no this doesn't help me
>

How does it not?  You have the documentation for the ProgressBar view, and
another link that gives you lots of tutorials about how to programmatically
get CPU usage info...  You shouldn't need any more than that.

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


On Tue, Mar 20, 2012 at 1:27 PM, oneking  wrote:

> Thanks but no this doesn't help me
>
> On Mar 20, 4:31 pm, Justin Anderson  wrote:
> > > How to make a progress bar that tells me cpu usage or memory ram?
> >
> >
> http://developer.android.com/reference/android/widget/ProgressBar.htmlhttp://lmgtfy.com/?q=android+sdk+cpu+usage
> >
> > Thanks,
> > Justin Anderson
> > MagouyaWare Developerhttp://sites.google.com/site/magouyaware
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Mar 20, 2012 at 9:24 AM, oneking  wrote:
> > > How to make a progress bar that tells me cpu usage or memory ram?
> > > This is a example:
> > >http://www.androidwidget.info/wp-content/uploads/2011/05/Elixir-Sampl.
> ..
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Progress bar and get info

2012-03-20 Thread oneking
Thanks but no this doesn't help me

On Mar 20, 4:31 pm, Justin Anderson  wrote:
> > How to make a progress bar that tells me cpu usage or memory ram?
>
> http://developer.android.com/reference/android/widget/ProgressBar.htmlhttp://lmgtfy.com/?q=android+sdk+cpu+usage
>
> Thanks,
> Justin Anderson
> MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
>
>
>
>
>
>
> On Tue, Mar 20, 2012 at 9:24 AM, oneking  wrote:
> > How to make a progress bar that tells me cpu usage or memory ram?
> > This is a example:
> >http://www.androidwidget.info/wp-content/uploads/2011/05/Elixir-Sampl...
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] need for speed class

2012-03-20 Thread bob
 

Is there any way to determine what the speed class is of an SD Card on an 
Android device?  (i.e. 600x read speed)


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

[android-developers] Does the file Manifest.java in Android source codes contain all the list of permissions?

2012-03-20 Thread michael
Could I say that the Manifest.java file contains all the permissions
for one version of  Android?

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


Re: [android-developers] OnTouchListener with multiple views problem

2012-03-20 Thread Bill Lahti
I have worked with some code that was in the API 8 Android Launcher. I have 
found that it is a pretty good framework for drag-drop.
For more about the sample apps I built, see my answer on StackOverflow: 
http://stackoverflow.com/questions/9661536/dragging-and-dropping-a-button-from-one-linear-layout-to-another-linear-layout/9683018

Bill

On Tuesday, March 20, 2012 2:28:00 PM UTC-4, metro wrote:
>
> Hi
> I've seen it all... :)
> They are all talking about drag&drop functionality implemented since 
> Honeycomb 
> (Api level 11) 
> Any other example please? 
> Thanks!
>
>
> On Tuesday, March 20, 2012 6:43:02 PM UTC+2, MagouyaWare wrote:
>>
>> http://lmgtfy.com/?q=android+drag+and+drop+view+example
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>> On Tue, Mar 20, 2012 at 10:39 AM, metro  wrote:
>>
>>> hi
>>> thanks for your answer.
>>> I've tried this, but I found my problem (still isn't solved).
>>> I have multiple imageviews over a framelayout (also tried with 
>>> relativelayout)
>>> their place over the screen is determined by Padding (dynamically) so 
>>> the last Imageview added has the biggest "z-index"
>>>
>>> The problem is, I can't choose the "smaller" z-index views because the 
>>> last one is "over" them.
>>>
>>> I believe this is not the drag&drop best practice.
>>>
>>> Do you have some kind of example to give me?
>>>
>>> Thanks !
>>>
>>> On Monday, March 19, 2012 8:32:49 PM UTC+2, MagouyaWare wrote:

 firstView.setOnTouchListener(**null)?

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


 On Sat, Mar 17, 2012 at 2:39 PM, metro  wrote:

> Hi,
> I have a problem I can't solve.
> I've dynamically  configured multiple views with the same
> OnTouchListener
> After I finish moving one view (ACTION_UP and return false), and
> trying to touch and move other view, the OnTouch method is called with
> the same first view as parameter, and that view is "jumping" to where
> my finger is
> How can I tell android I've finished with this view when the ACTION_UP
> is called?
>
> 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


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

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

Re: [android-developers] OnTouchListener with multiple views problem

2012-03-20 Thread metro
Hi
I've seen it all... :)
They are all talking about drag&drop functionality implemented since Honeycomb 
(Api level 11) 
Any other example please? 
Thanks!


On Tuesday, March 20, 2012 6:43:02 PM UTC+2, MagouyaWare wrote:
>
> http://lmgtfy.com/?q=android+drag+and+drop+view+example
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Tue, Mar 20, 2012 at 10:39 AM, metro  wrote:
>
>> hi
>> thanks for your answer.
>> I've tried this, but I found my problem (still isn't solved).
>> I have multiple imageviews over a framelayout (also tried with 
>> relativelayout)
>> their place over the screen is determined by Padding (dynamically) so the 
>> last Imageview added has the biggest "z-index"
>>
>> The problem is, I can't choose the "smaller" z-index views because the 
>> last one is "over" them.
>>
>> I believe this is not the drag&drop best practice.
>>
>> Do you have some kind of example to give me?
>>
>> Thanks !
>>
>> On Monday, March 19, 2012 8:32:49 PM UTC+2, MagouyaWare wrote:
>>>
>>> firstView.setOnTouchListener(**null)?
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware
>>>
>>>
>>> On Sat, Mar 17, 2012 at 2:39 PM, metro  wrote:
>>>
 Hi,
 I have a problem I can't solve.
 I've dynamically  configured multiple views with the same
 OnTouchListener
 After I finish moving one view (ACTION_UP and return false), and
 trying to touch and move other view, the OnTouch method is called with
 the same first view as parameter, and that view is "jumping" to where
 my finger is
 How can I tell android I've finished with this view when the ACTION_UP
 is called?

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

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

Re: [android-developers] Re: Email-dependent app

2012-03-20 Thread Kristopher Micinski
That's right.  The only way to extend functionality is to actually
write your own app, there's no way in existing apps to extend them...
(Unless they provide specific broadcasts, intents, etc... that you can
use, but this rarely happens, and it's almost never enough to actually
provide extra functionality for the app..)

On Tue, Mar 20, 2012 at 1:51 PM, johnlugh  wrote:
> Thanks very much for the advice. So I would have to write my own
> separate email application if I wanted to have any kind of customised
> 'extended' features like I want? It seems like I'm biting off more
> than i can chew so to speak...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Casting string as a class (ie. RadioButton)

2012-03-20 Thread Bozzified

>
> Many thanks everyone.. Some good suggestions.
>

I mean I am getting how most things work in Android and have made great 
progress in making my own app that's fairly complex but I am still lacking 
experience in how to do some things because number of android classes are 
massive and it only comes with experience and usage.

You've given me some good pointers where to look to achieve what I need.

@Lee

I know exactly what you mean. I guess i have to straighten my mindset a bit 
in how Android treats and deals with view objects and how to target them as 
it is different from what I'm used to.

It's all coming into place though. 

I will definitely ask if I stumble up more. I am really happy this group is 
so active to help me learn better by suggestions.

Again thanks to everyone who replied.

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

Re: [android-developers] Re: Email-dependent app

2012-03-20 Thread TreKing
On Tue, Mar 20, 2012 at 12:51 PM, johnlugh  wrote:

> So I would have to write my own separate email application if I wanted to
> have any kind of customised 'extended' features like I want?
>

Basically. Then there's the minor task of getting people to use it to get
actually relevant stats.

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

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

Re: [android-developers] app freezes and get stucks

2012-03-20 Thread James Black
There are many areas to look.

Start with writing all exceptions to the log and perhaps before and after
loading images.

Then, when it locks up, get the log and see where it was when it died.

You may want to log going into onPause also.
On Mar 20, 2012 1:04 AM, "vishnu raj"  wrote:

> my app is an lock screen and during the lock activity i used to load
> images from the website as slide show. The images will continue to
> show like an loop and each time the image is downloaded from the net
> to display on the image view .
>
> now, after 20 or 25 minutes the app gets stuck and we cannot unlock
> the screen and cannot do anything.
>
> is there any problem in loading images in image view  continuously
> from the net .
> or is there any cache like feature that we can clear.
>
> my application loads on screen off intent
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-03-20 Thread johnlugh
Thanks very much for the advice. So I would have to write my own
separate email application if I wanted to have any kind of customised
'extended' features like I want? It seems like I'm biting off more
than i can chew so to speak...

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

2012-03-20 Thread Kristopher Micinski
This isn't really a question that's formatted for this list.

This list is for discussing implementation issues relating to apps.

The answer is yes, you can, at least in some sense.  It depends what
you mean by "chat," you could mean it temporally, in terms of how you
display things, etc... This isn't clear from your question.

So basically, the answer is yes, you can do this, but if you have no
idea where to start, we're not really in a position to help you.

kris

On Tue, Mar 20, 2012 at 1:38 PM, Monerah AlOsaimi
 wrote:
> Hello there,
>
> How can i make an application that allows users to send and receive sms and
> this messages will be appear as chatting bw the users (like whatsapp)..?
>
> I hv created an application that send and receive but couldnt mk these msgs
> as chatting?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] SMS as techinque for chatting

2012-03-20 Thread Monerah AlOsaimi
Hello there,

How can i make an application that allows users to send and receive sms and
this messages will be appear as chatting bw the users (like whatsapp)..?

I hv created an application that send and receive but couldnt mk these msgs
as chatting?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Casting string as a class (ie. RadioButton)

2012-03-20 Thread Justin Anderson
>
> All this is fine but OP needs to take a step back and ask himself why he
> needs to use a string as an identifier? In Android, numeric resource ids
> serve the same purpose and are already defined for you by the resource
> compiler.
>

Agreed... What I would do is create a member variable for each
RadioButton.  Then show/hide and check/uncheck them as needed based on the
user events.  That is what I was trying to get at with my first response.

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


On Tue, Mar 20, 2012 at 11:27 AM, Nadeem Hasan  wrote:

> All this is fine but OP needs to take a step back and ask himself why he
> needs to use a string as an identifier? In Android, numeric resource ids
> serve the same purpose and are already defined for you by the resource
> compiler.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Is there way of using NFC without Secure Element?

2012-03-20 Thread Cadu Silvestre
Jeff,

It really depends on what you wanna do.

Do you want to read/write some standard NFC tags? Great, you don't need a 
secure element.

Do you want to do anything related to Digital Certification or Electronic 
Payments? You probably need a secure element.

On Monday, March 19, 2012 10:19:53 PM UTC-3, Jeff Wang wrote:
>
> I am a NFC starter, and just want to know what is the role of Secure 
> Element in NFC development for Android, and is there any other way of 
> using NFC but without Secure Element? Thanks.

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

Re: [android-developers] Re: implementing fade-in/fade-out effects in Java with frame-based animation

2012-03-20 Thread Justin Anderson
>
> Thanks for the response but the animation is a set of bitmaps that I
> show, it can't be done with the Android shapes.
>
Animations don't have to be done on Android Shapes... They can be done on
any view, like an ImageView.  Is your set of bitmaps different in any way
other than the rotation?  If the only difference in the frames is the
rotation then you can use the approach I described.

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


On Tue, Mar 20, 2012 at 11:23 AM, Serdel wrote:

> Thanks for the response but the animation is a set of bitmaps that I
> show, it can't be done with the Android shapes. So I need this
> approach. However I was thinking if I can find a way to use the alfa
> approach in my need. Or anything that would bring a similar fade-in/
> out effect Is it possible?
>
> On 20 Mar, 17:36, Justin Anderson  wrote:
> > Is there any particular reason you are using a frame-based animation?  I
> > haven't done any frame-based animations, but I know you could accomplish
> > the same (or very similar) thing using an AnimationSet defined in XML.
> >
> > You could then specify a rotation to the image as well as a fade in/out
> > with alpha...
> >
> > As a simple example, this could go in res/anim and be called something
> like
> > spin_fade_in.xml:
> >
> > 
> > http://schemas.android.com/apk/res/android";>
> >  > adroid:fromAlpha="0.0"
> > android:toAlpha="1.0"
> > android:duration="500"
> > android:startOffset="0"
> >
> > />
> >
> >  > android:toXScale=".85"android:fromYScale="1"
> > android:toYScale=".85" android:duration="100"
> > android:startOffset="0"android:pivotX="50%"
> > android:pivotY="50%"/> > android:fromDegrees="0" android:toDegrees="360"
> > android:pivotX="50%" android:pivotY="50%"
> > android:duration="500"android:startOffset="0"/>
> >  >  android:fromYScale=".85" android:toYScale="1"
> > android:duration="100" android:startOffset="400"
> > android:pivotX="50%"android:pivotY="50%"/>
> > 
> >
> > Thanks,
> > Justin Anderson
> > MagouyaWare Developerhttp://sites.google.com/site/magouyaware
> >
> > On Tue, Mar 20, 2012 at 10:24 AM, Serdel  >wrote:
> >
> > > Hi,
> >
> > > I am running an animation of a spinning star and I would like to add
> > > some fade-in/fade-out effects. I am loading the animation in Java by
> > > making the AnimationDrawable objects, and adding the bitmaps as frames
> > > and then setting it to an ImageView using setBackgroundDrawable. I
> > > there a way I can add fade-in fade-out effects to this animation? I
> > > couldn't find any help on that subjects so far.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Testing AndroidTestCase as well as ActivityInstrumentationTestCase2

2012-03-20 Thread Weston Weems
So I've built a test suite that automatically grabs all testcases and runs 
them.

The first chunk of tests I wrote were for AndroidTestCase, and just tested 
simple algorithms and shared functionality (non ui, Activity in-specific).

I came along and built a ActivityInstrumentationTestCase2, that happens to 
test the first activity of the app.

When run alone, all my AndroidTestCase tests run just fine, and likewise 
when running my ActivityInstrumentationTestCase, they run as expected. When 
I run all tests for the test project, it appears as if testrunner hangs 
trying to run my activityinstrumentaiton test cases. (APPEARS to be in the 
call to getActivity() in setUp()).

This as you might guess is terribly inconvenient. I was wondering if anyone 
has encountered it, and if so, any solutions out there?

I saw a post here about making sure to .finish() the activity in 
tearDown(), but as I only have one activity instrumentation test case, the 
.finish() didnt appear to have any effect on it whatsoever. Because 
getActivity() is called in setUp(), setting timeouts etc for the test 
themselves dont really seem to do much of anything.


Any advice would be greatly appreciated. 

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

Re: [android-developers] Casting string as a class (ie. RadioButton)

2012-03-20 Thread Nadeem Hasan
All this is fine but OP needs to take a step back and ask himself why he 
needs to use a string as an identifier? In Android, numeric resource ids 
serve the same purpose and are already defined for you by the resource 
compiler.

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

2012-03-20 Thread Kristopher Micinski
On Mon, Mar 19, 2012 at 9:45 AM, johnlugh  wrote:
> I'm trying to design an app which monitors how often users check their
> email inboxes and also which has behaviour which depends on the rate
> of these checks-  i.e. punishing for overfrequent checks.
>
> As I'm new to Android programming, I'm not quite sure if this is
> possible as it would need to be dependent on another process which I'm
> not in control of (the default Email process/application that is used
> in Android). As far as I know, the email service runs in the
> background but when you check your inbox/open the application it runs
> in the foreground.
>
> Can you have behaviour dependent on a foreground process like this? Is
> there another way of doing this?
>
> Thanks.

No, this is a frequently asked question, but basically, you can't
"extend" apps you didn't write with arbitrary functionality like this.

kris

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


[android-developers] Re: implementing fade-in/fade-out effects in Java with frame-based animation

2012-03-20 Thread Serdel
Thanks for the response but the animation is a set of bitmaps that I
show, it can't be done with the Android shapes. So I need this
approach. However I was thinking if I can find a way to use the alfa
approach in my need. Or anything that would bring a similar fade-in/
out effect Is it possible?

On 20 Mar, 17:36, Justin Anderson  wrote:
> Is there any particular reason you are using a frame-based animation?  I
> haven't done any frame-based animations, but I know you could accomplish
> the same (or very similar) thing using an AnimationSet defined in XML.
>
> You could then specify a rotation to the image as well as a fade in/out
> with alpha...
>
> As a simple example, this could go in res/anim and be called something like
> spin_fade_in.xml:
>
> 
> http://schemas.android.com/apk/res/android";>
>              adroid:fromAlpha="0.0"
>         android:toAlpha="1.0"
>         android:duration="500"
>         android:startOffset="0"
>
>     />
>
>      android:toXScale=".85"        android:fromYScale="1"
> android:toYScale=".85"         android:duration="100"
> android:startOffset="0"        android:pivotX="50%"
> android:pivotY="50%"    />         android:fromDegrees="0"         android:toDegrees="360"
> android:pivotX="50%"         android:pivotY="50%"
> android:duration="500"        android:startOffset="0"    />
>       android:fromYScale=".85"         android:toYScale="1"
> android:duration="100"         android:startOffset="400"
> android:pivotX="50%"        android:pivotY="50%"    />
> 
>
> Thanks,
> Justin Anderson
> MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
> On Tue, Mar 20, 2012 at 10:24 AM, Serdel wrote:
>
> > Hi,
>
> > I am running an animation of a spinning star and I would like to add
> > some fade-in/fade-out effects. I am loading the animation in Java by
> > making the AnimationDrawable objects, and adding the bitmaps as frames
> > and then setting it to an ImageView using setBackgroundDrawable. I
> > there a way I can add fade-in fade-out effects to this animation? I
> > couldn't find any help on that subjects so far.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
>

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


Re: [android-developers] Casting string as a class (ie. RadioButton)

2012-03-20 Thread Lew


On Tuesday, March 20, 2012 9:25:54 AM UTC-7, Kostya Vasilyev wrote:
>
> Well, you can use this to go from identifier-as-a-string to
> identifier-as-a-number:
>
>
> http://developer.android.com/reference/android/content/res/Resources.html#getIdentifier(java.lang.String
> ,
> java.lang.String, java.lang.String)
>
> Another option is to specify tags for your buttons with
> android:tag="blahblahblah" in the XML, and then use
> View.findViewWithTag:
>
>
> http://developer.android.com/reference/android/view/View.html#findViewWithTag(java.lang.Object)
>
> I understand that neither option is very fast, so use carefully (cache
> the results in a more directly accessible data structure).
>

One such structure is a 'java.util.Map'.

-- 
Lew
 

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

2012-03-20 Thread TreKing
On Tue, Mar 20, 2012 at 12:00 PM, Susan Crayne wrote:

> What am I missing here?
>

You're on the wrong list. Looks like you want the GTFS group.

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

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

Re: [android-developers] Email-dependent app

2012-03-20 Thread TreKing
On Mon, Mar 19, 2012 at 8:45 AM, johnlugh  wrote:

> Can you have behaviour dependent on a foreground process like this?
>

Not really.


>  Is there another way of doing this?
>

Not really. You're running on the assumption that the user would be using
the default email client. Such a thing may not exist, or be used, as the
user can install any Email client they want.

Regardless of that, being able to detect that a user is opening an email
client, and specifically viewing their Inbox, would be quite a specific
action to detect and considered to be a pretty serious security flaw, I
think. This should not be possible under normal circumstances.

-
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] Is today a holiday?

2012-03-20 Thread Susan Crayne
In the calendar_dates.txt file that I have (from March 16), this line
appears:  1,20120320,2 (for service id, date, and exception type).
This line says to me that all trains with service id 1, that run
today, should be removed from the list of trains that run today. What
am I missing here?

Susan

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

2012-03-20 Thread TreKing
On Mon, Mar 19, 2012 at 2:10 AM, S_J_S_24  wrote:

> But the problem is WebView always opens in full screen mode...
>


> WebView webview_for_twitter = new WebView(this);
> setContentView(webview_for_twitter);
>

You define a main.xml and don't use it, then you set a WebView solely as
the content view. I think you need to run the docs and samples - this is
Android 101 stuff here.

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

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

Re: [android-developers] OnTouchListener with multiple views problem

2012-03-20 Thread Justin Anderson
http://lmgtfy.com/?q=android+drag+and+drop+view+example

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


On Tue, Mar 20, 2012 at 10:39 AM, metro  wrote:

> hi
> thanks for your answer.
> I've tried this, but I found my problem (still isn't solved).
> I have multiple imageviews over a framelayout (also tried with
> relativelayout)
> their place over the screen is determined by Padding (dynamically) so the
> last Imageview added has the biggest "z-index"
>
> The problem is, I can't choose the "smaller" z-index views because the
> last one is "over" them.
>
> I believe this is not the drag&drop best practice.
>
> Do you have some kind of example to give me?
>
> Thanks !
>
> On Monday, March 19, 2012 8:32:49 PM UTC+2, MagouyaWare wrote:
>>
>> firstView.setOnTouchListener(**null)?
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/**magouyaware
>>
>>
>> On Sat, Mar 17, 2012 at 2:39 PM, metro  wrote:
>>
>>> Hi,
>>> I have a problem I can't solve.
>>> I've dynamically  configured multiple views with the same
>>> OnTouchListener
>>> After I finish moving one view (ACTION_UP and return false), and
>>> trying to touch and move other view, the OnTouch method is called with
>>> the same first view as parameter, and that view is "jumping" to where
>>> my finger is
>>> How can I tell android I've finished with this view when the ACTION_UP
>>> is called?
>>>
>>> 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
>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] OnTouchListener with multiple views problem

2012-03-20 Thread metro
hi
thanks for your answer.
I've tried this, but I found my problem (still isn't solved).
I have multiple imageviews over a framelayout (also tried with 
relativelayout)
their place over the screen is determined by Padding (dynamically) so the 
last Imageview added has the biggest "z-index"

The problem is, I can't choose the "smaller" z-index views because the last 
one is "over" them.

I believe this is not the drag&drop best practice.

Do you have some kind of example to give me?

Thanks !

On Monday, March 19, 2012 8:32:49 PM UTC+2, MagouyaWare wrote:
>
> firstView.setOnTouchListener(null)?
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Sat, Mar 17, 2012 at 2:39 PM, metro  wrote:
>
>> Hi,
>> I have a problem I can't solve.
>> I've dynamically  configured multiple views with the same
>> OnTouchListener
>> After I finish moving one view (ACTION_UP and return false), and
>> trying to touch and move other view, the OnTouch method is called with
>> the same first view as parameter, and that view is "jumping" to where
>> my finger is
>> How can I tell android I've finished with this view when the ACTION_UP
>> is called?
>>
>> 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
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] implementing fade-in/fade-out effects in Java with frame-based animation

2012-03-20 Thread Justin Anderson
Is there any particular reason you are using a frame-based animation?  I
haven't done any frame-based animations, but I know you could accomplish
the same (or very similar) thing using an AnimationSet defined in XML.

You could then specify a rotation to the image as well as a fade in/out
with alpha...

As a simple example, this could go in res/anim and be called something like
spin_fade_in.xml:


http://schemas.android.com/apk/res/android";>







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


On Tue, Mar 20, 2012 at 10:24 AM, Serdel wrote:

> Hi,
>
> I am running an animation of a spinning star and I would like to add
> some fade-in/fade-out effects. I am loading the animation in Java by
> making the AnimationDrawable objects, and adding the bitmaps as frames
> and then setting it to an ImageView using setBackgroundDrawable. I
> there a way I can add fade-in fade-out effects to this animation? I
> couldn't find any help on that subjects so far.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Casting string as a class (ie. RadioButton)

2012-03-20 Thread Kostya Vasilyev
Well, you can use this to go from identifier-as-a-string to
identifier-as-a-number:

http://developer.android.com/reference/android/content/res/Resources.html#getIdentifier(java.lang.String,
java.lang.String, java.lang.String)

Another option is to specify tags for your buttons with
android:tag="blahblahblah" in the XML, and then use
View.findViewWithTag:

http://developer.android.com/reference/android/view/View.html#findViewWithTag(java.lang.Object)

I understand that neither option is very fast, so use carefully (cache
the results in a more directly accessible data structure).

-- Kostya

20 марта 2012 г. 20:08 пользователь Bozzified  написал:
> Oh, yeah I can do that. I can do manual check and target specifically radio
> buttons I need with switch.
>
> What I"m trying to do is target specific instances of RadioButton class in
> this case based on my XML input I got from CMS and the choices users set in
> it. For example what radio buttons will show and which ones wont'.
>
> I"m trying to make 1 simply method that will look like this:
>
> private void turnRadiosOnOff(int radioButtonID){
>    // and then I would target a specific radio button based on the ID passed
> into this method like this:
>    RadioButton radioInstance = getRadioChild("_radio"+id);
> }
>
> So in my layout I would have all radio buttons defined but code would hide
> them all with GONE and then I would just reveal the ones they selected in
> the XML file by using this one simple method above by passing a simple ID.
>
> Hope that make sense.
>
>
>
> On Tuesday, March 20, 2012 7:50:51 AM UTC-7, MagouyaWare wrote:
>>
>> Why can't you do something like this:
>>
>> public class A extends Activity
>> {
>>   private RadiotButton _radio1;
>>
>>   protected void onCreate(Bundle bundle)
>>   {
>>     setContentView(your.layout.id)
>>     _radio1 = findViewById(R.id.RadioButton01);
>>   }
>>
>>   public void doSomethingLater()
>>   {
>>    //Do something here with the radio button...
>>     _radio1.setChecked(true);
>>   }
>> }
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>> On Mon, Mar 19, 2012 at 8:19 PM, Bozzified  wrote:
>>>
>>> Sorry if it's a rudimentary question about Java as I'm coming from AS3
>>> and just basically starting out. Though I understand many concepts so far
>>> and am writing my first app I'm trying to find best practices in some cases.
>>>
>>> My question is the following.
>>>
>>> In AS3, I could I address an instance of a class with the string.
>>>
>>> So in AS3, I could do this:
>>>
>>> var myMC = new MovieClip();
>>>
>>> myMC.name = "somename";
>>>
>>>
>>> now in my other code I can do this
>>>
>>> var tmpInstance = this.getChildByName("somename");
>>>
>>>
>>>
>>> Is there an equivalent like this in Java/Android dev?
>>>
>>> So for a super simple example.. I'm writing a code now that looks like
>>> this:
>>>
>>> RadioButton myRadioBttn1 = findViewById(R.id.RadioButton01);
>>> RadioButton myRadioBttn2 = findViewById(R.id.RadioButton01);
>>>
>>>
>>> but later in the or in my custom methods I want to do something like
>>> this:
>>>
>>> RadioButton myRadioBttn1_instance = this.getRadioButton("myRadioBttn1");
>>>
>>> where i"m really just coming out with my own syntax here to get my point
>>> across. So I am trying to address a specific instance of the class I defined
>>> earlier in the code by passing a specific string so I can do something
>>> dynamically in the code.
>>>
>>> I am sure I'm looking at this completely the wrong way as it is not done
>>> like that (I'm sure that it's a bad practices because in my example I'm
>>> creating a new instance rather than working on the existing one) but I'm not
>>> sure how to do this dynamically.
>>>
>>> Thanks.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] implementing fade-in/fade-out effects in Java with frame-based animation

2012-03-20 Thread Serdel
Hi,

I am running an animation of a spinning star and I would like to add
some fade-in/fade-out effects. I am loading the animation in Java by
making the AnimationDrawable objects, and adding the bitmaps as frames
and then setting it to an ImageView using setBackgroundDrawable. I
there a way I can add fade-in fade-out effects to this animation? I
couldn't find any help on that subjects so far.

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

2012-03-20 Thread TreKing
On Tue, Mar 20, 2012 at 10:06 AM, RedBullet wrote:

> When I moved this code to my Service class it was no longer able to
> resolve that path...
> Stumped... But must be missing something fundamental.
>

Check your imports. Beyond that, give an actual error message or some more
detail. Your post lacks substance.

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

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

Re: [android-developers] Casting string as a class (ie. RadioButton)

2012-03-20 Thread Nadeem Hasan
In your base Activity class, add this:

protected RadioButton findRadioButtonById( int id ) {
return (RadioButton) findViewById( id );
}

This could of course throw an exception if the id does not represent a 
RadioButton.

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

2012-03-20 Thread Robert Greenwalt
You're initiating the traffic on the device but not receiving responses?
 Or are you trying to run a server socket on the device but
off-device originating traffic can't seem to connect?

I don't think there is any firewall on the device, though I wouldn't be
surprised if carriers needed to do some NAT to conserve ipv4 addresses.
 Are you using mobile data or wifi?

R

On Tue, Mar 20, 2012 at 2:09 AM, praveen  wrote:

> Hi,
> I want to know whether any default firewall is there in android(2.3)
> like iptables in Linux, if so is it possible to disable it through my
> application without rooting.
> my application involves sending and receiving packets in a network.
> but am not getting any reply. but the same works perfectly in
> emulator(2.2)
> through the system. but no reply is getting if i load the same apk in
> my android device.
>
> is there any way i can overcome this difficulty?
>
> Thanks in advance
> Praveen.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Casting string as a class (ie. RadioButton)

2012-03-20 Thread Bozzified
Oh, yeah I can do that. I can do manual check and target specifically radio 
buttons I need with switch.

What I"m trying to do is target specific instances of RadioButton class in 
this case based on my XML input I got from CMS and the choices users set in 
it. For example what radio buttons will show and which ones wont'.

I"m trying to make 1 simply method that will look like this:

private void turnRadiosOnOff(int radioButtonID){
   // and then I would target a specific radio button based on the ID 
passed into this method like this:
   RadioButton radioInstance = getRadioChild("_radio"+id);
}

So in my layout I would have all radio buttons defined but code would hide 
them all with GONE and then I would just reveal the ones they selected in 
the XML file by using this one simple method above by passing a simple ID.

Hope that make sense.



On Tuesday, March 20, 2012 7:50:51 AM UTC-7, MagouyaWare wrote:
>
> Why can't you do something like this:
>
> public class A extends Activity
> {
>   private RadiotButton _radio1;
>
>   protected void onCreate(Bundle bundle)
>   {
> setContentView(your.layout.id)
> _radio1 = findViewById(R.id.RadioButton01);
>   }
>
>   public void doSomethingLater()
>   {
>//Do something here with the radio button...
> _radio1.setChecked(true);
>   }
> }
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Mon, Mar 19, 2012 at 8:19 PM, Bozzified  wrote:
>
>> Sorry if it's a rudimentary question about Java as I'm coming from AS3 
>> and just basically starting out. Though I understand many concepts so far 
>> and am writing my first app I'm trying to find best practices in some cases.
>>
>> My question is the following.
>>
>> In AS3, I could I address an instance of a class with the string.
>>
>> So in AS3, I could do this:
>>
>> var myMC = new MovieClip();
>>
>> myMC.name = "somename";
>>
>>
>> now in my other code I can do this   
>>
>> var tmpInstance = this.getChildByName("somename");
>>
>>
>>
>> Is there an equivalent like this in Java/Android dev?
>>
>> So for a super simple example.. I'm writing a code now that looks like 
>> this:
>>
>> RadioButton myRadioBttn1 = findViewById(R.id.RadioButton01);
>> RadioButton myRadioBttn2 = findViewById(R.id.RadioButton01);
>>
>>
>> but later in the or in my custom methods I want to do something like this:
>>
>> RadioButton myRadioBttn1_instance = this.getRadioButton("myRadioBttn1");
>>
>> where i"m really just coming out with my own syntax here to get my point 
>> across. So I am trying to address a specific instance of the class I 
>> defined earlier in the code by passing a specific string so I can do 
>> something dynamically in the code.
>>
>> I am sure I'm looking at this completely the wrong way as it is not done 
>> like that (I'm sure that it's a bad practices because in my example I'm 
>> creating a new instance rather than working on the existing one) but I'm 
>> not sure how to do this dynamically.
>>
>> Thanks.
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

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

Re: [android-developers] Progress bar and get info

2012-03-20 Thread Justin Anderson
>
> How to make a progress bar that tells me cpu usage or memory ram?
>

http://developer.android.com/reference/android/widget/ProgressBar.html
http://lmgtfy.com/?q=android+sdk+cpu+usage

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


On Tue, Mar 20, 2012 at 9:24 AM, oneking  wrote:

> How to make a progress bar that tells me cpu usage or memory ram?
> This is a example:
> http://www.androidwidget.info/wp-content/uploads/2011/05/Elixir-Sample.png
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] bitmap.recycle()?

2012-03-20 Thread TreKing
On Tue, Mar 20, 2012 at 9:58 AM, bob  wrote:

> Anyone know why they are calling bitmap.recycle()?  Is that really
> necessary?  Isn't the garbage collection automatic?


Here, do some homework first:
http://lmgtfy.com/?q=Bitmap.recycle

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

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

Re: [android-developers] Small issue with SimpleXML. Why i'm getting this exception?

2012-03-20 Thread TreKing
On Tue, Mar 20, 2012 at 8:05 AM, saex  wrote:

> I'm getting this exception when i'm parsing with Simple XML:


You should consult the documentation for this "Simple XML" thing you're
using - this is not Android specific.

-
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] Progress bar and get info

2012-03-20 Thread oneking
How to make a progress bar that tells me cpu usage or memory ram?
This is a example:
http://www.androidwidget.info/wp-content/uploads/2011/05/Elixir-Sample.png

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

2012-03-20 Thread extrapedestrian
Im trying to play any kind of video on 4.0 emulator, but I always get error:

W/GraphicBufferAllocator(   36): alloc(352, 288, 842094169, 2930, ...) 
failed -22 (Invalid argument)
E/SurfaceFlinger(   36): GraphicBufferAlloc::createGraphicBuffer(w=352, 
h=288) failed (Invalid argument), handle=0x0

Is this known issue? I can play video on Froyo emulator...

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

Re: [android-developers] How to control the apps icon size?

2012-03-20 Thread Justin Anderson
Just specify the size in your XML layout...



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


On Tue, Mar 20, 2012 at 1:13 AM,  wrote:

>   Can anybody tell me how to control the apps icon size?
> I’m programming a launcher, I list out all applications installed,
> but the icon size is smaller than older launcher.
>
>
> Thanks & Best Regards
> Lynn Gu
> ——
> MSN: minilin...@hotmail.com
> TEL: +86 13501129124
> ——
>
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Same permission defined in multiple applications

2012-03-20 Thread Justin Anderson
I have only ever used it in once case...

I have two apps on the market.  Once is free and the other is a paid plugin
that unlocks features in the free app.  The sharedUserId setting was
perfect for me because it allowed me to do my license checking in the paid
app and save certain things about license validation to SharedPreferences
and then my free app could read those and unlock certain features.  The
unlock "key" app really did nothing but license validation and, if launched
by the user, essentially just launched the main app.

In my case I didn't have to worry about the subtleties...

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


On Tue, Mar 20, 2012 at 1:50 AM, Doug  wrote:

> Dianne, when would you recommend using sharedUserId?  Also, are these
> subtleties documented anywhere?
>
> Doug
>
>
> On Monday, March 19, 2012 5:57:33 PM UTC-7, Dianne Hackborn wrote:
>>
>> I strongly recommend avoiding sharedUserId.  Note that once you publish
>> an app with this, you can never go back.  It will have a lot of subtle
>> repercussions on your app that you may not like -- everything from all of
>> the apps with the same shared user ID being batched together in accounting
>> for battery use, to your processes being killed when one of your apps with
>> the shared user ID is updated.
>>
>> On Mon, Mar 19, 2012 at 10:23 AM, Justin Anderson 
>> wrote:
>>
>>> If you want to share things like preferences between the different apps
>>> then you will want to make sure that you also give them the same
>>> sharedUserId attribute in the manifest:
>>>
>>> http://developer.android.com/**guide/topics/manifest/**
>>> manifest-element.html#uid
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware
>>>
>>>
>>>
>>> On Sun, Mar 18, 2012 at 4:24 PM, Mark Murphy wrote:
>>>
 On Sun, Mar 18, 2012 at 5:50 PM, Ryan Reeves 
 wrote:
 > I am developing two applications that will share functionality via
 their
 > activities. I would like to only allow applications signed with the
 same
 > certificate to start these activities.
 >
 > My plan is to create a custom permission with protection level of
 signature
 > and apply that permission to exported activities in both applications.
 > Either application can be installed first, so I will define the
 permission
 > in both application manifests.
 >
 > Are there problems with defining the same permission in multiple
 > applications?  I plan to release both applications on the Android
 market.

 AFAIK, that should work fine.

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

 _Android Programming Tutorials_ Version 4.1 Available!

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

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@**
>>> googlegroups.com 
>>> To unsubscribe from this group, send email to
>>> android-developers+**unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en
>>>
>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see and
>> answer them.
>>
>>
> On Monday, March 19, 2012 5:57:33 PM UTC-7, Dianne Hackborn wrote:
>>
>> I strongly recommend avoiding sharedUserId.  Note that once you publish
>> an app with this, you can never go back.  It will have a lot of subtle
>> repercussions on your app that you may not like -- everything from all of
>> the apps with the same shared user ID being batched together in accounting
>> for battery use, to your processes being killed when one of your apps with
>> the shared user ID is updated.
>>
>> On Mon, Mar 19, 2012 at 10:23 AM, Justin Anderson 
>> wrote:
>>
>>> If you want to share things like preferences between the different apps
>>> then you will want to make sure that you also g

[android-developers] can't find my resources in my service...

2012-03-20 Thread RedBullet
So, I noticed something a little odd as I was refactoring my code. 
Basically I am moving a bunch of code from an activity to a service, and 
this included a Notification.

In my notification I reference a String and an Icon which are both in my 
resources (R.drawable.myicon for example).

When I moved this code to my Service class it was no longer able to resolve 
that path...

Stumped... But must be missing something fundamental.

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

2012-03-20 Thread Justin Anderson
http://lmgtfy.com/?q=java+convert+string+to+hex
http://lmgtfy.com/?q=java+convert+string+to+decimal
http://lmgtfy.com/?q=java+convert+string+to+binary
http://lmgtfy.com/?q=java+convert+string+to+octal

The internet is a wonderful tool...

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


On Tue, Mar 20, 2012 at 2:50 AM, jabjab  wrote:

> Is there any good tut. on converting dec-bin-hex-oct where inputs are
> in textview?.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] bitmap.recycle()?

2012-03-20 Thread bob
I'm looking at some of the samples in apidemos, and I saw this:

Bitmap bitmap;

try {

bitmap = BitmapFactory.decodeStream(is);

} finally {

try {

 is.close();

} catch (IOException e) {

 // Ignore.

}

}

GLUtils.texImage2D(GL_TEXTURE_2D, 0, bitmap, 0);
bitmap.recycle();


Anyone know why they are calling bitmap.recycle()?  Is that really 
necessary?  Isn't the garbage collection automatic?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can I customize the size of notification icon on the status bar?

2012-03-20 Thread Justin Anderson
You have to create a custom notification layout:
http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomExpandedView

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


On Tue, Mar 20, 2012 at 12:07 AM, Youwei Teng wrote:

> hi,
> I'm working on a app that needs to show a "rectangle"(ex: 34x68)
> status bar icon.
> android regular icon are :
> hdpi: 34x34 (total = 38x38)
> mdpi: 21x21 (total = 25x25)
> ldpi: 15x15 (total = 19x19)
>
> if I use square,the text in the status bar image is too small to see.
> is there any method to show a rectangle rather then a square?
>
>
> thanks in advance.
> Teng
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Casting string as a class (ie. RadioButton)

2012-03-20 Thread Justin Anderson
Why can't you do something like this:

public class A extends Activity
{
  private RadiotButton _radio1;

  protected void onCreate(Bundle bundle)
  {
setContentView(your.layout.id)
_radio1 = findViewById(R.id.RadioButton01);
  }

  public void doSomethingLater()
  {
   //Do something here with the radio button...
_radio1.setChecked(true);
  }
}

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


On Mon, Mar 19, 2012 at 8:19 PM, Bozzified  wrote:

> Sorry if it's a rudimentary question about Java as I'm coming from AS3 and
> just basically starting out. Though I understand many concepts so far and
> am writing my first app I'm trying to find best practices in some cases.
>
> My question is the following.
>
> In AS3, I could I address an instance of a class with the string.
>
> So in AS3, I could do this:
>
> var myMC = new MovieClip();
>
> myMC.name = "somename";
>
>
> now in my other code I can do this
>
> var tmpInstance = this.getChildByName("somename");
>
>
>
> Is there an equivalent like this in Java/Android dev?
>
> So for a super simple example.. I'm writing a code now that looks like
> this:
>
> RadioButton myRadioBttn1 = findViewById(R.id.RadioButton01);
> RadioButton myRadioBttn2 = findViewById(R.id.RadioButton01);
>
>
> but later in the or in my custom methods I want to do something like this:
>
> RadioButton myRadioBttn1_instance = this.getRadioButton("myRadioBttn1");
>
> where i"m really just coming out with my own syntax here to get my point
> across. So I am trying to address a specific instance of the class I
> defined earlier in the code by passing a specific string so I can do
> something dynamically in the code.
>
> I am sure I'm looking at this completely the wrong way as it is not done
> like that (I'm sure that it's a bad practices because in my example I'm
> creating a new instance rather than working on the existing one) but I'm
> not sure how to do this dynamically.
>
> Thanks.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: Removing an item from ListView

2012-03-20 Thread radhakrishna
@seshu

You mean updating onListItemClick method in
TestListItemsView1Activity :
-
protected void onListItemClick(ListView l, View v, int position,
long id) {
super.onListItemClick(l, v, position, id);
Toast.makeText(this, "Click-" + String.valueOf(position),
Toast.LENGTH_SHORT).show();
 dataValues..remove(position);
}
-

This does not work for me, I need to click remove button to remove
listrow.

My ListView contains [TextView and delete Button], I need to delete
list row, when I click on Delete button, When I click On Delete button
it will not enter into onListItemClick method under
TestListItemsView1Activity class , it will enter only when I select
TextView (Text).

Onlick method for delete button located in EfficientAdapter class.

On Mar 20, 2:20 pm, Seshu  wrote:
> dataValues..remove(position);  will deletes the entire row only...
>
> On Mar 20, 6:58 pm, radhakrishna 
> wrote:
>
>
>
>
>
>
>
> > Thank  you for your response Seshu, But I would like to delete list
> > row, when I click on delete button from List view.
>
> > On Mar 20, 1:12 pm, Seshu  wrote:
>
> > > Hi radhakrishna,
> > > if u want to delete the list row in the list view.
>
> > > protected void onListItemClick(ListView l, View v, int position,
> > > long id) {
> > >     super.onListItemClick(l, v, position, id);
> > >         Toast.makeText(this, "Click-" + String.valueOf(position),
> > > Toast.LENGTH_SHORT).show();
>
> > >      dataValues..remove(position);
>
> > >     }
>
> > > Thanks and Regards,
> > > S.Seshu
>
> > > On Mar 20, 2:41 am, radhakrishna 
> > > wrote:
>
> > > > Hi All,
>
> > > > I am trying to remove an item from  listview,
> > > > My Listview contains Text and Delete button in each row,
> > > > when I click on delete button its removing Last row from List view,
> > > > not the actual one which I clicked
>
> > > > Here is the Activity Class:
> > > > ---
> > > >  --
>
> > > > public class TestListItemsView1Activity extends ListActivity {
> > > >     /** Called when the activity is first created. */
>
> > > >         private EfficientAdapter efficientAdapter;
> > > >         private static String[] data = new String[] { "BBC", "Yahoo", 
> > > > "CNN",
> > > > "Eenadu", "Hindu" };
> > > >         private static List dataValues = Arrays.asList(data);
>
> > > >     @Override
> > > >     public void onCreate(Bundle savedInstanceState) {
> > > >         super.onCreate(savedInstanceState);
>
> > > >         requestWindowFeature(Window.FEATURE_NO_TITLE);
> > > >         setContentView(R.layout.main);
> > > >         efficientAdapter = new EfficientAdapter(this, dataValues);
>
> > > >         setListAdapter(efficientAdapter);
> > > >     }
>
> > > >     @Override
> > > >     protected void onListItemClick(ListView l, View v, int position,
> > > > long id) {
> > > >     super.onListItemClick(l, v, position, id);
> > > >         Toast.makeText(this, "Click-" + String.valueOf(position),
> > > > Toast.LENGTH_SHORT).show();
> > > >     }
>
> > > > Here is the Adapter class
> > > > ---
> > > >  --
>
> > > > public class EfficientAdapter extends BaseAdapter implements
> > > > Filterable{
>
> > > >         private LayoutInflater mInflater;
> > > >         private Context context;
> > > >         final private List data= new ArrayList();
> > > >         private HashMap holders= new
> > > > HashMap();
>
> > > >         public EfficientAdapter(Context context,List data) {
> > > >                 //super(context, R.layout.main, values);
> > > >                 mInflater = LayoutInflater.from(context);
> > > >                 this.context=context;
> > > >                 this.data.addAll(data);
> > > >         }
>
> > > >         public View getView(final int position, View convertView, 
> > > > ViewGroup
> > > > parent) {
> > > >                 ViewHolder holder;
>
> > > >                 if(convertView == null){
> > > >                         convertView = 
> > > > mInflater.inflate(R.layout.adaptor_content, null);
>
> > > >                         holder = new ViewHolder();
> > > >                         holder.textLine = (TextView)
> > > > convertView.findViewById(R.id.textLine);
> > > >                         holder.buttonLine =(Button)
> > > > convertView.findViewById(R.id.buttonLine);
>
> > > >                         
> > > > holder.textLine.setText(this.data.get(position));
> > > >                         convertView.setOnClickListener(new 
> > > > OnClickListener() {
> > > >                                 private int pos= position;
> > > >                                 public void onClick(View v) {
> > > >          

Re: [android-developers] AlarmManager.RTC don´t work

2012-03-20 Thread Kostya Vasilyev
20 марта 2012 г. 16:32 пользователь BearTi  написал:
>
>
> I thought the parameter "RTC" ensures that the Alarm not beeing fired
> when the device is in sleep mode (i turned the display off and the
> device was 1 hour not turned on)... But nevertheless the service is
> started...

It's actually different: using RTC does not ensure that the device
will be woken up just to fire this alarm.

This is not the same as "using RTC ensures that the device will stay
asleep and not wake up for any reason" -- that's not the case.

>
> So what am I doing wrong?

Probably nothing.

Perhaps the device woke up for some other reason, and so your alarm was fired.

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

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


[android-developers] Re: Removing an item from ListView

2012-03-20 Thread Seshu
dataValues..remove(position);  will deletes the entire row only...

On Mar 20, 6:58 pm, radhakrishna 
wrote:
> Thank  you for your response Seshu, But I would like to delete list
> row, when I click on delete button from List view.
>
> On Mar 20, 1:12 pm, Seshu  wrote:
>
>
>
>
>
>
>
> > Hi radhakrishna,
> > if u want to delete the list row in the list view.
>
> > protected void onListItemClick(ListView l, View v, int position,
> > long id) {
> >     super.onListItemClick(l, v, position, id);
> >         Toast.makeText(this, "Click-" + String.valueOf(position),
> > Toast.LENGTH_SHORT).show();
>
> >      dataValues..remove(position);
>
> >     }
>
> > Thanks and Regards,
> > S.Seshu
>
> > On Mar 20, 2:41 am, radhakrishna 
> > wrote:
>
> > > Hi All,
>
> > > I am trying to remove an item from  listview,
> > > My Listview contains Text and Delete button in each row,
> > > when I click on delete button its removing Last row from List view,
> > > not the actual one which I clicked
>
> > > Here is the Activity Class:
> > > ---
> > >  --
>
> > > public class TestListItemsView1Activity extends ListActivity {
> > >     /** Called when the activity is first created. */
>
> > >         private EfficientAdapter efficientAdapter;
> > >         private static String[] data = new String[] { "BBC", "Yahoo", 
> > > "CNN",
> > > "Eenadu", "Hindu" };
> > >         private static List dataValues = Arrays.asList(data);
>
> > >     @Override
> > >     public void onCreate(Bundle savedInstanceState) {
> > >         super.onCreate(savedInstanceState);
>
> > >         requestWindowFeature(Window.FEATURE_NO_TITLE);
> > >         setContentView(R.layout.main);
> > >         efficientAdapter = new EfficientAdapter(this, dataValues);
>
> > >         setListAdapter(efficientAdapter);
> > >     }
>
> > >     @Override
> > >     protected void onListItemClick(ListView l, View v, int position,
> > > long id) {
> > >     super.onListItemClick(l, v, position, id);
> > >         Toast.makeText(this, "Click-" + String.valueOf(position),
> > > Toast.LENGTH_SHORT).show();
> > >     }
>
> > > Here is the Adapter class
> > > ---
> > >  --
>
> > > public class EfficientAdapter extends BaseAdapter implements
> > > Filterable{
>
> > >         private LayoutInflater mInflater;
> > >         private Context context;
> > >         final private List data= new ArrayList();
> > >         private HashMap holders= new
> > > HashMap();
>
> > >         public EfficientAdapter(Context context,List data) {
> > >                 //super(context, R.layout.main, values);
> > >                 mInflater = LayoutInflater.from(context);
> > >                 this.context=context;
> > >                 this.data.addAll(data);
> > >         }
>
> > >         public View getView(final int position, View convertView, 
> > > ViewGroup
> > > parent) {
> > >                 ViewHolder holder;
>
> > >                 if(convertView == null){
> > >                         convertView = 
> > > mInflater.inflate(R.layout.adaptor_content, null);
>
> > >                         holder = new ViewHolder();
> > >                         holder.textLine = (TextView)
> > > convertView.findViewById(R.id.textLine);
> > >                         holder.buttonLine =(Button)
> > > convertView.findViewById(R.id.buttonLine);
>
> > >                         holder.textLine.setText(this.data.get(position));
> > >                         convertView.setOnClickListener(new 
> > > OnClickListener() {
> > >                                 private int pos= position;
> > >                                 public void onClick(View v) {
> > >                                         Toast.makeText(context, "Click-" 
> > > + String.valueOf(pos),
> > > Toast.LENGTH_SHORT).show();
>
> > >                                 }
> > >                         });
>
> > >                         holder.buttonLine.setOnClickListener(new 
> > > OnClickListener() {
> > >                                 private int pos= position;
>
> > >                                 public void onClick(View v) {
> > >                                         ViewHolder deleteHolder = 
> > > (ViewHolder)v.getTag();
> > >                                         int 
> > > delPosition=deleteHolder.position;
> > >                                         holders.remove(delPosition);
> > >                                         ViewHolder currentHolder;
> > >                                         for(int i=pos+1;i > >                                                 currentHolder = 
> > > holders.get(delPosition);
> > >                                                 
> > > currentHolder.position=i-1;
> > >                                         }
> > >                                         data.remove(delPosition);
> > >  

Re: [android-developers] Authorization token from local GAE

2012-03-20 Thread Nikolay Elenkov
On Mon, Mar 19, 2012 at 9:02 PM, ultravolks  wrote:
> Hello, is it possible to get an authorization token from a local Google App
> Engine without being connected to the Internet.
> When I call AccountManagerFuture getResult() I can get a token only if I am
> connected to the Internet.
> With the code below, If I am off line IOException shows up. Could you
> explain to me why or if there is a way to work offline?

The token is cached and has a certain validity period. If you get it once
(while online), you should be able to use it even if offline if it is
still valid.
That said, what exactly the Google accounts manager does is undocumented,
so it might be trying to connect for some reason even if you have a cached
token. Or it could be a bug. Test different cases and check what the
exception traces say.

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


  1   2   >