Re: [android-developers] customized date picker

2011-11-07 Thread arun kumar
can u change sdk version. your code supports all devices change to manifest
file and send to me. then only i have to check

On Mon, Nov 7, 2011 at 12:44 PM, vani reddy vani.reddy.bl...@gmail.comwrote:

 I have already sent the code.



 On Fri, Nov 4, 2011 at 6:55 PM, ramesh mandare 
 ramesh.manda...@gmail.comwrote:

 please give me code


 On Fri, Nov 4, 2011 at 4:15 PM, vani reddy vani.reddy.bl...@gmail.comwrote:


 Hi,
 Check out the code I  have attached.

 On Fri, Nov 4, 2011 at 3:52 PM, Ratheesh Valamchuzhy 
 android...@gmail.com wrote:

 can u give me all the code to debug.

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




 --
 Regards,
 Vani Reddy


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




 --
 Regards,
 Vani Reddy

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

2011-11-07 Thread viktor
Thanks, it is exactly what I need.

On 4 Лис, 16:06, Streets Of Boston flyingdutc...@gmail.com wrote:
 shutDownNow will cancel all the pending tasks and make the Executor
 unavailable for any future task submissions.
 Instead, you'd have to keep track to any Future you have scheduled (the
 value returned by an executor.submit(...) call). Call 'cancel(boolean)' on
 all the Futures that are still outstanding when onPause is being executed
 (note that calling 'cancel(...)' on a Future that has finished is OK; it
 just does nothing).

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

2011-11-07 Thread BoD
Kostya: I tried animating the item directly and it didn't work as I wished, 
but I admit I didn't go too far to see why.  I'll look more into it as soon 
as I have a bit of time.

Thank you everybody for your replies.
I'll post a follow-up here if I manage to do anything good looking ;)

-- 
BoD

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

[android-developers] Voice input

2011-11-07 Thread Omollo Ateng
hi there, please i need a code to enable voice where by if it is
recognized, the texts show on the EditText not on the List View as
described by other groups.

Thank you

-- 
Be good to not only people but also machines

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

2011-11-07 Thread Eugene Enikeev
Hi Everyone. For my application, I must add a button on lock screen
(like during incoming call user can sand sms). May be in API Level 14
added this option?

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

2011-11-07 Thread Tom
It says that I need to add a cast to element, but even when I do that
it doesn't work

NodeList productNL = element.getElementsByTagName(ProductName);

full method :


public void dumpTitles() {

String sUrlBase = http://webdev4.matcmadison.edu/mbtest/mab/
AmazonXML/;
String xmlContent = getContent(sUrlBase + selected);
ArrayListStringitem = new ArrayListString();
String[] hi;
try {
DocumentBuilder db =
DocumentBuilderFactory.newInstance().newDocumentBuilder();

Document doc = db.parse(new InputSource(new
StringReader(xmlContent)));
NodeList prodNL = doc.getElementsByTagName(ProductName);
for (int i=0;iprodNL.getLength();i++) {
Element element = (Element)prodNL.item(i);
NodeList productNL =
element.getElementsByTagName(ProductName);
Node nProductName = productNL.item(0);
String sProductName =
nProductName.getFirstChild().getNodeValue();
String s = String.format(Title %d is [%s], i, 
sProductName);

}
}
catch (Exception ex) {
Log.println(Log.DEBUG, TAG, XML Parsing failed:  +
ex.getMessage());
}


}

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

2011-11-07 Thread Júlio Cesar Bueno Cotta
Hi people,
I think I need some help here.
I did some search in the group and found this few 
topicshttps://groups.google.com/forum/#%21searchin/android-developers/startManagingCursor$20deprecatedabout
 my questions, so sorry if I am being silly.

First, When should I close my Cursors? I always close them in the onPause 
method of an Activity (with the code bellow), and due a HoneyComb issue 
before open the Cursor I check if it's not null and opened to avoid the 
error described 
herehttps://groups.google.com/forum/#%21searchin/android-developers/startManagingCursor$20deprecated/android-developers/BlgTO-yQHX4/whQZ345ITb0J
:

protected void onResume () {
   if(cursor != null  !cursor.isClosed()){
  stopManagingCursor(cursor);
  cursor.close();
   }
   cursor = getCursorFromMySQLiteDataBase();
   startManagingCursor(cursor);

   //use cursor to fill a ListView ou Spinner
}

protected void onPause () {

  if(cursor != null  !cursor.isClosed()){
  stopManagingCursor(cursor);
   cursor.close();
 }
}

}

Stop the cursor in onPause method seems to be a good thing because, when I 
call another Activity from this, the father Activity is paused, right? I 
also because when I close the app, onPause is also performed, right again?

I know the startManagingCursor and StopManagingCursor is deprecated (this 
pagehttp://developer.android.com/reference/android/app/Activity.html#startManagingCursor%28android.database.Cursor%29says
 it):

Use the new 
CursorLoaderhttp://developer.android.com/reference/android/content/CursorLoader.htmlclass
 with 
LoaderManagerhttp://developer.android.com/reference/android/app/LoaderManager.htmlinstead;
 this is also available on older platforms through the Android 
compatibility package. 

But CursorLoader and LoaderManager works just with ContentProviders, right? 
That I am doing (above code) it's a bad thing? I need to get a away to 
change all my databases methods to use only ContentProviders? 

The documentation is not very clear about it. 
Herehttp://developer.android.com/reference/android/content/ContentProvider.htmlsay:

If you don't need to share data amongst multiple applications you can use 
a database directly via 
SQLiteDatabasehttp://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html.
 


but how to keep managing my Cursors from SQLiteDatabase without use 
[start,stop]ManagingCursor (since it's deprecated and probably soon it will 
not be there)?

Well, I made a lot of questions in this topic, I don't want to mess around, 
I am just lost in those questions.

Sorry again if I am being not clear enough about, I tried to, English is 
not my first lang.
Thanks in advance.

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

[android-developers] Re: Adding Slide Button on Key lock screen

2011-11-07 Thread Eugene Enikeev
Maybe this option added in API Level 14?

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

2011-11-07 Thread samarkand
hello!
i don't know how to view my DB file as list. there's an SQLite data
base file prepared and already passed to my comp from droid device.
and has been opened in sqlite browser. the browser has a window
where :'SQL string' textbox and 'SQL quiary' button.
there are three column in my DB: _Id,time_float, acceleration_float .
so i m gessing i must put some SQL instruction in mentioned text field
and tap SQL quiary button to get purpose list of fields to visualize .
but i don't know SQL well.
so that the question is clear: what a string?

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

2011-11-07 Thread Eugene Paschenko
I am using ACTION_TIME_CHANGED and ACTION_DATE_CHANGED. onReceiver
calling after time was changed and I call System.currentTimeMillis()
and got new time. How I can get old time or delta time?

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

2011-11-07 Thread Akhil
Hi,

I am showing 3 textview within a listview.  I want to have first
Texeview  to use  80% of screen width and remaining two to have 10%
each. Is there is a way to achieve this ?



Regards
Akhil Bansal

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Sending 15KB Data via HTTP POST and got java.io.FileNotFoundException !! ?

2011-11-07 Thread Nassem Zaher
Hi

I am trying to send data via HTTP POST from my android application and
i got java.io.FileNotFoundException !
Note :
1) i tried to send smallest data +- 1KB and it successes !
2) in small data Server reached and data revived
3) in the 16KB , server doesn't reached - got exception while trying
to get the response !
4) full exception : java.io.FileNotFoundException: 
http://myserverip:80/APP/Default.aspx

Code :

String connectionString = http://; + url + : + port + / +
uploadApp;
URL urle = new URL(connectionString);

URLConnection httppost = urle.openConnection();
connection = (HttpURLConnection) httppost;
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setConnectTimeout(1000*60*2); // 2 min
connection.setRequestMethod(POST);
connection.connect();
outputStream = new BufferedOutputStream(connection.getOutputStream(),
17000);
//for example start
byte[] data = new byte[16000];
for(int i = 0 ; i  data.length ; i++)
  data[i] = 4;
//for example end
outputStream.write(data);
outputStream.flush();
outputStream.close();


inputStream = connection.getInputStream(); // Here i got the
exception 
!!
BufferedReader rd = new BufferedReader(new
InputStreamReader(inputStream));
String tmp = rd.readLine();
rd.close();


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


[android-developers] Re: How to ues getRotationMatrix to translate the Sensor.TYPE_ACCELEROMETER values from device coordinate to world coordinate?

2011-11-07 Thread Lork
That's the question that make me mad for at least 3 days!


Please help me! I have your same problem. IDENTIC! Have you solved it?

I think that rotation matrix is not usefull, because doing so, i have too, 
the first and second absolute component of acceleration are always 0, and 
the third is ok.

If you use instead matrix product funztion the result are very bad and 
differnt? (maybe math is an opinion???) 

Check also my question in stackoveflow: 
http://stackoverflow.com/questions/8027536/android-sensor-getrotationmatrix-returns-wrong-values-why


Many thanx!!!

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

[android-developers] I need to add google search option to my android application

2011-11-07 Thread aruna sameera
I have developed a android application.It is working fine.There is a
search option.I need to add Google search option to my application.Is
there any way to add 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] Using and Identifying Group labels.

2011-11-07 Thread kcsin
I would like some clarification/verification on using groups.

I am looking at using ContactContracts.Groups as a means for setting
up different contact properties.
It would seem this is the best means of controlling and adding custom
contract data.
As I understand it -
Groups do no span different accounts.
So am I correct in assuming that if I want my app to automatically add
a group to a user account I would first search the contact information
for the group name?
If the group isn't found I would have to add the group title to
ContactContracts.Groups for that account?
Sounds easy enough, but if I'm searching ContactContracts.Groups I
should use the entityIterator? (If so, begs to ask the question, what
is different about ContactContracts.Group?)

Thanks


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


[android-developers] Automatic MMS sending

2011-11-07 Thread prateek
Hi hello

I want to send a mms automatically,i am using the following code ,but
its asking user to press a button

Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.putExtra(address, 12134567899);
intent.putExtra(sms_body, See attached picture);

//intent.putExtra(Intent.EXTRA_STREAM,
//Uri.parse(content://media/external/images/thumbnails/
0));
intent.putExtra(Intent.EXTRA_STREAM,
Uri.parse(file:///sdcard/DCIM/Camera/2011-09-09
12.47.29.jpg));
intent.setType(image/png);

// This is added just so the AndroidTestCase launches the
activity as expected, remove this line in your production code
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//intent.se
   startActivity(intent);

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


Re: [android-developers] help pls

2011-11-07 Thread Hamid Ghasemi
hi my freind
ashamed of
i dont know java
i like just android
thanks and best regard
hamid ghasemi


On Wed, Nov 2, 2011 at 2:13 PM, Hamid hamid...@gmail.com wrote:

 what s up Developers,

 i hope u r well, sorry if i have any wrong spelling  :( coz i'm not
 good in english .

 i'm student, and i'm not that good in java i'm still learning.
 so i need a help, just i want to ask how i can make the touch
 specifics point or line in photo.gif or .png.

 for example - - this 2 lins from  .png pic how i can make
 the user should touch only this 2 lins starting from left side.
 or rectangle or triangle or circle!!

 or if there are other solution for it or another easy way to do it!!

 pls help and advice .

 thanks alot

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

2011-11-07 Thread Salvador
In eclipse indigo for mac it always autoscrolls when using the
touchpad to manually scroll in the log, so using the touchpad won't
stop autoscrolling :(

I have to click a log line and then use the arrow keys to move up/
down.

Hope there is a fix soon for mac or an option to disable autoscroll.

Thanks,
Salvador

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

2011-11-07 Thread Brian
As a workaround, you can add your Google account as an activesync
account.  Use your gmail.com address at first, but you'll need to
change the server to be m.google.com when it complains it can't
connect.  See here:

http://www.google.com/support/mobile/bin/answer.py?hl=enanswer=138636topic=14299

On Oct 31, 5:02 am, arnouf arnaud.far...@gmail.com wrote:
 Hello,

 Now, in the emulator, to see calendar or add event I have to set an
 Exchange account. Does it exist a solution avoiding this ? I don't have an
 Exchange server !

 Thanks for your help

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


[android-developers] Re: No luck with new ICS CalenderContract

2011-11-07 Thread Brian
As a workaround, you can add your Google account as an activesync
account.  Use your gmail.com address at first, but you'll need to
change the server to be m.google.com when it complains it can't
connect.  See here:

http://www.google.com/support/mobile/bin/answer.py?hl=enanswer=138636topic=14299

On Nov 2, 8:54 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 No, Google Account seem to be broken on the ICS emulator:

 http://groups.google.com/group/android-developers/browse_thread/threa...

 On Nov 3, 5:44 am, Ralph fed...@gmail.com wrote:







  Hi,

  I'd also like to try out adding a subscription to a public google
  calendar.

  Where are the Intents documented?  Or at least where are the test
  cases that test adding a public calendar to an account and making it
  visible and sync'ed?

  I seem to only see a way to add an event to a particular calendar.

  Also, the emulator does not seem to support Google calendar accounts.
  The only thing that seems to work with calendar is Exchange.  Which
  seems odd.

  Does anyone have the emulator working with google calendars?

  Thanks,
  Ralph

  On Oct 25, 4:50 am, Zsolt Vasvari zvasv...@gmail.com wrote:

   Thanks, of course that will work.  Duh...  How did I miss that?

   That said, I am just looking in the Javadocs and under Constants,
   CONTENT_URI is not listed, but it's further down, under Fields.  That
   explains why I didn't see it, even though it's not a real excuse.
   Since CONENT_URI is a static final, why isn't it listed under
   Constants?

   On Oct 25, 2:41 pm, Michael Chan mc...@android.com wrote:

Hi Zsolt,

Can you tryCalendarContract.Calendars.CONTENT_URI instead of
   CalendarContract.CONTENT_URI?

Thanks,
Mike

On Oct 24, 5:39 pm, Zsolt Vasvari zvasv...@gmail.com wrote:

 I would have expected to work, also.

 It's kind of frustrating that the first time we are goig to be able
 put out fires, is when the general public will get hold of the first
 ICS device.  The emulator is all but useless.

 On Oct 25, 12:25 am, Mark Murphy mmur...@commonsware.com wrote:

  I haven't had a chance to yet, and probably won't for a few weeks.
  Since the Calendar app is in the emulator, I would have expected 
  that
  content provider to work. It's possible that it is an emulator bug 
  --
  without hardware as a point of reference, it is difficult to tell.

  On Mon, Oct 24, 2011 at 10:19 AM, Zsolt Vasvari 
  zvasv...@gmail.com wrote:
   Nobody tried this new API yet?

   On Oct 24, 2:57 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
   I am trying to convert my Calendar code to the new ICS APIs.

   For starters, I am trying the simplest possible operation -- 
   reading
   the list of Calendars.

   I am using the following code:

   context.getContentResolver().query(CalendarContract.CONTENT_URI,
   CALENDARS_PROJECTION, CALENDARS_WHERE, null,
  CalendarContract.Calendars.DEFAULT_SORT_ORDER)

   but I am getting an unknown URL exception on the ICS emulator, 
   both
   Standard and Google API images:

   E/ACRA    (  746): Caused by: java.lang.IllegalArgumentException:
   Unknown URL content://com.android.calendar
   E/ACRA    (  746):      at
   android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
   165)
   E/ACRA    (  746):      at
   android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
   135)
   E/ACRA    (  746):      at
   android.content.ContentProviderProxy.query(ContentProviderNative.java:
   358)
   E/ACRA    (  746):      at
   android.content.ContentResolver.query(ContentResolver.java:304)

   Is this supposed to work on the emulator?

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

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

  Warescription: Three Android Books, Plus Updates, One Low Price!- 
  Hide quoted text -

  - Show quoted text -- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -

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


[android-developers] Mixing OpenGL with Android Lifecycle.

2011-11-07 Thread millerni...@hotmail.com
Hey I tried posting this before but I don't think it went through. So
I'll explain my error again.

When I run my app after installation, textures don't load. The second
time i run it, textures work properly.

I think that this has to do w/ the lifecycle because it seems textures
havent finished loading before texture object are created.

Also I had another error on a previous project a gave up if you can
help:
Everytime I ran my app the game would be slower:

1st run at 12fps
2nd run at 10fps
3rd at 8fps

etc...



Help is greatly appreciated.
Thanks, Nick.

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

2011-11-07 Thread millerni...@hotmail.com
Hello, everytime I start a heavy OpenGL application for Android, I
come across some sort of loading or cleaning error.

As of now my problem is that when my application makes it's first run
after installation, no textures are present. Thus geometry is not
visible. I have tried to render with texture env to GL_MODULATE and
coloring to the geometry to see if it would show, but it doesn't...

I said that this only happens the first time you run the application,
which means if you run it a second time, everything will be correct.

Here's what I think may be happening, but am unsure:

I think that during the process of decoding the resource into a
bitmap, the texture object is created. This means that the texture
object will not contain data, and misrepresenting the texture.

Well, the reason I think this is related to the android lifecycle is
because the textures work when the application is run a second time.

Help is greatly appreciated, I'm really hoping to figure this out. I
quit my previous project because I had another error:
The game would be slower each time you ran it:

12fps after first run,
10 on second,
8 on third etc...
The performance was really slow when I rendered my 3D map.

So that being said, you are welcome to help me out with that too :)


Thanks, Nick.

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

2011-11-07 Thread Saurabh Patel
Hi All

i want to launch my customize home screen of default .

for some specific requirement I am required to change Android Default Home
application with my customized Home application ( a setting inside my app
that will toggle default home = my application or previous home)

I don't want the user to travel android settings that are very complicated.

Can any one help me out like where it registers launcher.apk for default
home application or how to change that

Give me the guidelines for that

Thanks

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

[android-developers] Fwd: Sending 15KB Data via HTTP POST and got java.io.FileNotFoundException !! ?

2011-11-07 Thread Nassem Zaher
Please need advise !

-- Forwarded message --
From: Nassem Zaher nasse...@gmail.com
Date: Sat, Nov 5, 2011 at 9:06 PM
Subject: Sending 15KB Data via HTTP POST and got
java.io.FileNotFoundException !! ?
To: Android Developers android-developers@googlegroups.com


Hi

I am trying to send data via HTTP POST from my android application and
i got java.io.FileNotFoundException !
Note :
1) i tried to send smallest data +- 1KB and it successes !
2) in small data Server reached and data revived
3) in the 16KB , server doesn't reached - got exception while trying
to get the response !
4) full exception : java.io.FileNotFoundException:
http://myserverip:80/APP/Default.aspx

Code :

String connectionString = http://; + url + : + port + / +
uploadApp;
URL urle = new URL(connectionString);

URLConnection httppost = urle.openConnection();
connection = (HttpURLConnection) httppost;
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setConnectTimeout(1000*60*2); // 2 min
connection.setRequestMethod(POST);
connection.connect();
outputStream = new BufferedOutputStream(connection.getOutputStream(),
17000);
//for example start
byte[] data = new byte[16000];
for(int i = 0 ; i  data.length ; i++)
 data[i] = 4;
//for example end
outputStream.write(data);
outputStream.flush();
outputStream.close();


inputStream = connection.getInputStream(); // Here i got the
exception
!!
BufferedReader rd = new BufferedReader(new
InputStreamReader(inputStream));
String tmp = rd.readLine();
rd.close();


Any Ideas !?




-- 
Regards,
Nassem Zaher
Computer Science BSc
Nazareth 16470, Israel, P.O.Box 6776.
nasse...@gmail.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: Strange error

2011-11-07 Thread Kira Qian
look at this thread.
http://stackoverflow.com/questions/6450738/failed-to-install-apk-on-device-local-path-doesnt-exist

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

2011-11-07 Thread Mitul Patel
Thanks for sharing these. Me too having same problem. Thanks alot. It 
really works.

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

2011-11-07 Thread anup
Hello i am newbee for the android development can anyone suggest
suitable linux platform to develop application for android phone...

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


[android-developers] Need help on connecting android app to remote database.

2011-11-07 Thread Charan
Hello members,

I am a novice android app developer. As of now i'm developing an app, that
needs to communicate with remote database.

I tried using web service but that not working to me. Please provide me
complete information from A to Z steps in conencting, communicating, get
response from remote database. i am using mysql has remote database.

Please respond quickly, urgent help needed.

Thanking you,
-- 
With Regards,
Charan Kumar

COMPARISON IS THE BEST WAY TO JUDGE YOUR PROGRESS.
BUT DON'T COMPARE WITH OTHERS, COMPARE YOUR YESTERDAY WITH YOUR TODAY

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

2011-11-07 Thread Geoffrey
Hello all,

I am working on an app that is performing some activity based on the current 
cellID and/or LAC.

I would like to test this behavior in the emulator by sending some CellIDs/LAC 
combinations to the emulator for simulation. Is this possible? could not find 
something about this in other resources.

Thanks,

Geoffrey

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

2011-11-07 Thread serpent403
I have just started using the c2dm service, and it was working
perfectly fine for quite some time.. but suddenly i started getting
this error message Error=InvalidRegistration when sending a message
to a device from my server. I don't think i have changed any of my
codes(server/application). Can anyone tell me what might be the reason
behind this unusual behaviour.. Thanks in advance!

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


[android-developers] How to delete contacts from SIM card?

2011-11-07 Thread Oxgen
   I'm a greenhand for Android developing, now I find after I delete
a contact which is saved in SIM card, the contact will be there if
reseting the mobile phone ,or after setting the airplane mode!
I just want to know how to delete the contact from SIM card
compeletly, anyone help me?

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


[android-developers] Customize Android Source Code to run multiple Application on same Screen.

2011-11-07 Thread Pawan Singh Rathore
Hi All,

I need to customize Android Source code in  a such a way that, It can run
multiple Application on  the same screen.
Is that possible? Please share your thoughts and Ideas...

Thanks  BR,
Pawan

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

2011-11-07 Thread Pawan Singh Rathore
Best Regards,
Pawan Rathore

Ubuntu is best one.
I am using 11.04

On Sat, Nov 5, 2011 at 4:28 PM, anup anupwattam...@gmail.com wrote:

 Hello i am newbee for the android development can anyone suggest
 suitable linux platform to develop application for android phone...

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] How to move a OpenGL square with the finger? (Android 1.5 and OpenGLES 1)

2011-11-07 Thread saex
Actually i have an application for Android 1.5 with a GLSurfaceView
class that shows a simple square polygon on the screen.

I want to learn to add a new functionality, the functionality of
moving the square touching it with the finger. I mean that when the
user touches the square and moves the finger, the square should be
moved with the finger, until the finger releases the screen.

Any tutorials/code examples/help will be apreciated


My code:

public class MySurfaceView extends GLSurfaceView implements
Renderer {
private Context context;
private Square square;
private float xrot; //X Rotation
private float yrot; //Y Rotation
private float zrot; //Z Rotation
private float xspeed;   //X Rotation Speed
private float yspeed;   //Y Rotation Speed
private float z = -1.15f;   //Profundidad en el eje 
Z
private float oldX; //valor anterior de X, para rotación
private float oldY; //valor anterior de Y, para rotación
private final float TOUCH_SCALE = 0.2f; //necesario para la 
rotación

//create the matrix grabber object in your initialization code
private MatrixGrabber mg = new MatrixGrabber();

private boolean firstTimeDone=false; //true si la aplicación ya ha
sido inicializada.

public MySurfaceView(Context context, Bitmap image) {
super(context);
this.context = context;
setEGLConfigChooser(8, 8, 8, 8, 16, 0); //fondo transparente
getHolder().setFormat(PixelFormat.TRANSLUCENT); //fondo 
transparente
//Transformamos esta clase en renderizadora
this.setRenderer(this);
//Request focus, para que los botones reaccionen
this.requestFocus();
this.setFocusableInTouchMode(true);
square = new Square(image);
}

public void onSurfaceCreated(GL10 gl, EGLConfig config) {
gl.glDisable(GL10.GL_DITHER);   
//dithering OFF
gl.glEnable(GL10.GL_TEXTURE_2D);
//Texture Mapping ON
gl.glShadeModel(GL10.GL_SMOOTH);
//Smooth Shading
gl.glClearDepthf(1.0f); 
//Depth Buffer Setup
gl.glEnable(GL10.GL_DEPTH_TEST);//Depth 
Testing ON
gl.glDepthFunc(GL10.GL_LEQUAL);
gl.glClearColor(0,0,0,0); //fondo transparente
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
//Cargamos la textura del cubo.
square.loadGLTexture(gl, this.context);
}

public void onDrawFrame(GL10 gl) {
//Limpiamos pantalla y Depth Buffer
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
gl.glLoadIdentity();
//Dibujado
gl.glTranslatef(0.0f, 0.0f, z); //Move z units 
into the screen
gl.glScalef(0.8f, 0.8f, 0.8f);  //Escalamos 
para que quepa en la
pantalla
//Rotamos sobre los ejes.
gl.glRotatef(xrot, 1.0f, 0.0f, 0.0f);   //X
gl.glRotatef(yrot, 0.0f, 1.0f, 0.0f);   //Y
gl.glRotatef(zrot, 0.0f, 0.0f, 1.0f);   //Z
//Dibujamos el cuadrado
square.draw(gl);
//Factores de rotación.
xrot += xspeed;
yrot += yspeed;


if (!firstTimeDone)
{
/// NEW CODE FOR SCALING THE AR IMAGE TO 
THE DESIRED
WIDTH /
mg.getCurrentProjection(gl);
mg.getCurrentModelView(gl);
float [] modelMatrix = new float[16];
float [] projMatrix = new float[16];
modelMatrix=mg.mModelView;
projMatrix=mg.mProjection;
int [] mView = new int[4];
mView[0] = 0;
mView[1] = 0;
mView[2] = 800; //width
mView[3] = 480; //height
float [] outputCoords = new float[3];
GLU.gluProject(-1.0f, -1.0f, z, modelMatrix, 0, projMatrix, 
0,
mView, 0, outputCoords, 0);

int i=0;
System.out.print(i);
   // firstTimeDone=true;
}
}

//si el surface cambia, resetea la vista, imagino que esto pasa
cuando cambias de modo portrait/landscape o sacas el teclado físico en
móviles tipo Droid.
public void onSurfaceChanged(GL10 gl, int width, int 

[android-developers] Samsung Galaxy Tab 10.1 Android Source Code

2011-11-07 Thread s.rawat
HI .
Is there an official site for it.I found this --
https://github.com/GalaxyTab101/samsung-kernel-galaxytab101 , but is this
the official one ?.Also pointers to flashing /rooting will be life saver.
Rgds,
Saurabh

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

2011-11-07 Thread nicefuture
Hi, All:

I want to Support Res/Skin Update in my android App by OTA, and i am not very 
clear about Android's Res Manage/Access mechanism, so is hard to implement it. 
then i have below questions:

1.  in Run-Time, How Android App access its Res? Will Android unZip the APK 
file into some Directory which including the Res, and then access the Res?
2. For Res Access, Android use the ResID,  and it is an Integer value, Then How 
does Android differentiate the ResID is in own package, Or in another Package? 
For example:


SetText(,,R.string.)
SetText(,,android.R.string.xxx)


3. I found that some developer use Res.apk to support App's Res Update, then 
how about its mechanism, how to do it?  Package all the new Res into the 
Res.apk, and then install it, Android will auto override the old res for my 
app???


Thx a lot



nicefuture

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

2011-11-07 Thread Ali Chousein
If you are moving from iPhone to Android you are already in the right
direction :-D Hahaha:-D

-
Ali Chousein
Weather-Buddy
http://weatherbuddy.blogspot.com/ | http://twitter.com/weather_buddy
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com/
https://marketplace.cisco.com/apphq/store/products/994

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

2011-11-07 Thread Omollo Ateng
I use Ubuntu 11.10 (Oneiric Ocelot) Linux - for my android application
development platform  to have the application running well and good. just
need jdk running that is openjdk-6-jdk and eclipse SDK for linux that is
Helios, and android SDK.

Best Regards
all the best

On Mon, Nov 7, 2011 at 12:23 PM, Pawan Singh Rathore 
pawan.s.rath...@gmail.com wrote:


 Best Regards,
 Pawan Rathore

 Ubuntu is best one.
 I am using 11.04


 On Sat, Nov 5, 2011 at 4:28 PM, anup anupwattam...@gmail.com wrote:

 Hello i am newbee for the android development can anyone suggest
 suitable linux platform to develop application for android phone...

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




-- 
Be good to not only people but also machines

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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/libEGL(206): call to OpenGL ES API with no current context

2011-11-07 Thread saex
First of all, this is not a duplicate of other questions with similar
error, because in these questions, the solution of the error is that
there are various threads and there is a problem with various threads,
but i'm not using various threads, my problem is not the same.

I have a simple Square with openGL es 1 and Android 1.5. The square is
painted on the center of the screen.

I want that when the user press on the screen, or moves the finger on
the screen, the square get's moved to that position. For do this i
tryed with GLuUnProject, i tryed to obtain the opengl coordinate that
matches with the window XY coordinate touched with the finger (to
translate the polygon to that coordinate in the future), and i'm
writting the coordinates on the LogCat.

The coordinate's i'm receiving are not true cordinates, are wrong
coordinates, also i'm getting the error of the tittle of the question.
`ERROR/libEGL(206): call to OpenGL ES API with no current context`


The LogCat:

11-07 09:43:40.012: DEBUG/X(203): X: -1.2918732
11-07 09:43:40.023: DEBUG/X(203): Y: 0.050911963
11-07 09:43:40.042: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:40.042: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:40.042: DEBUG/X(203): X: -1.2943747
11-07 09:43:40.052: DEBUG/X(203): Y: 0.04674524
11-07 09:43:40.152: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:40.152: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:40.172: DEBUG/X(203): X: 0.77298313
11-07 09:43:40.182: DEBUG/X(203): Y: -0.5083332
11-07 09:43:40.223: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:40.223: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:40.223: DEBUG/X(203): X: 0.77298313
11-07 09:43:40.223: DEBUG/X(203): Y: -0.5083332
11-07 09:43:40.402: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:40.402: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:40.402: DEBUG/X(203): X: -1.2943747
11-07 09:43:40.402: DEBUG/X(203): Y: 0.04674524
11-07 09:43:41.952: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:41.952: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:41.952: DEBUG/X(203): X: 0.77298313
11-07 09:43:41.952: DEBUG/X(203): Y: -0.5083332
11-07 09:43:42.042: ERROR/libEGL(203): call to OpenGL ES API with
no current context
11-07 09:43:42.042: ERROR/libEGL(203): call to OpenGL ES API with
no current context




My code:




public class MySurfaceView extends GLSurfaceView implements
Renderer {
private float INITIAL_Z = -35.0f;
private Context context;
private Square square;
private float xrot; //X Rotation
private float yrot; //Y Rotation
private float zrot; //Z Rotation
private float z = INITIAL_Z;//Profundidad en el eje 
Z
private float x = 0.0f; //eje X
private float y = 0.0f; //eje Y

private MatrixGrabber mg = new MatrixGrabber(); //create the
matrix grabber object in your initialization code
private GL10 MyGl; //To make gl variable accesible on all the
methods of the class
byte horizontal=-1; //0: LEFT  1:CENTER  2:RIGHT
byte vertical=-1; //0: TOP  1:CENTER  2:BOTTOM
float startX=-1;
float startY=-1;
float xMovement=0.0f;
float yMovement=0.0f;
private boolean movement_mode=false;

public MySurfaceView(Context context, Bitmap image, int width, byte
horizontal, byte vertical) {
super(context);
this.context = context;
setEGLConfigChooser(8, 8, 8, 8, 16, 0); //fondo transparente
getHolder().setFormat(PixelFormat.TRANSLUCENT); //fondo 
transparente
//Transformamos esta clase en renderizadora
this.setRenderer(this);
//Request focus, para que los botones reaccionen
this.requestFocus();
this.setFocusableInTouchMode(true);
square = new Square(image);
this.horizontal=horizontal;
this.vertical=vertical;
}

public void onSurfaceCreated(GL10 gl, EGLConfig config) {
MyGl=gl;
gl.glDisable(GL10.GL_DITHER);   
//dithering OFF
gl.glEnable(GL10.GL_TEXTURE_2D);
//Texture Mapping ON
gl.glShadeModel(GL10.GL_SMOOTH);
//Smooth Shading

[android-developers] Re: gps device on/off listener

2011-11-07 Thread Ali Chousein
Study the intent actions in the following link. Probably you'll find
what you need there.

http://developer.android.com/reference/android/content/Intent.html

-
Ali Chousein
Weather-Buddy
http://weatherbuddy.blogspot.com/ | http://twitter.com/weather_buddy
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com/
https://marketplace.cisco.com/apphq/store/products/994

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


Re: [android-developers] How to control width of textview

2011-11-07 Thread Júlio Cesar Bueno Cotta
Hello, Android does not work with %, mas you can get something like this
using LinearLayout and

android:layout_weight=1

The wieght value can be greater than 1 for some textview and lower to
another.
From:
http://developer.android.com/resources/tutorials/views/hello-linearlayout.html
Good luck.

2011/11/7 Akhil akhil.ban...@gmail.com

 Hi,

 I am showing 3 textview within a listview.  I want to have first
 Texeview  to use  80% of screen width and remaining two to have 10%
 each. Is there is a way to achieve this ?



 Regards
 Akhil Bansal

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




-- 
Júlio Cesar Bueno Cotta
Bacharel em Ciência da Computação pela UFV
Mestrando em Ciência da Computação pela UFABC

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

2011-11-07 Thread markus
Hi,

I only saw your answer today, thanks for it.

It appears do make a difference, now it works. I still don't get why,
though. The method always gets invoked by the same thread (which I've
checked by outputting Thread.currentThread().getName() to the log), so
it doesn't get invoked concurrently (because that's impossible if only
one thread is involved). Even if I synchronize the method invocation
on the listener object, it doesn't make a difference when storing only
the object pointer.

Where's the flaw in my reasoning?

Thanks again!

Regards,
Markus

On Oct 28, 10:38 pm, josean1968 josean1...@gmail.com wrote:
 Hello,

 You have this:

 ...
     private SensorEvent lastEvent;
 ...

 @Override
     public void onSensorChanged(SensorEvent event) {
         if (lastEvent == null) {
             lastEvent = event;
             return;
         }

         Log.v(TAG, dT [ + Thread.currentThread().getName() + ]:  +
 (event.timestamp - lastEvent.timestamp));
     }

 

 The problem is that the onSensorChanged() method can be invoked
 concurrently because it is an event listener.
 Declare a local variable and copy the value (not just a pointer to the
 object):

 @Override
     public void onSensorChanged(SensorEvent event) {
       ...
       int lastTimestamp = event.timestamp;
       ...
     }

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

2011-11-07 Thread Júlio Cesar Bueno Cotta
Ubuntu is a good one. I also use it.

2011/11/7 Omollo Ateng omollo.at...@gmail.com

 I use Ubuntu 11.10 (Oneiric Ocelot) Linux - for my android application
 development platform  to have the application running well and good. just
 need jdk running that is openjdk-6-jdk and eclipse SDK for linux that is
 Helios, and android SDK. [x2]

 Best Regards
 all the best


 On Mon, Nov 7, 2011 at 12:23 PM, Pawan Singh Rathore 
 pawan.s.rath...@gmail.com wrote:


 Best Regards,
 Pawan Rathore

 Ubuntu is best one.
 I am using 11.04


 On Sat, Nov 5, 2011 at 4:28 PM, anup anupwattam...@gmail.com wrote:

 Hello i am newbee for the android development can anyone suggest
 suitable linux platform to develop application for android phone...

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




 --
 Be good to not only people but also machines


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




-- 
Júlio Cesar Bueno Cotta
Bacharel em Ciência da Computação pela UFV
Mestrando em Ciência da Computação pela UFABC

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Customize Android Source Code to run multiple Application on same Screen.

2011-11-07 Thread Júlio Cesar Bueno Cotta
Hello,
I think it's not possible.
I think you can run multiple threads, and can run multiple Services, but
just one screen layout.


2011/11/7 Pawan Singh Rathore pawan.s.rath...@gmail.com

 Hi All,

 I need to customize Android Source code in  a such a way that, It can run
 multiple Application on  the same screen.
 Is that possible? Please share your thoughts and Ideas...

 Thanks  BR,
 Pawan


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




-- 
Júlio Cesar Bueno Cotta
Bacharel em Ciência da Computação pela UFV
Mestrando em Ciência da Computação pela UFABC

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

2011-11-07 Thread markus
Hi again,

sorry to spam. I just found the following note in
http://developer.android.com/reference/android/hardware/SensorEventListener.html#onSensorChanged(android.hardware.SensorEvent)

NOTE: The application doesn't own the event object passed as a
parameter and therefore cannot hold on o it. The object may be part of
an internal pool and may be reused by the framework.

I don't know how I missed that, which explains the problem.

Thanks again for your help.

Regards,
Markus

On Oct 28, 10:38 pm, josean1968 josean1...@gmail.com wrote:
 Hello,

 You have this:

 ...
     private SensorEvent lastEvent;
 ...

 @Override
     public void onSensorChanged(SensorEvent event) {
         if (lastEvent == null) {
             lastEvent = event;
             return;
         }

         Log.v(TAG, dT [ + Thread.currentThread().getName() + ]:  +
 (event.timestamp - lastEvent.timestamp));
     }

 

 The problem is that the onSensorChanged() method can be invoked
 concurrently because it is an event listener.
 Declare a local variable and copy the value (not just a pointer to the
 object):

 @Override
     public void onSensorChanged(SensorEvent event) {
       ...
       int lastTimestamp = event.timestamp;
       ...
     }

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Fwd: Sending 15KB Data via HTTP POST and got java.io.FileNotFoundException !! ?

2011-11-07 Thread Júlio Cesar Bueno Cotta
I just guess..I am not sure...but
When you close the output..don't you close the connection?
Have you monitoring the server side to any problens with this greater size?
Good luck

2011/11/5 Nassem Zaher nasse...@gmail.com

  Please need advise !


 -- Forwarded message --
 From: Nassem Zaher nasse...@gmail.com
 Date: Sat, Nov 5, 2011 at 9:06 PM
 Subject: Sending 15KB Data via HTTP POST and got
 java.io.FileNotFoundException !! ?
 To: Android Developers android-developers@googlegroups.com


 Hi

 I am trying to send data via HTTP POST from my android application and
 i got java.io.FileNotFoundException !
 Note :
 1) i tried to send smallest data +- 1KB and it successes !
 2) in small data Server reached and data revived
 3) in the 16KB , server doesn't reached - got exception while trying
 to get the response !
 4) full exception : java.io.FileNotFoundException:
 http://myserverip:80/APP/Default.aspx

 Code :

 String connectionString = http://; + url + : + port + / +
 uploadApp;
 URL urle = new URL(connectionString);

 URLConnection httppost = urle.openConnection();
 connection = (HttpURLConnection) httppost;
 connection.setDoInput(true);
 connection.setDoOutput(true);
 connection.setConnectTimeout(1000*60*2); // 2 min
 connection.setRequestMethod(POST);
 connection.connect();
 outputStream = new BufferedOutputStream(connection.getOutputStream(),
 17000);
 //for example start
 byte[] data = new byte[16000];
 for(int i = 0 ; i  data.length ; i++)
  data[i] = 4;
 //for example end
 outputStream.write(data);
 outputStream.flush();
 outputStream.close();


 inputStream = connection.getInputStream(); // Here i got the
 exception
 !!
 BufferedReader rd = new BufferedReader(new
 InputStreamReader(inputStream));
 String tmp = rd.readLine();
 rd.close();


 Any Ideas !?




 --
 Regards,
 Nassem Zaher
 Computer Science BSc
 Nazareth 16470, Israel, P.O.Box 6776.
 nasse...@gmail.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




-- 
Júlio Cesar Bueno Cotta
Bacharel em Ciência da Computação pela UFV
Mestrando em Ciência da Computação pela UFABC

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

2011-11-07 Thread Danny S.
Hey,

I want to show the contacts using

  Intent intent = new Intent(Intent.ACTION_PICK,
Contacts.CONTENT_URI);

But I want to show only contacts that have address data. I searched
for this and I think I have to use content filters. Is this correct
and how to do this? I dont want to iterate through all of my contacts
and if the picked contact has no address the user is in bad luck. I
want to pre filter for this, so that the user can be sure that his
selection delivers valid data.

Hope someone can help!
Thanks a lot,
-Danny S.

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

2011-11-07 Thread Mark Murphy
AFAIK, you will need to roll your own pick-style activity for this,
by querying the content provider to get the information you need and
presenting it in a ListView. There is no concept of content filter
in Android -- leastways, it does not show up in the documentation.

On Mon, Nov 7, 2011 at 6:42 AM, Danny S. danny.schi...@googlemail.com wrote:
 Hey,

 I want to show the contacts using

  Intent intent = new Intent(Intent.ACTION_PICK,
 Contacts.CONTENT_URI);

 But I want to show only contacts that have address data. I searched
 for this and I think I have to use content filters. Is this correct
 and how to do this? I dont want to iterate through all of my contacts
 and if the picked contact has no address the user is in bad luck. I
 want to pre filter for this, so that the user can be sure that his
 selection delivers valid data.

 Hope someone can help!
 Thanks a lot,
 -Danny S.

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




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

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] How to customize the home screen of android

2011-11-07 Thread Mark Murphy
You cannot force your home screen upon the user, except by
distributing your own firmware. a setting inside my app that will
toggle default home = my application or previous home is not
supported.

If you create an alternative home screen, the *user* can elect to
start it when the user presses HOME, and the *user* can choose to make
it their default home screen by the checkbox on the chooser.
Similarly, the *user* can choose to uninstall your home screen or
otherwise return to the regular one (e.g., reboot in safe mode).

On Mon, Nov 7, 2011 at 2:28 AM, Saurabh Patel saurabh.ce1...@gmail.com wrote:
 Hi All

 i want to launch my customize home screen of default .

 for some specific requirement I am required to change Android Default Home
 application with my customized Home application ( a setting inside my app
 that will toggle default home = my application or previous home)

 I don't want the user to travel android settings that are very complicated.

 Can any one help me out like where it registers launcher.apk for default
 home application or how to change that

 Give me the guidelines for that

 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



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

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] How to customize the home screen of android

2011-11-07 Thread Saurabh Patel
Hi Mark Murphy

Thanks for reply

Yes i want to create my own firmware.

than i can force to user to use my own home screen?

After making these things on sample code we have to deploy home screen on
android source code.

So its possible or not?

Thanks

Saurabh Patel

On Mon, Nov 7, 2011 at 5:48 PM, Mark Murphy mmur...@commonsware.com wrote:

 You cannot force your home screen upon the user, except by
 distributing your own firmware. a setting inside my app that will
 toggle default home = my application or previous home is not
 supported.

 If you create an alternative home screen, the *user* can elect to
 start it when the user presses HOME, and the *user* can choose to make
 it their default home screen by the checkbox on the chooser.
 Similarly, the *user* can choose to uninstall your home screen or
 otherwise return to the regular one (e.g., reboot in safe mode).

 On Mon, Nov 7, 2011 at 2:28 AM, Saurabh Patel saurabh.ce1...@gmail.com
 wrote:
  Hi All
 
  i want to launch my customize home screen of default .
 
  for some specific requirement I am required to change Android Default
 Home
  application with my customized Home application ( a setting inside my app
  that will toggle default home = my application or previous home)
 
  I don't want the user to travel android settings that are very
 complicated.
 
  Can any one help me out like where it registers launcher.apk for default
  home application or how to change that
 
  Give me the guidelines for that
 
  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



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

 Android Training...At Your Office: http://commonsware.com/training

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

2011-11-07 Thread deepak gusain
Dear Friends,

I need help about Suse Linux Enterprise Server 11 sp 1
documents.exp:- installation,troubleshooting,server configuration files
setup,RAID, LVM and many more

-- 
Regards
Deepak Gusain
RHCSA, MCITP, CCNA
M.no:- 9417248523

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

Re: [android-developers] How to customize the home screen of android

2011-11-07 Thread Mark Murphy
On Mon, Nov 7, 2011 at 7:32 AM, Saurabh Patel saurabh.ce1...@gmail.com wrote:
 Yes i want to create my own firmware.

 than i can force to user to use my own home screen?

It is more that yours can be the default home screen in the firmware,
so yours will be the first one they see and the one they return to in
safe mode. Whether users install other home screens (e.g., via USB)
and elect to use them is up to the user, presumably.

For questions on creating custom firmware, visit
http://source.android.com, click on the Community tab, find a relevant
Google Group, and ask there.

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

Android Training...At Your Office: http://commonsware.com/training

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

2011-11-07 Thread Pepijn Van Eeckhoudt
AFAIK there is no equivalent widget for a UITableView in Android. I 
emulated it using a ListView and a custom ListAdapter implementation 
that wraps the tree data model.


Pepijn

On 07/11/2011 00:09, bob wrote:

I'm working on converting an app from iPhone to Android.

Here's a screenshot of the UITableView I'm working on:

http://i1190.photobucket.com/albums/z449/m75214/e.png

I think those arrows on the right are built into iPhone.  Anyone know
the Android counterpart for those arrows?



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

2011-11-07 Thread TreKing
On Sun, Nov 6, 2011 at 12:43 PM, Tom jeffkbreu...@gmail.com wrote:

 It says that I need to add a cast to element, but even when I do that it
 doesn't work


What says you need to add a cast?
What does doesn't work mean?

http://catb.org/~esr/faqs/smart-questions.html

-
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] Customize Android Source Code to run multiple Application on same Screen.

2011-11-07 Thread TreKing
On Mon, Nov 7, 2011 at 12:48 AM, Pawan Singh Rathore 
pawan.s.rath...@gmail.com wrote:

 I need to customize Android Source code in  a such a way that, It can run
 multiple Application on  the same screen.
 Is that possible? Please share your thoughts and Ideas...


Sure, that's possible. This is not the list to discuss modifying the source
though.

-
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] Customize Android Source Code to run multiple Application on same Screen.

2011-11-07 Thread Rafael Maas
Fragments?
http://developer.android.com/guide/topics/fundamentals/fragments.html
=android 3.0


2011/11/7 TreKing treking...@gmail.com:
 On Mon, Nov 7, 2011 at 12:48 AM, Pawan Singh Rathore
 pawan.s.rath...@gmail.com wrote:

 I need to customize Android Source code in  a such a way that, It can run
 multiple Application on  the same screen.
 Is that possible? Please share your thoughts and Ideas...

 Sure, that's possible. This is not the list to discuss modifying the source
 though.

 -
 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] Customize Android Source Code to run multiple Application on same Screen.

2011-11-07 Thread Pawan Singh Rathore
Hi Rafel,

Now we can use Fragments in any API level,
But using fragments how can we run app, inside fragment.
Can you please explain tad more.
Best Regards,
Pawan Rathore




On Mon, Nov 7, 2011 at 6:24 PM, Rafael Maas rafaelm...@gmail.com wrote:

 Fragments?
 http://developer.android.com/guide/topics/fundamentals/fragments.html
 =android 3.0


 2011/11/7 TreKing treking...@gmail.com:
  On Mon, Nov 7, 2011 at 12:48 AM, Pawan Singh Rathore
  pawan.s.rath...@gmail.com wrote:
 
  I need to customize Android Source code in  a such a way that, It can
 run
  multiple Application on  the same screen.
  Is that possible? Please share your thoughts and Ideas...
 
  Sure, that's possible. This is not the list to discuss modifying the
 source
  though.
 
 
 -
  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


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

2011-11-07 Thread Marcelo Henrique
This is going to taste, with any distro you can develop well

2011/11/7 Pawan Singh Rathore pawan.s.rath...@gmail.com


 Best Regards,
 Pawan Rathore

 Ubuntu is best one.
 I am using 11.04


 On Sat, Nov 5, 2011 at 4:28 PM, anup anupwattam...@gmail.com wrote:

 Hello i am newbee for the android development can anyone suggest
 suitable linux platform to develop application for android phone...

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




-- 
  - Marcelo Henrique -
  Se não puder se destacar pelo talento, vença pelo esforço. (Dave
Weinbaum)

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

2011-11-07 Thread Marcelo Henrique
In your project folder browse to the folder bin / it will be an apk that
was installed in the emulator,

as to look at a problem if not proguard.cfg nengum contains error

2011/11/6 André pha...@hotmail.com

 I have  a problem when I'm trying to export my project in eclipse.
 While trying to create the apk gives me this error.
 What could cause this?

 [2011-11-06 17:29:50 - Project- X] Proguard returned with error code
 1. See console
 [2011-11-06 17:29:50 - Project- X] java.io.FileNotFoundException: C:
 \android\tools\proguard\bin\X\proguard\dump.txt (The system cannot
 find the path specified)
 [2011-11-06 17:29:50 - Project- X]  at
 java.io.FileInputStream.open(Native Method)
 [2011-11-06 17:29:50 - Project- X]  at
 java.io.FileInputStream.init(Unknown Source)
 [2011-11-06 17:29:50 - Project- X]  at
 java.io.FileReader.init(Unknown Source)
 [2011-11-06 17:29:50 - Project- X]  at
 proguard.FileWordReader.init(FileWordReader.java:46)
 [2011-11-06 17:29:50 - Project- X]  at
 proguard.ConfigurationParser.parseIncludeArgument(ConfigurationParser.java:
 196)
 [2011-11-06 17:29:50 - Project- X]  at
 proguard.ConfigurationParser.parse(ConfigurationParser.java:105)
 [2011-11-06 17:29:50 - Project- X]  at
 proguard.ProGuard.main(ProGuard.java:491)

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




-- 
  - Marcelo Henrique -
  Se não puder se destacar pelo talento, vença pelo esforço. (Dave
Weinbaum)

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

2011-11-07 Thread aesptux
I suggest Fedora 15 (Fedora 16 is coming out in two days) as the best 
option.

I'm currently using it (I changed from Ubuntu) and I'm happier with it.

Best regards,

Adrián.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Customize Android Source Code to run multiple Application on same Screen.

2011-11-07 Thread Pawan Singh Rathore
Can you please share your idea, that how can I achieve this?
Best Regards,
Pawan Rathore




On Mon, Nov 7, 2011 at 6:17 PM, TreKing treking...@gmail.com wrote:

 On Mon, Nov 7, 2011 at 12:48 AM, Pawan Singh Rathore 
 pawan.s.rath...@gmail.com wrote:

 I need to customize Android Source code in  a such a way that, It can run
 multiple Application on  the same screen.
 Is that possible? Please share your thoughts and Ideas...


 Sure, that's possible. This is not the list to discuss modifying the
 source though.


 -
 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] Directing user to webpage, then back to app

2011-11-07 Thread Neilz
Hi all. From my app I want to send the user to a web page to complete
some action, and then return to the app with some kind of code,
depending upon the success or failure of their action.

How can I achieve this? Will I have to use a WebView within the app,
or is there a way I can use the stock browser also?

Thanks for some 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


[android-developers] How can I allocate multiple instances of the emulator per each CPU?

2011-11-07 Thread SangWon Kim
I have a quadcore CPU, but when I'm running multiple emulators, only
run cpu0(first cpu) is running 100%


it seems that the other cores are not used at all.
is this a bug or limitation by design?

if anyone has any solutions, let me know

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] Customize Android Source Code to run multiple Application on same Screen.

2011-11-07 Thread Mark Murphy
On Mon, Nov 7, 2011 at 8:03 AM, Pawan Singh Rathore
pawan.s.rath...@gmail.com wrote:
 But using fragments how can we run app, inside fragment.

You can't. This would require substantial modifications to Android itself.

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

Android Training...At Your Office: http://commonsware.com/training

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

2011-11-07 Thread Mark Murphy
On Mon, Nov 7, 2011 at 8:14 AM, Neilz neilhorn...@gmail.com wrote:
 Hi all. From my app I want to send the user to a web page to complete
 some action, and then return to the app with some kind of code,
 depending upon the success or failure of their action.

 How can I achieve this? Will I have to use a WebView within the app,
 or is there a way I can use the stock browser also?

In theory, if you have the browser redirect to some URL that is
handled by your app (ACTION_VIEW, CATEGORY_BROWSABLE, and an
appropriate data element), you could accomplish this with your
code baked into the URL (e.g., /postaction/success and
/postaction/failure). I haven't tried a redirect as the trigger
mechanism, though.

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

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] How can I allocate multiple instances of the emulator per each CPU?

2011-11-07 Thread Mark Murphy
On Mon, Nov 7, 2011 at 7:10 AM, SangWon Kim best...@gmail.com wrote:
 I have a quadcore CPU, but when I'm running multiple emulators, only
 run cpu0(first cpu) is running 100%


 it seems that the other cores are not used at all.
 is this a bug or limitation by design?

It is a limitation of the underlying qemu environment, in concert with
the Android emulator image.

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

Android Training...At Your Office: http://commonsware.com/training

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

2011-11-07 Thread Júlio Cesar Bueno Cotta
Can someone try to help me please? I really preciate if it happen.
I am stuck with the Android documentation.
Should I convert all my SQLite methods to use Content Providers?
Thanks in advance.

2011/11/5 Júlio Cesar Bueno Cotta juliocbco...@gmail.com

 Hi people,
 I think I need some help here.
 I did some search in the group and found this few 
 topicshttps://groups.google.com/forum/#%21searchin/android-developers/startManagingCursor$20deprecatedabout
  my questions, so sorry if I am being silly.

 First, When should I close my Cursors? I always close them in the onPause
 method of an Activity (with the code bellow), and due a HoneyComb issue
 before open the Cursor I check if it's not null and opened to avoid the
 error described 
 herehttps://groups.google.com/forum/#%21searchin/android-developers/startManagingCursor$20deprecated/android-developers/BlgTO-yQHX4/whQZ345ITb0J
 :

 protected void onResume () {
if(cursor != null  !cursor.isClosed()){
   stopManagingCursor(cursor);
   cursor.close();
}
cursor = getCursorFromMySQLiteDataBase();
startManagingCursor(cursor);

//use cursor to fill a ListView ou Spinner
 }

 protected void onPause () {

   if(cursor != null  !cursor.isClosed()){
   stopManagingCursor(cursor);
cursor.close();
  }
 }

 }

 Stop the cursor in onPause method seems to be a good thing because, when I
 call another Activity from this, the father Activity is paused, right? I
 also because when I close the app, onPause is also performed, right again?

 I know the startManagingCursor and StopManagingCursor is deprecated (this
 pagehttp://developer.android.com/reference/android/app/Activity.html#startManagingCursor%28android.database.Cursor%29says
  it):

 Use the new 
 CursorLoaderhttp://developer.android.com/reference/android/content/CursorLoader.htmlclass
  with
 LoaderManagerhttp://developer.android.com/reference/android/app/LoaderManager.htmlinstead;
  this is also available on older platforms through the Android
 compatibility package. 

 But CursorLoader and LoaderManager works just with ContentProviders,
 right? That I am doing (above code) it's a bad thing? I need to get a away
 to change all my databases methods to use only ContentProviders?

 The documentation is not very clear about it. 
 Herehttp://developer.android.com/reference/android/content/ContentProvider.htmlsay:

 If you don't need to share data amongst multiple applications you can use
 a database directly via 
 SQLiteDatabasehttp://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html.
 

 but how to keep managing my Cursors from SQLiteDatabase without use
 [start,stop]ManagingCursor (since it's deprecated and probably soon it will
 not be there)?

 Well, I made a lot of questions in this topic, I don't want to mess
 around, I am just lost in those questions.

 Sorry again if I am being not clear enough about, I tried to, English is
 not my first lang.
 Thanks in advance.

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




-- 
Júlio Cesar Bueno Cotta
Bacharel em Ciência da Computação pela UFV
Mestrando em Ciência da Computação pela UFABC

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

2011-11-07 Thread SL@maxis


I want to query an Android phone connected to a winxp PC via an USB cable.

1. Would socketing programming do the work ? Any better method ?

2. When, say an SMS comes in, I want the phone to notify the pc. Do I have  
to implement socket on Android as well ?



Thanks.




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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


[android-developers] zoom zoom?

2011-11-07 Thread bob
I read that if I make my app for Android 1.5 and designed for a
320x480 device, Android will zoom the screen if it's run on a tablet.
However, this did not work when I tried it.  Anyone know about 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] Android and WinXP: look for some tips

2011-11-07 Thread J Handal
Google  is my friend

http://developer.android.com/guide/developing/debugging/ddms.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] zoom zoom?

2011-11-07 Thread Kostya Vasilyev

You're talking about compatibility mode version 1.

It's enabled if minSdk or targetSdk are not set, or set to 3 or less.

http://developer.android.com/guide/practices/screen-compat-mode.html

It's not something to aim for, really.

-- Kostya

07.11.2011 18:31, bob пишет:

I read that if I make my app for Android 1.5 and designed for a
320x480 device, Android will zoom the screen if it's run on a tablet.
However, this did not work when I tried it.  Anyone know about this?



--
Kostya Vasilyev

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

2011-11-07 Thread Neilz
Thanks Mark. Now that I know what to be searching for, I've found
several similar topics mostly on stackoverflow.

Most topics have a response by Hackbod, stating not to do it that way,
but I'm struggling a little to understand what it is he's suggesting
instead.

http://stackoverflow.com/questions/3469908/make-a-link-in-the-android-browser-start-up-my-app

So far I've got an example link from a WebView to open up the 'choose
application' selector, which does at least contain my app - but I want
it to open my app automatically.

I don't get this bit:

The best way to use this, if you want to ensure it launches only your
app, is with your own scoped action and using Intent.setPackage() to
say the Intent will only match your app package.

and also...

Finally, you may want to set the package of the intent to your app
with this: 
http://developer.android.com/reference/android/content/Intent.html#setPackage(java.lang.String)

This is a newer feature in the platform, which allows you to direct
link intents to only your app so that other applications can not
intercept and handle them.

Where exactly is he suggesting that I use this? My link is going to
come from an external browser over which I have little control.

On Nov 7, 1:18 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Nov 7, 2011 at 8:14 AM, Neilz neilhorn...@gmail.com wrote:
  Hi all. From my app I want to send the user to a web page to complete
  some action, and then return to the app with some kind of code,
  depending upon the success or failure of their action.

  How can I achieve this? Will I have to use a WebView within the app,
  or is there a way I can use the stock browser also?

 In theory, if you have the browser redirect to some URL that is
 handled by your app (ACTION_VIEW, CATEGORY_BROWSABLE, and an
 appropriate data element), you could accomplish this with your
 code baked into the URL (e.g., /postaction/success and
 /postaction/failure). I haven't tried a redirect as the trigger
 mechanism, though.

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

 Android Training...At Your Office:http://commonsware.com/training

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

2011-11-07 Thread Mark Murphy
On Mon, Nov 7, 2011 at 9:55 AM, Neilz neilhorn...@gmail.com wrote:
 Thanks Mark. Now that I know what to be searching for, I've found
 several similar topics mostly on stackoverflow.

 Most topics have a response by Hackbod, stating not to do it that way,
 but I'm struggling a little to understand what it is he's suggesting
 instead.

FYI, hackbod is Dianne Hackborn.

 I don't get this bit:

 The best way to use this, if you want to ensure it launches only your
 app, is with your own scoped action and using Intent.setPackage() to
 say the Intent will only match your app package.

your own scoped action would be, say,
com.commonsware.android.MY_OWN_CUSTOM_ACTION, instead of ACTION_VIEW.

 and also...

 Finally, you may want to set the package of the intent to your app
 with this: 
 http://developer.android.com/reference/android/content/Intent.html#setPackage(java.lang.String)

Um, that seems straightforward enough. Call setPackage() with the
package name of whatever app should contain the recipient of the
Intent -- no other app's components will be considered.

 Where exactly is he suggesting that I use this? My link is going to
 come from an external browser over which I have little control.

No, but you are in charge of the URL that you are redirecting to.
Those passages pertain to the use of an intent: URL, generated via a
call to toUri() on a properly-constructed Intent. You would redirect
to that URL.

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

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


[android-developers] Delegate TouchEvents from WebView

2011-11-07 Thread Philipp
Hi, I have a problem:

I have a ViewGroup (LinearLayout) that holds one or more Fragments,
each containing a WebView.
I have a custom OnTouchListener for my ViewGroup that will react to
special events like touches on the screen borders. If none of these
special events is detected, the touch event should be passed to the
WebView.
The problem is that the WebView is the first element to get the touch
event and there does not seem to be a way to delegate the touch event
to the underlying View.
How can I modify the touch hierarchy in a way that the ViewGroup
receives the TouchEvent first and only if it doesn’t consume the event
it is passed to the WebView?

I made an example project to illustrate my problem at
https://github.com/pcomans/WebViewTouchTest

I have chosen to add two fragments containing a WebView in order to
make clear that it is not enough to just override the
setOnTouchListener of the WebView instead. I am interested in the
absolute position of the touch. Sure I could probably calculate the
absolute position from the relative position but this is not an
elegant solution.

I would really appreciate any help!

Best,

Philipp

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Real-time audio capture and streaming on Android ... the latency problem ?

2011-11-07 Thread Emre A. Yavuz

Hi,
 
We would like to capture audio using the MIC on the phone and stream it to a 
laptop/desktop to play it in real-time. We have a RTSP server on the phone and 
a RTSP client on the laptop/desktop. The client side is supported by the 
Live555 streaming library and the MPlayer. We have a code working at the moment 
which does the job, however our concern is delay as you might have guessed. 
Real-time requires a low latency. I've done some search, but I haven't seen any 
concrete solution online so far.
 
Can anybody recommend where to look for ? A link to a library, suggestions etc. 
 
With regards,
 

Emre  

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

2011-11-07 Thread Hazel Dayawon


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

2011-11-07 Thread Neilz


On Nov 7, 3:11 pm, Mark Murphy mmur...@commonsware.com wrote:
 FYI, hackbod is Dianne Hackborn.

Ah, thought so...

  Finally, you may want to set the package of the intent to your app
  with 
  this:http://developer.android.com/reference/android/content/Intent.html#se...)

 Um, that seems straightforward enough. Call setPackage() with the
 package name of whatever app should contain the recipient of the
 Intent -- no other app's components will be considered.

  Where exactly is he suggesting that I use this? My link is going to
  come from an external browser over which I have little control.

 No, but you are in charge of the URL that you are redirecting to.
 Those passages pertain to the use of an intent: URL, generated via a
 call to toUri() on a properly-constructed Intent. You would redirect
 to that URL.

Hmm, I don't get it, I'm missing something obvious :-/

At the moment I have a webview (which is mimicking what may be a stock
browser) which has a link, such as:
webView.loadData(a href='http://com.my.app.android.activity'..etc.

Then I have this in my manifest:
activity android:name=.TestActivity
intent-filter
  action android:name=android.intent.action.VIEW /
  category android:name=android.intent.category.DEFAULT /
  category android:name=android.intent.category.BROWSABLE /

  data android:scheme=http
android:host=com.my.app.android.activity  /
/intent-filter
/activity

There isn't anywhere for me to be creating, or setting properties on,
an Intent.

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


[android-developers] Re: ACTION_TIME_CHANGED and ACTION_DATE_CHANGED old time detection

2011-11-07 Thread Eugene Paschenko
Any idea?

On Nov 7, 10:51 am, Eugene Paschenko epasche...@gmail.com wrote:
 I am using ACTION_TIME_CHANGED and ACTION_DATE_CHANGED. onReceiver
 calling after time was changed and I call System.currentTimeMillis()
 and got new time. How I can get old time or delta time?

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

2011-11-07 Thread Mark Murphy
On Mon, Nov 7, 2011 at 11:00 AM, Neilz neilhorn...@gmail.com wrote:
 Hmm, I don't get it, I'm missing something obvious :-/

 At the moment I have a webview (which is mimicking what may be a stock
 browser) which has a link, such as:
 webView.loadData(a href='http://com.my.app.android.activity'..etc.

 Then I have this in my manifest:
 activity android:name=.TestActivity
                intent-filter
                  action android:name=android.intent.action.VIEW /
                  category android:name=android.intent.category.DEFAULT /
                  category android:name=android.intent.category.BROWSABLE /

                  data android:scheme=http
 android:host=com.my.app.android.activity  /
                /intent-filter
        /activity

 There isn't anywhere for me to be creating, or setting properties on,
 an Intent.

Correct. You will note that in Ms. Hackborn's answer, she cites two
approaches to the problem. You are taking one approach. The quotes you
used are for the other approach.

BTW, try putting an android:path attribute on your data element and
see if it then only opens up in your app vs. giving you the chooser. I
know this works for NFC and NDEF and I can never remember if it works
for HTTP URLs as well. I know that this is what Barcode Scanner uses
to initiate a scan fro

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

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


[android-developers] Re: A quick hint as to where to start for a sliding box?

2011-11-07 Thread DismalSeas
Another thought is that there is the potential to build a flash
application outside the Android platform and then import that flash
application and run it.  I still haven't gotten the grasp around when
to use external graphical options such as OpenGL and when to use
Flash applications. Are these typically here for when people are
accustomed to using a particular language or need specific features?
If I were a Flash or OpenGL developer it would sound as though these
would be appealing, but at the moment they do not sound that
appealing.

On Nov 4, 3:02 pm, DismalSeas jeremiah.sna...@gmail.com wrote:
   Not new to the Android community, but new to designing games and
 anything related to it.  I want to develop a sliding window that the
 user can slide over letters in a word.  Then retrieve the letters
 within the slider for use in a word game that I would like to design.

   Perhaps someone could provide an idea of an existing UI element that
 could be used to achieve this effect, or if something like this would
 point towards doing OpenGL programming (which I am not familiar
 with).  Essentially this will be the most complicated portion of this
 game piece and I thought perhaps there were some experienced
 individuals who's virtual light would go off in their head right now
 about an approach for this task.

   Thanks in advance for any past experience and input.

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

2011-11-07 Thread bob
I have a button with some white text.  When pressed, the text needs to
change to dark gray.  Anyone know the best way to 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


[android-developers] Re: Nfc Foreground Dispatch

2011-11-07 Thread bjthe4th
Okay, I found out what I believe to be the proper way to format The 
external type (It is stored as a uri) but it doesn't seem to want to work.
This is how I set up the Foreground Dispatch for my tag:
mPendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, 
getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
IntentFilter ndef = new 
IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
try{
 ndef.addDataType(vnd.android.nfc://ext/example.com:a);
}
catch (Exception e)
{
 throw new RuntimeException(fail, e);
}

Does anyone know if ndef.addDataType is the proper method to use to add a 
uri? I haven't found any examples of filtering based on any other Ndef type 
other than MIME. Using other apps, it detects the type of my card just 
fine, but I am unsure about how to format the Foreground Dispatch.

Also, when I was trying to start up using a MIME filter for Foreground 
Dispatch, I noticed that my app was always competing with other apps to 
start, and this was with a very specific MIME filter. After the first time 
I chose it, the app would start up when ever I selected the card with the 
app off, but until then others would compete with it. Does a specific MIME 
type trump the wild card */* or if other apps use the wild card will it 
always compete with a custom app? 

Thanks to anyone who can help!

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

[android-developers] Re: button

2011-11-07 Thread Chrystian Vieyra
Button.setTextColor(color);

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

2011-11-07 Thread saex
I have a simple Square with openGL es 1 and Android 1.5. The square is
painted on the center of the screen.

I want that when the user press on the screen, or moves the finger on
the screen, the square get's moved to that position. For do this i
tryed with GLuUnProject, i tryed to obtain the opengl coordinate that
matches with the window XY coordinate touched with the finger (to
translate the polygon to that coordinate in the future), and i'm
writting the coordinates on the LogCat.

The coordinate's i'm receiving are not true cordinates, are wrong
coordinates. For example this logcat represents a horizontal movement
to the right of the screen:

11-07 15:54:37.221: DEBUG/X(213): X: -0.003236022
11-07 15:54:37.221: DEBUG/X(213): Y: -0.047979668
11-07 15:54:37.241: DEBUG/X(213): X: -0.003236022
11-07 15:54:37.251: DEBUG/X(213): Y: -0.047807075
11-07 15:54:39.110: DEBUG/X(213): X: 0.03469036
11-07 15:54:39.110: DEBUG/X(213): Y: 0.04418271
11-07 15:54:43.021: DEBUG/X(213): X: -0.029469538
11-07 15:54:43.021: DEBUG/X(213): Y: -0.034172554
11-07 15:54:43.051: DEBUG/X(213): X: -0.026708115
11-07 15:54:43.051: DEBUG/X(213): Y: -0.034172554
11-07 15:54:43.081: DEBUG/X(213): X: -0.018596433
11-07 15:54:43.081: DEBUG/X(213): Y: -0.034172554
11-07 15:54:43.111: DEBUG/X(213): X: -0.013073588
11-07 15:54:43.111: DEBUG/X(213): Y: -0.034172554
11-07 15:54:43.141: DEBUG/X(213): X: -0.0039263717
11-07 15:54:43.141: DEBUG/X(213): Y: -0.03365
11-07 15:54:43.162: DEBUG/X(213): X: -0.0011649576
11-07 15:54:43.162: DEBUG/X(213): Y: -0.033827372
11-07 15:54:43.191: DEBUG/X(213): X: 7.335304E-4
11-07 15:54:43.191: DEBUG/X(213): Y: -0.033654787





This is the source code:





public class MySurfaceView extends GLSurfaceView implements
Renderer {
private float INITIAL_Z = -35.0f;
private Context context;
private Square square;
private float xrot; //X Rotation
private float yrot; //Y Rotation
private float zrot; //Z Rotation
private float z = INITIAL_Z;//Profundidad en el eje 
Z
private float x = 0.0f; //eje X
private float y = 0.0f; //eje Y

private MatrixGrabber mg = new MatrixGrabber(); //create the
matrix grabber object in your initialization code
byte horizontal=-1; //0: LEFT  1:CENTER  2:RIGHT
byte vertical=-1; //0: TOP  1:CENTER  2:BOTTOM
float startX=-1;
float startY=-1;
float xMovement=0.0f;
float yMovement=0.0f;
private boolean movement_mode=false;

public MySurfaceView(Context context, Bitmap image, int width, byte
horizontal, byte vertical) {
super(context);
this.context = context;
setEGLConfigChooser(8, 8, 8, 8, 16, 0); //fondo transparente
getHolder().setFormat(PixelFormat.TRANSLUCENT); //fondo 
transparente
//Transformamos esta clase en renderizadora
this.setRenderer(this);
//Request focus, para que los botones reaccionen
this.requestFocus();
this.setFocusableInTouchMode(true);
square = new Square(image);
this.horizontal=horizontal;
this.vertical=vertical;
}

public void onSurfaceCreated(GL10 gl, EGLConfig config) {
MyGl=gl;
gl.glDisable(GL10.GL_DITHER);   
//dithering OFF
gl.glEnable(GL10.GL_TEXTURE_2D);
//Texture Mapping ON
gl.glShadeModel(GL10.GL_SMOOTH);
//Smooth Shading
gl.glClearDepthf(1.0f); 
//Depth Buffer Setup
gl.glEnable(GL10.GL_DEPTH_TEST);//Depth 
Testing ON
gl.glDepthFunc(GL10.GL_LEQUAL);
gl.glClearColor(0,0,0,0); //fondo transparente
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
//Cargamos la textura del cubo.
square.loadGLTexture(gl, this.context);
}

public void onDrawFrame(GL10 gl) {
//Limpiamos pantalla y Depth Buffer
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
gl.glLoadIdentity();
//Dibujado
gl.glTranslatef(x, y, z);   //Move z units 
into the screen
//gl.glScalef(0.8f, 0.8f, 0.8f);
//Escalamos para que quepa en la
pantalla

[android-developers] Re: Directing user to webpage, then back to app

2011-11-07 Thread Neilz
Right, I see. No, the path option doesn't make a difference, it still
offers me a choice of apps to open with.

Ok, it's the other approach that I'm struggling to find an example
for. Just lots of messages discussing it! The appears to be an example
on the following page, but it simply doesn't work for me:
http://stackoverflow.com/questions/2430045/how-to-register-some-url-namespace-myapp-app-start-for-accessing-your-progr/2430468#2430468

On Nov 7, 4:08 pm, Mark Murphy mmur...@commonsware.com wrote:
 Correct. You will note that in Ms. Hackborn's answer, she cites two
 approaches to the problem. You are taking one approach. The quotes you
 used are for the other approach.

 BTW, try putting an android:path attribute on your data element and
 see if it then only opens up in your app vs. giving you the chooser. I
 know this works for NFC and NDEF and I can never remember if it works
 for HTTP URLs as well. I know that this is what Barcode Scanner uses
 to initiate a scan fro

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

 _The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


Re: [android-developers] Incorrect output values with gluUnProject… why?

2011-11-07 Thread Daniel Drozdzewski
You coordinates are wrong for the screen/window coordinates, but how
do you know that those are not the object coordinates?

Daniel


On 7 November 2011 16:34, saex elpablos...@gmail.com wrote:
 I have a simple Square with openGL es 1 and Android 1.5. The square is
 painted on the center of the screen.

 I want that when the user press on the screen, or moves the finger on
 the screen, the square get's moved to that position. For do this i
 tryed with GLuUnProject, i tryed to obtain the opengl coordinate that
 matches with the window XY coordinate touched with the finger (to
 translate the polygon to that coordinate in the future), and i'm
 writting the coordinates on the LogCat.

 The coordinate's i'm receiving are not true cordinates, are wrong
 coordinates. For example this logcat represents a horizontal movement
 to the right of the screen:

    11-07 15:54:37.221: DEBUG/X(213): X: -0.003236022
    11-07 15:54:37.221: DEBUG/X(213): Y: -0.047979668
    11-07 15:54:37.241: DEBUG/X(213): X: -0.003236022
    11-07 15:54:37.251: DEBUG/X(213): Y: -0.047807075
    11-07 15:54:39.110: DEBUG/X(213): X: 0.03469036
    11-07 15:54:39.110: DEBUG/X(213): Y: 0.04418271
    11-07 15:54:43.021: DEBUG/X(213): X: -0.029469538
    11-07 15:54:43.021: DEBUG/X(213): Y: -0.034172554
    11-07 15:54:43.051: DEBUG/X(213): X: -0.026708115
    11-07 15:54:43.051: DEBUG/X(213): Y: -0.034172554
    11-07 15:54:43.081: DEBUG/X(213): X: -0.018596433
    11-07 15:54:43.081: DEBUG/X(213): Y: -0.034172554
    11-07 15:54:43.111: DEBUG/X(213): X: -0.013073588
    11-07 15:54:43.111: DEBUG/X(213): Y: -0.034172554
    11-07 15:54:43.141: DEBUG/X(213): X: -0.0039263717
    11-07 15:54:43.141: DEBUG/X(213): Y: -0.03365
    11-07 15:54:43.162: DEBUG/X(213): X: -0.0011649576
    11-07 15:54:43.162: DEBUG/X(213): Y: -0.033827372
    11-07 15:54:43.191: DEBUG/X(213): X: 7.335304E-4
    11-07 15:54:43.191: DEBUG/X(213): Y: -0.033654787





 This is the source code:





    public class MySurfaceView extends GLSurfaceView implements
 Renderer {
        private float INITIAL_Z = -35.0f;
        private Context context;
        private Square square;
        private float xrot;                                     //X Rotation
        private float yrot;                                     //Y Rotation
        private float zrot;                                     //Z Rotation
        private float z = INITIAL_Z;                    //Profundidad en el 
 eje Z
        private float x = 0.0f;                         //eje X
        private float y = 0.0f;                         //eje Y

    private MatrixGrabber mg = new MatrixGrabber(); //create the
 matrix grabber object in your initialization code
        byte horizontal=-1; //0: LEFT  1:CENTER  2:RIGHT
        byte vertical=-1; //0: TOP  1:CENTER  2:BOTTOM
        float startX=-1;
        float startY=-1;
        float xMovement=0.0f;
        float yMovement=0.0f;
        private boolean movement_mode=false;

        public MySurfaceView(Context context, Bitmap image, int width, byte
 horizontal, byte vertical) {
                super(context);
                this.context = context;
                setEGLConfigChooser(8, 8, 8, 8, 16, 0); //fondo transparente
                getHolder().setFormat(PixelFormat.TRANSLUCENT); //fondo 
 transparente
                //Transformamos esta clase en renderizadora
                this.setRenderer(this);
                //Request focus, para que los botones reaccionen
                this.requestFocus();
                this.setFocusableInTouchMode(true);
                square = new Square(image);
                this.horizontal=horizontal;
                this.vertical=vertical;
        }

        public void onSurfaceCreated(GL10 gl, EGLConfig config) {
                MyGl=gl;
                gl.glDisable(GL10.GL_DITHER);                           
 //dithering OFF
                gl.glEnable(GL10.GL_TEXTURE_2D);                        
 //Texture Mapping ON
                gl.glShadeModel(GL10.GL_SMOOTH);                        
 //Smooth Shading
                gl.glClearDepthf(1.0f);                                        
  //Depth Buffer Setup
                gl.glEnable(GL10.GL_DEPTH_TEST);                        
 //Depth Testing ON
                gl.glDepthFunc(GL10.GL_LEQUAL);
                gl.glClearColor(0,0,0,0); //fondo transparente
                gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
                //Cargamos la textura del cubo.
                square.loadGLTexture(gl, this.context);
        }

        public void onDrawFrame(GL10 gl) {
                //Limpiamos pantalla y Depth Buffer
                gl.glClear(GL10.GL_COLOR_BUFFER_BIT | 
 GL10.GL_DEPTH_BUFFER_BIT);
                gl.glLoadIdentity();
                //Dibujado
            

Re: [android-developers] Re: Directing user to webpage, then back to app

2011-11-07 Thread Mark Murphy
I have one in
http://github.com/commonsguy/cw-advandroid/Introspection/URLHandler (though
that URL is from memory, as I am sitting in a conference keynote right
now...)

Mark Murphy
mmur...@commonsware.com
On Nov 7, 2011 8:35 AM, Neilz neilhorn...@gmail.com wrote:

 Right, I see. No, the path option doesn't make a difference, it still
 offers me a choice of apps to open with.

 Ok, it's the other approach that I'm struggling to find an example
 for. Just lots of messages discussing it! The appears to be an example
 on the following page, but it simply doesn't work for me:

 http://stackoverflow.com/questions/2430045/how-to-register-some-url-namespace-myapp-app-start-for-accessing-your-progr/2430468#2430468

 On Nov 7, 4:08 pm, Mark Murphy mmur...@commonsware.com wrote:
  Correct. You will note that in Ms. Hackborn's answer, she cites two
  approaches to the problem. You are taking one approach. The quotes you
  used are for the other approach.
 
  BTW, try putting an android:path attribute on your data element and
  see if it then only opens up in your app vs. giving you the chooser. I
  know this works for NFC and NDEF and I can never remember if it works
  for HTTP URLs as well. I know that this is what Barcode Scanner uses
  to initiate a scan fro
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
  _The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


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

Re: [android-developers] Incorrect output values with gluUnProject… why?

2011-11-07 Thread Latimerius
I haven't ever used gluUnProject() myself but unless your geometry is
glued right to the near plane I'm pretty sure it's wrong to pass zero
for your window space Z.  Unless you have special knowledge of your Z
I guess you'll need to read that value from the depth buffer.

On Mon, Nov 7, 2011 at 5:34 PM, saex elpablos...@gmail.com wrote:
 I have a simple Square with openGL es 1 and Android 1.5. The square is
 painted on the center of the screen.

 I want that when the user press on the screen, or moves the finger on
 the screen, the square get's moved to that position. For do this i
 tryed with GLuUnProject, i tryed to obtain the opengl coordinate that
 matches with the window XY coordinate touched with the finger (to
 translate the polygon to that coordinate in the future), and i'm
 writting the coordinates on the LogCat.

 The coordinate's i'm receiving are not true cordinates, are wrong
 coordinates. For example this logcat represents a horizontal movement
 to the right of the screen:

    11-07 15:54:37.221: DEBUG/X(213): X: -0.003236022
    11-07 15:54:37.221: DEBUG/X(213): Y: -0.047979668
    11-07 15:54:37.241: DEBUG/X(213): X: -0.003236022
    11-07 15:54:37.251: DEBUG/X(213): Y: -0.047807075
    11-07 15:54:39.110: DEBUG/X(213): X: 0.03469036
    11-07 15:54:39.110: DEBUG/X(213): Y: 0.04418271
    11-07 15:54:43.021: DEBUG/X(213): X: -0.029469538
    11-07 15:54:43.021: DEBUG/X(213): Y: -0.034172554
    11-07 15:54:43.051: DEBUG/X(213): X: -0.026708115
    11-07 15:54:43.051: DEBUG/X(213): Y: -0.034172554
    11-07 15:54:43.081: DEBUG/X(213): X: -0.018596433
    11-07 15:54:43.081: DEBUG/X(213): Y: -0.034172554
    11-07 15:54:43.111: DEBUG/X(213): X: -0.013073588
    11-07 15:54:43.111: DEBUG/X(213): Y: -0.034172554
    11-07 15:54:43.141: DEBUG/X(213): X: -0.0039263717
    11-07 15:54:43.141: DEBUG/X(213): Y: -0.03365
    11-07 15:54:43.162: DEBUG/X(213): X: -0.0011649576
    11-07 15:54:43.162: DEBUG/X(213): Y: -0.033827372
    11-07 15:54:43.191: DEBUG/X(213): X: 7.335304E-4
    11-07 15:54:43.191: DEBUG/X(213): Y: -0.033654787





 This is the source code:





    public class MySurfaceView extends GLSurfaceView implements
 Renderer {
        private float INITIAL_Z = -35.0f;
        private Context context;
        private Square square;
        private float xrot;                                     //X Rotation
        private float yrot;                                     //Y Rotation
        private float zrot;                                     //Z Rotation
        private float z = INITIAL_Z;                    //Profundidad en el 
 eje Z
        private float x = 0.0f;                         //eje X
        private float y = 0.0f;                         //eje Y

    private MatrixGrabber mg = new MatrixGrabber(); //create the
 matrix grabber object in your initialization code
        byte horizontal=-1; //0: LEFT  1:CENTER  2:RIGHT
        byte vertical=-1; //0: TOP  1:CENTER  2:BOTTOM
        float startX=-1;
        float startY=-1;
        float xMovement=0.0f;
        float yMovement=0.0f;
        private boolean movement_mode=false;

        public MySurfaceView(Context context, Bitmap image, int width, byte
 horizontal, byte vertical) {
                super(context);
                this.context = context;
                setEGLConfigChooser(8, 8, 8, 8, 16, 0); //fondo transparente
                getHolder().setFormat(PixelFormat.TRANSLUCENT); //fondo 
 transparente
                //Transformamos esta clase en renderizadora
                this.setRenderer(this);
                //Request focus, para que los botones reaccionen
                this.requestFocus();
                this.setFocusableInTouchMode(true);
                square = new Square(image);
                this.horizontal=horizontal;
                this.vertical=vertical;
        }

        public void onSurfaceCreated(GL10 gl, EGLConfig config) {
                MyGl=gl;
                gl.glDisable(GL10.GL_DITHER);                           
 //dithering OFF
                gl.glEnable(GL10.GL_TEXTURE_2D);                        
 //Texture Mapping ON
                gl.glShadeModel(GL10.GL_SMOOTH);                        
 //Smooth Shading
                gl.glClearDepthf(1.0f);                                        
  //Depth Buffer Setup
                gl.glEnable(GL10.GL_DEPTH_TEST);                        
 //Depth Testing ON
                gl.glDepthFunc(GL10.GL_LEQUAL);
                gl.glClearColor(0,0,0,0); //fondo transparente
                gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
                //Cargamos la textura del cubo.
                square.loadGLTexture(gl, this.context);
        }

        public void onDrawFrame(GL10 gl) {
                //Limpiamos pantalla y Depth Buffer
              

[android-developers] Re: Incorrect output values with gluUnProject… why?

2011-11-07 Thread saex
Yes Latimerius, i think that i dont have to pass 0 as winZ parameter,
but i dont know how to get the Z value from the depth buffer. I'm
programming for Android 1.5 and openGL ES1, i didn't find a working
way to obtain winZ value on google after hours of searching :(

Did you know how to do it?




On Nov 7, 5:54 pm, Latimerius l4t1m3r...@googlemail.com wrote:
 I haven't ever used gluUnProject() myself but unless your geometry is
 glued right to the near plane I'm pretty sure it's wrong to pass zero
 for your window space Z.  Unless you have special knowledge of your Z
 I guess you'll need to read that value from the depth buffer.


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

2011-11-07 Thread Neilz
Right, so if I'm looking at the correct part of the sample, you end up
logging a strange 'intent' url, like this:

intent:#Intent;action=com.commonsware.android.MY_ACTION;end

I'm not sure what I do with this... I've tried using it in a link, as
another sample suggested, but I just get a 'Web page not available'
error. Here's my own example:
webView.loadData(a
href='intent:#Intent;action=com.commonsware.android.MY_ACTION;end'Hello
World!/a, text/html, utf-8);


On Nov 7, 4:45 pm, Mark Murphy mmur...@commonsware.com wrote:
 I have one 
 inhttp://github.com/commonsguy/cw-advandroid/Introspection/URLHandler(though
 that URL is from memory, as I am sitting in a conference keynote right
 now...)

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

2011-11-07 Thread chrisn
Mike Murphy:

Thanks for the reply, writing my own *second* activity is the path I
will go down if I can't get this to work.

I don't think that this is good general practice if the intent filter
API is working as documented.  It pollutes the android device with
needless activities that work like file browser but are hardcoded.
This breaks the abstraction that intents were meant to provide and
obviously doesn't allow users to specify a different activity to
handle said file format.

I guess I am looking for acknowledgement that this doesn't work as is
documented *or* that I am doing it incorrectly.  Multiple people have
gone down this path and there are several threads on this group that
makes it seem like it works in some places and doesn't work in other
places.  One other thing I didn't mention is that I am using a version
of Gingerbread that NVIDIA is using.  So this bug may be fixed a while
back and I could just be out of luck until ICS is running on my
hardware.

Specifically, I would state this problem a little stronger than I have
so far.

Write a simple activity, perhaps all it does is log which file it is
started with.  Add a intent filter that tries to map this activity
view to a file with a given extension *but doesn't map this activity
in any other way*.  This file format needs to be completely
unregistered in the system any other way, webkit or otherwise so pdf
isn't an option.  Attempt to launch the activity with am just
specifying the category and the file.  It will not work and it should,
given the documentation around intents and intent filters.

Then pick up one of the may file browsers attempt to double click on
the file.  This also will not work; and this failure in the public
android API is leading to app pollution because people are just
working around the problem by writing half-done versions of file
browsers hard-coded to their desired activity.

Chris

On Nov 5, 6:26 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 IIRC, I tried doing this unsuccessfully with OFX files.  I don't
 remember the details, but, if my recollection is right, unless the
 file extension is defined in android.webkit.MimeTypeMap, it won't
 work.

 On Nov 5, 9:18 am, chrisn cnuern...@gmail.com wrote:







  This is *incredibly frustrating.  I have changed my intent-filter to
  look like:

  intent-filter
          action android:name=android.intent.action.VIEW /
          category android:name=android.intent.category.DEFAULT /
          data android:mimeType=*/*/
          data android:scheme=file android:host=*
  android:pathPattern=.*\\.bif/
        /intent-filter

  $ adb shell am start -a android.intent.action.VIEW -d
  file:///mnt/sdcard/UIComposer/basicredcube.bif-n
  com.nvidia.devtech.UICViewer/.UICViewer
  Starting: Intent { act=android.intent.action.VIEW
  cat=[com.nvidia.devtech.UICViewer/.UICViewer] dat=file:///mnt/sdcard/
  UIComposer/basicredcube.bif}

  This works fine.

  Dropping the -n {explicity component} from the equation fails.

  What is going on?

  Chris

  On Nov 4, 5:26 pm, chrisn cnuern...@gmail.com wrote:

   I am having trouble getting my android system to launch my activity
   for all files with a given extension.

   I am using OI File Manager, and trying to get my activity launched for
   all files with a given suffix (bif).

   Here is the relevant section of my manifest:

   application
                           android:icon=@drawable/icon
                           android:label=@string/app_name 
                   !--We derive from native activity so we can access 
   information
                   about the intent the activity was launched with --
                   activity android:name=com.nvidia.devtech.UICViewer
                                   android:label=@string/app_name
                                   android:screenOrientation=landscape
                           !-- Tell NativeActivity the name of or .so --
                           meta-data android:name=android.app.lib_name
                                           android:value=UICViewer /
                           intent-filter
                                   action 
   android:name=android.intent.action.VIEW /
                                   category 
   android:name=android.intent.category.DEFAULT /
                                   category 
   android:name=android.intent.category.BROWSABLE /
                                   data android:mimeType=*/* /
                                   data android:scheme=file/
                                   data android:host=* /
                                   data android:pathPattern=.*\\.bif /
                           /intent-filter
                   /activity
       /application

   And here is the output of adb logcat when I 'click' on the file:

   I/ActivityManager(  145): Starting: Intent
   { act=android.intent.action.VIEW dat=file:///mnt/sdcard/UIComposer/
   basicredcube.biftyp=*/* cmp=android/
   

Re: [android-developers] Re: Directing user to webpage, then back to app

2011-11-07 Thread Kostya Vasilyev


07.11.2011 21:11, Neilz пишет:

Right, so if I'm looking at the correct part of the sample, you end up
logging a strange 'intent' url, like this:

intent:#Intent;action=com.commonsware.android.MY_ACTION;end


That strange URL is the result of calling intent.toUri().

http://developer.android.com/reference/android/content/Intent.html#toUri(int) 
http://developer.android.com/reference/android/content/Intent.html#toUri%28int%29


Basically, you can make your own Intent in code, call toUri, and copy 
the result to the web page source.


Or just replace the action with your own, keeping the rest (from 
intent: to end).



I'm not sure what I do with this... I've tried using it in a link, as
another sample suggested, but I just get a 'Web page not available'
error. Here's my own example:
webView.loadData(a
href='intent:#Intent;action=com.commonsware.android.MY_ACTION;end'Hello
World!/a, text/html, utf-8);


com.commonsware.android.MY_ACTION matches the intent filter for the activity in 
Mark's sample code.

Your action string should match the intent filter in your project, not Mark's.


--
Kostya Vasilyev

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

2011-11-07 Thread Mark Murphy
I can't speak for WebView. Point a browser at
http://commonsware.com/sampleto see a page that uses links to be
picked up by the sample app's activity.

Mark Murphy
mmur...@commonsware.com
On Nov 7, 2011 9:12 AM, Neilz neilhorn...@gmail.com wrote:

 Right, so if I'm looking at the correct part of the sample, you end up
 logging a strange 'intent' url, like this:

 intent:#Intent;action=com.commonsware.android.MY_ACTION;end

 I'm not sure what I do with this... I've tried using it in a link, as
 another sample suggested, but I just get a 'Web page not available'
 error. Here's my own example:
 webView.loadData(a
 href='intent:#Intent;action=com.commonsware.android.MY_ACTION;end'Hello
 World!/a, text/html, utf-8);


 On Nov 7, 4:45 pm, Mark Murphy mmur...@commonsware.com wrote:
  I have one inhttp://
 github.com/commonsguy/cw-advandroid/Introspection/URLHandler(though
  that URL is from memory, as I am sitting in a conference keynote right
  now...)

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

2011-11-07 Thread Neilz
Ah... it works when I run it from your sample page, yes. It doesn't
work from a WebView, hence my initial confusion.

At least I have the principle working... I can't actually test it in
full, as I want to pass parameters too, but don't have a webpage I can
manipulate at this moment.

Thanks for persevering...

On Nov 7, 5:37 pm, Mark Murphy mmur...@commonsware.com wrote:
 I can't speak for WebView. Point a browser 
 athttp://commonsware.com/sampletosee a page that uses links to be
 picked up by the sample app's activity.

 Mark Murphy
 mmur...@commonsware.com
 On Nov 7, 2011 9:12 AM, Neilz neilhorn...@gmail.com wrote:
oup/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] remap hardware buttons for UI navigation

2011-11-07 Thread lbendlin
On the Parrot Asteroid there is only a scroll wheel that creates the 
keycodes 19 and 20 for vertical navigation. The device also has media 
buttons, specifically 87 and 88. I would like to translate these into the 
horizontal dpad keys to allow users the selection of buttons that are in a 
row.  I tried this

   @Override
public boolean onKeyDown(int keyCode, KeyEvent event) {

if(keyCode == KeyEvent.KEYCODE_MEDIA_PREVIOUS)
keyCode = KeyEvent.KEYCODE_DPAD_LEFT;
if(keyCode == KeyEvent.KEYCODE_MEDIA_NEXT)
keyCode = KeyEvent.KEYCODE_DPAD_RIGHT;

return super.onKeyDown(keyCode, event);
}


and while the keys are properly recognized they don't seem to translate 
into shifting the focus. 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

[android-developers] Tools for adding print Logs inside the Android Code

2011-11-07 Thread s.rawat
HI,
I am trying to understand the android code flow for camera module.Is there
any script to insert the print logs(FILENAME_FUNCTIONNAME_LINENUMBER)
inside the android code(java , cpp and c files) .I am planning to do this
and compile the image and run it and logcat the output while I run the
camera.apk application.Is it fine to do this sort of code analysis.I know
task is cumbersome , any other drawback for this approach.Plz assit.
Rgds,
Saurabh

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

2011-11-07 Thread Michael Chan
Hi,

 Are you saying there is no way to help the user subscribe to a public google 
 calendar via the new calendar api?
There just isn't a *supported* way via the Android Calendar API. (You
can always do some reverse engineering and get something that work for
now. But it may break suddenly one day when the user gets an update.
So I really really want discourage everyone from doing that.)

 Is there a better, more supported way to do this?

The only supported way today is to talk to the server directly via the
GData api.  You need to figure out how to get the credentials.
http://code.google.com/apis/calendar/data/2.0/developers_guide.html
Looks like the code below is doing that.

 Also what do you mean by using the browser?  Can I make the calendar
 visible and sync'ed via the browser?

2 way:
1) Instruct the user to do it manually
2) Send the user to
https://www.google.com/calendar/render?cid=calendar ID or
http://www.google.com/calendar/hosted/domain/render?cid=calendar
ID. The user has to say they want to use the desktop UI, zoom in, and
click Yes, add this calendar. It is not a great experience.  The
other drawback here is that the user won't be able to choose which
account the calendar should be added to.

Thanks,
Mike

On Fri, Nov 4, 2011 at 6:13 PM, Ralph fed...@gmail.com wrote:
 Hi Michael,

 Thanks again.

 Are you saying there is no way to help the user subscribe to a public
 google calendar via the new calendar api?

 I am already subscribing using some example from Yaniv Inbar a while
 back:

 where ALERT_CALENDAR is nyc.ale...@brooklynmarathon.com

 Is there a better, more supported way to do this?

 Also what do you mean by using the browser?  Can I make the calendar
 visible and sync'ed via the browser?


 Thanks,
 Ralph

  private void subscribeCalendar()
  {
    CalendarUrl url  = CalendarUrl.forAllCalendarsFeed();
    Log.i(TAG,ADD NEW CALENDAR:  + url);
    CalendarEntry calendar = new CalendarEntry();
    //calendar should have something like setid of gdata api

    calendar.id = ALERT_CALENDAR;
    //calendar.title = Test:  + new DateTime(new Date());
    try {
      calendar.executeInsert(transport, url);

      AlertDialog builder;
      try {
          builder = MessageDialogBuilder.create(this, MESSAGE );
          builder.show();
      } catch (NameNotFoundException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
    } catch (IOException e) {
      handleException(e);
    }

  }

 On Nov 4, 12:38 pm, Michael Chan mc...@android.com wrote:
 Hi Ralph,

 I wish I have a solution for you. That's not supported right now. The only
 (not so good) way is to use the browser. I will file an internal feature
 request if we don't have one already.

 Thanks,
 Mike







 On Fri, Nov 4, 2011 at 7:24 AM, Ralph fed...@gmail.com wrote:
  Hi Michael and thank you.

  Can you let us know the recommended way to subscribe a user to a
  public google calendar.

  For example, let's say you have a google calendar with public
  information.  for example, some city alerts etc. data.

  We want to make it easy for the user to subscribe to the public
  calendar and make it sync'ed and visible (with their permission of
  course)

  Today, I have to give them instructions and it seems that each phone
  manufacturer has implemented the calendar in a different way so the
  instructions are very complicated.  What I'd like to send the user to
  a screen with the calendar subscription (visible and sync'ed) already
  set up and let them confirm it.

  Thanks,
  Ralph

  On Nov 3, 2:29 pm, Michael Chan mc...@android.com wrote:
   Hi,

   I believe the GoogleCalendarSyncAdapter was not included in the
   emulator. That's why you can't sync Google Calendars in the emulator.

   The new Calendar API will support viewing, adding events (not
   calendars) via Intents. The user will need to confirm before the event
   is saved.

   Adding *Google* calendars via the provider is not supported at this
   time.

   We will be publishing a developer guide for Calendar APIs with more
   details on the set of supported intents as well as code snippets.

   managedQuery has been deprecated. It can cause ANRs. The recommend way
   is to use a CursorLoader (http://developer.android.com/reference/
   android/content/CursorLoader.html).  If you just need to read the data
   and can close the query immediately, you can still do a query (in a
   non-UI thread), read the data you want, and close the cursor.

   Thanks,
   Mike

   On Nov 3, 8:20 am, Ralph fed...@gmail.com wrote:

Thanks again.

I can say that if you have access to an exchange server then the
following examples do work in the android 4.0 level 14 emulator using
google apis at the moment:

Insert an event via Intents:
                        Intent intent = new
  Intent(Intent.ACTION_INSERT)
                    .setType(vnd.android.cursor.item/event)
                    

[android-developers] Re: Need help on connecting android app to remote database.

2011-11-07 Thread fba
Hi Charan,

There isn't an easy way in Android to access a remote database.   I
suppose you could dig around and figure out how mysql communicates
across the network, and then develop an interface from there.
However, it seems that would be pretty involved.

I had a need to do something similar with a previous project.  The
easiest way I could find was to hack up a little PHP to run on
Apache that would output the data I needed in XML.   I could then put
the XML through the SAX parser, and end up with the data I needed.   I
suspect something like this is going to be your best bet.

On Nov 6, 6:19 am, Charan charankuma...@gmail.com wrote:
 Hello members,

 I am a novice android app developer. As of now i'm developing an app, that
 needs to communicate with remote database.

 I tried using web service but that not working to me. Please provide me
 complete information from A to Z steps in conencting, communicating, get
 response from remote database. i am using mysql has remote database.

 Please respond quickly, urgent help needed.

 Thanking you,
 --
 With Regards,
 Charan Kumar

 COMPARISON IS THE BEST WAY TO JUDGE YOUR PROGRESS.
 BUT DON'T COMPARE WITH OTHERS, COMPARE YOUR YESTERDAY WITH YOUR TODAY

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

2011-11-07 Thread fba
Has anyone out there attempted to use the new KeyChain APIs?   They
don't seem to work the way I would expect.

I am able to install a certificate easily enough using
KeyChain.createInstallIntent(), and passing it a PEM formatted
certificate.

The documentation indicates that you need the USE_CREDENTIALS
permission in order to read any certificate data back.  So, I have
enabled that. However, once I go back and try to read out the
certificate data with KeyChain.getCertificateChain() I get the
exception java.lang.IllegalStateException: uid 10040 doesn't have
permission to access the requested alias.   Looking at the
documentation indicates that you need the USE_CREDENTIALS permission.

Has anybody made something like this work?


In trying to figure this out, I dug a little deeper to see what I
could find.   When I got a shell to the emulator, I found that my
certificate had been installed in two places.  One was in /data/misc/
keystore, and the other was in /data/misc/keychain/cacerts-added.
The new certificate also shows up in the Settings-Security-Trusted
Credentials-User.   So, the certificate appears to have been
installed correctly.

Digging around a little more found the database in /data/data/
com.android.keychain/databases.  This database looks like it is
supposed to handle the permission mapping for certificates that are
installed.  So, for fun, I added an entry to the database that I
thought should give uid 10040 access to the certificate with the alias
of Testing.  (Testing is the alias I used to install the
certificate in the first place.)   When I run my test app, I no longer
get the uid 10040 doesn't have permission... error.  However, I now
get this error : java.lang.IllegalArgumentException: bytes ==
null.   This change in errors would seem to indicate that my theory
about the permissions is correct, but even when it is fixed the
certificate still won't be returned to me.

Any help would be appreciated.

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


Re: [android-developers] ACTION_TIME_CHANGED and ACTION_DATE_CHANGED old time detection

2011-11-07 Thread Marcin Orlowski
On 7 November 2011 09:51, Eugene Paschenko epasche...@gmail.com wrote:

 I am using ACTION_TIME_CHANGED and ACTION_DATE_CHANGED. onReceiver
 calling after time was changed and I call System.currentTimeMillis()
 and got new time. How I can get old time or delta time?


You can't as there's no old time concept there. You simply get
notification that time has changed and that's it.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

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

  1   2   >