[android-developers] wried UI issue..

2011-05-04 Thread knocker
I am facing weird UI behavior issue.
When I set *listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);*
onListItemClick behave incorrectly... Let me know if I am missing
anything here.

When I comment following line
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

This UI works fine as expected but following part of code doesn't work
long[] idsList = getListView().getCheckedItemIds();
Log.i(TAG,"number of rows selected"+idsList.length);

Expected UI change is when i click on one list item it should toggle
its checked state, which does not happen it toggles other list item..
Strange



File:Listbox.java

package checkbox.list.com;
import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.CheckedTextView;
import android.widget.ListView;
import android.provider.ContactsContract.CommonDataKinds.Phone;


public class listbox extends ListActivity {
private static final String TAG = "listbox";
Cursor mCursor = null;
ListView listView = null;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
listView = getListView();
LoadList();
//listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
}

@Override
protected void onListItemClick(ListView l, View v, int position, long
id) {
int pos = l.getPositionForView(v);
Log.i(TAG,"pos of view"+pos);
CheckedTextView txtview = (CheckedTextView)
v.findViewById(android.R.id.text1);
txtview.toggle();
long[] idsList = getListView().getCheckedItemIds();
Log.i(TAG,"number of rows selected"+idsList.length);
}

private void LoadList() {
mCursor = this.getContentResolver().query(Phone.CONTENT_URI, null,
null, null, null);
startManagingCursor(mCursor);

String [] from=new String []{Phone.DISPLAY_NAME,Phone.TYPE};
int [] to=new int [] {android.R.id.text1, android.R.id.text2};
MyCursorAdapter sca=new
MyCursorAdapter(this,R.layout.fetchrow,mCursor,from,to);
setListAdapter(sca);
}
}

File:MyCursorAdapter.java

package checkbox.list.com;
import android.content.Context;
import android.database.Cursor;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckedTextView;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;

public class MyCursorAdapter extends SimpleCursorAdapter {
protected static final String TAG = "MyCursorAdapter";
private Cursor mCursor;
private String []strFromCols;
private int []toView;

public MyCursorAdapter(Context context, int layout, Cursor c,
String[] from, int[] to) {
super(context, layout, c, from, to);
mCursor = c;
strFromCols = from;
toView = to;
}
public View getView(int pos, View inView, ViewGroup parent) {
View v =  super.getView(pos,inView,parent);
mCursor.moveToPosition(pos);

final CheckedTextView chkTxt = (CheckedTextView)
v.findViewById(toView[0]);
String name=
mCursor.getString(mCursor.getColumnIndex(strFromCols[0]));
chkTxt.setText(name);
//  chkTxt.setOnClickListener(new OnClickListener() {
//
//  @Override
//  public void onClick(View v) {
//  chkTxt.toggle();
//  }
//  });
TextView txtPhone = (TextView) v.findViewById(toView[1]);
String phone =
mCursor.getString(mCursor.getColumnIndex(strFromCols[1]));
txtPhone.setText(phone);
return (v);
}
}

File: main.xml


http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="top">





File:fetchrow.xml


http://schemas.android.com/apk/res/
android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

http://schemas.android.com/apk/res/
android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
android:paddingLeft="6dip"
android:paddingRight="6dip"


/>






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

2011-05-04 Thread D S
Thanks Nikolay,

That's what I was missing. I needed to put a signed app on the device
(I assume that's what you meant by release version). Interesting that
the test sku's work, but created sku's don't work without signed app..

Thanks,
DS

On May 2, 9:18 pm, Nikolay Elenkov  wrote:
> On Mon, May 2, 2011 at 3:13 AM, D S  wrote:
> > Hello,
>
> > I integrated the code from Dungeons example into my app. When I use
> > mSKU = "android.test.purchased"
> > I am able to make the purchase successfully on my device, so I assume
> > the integration is correct.
>
> > But when I use
> > mSKU = "my.product.id"
> > I get an error RESULT_DEVELOPER_ERROR in the logs.
>
>  You need to install a release version on your device and use one of
> the testing accounts as the primary Google account for this to work.
>
> http://developer.android.com/guide/market/billing/billing_testing.htm...

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

2011-05-04 Thread srihari babu
I am implementing AIDL interface for remore service.
i am getting exception while reading exception from remore service
over AIDL interface.
Any suggestions are highly appreciated.
Thanks,
Srihari.R

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

2011-05-04 Thread a a
my write code
public static void writeFBTagToCache(long crc64) {
try {


ArrayList tags = mItem.getTags();

if(tags == null || tags.size() <= 0) {
Log.d(TAG, "tags is null + " + mItem.mGuid);
return;
}

int size = tags.size();
File tempFile = null;
final String tempFilePath = FB_TAG_CACHE;
String prefix = crc64 + "";
tempFile = File.createTempFile(prefix, ".cache", new
File(tempFilePath));
final FileOutputStream fileOutput = new FileOutputStream(tempFile);
final BufferedOutputStream bufferedOutput = new
BufferedOutputStream(fileOutput, 1024);
final DataOutputStream dataOutput = new
DataOutputStream(bufferedOutput);

try {
for(int i = 0; i < size; i++) {
tagStruct tag = tags.get(i);
dataOutput.writeInt(size);
dataOutput.writeFloat(tag.mXcoord);
dataOutput.writeFloat(tag.mYcoord);
Utils.writeUTF(dataOutput, tag.mTag);
}

if(dataOutput != null) {
dataOutput.close();
bufferedOutput.close();
fileOutput.close();
}
} catch (Exception e) {
// Was unable to perform the operation, we delete the temp file
Log.e(TAG, "Unable to write the index file " + crc64);
tempFile.delete();
}
}catch(IOException e) {
e.printStackTrace();
}
}

-
my read code
public static ArrayList createFBTagFromCache(long crc64) {
Log.e("harvey", "create facebook tag from cache");
try {
File tempFile = null;
final String tempFilePath = FB_TAG_CACHE;
String prefix = crc64 + "";
tempFile = File.createTempFile(prefix, ".cache", new
File(tempFilePath));

FileInputStream fileInput = new FileInputStream(tempFile);
BufferedInputStream buf = new BufferedInputStream(fileInput);
final DataInputStream dataInput = new DataInputStream(buf);

try {
int size = dataInput.readInt();
ArrayList tags = new ArrayList(size);
for(int i = 0; i < size; i++) {
tagStruct tag = new tagStruct();
if(i!=0) {
int laji = dataInput.readInt();
}
tag.mXcoord = dataInput.readFloat();
tag.mYcoord = dataInput.readFloat();
tag.mTag = dataInput.readUTF();
tags.add(tag);
}
dataInput.close();
return tags;
} catch (Exception e) {
dataInput.close();
return null;
}
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
-
Exceptoin cause following:

05-05 13:32:50.058: WARN/System.err(5268): java.io.EOFException
05-05 13:32:50.058: WARN/System.err(5268): at
java.io.DataInputStream.readInt(DataInputStream.java:287)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.UriTexture.createFrTagFromCache(UriTexture.java:455)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.UriTexture.createFromUri(UriTexture.java:185)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.UriTexture.load(UriTexture.java:362)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.RenderView.loadTextureAsync(RenderView.java:308)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.RenderView.access$6(RenderView.java:306)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.RenderView$TextureLoadThread.load(RenderView.java:1176)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.RenderView$TextureLoadThread.run(RenderView.java:1160)
05-05 13:32:50.259: WARN/System.err(5268): java.io.EOFException
05-05 13:32:50.259: WARN/System.err(5268): at
java.io.DataInputStream.readInt(DataInputStream.java:287)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.UriTexture.createFrTagFromCache(UriTexture.java:455)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.UriTexture.getTag(UriTexture.java:689)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.RenderView.drawTag(RenderView.java:251)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.RenderView.uploadTexture(RenderView.java:613)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.RenderView.processTextu

Re: [android-developers] Re: Basic Concept

2011-05-04 Thread MOHIT SHARMA
thanx a lot dude ..

On Thu, May 5, 2011 at 01:27, Streets Of Boston wrote:

> 'this' in an Activity refers to the Context, because an Activity is a
> Context (Activity extends Context).
> this.getApplicationContext() returns an Application. An Application is a
> Context as well.
>
> But the ProgressDialog really likes an Activity, not just a Context. As you
> discovered, not just any Context will work correctly: If the Context is an
> Application, then you get a run-time error.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] 回覆:Hello, Android troubles

2011-05-04 Thread warenix
did you compile your code in Eclipse or in command line console?

look like you didn't include the android sdk in your class path

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

2011-05-04 Thread Robert Massaioli
For the record I think you would be better off with the Simple XML 
Library: 
http://massaioli.homelinux.com/wordpress/2011/04/21/simple-xml-in-android-1-5-and-up/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] 1380 Paid Applications in One Free Torrent then How to SELL it?

2011-05-04 Thread TreKing
On Wed, May 4, 2011 at 8:37 PM, varinag gold  wrote:

> How do you expect to make business if your application already end up in a
> free torrent like below?
>

Not posting a link to the torrent that's distributing the pirated software
might help.

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

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

[android-developers] Re: Request to join Android Developers

2011-05-04 Thread Robert Massaioli
Why do you feel that you have to request to join this group? If you have 
questions ask them. Personally I prefer asking all of my Android questions 
on Stack Overflow and leave this for discussions.

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

Re: [android-developers] Does not work on I1

2011-05-04 Thread TreKing
On Wed, May 4, 2011 at 1:22 AM, Michael M  wrote:

> This not seem to work on I1 do you know why this is.


Gnomes.

-
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] Hello, Android troubles

2011-05-04 Thread TreKing
On Tue, May 3, 2011 at 7:13 PM, exax  wrote:

> Hi, I just started developing for Android and followed the Hello, Android
> tutorials on the Resources tab from Android.com. I followed it step for step
> and have been going in circles trying to figure out what's wrong.
>

What is sun.applet.AppletPanel?

-
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] Select Multiple Contact Through My Application

2011-05-04 Thread TreKing
On Wed, May 4, 2011 at 12:38 AM, sudipta biswas wrote:

> I want to access the android phone book contacts
> through my application and also select multiple contact(as per my
> choice) from phone book...please help me to find out a suitable way...
>

Try reading the documentation on Contacts. Then try something.

-
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] Determine if device has only SoftMenu Keys ?

2011-05-04 Thread TreKing
On Wed, May 4, 2011 at 3:09 PM, Andy  wrote:

> Is there a possibility to determine if the device your App / Game is
> running has only soft-keys available ?
> (Like Back, Home, Menu,..)
>

IDK (don't think so though) but what difference does it make?

-
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] Event based communication between two apps.

2011-05-04 Thread TreKing
On Wed, May 4, 2011 at 10:45 AM, Jacob  wrote:

> I have 2 apps; need to stay communicated with each other


Why? What are you trying to achieve?

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

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

[android-developers] Re: Custom Intent does not reach PhoneApp

2011-05-04 Thread bluewolf
Thanks, am posting the question in the Android Platform group.

On May 4, 12:52 pm, TreKing  wrote:
> On Tue, May 3, 2011 at 2:42 PM, bluewolf  wrote:
> > I have added an action to the intent filter in
> > packages/apps/Phone/src/ com/android/phone/PhoneApp.java
>
> This is not the forum for modifying the source code. Check the documentation
> for a more appropriate forum.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Request to join Android Developers

2011-05-04 Thread Zsolt Vasvari
Thumbs down from me, sorry.

On May 4, 11:56 pm, SorinC  wrote:
> Hello
>
> I'd be interested in joining your group, as I am quite new to Android
> development. I have a few questions and I believe that this is one of
> the best places to ask them.
>
> Thanks
>
> SorinC

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

2011-05-04 Thread Zsolt Vasvari
- Get the source code to Android
- Localize it
- Submit localized data (text/images/etc.) to Google
- Wait for it to appear in the next version of Android.

On May 4, 6:30 pm, naveed ahmad  wrote:
> Hi I am Naveed and i am new in Android world,, I need help regarding
> support of Urdu messages in Android .. plz guide me how can i do
> this,
>
> a lot of people in my country use to send message in Urdu  language
> but Android does not support Urud  yet in messaging.
>
> Thanks
> Naveed Ahmad

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

2011-05-04 Thread Niall
Ok. I was wrong in my first post about the error not being displayed. The 
appwidget did indeed just default to the initial value. 
I solved the issue (I think) by doing the following:

public static class orientationDetectionService extends Service {
  @Override public void onStart( Intent intent, int startID ) {
  }
  @Override void onConfigurationChanged( Configuration newConfig ) {
Intent intent = new Intent( this, widget.class ); 
intent.setAction( widget.FORCE_WIDGET_REDRAW ); 
sendBroadcast( intent ); 
  }
  @Override public IBinder onBind( Intent arg0 ) { 
return null; 
  }
}


I context.startService'd in the onCreate of the widget, and put the service 
into the manifest too. 

Is this a heavy solution to the problem? It might be a naive question, but 
will this solution eat away battery? 

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

2011-05-04 Thread MEDO
thank you Mr.Streets Of Boston for your helpful reply
and i appreciate you note

thank you again

On 5 مايو, 04:32, Streets Of Boston  wrote:
> If i understand correctly, you wrote the code that uses the SAX parser. I
> assume you know something about coding with SAX parsers.
>
> There is an issue with the 'parameter-entities' feature.
>
> Go tohttp://developer.android.comand search for the SAX parser classes and
> figure out which SAX parser implementation is used (if not by documentation,
> debug it and find it out that way).
> Then figure out why the 'parameter-entities' feature is not supported. Maybe
> you just have to not set it or use another feature.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] 1380 Paid Applications in One Free Torrent then How to SELL it?

2011-05-04 Thread varinag gold
How do you expect to make business if your application already end up
in a free torrent like below?

http://thepiratebay.org/torrent/6287940/1380_Paid_Android_Apps_and_Games_APK

Have they stole these apps from android market or ?

regards,
Varinag

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

2011-05-04 Thread nemik
Get MiFare UltraLights. They have protection bits that you can set so
that no more writes can occur. I believe this can also be done with
MiFare 1k/4k/etc Classic tags as well but the UL's are cheaper.

On May 4, 4:08 pm, Mark Wyszomierski  wrote:
> Hi,
>
> I've got some NFC tags and have written some data into them using the
> NXP Tag Writer app available from marketplace.
>
> After writing some data in the tag, I'd like to remove write-access to
> it so people can't overwrite the tag data. Using the Tag Writer app, I
> get a message stating that write protection is not available for the
> tags I have.
>
> Does anyone know of any tags I can order which are writeable and have
> write protection available too?
>
> Thanks

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


[android-developers] Re: SAX PARSER

2011-05-04 Thread Streets Of Boston
If i understand correctly, you wrote the code that uses the SAX parser. I 
assume you know something about coding with SAX parsers.
 
There is an issue with the 'parameter-entities' feature. 
 
Go to http://developer.android.com and search for the SAX parser classes and 
figure out which SAX parser implementation is used (if not by documentation, 
debug it and find it out that way).
Then figure out why the 'parameter-entities' feature is not supported. Maybe 
you just have to not set it or use another feature. 

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

2011-05-04 Thread Niall
Found this that suggests creating an activity that detects the orientation 
change. Is that the best way to get around it? 
http://stackoverflow.com/questions/3503114/after-orientation-change-buttons-on-a-widget-are-not-responding

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

2011-05-04 Thread Niall
Hey all,

I have an appwidget that appears to break when the screen is rotated (it has 
been reported to me, and I can't test it). When I test the orientation on 
the emulator the orientation seems to work well enough... 

I have no idea how to debug this or how to figure out what to do. Does 
anyone have any advice for solving this? 

Thanks

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

Re: [android-developers] Re: SAX PARSER

2011-05-04 Thread Kumar Bibek
2 days is sufficient to fix a parser :)

Search for the right things, and ask the right questions. :)

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Thu, May 5, 2011 at 5:49 AM, MEDO  wrote:

> how come?
> if you have any idea about it please help me and share.
>
> it`s very important to me to finish this program within the next two
> day
>
> Kind Regards,
>
> On 5 مايو, 02:33, Streets Of Boston  wrote:
> > Then you need to change your code to not set this sax feature.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: SAX PARSER

2011-05-04 Thread MEDO
how come?
if you have any idea about it please help me and share.

it`s very important to me to finish this program within the next two
day

Kind Regards,

On 5 مايو, 02:33, Streets Of Boston  wrote:
> Then you need to change your code to not set this sax feature.

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

2011-05-04 Thread Streets Of Boston
Then you need to change your code to not set this sax feature.

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

2011-05-04 Thread Miguel Morales
With an Ad SDK that is provided by companies like AdMob.

On Wed, May 4, 2011 at 4:02 PM, bob  wrote:

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




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/,
http://www.youtube.com/user/revoltingx

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

2011-05-04 Thread bob
How do most people typically add ads to an Android app?

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

2011-05-04 Thread himanshu jain
Hi all,

I am not sure as Google mentioned IPv6 support is available on
Android
1.6 or up , but i checked with 2.2 it even does not have link local
IPv6 address whereas 3.0 has that.


I tried to set up an environment to generate gloabal IPv6 but DHCP
can
assign IPv6 to other client except 3.0 HoneyComb which may have bug
in
native code ?.


When i got gloabal IPv6 address from server i still not able to
connect it says network unreachable ?.


Any suggestion


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

2011-05-04 Thread Jordan 5222
Pouvez Vous ecrire en anglais? Je pense que vous n'aurez pas une response
autremant..

Vous pouvez ecouter a KeyEvent pour la touche menu dans le java code.

2011/5/4 souissi haythem 

> Bonjour
>
> Est ce que c'est possible de controler les touches non tactile de son
> terminal mobile. c'est à dire la touche appeler par exemple ou les touches
> de volume.
> Je veux que lorsque je fait un clic sur la touche menu, mon programme
> affiche son menu et non pas celui de SE Android. Est ce que je peu controler
> ce bouton?
>
> Cordialement
> Haythem
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Jordan - http://www.lulz-industries.org

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

2011-05-04 Thread MEDO
thank you for your reply
and
 i got the following exception

org.xml.SAXNotRecognizedException: 
http://xml.org/sax/feature/external=parameter-entities

thank you again for your concern

Best Regards.

On 5 مايو, 00:38, Streets Of Boston  wrote:
> What error?

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

2011-05-04 Thread Justin Anderson
*> Hi! I want to know if there are any method to know if is the first
exuction of an app after reboot, or the app is alredy executed by the user
(the app have one activity and to recivers).*
*
*
Is this for an application you developed or any arbitrary app?  And, WHY?

*> I'm thinking in methods like write and rewrite a token file every minute,
and each time the app starts, check the lastmodified property to know the
state, but i think that must be smart ways to do it.*

Please tell me you're not serious... You're joking right?  Writing a file
every minute in the background would surely drain the battery like crazy.

A better solution, if you really want to know the first time your app is
launched after a reboot is to listen for the Boot Completed broadcast
message:
http://developer.android.com/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED

Have your receiver write out a value to SharedPreferences... something like
a boolean key/value pair with a key of "LaunchedSinceBoot" and a value of
"false"

Then when you launch your main app read that value and act accordingly.
 Then set the value to true so the next time you launch you skip the
first-launch-since-boot steps...

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


On Wed, May 4, 2011 at 5:34 AM, ferran fabregas  wrote:

> Hi! I want to know if there are any method to know if is the first exuction
> of an app after reboot, or the app is alredy executed by the user (the app
> have one activity and to recivers).
>
> I'm thinking in methods like write and rewrite a token file every minute,
> and each time the app starts, check the lastmodified property to know the
> state, but i think that must be smart ways to do it.
>
> Any idea?
>
> Thanks in advance,
>
> *Ferran*
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: SAX PARSER

2011-05-04 Thread Streets Of Boston
What error?

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

2011-05-04 Thread MEDO
hello everyone
i am developing an Android + Google Health program and

i need your help
my problem is that my code runs very good as java standalone program
but when i run it in ANDROID environment it fails

and the error about SAX PARSER

could you please help me

Regards

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

2011-05-04 Thread frealek
I read all the recent messages regarding this issue, and it is still
not fixed as of version r10-linux...

edit tools/android, go to the last line, add the following exact
text :
-Djava.net.preferIPv4Stack=true

so that the line looks like :

exec "$java_cmd" -Djava.net.preferIPv4Stack=true -Xmx256M $os_opts
$java_debug -Dcom.android.sdkmanager.toolsdir="$progdir" -classpath
"$jarpath:$swtpath/swt.jar" com.android.sdkmanager.Main "$@"

(this is all on 1 line)

#solved

Why does it work :

As of today, I don't know of any operating system not enabling IPv6 by
default... and this does not mean you are actually able to
_communicate_ with IPv6.
It's the default policy to first try to use IPv6, but here the app
fails (and most Java apps do fail with IPv6...)

Running the script with strace showed the problem :
$ strace -fF tools/android &>/tmp/log
$ grep -i unreachable /tmp/log
[pid 3264] connect(20, {sa_family=AF_INET6, [.cut.]
inet_pton(AF_INET6, [...cut] = -1 ENETUNREACH (Network is
unreachable)
[.cut]

=> app is using Java and is trying to use IPv6, but is NOT IPv6-ready

...

On 24 avr, 12:26, Saurav  wrote:
> Hi all,
>
> I am trying to install android sdk, but the for every try, the android sdk
> manager gives this error message:
>
> "Failed to fetch 
> URLhttp://dl-ssl.google.com/android/repository/addons_list.xml, reason:
> Connection timed out"
>
> It may look silly, but has anybody solved this? And I have tried with and
> without https!
>
> Thanks in advance.
>
> Regards,
> Saurav Mukherjee.

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

2011-05-04 Thread Bill Gatliff
Guys:


Are there any docs available which suggest approaches for FOTA-like
updates to non-phone Android devices?

In a nutshell, I'm looking at deploying Android as the operating
system for a device that isn't a phone.  I'm trying to figure out what
the best way might be to do in-the-field updates of the device,
particularly ones that don't require end-user intervention.  Updates
of both APKs and the core system files are considered.

I understand the basics behind all of the above, I'm just wondering if
there is existing infrastructure within the Android framework (or
elsewhere) that I should be taking advantage of.  I have experience
with this stuff on non-Android platforms.


Thanks!


b.g.
-- 
Bill Gatliff
b...@billgatliff.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: Optical character recognition

2011-05-04 Thread Michelle Konzack
Hello Ezine.sbr23,

Can you correct the clock of your computer please?

Thanks, Greetings and nice Day/Evening
Michelle Konzack

-- 
# Debian GNU/Linux Consultant ##
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet France EURL   itsystems@tdnet UG (limited liability)
Owner Michelle KonzackOwner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France   77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947  mobil
  Tel: +49-176-86004575 office

  
 

Jabber linux4miche...@jabber.ccc.de
ICQ#328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/


signature.pgp
Description: Digital signature


[android-developers] Needed Help

2011-05-04 Thread tipu
Hi group members.
I developed a twitter apps for twitter users unfollow. But i donot add
Non-follower counter. My apps names www.easyunfollow.com. If any
members know this coding please share for me.

Thanks to regards all members
Tipu

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

2011-05-04 Thread SorinC
Hello

I'd be interested in joining your group, as I am quite new to Android
development. I have a few questions and I believe that this is one of
the best places to ask them.

Thanks

SorinC

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

2011-05-04 Thread MB
Hello,

I am developing for Honeycomb, and I have a HorizontalScrollView with
a number of "panels" that make up the UI. The rightmost panel changes
its content, sometimes displaying a ListView. I also have a sliding
drawer that, when opening or closing, causes the HorizontalScrollView
to resize.

When the HorizontalScrollView resizes, it also jumps to show the
rightmost panel, which I don't want. But this only happens when the
panel contains a ListView - when the panel contains a LinearLayout the
HorizontalScrollView doesn't change it's position when resizing.

The only similar issue I found while searching is this:
http://stackoverflow.com/questions/1878623/listview-in-a-horizontalscrollview-in-android,
but it's triggered by an adapter changing data rather than a resize.

How can I stop this automatic scrolling?

Thanks,
Mike

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Strangely !! The RAM usage of my APK over 20MB

2011-05-04 Thread Leon Worker
Dear Senior Developers :
   I'm a junior Android developer. And i can't understand where the
problem is. As my Message Title said, i can't convince my Project
Manager the RAM usage is so high sometimes.

Here is my Steps and Situation for your reference.

Situation : My APK have 4 Activities and 1 Service. And I will check
my APK status through the function of "Setting".

Step 1 : From "Setting" --> "Application" --> "Running Service".
Step 2 : Find my APK Name, and you can see the RAM Usage and Service
running-time. Normally, my APK will cause about 3 to 5 MB RAM. But i
find the RAM Usage will become to 20MB sometimes.

So i don't know how to tune my APK or how to avoid the Memory Leak
issue. Please kindly to give me any suggestions. Many 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] Demande d'info

2011-05-04 Thread souissi haythem
Bonjour

Est ce que c'est possible de controler les touches non tactile de son
terminal mobile. c'est à dire la touche appeler par exemple ou les touches
de volume.
Je veux que lorsque je fait un clic sur la touche menu, mon programme
affiche son menu et non pas celui de SE Android. Est ce que je peu controler
ce bouton?

Cordialement
Haythem

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

[android-developers] Does not work on I1

2011-05-04 Thread Michael M
This not seem to work on I1 do you know why this is.

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

2011-05-04 Thread ghi80
I have the same problem (i'm an italian developer). I try to insert
price as 0.99, 4.99, 5.49 or 9.99 euro but the developer console set
it to 99, 499, 549, 999 euro.
I receive a lot of error messages e i can't re-publish my applications
I wait a solution...
Thanks bye!

On 4 Mag, 03:23, TreKing  wrote:
> On Tue, May 3, 2011 at 3:02 AM, Michele Galli 
> wrote:
>
> > Hey i have a problem! when i try to set the price of my app to 0.79 euro
> > the developer console set it to 79 euro!!
>
> ideas?
>
> Isn't there a $0.99 limit? Maybe it applies to Euros too?
> Were you able to do this before?
> Did you try other values to see if anything would stick? 0.99 Euros maybe?
>
> 
>
> Knowing the quality of the product, I would not be surprised if somewhere in
> the code was something like:
>
> ...
> // Let's screw with a few people >:D
> if (price == 0.79f)
>  price *= 100.0f;
> ...
>
> 
>
> ---­--
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Developer Console problem

2011-05-04 Thread alex armbruster
Hi, try with e.g. 0,79 or 0.8. Had a similar problem today, using just
one digit after the dot solved it.
Hth, Alex

On 3 Mai, 10:02, Michele Galli  wrote:
> Hey i have a problem! when i try to set the price of my app to 0.79
> euro the developer console set it to 79 euro!!
> i  have never had this problem! i can't re-publish my app if i don't
> solve this issue!
>
> 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] Hello, Android troubles

2011-05-04 Thread exax
Hi, I just started developing for Android and followed the Hello,
Android tutorials on the Resources tab from Android.com. I followed it
step for step and have been going in circles trying to figure out
what's wrong. Here's my code:

package com.example.helloandroid;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloAndroid extends Activity {
/** Called when the activity is first created.*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView (this);
tv.setText ("Hello, Android");
setContentView (tv);
}
}

and when I run it I get a class not found error in the console and the
applet says it is not initialized.


java.lang.ClassNotFoundException: .class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class .class not found.

I can post the Manifest if it is needed but I hope it's a simple
problem. I already created and recreated an AVD and none of the
tutorials are running either so I think it must be something with my
setup. I am completely stumped. Any help would be great! 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] Add frames to video stream

2011-05-04 Thread Ece OZMEN
Hi,
I can't add frames to the video_stream. Value of "index" always change
but index of video_st never changes. So I think I can't add frames but
I can't find why..  Can anyone help me.. Thank you..

Here is some parts of my code

static void write_video_frame(AVFormatContext *oc,AVFrame *pFrame,int
index)
{

int out_size, ret;
AVCodecContext *c;
static struct SwsContext *img_convert_ctx;
c = video_st->codec;
if (oc->oformat->flags & AVFMT_RAWPICTURE >0 ) else {
printf("Non Raw picture");
out_size = avcodec_encode_video(c, video_outbuf,
video_outbuf_size, pFrame);
if (out_size > 0) {
AVPacket pkt;
av_init_packet(&pkt);

if (c->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts= av_rescale_q(c->coded_frame->pts, c-
>time_base, video_st->time_base);
if(c->coded_frame->key_frame)
pkt.flags |= AV_PKT_FLAG_KEY;
pkt.stream_index= video_st->index;
pkt.data= video_outbuf;
pkt.size= out_size;   sprintf(info,"write pkt.size
%d",pkt.stream_index);
  log_message(info);
ret = av_interleaved_write_frame(oc, &pkt);
} else {
ret = 0;
}
}
if (ret != 0) {
fprintf(stderr, "Error while writing video frame\n");
exit(1);
}

}

void encodeVideo( AVFormatContext *oc,AVOutputFormat *fmt,JNIEnv* env,
jobject javaThis , char *orginalfilename, int w,int h,AVFrame
*pFrame,int index){
char filename[50] = "/sdcard/new_";

int i;
char deletedfile[40];

char secondfilename[50];
for(i=0;i<50;i++){
secondfilename[i]='\0';
}
for(i=12;i<50;i++){
 filename[i]='\0';
}
strncpy(secondfilename,orginalfilename
+8,strlen(orginalfilename)-8);
strcat(filename , secondfilename);
av_register_all();

fmt = av_guess_format(NULL, filename, NULL);
if (!fmt) {
printf("Could not deduce output format from file extension:
using MPEG.\n");
fmt = av_guess_format("mpeg", NULL, NULL);
}
if (!fmt) {
fprintf(stderr, "Could not find suitable output format\n");
exit(1);
}

oc = avformat_alloc_context();
if (!oc) {
fprintf(stderr, "Memory error\n");log_message("Memory error");
exit(1);
}
oc->oformat = fmt;
snprintf(oc->filename, sizeof(oc->filename), "%s", filename);

video_st = NULL;

if (fmt->video_codec != CODEC_ID_NONE) {
video_st = add_video_stream(oc,w,h,fmt->video_codec);
}

if (av_set_parameters(oc, NULL) < 0) {
fprintf(stderr, "Invalid output format parameters\n");
exit(1);
}

dump_format(oc, 0, filename, 1);

if (video_st)
open_video(oc);

if (!(fmt->flags & AVFMT_NOFILE)) {
if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
fprintf(stderr, "Could not open '%s'\n", filename);
exit(1);
}
}
av_write_header(oc);
write_video_frame(oc,pFrame,index);

}

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

2011-05-04 Thread Viddhu
IM application is not found with Android 2.3.3 Gingerbread.Will it be
considered for future release?
Forgive me if this question looks silly. I am new to android
development.

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] WindowManager$BadTokenException

2011-05-04 Thread Vivek975
Hi,

I am getting WindowManager$BadTokenException when i am trying to
launch a popup window after inflating it from a xml layout.
The key is if i wait for around 2 sec before launching the popup, it
works fine, but when i try to open it immediately it crashes.
Does anybody have any clue about this ?

Following is the code snippet causing the excepion :

mInflater =
(LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mOptionsPanel = (ViewGroup)mInflater.inflate(R.layout.options, null);
mOptionsPopup = new PopupWindow(mOptionsPanel,width,height);
mOptionsPopup.showAtLocation(parent, gravity, x, y);

Logs :
05-04 07:57:54.060: ERROR/AndroidRuntime(1159):
android.view.WindowManager$BadTokenException: Unable to add window --
token null is not valid; is your activity running?
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.view.ViewRoot.setView(ViewRoot.java:476)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:180)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.view.Window$LocalWindowManager.addView(Window.java:435)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.widget.PopupWindow.invokePopup(PopupWindow.java:822)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.widget.PopupWindow.showAtLocation(PopupWindow.java:689)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
com.google.endpoint.pictureframe.PictureFrameSettings.showPopup(PictureFrameSettings.java:
226)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
com.google.endpoint.pictureframe.PictureFrame$2.run(PictureFrame.java:
269)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.os.Handler.handleCallback(Handler.java:587)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.os.Handler.dispatchMessage(Handler.java:92)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.os.Looper.loop(Looper.java:123)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.app.ActivityThread.main(ActivityThread.java:4363)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
java.lang.reflect.Method.invokeNative(Native Method)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
java.lang.reflect.Method.invoke(Method.java:521)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:864)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
dalvik.system.NativeStart.main(Native Method)


Thanks,
Vivek

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

2011-05-04 Thread Dhay
Hi everybody!

This is my first message since I've just joined your mail list. So
first of all hi to everybody.

I am now developing for android and having some issues so I will
directly publish the problem:

I have developed one application which uses the bluetooth and
transfers data through a 3g connection. The problem is that, sometimes
the application just freezes for a while(maybe half an hour, one hour
or just "forever"). I connected the application to the computer and
taken the log from logcat. the moment where the phone seems to be
blocked is here:



D/QCRIL_MSC (   73): "RIL"=>"AMSS" [ label =
"cm_ph_cmd_get_ph_info()"];

D/GsmServiceStateTracker(  231): handlePollStateResult  regplmn =
24491

D/MobileDataStateTracker(  133): replacing old mInterfaceName (rmnet0)
with rmnet0 for hipri

D/NetworkLocationProvider(  133): onDataConnectionStateChanged 3

D/MobileDataStateTracker(  133): default Received state= CONNECTED,
old= CONNECTED, reason= (unspecified), apnTypeList= default

D/SntpClient(  133): request time failed:
java.net.SocketTimeoutException: Connection timed out

I/EventLogService(  277): Aggregate from 1304501219994 (log),
1304501219994 (data)

D/SntpClient(  133): request time failed:
java.net.SocketTimeoutException: Connection timed out

D/SntpClient(  133): request time failed:
java.net.SocketTimeoutException: Connection timed out

E/Sensors (  133): light: 640 lux

E/Sensors (  133): light: 1280 lux

D/SntpClient(  133): request time failed:
java.net.SocketTimeoutException: Connection timed out

D/SntpClient(  133): request time failed:
java.net.SocketTimeoutException: Connection timed out

D/QCRIL_MSC (   73): "RIL"=>"AMSS" [ label =
"cm_ph_cmd_get_ph_info()"];

D/GsmServiceStateTracker(  231): handlePollStateResult  regplmn =
24491

D/QCRIL_MSC (   73): "RIL"=>"AMSS" [ label =
"cm_ph_cmd_get_ph_info()"];

D/GsmServiceStateTracker(  231): handlePollStateResult  regplmn =
24491

E/Sensors (  133): light: 640 lux

E/Sensors (  133): light: 320 lux

E/Sensors (  133): light: 640 lux

E/Sensors (  133): light: 320 lux

E/BluetoothEventLoop.cpp(  133): event_filter: Received signal
org.bluez.Adapter:DeviceFound from /org/bluez/182/hci0

D/BluetoothService(  133): updateDeviceServiceChannelCache(70:F3:95:4B:
12:B2)



It seems that the E/Sensors(133) referes to the bluetooth that seem to
be "away" for a while and that sending the information it launches a
SocketTimeoutException, but I am checking before sending any data that
the NetworkInfos have some wifi/mobile connection available.

Additionally, the phone sometimes just reboots alone(the program is
running for hours) and stays in the "PIN" request state.

Thank you in advance!

Dhay

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

2011-05-04 Thread hassan
HI
Could some one let me know were i am going wrong as i am not able to
successfully establish a connection between Android and desktop server
pc .

My android client program is

package com.example.socketandroid;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class SocketAndroid extends Activity {

EditText textOut;
TextView textIn;

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);

 textOut = (EditText)findViewById(R.id.textout);
 Button buttonSend = (Button)findViewById(R.id.send);
 textIn = (TextView)findViewById(R.id.textin);
 buttonSend.setOnClickListener(buttonSendOnClickListener);
 }

 Button.OnClickListener buttonSendOnClickListener = new
Button.OnClickListener(){

@Override
public void onClick(View arg0) {
 // TODO Auto-generated method stub
 Socket socket = null;
 DataOutputStream dataOutputStream = null;
 DataInputStream dataInputStream = null;

 try {
  socket = new Socket("192.168.2.4", 5000);
  dataOutputStream = new DataOutputStream(socket.getOutputStream());
  dataInputStream = new DataInputStream(socket.getInputStream());
  dataOutputStream.writeUTF(textOut.getText().toString());
  textIn.setText(dataInputStream.readUTF());
 } catch (UnknownHostException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
 } catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
 }
 finally{
  if (socket != null){
   try {
socket.close();
   } catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
   }
  }

  if (dataOutputStream != null){
   try {
dataOutputStream.close();
   } catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
   }
  }

  if (dataInputStream != null){
   try {
dataInputStream.close();
   } catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
   }
  }
 }
}};
}

The server program

import java.io.*;
import java.net.*;
public class server {
/** Main entry point */
public static void main(String args[]) throws Exception {
System.out.println("ServerRead is waiting for requests on port
5 ...");

// Create a listening Server Socket
ServerSocket ss = new ServerSocket(5000);

// Wait in a loop for connection requests
Socket sCon = ss.accept();  // 
Wait...

// Get an Input Stream
InputStream in = sCon.getInputStream();

// Read in a loop from Socket and write to console
int c;
while((c = in.read()) != -1)
System.out.write(c);

// Clean up
sCon.close();
ss.close();
}
}


Have also set the permission in the manifest file

also tried the
 adb forward tcp:5000 tcp:5000
still no joy.
could any one help please

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


[android-developers] How to know if is the first execution after device reboot.

2011-05-04 Thread ferran fabregas
Hi! I want to know if there are any method to know if is the first exuction
of an app after reboot, or the app is alredy executed by the user (the app
have one activity and to recivers).

I'm thinking in methods like write and rewrite a token file every minute,
and each time the app starts, check the lastmodified property to know the
state, but i think that must be smart ways to do it.

Any idea?

Thanks in advance,

*Ferran*

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

2011-05-04 Thread naveed ahmad


Hi I am Naveed and i am new in Android world,, I need help regarding
support of Urdu messages in Android .. plz guide me how can i do
this,

a lot of people in my country use to send message in Urdu  language
but Android does not support Urud  yet in messaging.


Thanks
Naveed Ahmad

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

2011-05-04 Thread sudipta biswas
respected sir,
I want to access the android phone book contacts
through my application and also select multiple contact(as per my
choice) from phone book...please help me to find out a suitable way...

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

2011-05-04 Thread GEEK
Greeting ,
   I want to use bluetooth hide API like createRfcommSocket ,
getServiceChannel , etc.,.. my program code is :

Method m = blueToothDevice.getClass().getMethod("createRfcommSocket",
new Class[] { int.class });
sock = (BluetoothSocket)m.invoke(blueToothDevice, Integer.valueOf(1));

the "createRfcommSocket" API is work very well . But
"getServiceChannel" is fail .

my program code is :


Method m_getServiceChannel = null;
try {
m_getServiceChannel =
blueToothDevice.getClass().getMethod("getServiceChannel");
 // or use
"m_getServiceChannel =
blueToothDevice.getClass().getMethod("getServiceChannel", new Class[]
{ String.class, short.class});"
}
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

I always get NoSuchMethodException error . Is there anything wrong
with my procedure or the way to setup is not correct ?

--
 intgetServiceChannel(ParcelUuid uuid)< define is
BluetoothDevice.class (hide api)

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

2011-05-04 Thread OverThere
Hi,
I want to make blackbox for car.
So, I use sensor, camera and gps.
I can use each activity.
but how can I make thread  to use sensor, camera and GPS?

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

2011-05-04 Thread Wilson Chew
Hi All,

I noticed that the connection created (using IsoDep) is not stable.
For example, when I perform a signing(digital signature) and
verification of signature via APDU, the NFC service will die or
connection to tag will be lost even if I set the timeout to 20sec. It
happen quite often.

Is it a known issue or I have missed out something in my code?

Thanks.

Regards,
Wilson

On Apr 26, 5:09 pm, perumal316  wrote:
> For IsoDep using setTimeOut function to set a time resolves the issue.
>
> On Apr 26, 12:13 pm, perumal316  wrote:
>
>
>
> > Hi Michael,
>
> > I changed MiFareClassic object to IsoDep. But I am getting the
> > following error:
>
> > "android.nfc.TagLostException: Tag was lost"
>
> > Must I add in additional code to sustain the connection? (Am I
> > correct?)
>
> > Thanks In Advance,
> > Perumal
>
> > On Apr 25, 5:00 pm, Michael Roland  wrote:
>
> > > Hallo Wilson,
>
> > > > I am facing an issue with a Mifare Classic card (this is a dual
> > > > interface smart card; contact and contactless).
>
> > > Alright, then it is most likely not a MIFARE Classic card but a
> > > contactless (dual interface) smart card (with ISO 14443-4 interface)
> > > that additionally provides a MIFARE Classic emulation.
>
> > > > When I use transceive() to send apdu corresponding to "select AID", it 
> > > > always
> > > > return null.
>
> > > Right, as you write here:> 2) Create MifareClassic object using
>
> > > you create a MifareClassic but what you really want to do is open an
> > > APDU connection to the card. If your card is a real dual-interface
> > > smart card(*) it should also expose an IsoDep interface (ISO 14443-4 /
> > > ISO 7816-4). This is the interface you would want to use for APDU
> > > communication.
>
> > > br,
> > > Michael
>
> > > (*) There could also exist some hybrid cards that have a MIFARE
> > > Classic _contactless_ card and an APDU-based _contact_ smart card
> > > joined into the same plastic card. In that case the contact and
> > > contactless parts would be independent chips and no communication
> > > between them would be possible.- 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] WindowManager$BadTokenException

2011-05-04 Thread Vivek Chandrakar
Hi,

I am getting WindowManager$BadTokenException when i am trying to launch a
popup window after inflating it from a xml layout.
The key is if i wait for around 2 sec before launching the popup, it works
fine, but when i try to open it immediately it crashes.
Does anybody have any clue about this ?

Following is the code snippet causing the excepion :

mInflater =
(LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mOptionsPanel = (ViewGroup)mInflater.inflate(R.layout.options, null);
mOptionsPopup = new PopupWindow(mOptionsPanel,width,height);
mOptionsPopup.showAtLocation(parent, gravity, x, y);

Logs :
05-04 07:57:54.060: ERROR/AndroidRuntime(1159):
android.view.WindowManager$BadTokenException: Unable to add window -- token
null is not valid; is your activity running?
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.view.ViewRoot.setView(ViewRoot.java:476)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:180)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.view.Window$LocalWindowManager.addView(Window.java:435)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.widget.PopupWindow.invokePopup(PopupWindow.java:822)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.widget.PopupWindow.showAtLocation(PopupWindow.java:689)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
com.google.endpoint.pictureframe.PictureFrameSettings.showPopup(PictureFrameSettings.java:226)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
com.google.endpoint.pictureframe.PictureFrame$2.run(PictureFrame.java:269)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.os.Handler.handleCallback(Handler.java:587)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.os.Handler.dispatchMessage(Handler.java:92)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.os.Looper.loop(Looper.java:123)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
android.app.ActivityThread.main(ActivityThread.java:4363)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
java.lang.reflect.Method.invokeNative(Native Method)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
java.lang.reflect.Method.invoke(Method.java:521)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
05-04 07:57:54.060: ERROR/AndroidRuntime(1159): at
dalvik.system.NativeStart.main(Native Method)


Thanks,
Vivek

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

2011-05-04 Thread David Muñoz
Hi everybody!

This is my first message since I've just joined your mail list. So first of
all hi to everybody.

I am now developing for android and having some issues so I will directly
publish the problem:

I have developed one application which uses the bluetooth and transfers data
through a 3g connection. The problem is that, sometimes the application just
freezes for a while(maybe half an hour, one hour or just "forever"). I
connected the application to the computer and taken the log from logcat. the
moment where the phone seems to be blocked is here:



D/QCRIL_MSC (   73): "RIL"=>"AMSS" [ label = "cm_ph_cmd_get_ph_info()"];

D/GsmServiceStateTracker(  231): handlePollStateResult  regplmn = 24491

D/MobileDataStateTracker(  133): replacing old mInterfaceName (rmnet0) with
rmnet0 for hipri

D/NetworkLocationProvider(  133): onDataConnectionStateChanged 3

D/MobileDataStateTracker(  133): default Received state= CONNECTED, old=
CONNECTED, reason= (unspecified), apnTypeList= default

D/SntpClient(  133): request time failed: java.net.SocketTimeoutException:
Connection timed out

I/EventLogService(  277): Aggregate from 1304501219994 (log), 1304501219994
(data)

D/SntpClient(  133): request time failed: java.net.SocketTimeoutException:
Connection timed out

D/SntpClient(  133): request time failed: java.net.SocketTimeoutException:
Connection timed out

E/Sensors (  133): light: 640 lux

E/Sensors (  133): light: 1280 lux

D/SntpClient(  133): request time failed: java.net.SocketTimeoutException:
Connection timed out

D/SntpClient(  133): request time failed: java.net.SocketTimeoutException:
Connection timed out

D/QCRIL_MSC (   73): "RIL"=>"AMSS" [ label = "cm_ph_cmd_get_ph_info()"];

D/GsmServiceStateTracker(  231): handlePollStateResult  regplmn = 24491

D/QCRIL_MSC (   73): "RIL"=>"AMSS" [ label = "cm_ph_cmd_get_ph_info()"];

D/GsmServiceStateTracker(  231): handlePollStateResult  regplmn = 24491

E/Sensors (  133): light: 640 lux

E/Sensors (  133): light: 320 lux

E/Sensors (  133): light: 640 lux

E/Sensors (  133): light: 320 lux

E/BluetoothEventLoop.cpp(  133): event_filter: Received signal
org.bluez.Adapter:DeviceFound from /org/bluez/182/hci0

D/BluetoothService(  133):
updateDeviceServiceChannelCache(70:F3:95:4B:12:B2)



It seems that the E/Sensors(133) referes to the bluetooth that seem to be
"away" for a while and that sending the information it launches a
SocketTimeoutException, but I am checking before sending any data that the
NetworkInfos have some wifi/mobile connection available.

Additionally, the phone sometimes just reboots alone(the program is running
for hours) and stays in the "PIN" request state.

Thank you in advance!

Dhay

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

[android-developers] Video Editing in Android

2011-05-04 Thread Badal
Hi Folks!

For my recent android project, I want achieve following things:
1. Merge two video
2. Edit the video - like Add Title, Subtitle, Numbers at some part of
video (Not throughout)
3. Change Audio of the Video file.

So, my question over here is

Which is the best approach to achieve these functionalities?
Does any JAVA library have such functionality, to process on
comparatively small scale devices?
Does any C lib available for the same?
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] Unable to connect to Facebook from emulator

2011-05-04 Thread Phuc Nguyen Dinh
Hi all,
I am developing a facebook application but I cannot sign in to
facebook. Even I couldn't connect to the facebook page from browser.
Even I replaced the /system/etc/hosts file, but I still couldn't open
the facebook web page in browser or sign in. I tried to use a proxy
but couldn't find an active proxy as well.

Anyone know the solution to solve this problem please help me.
Thank you 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] NFC tags with write protection?

2011-05-04 Thread Mark Wyszomierski
Hi,

I've got some NFC tags and have written some data into them using the
NXP Tag Writer app available from marketplace.

After writing some data in the tag, I'd like to remove write-access to
it so people can't overwrite the tag data. Using the Tag Writer app, I
get a message stating that write protection is not available for the
tags I have.

Does anyone know of any tags I can order which are writeable and have
write protection available too?

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] Add frames to video stream

2011-05-04 Thread Ece OZMEN
Hi,
I can't add frames to the video_stream. Value of "index" always change
but index of video_st never changes. So I think I can't add frames but
I can't find why..  Can anyone help me.. Thank you..

Here is some parts of my code

static void write_video_frame(AVFormatContext *oc,AVFrame *pFrame,int
index)
{

int out_size, ret;
AVCodecContext *c;
static struct SwsContext *img_convert_ctx;
c = video_st->codec;
if (oc->oformat->flags & AVFMT_RAWPICTURE >0 ) else {
printf("Non Raw picture");
out_size = avcodec_encode_video(c, video_outbuf,
video_outbuf_size, pFrame);
if (out_size > 0) {
AVPacket pkt;
av_init_packet(&pkt);

if (c->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts= av_rescale_q(c->coded_frame->pts, c-
>time_base, video_st->time_base);
if(c->coded_frame->key_frame)
pkt.flags |= AV_PKT_FLAG_KEY;
pkt.stream_index= video_st->index;
pkt.data= video_outbuf;
pkt.size= out_size;   sprintf(info,"write pkt.size
%d",pkt.stream_index);
  log_message(info);
ret = av_interleaved_write_frame(oc, &pkt);
} else {
ret = 0;
}
}
if (ret != 0) {
fprintf(stderr, "Error while writing video frame\n");
exit(1);
}

}

void encodeVideo( AVFormatContext *oc,AVOutputFormat *fmt,JNIEnv* env,
jobject javaThis , char *orginalfilename, int w,int h,AVFrame
*pFrame,int index){
char filename[50] = "/sdcard/new_";

int i;
char deletedfile[40];

char secondfilename[50];
for(i=0;i<50;i++){
secondfilename[i]='\0';
}
for(i=12;i<50;i++){
 filename[i]='\0';
}
strncpy(secondfilename,orginalfilename
+8,strlen(orginalfilename)-8);
strcat(filename , secondfilename);
av_register_all();

fmt = av_guess_format(NULL, filename, NULL);
if (!fmt) {
printf("Could not deduce output format from file extension:
using MPEG.\n");
fmt = av_guess_format("mpeg", NULL, NULL);
}
if (!fmt) {
fprintf(stderr, "Could not find suitable output format\n");
exit(1);
}

oc = avformat_alloc_context();
if (!oc) {
fprintf(stderr, "Memory error\n");log_message("Memory error");
exit(1);
}
oc->oformat = fmt;
snprintf(oc->filename, sizeof(oc->filename), "%s", filename);

video_st = NULL;

if (fmt->video_codec != CODEC_ID_NONE) {
video_st = add_video_stream(oc,w,h,fmt->video_codec);
}

if (av_set_parameters(oc, NULL) < 0) {
fprintf(stderr, "Invalid output format parameters\n");
exit(1);
}

dump_format(oc, 0, filename, 1);

if (video_st)
open_video(oc);

if (!(fmt->flags & AVFMT_NOFILE)) {
if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
fprintf(stderr, "Could not open '%s'\n", filename);
exit(1);
}
}
av_write_header(oc);
write_video_frame(oc,pFrame,index);

}

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

2011-05-04 Thread Ece OZMEN
Hi,
I can't add frames to the video_stream. Value of "index" always change
but index of video_st never changes. So I think I can't add frames but
I can't find why..  Can anyone help me.. Thank you..

Here is some parts of my code

static void write_video_frame(AVFormatContext *oc,AVFrame *pFrame,int
index)
{

int out_size, ret;
AVCodecContext *c;
static struct SwsContext *img_convert_ctx;
c = video_st->codec;
if (oc->oformat->flags & AVFMT_RAWPICTURE >0 ) else {
printf("Non Raw picture");
out_size = avcodec_encode_video(c, video_outbuf,
video_outbuf_size, pFrame);
if (out_size > 0) {
AVPacket pkt;
av_init_packet(&pkt);

if (c->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts= av_rescale_q(c->coded_frame->pts, c-
>time_base, video_st->time_base);
if(c->coded_frame->key_frame)
pkt.flags |= AV_PKT_FLAG_KEY;
pkt.stream_index= video_st->index;
pkt.data= video_outbuf;
pkt.size= out_size;   sprintf(info,"write pkt.size
%d",pkt.stream_index);
  log_message(info);
ret = av_interleaved_write_frame(oc, &pkt);
} else {
ret = 0;
}
}
if (ret != 0) {
fprintf(stderr, "Error while writing video frame\n");
exit(1);
}

}

void encodeVideo( AVFormatContext *oc,AVOutputFormat *fmt,JNIEnv* env,
jobject javaThis , char *orginalfilename, int w,int h,AVFrame
*pFrame,int index){
char filename[50] = "/sdcard/new_";

int i;
char deletedfile[40];

char secondfilename[50];
for(i=0;i<50;i++){
secondfilename[i]='\0';
}
for(i=12;i<50;i++){
 filename[i]='\0';
}
strncpy(secondfilename,orginalfilename
+8,strlen(orginalfilename)-8);
strcat(filename , secondfilename);
av_register_all();

fmt = av_guess_format(NULL, filename, NULL);
if (!fmt) {
printf("Could not deduce output format from file extension:
using MPEG.\n");
fmt = av_guess_format("mpeg", NULL, NULL);
}
if (!fmt) {
fprintf(stderr, "Could not find suitable output format\n");
exit(1);
}

oc = avformat_alloc_context();
if (!oc) {
fprintf(stderr, "Memory error\n");log_message("Memory error");
exit(1);
}
oc->oformat = fmt;
snprintf(oc->filename, sizeof(oc->filename), "%s", filename);

video_st = NULL;

if (fmt->video_codec != CODEC_ID_NONE) {
video_st = add_video_stream(oc,w,h,fmt->video_codec);
}

if (av_set_parameters(oc, NULL) < 0) {
fprintf(stderr, "Invalid output format parameters\n");
exit(1);
}

dump_format(oc, 0, filename, 1);

if (video_st)
open_video(oc);

if (!(fmt->flags & AVFMT_NOFILE)) {
if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
fprintf(stderr, "Could not open '%s'\n", filename);
exit(1);
}
}
av_write_header(oc);
write_video_frame(oc,pFrame,index);

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: What happens when a phone call comes in?

2011-05-04 Thread Streets Of Boston
Implement the onPause (or onStop) of your Activity. Pause your thread there 
(i.e. have your thread check for a value/semaphore that indicates when to 
pause a thread). In the onResume (or onStart), resume your thread.

Implement the onDestroy of your Acivity. Stop your thread there (i.e. exit 
the Thread's *run *method entirely).
If your thread needs to survive configuration changes (e.g. orientation 
changes, keyboard slide-outs and slide-ins), you need to do a bit more work 
so that in those cases, your thread is not stopped in onDestroy.

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

2011-05-04 Thread Ece OZMEN
Hi,
I can't add frames to the video_stream. Value of "index" always change
but index of video_st never changes. So I think I can't add frames but
I can't find why..  Can anyone help me.. Thank you..

Here is some parts of my code

static void write_video_frame(AVFormatContext *oc,AVFrame *pFrame,int
index)
{

int out_size, ret;
AVCodecContext *c;
static struct SwsContext *img_convert_ctx;
c = video_st->codec;
if (oc->oformat->flags & AVFMT_RAWPICTURE >0 ) else {
printf("Non Raw picture");
out_size = avcodec_encode_video(c, video_outbuf,
video_outbuf_size, pFrame);
if (out_size > 0) {
AVPacket pkt;
av_init_packet(&pkt);

if (c->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts= av_rescale_q(c->coded_frame->pts, c-
>time_base, video_st->time_base);
if(c->coded_frame->key_frame)
pkt.flags |= AV_PKT_FLAG_KEY;
pkt.stream_index= video_st->index;
pkt.data= video_outbuf;
pkt.size= out_size;   sprintf(info,"write pkt.size
%d",pkt.stream_index);
  log_message(info);
ret = av_interleaved_write_frame(oc, &pkt);
} else {
ret = 0;
}
}
if (ret != 0) {
fprintf(stderr, "Error while writing video frame\n");
exit(1);
}

}

void encodeVideo( AVFormatContext *oc,AVOutputFormat *fmt,JNIEnv* env,
jobject javaThis , char *orginalfilename, int w,int h,AVFrame
*pFrame,int index){
char filename[50] = "/sdcard/new_";

int i;
char deletedfile[40];

char secondfilename[50];
for(i=0;i<50;i++){
secondfilename[i]='\0';
}
for(i=12;i<50;i++){
 filename[i]='\0';
}
strncpy(secondfilename,orginalfilename
+8,strlen(orginalfilename)-8);
strcat(filename , secondfilename);
av_register_all();

fmt = av_guess_format(NULL, filename, NULL);
if (!fmt) {
printf("Could not deduce output format from file extension:
using MPEG.\n");
fmt = av_guess_format("mpeg", NULL, NULL);
}
if (!fmt) {
fprintf(stderr, "Could not find suitable output format\n");
exit(1);
}

oc = avformat_alloc_context();
if (!oc) {
fprintf(stderr, "Memory error\n");log_message("Memory error");
exit(1);
}
oc->oformat = fmt;
snprintf(oc->filename, sizeof(oc->filename), "%s", filename);

video_st = NULL;

if (fmt->video_codec != CODEC_ID_NONE) {
video_st = add_video_stream(oc,w,h,fmt->video_codec);
}

if (av_set_parameters(oc, NULL) < 0) {
fprintf(stderr, "Invalid output format parameters\n");
exit(1);
}

dump_format(oc, 0, filename, 1);

if (video_st)
open_video(oc);

if (!(fmt->flags & AVFMT_NOFILE)) {
if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
fprintf(stderr, "Could not open '%s'\n", filename);
exit(1);
}
}
av_write_header(oc);
write_video_frame(oc,pFrame,index);

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: What happens when a phone call comes in?

2011-05-04 Thread kiros88
Actually sorry I do have a plan for the home bug um so thats y i
needed only a solution for the call bug and the home bug is something
that i can test later but yea I had a different scenario for that one

On May 4, 1:47 pm, kiros88  wrote:
> Um well the bug i know is that i have a thread going after i like back
> of my app so normally i close the thread when i do the back button but
> i dont know how else to close the thread when im not on my app and
> like on the home screen
>
> On May 4, 1:41 pm, Kostya Vasilyev  wrote:
>
>
>
>
>
>
>
> > 05.05.2011 0:38, kiros88 пишет:
>
> > > Yea it freezes too
>
> > That should be easier / faster / cheaper to debug than incoming phone calls.
>
> > > so i have to figure that out but i think what were
> > > really trying to do is a get a demo working version up so when we
> > > present i just know if a phone call comes in it freezes the phone.
>
> > --
> > Kostya Vasilyev --http://kmansoft.wordpress.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: What happens when a phone call comes in?

2011-05-04 Thread kiros88
Um well the bug i know is that i have a thread going after i like back
of my app so normally i close the thread when i do the back button but
i dont know how else to close the thread when im not on my app and
like on the home screen

On May 4, 1:41 pm, Kostya Vasilyev  wrote:
> 05.05.2011 0:38, kiros88 пишет:
>
> > Yea it freezes too
>
> That should be easier / faster / cheaper to debug than incoming phone calls.
>
> > so i have to figure that out but i think what were
> > really trying to do is a get a demo working version up so when we
> > present i just know if a phone call comes in it freezes the phone.
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.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


Re: [android-developers] Re: What happens when a phone call comes in?

2011-05-04 Thread Kostya Vasilyev

05.05.2011 0:38, kiros88 пишет:

Yea it freezes too


That should be easier / faster / cheaper to debug than incoming phone calls.


so i have to figure that out but i think what were
really trying to do is a get a demo working version up so when we
present i just know if a phone call comes in it freezes the phone.



--
Kostya Vasilyev -- http://kmansoft.wordpress.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: What happens when a phone call comes in?

2011-05-04 Thread kiros88
Yea it freezes too so i have to figure that out but i think what were
really trying to do is a get a demo working version up so when we
present i just know if a phone call comes in it freezes the phone.

On May 4, 1:20 pm, Kostya Vasilyev  wrote:
> Probably not, but your code should not really care.
>
> What happens when you press the home key in your application?
>
> -- Kostya
>
> 04.05.2011 23:46, kiros88 пишет:
>
> > Is there anyway to figure out if the the new intent is going to be the
> > incoming call?
>
> > On May 4, 12:31 pm, Kostya Vasilyev  wrote:
> >> >  I would guess that the most important callback in this case is your
> >> >  activity's onPause and onStop.
>
> >> >  -- Kostya
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.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


Re: [android-developers] Resume for the post of Android Application Developer

2011-05-04 Thread TreKing
On Tue, May 3, 2011 at 11:05 PM, tushar sahni wrote:

> I am sending u my latest Resume for the post of Android Application
> Developer


This is priceless.

 I am looking for a position / job where I can explore myself fully

...

> Strengths :Hard Work, endurance


Sounds more like you're looking for the post of Porn Star.

Father’s Name :Mr.C.P.Sahni
> Mother’s Name :Mrs.Sunita Sahni


No one cares who your parents are.

Languages: Visual Basic 6.0, ASP.net,Android


Android is not a *language*

EXTRACIRRICULAR ACTIVITIES


It's a big word, but Jesus Christ, at least run through a spell check.

Hobbies
> *Surfing internet**
> *


Are you f*cking kidding me?

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

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

Re: [android-developers] Re: What happens when a phone call comes in?

2011-05-04 Thread Kostya Vasilyev

Probably not, but your code should not really care.

What happens when you press the home key in your application?

-- Kostya

04.05.2011 23:46, kiros88 пишет:

Is there anyway to figure out if the the new intent is going to be the
incoming call?

On May 4, 12:31 pm, Kostya Vasilyev  wrote:

>  I would guess that the most important callback in this case is your
>  activity's onPause and onStop.
>
>  -- Kostya



--
Kostya Vasilyev -- http://kmansoft.wordpress.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] Determine if device has only SoftMenu Keys ?

2011-05-04 Thread Andy
Is there a possibility to determine if the device your App / Game is running 
has only soft-keys available ?
(Like Back, Home, Menu,..)

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

2011-05-04 Thread Streets Of Boston
'this' in an Activity refers to the Context, because an Activity is a 
Context (Activity extends Context).
this.getApplicationContext() returns an Application. An Application is a 
Context as well.

But the ProgressDialog really likes an Activity, not just a Context. As you 
discovered, not just any Context will work correctly: If the Context is an 
Application, then you get a run-time error.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: What happens when a phone call comes in?

2011-05-04 Thread kiros88
Is there anyway to figure out if the the new intent is going to be the
incoming call?

On May 4, 12:31 pm, Kostya Vasilyev  wrote:
> I would guess that the most important callback in this case is your
> activity's onPause and onStop.
>
> -- Kostya
>
> 04.05.2011 22:06, kiros88 пишет:
>
> > Hi I'm trying to figure out whats happens when a phone call gets
> > recieved um basically want to know what happens programming wise
> > because my app always seems to freeze the phone when a caller is
> > calling the phone i know its cause of some thread i want to shut down
> > so does anyone know where the override method would be?
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.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


Re: [android-developers] What happens when a phone call comes in?

2011-05-04 Thread Kostya Vasilyev
I would guess that the most important callback in this case is your 
activity's onPause and onStop.


-- Kostya

04.05.2011 22:06, kiros88 пишет:

Hi I'm trying to figure out whats happens when a phone call gets
recieved um basically want to know what happens programming wise
because my app always seems to freeze the phone when a caller is
calling the phone i know its cause of some thread i want to shut down
so does anyone know where the override method would be?


--
Kostya Vasilyev -- http://kmansoft.wordpress.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] Basic Concept

2011-05-04 Thread Mohit sharma
Hi ,

Can someone tell me difference between " this " and
getApplicationContext.
Try this in case of ProgressDialog ... in case of
getApplicationContext it shows run time error.

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

2011-05-04 Thread kiros88
Hi I'm trying to figure out whats happens when a phone call gets
recieved um basically want to know what happens programming wise
because my app always seems to freeze the phone when a caller is
calling the phone i know its cause of some thread i want to shut down
so does anyone know where the override method would be?

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

2011-05-04 Thread Satya Komatineni
A lot may depend on the detail that you are working with.

>From what you wrote it appears to me that your data/object/xml model
may be (I am guessing your intentions)






In this type of representation the children become really the
attributes of the parent. So when one clicks on a track you may ask
who am I? The answer may come as "audio" or "video".

Or if you look the other way around and make your track an independent
object then the category becomes the attribute of the track.

>From what you are describing it appears to me the earlier model may be
better. In that earlier model you may even consider the attributes as
"tags" like in social networking as optional attributes on the nature
of  a base "audio" entity.

Hope this helps

On Wed, May 4, 2011 at 9:27 AM, Hitendrasinh Gohil
 wrote:
> hi,
>
> i am having two categories
>
> within these 2 categories there are three subcategories.
> like__
> 1.audio
>   1a. track
>   1b  album
>   1c artist
> 2.video
>   2a. track
>   3b  album
>   2c  artist
>
> I have made one class that handles the click event for track,album and
> artist.but how can i know the category whether track is clicked from
> audio or video category.because i am using same xml for subcategory.
> currently i am managing it through flags.but is there any better way
> to do it?
>
> regards,
> hitendrasinh gohil
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.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: SDCard installs - auto or preferExternal?

2011-05-04 Thread Seni Sangrujee
I lean towards "auto" as well.  I tried "preferExternal" at first and
several users reported errors, so I switched to "auto", and the
complaints went away.


On May 4, 5:15 am, Droid  wrote:
> Yes, maybe 'auto' better, I read somewhere that a few models will fail
> to install at all if install location is set to preferExternal.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] view is working as desired but not the surfaceview, pls help

2011-05-04 Thread mack2978
Hi,

I am getting starange issue on surfaceview but when used view it
worked fine.

1.) when using view and drawing image using
canvas.drawBitmap(mBitmap[CntcurrentImage], 0, 0, null); works
perfectly and draws image fully fitting in the screen.

2.) But when using surfaceview and doing the same thing is streching
the image(not fully fit in the screen).

I am not getting any clue on the issue.

below is the code:
package com.example.HelloGridView;

import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.ViewGroup;
import android.view.Window;
import android.view.View.MeasureSpec;

public class slideshowview extends Activity {

private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);

private long mMoveDelay;
private Integer[] mImageIds = {
R.drawable.wall_img01, R.drawable.wall_img02,
R.drawable.wall_img03, R.drawable.wall_img04,
R.drawable.wall_img05, R.drawable.wall_img06,
R.drawable.wall_img07, R.drawable.wall_img08,
R.drawable.wall_img09, R.drawable.wall_img10,
R.drawable.wall_img11, R.drawable.wall_img12,
R.drawable.wall_img13, R.drawable.wall_img14,
R.drawable.wall_img15
   };

public class MySurfaceThread extends Thread {

private SurfaceHolder myThreadSurfaceHolder;
private MySurfaceView myThreadSurfaceView;
private boolean myThreadRun = false;

public MySurfaceThread(SurfaceHolder surfaceHolder, MySurfaceView
surfaceView) {
myThreadSurfaceHolder = surfaceHolder;
myThreadSurfaceView = surfaceView;
}

public void setRunning(boolean b) {
myThreadRun = b;
}

@Override
public void run() {
// TODO Auto-generated method stub
//super.run();
while (myThreadRun) {
Canvas c = null;
try {
c = myThreadSurfaceHolder.lockCanvas(null);
synchronized (myThreadSurfaceHolder) {
myThreadSurfaceView.onDraw(c);
}
sleep(mMoveDelay);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
// do this in a finally so that if an exception is
thrown
// during the above, we don't leave the Surface in
an
// inconsistent state
if (c != null) {
myThreadSurfaceHolder.unlockCanvasAndPost(c);
}
}
}
}
}

public class MySurfaceView extends SurfaceView implements
SurfaceHolder.Callback{

private MySurfaceThread thread;
private long mLastTick;
boolean isPaused;
private Bitmap[] mBitmap= new Bitmap[15];;
private Bitmap mBitmapClose;
private Bitmap mBitmapPlay;
private Bitmap mBitmapTime;
int CntcurrentImage;

@Override
protected void onMeasure(int widthMeasureSpec, int
heightMeasureSpec) {
 // TODO Auto-generated method stub
 setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec),
   MeasureSpec.getSize(heightMeasureSpec));
}
@Override
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
//super.onDraw(canvas);
//Paint p = new Paint();
//p.setAntiAlias(true);
if(!getStatus())
{
canvas.drawBitmap(mBitmap[CntcurrentImage], 0, 0, null);
CntcurrentImage++;
if(CntcurrentImage == 15)
CntcurrentImage = 0;
}

if(getStatus())
{
canvas.drawBitmap(mBitmap[CntcurrentImage], 0, 0, null);
}
canvas.drawBitmap(mBitmapTime,
0,this.getHeight()-30,paint);
canvas.drawBitmap(mBitmapPlay, this.getWidth()/
2-15,this.getHeight()-30,paint);
canvas.drawBitmap(mBitmapClose,
this.getWidth()-30,this.getHeight()-30,paint);
System.out.println("hello");
   System.out.println(mMoveDelay);
}

@Override
public boolean onTouchEvent(MotionEvent event) {
 

[android-developers] Re: Show Context Menu other than on long press?

2011-05-04 Thread Emanuel Moecklin
For testing purposes I used setOnCreateContextMenuListener and the
context menu still doesn't show.
The reason for that is that I'm also catching
View.onTouchEvent(MotionEvent event).
The documentation for the GestureDetector says: "In the
onTouchEvent(MotionEvent) method ensure you call
onTouchEvent(MotionEvent). The methods defined in your callback will
be executed when the events occur."
The first onTouchEvents is a View method the second one a
GestureDetector method.
I assume that's the piece missing in your code.

Emanuel Moecklin
1gravity LLC


On May 4, 10:54 am, Justin Anderson  wrote:
> I already am using a GestureDetector... For some reason I couldn't get it to
> not show the context menu on long press... But I was using
> setOnCreateContextMenuListener().
>
> I'll go ahead and give what you suggest a try.  I wasn't sure it would work
> because registerForContextMenu() says it sets the
> onCreateContextMenuListener() and thought I would have the same problem.
>
> Thanks,
> Justin Anderson
> MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
> On Wed, May 4, 2011 at 7:45 AM, Emanuel Moecklin <1gravity...@gmail.com>wrote:
>
>
>
>
>
>
>
> > You can use a GestureDetector to listen to motion events one of them
> > being onLongPress(MotionEvent e).
> > In that method you decide whether you want to show the context menu or
> > not. If you decide to show it call activity.openContextMenu(myView);
> > (registerForContextMenu (View view) needs to be called before that).
> > This way it won't open on a long-press unless you want it to. You can
> > use the other GestureListener events to show the context menu e.g. for
> > double taps.
>
> > Here's some sample code:
>
> >        gestureDetector = new GestureDetector(activity, gestureListener);
> >        gestureDetector.setIsLongpressEnabled(true);
>
> >        private GestureDetector.SimpleOnGestureListener gestureListener =
> > new
> > GestureDetector.SimpleOnGestureListener() {
>
> >                @Override
> >                public boolean onSingleTapUp(MotionEvent event) {
> >                        // do something
> >                        return true;
> >                }
>
> >                @Override
> >                public boolean onDown(MotionEvent event) {
> >                        // do something
> >                        return true;
> >                }
>
> >                @Override
> >                public void onLongPress(MotionEvent event) {
> >                        if (want2ShowContextMenu) {
> >                                activity.openContextMenu(myView.this);
> >                        }
> >                }
>
> >                @Override
> >                public boolean onDoubleTap(MotionEvent event) {
> >                        // do something
> >                        return true;
> >                }
>
> >        };
>
> > BTW this is code I use in one of my apps and suppressing the context
> > menu works perfectly.
>
> > Emanuel Moecklin
> > 1gravity LLC
>
> > On May 3, 5:21 pm, Justin Anderson  wrote:
> > > *> So you only want it to call the context menu when you call it, not on
> > > long press?*
>
> > > Exactly.  But that is only because I have several other actions that can
> > be
> > > customized by the user... It kind of seems like it would feel unfinished
> > if
> > > the user could customize what happens for short press, double press,
> > swipe
> > > up, and swipe down but not long press...
>
> > > Though the more I think about it the more I'm thinking it's not worth
> > it...
> > >  The default Context Menu behavior would be long-press anyway and I don't
> > > know how many people would actually change its behavior were the option
> > > there.
>
> > > *> If that's the case, could you add a long press listener and
> > purposefully
> > > eat it so it doesn't trigger the context menu? No idea if that would work
> > > and would be hacky but ...*
> > > *
> > > *
> > > Yeah I'm not sure if it would work or not either and it does seem
> > hackish...
> > >  I'm thinking I'm just going to leave it as it is unless I get a lot of
> > user
> > > requests to add customization of the context menu as well.
>
> > > Thanks,
> > > Justin Anderson
> > > MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
> > > On Tue, May 3, 2011 at 2:17 PM, TreKing  wrote:
> > > > On Tue, May 3, 2011 at 3:03 PM, Justin Anderson  > >wrote:
>
> > > >> And as I stated before, if you
> > useView.setOnCreateContextMenuListener()
> > > >> then it sets up your view to show the context menu on with a
> > long-press...
> > > >>  And I'm back to square one.
>
> > > > Yeah, I would expect that, as it's the default behavior. So you only
> > want
> > > > it to call the context menu when you call it, not on long press?
> > > > If that's the case, could you add a long press listener and
> > purposefully
> > > > eat it so it doesn't trigger the context menu? No idea if that would
> > work
> > > > and would be hacky but ...
>
> > ---

Re: [android-developers] Developer Console problem

2011-05-04 Thread TreKing
On Tue, May 3, 2011 at 3:02 AM, Michele Galli wrote:

> Hey i have a problem! when i try to set the price of my app to 0.79 euro
> the developer console set it to 79 euro!!
>
i  have never had this problem! i can't re-publish my app if i don't solve
> this issue!
>

http://www.google.com/support/forum/p/Android+Market/thread?tid=51ee0424efc89a6a&hl=en

Latest Market problem, but this one actually got the attention of a Google
Employee whom I've never seen before.
Maybe he's new. And maybe he cares. One can dream.

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

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

Re: [android-developers] Re: sent a text message encrypted

2011-05-04 Thread jaafar zbeiba
I myself doubt on this line  r=DES.crypting("r"+r, TELEPHONY_SERVICE);

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

2011-05-04 Thread lbendlin
and once you have done all that you may notice no performance gain at all 
because all along the bottleneck was you phone's data connection speed...

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

[android-developers] Re: sent a text message encrypted

2011-05-04 Thread lbendlin
most likely your encrypted string violates the style guidelines for SMS. You 
will have to base64 encode it before sending.
Also, it may just be too long.

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

2011-05-04 Thread Streets Of Boston
I've had similar issues.
I removed away from the absolute black box testing and started targeting 
View by their id's (com.yourcomp.yourproject.R.id.someViewId) instead.

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

2011-05-04 Thread Troy Steinbauer
I am writing an app that will use the P2P part of the NFC package, and I 
would like no other android app possibly handel the intent generated from my 
tag being pushed. I want to prevent the Application Chooser from being 
launched. But if a user has an app that attempts to catch all tags (like a 
generic tag reader app), then it will show the Application Chooser.

Can I use 'android.nfc.action.NDEF_DISCOVERED' with a unique data field for 
my application only?

or 

Can I use 'android.nfc.action.TECH_DISCOVERED' with a custom Tech inside the 
tech-list?

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

2011-05-04 Thread jaafar zbeiba
hello I tried to send a sms encrypted, but the problem is no
exception, but the SMS does not start
code
public void onClick(View arg0) {
sendFeedback(ok);
r=DES.crypting("r"+r, TELEPHONY_SERVICE);
EnvoiSms envoisms = new EnvoiSms();
   envoisms.SendMessage(r);
methode for crypto
public class DES{

protected static String crypting(String textToCrypting, String
keyString ) {
// Objet de cette classe offre des fonctionnalités pour
// Chiffrement et le déchiffrement.
Cipher cipher = null;
try {
// Paramètre "DES" spécifie le type de chiffrement que nous voulons
créer
// Par la méthode de l'usine. Il comprend l'algorithme, le mode et
// Remplissage. Vous pouvez définir seul algorithme et, dans ce cas
par défaut
// Valeurs seront utilisées pour la mode et de rembourrage.
cipher = Cipher.getInstance("DES");
} catch (NoSuchAlgorithmException ex) {
// Algorithme cryptographique demandé n'est pas disponible
ex.printStackTrace();
} catch (NoSuchPaddingException ex) {
// Demande un mécanisme de remplissage n'est pas disponible dans
l'environnement.
ex.printStackTrace();
}


// La longueur de keystring est de 8. Il est caractéristique
importante
// Pour le chiffrement

byte[] keyData = keyString.getBytes();

// Objet clé spécifie une clé secrète
// On utilise pour construire la clé secrète pour notre moteur de
chiffrement à partir d'un octet
// Tableau
SecretKeySpec key = new SecretKeySpec(keyData, 0, keyData.length,
"DES");
try {
// Initialisation de la mise en place le type d'opération, c'est pour
être
// Utilisé pour. Dans ce cas - pour le chiffrement.
cipher.init(Cipher.ENCRYPT_MODE, key);
} catch (InvalidKeyException ex) {
// Donnée objet clé est inapproprié pour l'initialisation de ce
chiffre
ex.printStackTrace();
}


int cypheredBytes = 0;


byte[] inputBytes = textToCrypting.getBytes();
byte[] outputBytes = new byte[100];
try {
// Méthode doFinal crypte les données au tableau outputBytes.
//Chiffres pour inconnu ou grandes quantités de données mise à jour
méthode plus recommandé
// Nombre d'octets cryptés sauvegardés dans cypheredBytes variable
cypheredBytes = cipher.doFinal(inputBytes, 0, inputBytes.length,
outputBytes, 0);
} catch (IllegalStateException ex) {
ex.printStackTrace();
} catch (ShortBufferException ex) {
ex.printStackTrace();
} catch (IllegalBlockSizeException ex) {
ex.printStackTrace();
} catch (BadPaddingException ex) {
ex.printStackTrace();
}


String str = new String(outputBytes, 0, cypheredBytes);
inputBytes = str.getBytes();
return str;
}
// Changement d'état de l'objet de chiffrement pour le déchiffrement

protected static String decrypting(String textCrypting, String
keyString ) {
//Object of this class provides the functionality for
//encryption and decryption.
Cipher cipher = null;
try {
//parameter "DES" specifies type of cipher we want to create
//through the factory method. It includes algorithm, mode and
//padding. You can define only algorithm and in that case default
//values will be used for mode and padding.
cipher = Cipher.getInstance("DES");
} catch (NoSuchAlgorithmException ex) {
ex.printStackTrace();
} catch (NoSuchPaddingException ex) {
ex.printStackTrace();
}


//The lenght of keyString is 8. It's important characteristic
//for encryption

byte[] keyData = keyString.getBytes();

//key object specifies a secret key
//it uses to construct the secret key for our cipher object from a
byte
//array
SecretKeySpec key = new SecretKeySpec(keyData, 0, keyData.length,
"DES");

try {
//change state of the cipher object for decrypting
cipher.init(Cipher.DECRYPT_MODE, key);
} catch (InvalidKeyException ex) {
ex.printStackTrace();

}
int cypheredBytes = 0;
byte[] inputBytes = textCrypting.getBytes();
byte[] outputBytes = new byte[1000];
try {
//decrypts data
cypheredBytes = cipher.doFinal(inputBytes, 0, inputBytes.length,
outputBytes, 0);
} catch (IllegalStateException ex) {

} catch (ShortBufferException ex) {

} catch (IllegalBlockSizeException ex) {

} catch (BadPaddingException ex) {

}

String str = new String(outputBytes, 0, cypheredBytes);
return str;
}

}

-- 
You received this message because you are subscribed to th

Re: [android-developers] Robotium solo - help material

2011-05-04 Thread TreKing
On Tue, May 3, 2011 at 5:06 AM, Madhu  wrote:

> unfortunately my username and password typed on the same textbox.


Well, yeah, you called solo.enterText() twice with two different values. I
have no idea what solo is but you'd need a second box to put text into.

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

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

Re: [android-developers] Re: Restricted access to Content Provider

2011-05-04 Thread Dom
Thanks for that info Dianne. It looks like I need the 
android:protectionLevel="signature" configuration, however I can't get it 
working.

Here is my manifest containing my content provider:

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







I used eclipse to Export Signed Application of the content provider using a 
brand new keystore. I have another app signed with another keystore. I 
didn't expect the second app to be able to access the content provider, yet 
it has no problem accessing it. Have I misunderstood something?


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

2011-05-04 Thread TreKing
On Tue, May 3, 2011 at 4:13 AM, Tek911  wrote:

> Any links to anything on the android developers website or sample code
> elsewhere is appreciated in advance.
>

I believe keyboards take their cue from the input type associated with the
control (EditText) they're manipulating:
http://developer.android.com/reference/android/text/InputType.html

-
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] Custom Intent does not reach PhoneApp

2011-05-04 Thread TreKing
On Tue, May 3, 2011 at 2:42 PM, bluewolf  wrote:

> I have added an action to the intent filter in
> packages/apps/Phone/src/ com/android/phone/PhoneApp.java
>

This is not the forum for modifying the source code. Check the documentation
for a more appropriate forum.

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

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

[android-developers] Event based communication between two apps.

2011-05-04 Thread Jacob
Hi

I have 2 apps; need to stay communicated with each other and make sure
battery is not affected.
I know I can open TCP socket between them and get notified if for some
reason the other app stops working.
I thought TCP sockets might be expensive to maintain and perhaps drain
battery?

Is there any other light weight way of achieving this obejctive?
   1) Pipes - How to open a pipe between 2 apps? are they lighter than
tcp sockets?
   2) Files - using shared file between 2 apps (if signed with same
certficate and using the same userid.)
  How to use this shared file to know if the other app is still
running or not? locks?

Basically, I don't want to explicitely query if the other app is
running or not every now and then and then communicate with it.
Instead wait on some event that gets triggered when the other app is
down.

Appreciate any suggestions on a light weight protocol.

Thank you
Jacob

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


Re: [android-developers] MapActivity And Leak : a google team overview ?

2011-05-04 Thread TreKing
On Wed, May 4, 2011 at 11:18 AM, olivier  wrote:

>  1- Do I miss something ? How do a good use of the mapActivity ?
>

http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/MapActivity.html



>   2- I have three mapActivities differents. I read that is not recommanded.
> Is that true ?
>

It's not that it's not recommended - it's that is not supported. From above
link:
"Only one MapActivity is supported per process. Multiple MapActivities
running simultaneously are likely to interfere in unexpected and undesired
ways."

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

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

[android-developers] MapActivity And Leak : a google team overview ?

2011-05-04 Thread olivier
Dears,

I am facing OutOfMemory problem and when analysing the memory I see
that my program keep two instances of my MapActivity.

If I use the HelloMap program, I see the same result.

 1- Do I miss something ? How do a good use of the mapActivity ?
 2- I have three mapActivities differents. I read that is not
recommanded. Is that true ?
http://groups.google.com/group/android-developers/browse_thread/thread/b687d2975f698731/9adea38ea26d0799?hide_quotes=no&pli=1

I have found as well this bug report but I am more inclined to think
that I am doing something wrong.

Is someone of google could give a clear point of view on these
points ?

http://code.google.com/p/android/issues/detail?id=2181

*On the bug report 2181
They give to piece of code that are not working for me.
Once is generating an errorn the other one does not change anything.

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

2011-05-04 Thread Streets Of Boston
AsyncTasks are not threads.
They are chunks of work (like getting a web-document) that are executed on a 
pool of (background) threads.

Read the documentation of AsyncTask carefully. Figure out a way to have a 
pool of more than one background threads (happens 'automatically' for 
Android OS versions Donut --> Gingerbread, you need to do some extra work on 
Honeycomb). Then create a bunch of AsyncTasks at the same time on your UI 
thread (e.g. in some on() method call-back on in your onClick methods, 
etc) and call execute on them.

Then the bunch of AsyncTasks will be executed on the pool of background 
threads.
Be sure on implement onPostExecute to update your UI.

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

2011-05-04 Thread Brill Pappin
I have a situation where I have a perfect job for Tabs, but want the tab 
container to actually control the view of v4 fragments instead...
However the TabHost build-out requires the container inside the same layout.

Has anyone built a component that works like tabs but can handle fragments?

- Brill

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

2011-05-04 Thread Stefan
To do concurrent HTTP request I guess threads are the way to do that?
Creating a thread within a thread results here in an   "Can't create
handler inside thread that has not called Looper.prepare()"error.
And I cannot find another way without multiple threads.


On 4 mei, 17:27, Dianne Hackborn  wrote:
> This isn't really an Android-specific question -- you will probably get good
> answers just looking for ways in Java to do concurrent HTTP requests.
>
>
>
>
>
>
>
>
>
> On Wed, May 4, 2011 at 11:22 AM, Stefan  wrote:
> > The problem at this moment with the app is that the retrieval of the
> > html code from the website takes a lot of time.
> > When you start the app at this moment, you'ill have to wait 3 minutes
> > for loading the website.
> > That's not very user friendly, and I guess that downloading just a
> > little bit html cannot take such a long time.
>
> > The website is sometimes also a little bit slow, so I thought that the
> > long download time maybe is caused by the server, which needs time to
> > react on my request.
> > And I guess, when there are more requests at the same time to the
> > sever (for example 10 threads).   the waiting time will decrease a
> > lot.
>
> > I'm not if what I said is correct,  but it sounds logically for me.
>
> > On 4 mei, 17:09, TreKing  wrote:
> > > On Wed, May 4, 2011 at 9:03 AM, Stefan  wrote:
> > > > Only problem is, that the 100 webpages are now downloaded after each
> > other.
> > > > Is there a way to download the webpages at the same time?
>
> > > First question: what is the purpose of doing them all at once?
>
> > ---
> > --
> > > 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
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


  1   2   >