[android-developers] Re: how to connect with sql server 2005

2012-04-04 Thread ramalakshmi

we cant connect through jtds/jdbc.
for the connection we have to write a php file.please go through this
http://p-xr.com/android-tutorial-how-to-parse-read-json-data-into-a-android-listview/#comments
in the last they gave te source code also.

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

2012-04-04 Thread arunkumar ayyavoo
u known how to call web service in android u have a any simple code send
me.

On Wed, Apr 4, 2012 at 11:36 AM, ramalakshmi krishna.veni...@gmail.comwrote:


 we cant connect through jtds/jdbc.
 for the connection we have to write a php file.please go through this

 http://p-xr.com/android-tutorial-how-to-parse-read-json-data-into-a-android-listview/#comments
 in the last they gave te source code also.

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




-- 
Thanks and Regards,
*Arunkumar A*

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

[android-developers] همت کنید

2012-04-04 Thread hosein bitaraf
بسم الله الرحمن الرحیم
شاید یکی از مسائلی که در جامعه ی ما کمبودش احساس میشود وجود ارگان های پویا
و نظاممند انفاق و کمک به محرومین باشد.یکی از دوستان بسیار معتمد و عزیز بنده
در یک طرح خودجوش موسسه ی خیریه ی اینترنتی ایجاد  کرده است. این موسسه خیریه
همت نام دارد. البته فعلا وبلاگی دارند و برای افراد زیادی ایمیل میدهند تا به
صورت آنلاین کمک کنند. هدف گذاری اصلی خیریه بر روی جهزیه ودرمان است ولی اگر
مواردی اضطراری پیش بیاید برای آن موارد هم هزینه میشود. انشاالله از این به
بعد فراخوان های خیریه را به شما دوستان میدهم. شما هم ای خیریه را تبلیغ کنید
تا بتوانیم در کمک به محرومان سهم کوچکی داشته باشیم.
آدرس:http://sandoghhemat.ir

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

2012-04-04 Thread Martin

Ok, thank you, both of you, for yours answers.

 That's confirm what I thought.

Martin.

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

2012-04-04 Thread Nikolay Elenkov
On Wed, Apr 4, 2012 at 2:28 PM, Jim Graham spooky1...@gmail.com wrote:
 On Tue, Apr 03, 2012 at 11:36:00PM -0500, TreKing wrote:

 Android changes so much so frequently, I can't imagine you're going to find
 a better reference for the XML layouts and Widgets then the documentation
 and source code itself.

 That'd be great, if it shows a complete example of every way you can
 configure/modify layouts, views, etc., via xml, and has good
 documentation to go with it.  ...

 ..
 I understand that this may not exist...and from what I read in a post
 (from about two years ago a little while ago), I'm not that optimistic
 that it does exist.  Still, I'm just asking in case someone here knows
 otherwise, and can point me to it.  :-)


It does exist, you just have to get someone to translate it in English :)

Android Layout Cookbook:

http://www.amazon.co.jp/Android-Layout-Cookbook-%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE%E4%BE%A1%E5%80%A4%E3%82%92%E9%AB%98%E3%82%81%E3%82%8B%E9%96%8B%E7%99%BA%E3%83%86%E3%82%AF%E3%83%8B%E3%83%83%E3%82%AF-%E3%81%82%E3%82%93%E3%81%96%E3%81%84/dp/4844329871/

Updated for ICS:
http://www.amazon.co.jp/Android-Cookbook-ICS%EF%BC%88Ice-Cream-Sandwich%EF%BC%89%E3%82%A2%E3%83%97%E3%83%AA%E9%96%8B%E7%99%BA%E8%A1%93/dp/4844331744/

And an app with the samples:

https://play.google.com/store/apps/details?id=yanzm.products.photoviewer

Never read it myself, but a lot of people seem to like it. The author
also seems
to know what she's talking about.

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


Re: [android-developers] همت کنید

2012-04-04 Thread Anirudh Loya
 البته فعلا وبلاگی دارند و برای  خوان های خیریه را به شما  خوان های خیریه
را به شما

2012/4/4 hosein bitaraf hobby@gmail.com

 بسم الله الرحمن الرحیم
 شاید یکی از مسائلی که در جامعه ی ما کمبودش احساس میشود وجود ارگان های پویا
 و نظاممند انفاق و کمک به محرومین باشد.یکی از دوستان بسیار معتمد و عزیز بنده
 در یک طرح خودجوش موسسه ی خیریه ی اینترنتی ایجاد  کرده است. این موسسه خیریه
 همت نام دارد. البته فعلا وبلاگی دارند و برای افراد زیادی ایمیل میدهند تا به
 صورت آنلاین کمک کنند. هدف گذاری اصلی خیریه بر روی جهزیه ودرمان است ولی اگر
 مواردی اضطراری پیش بیاید برای آن موارد هم هزینه میشود. انشاالله از این به
 بعد فراخوان های خیریه را به شما دوستان میدهم. شما هم ای خیریه را تبلیغ کنید
 تا بتوانیم خوان های خیریه را به شما   سهم کوچکی داشته باشیم.
 آدرس:http://sandoghhemat.ir

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




-- 

Thank you

Anirudh Loya | Android Developer**

Desk: +9140-30681824 | Mobile: +91*9246561265*

*Love your Job but don't Love your company, Because you may not know when
your company stops loving you.--  Voice Of Love*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Difference between user-induced screen on and programmatically induced screen on.

2012-04-04 Thread Put_tiMe
If it's a code induced screen-on, I want to switch bluetooth off.
If it's a user induced screen-on, I want to switch bluetooth on.
 
 
On Wednesday, April 4, 2012 10:10:09 AM UTC+5:30, TreKing wrote:

 On Tue, Apr 3, 2012 at 4:21 AM, Put_tiMe putt...@gmail.com wrote:

 I want to handle this intent in different ways, depending on where it 
 originated from.


 You still didn't explain *why*.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices



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

Re: [android-developers] Difference between user-induced screen on and programmatically induced screen on.

2012-04-04 Thread Put_tiMe
Sorry, a slight correction:
 
If it's a code induced screen-on, I want to switch bluetooth on/off 
(toggle).
If it's a user induced screen-on, I want to switch bluetooth on.
 
Code induced screen-on is initiated from Alarm-manager.
 
 

On Wednesday, April 4, 2012 12:26:49 PM UTC+5:30, Put_tiMe wrote:

 If it's a code induced screen-on, I want to switch bluetooth off.
 If it's a user induced screen-on, I want to switch bluetooth on.
  
  
 On Wednesday, April 4, 2012 10:10:09 AM UTC+5:30, TreKing wrote:

 On Tue, Apr 3, 2012 at 4:21 AM, Put_tiMe putt...@gmail.com wrote:

 I want to handle this intent in different ways, depending on where it 
 originated from.


 You still didn't explain *why*.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices



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

[android-developers] How to creating a custom HashMapAdapter

2012-04-04 Thread Graham Bright
Hi,

If I have a hashmap containing the following how can I instantiate a
custom adapter. The custom adapter should extend baseadapter.

Hashmap contains (String,String)

I need to combine both key and value so it looks something like
KEY+VALUE, KEY+VALUE and assign this to an array VALUES. The
array VALUES is used later on when I insantiate my custom adpter

Instantiation should look something like this



MyCustomAdapter adapter = new MyCustomAdapter(this,
android.R.layout.simple_list_item_1, VALUES);
setListAdapter(adapter)

I am lost here so code would be a big help.

THANKS
graham

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

2012-04-04 Thread Bunty syed
Hi,

I want to delete application silently from device.

But I found there is no way of doing it(except launching uninstaller
screen)  ..

I read @ MDM in android using which we can wipe data,lock phone,
etc...

Can we uninstall app silently using MDM..

Thanks  Regards,
Bunty Syed..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Uninstall application silently from device using MDM for android

2012-04-04 Thread Kristopher Micinski
No, you can't silently uninstall an app...,

Why do you want to do so?

Kris

On Wed, Apr 4, 2012 at 3:41 AM, Bunty syed itsmeatfo...@gmail.com wrote:
 Hi,

 I want to delete application silently from device.

 But I found there is no way of doing it(except launching uninstaller
 screen)  ..

 I read @ MDM in android using which we can wipe data,lock phone,
 etc...

 Can we uninstall app silently using MDM..

 Thanks  Regards,
 Bunty Syed..

 --
 You received this message because you are subscribed to the Google Groups 
 android-platform group.
 To post to this group, send email to android-platf...@googlegroups.com.
 To unsubscribe from this group, send email to 
 android-platform+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/android-platform?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: help in using android USB host mode

2012-04-04 Thread al
64 is the _max_ packet size. A single transfer may be shorter; it does not 
matter if the rest of the buffer is filled with zeros or some garbage since 
the data transfered is contained in just the first x bytes of the buffer 
where x is the return value from bulkTransfer. For continuous transfer, 
just call bulkTransfer multiple times. I don't know why you want to set a 
baud rate. You don't do this with usb transfers.

Am Dienstag, 3. April 2012 20:14:30 UTC+2 schrieb ashish sharma:

 Hello,

 I am working with Lenovo tablet (Android 3.1) and I want to fetch data 
 from Telosb sensor. The sensor has following interface and endpoint

 Interface 0
 Endpoint 0: Inbound, type- bulk, max packet size- 64
 Endpoint 1: Outbound, type- bulk, max packet size- 64

 I want to read the data from sensor and I used UsbDeviceConnection and 
 bulkTransfer(endpoint, buffer, length, timeout) method to get the data. The 
 byte[] buffer field in the method must have the data from the sensor at 
 endpoint 0 is what I understand from the documentation. When I read in this 
 way, only 2 bytes (length= 64) are read and rest are zeros. Can anyone 
 explain what might be the cause for this? Also, how do I set the baud rate? 
 How do I read data from the sensor continuously?

 Thanks,
 Ashish.


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

2012-04-04 Thread Graham Bright
Hi,

I can't figure out why I am getting and out of bounds exception ? Any
ideas

Thanks

public static String[] items = new String[0];


public static  HashMapString, String map = new HashMapString,
String();


@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);

//sample values for the hash map
map.put(year, Apple);
map.put(make, Mango);
map.put(model, Grape);
map.put(style, Orange);
map.put(series, Peach);

Set entries = map.entrySet();
Iterator entriesIterator = entries.iterator();
int i=0;
String addEntries = ;
while(entriesIterator.hasNext()){

Map.Entry mapping = (Map.Entry) entriesIterator.next();
addEntries= + mapping.getKey() +  + mapping.getValue();
items[i] = addEntries;

i++;


}

04-04 10:44:39.615: WARN/dalvikvm(5258): threadid=3: thread exiting
with uncaught exception (group=0x4001dc20)
04-04 10:44:39.615: ERROR/AndroidRuntime(5258): Uncaught handler:
thread main exiting due to uncaught exception
04-04 10:44:39.630: ERROR/AndroidRuntime(5258):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{listmodified.org/listmodified.org.listmodified}:
java.lang.ArrayIndexOutOfBoundsException
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2496)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2512)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.os.Looper.loop(Looper.java:123)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.app.ActivityThread.main(ActivityThread.java:4363)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
java.lang.reflect.Method.invokeNative(Native Method)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
java.lang.reflect.Method.invoke(Method.java:521)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:862)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
dalvik.system.NativeStart.main(Native Method)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): Caused by:
java.lang.ArrayIndexOutOfBoundsException
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
listmodified.org.listmodified.onCreate(listmodified.java:72)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2459)

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


[android-developers] Android sdk-component: add support for gnustl_static in new sdk component (application)

2012-04-04 Thread hack_tick


I am creating a new SDK component (application) based on the sample device 
located at/device/sample the idea is to port an existing application 
written using C++, which utilizes lots of templates, RTTI, exceptions, STL; 
from the documentation it is clear that if I build my application with
gnustl_static/gnustl_shared support this will provide me with all the 
support I need.

Now if I am creating a NDK application, which has Application.mk I know 
adding APP_STL := gnustl_static in it is one way to do it.

But as the component is part of new device sdk-addon.

Q1. I dont know how to provide Application.mk for native C++ 
application/component being build part of sdk-addon.

Q2. As per my knowledge I only have access to Android.mk and I am looking 
for a way to add support for gnustl_static using only Android.mk

I have tried various combinations of following options in Android.mk 
without any luck

LOCAL_CPPFLAGS += -fexceptions
LOCAL_CPPFLAGS += -frtti
LOCAL_SRC_FILES += libs/$(TARGET_ARCH_ABI)/libstdc++.a
LOCAL_STATIC_LIBRARIES := gnustl_static

Do let me know if you have any suggestions, 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: Dynamically adding view in layout xml in android

2012-04-04 Thread Bilal Haider
You can try something like this.
View mainlayout = (ScrollView) findViewById(R.id.ScrollView1);
LayoutInflater  inflater =
(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = (View) inflater.inflate(R.layout.main, null);
TextView textview1 = (TextView)
view.findViewById(R.id.textview1);
EditText editview1 = (EditText)
view.findViewById(R.id.editview1);
EditText editview2= (EditText)
view.findViewById(R.id.editview2);

On 2/15/11, CrazzyAndroidians nithin@gmail.com wrote:

 yes, you can do it,
 using LayoutInflater and addView()


 Androidian

 On Feb 15, 3:13 pm, Deepak Kumar deepak.kumar...@gmail.com wrote:
 Hi All,

               I have created a xml layout which includes ImageButtons in
 row,col format.So,layout having some initial number of views.Now,I want to
 add extra views at run time i.e through code.Is it possible? How to do it?

  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: ArrayIndexOutOfBoundsException

2012-04-04 Thread Chris Mawata
Because of
items = new String[0];


On Apr 4, 3:48 am, Graham Bright gbwienmobil...@gmail.com wrote:
 Hi,

 I can't figure out why I am getting and out of bounds exception ? Any
 ideas

 Thanks

 public static String[] items = new String[0];

         public static  HashMapString, String map = new HashMapString,
 String();

         @Override
         public void onCreate(Bundle icicle) {
         super.onCreate(icicle);

         //sample values for the hash map
         map.put(year, Apple);
         map.put(make, Mango);
         map.put(model, Grape);
         map.put(style, Orange);
         map.put(series, Peach);

         Set entries = map.entrySet();
         Iterator entriesIterator = entries.iterator();
         int i=0;
         String addEntries = ;
         while(entriesIterator.hasNext()){

                 Map.Entry mapping = (Map.Entry) entriesIterator.next();
                 addEntries= + mapping.getKey() +  + mapping.getValue();
             items[i] = addEntries;

             i++;

         }

 04-04 10:44:39.615: WARN/dalvikvm(5258): threadid=3: thread exiting
 with uncaught exception (group=0x4001dc20)
 04-04 10:44:39.615: ERROR/AndroidRuntime(5258): Uncaught handler:
 thread main exiting due to uncaught exception
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):
 java.lang.RuntimeException: Unable to start activity
 ComponentInfo{listmodified.org/listmodified.org.listmodified}:
 java.lang.ArrayIndexOutOfBoundsException
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 2496)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 2512)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.app.ActivityThread.access$2200(ActivityThread.java:119)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.os.Handler.dispatchMessage(Handler.java:99)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.os.Looper.loop(Looper.java:123)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.app.ActivityThread.main(ActivityThread.java:4363)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 java.lang.reflect.Method.invokeNative(Native Method)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 java.lang.reflect.Method.invoke(Method.java:521)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:862)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 dalvik.system.NativeStart.main(Native Method)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258): Caused by:
 java.lang.ArrayIndexOutOfBoundsException
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 listmodified.org.listmodified.onCreate(listmodified.java:72)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1047)
 04-04 10:44:39.630: ERROR/AndroidRuntime(5258):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 2459)



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


[android-developers] Re: help in using android USB host mode

2012-04-04 Thread ashish sharma
Hello,

Thanks for the reply. I tried calling bulkTransfer multiple times, but
I get the same values again. The code is as follows:

byte[] buffer =new byte[2];
int length= 2;
int TIMEOUT= 0;

UsbDeviceConnection connection= ourUsbManager.openDevice(device);
connection.claimInterface(intf, true);
ep= intf.getEndpoint(0);

for (int j= 0; j32; j++){
connection.bulkTransfer(ep, buffer, length, TIMEOUT);
for(int i= 0; ibuffer.length; i++){
dataTextView.append(String.valueOf(buffer[i]));
dataTextView.append( );
}
}

The bytes that I see in Log is: [B@406bda38 and the corresponding Hex
string 1 60 or sometimes 1 61. Any suggestions in the implementation
part?

Thanks.

On Apr 4, 10:09 am, al achim.leub...@googlemail.com wrote:
 64 is the _max_ packet size. A single transfer may be shorter; it does not
 matter if the rest of the buffer is filled with zeros or some garbage since
 the data transfered is contained in just the first x bytes of the buffer
 where x is the return value from bulkTransfer. For continuous transfer,
 just call bulkTransfer multiple times. I don't know why you want to set a
 baud rate. You don't do this with usb transfers.

 Am Dienstag, 3. April 2012 20:14:30 UTC+2 schrieb ashish sharma:









  Hello,

  I am working with Lenovo tablet (Android 3.1) and I want to fetch data
  from Telosb sensor. The sensor has following interface and endpoint

  Interface 0
  Endpoint 0: Inbound, type- bulk, max packet size- 64
  Endpoint 1: Outbound, type- bulk, max packet size- 64

  I want to read the data from sensor and I used UsbDeviceConnection and
  bulkTransfer(endpoint, buffer, length, timeout) method to get the data. The
  byte[] buffer field in the method must have the data from the sensor at
  endpoint 0 is what I understand from the documentation. When I read in this
  way, only 2 bytes (length= 64) are read and rest are zeros. Can anyone
  explain what might be the cause for this? Also, how do I set the baud rate?
  How do I read data from the sensor continuously?

  Thanks,
  Ashish.

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

2012-04-04 Thread Narendra Singh Rathore
On Tue, Apr 3, 2012 at 3:11 PM, baturanija1
jadrankobodiroga1...@gmail.comwrote:

 Please, send me some of your codes to see if it will
 work.Thanke you very much


Refer the link as follows:

http://blog.georgenguyen.info/index.php/2012/android-how-to-programmatically-set-android-wallpaper/

Its totally working. Even I tried this.

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

Re: [android-developers] Re: ArrayIndexOutOfBoundsException

2012-04-04 Thread Badrinath Kulkarni
size of  items  ??? set it properly

On Wed, Apr 4, 2012 at 3:32 PM, Chris Mawata chris.maw...@gmail.com wrote:

 Because of
 items = new String[0];


 On Apr 4, 3:48 am, Graham Bright gbwienmobil...@gmail.com wrote:
  Hi,
 
  I can't figure out why I am getting and out of bounds exception ? Any
  ideas
 
  Thanks
 
  public static String[] items = new String[0];
 
  public static  HashMapString, String map = new HashMapString,
  String();
 
  @Override
  public void onCreate(Bundle icicle) {
  super.onCreate(icicle);
 
  //sample values for the hash map
  map.put(year, Apple);
  map.put(make, Mango);
  map.put(model, Grape);
  map.put(style, Orange);
  map.put(series, Peach);
 
  Set entries = map.entrySet();
  Iterator entriesIterator = entries.iterator();
  int i=0;
  String addEntries = ;
  while(entriesIterator.hasNext()){
 
  Map.Entry mapping = (Map.Entry) entriesIterator.next();
  addEntries= + mapping.getKey() +  +
 mapping.getValue();
  items[i] = addEntries;
 
  i++;
 
  }
 
  04-04 10:44:39.615: WARN/dalvikvm(5258): threadid=3: thread exiting
  with uncaught exception (group=0x4001dc20)
  04-04 10:44:39.615: ERROR/AndroidRuntime(5258): Uncaught handler:
  thread main exiting due to uncaught exception
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258):
  java.lang.RuntimeException: Unable to start activity
  ComponentInfo{listmodified.org/listmodified.org.listmodified}:
  java.lang.ArrayIndexOutOfBoundsException
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
  2496)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
  2512)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.app.ActivityThread.access$2200(ActivityThread.java:119)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.os.Handler.dispatchMessage(Handler.java:99)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.os.Looper.loop(Looper.java:123)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.app.ActivityThread.main(ActivityThread.java:4363)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  java.lang.reflect.Method.invokeNative(Native Method)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  java.lang.reflect.Method.invoke(Method.java:521)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:862)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  dalvik.system.NativeStart.main(Native Method)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): Caused by:
  java.lang.ArrayIndexOutOfBoundsException
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  listmodified.org.listmodified.onCreate(listmodified.java:72)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
  1047)
  04-04 10:44:39.630: ERROR/AndroidRuntime(5258): at
  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
  2459)
 
 

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




-- 
Thanks
Badrinath

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

2012-04-04 Thread Mark
themes don't quite seem to handle what's needed.  i have one
application or project that i want to deploy as 2 applications. build
as app a, then build as app b.  i can easily copy in / out a different
resource folder, but that doesn't handle the application package.
each app in the store needs a different package.  my app code uses
the namespace, org.bnb for the classes, but i want to deploy for
Bob's Bed n Breakfast and for Sue's Bed and Breakfast, com.bbnb
and com.sbnb.  Android seems to use the package name as the
application name (from the manifest).  i've been able to override thus
far the package name that the R class uses, but when i try to run, the
other classes seem to want to come from the manifest package naming.

ar.

any help on this is most appreciated.  android could use an app name
and keep that separate from the code naming.

On Apr 4, 12:28 am, TreKing treking...@gmail.com wrote:
 On Tue, Apr 3, 2012 at 6:49 AM, Mark mlybar...@gmail.com wrote:
  How would i go about switching the resources and the R class?

  Are there other ideas on how to properly brand an application?

 I'd would investigate using Themes.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


[android-developers] can i get a dynamically change user interface in android?

2012-04-04 Thread ramalakshmi
 Hi!
   is there any way to get the dynamically changing user interface in
android.I am using setListAdapter for printing on the android ui.
   Can u please help me.!?

-- 
ramalakshmi

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Uninstall application silently from device using MDM for android

2012-04-04 Thread lbendlin
Isn't that something that Teh Google does when they want to yank an app 
from the market and from devices?

On Wednesday, April 4, 2012 3:47:26 AM UTC-4, Kristopher Micinski wrote:

 No, you can't silently uninstall an app...,

 Why do you want to do so?

 Kris

 On Wed, Apr 4, 2012 at 3:41 AM, Bunty syed itsmeatfo...@gmail.com wrote:
  Hi,
 
  I want to delete application silently from device.
 
  But I found there is no way of doing it(except launching uninstaller
  screen)  ..
 
  I read @ MDM in android using which we can wipe data,lock phone,
  etc...
 
  Can we uninstall app silently using MDM..
 
  Thanks  Regards,
  Bunty Syed..
 
  --
  You received this message because you are subscribed to the Google 
 Groups android-platform group.
  To post to this group, send email to android-platf...@googlegroups.com.
  To unsubscribe from this group, send email to 
 android-platform+unsubscr...@googlegroups.com.
  For more options, visit this group at 
 http://groups.google.com/group/android-platform?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: Disable screenshot within an app in ICS?

2012-04-04 Thread albnok

I check the SDK INT to be above 10 before setting the flag. Galaxy Tab
7 ignores it and HTC EVO 3D is garbled.

On Apr 4, 8:05 am, Greg miyamo...@gmail.com wrote:
 So after seeing this work in the wild a bit, it seems like some phones
 actually corrupt the view when they see this flag. I don't see it as part
 of the compatibility doc for vendors so I doubt they test it well. On the
 DroidX, I have seen the screen get drawn totally incorrectly (different per
 version of Android) and in some Samsung roms the entire window is
 corrupted. This doesn't seem to be something in the compatibility docs for
 vendors. Is this just for ICS and forward? It has existed since 1.0 it
 seems.

 -Greg







 On Thursday, January 12, 2012 9:04:15 AM UTC-8, Romain Guy (Google) wrote:

  Add this flag to your window in onCreate():

 http://developer.android.com/reference/android/view/WindowManager.Lay...

  On Thu, Jan 12, 2012 at 1:48 AM, Michael Banzon mich...@banzon.dk wrote:
   On Thu, Jan 12, 2012 at 10:13 AM, Tom Uhl tuhl...@gmail.com wrote:
   Is there a way for an app to disable the new built-in-screenshot
   function in ICS?

   I don't think there is. If there is - I'm guessing you're trying to
   protect something - please keep in mind that the user can also grab
   screenshots through USB-debugging or through HDMI.

   --
   Michael Banzon
  http://michaelbanzon.com/

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

  --
  Romain Guy
  Android framework engineer
  romain...@android.com

 On Thursday, January 12, 2012 9:04:15 AM UTC-8, Romain Guy (Google) wrote:

  Add this flag to your window in onCreate():

 http://developer.android.com/reference/android/view/WindowManager.Lay...

  On Thu, Jan 12, 2012 at 1:48 AM, Michael Banzon mich...@banzon.dk wrote:
   On Thu, Jan 12, 2012 at 10:13 AM, Tom Uhl tuhl...@gmail.com wrote:
   Is there a way for an app to disable the new built-in-screenshot
   function in ICS?

   I don't think there is. If there is - I'm guessing you're trying to
   protect something - please keep in mind that the user can also grab
   screenshots through USB-debugging or through HDMI.

   --
   Michael Banzon
  http://michaelbanzon.com/

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

  --
  Romain Guy
  Android framework engineer
  romain...@android.com

 On Thursday, January 12, 2012 9:04:15 AM UTC-8, Romain Guy (Google) wrote:

  Add this flag to your window in onCreate():

 http://developer.android.com/reference/android/view/WindowManager.Lay...

  On Thu, Jan 12, 2012 at 1:48 AM, Michael Banzon mich...@banzon.dk wrote:
   On Thu, Jan 12, 2012 at 10:13 AM, Tom Uhl tuhl...@gmail.com wrote:
   Is there a way for an app to disable the new built-in-screenshot
   function in ICS?

   I don't think there is. If there is - I'm guessing you're trying to
   protect something - please keep in mind that the user can also grab
   screenshots through USB-debugging or through HDMI.

   --
   Michael Banzon
  http://michaelbanzon.com/

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

  --
  Romain Guy
  Android framework engineer
  romain...@android.com

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


[android-developers] Re: can i get a dynamically change user interface in android?

2012-04-04 Thread lbendlin
yes, yes you can. what do you mean by printing?

On Wednesday, April 4, 2012 7:22:36 AM UTC-4, ramalakshmi wrote:

  Hi!
is there any way to get the dynamically changing user interface in 
 android.I am using setListAdapter for printing on the android ui.
Can u please help me.!? 

 -- 
 ramalakshmi



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

2012-04-04 Thread lbendlin
Go through the API registration process again. You will see that your key 
has changed.

On Tuesday, April 3, 2012 9:25:22 PM UTC-4, cellurl wrote:

 Hi, 

 If one were to hail-mary fix a non-displaying google-map issue, 
 what would you suggest? 

 Some background. 
 I had a map-app work a year back. 
 Now map doesn't show. 
 I have tried Debug-Key, Release-Key, app on emulator, app from 
 market 

 Its been a few months so I thought I would give it another go. 

 Rather than go around the block again, 
 my question is: 
 Q: what would be the quickest path of attack. (not smartest, quickest) 

 1) Delete entire SDK and reinstall. 
 2) Something else. 

 PS. I would keep the old-key around to sign other apps, 
 but it seems like getting a new key and resigning 
 might get me up in a night instead of a week 

 Sorry so groggy and thanks for simple solutions. 
 -cellurl 



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: can i get a dynamically change user interface in android?

2012-04-04 Thread Anirudh Loya
Yes I will write and give it to you for $1000 !

On Wed, Apr 4, 2012 at 7:29 AM, lbendlin l...@bendlin.us wrote:

 yes, yes you can. what do you mean by printing?

 On Wednesday, April 4, 2012 7:22:36 AM UTC-4, ramalakshmi wrote:

  Hi!
is there any way to get the dynamically changing user interface in
 android.I am using setListAdapter for printing on the android ui.
Can u please help me.!?

 --
 ramalakshmi

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




-- 

Thank you

Anirudh Loya | Android Developer**

Desk: +9140-30681824 | Mobile: +91*9246561265*

*Love your Job but don't Love your company, Because you may not know when
your company stops loving you.--  Voice Of Love*

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

2012-04-04 Thread Albert Rosa
You're looking to have two apps with the same code base, different package
/ app name. Releasing two apks. The only way I see this likely is to use
two different projects with a core library containing the code that you'd
like to reuse.

sent from my mobile thoughts.
On Apr 4, 2012 7:16 AM, Mark mlybar...@gmail.com wrote:

 themes don't quite seem to handle what's needed.  i have one
 application or project that i want to deploy as 2 applications. build
 as app a, then build as app b.  i can easily copy in / out a different
 resource folder, but that doesn't handle the application package.
 each app in the store needs a different package.  my app code uses
 the namespace, org.bnb for the classes, but i want to deploy for
 Bob's Bed n Breakfast and for Sue's Bed and Breakfast, com.bbnb
 and com.sbnb.  Android seems to use the package name as the
 application name (from the manifest).  i've been able to override thus
 far the package name that the R class uses, but when i try to run, the
 other classes seem to want to come from the manifest package naming.

 ar.

 any help on this is most appreciated.  android could use an app name
 and keep that separate from the code naming.

 On Apr 4, 12:28 am, TreKing treking...@gmail.com wrote:
  On Tue, Apr 3, 2012 at 6:49 AM, Mark mlybar...@gmail.com wrote:
   How would i go about switching the resources and the R class?
 
   Are there other ideas on how to properly brand an application?
 
  I'd would investigate using Themes.
 
 
 ---
 --
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

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

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

2012-04-04 Thread atul gangwar
String  jsonString=*{id:315,name:Sagar Ratna,url:http:\/\/
www.zomato.com\/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315,location:{address:B-1,
A-11 Mohan Co-operative Ind Area, Mathura Road, New
Delhi,locality:Mathura
Road,city:Delhi,latitude:28.520727,longitude:77.294253},phone:011
26955802, 011 26955803, 011 26955804,cuisines:South
Indian,timings:11 AM to 11
PM,avgCostForTwo:450,isPureVeg:1,hasBar:0,hasDineIn:1,hasDelivery:1,acceptsCreditCards:1,serviceCharge:0,vat:1,editorRating:{food:2.5,service:3.5,ambience:2,overall:3},editorReview:,userReviews:{count:2,0:{review:{id:24728,rating:0,reviewText:yyejbbxzszbxzbomato.comForDevelopmentPurposes,author:Arup
Saha,reviewTime:2012-01-25 16:23:10,reviewTimeFriendly:2 months
ago}},1:{review:{id:24727,rating:5,reviewText:testReviewOnZomato.comForDevelopmentPurposes,author:Arup
Saha,reviewTime:2012-01-25 16:14:16,reviewTimeFriendly:2 months
ago}}},discounts:[],photos:{photos_url:http:\/\/www.zomato.com
\/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315\/photos#tabtop,0:{photo:{thumbUrl:http:\/\/
www.zomato.com\/data\/pictures\/chains\/305\/1_thumb.jpg,url:http:\/\/
www.zomato.com
\/data\/pictures\/chains\/305\/1.jpg}}},image_470_310:,image_310_310:,image_310_150:,image_150_150:,menu:{menu_url:http:\/\/
www.zomato.com
\/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315\/menu#tabtop}}
*  ;

The json data which u r getting is a String . what i am thinking the data
which u have give above i man what u want to parse is one object or one
record so  in a similar manner u may be having many record so the
jsonstring consists of many objects of same type . now u ll pass this to
the jsonarray and each record is stored in the array and u can fetch one at
a time and do parsing in a for loop.

On Wed, Apr 4, 2012 at 5:01 PM, Mini agrawal itsmin...@gmail.com wrote:

 Thanks for reply, still i am getting an parsing error.
  What will be jsonString here?(for a given data)


 On Tue, Apr 3, 2012 at 10:04 AM, atul gangwar daa...@gmail.com wrote:

 Hi,

For parsing json data:
 pass the json sting to JSONArray as below.
 JSONArray jsonArray = new JSONArray(jsonString);

 create JSONObject  ;
 JSONObject json_data = null;

 run one loop as below to fetch each element of the array.
 for (int i = 0; i  jsonArray.length(); i++) {
 json_data = jsonArray.getJSONObject(i);
 string strId =  json_data.getString(id);// pass the key here to
 get the value
 }

 if u hav only one object inside the jsonstring thn u can use
  json_data.get(type of data present)(pass the key here);

 eg to fetch the url
 String url=  json_data.getstring(url);
 //url = *http:\/\/www.zomato.com
 \/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315*

 On Thu, Mar 29, 2012 at 12:50 PM, Mini agrawal itsmin...@gmail.comwrote:

  How to parse following data??


  *{id:315,name:Sagar 
 Ratna,url:http:\/\/www.zomato.com\/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315,location:{address:B-1,
 A-11 Mohan Co-operative Ind Area, Mathura Road, New
 Delhi,locality:Mathura
 Road,city:Delhi,latitude:28.520727,longitude:77.294253},phone:011
 26955802, 011 26955803, 011 26955804,cuisines:South
 Indian,timings:11 AM to 11
 PM,avgCostForTwo:450,isPureVeg:1,hasBar:0,hasDineIn:1,hasDelivery:1,acceptsCreditCards:1,serviceCharge:0,vat:1,editorRating:{food:2.5,service:3.5,ambience:2,overall:3},editorReview:,userReviews:{count:2,0:{review:{id:24728,rating:0,reviewText:yyejbbxzszbxzbomato.comForDevelopmentPurposes,author:Arup
 Saha,reviewTime:2012-01-25 16:23:10,reviewTimeFriendly:2 months
 ago}},1:{review:{id:24727,rating:5,reviewText:testReviewOnZomato.comForDevelopmentPurposes,author:Arup
 Saha,reviewTime:2012-01-25 16:14:16,reviewTimeFriendly:2 months
 ago}}},discounts:[],photos:{photos_url:http:\/\/www.zomato.com
 \/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315\/photos#tabtop,0:{photo:{thumbUrl:http:\/\/
 www.zomato.com
 \/data\/pictures\/chains\/305\/1_thumb.jpg,url:http:\/\/
 www.zomato.com
 \/data\/pictures\/chains\/305\/1.jpg}}},image_470_310:,image_310_310:,image_310_150:,image_150_150:,menu:{menu_url:http:\/\/
 www.zomato.com
 \/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315\/menu#tabtop}}
 * 

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

[android-developers] Re: can i get a dynamically change user interface in android?

2012-04-04 Thread ramalakshmi

Thank u.Actually I want the output as stock values.
I get a table of values in the android screen.
I want to change the values  dynamically as the values in the stock
changing?
Did u understand me?
ramalakshmi

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Someone use GridLayout (ADT-17) in v7?

2012-04-04 Thread Siddharth Menon
Hi,

So finally give GridLayout support for older version.


   1. Added GridLayout project from sdk/extras/android/support/
   v7/gridlayout
   2. Added this project as lib to my working project (Target API 7 to 15)
   3. Now in the XML when I use GridLayout or android.widget.GridLayout 
   I get the following error

 GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML)

Can somebody please guide me what is that I am doing wrong?


Cheers
Siddharth Menon


On Friday, March 23, 2012 12:36:16 AM UTC+5:30, André Luiz R. Silva wrote:

 Someone use GridLayout  (ADT-17) in v7?

 Errors:
 [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable 
 to find attribute android:layout_marginEnd
 [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable 
 to find attribute android:layout_marginStart

 Use sdk/extras/android/support/v7/gridlayout.

 -- 
 *Atenciosamente,

 André Luiz R. Silva
 @andreronsilva*

 

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

[android-developers] Re: can i get a dynamically change user interface in android?

2012-04-04 Thread ramalakshmi


can u really do it?

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


[android-developers] Fwd: گزارش عملكرد-66* اهداي 2 و نيم ميليون تومان مساعدت به خانواده محروم كنگاوري

2012-04-04 Thread hosein bitaraf
-- Forwarded message --
From: خيريه همت hemmat1...@gmail.com
Date: Wed, Apr 4, 2012 at 4:35 PM
Subject: گزارش عملكرد-66* اهداي 2 و نيم ميليون تومان مساعدت به خانواده
محروم كنگاوري
To:




-- 
*
_*
*بسم الله الرحمن الرحیم*
**

اللهم صل علي محمد و آل محمد و عجل فرجهم

با سلام به محضر نوراني دوستان نازنينم

به استحضار مي رساند با همت شما بزرگواران و لطف خداوند متعال مبلغ 2 و نيم
ميليون تومان كمك و مساعدت ويژه به منظور پرداخت بخشي از متمم مورد نياز براي
پرداخت بخشي از متمم حق بيمه سرپرست خانواري محروم در شهرستان كنگاور براي
تكميل شدن سابقه ده ساله بيمه تامين
اجتماعيhttp://sandoghhemat.ir/post-112.aspxهديه گرديد.

خداوند تبارك و تعالي به همگي طول عمر با عزت عنايت كند.
يا علي
*



شيوه واريز كمكها به صندوق
شماره حساب:**008**-**2396820**-**010**
شماره كارت:**7825**-4471-**9914**-**6037**
*
* IR94 0170  0010 2396 8200 08:شماره شبا *
*به نام مهدي قمصريان
__
لینک واریز اینترنتی کارت به کارت بانک
ملیhttps://epayment4.bmi.ir/MoneyTransfare
**
__
*
شماره پیامک خیریه: 30007227005300
http://sandoghhemat.ir

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Fwd: فراخوان فوري* براي ترخيص مادري به همراه دوقلوهايش ما را كمك كنيد

2012-04-04 Thread hosein bitaraf
-- Forwarded message --
From: خيريه همت hemmat1...@gmail.com
Date: Wed, Apr 4, 2012 at 4:52 PM
Subject: فراخوان فوري* براي ترخيص مادري به همراه دوقلوهايش ما را كمك كنيد
To:


-- 
*
_*
*بسم الله الرحمن الرحیم*

براي ترخيص مادري به همراه دوقلوهايش ما را كمك
كنيدhttp://sandoghhemat.ir/post-114.aspx


آدم بعضی وقتها تو کار خدا می مونه! البته خیلی وقتها!

داستان تقدیر خداوند در دادن بچه به مردم از این نوع حکایتهاست.

خیلی از آدم پولدار‌ها دنبال کلی دوا و دکترند یه کوچولو خدا بهشون بده ارث و
میراثشون بهش برسه بعضی ها هم مثل این کارگر قصه ما خدا بهش دو تا دوتا بچه
میده با این همه دردسر!

صادق، کارگر ساده یک جلدسازی در محدوده خيابان منوچهری تهران است و یک دختر 6
ساله دارد.

تازگی خداوند به او دو فرشته کوچک عطا کرده است اما امان از دست این
بیمارستانها که مي خواهند از صادق به خاطر نارسايي ريوي دوقلوها و برای
نگهداری هر شب هر نوزاد در دستگاه ويژه، 600 هزار تومان دريافت کنند.

یعنی برای آقا صادق، هر شب نگهداری از این دوقلوها  یک میلیون و دویست هزار
تومان آب می‌خوره!

حساب کنید؛ این بنده خدا تا آخر عمرش نمی‌تونه  حج مشرف بشه اما برای این دو
کوچولو باید هرشب هزینه یک ماه خورد و خوراک و سفر به کشور عربستان رو پرداخت
کنه!

اونم به گفته دکترا حداقل چهار روز! = یعنی با این احتساب 4 میلیون و 800 هزار
تومان ناقابل!

باور کنید برای آدم هایی مثل صادق که درآمدشون به طور متوسط در ماه 400 هزار
تومان هم نیست جور کردن این رقم کار آسونی نیست؛ مگر اینکه همتی ها برای اینکه
گل لبخند بر لبان این کارگر زحمت کش هم مثل همه ما که وقتی خدا بهمون بچه
می‌ده خوشحالیم دوتا دو تا بشکفه، یه یا علی بگند.

شاید هم 4 نفر که چندمین باره مکه مشرف شدند هزینه سفرشون رو خرج ترخیص این
بچه‌ها از بیمارستان کنند، خدا رو چی دیدی!

*تذكر مهم*
*درصورت عبور كمكها از سقف مورد نياز، صرف موارد خير بعدي خواهد شد*

*




شيوه واريز كمكها به صندوق
شماره حساب:**008**-**2396820**-**010**
شماره كارت:**7825**-4471-**9914**-**6037**
*
* IR94 0170  0010 2396 8200 08:شماره شبا *
*به نام مهدي قمصريان
__
لینک واریز اینترنتی کارت به کارت بانک
ملیhttps://epayment4.bmi.ir/MoneyTransfare
**
__
*
شماره پیامک خیریه: 30007227005300
http://sandoghhemat.ir

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

2012-04-04 Thread Graham Bright
Hi,

In class 1 I have a hashmap which I send to my
CustomAdapter.

   map.put(year, Apple);
   map.put(make, Mango);
   map.put(model, Grape);
   map.put(style, Orange);
   map.put(series, Peach);
   Log.d(TAG, HELLO WORLD  + map.entrySet());
   //link to my adapter
   setListAdapter(new MyCustomAdapter(DynamicLists.this,
R.layout.row, map));


but in class 2 my MyCustomAdapter getView function is not getting
called, can you help understand why ?

thanks

CODE
package gb.org;



import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;


//class 1
public class DynamicLists extends ListActivity {


//class 2
public class MyCustomAdapter extends BaseAdapter {
String my_VALUES;
public MyCustomAdapter(Context context, int
textViewResourceId,HashMapString, String map) {
Log.d(TAG, HELLO WORLD INSIDE ADAPTER  + map.entrySet());
String[][] array = new String[map.size()][2];
int count = 0;
String combined=;
for(Map.EntryString, String entry : map.entrySet()){
combined=+entry.getKey()++entry.getValue();
count++;
}
my_VALUES = combined;
//iternate over hashmap
// TODO Auto-generated constructor stub
}
@Override
public View getView(int position, View convertView, ViewGroup
parent) {
// TODO Auto-generated method stub
   Log.d(TAG, inside getview  );
View row=convertView;

if (row==null){
LayoutInflater inflater=getLayoutInflater();
row=inflater.inflate(R.layout.row, null);
}

TextView label =(TextView)row.findViewById(R.id.blocked);
label.setText(my_VALUES);

return row;

}

@Override
public int getCount() {
// TODO Auto-generated method stub
return 0;
}


@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return null;
}


@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return 0;
}
}  //end of class 2







private static final String TAG = Example;



public static  HashMapString, String map = new HashMapString,
String();

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   //tie data to list, call constructor MyCustomAdapter
   //populate the list. ArrayAdapter takes current class, layout
and array
   map.put(year, Apple);
   map.put(make, Mango);
   map.put(model, Grape);
   map.put(style, Orange);
   map.put(series, Peach);
   Log.d(TAG, HELLO WORLD  + map.entrySet());
   //link to my adapter
   setListAdapter(new MyCustomAdapter(DynamicLists.this,
R.layout.row, map));


}


@Override
protected void onListItemClick(ListView l, View v, int position,
long id) {
// TODO Auto-generated method stub
//super.onListItemClick(l, v, position, id);
String selection = l.getItemAtPosition(position).toString();
Toast.makeText(this, selection, Toast.LENGTH_LONG).show();



}


} //end of class 1



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

2012-04-04 Thread TreKing
On Wed, Apr 4, 2012 at 6:15 AM, Mark mlybar...@gmail.com wrote:

 themes don't quite seem to handle what's needed.  i have one
 application or project that i want to deploy as 2 applications. build
 as app a, then build as app b.  i can easily copy in / out a different
 resource folder, but that doesn't handle the application package.


Oh. I was confused with your talk of branding.


  each app in the store needs a different package.  my app code uses
 the namespace, org.bnb for the classes, but i want to deploy for
 Bob's Bed n Breakfast and for Sue's Bed and Breakfast, com.bbnb
 and com.sbnb.  Android seems to use the package name as the
 application name (from the manifest).  i've been able to override thus
 far the package name that the R class uses, but when i try to run, the
 other classes seem to want to come from the manifest package naming.

 ar.

 any help on this is most appreciated.  android could use an app name
 and keep that separate from the code naming.


Create a base library project that has all the core code. Then derive a new
app / project / brand that uses that library project with a new package
name for each version you want.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] getview in customadapter not called

2012-04-04 Thread Kostya Vasilyev
Why would it, if your adapter says there are no data items?

@Override
   public int getCount() {
   // TODO Auto-generated method stub
   return 0;
   }

-- K

4 апреля 2012 г. 16:51 пользователь Graham Bright
gbwienmobil...@gmail.comнаписал:

 Hi,

 In class 1 I have a hashmap which I send to my
 CustomAdapter.

   map.put(year, Apple);
   map.put(make, Mango);
   map.put(model, Grape);
   map.put(style, Orange);
   map.put(series, Peach);
   Log.d(TAG, HELLO WORLD  + map.entrySet());
   //link to my adapter
   setListAdapter(new MyCustomAdapter(DynamicLists.this,
 R.layout.row, map));


 but in class 2 my MyCustomAdapter getView function is not getting
 called, can you help understand why ?

 thanks

 CODE
 package gb.org;



import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;


//class 1
public class DynamicLists extends ListActivity {


//class 2
public class MyCustomAdapter extends BaseAdapter {
String my_VALUES;
public MyCustomAdapter(Context context, int
 textViewResourceId,HashMapString, String map) {
Log.d(TAG, HELLO WORLD INSIDE ADAPTER  + map.entrySet());
String[][] array = new String[map.size()][2];
int count = 0;
String combined=;
for(Map.EntryString, String entry : map.entrySet()){
combined=+entry.getKey()++entry.getValue();
count++;
}
my_VALUES = combined;
//iternate over hashmap
// TODO Auto-generated constructor stub
}
@Override
public View getView(int position, View convertView, ViewGroup
 parent) {
// TODO Auto-generated method stub
   Log.d(TAG, inside getview  );
View row=convertView;

if (row==null){
LayoutInflater inflater=getLayoutInflater();
row=inflater.inflate(R.layout.row, null);
}

TextView label =(TextView)row.findViewById(R.id.blocked);
label.setText(my_VALUES);

return row;

}

@Override
public int getCount() {
// TODO Auto-generated method stub
return 0;
}


@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return null;
}


@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return 0;
}
}  //end of class 2







private static final String TAG = Example;



public static  HashMapString, String map = new HashMapString,
 String();

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   //tie data to list, call constructor MyCustomAdapter
   //populate the list. ArrayAdapter takes current class, layout
 and array
   map.put(year, Apple);
   map.put(make, Mango);
   map.put(model, Grape);
   map.put(style, Orange);
   map.put(series, Peach);
   Log.d(TAG, HELLO WORLD  + map.entrySet());
   //link to my adapter
   setListAdapter(new MyCustomAdapter(DynamicLists.this,
 R.layout.row, map));


}


@Override
protected void onListItemClick(ListView l, View v, int position,
 long id) {
// TODO Auto-generated method stub
//super.onListItemClick(l, v, position, id);
String selection = l.getItemAtPosition(position).toString();
Toast.makeText(this, selection, Toast.LENGTH_LONG).show();



}


} //end of class 1



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

2012-04-04 Thread Meryeme Ayache
hey everyone please can you help me I am trying to build Android source
code and I keep getting this error make: ***
[out/host/linux-x86/obj/lib/libGLES_CM translator.so] Error 1 would you
please help me

-- 
Meryeme Ayache.*
**Third year Computer Science Student Engineer at
**Ecole Nationale Supérieure d'Informatique et d'Analyse des Systèmes
(Rabat)*
*Information Security System Major.
*
*
*
*
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Video Sharing to Facebook from Android App using share intent FAIL :( .

2012-04-04 Thread s.rawat
HI ,
I am trying to share the video on long press by using the share intent.I am
able to share the image (.jpg) but not able to share the videos on facebook.
*Following is my code.*

  Intent share = new Intent(Intent.ACTION_SEND);
  share.setType(video/3gpp);
  Uri uri = Uri.fromFile(new
File(imageFilePath));*//image file is the /mnt/sdcard/file
folder/file name with extension- 3gpp
*
  share.putExtra(Intent.EXTRA_STREAM, uri);
  startActivity(Intent.createChooser(share,Share
Video));


*I am getting this error .*

Retrieve application default SharedPreferences.
D/ACRA( 7160): Set OnSharedPreferenceChangeListener.
D/ACRA( 7160): ACRA is enabled for com.facebook.katana, intializing...
D/ACRA( 7160): Looking for error files in
/data/data/com.facebook.katana/app_acra-reports
D/dalvikvm( 7160): GC_CONCURRENT freed 746K, 48% free 3521K/6727K, external
1892K/2137K, paused 4ms+3ms
D/dalvikvm( 7160): GC_EXTERNAL_ALLOC freed 54K, 49% free 3484K/6727K,
external 1925K/2137K, paused 23ms
I/ActivityManager(  115): Displayed
com.facebook.katana/.activity.media.UploadVideoActivity: +1s201ms
D/dalvikvm(  192): GC_EXTERNAL_ALLOC freed 127K, 51% free 3096K/6215K,
external 7414K/7681K, paused 72ms
D/dalvikvm( 7160): GC_CONCURRENT freed 582K, 44% free 3891K/6919K, external
2360K/2837K, paused 2ms+3ms
D/dalvikvm( 7160): GC_CONCURRENT freed 1067K, 48% free 3954K/7495K,
external 2360K/2837K, paused 3ms+3ms
D/AndroidRuntime( 7160): Shutting down VM
W/dalvikvm( 7160): threadid=1: thread exiting with uncaught exception
(group=0x40015560)
E/ACRA( 7160): ACRA caught a NullPointerException exception for
com.facebook.katana. Building report.
D/ACRA( 7160): Retrieve application default SharedPreferences.
I/ACRA( 7160): READ_LOGS not allowed. ACRA will not include LogCat and
DropBox data.
D/dalvikvm( 7160): GC_CONCURRENT freed 1015K, 46% free 4128K/7623K,
external 2380K/2837K, paused 2ms+3ms
D/ACRA( 7160): Writing crash report file.
D/ACRA( 7160): Mark all pending reports as approved.
D/ACRA( 7160): Looking for error files in
/data/data/com.facebook.katana/app_acra-reports
V/ACRA( 7160): About to start ReportSenderWorker from #handleException
D/ACRA( 7160): Add user comment to null
D/ACRA( 7160): #checkAndSendReports - start
D/ACRA( 7160): Looking for error files in
/data/data/com.facebook.katana/app_acra-reports
I/ACRA( 7160): Sending file 1333563805000-approved.stacktrace
D/ACRA( 7160): Connect to
https://www.facebook.com/mobile/android_crash_logs/
D/ACRA( 7160): Setting httpPost headers
D/ACRA( 7160): Sending request to
https://www.facebook.com/mobile/android_crash_logs/
W/ResponseProcessCookies( 7160): Invalid cookie header: Set-Cookie:
datr=aER8T715TPEZWlWU-IknhcD0; expires=Fri, 04-Apr-2014 12:54:00 GMT;
path=/; domain=.facebook.com; httponly. Unable to parse expires attribute:
Fri
D/ACRA( 7160): #checkAndSendReports - finish
*E/AndroidRuntime( 7160): FATAL EXCEPTION: main
E/AndroidRuntime( 7160): java.lang.NullPointerException
E/AndroidRuntime( 7160): at
com.facebook.katana.service.method.VideoUpload.getRealPathFromURI(VideoUpload.java:144)
E/AndroidRuntime( 7160): at
com.facebook.katana.service.method.VideoUpload.start(VideoUpload.java:165)
E/AndroidRuntime( 7160): at
com.facebook.katana.binding.AppSession.postToService(AppSession.java:4212)
E/AndroidRuntime( 7160): at
com.facebook.katana.service.method.VideoUpload.RequestVideoUpload(VideoUpload.java:73)
E/AndroidRuntime( 7160): at
com.facebook.katana.activity.media.UploadVideoActivity.upload(UploadVideoActivity.java:209)
E/AndroidRuntime( 7160): at
com.facebook.katana.activity.media.UploadVideoActivity.onClick(UploadVideoActivity.java:169)
*
E/AndroidRuntime( 7160): at
android.view.View.performClick(View.java:2485)
E/AndroidRuntime( 7160): at
android.view.View$PerformClick.run(View.java:9080)
E/AndroidRuntime( 7160): at
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 7160): at
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 7160): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 7160): at
android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 7160): at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 7160): at
java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 7160): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 7160): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 7160): at dalvik.system.NativeStart.main(Native
Method)
W/ActivityManager(  115):   Force finishing activity
com.facebook.katana/.activity.media.UploadVideoActivity
W/ActivityManager(  115): Activity pause timeout for HistoryRecord{4088a158

Re: [android-developers] No validating SAX parser for android?

2012-04-04 Thread RedBullet
Any more ideas on this? I must be doing something obviously wrong, but 
perhaps there just isn't a validating SAX parser for Android? (though I 
would have expected someone on this list to say so)...

On Monday, April 2, 2012 12:40:13 PM UTC-4, RedBullet wrote:

 I just tried that and got the same error. No validaing SAX parser 
 implementaion available.

 On Monday, April 2, 2012 12:14:33 PM UTC-4, Daniel Drozdzewski wrote:

 ...so did you tell your parser the following:


 static final String GARMIN_SCHEMA_LANGUAGE =
 http://www.w3.org/2001/XMLSchema-instance;;

 static final String W3C_XML_SCHEMA =
 http://www.w3.org/2001/XMLSchema;;

   SAXParserFactory factory = SAXParserFactory.newInstance();
   factory.setNamespaceAware(true);
   factory.setValidating(true);
   saxParser.setProperty(GARMIN_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);

 ??

 On 2 April 2012 17:10, RedBullet  wrote:
  Yea, I read that. My XML contains the following so I thought that would 
 be
  sifficient:
  ?xml version=1.0 encoding=UTF-8?
  TrainingCenterDatabase
  xmlns=http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=
 http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2
  http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd;
 
  Isn't that how it is supposed to work??
 
 
  On Monday, April 2, 2012 12:01:42 PM UTC-4, Daniel Drozdzewski wrote:
 
  Did you tell your parser which schema will it be validating against?
  Setting validation flag to true is not enough...
 
  Have a look here at a quick validating example using SAXParser:
  http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html
 
  Daniel
 
  On 2 April 2012 16:34, RedBullet  wrote:
   I am parsing some XML with SAX, and I noticed that there was some 
 XSD in
   the
   files I am parsing.
  
   So, I figured to would turn validation on the factory before I get 
 the
   parse, but when I do I get an error saying there is no validating 
 parser
   available.
  
   So... How does one validate XML on the Android??
  
   --
 
  --
  Daniel Drozdzewski
 
  --

 -- 
 Daniel Drozdzewski



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Someone use GridLayout (ADT-17) in v7?

2012-04-04 Thread Tor Norbye
You need to use android.support.v7.widget.GridLayout.

-- Tor

On Wed, Apr 4, 2012 at 5:02 AM, Siddharth Menon
siddharthme...@gmail.com wrote:
 Hi,

 So finally give GridLayout support for older version.

 Added GridLayout project from sdk/extras/android/support/v7/gridlayout
 Added this project as lib to my working project (Target API 7 to 15)
 Now in the XML when I use GridLayout or android.widget.GridLayout I get
 the following error

  GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML)

 Can somebody please guide me what is that I am doing wrong?


 Cheers
 Siddharth Menon


 On Friday, March 23, 2012 12:36:16 AM UTC+5:30, André Luiz R. Silva wrote:

 Someone use GridLayout  (ADT-17) in v7?

 Errors:
 [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable
 to find attribute android:layout_marginEnd
 [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable
 to find attribute android:layout_marginStart

 Use sdk/extras/android/support/v7/gridlayout.

 --
 Atenciosamente,

 André Luiz R. Silva
 @andreronsilva

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

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


Re: [android-developers] Error building Android

2012-04-04 Thread TreKing
On Wed, Apr 4, 2012 at 8:00 AM, Meryeme Ayache meryemeaya...@gmail.comwrote:

 I am trying to build Android source code


Please ask your question about building the source on a more appropriate
list, like Android-Porting or Platform.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: (e-)books on Android XML Layouts: suggestions?

2012-04-04 Thread Streets Of Boston
I use this one for XML Drawables:
http://idunnolol.com/android/drawables.html 


On Tuesday, April 3, 2012 2:59:01 PM UTC-4, Spooky wrote:

 Working on my current project, one thing I am really missing is a good,
 solid, and *complete* reference covering Android XML layouts, widgets
 (from the XML side), etc., from beginner to advanced, with explanations,
 (maybe with examples, maybe not), and so on.

 A full book/e-book would be nice.  I would strongly prefer to have a
 print copy (or, again, e-book) where I could just look at the contents
 and/or index, find what I need, and read for the solutions rather than
 have to ask here so much.

 Suggestions, anyone?

 Thanks,
--jim

 -- 
 THE SCORE:  ME:  2  CANCER:  0
 73 DE N5IAL (/4)|  There it was, right in the title bar:
|   Microsoft Operations POS.
  Running FreeBSD 7.0  | 
 ICBM / Hurricane:   | Never before has a TLA been so appropriately
30.44406N 86.59909W  |  mis-parsed. (alt.sysadmin.recovery)

 Android Apps Listing at http://www.jstrack.org/barcodes.html



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

Re: [android-developers] No validating SAX parser for android?

2012-04-04 Thread Streets Of Boston
What about not validating the incoming XML?
Since i don't know what type of app you need the validating SAX parser for, 
but if your app just needs to read bits and pieces of incoming XML, you 
really don't need a validating XML. Just read the data and present it to 
the user. If the incoming data is not what you expect, i.e. after reading 
the XML you are still missing pieces of data and such, let your app handle 
this situation by itself.


On Wednesday, April 4, 2012 9:10:37 AM UTC-4, RedBullet wrote:

 Any more ideas on this? I must be doing something obviously wrong, but 
 perhaps there just isn't a validating SAX parser for Android? (though I 
 would have expected someone on this list to say so)...

 On Monday, April 2, 2012 12:40:13 PM UTC-4, RedBullet wrote:

 I just tried that and got the same error. No validaing SAX parser 
 implementaion available.

 On Monday, April 2, 2012 12:14:33 PM UTC-4, Daniel Drozdzewski wrote:

 ...so did you tell your parser the following:


 static final String GARMIN_SCHEMA_LANGUAGE =
 http://www.w3.org/2001/XMLSchema-instance;;

 static final String W3C_XML_SCHEMA =
 http://www.w3.org/2001/XMLSchema;;

   SAXParserFactory factory = SAXParserFactory.newInstance();
   factory.setNamespaceAware(true);
   factory.setValidating(true);
   saxParser.setProperty(GARMIN_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);

 ??

 On 2 April 2012 17:10, RedBullet  wrote:
  Yea, I read that. My XML contains the following so I thought that 
 would be
  sifficient:
  ?xml version=1.0 encoding=UTF-8?
  TrainingCenterDatabase
  xmlns=http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=
 http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2
  http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd;
 
  Isn't that how it is supposed to work??
 
 
  On Monday, April 2, 2012 12:01:42 PM UTC-4, Daniel Drozdzewski wrote:
 
  Did you tell your parser which schema will it be validating against?
  Setting validation flag to true is not enough...
 
  Have a look here at a quick validating example using SAXParser:
  http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html
 
  Daniel
 
  On 2 April 2012 16:34, RedBullet  wrote:
   I am parsing some XML with SAX, and I noticed that there was some 
 XSD in
   the
   files I am parsing.
  
   So, I figured to would turn validation on the factory before I get 
 the
   parse, but when I do I get an error saying there is no validating 
 parser
   available.
  
   So... How does one validate XML on the Android??
  
   --
 
  --
  Daniel Drozdzewski
 
  --

 -- 
 Daniel Drozdzewski



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: (e-)books on Android XML Layouts: suggestions?

2012-04-04 Thread Jim Graham
On Wed, Apr 04, 2012 at 06:32:36AM -0700, Streets Of Boston wrote:
 I use this one for XML Drawables:
 http://idunnolol.com/android/drawables.html 

THANKS!  That's exactly the kind of reference I'm looking for.  Now, if
anyone has any pointers to one that covers the rest of XML layouts, I
would greatly appreciate it/them.  :-)

Thanks again, this will no doubt be a big help.

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

  The iPad is a status symbol for yuppies. The Android
 is for people who actually want something that works.

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


[android-developers] MapActivity: Couldn't get connection factory client

2012-04-04 Thread giles ian
After a lot of googling I findout this error id because of invalid May Key.

And the reason for invalid May Key could be bad debug.keystore file.

Any solutions ??

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

2012-04-04 Thread guich
Hi,

Some users are having a very serious problem with some android devices
(motorola, samsung): after running the application for several hours,
some data files are being corrupted by the OS. The most strangest
thing is that these files are opened using fopen(.., rb), thus, in
read-only mode. They are never written from our code.

I can easily detect that the corruption occured when the program
starts. I was thinking, in this case, to call the installer again. I
know that the installer are stored at /data/app/*.apk. Is it possible
to call the installer from the application in a non-rooted android
device or is this blocked?

thanks

   guich

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

2012-04-04 Thread RDX 2104
ok Thanks

On Tue, Apr 3, 2012 at 9:33 PM, Justin Anderson magouyaw...@gmail.comwrote:

 Actually i want to develop an application which  read the content in the
 password protected zip files

 Actually my aim is to provide security to video files. When anyone access
 that files without that app then that files cannot to accessible to that
 person.

 And my question remains the same... What, specifically, does this have to
 do with Android SDK development?  Zip file manipulation is not
 android-specific.  Do a google search and try to find some zip tutorials in
 java.


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


 On Tue, Apr 3, 2012 at 9:52 AM, RDX 2104 rdx2...@gmail.com wrote:

 Actually i want to develop an application which  read the content in the
 password protected zip files

 Actually my aim is to provide security to video files. When anyone access
 that files without that app then that files cannot to accessible to that
 person.


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

2012-04-04 Thread Albert Rosa
Just curious where is the file you are opening stored? Is it within your
APK and within the Raw folder?

On Wed, Apr 4, 2012 at 10:07 AM, guich guiha...@gmail.com wrote:

 Hi,

 Some users are having a very serious problem with some android devices
 (motorola, samsung): after running the application for several hours,
 some data files are being corrupted by the OS. The most strangest
 thing is that these files are opened using fopen(.., rb), thus, in
 read-only mode. They are never written from our code.

 I can easily detect that the corruption occured when the program
 starts. I was thinking, in this case, to call the installer again. I
 know that the installer are stored at /data/app/*.apk. Is it possible
 to call the installer from the application in a non-rooted android
 device or is this blocked?

 thanks

   guich

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




-- 
Albert Rosa
(Phone) 646-389-ROSA
rosalb...@gmail.com | http://www.albert-rosa.com |
http://blog.albert-rosa.com
Twitter: http://twitter.com/albertrosa | LinkedIn:
http://linkedin.com/in/albertrosa

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Video Sharing to Facebook from Android App using share intent FAIL :( .

2012-04-04 Thread James Black
You could have shortened the code, but it appears your app doesn't have
permission to read from the data directory.

So ask for permission and gracefully handle when it doesn't read the file.
On Apr 4, 2012 9:08 AM, s.rawat imsaurabhra...@gmail.com wrote:

 HI ,
 I am trying to share the video on long press by using the share intent.I
 am able to share the image (.jpg) but not able to share the videos on
 facebook.
 *Following is my code.*

   Intent share = new Intent(Intent.ACTION_SEND);
   share.setType(video/3gpp);
   Uri uri = Uri.fromFile(new File(imageFilePath));
 * //image file is the /mnt/sdcard/file folder/file name with extension-
 3gpp*
   share.putExtra(Intent.EXTRA_STREAM, uri);
   startActivity(Intent.createChooser(share,Share
 Video));


 *I am getting this error .*

 Retrieve application default SharedPreferences.
 D/ACRA( 7160): Set OnSharedPreferenceChangeListener.
 D/ACRA( 7160): ACRA is enabled for com.facebook.katana, intializing...
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 D/dalvikvm( 7160): GC_CONCURRENT freed 746K, 48% free 3521K/6727K,
 external 1892K/2137K, paused 4ms+3ms
 D/dalvikvm( 7160): GC_EXTERNAL_ALLOC freed 54K, 49% free 3484K/6727K,
 external 1925K/2137K, paused 23ms
 I/ActivityManager(  115): Displayed
 com.facebook.katana/.activity.media.UploadVideoActivity: +1s201ms
 D/dalvikvm(  192): GC_EXTERNAL_ALLOC freed 127K, 51% free 3096K/6215K,
 external 7414K/7681K, paused 72ms
 D/dalvikvm( 7160): GC_CONCURRENT freed 582K, 44% free 3891K/6919K,
 external 2360K/2837K, paused 2ms+3ms
 D/dalvikvm( 7160): GC_CONCURRENT freed 1067K, 48% free 3954K/7495K,
 external 2360K/2837K, paused 3ms+3ms
 D/AndroidRuntime( 7160): Shutting down VM
 W/dalvikvm( 7160): threadid=1: thread exiting with uncaught exception
 (group=0x40015560)
 E/ACRA( 7160): ACRA caught a NullPointerException exception for
 com.facebook.katana. Building report.
 D/ACRA( 7160): Retrieve application default SharedPreferences.
 I/ACRA( 7160): READ_LOGS not allowed. ACRA will not include LogCat and
 DropBox data.
 D/dalvikvm( 7160): GC_CONCURRENT freed 1015K, 46% free 4128K/7623K,
 external 2380K/2837K, paused 2ms+3ms
 D/ACRA( 7160): Writing crash report file.
 D/ACRA( 7160): Mark all pending reports as approved.
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 V/ACRA( 7160): About to start ReportSenderWorker from #handleException
 D/ACRA( 7160): Add user comment to null
 D/ACRA( 7160): #checkAndSendReports - start
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 I/ACRA( 7160): Sending file 1333563805000-approved.stacktrace
 D/ACRA( 7160): Connect to
 https://www.facebook.com/mobile/android_crash_logs/
 D/ACRA( 7160): Setting httpPost headers
 D/ACRA( 7160): Sending request to
 https://www.facebook.com/mobile/android_crash_logs/
 W/ResponseProcessCookies( 7160): Invalid cookie header: Set-Cookie:
 datr=aER8T715TPEZWlWU-IknhcD0; expires=Fri, 04-Apr-2014 12:54:00 GMT;
 path=/; domain=.facebook.com; httponly. Unable to parse expires
 attribute: Fri
 D/ACRA( 7160): #checkAndSendReports - finish
 *E/AndroidRuntime( 7160): FATAL EXCEPTION: main
 E/AndroidRuntime( 7160): java.lang.NullPointerException
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.getRealPathFromURI(VideoUpload.java:144)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.start(VideoUpload.java:165)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.binding.AppSession.postToService(AppSession.java:4212)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.RequestVideoUpload(VideoUpload.java:73)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.activity.media.UploadVideoActivity.upload(UploadVideoActivity.java:209)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.activity.media.UploadVideoActivity.onClick(UploadVideoActivity.java:169)
 *
 E/AndroidRuntime( 7160): at
 android.view.View.performClick(View.java:2485)
 E/AndroidRuntime( 7160): at
 android.view.View$PerformClick.run(View.java:9080)
 E/AndroidRuntime( 7160): at
 android.os.Handler.handleCallback(Handler.java:587)
 E/AndroidRuntime( 7160): at
 android.os.Handler.dispatchMessage(Handler.java:92)
 E/AndroidRuntime( 7160): at android.os.Looper.loop(Looper.java:130)
 E/AndroidRuntime( 7160): at
 android.app.ActivityThread.main(ActivityThread.java:3683)
 E/AndroidRuntime( 7160): at
 java.lang.reflect.Method.invokeNative(Native Method)
 E/AndroidRuntime( 7160): at
 java.lang.reflect.Method.invoke(Method.java:507)
 E/AndroidRuntime( 7160): at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
 E/AndroidRuntime( 7160): 

[android-developers] Re: resintalling application due to data corruption

2012-04-04 Thread guich
Its in the /data/data/app folder

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

2012-04-04 Thread RedBullet
That's sort of what I am doing now. Seems kind of unsatisfying ;-)

Just wanted to know what my options were...

It is confusing because the docs seem to imply that one can do validation...

On Wednesday, April 4, 2012 9:39:07 AM UTC-4, Streets Of Boston wrote:

 What about not validating the incoming XML?
 Since i don't know what type of app you need the validating SAX parser 
 for, but if your app just needs to read bits and pieces of incoming XML, 
 you really don't need a validating XML. Just read the data and present it 
 to the user. If the incoming data is not what you expect, i.e. after 
 reading the XML you are still missing pieces of data and such, let your app 
 handle this situation by itself.


 On Wednesday, April 4, 2012 9:10:37 AM UTC-4, RedBullet wrote:

 Any more ideas on this? I must be doing something obviously wrong, but 
 perhaps there just isn't a validating SAX parser for Android? (though I 
 would have expected someone on this list to say so)...

 On Monday, April 2, 2012 12:40:13 PM UTC-4, RedBullet wrote:

 I just tried that and got the same error. No validaing SAX parser 
 implementaion available.

 On Monday, April 2, 2012 12:14:33 PM UTC-4, Daniel Drozdzewski wrote:

 ...so did you tell your parser the following:


 static final String GARMIN_SCHEMA_LANGUAGE =
 http://www.w3.org/2001/XMLSchema-instance;;

 static final String W3C_XML_SCHEMA =
 http://www.w3.org/2001/XMLSchema;;

   SAXParserFactory factory = SAXParserFactory.newInstance();
   factory.setNamespaceAware(true);
   factory.setValidating(true);
   saxParser.setProperty(GARMIN_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);

 ??

 On 2 April 2012 17:10, RedBullet  wrote:
  Yea, I read that. My XML contains the following so I thought that 
 would be
  sifficient:
  ?xml version=1.0 encoding=UTF-8?
  TrainingCenterDatabase
  xmlns=http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=
 http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2
  http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd;
 
  Isn't that how it is supposed to work??
 
 
  On Monday, April 2, 2012 12:01:42 PM UTC-4, Daniel Drozdzewski wrote:
 
  Did you tell your parser which schema will it be validating against?
  Setting validation flag to true is not enough...
 
  Have a look here at a quick validating example using SAXParser:
  http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html
 
  Daniel
 
  On 2 April 2012 16:34, RedBullet  wrote:
   I am parsing some XML with SAX, and I noticed that there was some 
 XSD in
   the
   files I am parsing.
  
   So, I figured to would turn validation on the factory before I get 
 the
   parse, but when I do I get an error saying there is no validating 
 parser
   available.
  
   So... How does one validate XML on the Android??
  
   --
 
  --
  Daniel Drozdzewski
 
  --

 -- 
 Daniel Drozdzewski



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Video Sharing to Facebook from Android App using share intent FAIL :( .

2012-04-04 Thread s.rawat
How short?
I am using
* uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE
/ *
in the manifest
and
 data android:mimeType=video/* /
in the Intent Filter for the app/
Still getting the same crash.
..pain is temporary.quitting lasts forever.
 My Blog http://techshek4u.blogspot.in/



On Wed, Apr 4, 2012 at 7:57 PM, James Black planiturth...@gmail.com wrote:

 You could have shortened the code, but it appears your app doesn't have
 permission to read from the data directory.

 So ask for permission and gracefully handle when it doesn't read the file.
 On Apr 4, 2012 9:08 AM, s.rawat imsaurabhra...@gmail.com wrote:

 HI ,
 I am trying to share the video on long press by using the share intent.I
 am able to share the image (.jpg) but not able to share the videos on
 facebook.
 *Following is my code.*

   Intent share = new Intent(Intent.ACTION_SEND);
   share.setType(video/3gpp);
   Uri uri = Uri.fromFile(new File(imageFilePath));
 * //image file is the /mnt/sdcard/file folder/file name with extension-
 3gpp*
   share.putExtra(Intent.EXTRA_STREAM, uri);
   startActivity(Intent.createChooser(share,Share
 Video));


 *I am getting this error .*

 Retrieve application default SharedPreferences.
 D/ACRA( 7160): Set OnSharedPreferenceChangeListener.
 D/ACRA( 7160): ACRA is enabled for com.facebook.katana, intializing...
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 D/dalvikvm( 7160): GC_CONCURRENT freed 746K, 48% free 3521K/6727K,
 external 1892K/2137K, paused 4ms+3ms
 D/dalvikvm( 7160): GC_EXTERNAL_ALLOC freed 54K, 49% free 3484K/6727K,
 external 1925K/2137K, paused 23ms
 I/ActivityManager(  115): Displayed
 com.facebook.katana/.activity.media.UploadVideoActivity: +1s201ms
 D/dalvikvm(  192): GC_EXTERNAL_ALLOC freed 127K, 51% free 3096K/6215K,
 external 7414K/7681K, paused 72ms
 D/dalvikvm( 7160): GC_CONCURRENT freed 582K, 44% free 3891K/6919K,
 external 2360K/2837K, paused 2ms+3ms
 D/dalvikvm( 7160): GC_CONCURRENT freed 1067K, 48% free 3954K/7495K,
 external 2360K/2837K, paused 3ms+3ms
 D/AndroidRuntime( 7160): Shutting down VM
 W/dalvikvm( 7160): threadid=1: thread exiting with uncaught exception
 (group=0x40015560)
 E/ACRA( 7160): ACRA caught a NullPointerException exception for
 com.facebook.katana. Building report.
 D/ACRA( 7160): Retrieve application default SharedPreferences.
 I/ACRA( 7160): READ_LOGS not allowed. ACRA will not include LogCat
 and DropBox data.
 D/dalvikvm( 7160): GC_CONCURRENT freed 1015K, 46% free 4128K/7623K,
 external 2380K/2837K, paused 2ms+3ms
 D/ACRA( 7160): Writing crash report file.
 D/ACRA( 7160): Mark all pending reports as approved.
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 V/ACRA( 7160): About to start ReportSenderWorker from #handleException
 D/ACRA( 7160): Add user comment to null
 D/ACRA( 7160): #checkAndSendReports - start
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 I/ACRA( 7160): Sending file 1333563805000-approved.stacktrace
 D/ACRA( 7160): Connect to
 https://www.facebook.com/mobile/android_crash_logs/
 D/ACRA( 7160): Setting httpPost headers
 D/ACRA( 7160): Sending request to
 https://www.facebook.com/mobile/android_crash_logs/
 W/ResponseProcessCookies( 7160): Invalid cookie header: Set-Cookie:
 datr=aER8T715TPEZWlWU-IknhcD0; expires=Fri, 04-Apr-2014 12:54:00 GMT;
 path=/; domain=.facebook.com; httponly. Unable to parse expires
 attribute: Fri
 D/ACRA( 7160): #checkAndSendReports - finish
 *E/AndroidRuntime( 7160): FATAL EXCEPTION: main
 E/AndroidRuntime( 7160): java.lang.NullPointerException
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.getRealPathFromURI(VideoUpload.java:144)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.start(VideoUpload.java:165)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.binding.AppSession.postToService(AppSession.java:4212)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.RequestVideoUpload(VideoUpload.java:73)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.activity.media.UploadVideoActivity.upload(UploadVideoActivity.java:209)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.activity.media.UploadVideoActivity.onClick(UploadVideoActivity.java:169)
 *
 E/AndroidRuntime( 7160): at
 android.view.View.performClick(View.java:2485)
 E/AndroidRuntime( 7160): at
 android.view.View$PerformClick.run(View.java:9080)
 E/AndroidRuntime( 7160): at
 android.os.Handler.handleCallback(Handler.java:587)
 E/AndroidRuntime( 7160): at
 android.os.Handler.dispatchMessage(Handler.java:92)
 E/AndroidRuntime( 7160): at android.os.Looper.loop(Looper.java:130)
 

[android-developers] customAdapter how to print out content of array in TextView.setText() of getview

2012-04-04 Thread Graham Bright
Hi,

I have written a CustomAdapter to display a list of hash key+value
items as a list. But I am stuck on the line below.

label.setText(my_VALUES[0])

Class two is my CustomAdapter and I am passing it a hashMap

public MyCustomAdapter(DynamicLists dynamicLists, int row,
HashMapString,String data)

here I combine key+value pairs and I assign them to an array called
my_VALUES. But I don't know if this is correct?

How can I print out each KEY+VALUE pair as a seperate item in getview.
at the moment I can only use label.setText(my_VALUES[0])

Thanks

graham
package gb.org;


//lists are not checkboxes
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;


//class 1
public class DynamicLists extends ListActivity {



//class 2
public class MyCustomAdapter extends BaseAdapter {
private HashMapString,String mData = new
HashMapString,String();
private String[] mKeys;
String[] my_VALUES = new String[100];



public MyCustomAdapter(DynamicLists dynamicLists, int row,
HashMapString,String data){
mData = data;
mKeys = mData.keySet().toArray(new String[data.size()]);
Log.d(TAG, INSIDE ADAPTER HELLO WORLD  + map.entrySet());


String[] array = new String[map.size()];
int count = 0;
String combined=;
for(Map.EntryString, String entry : map.entrySet()){
combined=A+entry.getKey()+B+entry.getValue();

my_VALUES[count]=combined;
Log.d(TAG,  my_VALUES  + my_VALUES);
count++;


}


}

@Override
public View getView(int position, View convertView, ViewGroup
parent) {
// TODO Auto-generated method stub
String key = mKeys[position];
String Value = getItem(position).toString();

//do your view stuff here
Log.d(TAG, inside getview  );
View row=convertView;

if (row==null){
LayoutInflater inflater=getLayoutInflater();
row=inflater.inflate(R.layout.row, null);
}

TextView label =(TextView)row.findViewById(R.id.blocked);
label.setText(my_VALUES[0]);  //printing out the last value

return row;

}
@Override
public int getCount() {

// TODO Auto-generated method stub
return mData.size();
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return mData.get(mKeys[position]);
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}


}  //end of class 2



private static final String TAG = Example;


//class 1


public static  HashMapString, String map = new HashMapString,
String();

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   //tie data to list, call constructor MyCustomAdapter
   //populate the list. ArrayAdapter takes current class, layout
and array
   map.put(year, Apple);
   map.put(make, Mango);
   map.put(model, Grape);
   map.put(style, Orange);
   map.put(series, Peach);
   Log.d(TAG, HELLO WORLD  + map.entrySet());
   //link to my adapter
   setListAdapter(new MyCustomAdapter(DynamicLists.this,
R.layout.row, map));

}


@Override
protected void onListItemClick(ListView l, View v, int position,
long id) {
// TODO Auto-generated method stub
//super.onListItemClick(l, v, position, id);
String selection = l.getItemAtPosition(position).toString();
Toast.makeText(this, selection, Toast.LENGTH_LONG).show();


}


} //end of class 1






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


[android-developers] Re: No validating SAX parser for android?

2012-04-04 Thread Chuck Krutsinger
Here is the code for Android's SAXParserFactoryImpl.java:


@Override
public SAXParser newSAXParser() throws
ParserConfigurationException {
if (isValidating()) {
throw new ParserConfigurationException(
No validating SAXParser implementation
available);
}

try {
return new SAXParserImpl(features);
} catch (Exception ex) {
throw new ParserConfigurationException(ex.toString());
}
}

The Android DOM parser DocumentBuilderFactory has something very
similar.  Neither supports validation.  You have to find a 3rd party
parser of you want to validate.

On Apr 4, 8:36 am, RedBullet scottedchap...@gmail.com wrote:
 That's sort of what I am doing now. Seems kind of unsatisfying ;-)

 Just wanted to know what my options were...

 It is confusing because the docs seem to imply that one can do validation...







 On Wednesday, April 4, 2012 9:39:07 AM UTC-4, Streets Of Boston wrote:

  What about not validating the incoming XML?
  Since i don't know what type of app you need the validating SAX parser
  for, but if your app just needs to read bits and pieces of incoming XML,
  you really don't need a validating XML. Just read the data and present it
  to the user. If the incoming data is not what you expect, i.e. after
  reading the XML you are still missing pieces of data and such, let your app
  handle this situation by itself.

  On Wednesday, April 4, 2012 9:10:37 AM UTC-4, RedBullet wrote:

  Any more ideas on this? I must be doing something obviously wrong, but
  perhaps there just isn't a validating SAX parser for Android? (though I
  would have expected someone on this list to say so)...

  On Monday, April 2, 2012 12:40:13 PM UTC-4, RedBullet wrote:

  I just tried that and got the same error. No validaing SAX parser
  implementaion available.

  On Monday, April 2, 2012 12:14:33 PM UTC-4, Daniel Drozdzewski wrote:

  ...so did you tell your parser the following:

  static final String GARMIN_SCHEMA_LANGUAGE =
      http://www.w3.org/2001/XMLSchema-instance;;

  static final String W3C_XML_SCHEMA =
      http://www.w3.org/2001/XMLSchema;;

    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    saxParser.setProperty(GARMIN_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);

  ??

  On 2 April 2012 17:10, RedBullet  wrote:
   Yea, I read that. My XML contains the following so I thought that
  would be
   sifficient:
   ?xml version=1.0 encoding=UTF-8?
   TrainingCenterDatabase
   xmlns=http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=
 http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2
  http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd;

   Isn't that how it is supposed to work??

   On Monday, April 2, 2012 12:01:42 PM UTC-4, Daniel Drozdzewski wrote:

   Did you tell your parser which schema will it be validating against?
   Setting validation flag to true is not enough...

   Have a look here at a quick validating example using SAXParser:
  http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html

   Daniel

   On 2 April 2012 16:34, RedBullet  wrote:
I am parsing some XML with SAX, and I noticed that there was some
  XSD in
the
files I am parsing.

So, I figured to would turn validation on the factory before I get
  the
parse, but when I do I get an error saying there is no validating
  parser
available.

So... How does one validate XML on the Android??

--

   --
   Daniel Drozdzewski

   --

  --
  Daniel Drozdzewski

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

2012-04-04 Thread Ted Scott
Try here http://javaranch.com or perhaps take a Java course? Android 
development is much easier when you speak the language.


On 4/4/2012 4:48 AM, Graham Bright wrote:

Hi,

I can't figure out why I am getting and out of bounds exception ? Any
ideas



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

2012-04-04 Thread Daniel Drozdzewski
Then there is this package (since API level 8):
http://developer.android.com/reference/javax/xml/validation/package-summary.html

Shame that it is not SAX, as here you parse the whole lot and then validate.

Daniel



On 4 April 2012 16:06, Chuck Krutsinger chuck.krutsin...@gmail.com wrote:
 Here is the code for Android's SAXParserFactoryImpl.java:


    @Override
    public SAXParser newSAXParser() throws
 ParserConfigurationException {
        if (isValidating()) {
            throw new ParserConfigurationException(
                    No validating SAXParser implementation
 available);
        }

        try {
            return new SAXParserImpl(features);
        } catch (Exception ex) {
            throw new ParserConfigurationException(ex.toString());
        }
    }

 The Android DOM parser DocumentBuilderFactory has something very
 similar.  Neither supports validation.  You have to find a 3rd party
 parser of you want to validate.

 On Apr 4, 8:36 am, RedBullet scottedchap...@gmail.com wrote:
 That's sort of what I am doing now. Seems kind of unsatisfying ;-)

 Just wanted to know what my options were...

 It is confusing because the docs seem to imply that one can do validation...







 On Wednesday, April 4, 2012 9:39:07 AM UTC-4, Streets Of Boston wrote:

  What about not validating the incoming XML?
  Since i don't know what type of app you need the validating SAX parser
  for, but if your app just needs to read bits and pieces of incoming XML,
  you really don't need a validating XML. Just read the data and present it
  to the user. If the incoming data is not what you expect, i.e. after
  reading the XML you are still missing pieces of data and such, let your app
  handle this situation by itself.

  On Wednesday, April 4, 2012 9:10:37 AM UTC-4, RedBullet wrote:

  Any more ideas on this? I must be doing something obviously wrong, but
  perhaps there just isn't a validating SAX parser for Android? (though I
  would have expected someone on this list to say so)...

  On Monday, April 2, 2012 12:40:13 PM UTC-4, RedBullet wrote:

  I just tried that and got the same error. No validaing SAX parser
  implementaion available.

  On Monday, April 2, 2012 12:14:33 PM UTC-4, Daniel Drozdzewski wrote:

  ...so did you tell your parser the following:

  static final String GARMIN_SCHEMA_LANGUAGE =
      http://www.w3.org/2001/XMLSchema-instance;;

  static final String W3C_XML_SCHEMA =
      http://www.w3.org/2001/XMLSchema;;

    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    saxParser.setProperty(GARMIN_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);

  ??

  On 2 April 2012 17:10, RedBullet  wrote:
   Yea, I read that. My XML contains the following so I thought that
  would be
   sifficient:
   ?xml version=1.0 encoding=UTF-8?
   TrainingCenterDatabase
   xmlns=http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=
 http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2
  http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd;

   Isn't that how it is supposed to work??

   On Monday, April 2, 2012 12:01:42 PM UTC-4, Daniel Drozdzewski wrote:

   Did you tell your parser which schema will it be validating against?
   Setting validation flag to true is not enough...

   Have a look here at a quick validating example using SAXParser:
  http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html

   Daniel

   On 2 April 2012 16:34, RedBullet  wrote:
I am parsing some XML with SAX, and I noticed that there was some
  XSD in
the
files I am parsing.

So, I figured to would turn validation on the factory before I get
  the
parse, but when I do I get an error saying there is no validating
  parser
available.

So... How does one validate XML on the Android??

--

   --
   Daniel Drozdzewski

   --

  --
  Daniel Drozdzewski

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



-- 
Daniel Drozdzewski

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Large data downloads from a Web app to Android client getting Out of memory error

2012-04-04 Thread FractalBob
Yes, it is a single 5 MB line; so how do I fix it? I tried downloading
in small chunks, saving to a file and reopening, but it's the same
problem. The data, a kind of mail attachment, is a music file and is
eventually loaded into an MP3 player. I can't simply point the player
to the file, unfortunately; too much legacy code.

On Apr 3, 9:19 pm, TreKing treking...@gmail.com wrote:
 On Tue, Apr 3, 2012 at 10:57 PM, FractalBob ruom...@gmail.com wrote:
  Anyone have any ideas on why this is happening

 The error tells you exactly why: you are running out of memory.

  and how to fix it?

 Inspect your response in a web browser first. Is it valid? For example, is
 it one giant 5MB line? That would be a problem.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


Re: [android-developers] Re: How can I use Google Maps in Android Apps

2012-04-04 Thread Mark Murphy
On Tue, Apr 3, 2012 at 8:14 PM, g...@deanblakely.com
g...@deanblakely.com wrote:
 If the maps are over 7 years old they are useless.

And your evidence of this claim is... what, exactly?

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

Android Training in NYC: http://marakana.com/training/android/

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


[android-developers] Re: Large data downloads from a Web app to Android client getting Out of memory error

2012-04-04 Thread FractalBob


On Apr 3, 9:19 pm, TreKing treking...@gmail.com wrote:
 On Tue, Apr 3, 2012 at 10:57 PM, FractalBob ruom...@gmail.com wrote:
  Anyone have any ideas on why this is happening

 The error tells you exactly why: you are running out of memory.

  and how to fix it?

 Inspect your response in a web browser first. Is it valid? For example, is
 it one giant 5MB line? That would be a problem.
Seems like my reply didn't get posted, so I'll repeat it.

It is a single 5 MB line. I tried reading it in pieces and saving to a
tmp file, which worked, but opening it and reading into a buffer
failed the same way. Why 5 MB is too big kinda boggles the mind, since
the app supposedly has 24 MB available and the app itself is only
around 3 MB, not counting the incoming data. The data is an MP3
downloaded via a mail client but not the conventional way, as an
attachment.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Large data downloads from a Web app to Android client getting Out of memory error

2012-04-04 Thread TreKing
On Wed, Apr 4, 2012 at 10:38 AM, FractalBob ruom...@gmail.com wrote:

 The data, a kind of mail attachment, is a music file


Why are you reading lines from this data then?


 and is eventually loaded into an MP3 player.


What does that mean?

 I can't simply point the player to the file, unfortunately; too much
 legacy code.


Not sure what that means.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] SoftKeyboard -Twin set up

2012-04-04 Thread ramya
Hi,

I need to implement the custom softkeyboard for android ,I have a
requirement ,that if the screen width is large,I need to show twin
keyboards,ie on the either side of the screenwhere user can do
thumb typing.Is this even possible?Please shed some pointers on how to
display a twin keyboard set upLet me know if the question is not
clear

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


[android-developers] Re: How can I use Google Maps in Android Apps

2012-04-04 Thread g...@deanblakely.com
Mark,
You don't know why having maps that are 7 years old in your app is a
bad thing???

ok, I get it.  You guys are just having fun with me.  this forum
sucks.

On Apr 4, 8:44 am, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Apr 3, 2012 at 8:14 PM, g...@deanblakely.com

 g...@deanblakely.com wrote:
  If the maps are over 7 years old they are useless.

 And your evidence of this claim is... what, exactly?

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

 Android Training in NYC:http://marakana.com/training/android/

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


Re: [android-developers] Re: How can I use Google Maps in Android Apps

2012-04-04 Thread Mark Murphy
On Wed, Apr 4, 2012 at 12:17 PM, g...@deanblakely.com
g...@deanblakely.com wrote:
 You don't know why having maps that are 7 years old in your app is a
 bad thing???

No, I am attempting to determine how you have concluded that the maps
are 7 years old.

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

Android Training in NYC: http://marakana.com/training/android/

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


Re: [android-developers] Video Sharing to Facebook from Android App using share intent FAIL :( .

2012-04-04 Thread James Black
Look at where the npe is being thrown, put a breakpoint there, see what is
null that you expect isn't.
On Apr 4, 2012 10:39 AM, s.rawat imsaurabhra...@gmail.com wrote:

 How short?
 I am using
 * uses-permission
 android:name=android.permission.WRITE_EXTERNAL_STORAGE / *
 in the manifest
 and
  data android:mimeType=video/* /
 in the Intent Filter for the app/
 Still getting the same crash.
 ..pain is temporary.quitting lasts forever.
  My Blog http://techshek4u.blogspot.in/



 On Wed, Apr 4, 2012 at 7:57 PM, James Black planiturth...@gmail.comwrote:

 You could have shortened the code, but it appears your app doesn't have
 permission to read from the data directory.

 So ask for permission and gracefully handle when it doesn't read the file.
 On Apr 4, 2012 9:08 AM, s.rawat imsaurabhra...@gmail.com wrote:

 HI ,
 I am trying to share the video on long press by using the share intent.I
 am able to share the image (.jpg) but not able to share the videos on
 facebook.
 *Following is my code.*

   Intent share = new Intent(Intent.ACTION_SEND);
   share.setType(video/3gpp);
   Uri uri = Uri.fromFile(new
 File(imageFilePath));* //image file is the /mnt/sdcard/file
 folder/file name with extension- 3gpp*
   share.putExtra(Intent.EXTRA_STREAM, uri);

 startActivity(Intent.createChooser(share,Share Video));


 *I am getting this error .*

 Retrieve application default SharedPreferences.
 D/ACRA( 7160): Set OnSharedPreferenceChangeListener.
 D/ACRA( 7160): ACRA is enabled for com.facebook.katana,
 intializing...
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 D/dalvikvm( 7160): GC_CONCURRENT freed 746K, 48% free 3521K/6727K,
 external 1892K/2137K, paused 4ms+3ms
 D/dalvikvm( 7160): GC_EXTERNAL_ALLOC freed 54K, 49% free 3484K/6727K,
 external 1925K/2137K, paused 23ms
 I/ActivityManager(  115): Displayed
 com.facebook.katana/.activity.media.UploadVideoActivity: +1s201ms
 D/dalvikvm(  192): GC_EXTERNAL_ALLOC freed 127K, 51% free 3096K/6215K,
 external 7414K/7681K, paused 72ms
 D/dalvikvm( 7160): GC_CONCURRENT freed 582K, 44% free 3891K/6919K,
 external 2360K/2837K, paused 2ms+3ms
 D/dalvikvm( 7160): GC_CONCURRENT freed 1067K, 48% free 3954K/7495K,
 external 2360K/2837K, paused 3ms+3ms
 D/AndroidRuntime( 7160): Shutting down VM
 W/dalvikvm( 7160): threadid=1: thread exiting with uncaught exception
 (group=0x40015560)
 E/ACRA( 7160): ACRA caught a NullPointerException exception for
 com.facebook.katana. Building report.
 D/ACRA( 7160): Retrieve application default SharedPreferences.
 I/ACRA( 7160): READ_LOGS not allowed. ACRA will not include LogCat
 and DropBox data.
 D/dalvikvm( 7160): GC_CONCURRENT freed 1015K, 46% free 4128K/7623K,
 external 2380K/2837K, paused 2ms+3ms
 D/ACRA( 7160): Writing crash report file.
 D/ACRA( 7160): Mark all pending reports as approved.
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 V/ACRA( 7160): About to start ReportSenderWorker from
 #handleException
 D/ACRA( 7160): Add user comment to null
 D/ACRA( 7160): #checkAndSendReports - start
 D/ACRA( 7160): Looking for error files in
 /data/data/com.facebook.katana/app_acra-reports
 I/ACRA( 7160): Sending file 1333563805000-approved.stacktrace
 D/ACRA( 7160): Connect to
 https://www.facebook.com/mobile/android_crash_logs/
 D/ACRA( 7160): Setting httpPost headers
 D/ACRA( 7160): Sending request to
 https://www.facebook.com/mobile/android_crash_logs/
 W/ResponseProcessCookies( 7160): Invalid cookie header: Set-Cookie:
 datr=aER8T715TPEZWlWU-IknhcD0; expires=Fri, 04-Apr-2014 12:54:00 GMT;
 path=/; domain=.facebook.com; httponly. Unable to parse expires
 attribute: Fri
 D/ACRA( 7160): #checkAndSendReports - finish
 *E/AndroidRuntime( 7160): FATAL EXCEPTION: main
 E/AndroidRuntime( 7160): java.lang.NullPointerException
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.getRealPathFromURI(VideoUpload.java:144)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.start(VideoUpload.java:165)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.binding.AppSession.postToService(AppSession.java:4212)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.service.method.VideoUpload.RequestVideoUpload(VideoUpload.java:73)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.activity.media.UploadVideoActivity.upload(UploadVideoActivity.java:209)
 E/AndroidRuntime( 7160): at
 com.facebook.katana.activity.media.UploadVideoActivity.onClick(UploadVideoActivity.java:169)
 *
 E/AndroidRuntime( 7160): at
 android.view.View.performClick(View.java:2485)
 E/AndroidRuntime( 7160): at
 android.view.View$PerformClick.run(View.java:9080)
 E/AndroidRuntime( 7160): at
 android.os.Handler.handleCallback(Handler.java:587)
 

Re: [android-developers] Re: can i get a dynamically change user interface in android?

2012-04-04 Thread Ankita Kashyap
I assume you have written your own custom adapter and then use
notifyDatasetChanged().

On Wed, Apr 4, 2012 at 5:36 PM, ramalakshmi krishna.veni...@gmail.comwrote:



 can u really do it?

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

2012-04-04 Thread Streets Of Boston
Note that SAX validation adds quite a bit of overhead (fetching the schema 
and then validating each and every element in the XML data). If you can 
avoid this, avoid it and do your own (simple) validation based on the XML 
elements you found in the incoming XML data. 

On Wednesday, April 4, 2012 10:36:34 AM UTC-4, RedBullet wrote:

 That's sort of what I am doing now. Seems kind of unsatisfying ;-)

 Just wanted to know what my options were...

 It is confusing because the docs seem to imply that one can do 
 validation...

 On Wednesday, April 4, 2012 9:39:07 AM UTC-4, Streets Of Boston wrote:

 What about not validating the incoming XML?
 Since i don't know what type of app you need the validating SAX parser 
 for, but if your app just needs to read bits and pieces of incoming XML, 
 you really don't need a validating XML. Just read the data and present it 
 to the user. If the incoming data is not what you expect, i.e. after 
 reading the XML you are still missing pieces of data and such, let your app 
 handle this situation by itself.


 On Wednesday, April 4, 2012 9:10:37 AM UTC-4, RedBullet wrote:

 Any more ideas on this? I must be doing something obviously wrong, but 
 perhaps there just isn't a validating SAX parser for Android? (though I 
 would have expected someone on this list to say so)...

 On Monday, April 2, 2012 12:40:13 PM UTC-4, RedBullet wrote:

 I just tried that and got the same error. No validaing SAX parser 
 implementaion available.

 On Monday, April 2, 2012 12:14:33 PM UTC-4, Daniel Drozdzewski wrote:

 ...so did you tell your parser the following:


 static final String GARMIN_SCHEMA_LANGUAGE =
 http://www.w3.org/2001/XMLSchema-instance;;

 static final String W3C_XML_SCHEMA =
 http://www.w3.org/2001/XMLSchema;;

   SAXParserFactory factory = SAXParserFactory.newInstance();
   factory.setNamespaceAware(true);
   factory.setValidating(true);
   saxParser.setProperty(GARMIN_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);

 ??

 On 2 April 2012 17:10, RedBullet  wrote:
  Yea, I read that. My XML contains the following so I thought that 
 would be
  sifficient:
  ?xml version=1.0 encoding=UTF-8?
  TrainingCenterDatabase
  xmlns=http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=
 http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2
  http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd;
 
  Isn't that how it is supposed to work??
 
 
  On Monday, April 2, 2012 12:01:42 PM UTC-4, Daniel Drozdzewski wrote:
 
  Did you tell your parser which schema will it be validating against?
  Setting validation flag to true is not enough...
 
  Have a look here at a quick validating example using SAXParser:
  http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html
 
  Daniel
 
  On 2 April 2012 16:34, RedBullet  wrote:
   I am parsing some XML with SAX, and I noticed that there was some 
 XSD in
   the
   files I am parsing.
  
   So, I figured to would turn validation on the factory before I 
 get the
   parse, but when I do I get an error saying there is no validating 
 parser
   available.
  
   So... How does one validate XML on the Android??
  
   --
 
  --
  Daniel Drozdzewski
 
  --

 -- 
 Daniel Drozdzewski



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Latency of onPreviewFrame callback when using setPreviewCallbackWithBuffer()

2012-04-04 Thread Qianqian Fang
I figure out something myself. I ran a crude experiment and my
estimate to this delay is about 210 ms on my cell phone (Galaxy
Epic) running Android 2.3.6.

Here is how I did my experiment:

1. I first modified a code sample of Chronometer and wrote
a program to display a 1/100-second accuracy-timer. I ran
this timer on another android phone.

2. My camera code handles the onPreviewFrame and pass
the buffer to a GLSurfaceView object and map it to a 2D
texture. This texture is updated for each call of
onPreviewFrame.

3. I pointed the camera phone to the phone running the
timer, and focus.

4. I used a DSLR, set exposure time to 1/100 second,
and took a few shots with the timer running

A sample photo can be found here:

 http://nmr.mgh.harvard.edu/~fangq/temp/androidcamera/frame_latency_test.jpg

From 8 shots, I removed 2 that showed overlapping digits.
In the remaining 6, the mean delay is 208.3 ms with std=4 ms.

I understand that this latency includes the OpenGL texture mapping,
however, I suspected that it is small compare to the frame delay
(otherwise, please correct me).

I will test this on other phones and see if this is consistent on
the 2.3.x androids.

Qianqian


On Apr 3, 2:12 pm, Qianqian Fang fan...@gmail.com wrote:
 hi developers

 I am working on an android program to control an external hardware
 and process camera images in the real time. The hardware interface
 is an IOIO (http://www.sparkfun.com/products/10585). It controls an
 LED array to turn on and off. The software captures images from the
 camera
 using setPreviewCallbackWithBuffer() and store a few image frames
 per LED state. The camera thread and IOIO thread communicate
 by wait/notify.

 Unfortunately, I found that the saved camera frames are not
 synchronized
 with the IOIO pin status; I can only get synchronized images when
 I insert a Thread.sleep(delay250) between toggling the IOIO pins
 and signaling camera to start saving data.

 At first, I suspected that this was caused by the communication
 latency on the IOIO side. But per IOIO's author, Ytai Ben-Tsvi,
 this is way too long compared to the expected latency (1~4ms), see

 http://groups.google.com/group/ioio-users/browse_thread/thread/f81f05...

 If IOIO is ruled out, I now start questioning if there is
 a delay when the onPreviewFrame() is triggered.

 Is there a way to quantify the latency of the onPreviewFrame
 callbacks?
 The surfaceview seems to get updated very quickly, but I don't know
 how fast a displayed frame can be passed to onPreviewFrame() for
 processing.

 Any android documents discuss about this?

 Qianqian

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

2012-04-04 Thread Nathan
RANT
Wow, Android and the manufacturers have made sure that all developers
look like idiots by never considering that there might be more than
one external storage volume in the Android platform, yet coming up
with a great variety.

At present, I get no information from manufacturers about storage card
paths EVEN after the device is on the market. I rely on unreliable
third party accounts in forums.

/RANT

Customer: I've set the storage path to /mnt/sdcard. How come it's
writing to internal storage
Developer: That may actually be the path to the internal storage.
Customer: Huh? Then why does it say sdcard ? ... Ok, well then what
path do i choose?
Developer: Um, um,  Based on an unsubstantiated rumor on some
forums, it might be /mnt/sdcard/extStorages/SdCard
Customer: Your app won't write to that. It says its read only.
Developers: Um, based on further unsubstantiated information on the
internet, it appears that Samsung may have made it so only built in
apps can write to that space, OR maybe you can fix it by rooting and
using a special fix, OR maybe if I use some special permission with my
next release it will work.
Customer: That's very encouraging, I'll go out and buy an even bigger
SD Card . . .

Now for my question.

According to this:
http://www.afternote.net/2012/03/sdcard-write-problem-fix-for-samsung.html
Now, apps have to request for WRITE_MEDIA_STORAGE if they want to
write to the external SD card, but many of them have not yet been
updated to do so yet.

Very encouraging, I just need to change my permissions, right? But it
appears that this information is completely bogus, because.

According to developer.android.com, THERE IS NO SUCH PERMISSION AS
WRITE_MEDIA_STORAGE.

If there is one, I'll bet only preinstalled apps can request it.

Can anyone confirm or deny?

Nathan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Large data downloads from a Web app to Android client getting Out of memory error

2012-04-04 Thread FractalBob


On Apr 4, 8:48 am, TreKing treking...@gmail.com wrote:
 On Wed, Apr 4, 2012 at 10:38 AM, FractalBob ruom...@gmail.com wrote:
  The data, a kind of mail attachment, is a music file

 Why are you reading lines from this data then?

The data is coming in Base 64 encoded from the Web app and then passed
directly to the processing application. This scheme works fine for all
known types of data
  and is eventually loaded into an MP3 player.

 What does that mean?

  I can't simply point the player to the file, unfortunately; too much

  legacy code.

 Not sure what that means.

My app is based on the K9 Mail mail client and it expects the data
delivered to its providers in a certain format.
 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Large data downloads from a Web app to Android client getting Out of memory error

2012-04-04 Thread TreKing
On Wed, Apr 4, 2012 at 1:27 PM, FractalBob ruom...@gmail.com wrote:

 The data is coming in Base 64 encoded from the Web app and then passed
 directly to the processing application. This scheme works fine for all
 known types of data


OK. Passed how? As extras in an Intent?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] MapActivity: Couldn't get connection factory client

2012-04-04 Thread Ankita Kashyap
Delete your debug.keystore and follow this
http://stackoverflow.com/questions/9020565/does-a-new-debug-keystore-mean-a-new-map-api-key


On Wed, Apr 4, 2012 at 7:31 PM, giles ian gilesian@gmail.com wrote:

 After a lot of googling I findout this error id because of invalid May Key.

 And the reason for invalid May Key could be bad debug.keystore file.

 Any solutions ??

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: Large data downloads from a Web app to Android client getting Out of memory error

2012-04-04 Thread Kostya Vasilyev
Perhaps your base64 encoded data doesn't contain line breaks, or contains
too few of them?

Causing the readline() to try and read the entire 5 MB (or a large portion
of it) in memory?

For email content (since you mentioned K9) it's common to line-wrap base64
data at some reasonable line size, like 76 characters (you know, many
people still use DOS, even in this day and age).

The same principle could apply to web data.

Besides, line breaks do not have any significance for base64 encoded data
(unlike, e.g. quoted-printable, or format-flowed text/plain), so you could
just ignore the line structure.

I'm sure there is piece of code somewhere in K9 sources that can decode
base64 data on the fly without excessive buffering.

There is also this:

http://developer.android.com/reference/android/util/Base64InputStream.html

... which is part of Android starting with API 8, but hey, the sources are
only a few clicks away.

-- K

4 апреля 2012 г. 22:27 пользователь FractalBob ruom...@gmail.com написал:



 On Apr 4, 8:48 am, TreKing treking...@gmail.com wrote:
  On Wed, Apr 4, 2012 at 10:38 AM, FractalBob ruom...@gmail.com wrote:
   The data, a kind of mail attachment, is a music file
 
  Why are you reading lines from this data then?
 
 The data is coming in Base 64 encoded from the Web app and then passed
 directly to the processing application. This scheme works fine for all
 known types of data
   and is eventually loaded into an MP3 player.
 
  What does that mean?
 
   I can't simply point the player to the file, unfortunately; too much
 
   legacy code.
 
  Not sure what that means.
 
 My app is based on the K9 Mail mail client and it expects the data
 delivered to its providers in a certain format.
 
 ---
 --
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Someone use GridLayout (ADT-17) in v7?

2012-04-04 Thread ashughes
I'm getting this exact same error, has anyone figure out how to fix it?

Andrew

On Thursday, March 22, 2012 12:06:16 PM UTC-7, André Luiz R. Silva wrote:

 Someone use GridLayout  (ADT-17) in v7?

 Errors:
 [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable 
 to find attribute android:layout_marginEnd
 [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable 
 to find attribute android:layout_marginStart

 Use sdk/extras/android/support/v7/gridlayout.

 -- 
 *Atenciosamente,

 André Luiz R. Silva
 @andreronsilva*

 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: MapActivity: Couldn't get connection factory client

2012-04-04 Thread lbendlin
I still get that error a lot even with a correct map key (map tiles are 
loading). Apart from the error message, do you see any negative effects in 
your app?

On Wednesday, April 4, 2012 10:01:35 AM UTC-4, giles ian wrote:

 After a lot of googling I findout this error id because of invalid May Key.

 And the reason for invalid May Key could be bad debug.keystore file.

 Any solutions ??



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

2012-04-04 Thread lbendlin
your JSON string has multiple hierarchy levels. Instead of a simple for() 
loop you need a construct that considers that hierarchy.

On Wednesday, April 4, 2012 7:31:31 AM UTC-4, Mini agrawal wrote:

 Thanks for reply, still i am getting an parsing error.
  What will be jsonString here?(for a given data)

 On Tue, Apr 3, 2012 at 10:04 AM, atul gangwar daa...@gmail.com wrote:

 Hi,  

For parsing json data:
 pass the json sting to JSONArray as below.
 JSONArray jsonArray = new JSONArray(jsonString);

 create JSONObject  ;
 JSONObject json_data = null;

 run one loop as below to fetch each element of the array.
 for (int i = 0; i  jsonArray.length(); i++) {
 json_data = jsonArray.getJSONObject(i);
 string strId =  json_data.getString(id);// pass the key here to 
 get the value 
 }

 if u hav only one object inside the jsonstring thn u can use 
  json_data.get(type of data present)(pass the key here);

 eg to fetch the url 
 String url=  json_data.getstring(url);
 //url = *http:\/\/www.zomato.com
 \/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315*
  
 On Thu, Mar 29, 2012 at 12:50 PM, Mini agrawal itsmin...@gmail.comwrote:

  How to parse following data??


  *{id:315,name:Sagar 
 Ratna,url:http:\/\/www.zomato.com\/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315,location:{address:B-1,
  
 A-11 Mohan Co-operative Ind Area, Mathura Road, New 
 Delhi,locality:Mathura 
 Road,city:Delhi,latitude:28.520727,longitude:77.294253},phone:011
  
 26955802, 011 26955803, 011 26955804,cuisines:South 
 Indian,timings:11 AM to 11 
 PM,avgCostForTwo:450,isPureVeg:1,hasBar:0,hasDineIn:1,hasDelivery:1,acceptsCreditCards:1,serviceCharge:0,vat:1,editorRating:{food:2.5,service:3.5,ambience:2,overall:3},editorReview:,userReviews:{count:2,0:{review:{id:24728,rating:0,reviewText:yyejbbxzszbxzbomato.comForDevelopmentPurposes,author:Arup
  
 Saha,reviewTime:2012-01-25 16:23:10,reviewTimeFriendly:2 months 
 ago}},1:{review:{id:24727,rating:5,reviewText:testReviewOnZomato.comForDevelopmentPurposes,author:Arup
  
 Saha,reviewTime:2012-01-25 16:14:16,reviewTimeFriendly:2 months 
 ago}}},discounts:[],photos:{photos_url:http:\/\/www.zomato.com
 \/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315\/photos#tabtop,0:{photo:{thumbUrl:http:\/\/
 www.zomato.com
 \/data\/pictures\/chains\/305\/1_thumb.jpg,url:http:\/\/
 www.zomato.com
 \/data\/pictures\/chains\/305\/1.jpg}}},image_470_310:,image_310_310:,image_310_150:,image_150_150:,menu:{menu_url:http:\/\/
 www.zomato.com
 \/ncr\/restaurants\/south-delhi\/mathura-road\/sagar-ratna-315\/menu#tabtop}}
 * 
  
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: Someone use GridLayout (ADT-17) in v7?

2012-04-04 Thread Kevin
I've been struggling with this all afternoon.  I've tried dragging a
gridlayout in on the layout editor and telling it to import the
project, doesn't work.  I try manually creating a project from the
project folder and then manually linking my project to it, it appears
to work, there's a nice green checkmark next to the link, but I still
can't use the GridLayout widget.  I don't know what else to try, has
anybody made this work?

On Apr 4, 1:32 pm, ashughes ashug...@gmail.com wrote:
 I'm getting this exact same error, has anyone figure out how to fix it?

 Andrew

 On Thursday, March 22, 2012 12:06:16 PM UTC-7, André Luiz R. Silva wrote:









  Someone use GridLayout  (ADT-17) in v7?

  Errors:
  [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable
  to find attribute android:layout_marginEnd
  [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable
  to find attribute android:layout_marginStart

  Use sdk/extras/android/support/v7/gridlayout.

  --
  *Atenciosamente,

  André Luiz R. Silva
  @andreronsilva*

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

2012-04-04 Thread bob
Can anyone tell me if Flash Player will work on this thing:

http://www.chinavasion.com/android-tablets/cynosure-android-23-tablet-with-7-inch-touchscreen-and-wifi-4gb/

Here are the requirements for Adobe Flash Player:

ARMv7 processor with vector FPU, minimum 550MHz, OpenGL ES 2.0, H.264 and 
AAC HW decoders
Android™ 2.2, 2.3, 3.0, 3.1, 3.2, and 4.0
256MB of RAM 
Android web browser

The tablet says the CPU is:

1 GHz VC882 Embedded 1GHz ARM Cortex A8 32-bit Processor

How can I tell if that thing has a vector FPU?

Thanks.

I'm trying to find a really cheap tablet that can do Flash.




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

2012-04-04 Thread Steve Cavanagh
Doesn't setting gravity to bottom do this?

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

Re: [android-developers] Re: how to connect with sql server 2005

2012-04-04 Thread BNReddy
try{
HttpClient client = new DefaultHttpClient();
HttpGet getMeathod = new HttpGet( URL);

ResponseHandlerString responseHandler = new 
BasicResponseHandler();
String responseBody1 = client.execute(getMeathod, 
responseHandler); 

DocumentBuilderFactory dbf1 = 
DocumentBuilderFactory.newInstance();
DocumentBuilder db1 = dbf1.newDocumentBuilder();
Document doc1 = db1.parse(new InputSource(new 
StringReader(
responseBody1)));
doc1.getDocumentElement().normalize();

NodeList nodeList = doc1.getElementsByTagName(Table);
prayer=new String[nodeList.getLength()];
for (int i = 0; i  nodeList.getLength(); i++) {

Node node = nodeList.item(i);
Element fstElmnt = (Element) node;
NodeList nameList = 
fstElmnt.getElementsByTagName(tag);
Element nameElement = (Element) 
nameList.item(0);
nameList = nameElement.getChildNodes();
String result_ = (((Node) 
nameList.item(0)).getNodeValue()
.toString());
Log.i(services, +result_);
prayer[i]=result_prayer;

}
}catch (Exception e) {
// TODO: handle exception
}
-- 
Regards,
Narayanareddy.B
9032478372

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Write storage on Samsung Galaxy Tab 7.7

2012-04-04 Thread Nathan

Well, what do you know. WRITE_MEDIA_STORAGE is a bit like District 13
in

I can put this in my manifest.

uses-permission
android:name=android.permission.WRITE_MEDIA_STORAGE /

This is because the permission is hidden in manifest.java.

/**  Allows an application to write to internal media storage
 @hide
 */
public static final String
WRITE_MEDIA_STORAGE=android.permission.WRITE_MEDIA_STORAGE;

Despite its mysterious nature, if I place it in the manifest and
upload the apk to the market, I can see this on the permission page.

STORAGE
MODIFY/DELETE INTERNAL MEDIA STORAGE CONTENTS
Allows the app to modify the contents of the internal media storage.

I do not know yet if it will have the desired effect.

So the Market can publicly display a permission to end users that is
not supposed to be public to developers?

Yes, I know that it is bad coding practice to use an undocumented
feature, but I am not convinced its a bad business practice. Tell me
another way to do it if I am supposed to.

Nathan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] cheap,discount nike air max shoes, paypal payment, free shipping,cheap beats by dre,monster beats by dre

2012-04-04 Thread air max shoes
http://www.monsterbeatsbydre4u.com/beats-dr-dre-c-3.html
http://www.monsterbeatsbydre4u.com/beats-by-dre-studio-c-1.html
http://www.monsterbeatsbydre4u.com/beats-by-dre-tour-c-7.html
http://www.monsterbeatsbydre4u.com/lady-gaga-headphones-c-2.html
http://www.monsterbeatsbydre4u.com/beats-by-dre-pro-c-5.html
http://www.monsterbeatsbydre4u.com/beats-by-dre-solo-c-4.html
http://www.monsterbeatsbydre4u.com/beats-by-dre-butterfly-c-6.html
http://www.monsterbeatsbydre4u.com/beats-by-dre-diddy-c-8.html
http://www.monsterbeatsbydre4u.com/shippinginfo.html
http://www.monsterbeatsbydre4u.com/privacy.html
http://www.monsterbeatsbydre4u.com/conditions.html
http://www.monsterbeatsbydre4u.com/contact_us.html
http://www.monsterbeatsbydre4u.com/site_map.html
http://www.monsterbeatsbydre4u.com/discount_coupon.html

top wholesaler paypal,shoe ,handbag..   Http://www.daydaytrade.com
1.Handbag with Louis Vuitton ,Chanel, Gucci, DIOR,
BURBERRY ,prada ,juicy ,edhardy. 4. Shoes:Nike Air Jordan, Nike Rift,
Max 90, Bape, Adidas, Puma, Gucci, Timberland, Prada, Lv, Ice cream,
UGG, AF1, Visvim, CA shoes, Burberry, shoes.

nike air force one: http://www.daydaytrade.com/Nike-Air-Force-1(one)-shoes/
nike air Jordan shoes: http://www.daydaytrade.com/Nike-Jordan-shoes/
nike air jordan 1 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-1/
nike air jordan 2 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-2/
nike air jordan 3 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-3/
nike air jordan 4 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-4/
nike air jordan 5 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-5/
nike air jordan 6 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-6/
nike air jordan 7 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-7/
nike air jordan 8 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-8/
nike air jordan 9 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-9/
nike air jordan 10 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-10/
nike air jordan 11 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-11/
nike air jordan 12 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-12/
nike air jordan 13 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-13/
nike air jordan 14 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-14/
nike air jordan 15 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-15/
nike air jordan 16 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-16/
nike air jordan 17 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-17/
nike air jordan 18 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-18/
nike air jordan 19 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-19/
nike air jordan 20 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-20/
nike air jordan 21 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-21/
nike air jordan 22 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-22/
nike air jordan 23 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-23/
nike air jordan spizike shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-Spizike/
nike air jordan Flight 45 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Jordan-Flight-45/
nike air jordan 2009 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Jordan-Shoes-2009/
nike air jordan 2010 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-2010/
nike air jordan 2011 shoes:
nike air jordan 6 Rings shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-Six-Rings/
nike air jordan Dub-Zero shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-4.5/
nike air jordan Sixty Plus 60+ shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Air-Jordan-60+/
nike air jordan AJF3 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Jordan-3-and-Air-Force-One/
nike air jordan AJF4 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Jordan-4-and-Air-Force-One/
nike air jordan AJF5 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Jordan-5-and-Air-Force-One/
nike air jordan AJF6 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Jordan-6-and-Air-Force-One/
nike air jordan AJF8 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Jordan-8-and-Air-Force-One/
nike air jordan AJF9 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Jordan-9--Air-Force-One/
nike air jordan AJF10 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Nike-Air-Jordan-10-and-Air-Force-One/
nike air jordan AJF12 shoes: 
http://www.daydaytrade.com/Nike-Jordan-shoes/Jordan-12--Air-Force-One/
nike air jordan AJF13 shoes: 

[android-developers] Re: ScrollView and programmatically scrolling

2012-04-04 Thread Put_tiMe
It's actually quite crazy.
 
I had similar problems with scroll view.
 
But from what you are saying, you are interested in scrolling the text-view.
I would presume that the text-view has scroll-view bundled in it.
 
If things are not working out, then try this (at least this is what I did):
Derive scrollview and write your own class. Override scrollTo and other 
similar function with which you have control over scrolling.
 
 

On Thursday, April 5, 2012 7:51:23 AM UTC+5:30, Steve Cavanagh wrote:

 Doesn't setting gravity to bottom do this?

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

Re: [android-developers] Re: how to connect with sql server 2005

2012-04-04 Thread Mahmoud Mortada
thank you BNReddy
but i have to use direct connection to the database

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

2012-04-04 Thread Mahmoud Mortada
i have a mass problem with running or debugging the app ,every time i
running it eclipse open new device and doesn't install the app to avd

-- 
Dr.M

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