[android-developers] Periodic Sync not working.

2016-03-09 Thread 'Marc Tigges' via Android Developers
Im using SyncAdapter for some server client synchronization. In the official 
developer guide 
 
it 
is mentioned that there are different methods to trigger a sync.

*1 Run the Sync Adapter When Server Data Changes*

You simply call:

ContentResolver.requestSync(ACCOUNT, AUTHORITY, null);

When server data changes (on GCM for example).

*2 Run the Sync Adapter When Content Provider Data Changes*

Simply use a ContentObserver

public class TableObserver extends ContentObserver {
@Override
public void onChange(boolean selfChange) {
onChange(selfChange, null);
}
   
@Override
public void onChange(boolean selfChange, Uri changeUri) {
ContentResolver.requestSync(ACCOUNT, AUTHORITY, null);
}
}

*3 Run the Sync Adapter After a Network Message*

Do the following:

ContentResolver.setSyncAutomatically(ACCOUNT, AUTHORITY, true)

Now everytime when there is an open TCP/IP connection the SyncAdapter is 
triggered to perform the sync.

*4 Run the Sync Adapter Periodically*

This is for me the important and interesting part. For that you simply have 
to do this (at least this is written in the developers guide):

public static final long SECONDS_PER_MINUTE = 60L;
public static final long SYNC_INTERVAL_IN_MINUTES = 60L;
public static final long SYNC_INTERVAL = SYNC_INTERVAL_IN_MINUTES * 
SECONDS_PER_MINUTE;

ContentResolver.addPeriodicSync(
ACCOUNT,
AUTHORITY,
Bundle.EMPTY,
SYNC_INTERVAL);

*Now to the problem*

Solution 1, 2 and 3 are working perfectly as they should. The periodical 
sync does not. If i just do what is descriped under point 4 the 
synchronization is never triggered (yes i did enable the auomatic 
synchronisation in the system settings of my android device). 

If i do the following:

ContentResolver.setIsSyncable(account, ContentProviderMeasure.AUTHORITY, 1);
ContentResolver.setSyncAutomatically(account, ContentProviderMeasure.
AUTHORITY, true);
ContentResolver.addPeriodicSync(account, ContentProviderMeasure.AUTHORITY, 
new Bundle(), 3600);


The SyncAdapter sync refresh is called every minute (it should be every 
hour / 3600 seconds = 1 hour). If i do the following:

ContentResolver.setIsSyncable(account, ContentProviderMeasure.AUTHORITY, 1);
ContentResolver.addPeriodicSync(account, ContentProviderMeasure.AUTHORITY, 
new Bundle(), 3600);

The sync is only triggered once at creation time and after that never 
again. Yes, as i mentioned already, the automatic sync in the android 
devices settings is enabled.
Triggering the sync manually for my app in the android device settings 
accountmanager is working fine. 

*So why does the periodic sync does not work?*

I tested on Nexus 4 with Android 6.0, On Galaxy Ace with Android 4.4 and on 
Galaxy S3 Mini with Android 4.1. All devices are not syncing periodically.
I also posted my question on 
Stackoverflow: 
http://stackoverflow.com/questions/35879056/sync-not-triggered-as-mentioned-in-developer-guide

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


[android-developers] In App Purchase Woes

2012-08-07 Thread Marc Call
Hello everyone,
I have searched the googles many a day and cannot find a solution to my 
problem. I am trying to implement in app purchase in my android app.

Here is what I have done thus far:
I have included com.android.vending.BILLING in my manifest
I have uploaded a signed version of my APK
I have set my app to Active in google play dashboard
I have created an IAP item and published it in the google play dashboard
I have added a few test users in google play to test my own IAP products

Now I know that I as the developer cannot successfully do a purchase with 
my own developer email account but here is the error I get in case it is of 
any use:Your order could not be processed. Please try again

Now when I have one of the test users that I added to be a test account try 
the in app purchase, they receiver the error message Item Unavailable: The 
item that you requested is not available for purchase

I have no idea where to go from here or what to look at, can anyone please 
post any thoughts or ideas? I have been stuck on this for a few weeks now. 
thanks in advance.

Marc

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

[android-developers] ACTION_SET_ALARM Intent seems too simple

2012-07-19 Thread Marc McDougall
 

I am attempting to write an application that automatically sets the Android 
default alarm based on some preset values determined by an alternate 
algorithm.

The alarm setting works fine using the ACTION_SET_ALARM intent, however 
every time I run the app, it sets a NEW alarm. I'm wondering if there is 
any way to instead have one unique alarm set to update every time the 
activity sets the alarm (so that there are not hundreds of new alarms in 
the Android alarm application).

I will provide code excerpts if necessary, however it seems that this 
question can be answered without specific examples. NOTE: I am not using 
the Android alarm system that is intended for informing other activities of 
certain events, but rather the actual Android alarm that users will utilize 
to wake up in the morning.

Here is a code snippet that explains what I am doing:

Intent intent = new Intent(AlarmClock.ACTION_SET_ALARM);
intent.putExtra(AlarmClock.EXTRA_HOUR, time.getCurrentHour());
intent.putExtra(AlarmClock.EXTRA_MINUTES, time.getCurrentMinute());
intent.putExtra(AlarmClock.EXTRA_SKIP_UI, true);
startActivity(intent);

Thank you in advance for any assistance!

Some further attempts:

I have tried to bundle the intent Intent.ACTION_EDIT with my intent and 
tried to specify the alarm local to the device, but I can't seem to find 
any documentation on how one would do this. Nor do I know that this is the 
way to complete my goal.

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

2012-06-29 Thread Marc Prengemann
I would like to get the answer too..

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

2012-02-08 Thread Marc-Antoine Beauvais
And you did you try? If yes, you saw I have make a lot of search to solve
this problem...

On 4 February 2012 00:36, TreKing treking...@gmail.com wrote:

 On Thu, Feb 2, 2012 at 7:53 AM, kakko76 marcantoine.beauv...@gmail.comwrote:

 I'm looking for a library to make an app who display VRML files (WRL
 extension), any idea?


 Did you try this: http://bit.ly/zFbMRd?


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


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


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

[android-developers] Loading and Saving Settings to a file

2012-02-06 Thread John-Marc Desmarais
Hi,

I'm not sure what I'm doing wrong here:

I have an Override on onPause to save settings to a file and an
Override on onResume, and onCreate to load them back up from the file.

The onPause method looks like this:
@Override
public void onPause()
{
super.onPause();

// save configuration settings
if (cfg != null)
{
byte[] settingsBuffer = 
cfg.toSerializedBytes(getBaseContext());
Log.v(LogName.onPause, LogName.onPause + : settings 
Buffer :  +
settingsBuffer.length);
try
{
FileOutputStream fos = 
openFileOutput(settingsFile,
getBaseContext().MODE_WORLD_READABLE);
fos.write(settingsBuffer);
fos.getFD().sync();

fos.close();
}
catch (FileNotFoundException e)
{
Log.e(LogName.onPause, LogName.onPause + : 
File not found.  +
e.getMessage());
}
catch (IOException e)
{
Log.e(LogName.onPause, LogName.onPause + : IO 
Error.  + e.getMessage());
}
}
}

The load method looks like this:
public void loadSettings()
{
File inputFile = new File(settingsFile);
if (inputFile.exists())
{
byte[] settingsBuffer = new byte[(int) 
(inputFile.length())];
try
{
FileInputStream fis = 
openFileInput(settingsFile);
fis.read(settingsBuffer);
cfg = 
RXConfigurationSettings.fromSerializedBytes(settingsBuffer);
if (cfg != null)
{
cfg.populateTable((TableLayout)
findViewById(R.id.tableLayoutConfigurationSettingsTable),
getBaseContext());
}
fis.close();
}
catch (FileNotFoundException e)
{
Log.e(LogName.onResume, LogName.onResume + : 
File not found.  +
e.getMessage());
}
catch (IOException e)
{
Log.e(LogName.onResume, LogName.onResume + : 
IO Error.  + e.getMessage());
}
}
else
{
Log.e(LogName.className, Input FILE not found.);
}
}


The loadSettings is called from onCreate and onResume but I seem to
always hit the else condition and logcat always shows Input FILE not
found..

Can anyone provide insight into this problem?

Thanks
-jm

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

2012-02-06 Thread John-Marc Desmarais
Hi,

Thank you for your reply. I have a couple follow up comments/questions
related to the responses. I have included these inline.

On Mon, Feb 6, 2012 at 12:25 PM, TreKing treking...@gmail.com wrote:
 On Mon, Feb 6, 2012 at 11:15 AM, John-Marc Desmarais j...@ieee.org wrote:

 I have an Override on onPause to save settings to a file


 Why not just use SharedPreferences?

I felt it would be quicker to serialize my class into a byte stream
than saving each configuration parameter separately and I couldn't
find the ability to store a byte stream using SharedPreferences.


 Can anyone provide insight into this problem?


 When you check the file existing, you use the raw file name, not relative
 to your data directory. Of course, that does not exist, as the file is
 relative to your data directory.

 Your subsequent call to openFileInput would likely succeed.

How do I handle the
byte[] settingsBuffer = new byte[(int) inputFile.length];
without opening a File?

i.e. How would I figure out in advance the size of the byte buffer I
need to receive my file? Or, what path can I append to my open file to
allow it to find the settingsFile, or is it not that easy?

-jm

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

2012-02-06 Thread John-Marc Desmarais
On Mon, Feb 6, 2012 at 12:56 PM, TreKing treking...@gmail.com wrote:
 On Mon, Feb 6, 2012 at 11:36 AM, John-Marc Desmarais j...@ieee.org wrote:

 How do I handle the byte[] settingsBuffer = new byte[(int)
 inputFile.length]; without opening a File?


 You get the stream of data as the returned value of openFileInput. Then you
 can then read that into a byte array of the input's length. So your settings
 buffer would be initialized AFTER you open the input stream, using the
 stream's length.

Hi

Based on your first response I have tried the following:
public void onPause()
{
super.onPause();
// save configuration settings
SharedPreferences.Editor settingsEditor =
getSharedPreferences(settingsFile, 0).edit();
settingsEditor.putString(RXConfigurationSettings,
Base64.encodeToString(cfg.toSerializedBytes(getBaseContext()),
Base64.DEFAULT));
}

public void loadSettings()
{
SharedPreferences settings = getSharedPreferences(settingsFile, 
0);
if (settings.contains(RXConfiguration))
{
cfg = 
RXConfigurationSettings.fromSerializedBytes(Base64.decode(settings.getString(RXConfigurationSettings,
), Base64.DEFAULT));
}

else
{
Log.e(LogName.className, Input settings not found.);
}
}
And am now getting Input settings not found when closing and
reopening my application.

-jm

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

2012-02-06 Thread John-Marc Desmarais
Yup.

commit() still works as advertised.

Thank you,
-jm

On Mon, Feb 6, 2012 at 1:19 PM, TreKing treking...@gmail.com wrote:
 On Mon, Feb 6, 2012 at 12:04 PM, John-Marc Desmarais j...@ieee.org wrote:

 And am now getting Input settings not found when closing and
 reopening my application.


 Read the class overview:
 http://developer.android.com/reference/android/content/SharedPreferences.Editor.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

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

2012-02-03 Thread John-Marc Desmarais
On Tue, Jan 31, 2012 at 6:37 AM, geo geoandr...@gmail.com wrote:
 Hello,i am getting error:

 Caused by: java.lang.NullPointerException
 E/AndroidRuntime(329):  at ...LineGraph.getIntent(LineGraph.java:109)
 E/AndroidRuntime(329):  at LineGraph.onCreate(LineGraph.java:80)
 E/AndroidRuntime(329):  at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1047)
 E/AndroidRuntime(329):  at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 2627)

  I have in one activity :

 double []myfinal=new double [100];

 Then,inside a function:

 public void compute(){
         ...
             //fill the points between
             for (int i=0;i=ttime;i++){
                myfinal[i]=init*Math.exp(-l*i);

             }
             Intent i=new Intent(this,calcs.class);
             ...
             i.putExtra(finals,myfinal);
             startActivity(i);
         }

 And in the other activity(LineGraph):
 ...
 private double [] myfinal=new double [100];

 public double []  getFinal(){ return this.myfinal;}
 public void setFinal(double [] myfinal){ this.myfinal=myfinal;}

 public void onCreate(Bundle savedInstanceState){
 ...
 double [] myfinal=extras.getDoubleArray(myfinal);
  setFinal(myfinal);

 public Intent getIntent(Context context){
 ...
  double []myfinal=getFinal();


 I am not sure if this is right double []
 myfinal=extras.getDoubleArray(myfinal);


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

It seems to me like the tag you are using to put your array into
extras is different from the tag you are using when retrieving it.

How about:
double [] myfinal=extras.getDoubleArray(finals);

-jm

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

2012-02-02 Thread John-Marc Desmarais
Hi,

Does anyone know of a method to tether two phones via USB so that one
phone can communicate with the other using an intermediate PC?

Or, a method to change the default gateway given when tethering on one
of the phones from 192.168.42.129 to something else.

It seems that if I connect two android phones to the PC both are given
the same gateway address, it is possible to send/receive data from one
phone to the other? is there an address on the other side of the
gateway address that can be used? Can I configure the address on one
of the phones so that the gateway addresses are unique?

Thanks,
John-Marc Desmarais

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

2012-01-31 Thread John-Marc Desmarais
Hi,

I'm using the reset() now. There's a little bump in the playback every
time it reaches the end of the content that existed in the file when
it was initially loaded which I don't like but I'm using prepareAsync
so I think this hiccup is as small as I can make it with a single
VideoView.

Thanks for your help.
-jm


On Mon, Jan 30, 2012 at 11:16 AM, Daniel Drozdzewski
daniel.drozdzew...@gmail.com wrote:
 John-Marc,

 I have not done this myself, but here is tutorial on how to do it:
 http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/

 They actually create new MediaPlayer object upon every update to the
 buffer file and point this new MediaPlayer to the updated buffer every
 single time.

 I would test calling MediaPlayer.reset() first instead of creating new
 player object every time, to see whether time and memory consumed by
 such solution is a bit better.

 HTH,

 Daniel





 On 30 January 2012 15:49, John-Marc Desmarais j...@ieee.org wrote:
 Hi,

 I am currently writing a video file to the SDCard while playing it
 with VideoView.

 My problem is that, if I buffer 1MB of video and begin the Video
 playback, the video stops after 1MB has been played, even though by
 this time, 5MBs of file has now been written to the sdcard.

 I have been trying various things in onCompletion handler.. such as:
                int curLoc = mp.getCurrentPosition();
                Log.e(LogName.onCompletion, LogName.onCompletion + 
 CurrentLocation:
  + mp.getCurrentPosition());
                Log.e(LogName.onCompletion, LogName.onCompletion + Duration: 
  +
 mp.getDuration());
                mp.pause();
                mp.prepareAsync();
                mp.start();
                mp.seekTo(curLoc);

 In this case I get a Cannot play video message.

 Or:
                int curLoc = mp.getCurrentPosition();
                Log.e(LogName.onCompletion, LogName.onCompletion + 
 CurrentLocation:
  + mp.getCurrentPosition());
                Log.e(LogName.onCompletion, LogName.onCompletion + Duration: 
  +
 mp.getDuration());
                mp.prepareAsync();
                mp.start();
                mp.seekTo(curLoc);

 This crashes with prepare Async in State 128.

 Has anyone solved the problem of re-queuing file in the videoView so
 that it plays everything that has been written to the sdcard even
 though it starts with a smaller file?

 Regards,
 -jm

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



 --
 Daniel Drozdzewski

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

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

2012-01-31 Thread John-Marc Desmarais
Daniel,

It is my feeling that since the swap is being done in the onCompletion
handler, there would be a gap in playback in either case. If prepare
is the time consuming part of Prepare(), Start(), Seekto().. then I
can see this shrinking the gap. But, if there is a detectable delay,
then the length of this delay is of lesser concern. If I get the time
to go back to this component when I'm done some other bits, I'll let
you know how it turns out.

I find it odd that the VideoView screen doesn't ever re-read from the
file. I've tried buffering 1MB or 2MB before starting to play, but it
still doesn't go back to the file to read more data, I'm guessing it
loads all 2MB into memory before starting to play. I'll try some
bigger buffer sizes as well to see if I can force it to reread before
the video runs out.

-jm

On Tue, Jan 31, 2012 at 11:08 AM, Daniel Drozdzewski
daniel.drozdzew...@gmail.com wrote:
 John-Marc,

 I am glad that it works.

 I am not sure whether prepareAsync would be quicker than blocking prepare 
 call.

 I mean that whatever the system implementation of the player,
 preparing it takes the same amount of time and async call simply does
 not block, but if you call play as a next statement after
 prepareAsync, I think playing will be put on hold until the player is
 ready to play. You could test both approaches by adding some logging
 and swapping these calls to prepare.

 I was also thinking that you could create 2 MediaPlayer objects and
 the one that is not playing at the moment is being prepared in the
 background with the new data that arrived.
 In MediaPlayer.OnCompletionListener of the first player you simply
 cause the background, prepared player to swap seats with the one that
 just finished. Maybe that would be a bit smoother... ( I am only
 speculating here). This is simple double buffering used all over
 computers to avoid flickering when displaying moving objects.

 Not the easiest approach, but if you are swapping the files from
 underneath 1 player, then swapping players from underneath 1 activity
 should not be much more complex.

 Daniel







 On 31 January 2012 14:50, John-Marc Desmarais j...@ieee.org wrote:
 Hi,

 I'm using the reset() now. There's a little bump in the playback every
 time it reaches the end of the content that existed in the file when
 it was initially loaded which I don't like but I'm using prepareAsync
 so I think this hiccup is as small as I can make it with a single
 VideoView.

 Thanks for your help.
 -jm


 On Mon, Jan 30, 2012 at 11:16 AM, Daniel Drozdzewski
 daniel.drozdzew...@gmail.com wrote:
 John-Marc,

 I have not done this myself, but here is tutorial on how to do it:
 http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/

 They actually create new MediaPlayer object upon every update to the
 buffer file and point this new MediaPlayer to the updated buffer every
 single time.

 I would test calling MediaPlayer.reset() first instead of creating new
 player object every time, to see whether time and memory consumed by
 such solution is a bit better.

 HTH,

 Daniel





 On 30 January 2012 15:49, John-Marc Desmarais j...@ieee.org wrote:
 Hi,

 I am currently writing a video file to the SDCard while playing it
 with VideoView.

 My problem is that, if I buffer 1MB of video and begin the Video
 playback, the video stops after 1MB has been played, even though by
 this time, 5MBs of file has now been written to the sdcard.

 I have been trying various things in onCompletion handler.. such as:
                int curLoc = mp.getCurrentPosition();
                Log.e(LogName.onCompletion, LogName.onCompletion + 
 CurrentLocation:
  + mp.getCurrentPosition());
                Log.e(LogName.onCompletion, LogName.onCompletion + 
 Duration:  +
 mp.getDuration());
                mp.pause();
                mp.prepareAsync();
                mp.start();
                mp.seekTo(curLoc);

 In this case I get a Cannot play video message.

 Or:
                int curLoc = mp.getCurrentPosition();
                Log.e(LogName.onCompletion, LogName.onCompletion + 
 CurrentLocation:
  + mp.getCurrentPosition());
                Log.e(LogName.onCompletion, LogName.onCompletion + 
 Duration:  +
 mp.getDuration());
                mp.prepareAsync();
                mp.start();
                mp.seekTo(curLoc);

 This crashes with prepare Async in State 128.

 Has anyone solved the problem of re-queuing file in the videoView so
 that it plays everything that has been written to the sdcard even
 though it starts with a smaller file?

 Regards,
 -jm

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

2012-01-30 Thread John-Marc Desmarais
Hi,

I am currently writing a video file to the SDCard while playing it
with VideoView.

My problem is that, if I buffer 1MB of video and begin the Video
playback, the video stops after 1MB has been played, even though by
this time, 5MBs of file has now been written to the sdcard.

I have been trying various things in onCompletion handler.. such as:
int curLoc = mp.getCurrentPosition();
Log.e(LogName.onCompletion, LogName.onCompletion + 
CurrentLocation:
 + mp.getCurrentPosition());
Log.e(LogName.onCompletion, LogName.onCompletion + Duration:  
+
mp.getDuration());
mp.pause();
mp.prepareAsync();
mp.start();
mp.seekTo(curLoc);

In this case I get a Cannot play video message.

Or:
int curLoc = mp.getCurrentPosition();
Log.e(LogName.onCompletion, LogName.onCompletion + 
CurrentLocation:
 + mp.getCurrentPosition());
Log.e(LogName.onCompletion, LogName.onCompletion + Duration:  
+
mp.getDuration());
mp.prepareAsync();
mp.start();
mp.seekTo(curLoc);

This crashes with prepare Async in State 128.

Has anyone solved the problem of re-queuing file in the videoView so
that it plays everything that has been written to the sdcard even
though it starts with a smaller file?

Regards,
-jm

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

2012-01-25 Thread John-Marc Desmarais
Hi,

I have a VideoView in a LinearLayout with 2 other boxes. In trying to
create a full screen video, I am doing the following:

private boolean isFullScreen = false;
public void onClick(View v)
{
VideoView vv = (VideoView) v.findViewById(R.id.videoView1);
LinearLayout.LayoutParams lp =
(LinearLayout.LayoutParams)vv.getLayoutParams();
if (isFullScreen)
{
isFullScreen = false;
lp.weight = 0.2f;
vv.setLayoutParams(lp);
v.invalidate();
}
else
{
isFullScreen = true;
lp.weight = 0f;
vv.setLayoutParams(lp);
v.invalidate();
}
Log.v(LogName.onClick, Video switch to  + (isFullScreen ? 
Full
screen : Normal size));
}

I am getting an exception:
01-26 04:12:20.380: E/AndroidRuntime(8010): FATAL EXCEPTION: main
01-26 04:12:20.380: E/AndroidRuntime(8010):
java.lang.ClassCastException:
android.widget.RelativeLayout$LayoutParams
01-26 04:12:20.380: E/AndroidRuntime(8010): at
com.elliptictech.hdcprx.gui.PlayVideo.onClick(PlayVideo.java:54)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.view.View.performClick(View.java:2538)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.view.View$PerformClick.run(View.java:9152)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.os.Handler.handleCallback(Handler.java:587)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.os.Handler.dispatchMessage(Handler.java:92)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.os.Looper.loop(Looper.java:130)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
android.app.ActivityThread.main(ActivityThread.java:3691)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
java.lang.reflect.Method.invokeNative(Native Method)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
java.lang.reflect.Method.invoke(Method.java:507)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
01-26 04:12:20.380: E/AndroidRuntime(8010): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)

Can anyone suggest why this is the case? Alternatively, can you
suggest another method to set the video view to full screen?

Best regards,
-jm

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

2012-01-25 Thread John-Marc Desmarais
That is a very good point.
Thanks.
-jm

On Wed, Jan 25, 2012 at 2:33 PM, TreKing treking...@gmail.com wrote:
 On Wed, Jan 25, 2012 at 1:25 PM, John-Marc Desmarais j...@ieee.org wrote:

 Can anyone suggest why this is the case?


 This is your code: (LinearLayout.LayoutParams)vv.getLayoutParams();

 This is the stack trace:
 java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams

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

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

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


[android-developers] AsyncTask never calls onProgressUpdate

2012-01-16 Thread John-Marc Desmarais
Hi,

I have the following AsynchTask class but, it fails to execute the
onProgressUpdate method when doInBackground is running. That is to say
the Log.v(LogName.onProgressUpdate, LogName.onProgressUpdate) never
occurs in LogCat. There are two calls to publishProgress. The first is
after the authentication text view is copied to the instance variable
and second in the update thread.

Can anyone offer insight?

public class AuthenticateTask extends AsyncTaskDialog, Void, Boolean
{

private int num_dots;
private boolean firstRun;
private String textToUpdate;
TextView textViewAuthenticating;
Dialog dialog;

private class LogName
{
public static final String className = AuthenticateTask;
public static final String onPreExecute = className + 
.onPreExecute():;
public static final String doInBackground = className +
.doInBackground(Dialog...):;
public static final String onProgressUpdate = className +
.onProgressUpdate():;
public static final String onPostExecute = className +
.onPostExecute(Boolean):;
}

protected void onPreExecute()
{
Log.v(LogName.onPreExecute, LogName.onPreExecute);
num_dots = 0;
firstRun = true;
}

@Override
protected Boolean doInBackground(Dialog... params)
{
Log.v(LogName.doInBackground, LogName.doInBackground);
dialog = params[0];
textViewAuthenticating = (TextView)
dialog.findViewById(R.id.TextViewAuthentication);
publishProgress();
Log.v(LogName.doInBackground, LogName.doInBackground + dialog: 
 + dialog);

Thread updaterThread = new Thread(new Runnable()
{

public void run()
{
// TODO Auto-generated method stub
try
{
Thread.sleep(250);
}
catch (InterruptedException e)
{
}
finally
{
AuthenticateTask.this.publishProgress();
}
}

});

updaterThread.start();
if (Authenticate())
{
return true;
}
return false;
}

protected void onProgressUpdate()
{
Log.v(LogName.onProgressUpdate, LogName.onProgressUpdate);
String tmpString;
dialog.setContentView(R.layout.connnection_progess_dialog);

if (firstRun)
{
Log.v(LogName.onProgressUpdate, 
LogName.onProgressUpdate + First Run);
textToUpdate = 
textViewAuthenticating.getText().toString();
Log.v(LogName.onProgressUpdate, 
LogName.onProgressUpdate +
textToUpdate =  + textToUpdate);
firstRun = false;
}
if (num_dots++ == 5)
{
num_dots = 0;
}
tmpString = textToUpdate;
for (int i = 0; i  num_dots; i++)
{
tmpString +=  .;
}
Log.v(LogName.onProgressUpdate, LogName.onProgressUpdate +
tmpString =  + tmpString);
textViewAuthenticating.setText(tmpString);
}
protected void onPostExecute(Boolean result)
{
Log.v(LogName.onPostExecute, LogName.onPostExecute);
String authentication_finished =
dialog.getContext().getResources().getString(R.string.authentication_finished);
Log.v(LogName.onPostExecute, LogName.onPostExecute + 
authentication_finished);
textViewAuthenticating.setText(authentication_finished);

textViewAuthenticating.setCompoundDrawables(dialog.getContext().getResources().getDrawable(R.drawable.checkmark),
null, null, null);
firstRun = true;
}

}


Regards,
-jm

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

2012-01-16 Thread John-Marc Desmarais
Hi,

The authenticate method takes a long time, and I want to update
progress while that's happening like this:

Authenticating .
Authenticating . .
Authenticating . . .
Authenticating . . . .
Authenticating

So I created a thread to add a dot to my TextView every 1/4 second.

Mark Murphy's solution seems to be functioning properly. My error was
assuming that
protected void onProgressUpdate() was equivalent to
protected void onProgressUpdate(Void... voids)
as well as missing some @Overrides.

Thanks all,
-jm


On Mon, Jan 16, 2012 at 2:24 PM, Streets Of Boston
flyingdutc...@gmail.com wrote:
 Why are you starting yet another thread in doInBackground()?
 The method doInBackground is already called in a separate (background)
 thread. No need to yet spawn another one.

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

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


Re: [android-developers] Re: AsyncTask never calls onProgressUpdate

2012-01-16 Thread John-Marc Desmarais
How do I pass my Dialog to onPreExecute?

-jm

2012/1/16 Kostya Vasilyev kmans...@gmail.com:
 ... and this:

 textViewAuthenticating = (TextView)
 dialog.findViewById(R.id.TextViewAuthentication);

 belongs in onPreExecute, or elsewhere on the UI thread, *not* in 
 doInBackground.

 16 января 2012 г. 23:24 пользователь Streets Of Boston
 flyingdutc...@gmail.com написал:
 Why are you starting yet another thread in doInBackground()?
 The method doInBackground is already called in a separate (background)
 thread. No need to yet spawn another one.

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

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

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


Re: [android-developers] Re: Giving away my book: Genius Android Marketing

2012-01-10 Thread John-Marc Desmarais
I'll play.

Sign me up.
-jm

On Mon, Jan 9, 2012 at 3:45 PM, YuviDroid yuvidr...@gmail.com wrote:
 Looks very interesting! Count me in!  :)

 Yuvi


 On Mon, Jan 9, 2012 at 6:04 PM, PhotoSteve dfwgoph...@gmail.com wrote:

 Add me too...I'm so new to Android I don't even know what I don't know
 even to ask questions or how to phrase them right for you nice people
 to understand what I'm asking. Any help for the noob is great.

 Steve

 On Jan 5, 10:50 am, scp89 jayvanbui...@gmail.com wrote:
  I've recently finished writing the first full-length, android-specific
  book on Android Marketing. It covers tips, tricks, strategies,
  competitive analysis, and so much more. Everything I've learned in 2
  years selling android apps, I've put into this book. It is available
  via e-book OR softcover:
 
 
  E-book:http://www.amazon.com/Genius-Android-Marketing-Outsmarting-ebook/dp/B...
 
 
  Softcover:http://www.amazon.com/Genius-Android-Marketing-Outsmarting-Market/dp/...
 
  GIVEAWAY: I am giving away 3 PDF copies of the book to readers! Simply
  reply to this thread, and 1 week from today I will randomly select 3
  members and PM you a link to your free download of the 130 page book.

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




 --
 YuviDroid
 Check out Launch-X (a widget to quickly access your favorite apps and
 contacts!)
 http://android.yuvalsharon.net

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

2012-01-10 Thread John-Marc Desmarais
Hi,

Can anyone help getting Android Tools - Add Native Support to show up
in Eclipse?

Eclipse Version:
Eclipse IDE for C/C++ Developers

Version: Indigo Service Release 1
Build id: 20110916-0149

My system path includes
C:\Android\android-ndk-r7

Running Windows 7.

I have no problems building Android apps, but I want to add some native support.

Regards,
-jm

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

2012-01-10 Thread John-Marc Desmarais
Hi,

Thanks for your help. I installed Sequoya and MTJ but, I still have no
Add Native Support under Android Tools.

I have also tried installing android-ndk-r6b and having
C:\android\android-ndk-r6b in the path. But, currently, I have
C:\android\android-ndk-r7 installed and in the system path.

Maybe Indigo is the problem. I'll try Helios.
-jm

On Tue, Jan 10, 2012 at 5:05 PM, Fred Grott fred.gr...@gmail.com wrote:
 do not ask how I know this but I believe the CDT native for android stuff is
 under the Eclipse MTJ project so you have to install that stuff and it also
 has Sequoya for android as well..w2hich includes a localization tool

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

2011-12-22 Thread Marc Van Daele
Have you been able to solve this issue?
I'm having the same issue right now.
I don't find a matching android:name so I don't think that's the solution.

I want to create two apk's, one supporting openGL 2:0 (having a higher 
version) and a second one for the others.
But the android market says that both apk's support the same set of 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] Looking for a tester

2011-11-09 Thread marc dupuich
Interested by this tester job too, I make numerical music for games too
with my synthesisers and Mac
I can test on many differents mobile platforms
have a nice day, Marc
http://soundcloud.com/marcdupuich/4u-gift
2011/11/9 金光是党员 liudf0...@gmail.com

 do u pay the tester?


 2011/11/9 Alexander Turda gamingpione...@gmail.com

 I'm looking for a tester,and a person to help me add content to my
 games.No knowledge in programming/design or anything required. I'm
 also planning to make a team,to release a new game every 2 months(paid
 game).

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




-- 
http://www.deezer.com/fr/#user/sercomidi

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

2011-11-01 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/01/2011 12:40 PM, Doug Gordon wrote:
 Why in the world would my app crash with a No such method Java error on a
 statement like if (!myString.isEmpty() for a perfectly valid String object? 
 If
 I simply change it to if (myString.length()  0) it works just fine, so it's
 not like I'm not pointing to a valid String object or anything.
 
 Interestingly, this only appears to happen when running it on my actual 
 Android
 2.2 phone. It works OK on a V2.3.3 emulator. It is built with the V2.3.3 SDK.
 What gives?

The method String.isEmpty() exists only since Java 1.6/Android API 9.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk6wTEwACgkQ9RoMZyVa61fD+gCdGHVsK5es6a7SmL/eIvM1PbEJ
Y78An2ltBoh3UywysReYeUxDFgty8Ite
=h2dt
-END PGP SIGNATURE-

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

2011-10-02 Thread marc dupuich
Sub Activity_Create(FirstTime As Boolean)
Log(Hello world!)
Msgbox(Hello world?, First program)
End Sub

Press F5 to compile and deploy your program to the emulator.
Your program will now be compiled and installed to the emulator
2011/9/29 kuek9118 kuek9...@gmail.com

 i am computer science student ...
 now i am going to do my final project is android application...
 hope i can get some help at here...
 any one can suggest some website for newbie(for me)?
 i searched a software that can use vb to do the android application
 which call basic4android
 is it good for new learning people?

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




-- 
http://www.deezer.com/fr/#user/sercomidi

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

2011-09-22 Thread Marc Lester Tan
Take a look at this framework code:

http://hi-android.info/src/com/android/server/am/UsageStatsService.java.html

It collects app usage data for 5 days and store it in the /data folder. If
you are rooted then you should be able to access this file.

Cheers,

*Marc Lester Tan *

http://marctan.com

http://www.proudlypinoy.org/



On Fri, Sep 23, 2011 at 3:42 AM, Kristopher Micinski krismicin...@gmail.com
 wrote:

 2011/9/22 Nemanja Kovačević nemanja.kovace...@pstech.rs:
  Numerous apps are collecting this data. There are apps for users to see
 how
  much time they've spent on what app, other apps use this data for
  recommendations, and so on. Although I understand your reaction...
 

 Kind of makes you wonder what's behind that full internet access
 permission...

 Kris

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


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

Re: [android-developers] Re: How to detect if a view is on screen

2011-09-06 Thread Marc Van Daele
Hello Ed,

Thanks for your answer but I'm not sure a ListView will work (though I will
look at the video).
Isn't a ListView limited to Vertical scrolling? (at least the javadoc says
so)

Kind Regards,

Marc



2011/9/6 Ed edscha...@gmail.com

 Hi Marc,

 Have a look at ListView. It's probably done most of the hardwork for you if
 you just write your own adapter. Just make sure you get your getView
 correct.

 Watch a couple of Romain Guy's videos from Google I/O e.g.
 http://www.youtube.com/watch?v=wDBM6wVEO70

 Should help get you started in the right direction.

 Cheers,

 Ed

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

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

Re: [android-developers] Re: How to detect if a view is on screen

2011-09-06 Thread Marc Van Daele
In fact, I'm using HorizontalScrollView already
but I'm worried about memory consumption (I'm coming from the embedded
software world)

Inside the HorizontalScrollView  I have a LinearLayout containing a list of
my own Views
(actually a ViewGroup displaying a movie poster but also information on the
actors, description, icons for parental rating etc).

Whenever my View is first loaded (first dispatchDraw call), I load the
Bitmap for the movie poster.
But right now, I never unload this bitmap so I'm worried about memory usage.

Hence I want to release the Bitmap when the View is not on screen.
I don't think HorizontalScrollView as such (nor ListView) provides support
for this (please correct me if I'm wrong)

I looked a bit in the source code of HorizontalScrollView and noticed that
it has a private :-(  method isOffScreen(..).
Based on that code I now do something like (in the parents dispatchDraw)

 ViewGroup scroller = (ViewGroup)
getChildAt(0);//HorizontalScrollView
ViewGroup layout = (ViewGroup) scroller.getChildAt(0);//LinearLayout
for (int i = 0; i  layout.getChildCount(); i++)
{
View child = layout.getChildAt(i);
//check if an asset/event is visible
if(isOffScreenHorizontal(scroller, child))
{
 //call unload method
}
}

with isOffScreenHorizontal
private boolean isOffScreenHorizontal(ViewGroup parent, View child)
{
Rect mTempRect = new Rect();
child.getDrawingRect(mTempRect);
parent.offsetDescendantRectToMyCoords(child, mTempRect);

return !((mTempRect.right) = parent.getScrollX()
 (mTempRect.left) = (parent.getScrollX() +
parent.getWidth()));
}

Can you give feedback on this approach?

TIA,

Marc


2011/9/6 Indicator Veritatis mej1...@yahoo.com

 Hah, I should have thought of this name! 'HorizontalScrollView' has
 been supported since API level 3, and it sounds like just what you
 want.

 On Sep 5, 11:39 pm, Indicator Veritatis mej1...@yahoo.com wrote:
  I would have said use ScrollView, but that too is limited to
  vertical scrolling. So now I have to ask: do you really HAVE to have
  the scrolling done horizontally? You might be in for a harder time if
  you insist on this.
 
  On Sep 5, 11:29 pm, Marc Van Daele marc.van.dael...@gmail.com wrote:
 
   Hello Ed,
 
   Thanks for your answer but I'm not sure a ListView will work (though I
 will
   look at the video).
   Isn't a ListView limited to Vertical scrolling? (at least the javadoc
 says
   so)
 
   Kind Regards,
 
   Marc
 
   2011/9/6 Ed edscha...@gmail.com
 
Hi Marc,
 
Have a look at ListView. It's probably done most of the hardwork for
 you if
you just write your own adapter. Just make sure you get your getView
correct.
 
Watch a couple of Romain Guy's videos from Google I/O e.g.
   http://www.youtube.com/watch?v=wDBM6wVEO70
 
Should help get you started in the right direction.
 
Cheers,
 
Ed
 
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

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


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

[android-developers] Re: How to detect if a view is on screen

2011-09-05 Thread Marc Van Daele
I didn't see my question (see below) appear in the group yet so I'm
resending.
Sorry if it appears twice.

Marc

2011/9/3 vdaele marc.van.dael...@gmail.com

 Hello,

 Suppose I have a horizontal scrollable list of say 100 movie posters
 (each in its own View)
 of which only 4 Views fit on the screen at the same time.
 When I've scrolled through the complete list once, I will have 100
 Bitmaps in memory of which only 4 are visible.

 To save memory, I want to release the Bitmaps of those Views that are
 off-screen.
 Is there an easy way to know whether a View is effectively visible or
 should I compute this myself?

 (I've looked at the onVisibilityChanged listener but this seems to
 serve a different purpose)

 Thanks for your help,

 Marc





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

2011-08-24 Thread Marc
Hi,

I'm looking to customise the sliding drawer as well as add an extra
view, however the slidingdrawer class seems to only allow the handle
and content views to be nested inside the sliding drawer (I would like
to add a header that sits to the left of the handle (don't want this
to be nested inside handle as it cant have touch events)).

I have been able to customise the handle by overriding the layout of
the handle using the onlayout method, (i pushed the handle to align
with the right of the screen) and would like to create a header that
sits to the left of this.

 I am not placing this header inside the handle as i dont want to
modify the handles touch events and i would like the header view to be
a view, and not have any touch events at all, just follow along next
to the handle.

 Any ideas on how i would do this? i am currently using a class that
extends slidingdrawer and overiding layouts etc there at the moment

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

2011-07-02 Thread Marc Lester Tan
Hi Felix,

Although it will not really check for your app's ranking but it will give
you the list of top 100 apps/games in the Android market as well as their
stats for the previous days.

http://www.appalert.co

Cheers,

*Marc Lester Tan *

http://www.appalert.co
http://moonphase.pendukosoftware.com
http://blogs.marctan.com

http://www.proudlypinoy.org/



On Sun, Jul 3, 2011 at 8:34 AM, Felix Garcia Lainez fgarcialai...@gmail.com
 wrote:

 Ahhh... Ok.. I was thinking on a fixed ranking by country like
 AppStore. If there are more variables like carrier, device, etc then i
 understand is possible that there are not tools for that..

 About searching manually the position i had already thought about
 that :)

 Thanks!

 On 2 jul, 19:38, John Coryat cor...@gmail.com wrote:
  One problem with rank is it can change depending on your location,
 carrier
  or even device.
 
  You can get an idea of what a rank for an app is by going into the
 market,
  selecting all apps and start counting, manually, until you find the app
  your interested in. That's pretty painful, especially if your app is
 beyond
  about 800 in overall rank as that's the maximum (or used to be) number
  listed in the all category.
 
  -John Coryat

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

2011-06-09 Thread Marc
Hello folks,

after googling all the day, I have solution to actually start an
external activity from a receiver.
In the end I added a service to the package, so the receiver starts
the service and the service should start the activity. Of course that
doesn't sound very efficient at all, but in addition to this it
doesn't work either. Thats my code from the service:

public void onCreate() {
super.onCreate();
Intent i = new Intent(android.intent.action.MAIN);
ComponentName n = new
ComponentName(com.schwimmer.android.carmode,
com.schwimmer.android.carmode.ToggleCarMode);
i.setComponent(n);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplication().startActivity(i);
//this.stopSelf();

If I put this code into an activity and start it wit
this.startActivity() it works like a charm. But not if it is put into
the receiver or server.

Do you have any idea how to fix that?

Thanks!
Marc

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

2011-06-07 Thread Marc
Thanks for all the replys, that helped a lot :]

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

[android-developers] Invisible Activity

2011-06-06 Thread Marc
Hey,

I would like to create an app that changes the volume and then exits.
For that I obviously won't need an UI or service, as a toast is
enough.

So how exactly do I write an invisible activity? I tried
android:visiblity=gone in the Android Manifest, that that didn't
work.

I guess that's a noobish problem, but I started programming with
Android just a couple of days ago ;)

Thanks!
Marc

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Developing image processing project ny interfacing matlab and android phone

2011-05-12 Thread Marc Lester Tan
you can use google's tesseract and here's a writeup on how to use it on NDK:

http://www.itwizard.ro/interfacing-cc-libraries-via-jni-example-tesseract-163.html



On Wed, May 11, 2011 at 12:23 AM, Ajit basu...@gmail.com wrote:

 Hello,
 I am developing a project which takes a natural scene image as input
 and detects text,recogniss and converts it to speech. i have done it
 using matlab. now i want it to go real time
 i,e a mobile application, which shd be able to take images from camera
 of phone, and sent it to matlab, the matlab shd process the image,
 return back the text file containing recognised text, and the app shd
 convert the text present in received file to speech(text to speech).
 can it be done??? if yes. pls let me  know..:)
 thank you

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




-- 
Cheers,

*Marc Lester Tan *

http://www.appalert.co
http://moonphase.pendukosoftware.com
http://blogs.marctan.com

http://www.proudlypinoy.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

Re: [android-developers] Usage Statistics

2011-05-11 Thread Marc Lester Tan
Take a look at UsageStatsService.java

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/am/UsageStatsService.java;h=6e8f24823efe88ab649ab5e6ddb9a49e69601bca;hb=HEAD

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/am/UsageStatsService.java;h=6e8f24823efe88ab649ab5e6ddb9a49e69601bca;hb=HEADIt
monitors all the application resume/pause state and logs into files.

and check how the settings app is using it here:

http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob;f=src/com/android/settings/UsageStats.java;h=f67eeec4dd91c4ae5d31c487c61746fe21c02420;hb=HEAD

Not sure though if you can use it in your app.


On Thu, May 12, 2011 at 10:29 AM, TreKing treking...@gmail.com wrote:

 On Wed, May 11, 2011 at 8:01 PM, Edmund chang.edm...@gmail.com wrote:

 For example, if I wanted to know how many times a certain APK was
 launched. How long it was used for. And also, if I wanted to know details
 about how the APK was being used such as how many times they played a
 certain music track in a music player app or passed a certain level in a
 game, can I inject some code into the APK to register this data?


 http://code.google.com/mobile/analytics/docs/android/
 http://www.flurry.com/

 I was wondering about details like where can I retrieve this from and is it
 centralized.
 Like can one APK retrieve this data that is written by all other APKs.


 I'm not really sure what you're asking.


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


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




-- 
Cheers,

*Marc Lester Tan *

http://www.appalert.co
http://moonphase.pendukosoftware.com
http://blogs.marctan.com

http://www.proudlypinoy.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] Promotional Graphic in PNG gets converted to _very lossy_ JPEG in Android Market?

2011-04-05 Thread Marc Reichelt
Hi!

I have a problem with the Android Market. I uploaded a promotional
graphic (180w x 120h) as PNG. However, the Android Market seems to
apply a _very_ lossy JPEG compression on it - it just looks ugly.
Here is the image I uploaded to the Android Market:
  http://marcreichelt.de/misc/nichtlustig/before.png
It gets converted to this PNG image (which basically is a JPEG image,
but with .png extension):
  http://marcreichelt.de/misc/nichtlustig/after.png

Is this a bug in the Android Market, or am I doing something wrong? I
even tried to upload a JPEG image with not so high compression or as a
PNG image with an optimized 256 color palette (which is even smaller
than the resulting JPEG file of the market) - but he is still screwing
up the image. :-/


Thanks for your help  regards

Marc Reichelt   ||   http://www.marcreichelt.de/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Promotional Graphic in PNG gets converted to _very lossy_ JPEG in Android Market?

2011-04-05 Thread Marc Reichelt
Hi again,

by the way, the app (German language) can be viewed here:
https://market.android.com/details?id=de.nichtlustig.android
All other images apart from the Promotional Graphic look ok.


Regards

Marc Reichelt   ||   http://www.marcreichelt.de/

On 5 Apr., 22:31, Marc Reichelt mcreich...@googlemail.com wrote:
 Hi!

 I have a problem with the Android Market. I uploaded a promotional
 graphic (180w x 120h) as PNG. However, the Android Market seems to
 apply a _very_ lossy JPEG compression on it - it just looks ugly.
 Here is the image I uploaded to the Android Market:
  http://marcreichelt.de/misc/nichtlustig/before.png
 It gets converted to this PNG image (which basically is a JPEG image,
 but with .png extension):
  http://marcreichelt.de/misc/nichtlustig/after.png

 Is this a bug in the Android Market, or am I doing something wrong? I
 even tried to upload a JPEG image with not so high compression or as a
 PNG image with an optimized 256 color palette (which is even smaller
 than the resulting JPEG file of the market) - but he is still screwing
 up the image. :-/

 Thanks for your help  regards

 Marc Reichelt   ||  http://www.marcreichelt.de/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] In-app billing does not work - although everything has been checked

2011-03-26 Thread Marc Reichelt
Hi!

I am including In-app billing in a new Android application I am
currently working on. The project is nearly finished and it should go
live as soon as in-app billing goes live.

In this project I want that users can donate to support the
application. However, I can not get In-app billing to work, although I
think I did everything right. Every time it is showing me that the
product is unavailable. Here is the logcat shortly after clicking the
button to purchase the item (product ID donate_1) and after closing
the Android Market dialog:
03-26 12:07:42.440: DEBUG/More(12297): buying: donate_1
03-26 12:07:42.440: DEBUG/BillingService(12297): RequestPurchase
03-26 12:07:42.450: DEBUG/BillingService(12297): request id:
8723043450188864909
03-26 12:07:42.450: INFO/ActivityManager(96): Starting: Intent
{ act=android.intent.action.VIEW
cmp=com.android.vending/.billing.InAppBuyPageActivity (has extras) }
from pid -1
03-26 12:07:42.770: INFO/ActivityManager(96): Displayed
com.android.vending/.billing.InAppBuyPageActivity: +313ms
device shows market dialog that product is unavailable.
03-26 12:12:28.500: INFO/BillingService(12297): handleCommand()
action: com.android.vending.billing.RESPONSE_CODE
03-26 12:12:28.500: DEBUG/BillingService(12297): RequestPurchase:
RESULT_ITEM_UNAVAILABLE
03-26 12:12:28.500: DEBUG/More(12297): donate_1:
RESULT_ITEM_UNAVAILABLE
03-26 12:12:28.500: INFO/More(12297): purchase failed

This is what I checked:
1) I correctly signed and uploaded my APK file to the developer
console and saved it as draft, and I installed it on my real device.
2) I ensured that my test account, e.g. example_t...@googlemail.com,
is listed as test account (the developer account is a different one,
let's say example_...@googlemail.com) and is the primary account on my
device.
3) The product donate_1 (unmanaged because multiple donations should
be possible) is listed as published and has a price of 0.79 €.
4) All static responses triggered by android.test.purchased etc.
have been tested and work.
5) Of course the Android Market is checked to have the latest version
(2.3.4).

So I believe I checked all points from
http://developer.android.com/guide/market/billing/billing_testing.html#billing-testing-real
- and I have no idea why it still does not work. Maybe a bug? It
wouldn't be the first time that ...@googlemail.com addresses make
problems, but ...@gmail.com do not. But that is just my guess.


Thanks in advance  regards

Marc Reichelt   ||   http://www.marcreichelt.de/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: In-app billing does not work - although everything has been checked

2011-03-26 Thread Marc Reichelt
Hi Kostya,

did you publish the In-app-items? Testing In-app payment will not work
if you do not publish the In-app-items. You don't have to publish your
app for testing it. In fact, you can not publish an application using
In-app billing right now.
My problem just is that I did everything the documentation says and
still can not test it successfully.

Regards

Marc Reichelt   ||   http://www.marcreichelt.de/

On 26 Mrz., 13:14, Kostya Vasilyev kmans...@gmail.com wrote:
 I am also getting ITEM_UNAVAILABLE for my own product item with both a
 test account and my developer's account. The application is uploaded but
 not published, and so it the item.

 In addition, purchasing authorization for android.test* items under
 the test account never completes.

 FWIW, the product list editing page says this:

 An in-app product will appear UNPUBLISHED until the owning application
 is PUBLISHED, at which point the in-app product's publishing state
 applies. Please use the application editor to modify the application's
 publishing state.

 Not sure what this means for testing. Also, the License Test Response
 field in the profile page (where you set up test accounts) doesn't
 appear to have any codes specific to in-app billing, just codes for LVL.

 -- Kostya

 26.03.2011 14:32, Marc Reichelt пишет:









  Hi!

  I am including In-app billing in a new Android application I am
  currently working on. The project is nearly finished and it should go
  live as soon as in-app billing goes live.

  In this project I want that users can donate to support the
  application. However, I can not get In-app billing to work, although I
  think I did everything right. Every time it is showing me that the
  product is unavailable. Here is the logcat shortly after clicking the
  button to purchase the item (product ID donate_1) and after closing
  the Android Market dialog:
  03-26 12:07:42.440: DEBUG/More(12297): buying: donate_1
  03-26 12:07:42.440: DEBUG/BillingService(12297): RequestPurchase
  03-26 12:07:42.450: DEBUG/BillingService(12297): request id:
  8723043450188864909
  03-26 12:07:42.450: INFO/ActivityManager(96): Starting: Intent
  { act=android.intent.action.VIEW
  cmp=com.android.vending/.billing.InAppBuyPageActivity (has extras) }
  from pid -1
  03-26 12:07:42.770: INFO/ActivityManager(96): Displayed
  com.android.vending/.billing.InAppBuyPageActivity: +313ms
  device shows market dialog that product is unavailable.
  03-26 12:12:28.500: INFO/BillingService(12297): handleCommand()
  action: com.android.vending.billing.RESPONSE_CODE
  03-26 12:12:28.500: DEBUG/BillingService(12297): RequestPurchase:
  RESULT_ITEM_UNAVAILABLE
  03-26 12:12:28.500: DEBUG/More(12297): donate_1:
  RESULT_ITEM_UNAVAILABLE
  03-26 12:12:28.500: INFO/More(12297): purchase failed

  This is what I checked:
  1) I correctly signed and uploaded my APK file to the developer
  console and saved it as draft, and I installed it on my real device.
  2) I ensured that my test account, e.g. example_t...@googlemail.com,
  is listed as test account (the developer account is a different one,
  let's say example_...@googlemail.com) and is the primary account on my
  device.
  3) The product donate_1 (unmanaged because multiple donations should
  be possible) is listed as published and has a price of 0.79 €.
  4) All static responses triggered by android.test.purchased etc.
  have been tested and work.
  5) Of course the Android Market is checked to have the latest version
  (2.3.4).

  So I believe I checked all points from
 http://developer.android.com/guide/market/billing/billing_testing.htm...
  - and I have no idea why it still does not work. Maybe a bug? It
  wouldn't be the first time that...@googlemail.com addresses make
  problems, but...@gmail.com do not. But that is just my guess.

  Thanks in advance  regards

  Marc Reichelt   ||  http://www.marcreichelt.de/

 --
 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: In-app billing does not work - although everything has been checked

2011-03-26 Thread Marc Reichelt
Hi Kostya,

of course they did charge your account for real - you _definitely_
should read the In-app documentation before doing anything else!
And as I pointed out I am using a correctly signed release build, not
the debug build. Still having problems.

Regards

Marc Reichelt   ||   http://www.marcreichelt.de/

On 26 Mrz., 13:49, Kostya Vasilyev kmans...@gmail.com wrote:
 26.03.2011 15:25, Marc Reichelt пишет:

  Hi Kostya,

  did you publish the In-app-items? Testing In-app payment will not work
  if you do not publish the In-app-items. You don't have to publish your
  app for testing it. In fact, you can not publish an application using
  In-app billing right now.

 Ah. Good point, thanks.

 Just published my test item, and tried to purchase it from the
 development phone.

 It short, it worked.

 However, even though my development phone is listed as a test account in
 the Developer Console profile, I still had to enter a real credit card
 number (no VISA--FAKE there), and they charged my card for real.
 Good thing I set the price to $0.99.

 After I submitted the purchase, the Checkout window didn't go away for a
 long time, then I got an error report in the logcat about the billing
 activity having leaked a window. A couple of minutes later the
 application showed that the item state changed to PURCHASED.

 Oh, I am using the actual release build, signed with a non-debug key,
 same .apk as I uploaded to Market. Are you perhaps using a debug build
 on your phone?

 -- Kostya

  My problem just is that I did everything the documentation says and
  still can not test it successfully.

 --
 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: In-app billing does not work - although everything has been checked

2011-03-26 Thread Marc Reichelt
Hi Kostya,

by the way: you can refund the payment you made from your Google
Merchant account.
Remember that you are testing the real system there, which means real
money is going to flow if you do not refund it shortly after.


Regards

Marc Reichelt   ||   http://www.marcreichelt.de/

On 26 Mrz., 13:49, Kostya Vasilyev kmans...@gmail.com wrote:
 26.03.2011 15:25, Marc Reichelt пишет:

  Hi Kostya,

  did you publish the In-app-items? Testing In-app payment will not work
  if you do not publish the In-app-items. You don't have to publish your
  app for testing it. In fact, you can not publish an application using
  In-app billing right now.

 Ah. Good point, thanks.

 Just published my test item, and tried to purchase it from the
 development phone.

 It short, it worked.

 However, even though my development phone is listed as a test account in
 the Developer Console profile, I still had to enter a real credit card
 number (no VISA--FAKE there), and they charged my card for real.
 Good thing I set the price to $0.99.

 After I submitted the purchase, the Checkout window didn't go away for a
 long time, then I got an error report in the logcat about the billing
 activity having leaked a window. A couple of minutes later the
 application showed that the item state changed to PURCHASED.

 Oh, I am using the actual release build, signed with a non-debug key,
 same .apk as I uploaded to Market. Are you perhaps using a debug build
 on your phone?

 -- Kostya

  My problem just is that I did everything the documentation says and
  still can not test it successfully.

 --
 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: In-app billing does not work - although everything has been checked

2011-03-26 Thread Marc Reichelt
OK, I solved it - it really was a @googlemail.com / @gmail.com
problem.
I entered the corresponding @gmail.com address as test account, and In-
app billing started to work. It seems to be an issue at Google, so I
entered a new issue here: 
http://code.google.com/p/marketbilling/issues/detail?id=4
I hope they will catch up and solve this problem before In-app billing
goes live - although it should only affect some users (e.g. Germany).
IMHO they really should stop to allow these @googlemail.com accounts.


Regards

Marc Reichelt   ||   http://www.marcreichelt.de/

On 26 Mrz., 14:18, Kostya Vasilyev kmans...@gmail.com wrote:
 26.03.2011 15:57, Marc Reichelt пишет:

  Hi Kostya,

  of course they did charge your account for real

 Why the of course? I set this phone up as a test account in the Market
 console, and the system knows this.

    - you_definitely_
  should read the In-app documentation before doing anything

 Yes, definitely plan to, when I actually start implementing it in my
 app. So far I've only had time for a first, cursory read.

 Anyway, it was only $0.99, less than half the price of a pack of
 cigarettes. And I can issue a refund to myself.

  And as I pointed out I am using a correctly signed release build, not
  the debug build. Still having problems.

 Weird. From your description, we have identical setups: release builds
 uploaded but not published, installed on the phone, item published in
 the console, Market 2.3.4. And yet it worked for me and didn't work for you.

 -- Kostya

  Regards

  Marc Reichelt   ||http://www.marcreichelt.de/

 --
 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] Android App Tracker - market rank tool

2011-03-21 Thread Marc Lester Tan
Hi, looks good. I've built a similar one a few months ago using the
andorid-market-api library.

Check it out http://appalert.co


On Mon, Mar 21, 2011 at 12:42 PM, Corey Ledin, LLC
coreyledin...@gmail.comwrote:

 Hi All,

 I have yet to contribute to this group just start off by saying hi and
 if you haven't heard of me I developed Beer Pong Free for the android
 and iPhone etc. Recently I was trying to find a decent app rank
 website for the android like that of all of iPhone pones with not
 really any luck besides that one app. So I said what the heck and
 built my own...
 It is still in beta / testing phase since i only started the project
 with my partner 4 days ago lol. But go check it out!

 http://androidapptracker.com

 Let me know what you think and if you have any ideas.

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




-- 
Cheers,

*Marc Lester Tan *

Singapore #: +6597896575

http://www.appalert.co
http://www.appcellar.com
http://moonphase.pendukosoftware.com
http://blogs.marctan.com

http://www.proudlypinoy.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] Scaling on Two Webviews

2011-03-16 Thread Marc Lester Tan
Hi,

In my application, i need to display 2 webviews inside a linearlayout in
vertical orientation. The code looks something like this on the onCreate
method of my activity:

LinearLayout container = new LinearLayout(this);
container.setOrientation(LinearLayout.VERTICAL);

WebView mWebView = new WebView(this);
WebView mWebView2 = new WebView(this);

mWebView.loadUrl(http://www.google.com;);
mWebView2.loadUrl(http://www.yahoo.com;);

container.addView(mWebView);
container.addView(mWebView2);
setContentView(container);

Now, Webview has built-in scale gesture listener and if I try to scale the
first webview (mWebView), it will scale properly but then when I try to
scale the second one (mWebview2), it doesn't scale at all but it does
receive the touch events. Note that the two webviews are displayed at the
same time on the screen.

Any idea what's going on here or what should I do so that the second webview
will also scale? Is it a bug or a limitation?

-- 
Cheers,

*Marc Lester Tan *

http://www.appalert.co
http://moonphase.pendukosoftware.com
http://blogs.marctan.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] Thread + ImageView

2011-03-11 Thread Marc CG
Hi everybody!

First, sorry if my English is bad, usually i don't use it...

I am making a program witch have 2 java class. The first class is the
main activity and the second is a thread.

In the main activity i have some ImageViews, Textviews, CheckBox and
RadioButtons. My Problem is that when i want to modify the ImageView
from main activity to a new Image (that i have into resources) my
debugger says: Source not found. But if i do this out of the thread
it works.

I can't see the problem!

Thanks for all!

Marc

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

2011-03-05 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/03/2011 07:06 PM, sebastian nielsen wrote:
 Also found some on the internet, about Nexus S having a PN65N which
 according to sources of the internet, is a SmartMX security chip
 combined with a NFC chip.

It seems that it is in fact an NXP PN544.  Anyway having a secure element
integrated in the Nexus S would be great news, even if it take some time to be
able to use it.  But knowing that the chip can support a secure element does not
mean that there is one.

 
 Any ideas on how to use this security chip? Eg writing data
 (generating/writing RSA keys or writing symmetric keys) into the chip,
 extracting generated _public_ keys and also use the keys for
 encryption/decryption?
 
 Any ideas on how to do it in Android?

I was not able to find anything in the current AOSP, but I think that a lot of
work would be needed to have this.  First you need the integration of pcsclite,
similar to what seek-for-android did.  But after this someone need to write a
PKCS#11 provider implementation, similar to the SunPKCS11 provider.  I was not
able to find one, either in Apache Harmony or BouncyCastle, so that probably
something that had to be written from scratch.

After this, and assuming that the Nexus S really contains a secure element, any
Android app will be able to store/generate and use RSA/ECC keys in a secure way.

- -- 
Marc Petit-Huguenin
Personal email: m...@petit-huguenin.org
Professional email: petit...@acm.org
Blog: http://blog.marc.petit-huguenin.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk1yYcsACgkQ9RoMZyVa61fSMACfTmbS1RpO96mVm4D2QdpP5OBh
HUAAn2HuxgsciCfo89O01bJSIp0IsOgb
=nvN4
-END PGP SIGNATURE-

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

2011-03-03 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/03/2011 06:17 PM, sebastian nielsen wrote:
 The keys should survive a compromise which consist of both rooting and
 cloning a device.
 Eg, If I leave my device on a table in a train, and one year later,
 finds my device again, I should be sure that my keys are not
 compromised. (If a adversial *uses* my key does'nt matter).
 In other words, If I have my device in my hand, I want to be sure that
 nobody has a copy of my encryption key, even if the device has been
 compromised prior to getting the device in my hand.

I bought one of those for this reason:

http://www.gd-sfs.com/the-mobile-security-card/mobile-security-card-ve-2-0/

Code is available here:

http://code.google.com/p/seek-for-android/

I yet have to play with it., but that looks promising.

- -- 
Marc Petit-Huguenin
Personal email: m...@petit-huguenin.org
Professional email: petit...@acm.org
Blog: http://blog.marc.petit-huguenin.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk1wV88ACgkQ9RoMZyVa61f4VgCgleRcjisH/21s/CQAGMEe/ola
/acAnAyeR1/4rtIUULm9jFfK29pGPA+G
=Kqyy
-END PGP SIGNATURE-

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

2011-03-03 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/03/2011 07:43 PM, sebastian nielsen wrote:
 Marc Petit-Huguenin: How did you get one bought (cant find any buy
 option, and It would be good if you could point me to a webstore that
 sells those secure MicroSD cards) and how much do they cost?

Well, it's a PITA, as you cannot pay by credit card.  I had mine bought by a
German friend of a friend, who was traveling to the US.

Anyway, here's the website:

https://www.cardsolutions-shop.com/shop/gi-de/

 
 Nikolay: In this case, the security is about singulary. The key should
 be copy protected, but it does not need to be use-protected because I
 want to be sure, that if I leave the phone on a table, go on toilet,
 come back and take it back, I can be sure that nobody has access to my
 key, even if they impersonated me in that little brief amount of time
 that I was on toilet for example.
 Having the key stored in software (eg software token or in standard
 phone memory), the key is no longer secure, since if I leave my phone
 out of sight even for a brief amount of time, its possible that
 somebody just copied my key.
 If I store the key in software, I would need to have 100 % of sight of
 the phone all the times, else the key could be regarded as
 compromised.
 
 In other words, if I have the phone in my hand, I should be
 *absolutely* confident in that nobody can authenticate as me.
 
 Another example, I lend my device to my friend for the purpose that my
 friend can log in to my account for a brief time. When I then get the
 device back from my friend, I want to be sure that my friend doesn't
 have a copy of my private key and can log in as me, in case we stop
 being friends and sabotage for me.
 


- -- 
Marc Petit-Huguenin
Personal email: m...@petit-huguenin.org
Professional email: petit...@acm.org
Blog: http://blog.marc.petit-huguenin.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk1wbLMACgkQ9RoMZyVa61d3TgCeKdEj8lZ9STX7GsDpkGeGG5EU
W80AoJCYlMqSPIa57+MbkB0WUI00A1OX
=LQxo
-END PGP SIGNATURE-

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

2011-02-09 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/09/2011 03:24 PM, Atif Musaddaq wrote:
 Hi, Guys
 
 I am sending some data to the PHP server and based on this data server
 is sending true or false back to me.
 
 e.g 
 
 echo true; 
 OR
 echo false;
 
 Now on the android side i write this code in Post method
 
   try {
 post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
 HttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity();
String responseText = EntityUtils.toString(entity);
 Toast.makeText( getApplicationContext(),
 responseText,Toast.LENGTH_SHORT).show();
 Log.i(Output,responseText);
 
 // till here it is showing me either true or false
if (responseText == true) 

if (true.equals(responseText))

 {
   // call activity A
 }else{
 
   // call activity B
} 
 
 Now it shows me response either true or false based on the data i send.
 but it is not comparing the if condition. i would like to further call
 Activity A or B based on  true or false.
 
 Can any one help me and tell me what i am doing wrong here ? why it is
 not comparing the condition ? responseText is already string and
 also comparing String


- -- 
Marc Petit-Huguenin
Personal email: m...@petit-huguenin.org
Professional email: petit...@acm.org
Blog: http://blog.marc.petit-huguenin.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1TI+YACgkQ9RoMZyVa61ec9ACfTvys0ZQoWzbmaauhwV/SDlQF
to0AnA4YiFQSmgq1rvjIJk3YRzapgicp
=qFJL
-END PGP SIGNATURE-

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


Re: [android-developers] Re: Android SDK is so slow that is ridiculous.

2011-01-29 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/29/2011 10:55 AM, Leigh McRae wrote:
 It's easy to say that until you have actually written an OpenGL game for
 Android.  Running at seconds per frame instead of frames per second
 means you can ONLY test on real hardware.  On real hardware my game
 (Tank Recon 3D) takes over 5 minutes to load in the debugger (30 seconds
 on BlackBerry).  Even working with these limitations you also have to
 develop for the different OS versions and screen sizes.
 
 Now I understand what you're saying with the emulation but this blanket
 answer is getting kind of old.  Stop giving the 'You can't get there
 from here' answer and try and figure something out.  The BlackBerry
 emulators route the OpenGL calls to the desktop PC and allow you to
 choose the level of acceleration.  Maybe this is something that can be
 looked into.  Sure I know you're not getting a 1:1 mapping but it does
 allows you to develop.  How about making a new driver backed by the
 desktop GPU and give some way to select it?

And what about you write and contribute this driver to the code base?  There was
something I disliked in the phone emulator, I fixed it for myself, and then
submitted it in Gerrit and the patch was accepted, all in less than two months
and it is now part of Gingerbread.

Complaining about missing features on an open source project is ridiculous.

 
 On 1/29/2011 12:53 PM, Dianne Hackborn wrote:
 On Sat, Jan 29, 2011 at 1:26 AM, Miguel Morales
 therevolti...@gmail.com mailto:therevolti...@gmail.com wrote:

 Not to mention that testing OpenGL games is impossible.  The only way
 to test on devices is users, otherwise it's just a guessing and
 hoping
 for the best.
 In any case, I don't care WHY the emulator is so slow.  Hopefully
 they'll make it fast in the near future, the iPhone emulator is much
 better.


 At the end of the day, you absolutely need to test and run on a
 device, especially for doing things like OpenGL games.  An emulator or
 simulator on desktop hardware is never going to give you a good idea
 of how your app performs on real hardware.

 This isn't an excuse for the emulator being slow (we really would like
 to improve it, this is just a fairly challenging problem), but no
 matter what is done it can never be a replacement for running on a
 real device.

 -- 
 Dianne Hackborn
 Android framework engineer
 hack...@android.com mailto: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 
 


- -- 
Marc Petit-Huguenin
Personal email: m...@petit-huguenin.org
Professional email: petit...@acm.org
Blog: http://blog.marc.petit-huguenin.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1EcS8ACgkQ9RoMZyVa61es6wCeMZHA1Lu5GrzI4qNBIpW/vMQX
6NIAn3azdKrV6q6BAurX2sDMwJsEkfMp
=tUSL
-END PGP SIGNATURE-

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

2011-01-12 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/12/2011 08:59 AM, Lewis wrote:
 I highly doubt such a thing exists as Android does not currently
 support USB host mode

One solution is to use a Bluetooth scanner.

 
 Regards,
 
 Lewis
 
 On Jan 12, 2:15 pm, ftovalle ftova...@gmail.com wrote:
 hi everyone,
 does anyone know of a bar code scanner that can connect via USB or
 mini USB to a tablet of Android?

 thanks!
 Felipe
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk0t6G4ACgkQ9RoMZyVa61f/KwCeP+3ePdImP5EVP1oXU13kfTvP
9tEAn1TTzFqEkwsP5uF9NDg9SFULGa5K
=CSAU
-END PGP SIGNATURE-

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

2011-01-12 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/12/2011 09:49 AM, Marcin Orlowski wrote:
 One solution is to use a Bluetooth scanner.
 
 
 Well, there's quite nice Barcode scanner app on Market so it
 also a solution however I'd bet it will be a bit too slow and uncomfortable
 to use (not to mention focus issues most devices have)

I assumed that the OP wanted to use the Android tablet in a professional
environment (inventory, etc...), in which case having an hand held scanner is
mandatory.  A Bluetooth scanner (or a scanner with a serial port and a
Bluetooth/Serial bridge, like the Iogear GBS301), is a good solution in this
case, and writing the Android app should be simple.


- -- 
Marc Petit-Huguenin
Personal email: m...@petit-huguenin.org
Professional email: petit...@acm.org
Blog: http://blog.marc.petit-huguenin.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk0t7MQACgkQ9RoMZyVa61eXXACfScMX6ODJAVBzNPASCfTuoiH3
EXEAmQEkKGuBy43C4eJGprrqiVzLKYiH
=qJl4
-END PGP SIGNATURE-

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

2011-01-06 Thread Marc Lester Tan
Yes, i think it's still better to keep it in asynctask as you will never
know when the user is in high speed mobile internet or not and also not to
block the ui thread.

Marc

On Fri, Jan 7, 2011 at 1:02 PM, Mystique joven.ch...@gmail.com wrote:

 Hi, in my app I have an asynctask to download a file but the file size
 is only 50kb so it is almost instantaneous. Is worth worth to put it
 on async? Or I'm asking for trouble and should keep it simple?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] Flipping views (or: the magic behind onInterceptTouchEvent)

2010-12-19 Thread Marc Reichelt
Hi!

I want to create a new widget for Android developers which allows to
use the same functionality as seen on the home screen (flipping
between different screens), the calendar (flipping between days) or
TweetDeck (flipping through Twitter columns). The source for the
launcher is there, so I thought this might not take so long:
http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob;f=src/com/android/launcher/Workspace.java;h=2e04311f530003dbd76695f46876a785164acb99;hb=HEAD#l572

It seems that the two methods onInterceptTouchEvent() and
onTouchEvent() do all the things that are needed for getting the
events, so I copied them to a new class and removed functionality that
is for the Workspace only. You can see my work-in-progress here:
http://pastebin.com/8p8GCEZK

My problem now is: onInterceptTouchEvent() is always only called once
with the MotionEvent.ACTION_DOWN action so I never get into the
ACTION_MOVE case - where the actual fling would be initiated. I played
around with the return values of onInterceptTouchEvent() (true means
to steal events from children) and the return values of onTouchEvent()
(true means to consume the event), but I didn't get any further.

Is there some kind of magic behind onInterceptTouchEvent() or
onTouchEvent() which I didn't notice? Is my problem even solveable? I
hope so... :-)


Thanks in advance  merry christmas
Marc

PS: I also asked this question on StackOverflow, but didn't get any
answers yet:
http://stackoverflow.com/questions/4455891/android-use-realviewswitcher-to-switch-between-views-like-the-home-screen-does

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

2010-12-06 Thread Marc Sulivan
I need to turn On and Off the GPS, how can I do that using the SDK or
NDK?
If need to sign my application with a special signature please tell me
what kind of signature I need.


Thanks
Marc

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

2010-11-08 Thread Marc Poppleton
Ok, problem solved after having looked at the source of the
CheckedTextView. I had to override the onCreateDrawableState and
drawableStateChanged methods and it now works.

On 5 nov, 15:30, Marc Poppleton marc.popple...@gmail.com wrote:
 Hi there,

 I'm writing a little custom view which can be in two states : checked,
 not checked. According to the state it is in, it's background changes.
 Quite straightforward sort of behavior.
 My class extends FrameLayout and implements the Checkable interface.
 In my toogle method I just calls the setChecked method with a boolean
 corresponding to the new state. My setChecked method simply sets a
 mChecked boolean and calls the refreshDrawableState method. Pressing
 the view should then toggle it back and forth between the states
 check, unchecked.
 The background of the FrameLayout is given a StateListDrawable in
 which I've defined a drawable item for the following states :
 state_pressed, state_focused, state_checked=true, state_checked=false.
 When I press my custom view, the background changes all right back and
 forth between the state_pressed=true and state_checked=false items.
 But state_checked=true is never called.

 What am I doing wrong?

 Thank you for your help,

 Marc

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

2010-11-05 Thread Marc Fleury
 I guess if it's a wall
 mounted device, it might be ok.  But at that point why not just use a
 PC of sorts and use some linux distribution and use your app as is,
 why even use Android at all?

You would be surprised how difficult it is to get a decent ARM based
fanless PC with a stable linux and working JVM.  We have been working
on it at www.openremote.org and you can find it but it is hard to do
and then distribution is a headache.  These are part of the reason why
we are looking for an android based server (in the wall). Also I think
the prices will be go down quickly due to economies of scale.  IT then
may be a decent server platform.   But yeah, I got to weight the
difficulty of porting against the joy of an in-wall android.  I got to
admit that porting is complicated and was full of nasty surprises for
me :(.  This is not java, the libraries, this is android-java,
unfortunately a different beast.

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

2010-11-05 Thread Marc Fleury
Thanks Jason. Very useful.  i-jetty looks quite interesting run as a
service on android and may just be the ticket.

I may also contact the tjws guy see if he is porting to android.

On A/ this is meant for an in-wall device so no issues of power.

Thanks again.
MF
On Nov 5, 7:20 am, Jason jason.poli...@gmail.com wrote:
 My experience is that Jetty (http://www.mortbay.org/jetty/) tends to
 be a bit more lightweight than tomcat, and also a LOT easier to embed
 (it's basically just a JAR file).

 Or you could try this:

 http://tjws.sourceforge.net/

 Haven't tried it myself, but looks like it's designed to be
 lightweight.

 Or.. maybe even better:

 http://code.google.com/p/i-jetty/

 In either case it's likely to be:

 A) A battery killer due to much heavier resource usage than normal
 mobile apps
 B) Could be a performance problem if the container itself is
 allocating a lot of objects, and thus causing the GC to kick in.

 On Nov 5, 4:51 pm, Miguel Morales therevolti...@gmail.com wrote:



  All I gotta ask is, why?  I'd imagine Tomcat is not written to be run
  in embedded/legacy devices such as an android device.  You'd be
  wasting a lot of memory and cpu cycles.  I guess if it's a wall
  mounted device, it might be ok.  But at that point why not just use a
  PC of sorts and use some linux distribution and use your app as is,
  why even use Android at all?

  I really don't see a case where this is desirable.

  On Thu, Nov 4, 2010 at 10:35 PM, Bret Foreman bret.fore...@gmail.com 
  wrote:
   I've been looking into this too. We have an industrial embedded
   control application that I'd like to run on Android and control from a
   remote browser.

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

  --
  ~ Jeremiah:9:23-24
  Android 2D 
  MMORPG:http://developingthedream.blogspot.com/,http://www.youtube.com/user/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] Custom checkable view

2010-11-05 Thread Marc Poppleton
Hi there,

I'm writing a little custom view which can be in two states : checked,
not checked. According to the state it is in, it's background changes.
Quite straightforward sort of behavior.
My class extends FrameLayout and implements the Checkable interface.
In my toogle method I just calls the setChecked method with a boolean
corresponding to the new state. My setChecked method simply sets a
mChecked boolean and calls the refreshDrawableState method. Pressing
the view should then toggle it back and forth between the states
check, unchecked.
The background of the FrameLayout is given a StateListDrawable in
which I've defined a drawable item for the following states :
state_pressed, state_focused, state_checked=true, state_checked=false.
When I press my custom view, the background changes all right back and
forth between the state_pressed=true and state_checked=false items.
But state_checked=true is never called.

What am I doing wrong?

Thank you for your help,

Marc

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

2010-11-04 Thread Marc Fleury
I have seen other threads on the topic, most notably one asking about
tomcat/jboss on android.

Anyway, I am actually interested in hearing if people have
successfully ported tomcat on android? the use case for me would be
www.openremote.org.  We distribute a controller that is written in
java6.  I have actually started porting parts of it to Android and in
doing so got to thinking we could port the whole thing to android.  As
a dedicated controller in the wall (forget screens and such, this is
not an smart phone) it would be quite killer.

Has anyone succeeded? maybe I haven't searched hard enough?

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

2010-09-09 Thread Marc
Hi,

I'm building an application for my own use, and I like to get
connection via mobile network but I don't know how to do that. What I
want is the same behaviour that offers severals existent widgets to
turn on/off the data connection.

Anybody can illuminate me please? Some code?? Any page with any
sample??

Thanks everybody!

Marc

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] REST web services and JSON Response object support in Android

2010-09-08 Thread Marc Lester Tan
I am using the library from http://www.json.org/java/index.html. Just
include the source in your app (or package it into a jar if you want) then
check Test.java for examples on how to use it.

Cheers,
Marc

Twitter: mharkus
http://www.appcellar.com

On Wed, Sep 8, 2010 at 3:31 PM, cool.manish mannishga...@gmail.com wrote:

 Hi All,

 In my application, I will call webservices which are written using
 REST and returning JSON object rather than XML.
 My Question is it that Is Android support them? Sending an request to
 REST web services and rendering its response is same as HTTP request
 or something different.

 I haven't much idea about REST and JSON and haven't much time to find
 out it by myself. Thats why i am posting this question. If someone has
 worked earlier please help me.

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

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

Re: [android-developers] about android Reversepengineering !!!!

2010-09-05 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/05/2010 09:38 PM, xc s wrote:
 My English is just so-so .   I dont 'want to  other people
 reversepengineering. my android app. how should I do? 

Easy.  Do not give it to other people.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkyEc1EACgkQ9RoMZyVa61ejAgCfYyKV53AbDb9PIjjmbg40dxzI
cUsAnjW/NX13tBVg6FgLf9X32CCxvJ9S
=9Kka
-END PGP SIGNATURE-

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

2010-09-02 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

You may be interested in a proposal for something similar:

http://groups.google.com/group/android-platform/browse_thread/thread/f519754846888193?hl=en#

I also pushed a patchset with the new API and an hacked implementation of this
API, so people can try it:

https://review.source.android.com/#change,16552

On 09/02/2010 10:48 AM, rams wrote:
 Hi All,
 
 Please help in answering this question.
 
 Thank you,
 Ram
 
 On Sep 2, 5:59 am, rams plram2...@gmail.com wrote:
 Hi JBQ  All,

 I want to extend the com.android.internal.telephony for VoIP
 functionality
 as follows:

 Dialer (with alphanumerals, spl characters) ---intent/sip: --- 
 PhoneApp  Telephony Manager  VoIP.java (VoIPJ) -

 VoIP.c(VoIP Daemon) --- our custom libraries for SIP

 Could you please tell me whether it is possible to do this in a
 cleaner way.

 Why we want to do like this is:

 I think Google Android will flow the same architecture later on. We
 can reduce porting effort.

  Also there is something misleading in this:

 Currently, GSM and CDMA are supported by Telephony Manager. They are
 the media and VoIP
 is a technology which works over the DATA (GPRS, EDGE, Wifi, WiMax or
 Ethernet).
 Is it correct to integrate the VoIP changes into the Telephony
 Manager?

 I have seen opensource Android VoIP applications completely skip
 Telephony Manager (Framework Layer)
 and develop their applications as follows:

 Application --- Service  Socket  Native C lib

 Application  Native C --- Kernel (FW or Telephony Manager layer
 is skipped)

 Which is the best way to do this?

 Could you please suggest?

 Thank you,
 Ram
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkx/7voACgkQ9RoMZyVa61cBBQCgkjx4JYjbMz+J5M6fRRVcg0EB
xKUAn29bHv7/koRBMU4BmlhzV6RMFRMj
=srBa
-END PGP SIGNATURE-

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

2010-08-19 Thread Marc
I have spent a lot of time optimizing signal processing algorithms
using both arm assembly and memory optimizations. The memory
optimizations can be huge. I remember one project the speed more than
doubled once we only using cache memory. That is the entire working
data set was less than 8k.

The process is fairly straight forward: Determine the size of your
cache, then use only that much memory. This typically requires doing
tricks like making the output buffer overlap the input buffer.
Basically you need to know exactly where every byte of memory is being
used. Java tends to be allocate as you need memory model, but for
cache optimizations you need tighter control of memory usage.

On Aug 19, 11:47 am, DanH danhi...@ieee.org wrote:
 Hate to sound like I'm harping on the same stuff, but then (assuming
 that the JVM/JIT compiler is doing good enough), the memory bottleneck
 still remains.

 Yep, much of our effort on iSeries went into the memory bottleneck
 area.  Eg, we got fairly astounding improvements (ca 20%) when we
 packed objects so that the fields of SubclassOfA filled in the
 holes left from aligning the fields of A.  And even more
 improvement by packing the Char array owned by a String into the
 String and arranging it so that the two shared a single header.

 (BTW, with regard to alignment, note that most processors can handle,
 eg, unaligned ints and longs, but often the storage accesses are
 several times longer if unaligned, so alignment may be very important,
 even if unnecessary.)

 On Aug 19, 12:54 pm, Amit prabhudesai.a...@gmail.com wrote:



  Hi Dan,

  Thanks for the response

   In general, JITed Java code is as fast as or faster than the
   equivalent native code, if the JIT is reasonably good, and if the
   specific application can be coded efficiently in Java.  

  I was actually banking on this. I don't know too much of the hairy
  details (am not really a compiler person), but from what I have read
  recent improvements by Google to the Dalvik VM make it *comparable* if
  not equal in performance to native code ...

  Hate to sound like I'm harping on the same stuff, but then (assuming
  that the JVM/JIT compiler is doing good enough), the memory bottleneck
  still remains.

  Thanks,
  Amit

  On Aug 19, 10:11 pm, DanH danhi...@ieee.org wrote:

   In general, JITed Java code is as fast as or faster than the
   equivalent native code, if the JIT is reasonably good, and if the
   specific application can be coded efficiently in Java.  The problem is
   that some specific data processing patterns are not easy to code
   efficiently in Java, and I suspect that certain of the bit-bashing
   algorithms used in image processing fall into this category.

   In such cases the most efficient approach is native Java, but I only
   know of one JVM (the IBM iSeries classic JVM) that permits this, and
   then only for system code.  Otherwise it's a bit of a tradeoff to get
   the right partitioning between Java and native, since crossing the
   Java/native boundary tends to be relatively expensive.

   On Aug 19, 7:03 am, Fabrizio Giudici fabrizio.giud...@tidalwave.it
   wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/19/10 13:35 , Amit wrote:

 Now, I know that native code will *not* yield any significant
 performance improvement over Java code

Well, specifically for image processing this won't be true, for sure
up to 2.1 included (as the bytecode is purely interpreted); in 2.2 we
have JIT, but can't speak as I haven't seen it yet.

- --
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici -www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/

iEYEARECAAYFAkxtHakACgkQeDweFqgUGxe83wCfSDP1NEN+TLD0iOCZ/zSvQDRw
I5cAoJOEoC7eREU5KuPU7m93/GDj9VUr
=2ZDf
-END PGP SIGNATURE-

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

2010-08-05 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I search a non-functioning Nexus One car dock, i.e. a Nexus One car dock (the
one formerly sold by Google on their online shop) that have the plastic intact
but with the electronic dead or something else that make it unusable.  I could
buy one on EBay but it is ridiculous to buy one just to destroy it.  I live in
the Bay Area, and I am willing to drive to pick it up.

Thanks.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkxbX5kACgkQ9RoMZyVa61cLAACgnVKkdmWDJxuZjiYPSXxR1RMn
U0EAnR4RrQexoKWGYCkc1KJGLC8G69Bb
=cN49
-END PGP SIGNATURE-

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

2010-07-29 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

If your concern is to split the line at a word boundary, you may want to look at
java.text.BreakIterator.

On 07/29/2010 10:52 AM, Grzegorz Ae wrote:
 Hi,
 I'm wondering how can I split single line text into few lines. I need
 it for game. I want to make it in canvas. It will be notification
 popup, but sometimes text is too long (I draw text canvas.drawText()),
 and I need to split it and draw in few lines in rows. Anyone knows a
 good solution? I saw methods mPaint.measureText() or
 TextUtils.split(), but it isn't so good in my case. Is there other
 method?
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkxRwiQACgkQ9RoMZyVa61cRgACfQFx9g1jqpVszX9e4pNQp5RRs
f2AAoKc1J8SPgPjnmXa6WDg/s19cHZAQ
=Y5Hv
-END PGP SIGNATURE-

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


[android-developers] Cursor that will work with query for 2 tables

2010-07-25 Thread Marc
I have a little program that writes to a SQLite database with 4
tables. When I do a query (either with rawQuery or
SQLiteQueryBuilder.query) the cursor only has column's from the first
table. Does anybody know how to do a query on 2 tables that have been
joined on a key value?

some code

public void onCreate(final SQLiteDatabase database) {
String sqlCreate =
CREATE TABLE IF NOT EXISTS Catch (
+ ID integer primary key 
autoincrement,
+ GPSLON  FLOAT, 
+ GPSLAT  FLOAT, 
+ TimeTIMESTAMP, 
+ BaitID  INTEGER, 
+ RigsID  VARCHAR,
+ FishID  VARCHAR,
+ SyncStatus  INTEGER
+ );;
database.execSQL(sqlCreate);

sqlCreate =
CREATE TABLE IF NOT EXISTS bait (
+BaitID integer primary key 
autoincrement,
+SyncStatus  INTEGER,
+BaitNameVARCHAR unique);;
database.execSQL(sqlCreate);

sqlCreate =
CREATE TABLE IF NOT EXISTS rigs (
+RigsID integer primary key 
autoincrement,
+SyncStatus  INTEGER,
+RigsNameVARCHAR);;

database.execSQL(sqlCreate);

sqlCreate =
CREATE TABLE IF NOT EXISTS fishSpecies 
(
+FishID integer primary key 
autoincrement,
+SyncStatus INTEGER,
+FishName   VARCHAR);;
database.execSQL(sqlCreate);
}



private long addBait(final Catch c) {
long id=-1;
Cursor data = db.query(bait,
null,
BaitName = '+c.baitText+',
null,
null,
null,
BaitName DESC);

if (data!=null) {
if (data.moveToFirst()){
id = data.getInt(0);
}
}
data.close();
if (id==-1){
final ContentValues initialValues = new ContentValues();
initialValues.put(BaitName, c.baitText);
initialValues.put(SyncStatus, c.syncStatus);
id = db.insertOrThrow(bait, null, initialValues);
}
return id;
}

public long addCatch(final Catch c) {
long baitId = addBait(c);

final ContentValues initialValues = new ContentValues();
initialValues.put(GPSLON,c.lon);
initialValues.put(GPSLAT, c.lat);
initialValues.put(Time, c.time.toString());
initialValues.put(BaitID, baitId);
initialValues.put(SyncStatus, c.syncStatus);

final long addedRow = db.insertOrThrow(Catch, null,
initialValues);
return addedRow;
}


   public Cursor getAllMyFish() {
SQLiteQueryBuilder builder = new SQLiteQueryBuilder();
builder.setTables(Catch Bait);
Cursor c = builder.query(db, new String[]{}, null, new 
String[]{},
null, null, null);
return c;
}


It is the cursor that is returned from getAllMyFish() that I want to
have fields from both Catch and Bait but I only get fields from Catch
when I look at the values returned from the cursor's getColumnName()

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] HTTP Live Streaming / playing .M3U8 or .TS files on Android

2010-07-23 Thread Marc Reichelt
Hi!

Does anybody know if and how it is possible to play .M3U8 video
content on Android devices? According to the documentation at
http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/HTTPStreamingArchitecture/HTTPStreamingArchitecture.html#//apple_ref/doc/uid/TP40008332-CH101-SW2
the video files usually contain H264 and AAC content, and both are
supported by Android - but I don't get the samples on
http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html#//apple_ref/doc/uid/TP40008332-CH102-DontLinkElementID_22
to run.

Do you have an idea?

Thanks in advance
Marc Reichelt   ||   http://www.marcreichelt.de/

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

2010-07-21 Thread Marc
Hi.

I'm an Android development newb, and I got a problem with Eclipse. I
tried a few tutorials, but I can't run the tutorial-apps because it
pops up with this error: R cannot be resolved .
I've searched a lot of different fora, where people describes the same
problem, but I just can't fix it.
A lot of people recommend unchecking Build automatically, Cleaning
and rechecking Build automatically, people also suggest that it's a
line that says import R. that causes the problem, but it feels like
I've tried everything and I still can't make it work...

I use this SDK : http://developer.android.com/sdk/index.html
along with 3 different versions of Eclipse, but it's the same error-
message i get in every version.

NB.: I don't have a .classpath file, nor do I have a .project file.
Could that cause the problem ?


Help is greatly appreciated.

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: R cannot be resolved

2010-07-21 Thread Marc
I do have ADT installed and I do have one R.java file, like this Gen --
 App name -- R.java

On 21 Jul., 19:56, Satya Komatineni satya.komatin...@gmail.com
wrote:
 It is a basic question, but let me ask you anyway, do you have the ADT
 installed in Eclipse?

 When you expand the project do you see an R.java in a sub directory
 similar to what is at the following url?

 http://www.satyakomatineni.com/akc/filestorage/satya/documentfiles/32...

 Perhaps, give your directory structure in that project and probably
 the contents of the R.java file.

 Satya Komatinenihttp://www.satyakomatineni.comhttp://www.androidbook.com

 On Tue, Jul 20, 2010 at 6:31 PM, Marc marc.d.pa...@gmail.com wrote:
  Hi.

  I'm an Android development newb, and I got a problem with Eclipse. I
  tried a few tutorials, but I can't run the tutorial-apps because it
  pops up with this error: R cannot be resolved .
  I've searched a lot of different fora, where people describes the same
  problem, but I just can't fix it.
  A lot of people recommend unchecking Build automatically, Cleaning
  and rechecking Build automatically, people also suggest that it's a
  line that says import R. that causes the problem, but it feels like
  I've tried everything and I still can't make it work...

  I use this SDK :http://developer.android.com/sdk/index.html
  along with 3 different versions of Eclipse, but it's the same error-
  message i get in every version.

  NB.: I don't have a .classpath file, nor do I have a .project file.
  Could that cause the problem ?

  Help is greatly appreciated.

  Thanks.

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

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


[android-developers] Re: system lock up and restarts when I start and stop my app.

2010-07-18 Thread Marc
So it seems the problem was memory leaking. I found I was not calling
release() for sound pool, which ultimately solved the problem. But I
may have had other memory leaks as I null'ed out a lot of stuff.

I figured I should post the solution in case someone run in to the
same problem in the future.

On Jul 17, 12:28 am, String sterling.ud...@googlemail.com wrote:
 I had a similar situation with one of my apps, not identical but maybe
 close enough to be of help. I eventually tracked it down to a race
 condition between OpenGL and my own code. I fixed it by adding the
 Java volatile modifier to all variables accessed in the onDrawFrame
 handler.

 I don't know if your game uses OpenGL, but if it does, that's
 something to try.

 String

 On 17 July, 01:49, Marc gobl...@gmail.com wrote:



  I put a copy of the log here:

 http://www.catglo.com/log

  On Jul 16, 5:45 pm, Marc gobl...@gmail.com wrote:

   My device has a standard build. Its a t-mobile G1.

   I am only not using any extras. Just a basic 1.6 app.

   here is my log, I removed the lines which my program spits out.

   07-16 17:39:09.097: INFO/ActivityManager(74): Starting activity:
   Intent { act=android.intent.action.MAIN
   cat=[android.intent.category.LAUNCHER] flg=0x1020
   cmp=com.catglo.beginerflashlightpro/.BeginnerFlashlightPro }
   07-16 17:39:09.218: INFO/ActivityManager(74): Start proc
   com.catglo.beginerflashlightpro for activity
   com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: pid=626
   uid=10034 gids={1015}
   07-16 17:39:09.268: INFO/jdwp(626): received file descriptor 20 from
   ADB
   07-16 17:39:09.768: DEBUG/ddm-heap(626): Got feature list request
   07-16 17:39:11.648: DEBUG/dalvikvm(626): Trying to load lib /system/
   lib/libsoundpool.so 0x0
   07-16 17:39:12.067: DEBUG/dalvikvm(626): Added shared lib /system/lib/
   libsoundpool.so 0x0
   07-16 17:39:19.138: WARN/ActivityManager(74): Launch timeout has
   expired, giving up wake lock!
   07-16 17:39:19.318: DEBUG/dalvikvm(626): GC freed 3074 objects /
   228504 bytes in 3238ms
   07-16 17:39:20.028: WARN/ActivityManager(74): Activity idle timeout
   for HistoryRecord{4350b710
   com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
   07-16 17:39:21.417: INFO/ActivityManager(74): Displayed activity
   com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: 12253 ms
   (total 215427 ms)
   07-16 17:39:24.968: INFO/ActivityManager(74): Starting activity:
   Intent { act=android.intent.action.MAIN
   cat=[android.intent.category.LAUNCHER] flg=0x1020
   cmp=com.catglo.beginerflashlightpro/.BeginnerFlashlightPro }
   07-16 17:39:35.098: WARN/ActivityManager(74): Launch timeout has
   expired, giving up wake lock!
   07-16 17:39:36.228: WARN/ActivityManager(74): Activity idle timeout
   for HistoryRecord{4335a6e8
   com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
   07-16 17:39:44.067: INFO/ActivityManager(74): Displayed activity
   com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: 18190 ms
   (total 18190 ms)
   07-16 17:39:52.088: DEBUG/dalvikvm(137): GC freed 497 objects / 32488
   bytes in 8807ms
   07-16 17:40:05.768: WARN/WindowManager(74): Key dispatching timed out
   sending to com.catglo.beginerflashlightpro/
   com.catglo.beginerflashlightpro.BeginnerFlashlightPro
   07-16 17:40:05.968: WARN/WindowManager(74): Dispatch state:
   {{KeyEvent{action=0 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to
   Window{433fbf20 com.catglo.beginerflashlightpro/
   com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false} @
   1279327200295 lw=Window{433fbf20 com.catglo.beginerflashlightpro/
   com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}
   lb=android.os.binderpr...@4333e578 fin=false gfw=true ed=true tts=0
   wf=false fp=false mcf=Window{433fbf20 com.catglo.beginerflashlightpro/
   com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}}}
   07-16 17:40:05.978: WARN/WindowManager(74): Current state:
   {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to
   Window{433fbf20 com.catglo.beginerflashlightpro/
   com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false} @
   1279327205972 lw=Window{433fbf20 com.catglo.beginerflashlightpro/
   com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}
   lb=android.os.binderpr...@4333e578 fin=false gfw=true ed=true tts=0
   wf=false fp=false mcf=Window{433fbf20 com.catglo.beginerflashlightpro/
   com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}}}
   07-16 17:40:09.158: WARN/ActivityManager(74): Activity pause timeout
   for HistoryRecord{4335a6e8
   com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
   07-16 17:40:16.538: INFO/ActivityManager(74): ANR in process:
   com.catglo.beginerflashlightpro (last in
   com.catglo.beginerflashlightpro)
   07-16 17:40:16.538: INFO/ActivityManager(74): Annotation:
   keyDispatchingTimedOut
   07-16 17:40:16.538: INFO/ActivityManager(74): CPU usage:
   07-16

[android-developers] system lock up and restarts when I start and stop my app.

2010-07-16 Thread Marc
I have this game, which is almost done. It has 1 critical bug. When
the app exits and restarts, the phone goes in to super slow mode and
eventually restarts.

I am at a loss as to how to debug it.

It seems like something is happening to make the program run super
slowly. The 2nd time the program exits it takes a very long time to
exit and when the phone returns to the main screen the program is
almost totally unresponsive. The phone will eventually restart
itself.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: system lock up and restarts when I start and stop my app.

2010-07-16 Thread Marc
Some more information:
  I do not get a restart in the emulator. I can exit and restart the
app in that environment. My phone is a G1.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: system lock up and restarts when I start and stop my app.

2010-07-16 Thread Marc
My device has a standard build. Its a t-mobile G1.

I am only not using any extras. Just a basic 1.6 app.

here is my log, I removed the lines which my program spits out.

07-16 17:39:09.097: INFO/ActivityManager(74): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1020
cmp=com.catglo.beginerflashlightpro/.BeginnerFlashlightPro }
07-16 17:39:09.218: INFO/ActivityManager(74): Start proc
com.catglo.beginerflashlightpro for activity
com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: pid=626
uid=10034 gids={1015}
07-16 17:39:09.268: INFO/jdwp(626): received file descriptor 20 from
ADB
07-16 17:39:09.768: DEBUG/ddm-heap(626): Got feature list request
07-16 17:39:11.648: DEBUG/dalvikvm(626): Trying to load lib /system/
lib/libsoundpool.so 0x0
07-16 17:39:12.067: DEBUG/dalvikvm(626): Added shared lib /system/lib/
libsoundpool.so 0x0
07-16 17:39:19.138: WARN/ActivityManager(74): Launch timeout has
expired, giving up wake lock!
07-16 17:39:19.318: DEBUG/dalvikvm(626): GC freed 3074 objects /
228504 bytes in 3238ms
07-16 17:39:20.028: WARN/ActivityManager(74): Activity idle timeout
for HistoryRecord{4350b710
com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
07-16 17:39:21.417: INFO/ActivityManager(74): Displayed activity
com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: 12253 ms
(total 215427 ms)
07-16 17:39:24.968: INFO/ActivityManager(74): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1020
cmp=com.catglo.beginerflashlightpro/.BeginnerFlashlightPro }
07-16 17:39:35.098: WARN/ActivityManager(74): Launch timeout has
expired, giving up wake lock!
07-16 17:39:36.228: WARN/ActivityManager(74): Activity idle timeout
for HistoryRecord{4335a6e8
com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
07-16 17:39:44.067: INFO/ActivityManager(74): Displayed activity
com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: 18190 ms
(total 18190 ms)
07-16 17:39:52.088: DEBUG/dalvikvm(137): GC freed 497 objects / 32488
bytes in 8807ms
07-16 17:40:05.768: WARN/WindowManager(74): Key dispatching timed out
sending to com.catglo.beginerflashlightpro/
com.catglo.beginerflashlightpro.BeginnerFlashlightPro
07-16 17:40:05.968: WARN/WindowManager(74): Dispatch state:
{{KeyEvent{action=0 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to
Window{433fbf20 com.catglo.beginerflashlightpro/
com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false} @
1279327200295 lw=Window{433fbf20 com.catglo.beginerflashlightpro/
com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}
lb=android.os.binderpr...@4333e578 fin=false gfw=true ed=true tts=0
wf=false fp=false mcf=Window{433fbf20 com.catglo.beginerflashlightpro/
com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}}}
07-16 17:40:05.978: WARN/WindowManager(74): Current state:
{{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to
Window{433fbf20 com.catglo.beginerflashlightpro/
com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false} @
1279327205972 lw=Window{433fbf20 com.catglo.beginerflashlightpro/
com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}
lb=android.os.binderpr...@4333e578 fin=false gfw=true ed=true tts=0
wf=false fp=false mcf=Window{433fbf20 com.catglo.beginerflashlightpro/
com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}}}
07-16 17:40:09.158: WARN/ActivityManager(74): Activity pause timeout
for HistoryRecord{4335a6e8
com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
07-16 17:40:16.538: INFO/ActivityManager(74): ANR in process:
com.catglo.beginerflashlightpro (last in
com.catglo.beginerflashlightpro)
07-16 17:40:16.538: INFO/ActivityManager(74): Annotation:
keyDispatchingTimedOut
07-16 17:40:16.538: INFO/ActivityManager(74): CPU usage:
07-16 17:40:16.538: INFO/ActivityManager(74): Load: 5.89 / 4.66 / 2.36
07-16 17:40:16.538: INFO/ActivityManager(74): CPU usage from 12672ms
to 7421ms ago:
07-16 17:40:16.538: INFO/ActivityManager(74):   system_server: 13% =
1% user + 11% kernel / faults: 759 minor 148 major
07-16 17:40:16.538: INFO/ActivityManager(74):
com.catglo.beginerflashlightpro: 0% = 0% user + 0% kernel / faults:
142 minor 11 major
07-16 17:40:16.538: INFO/ActivityManager(74):   wpa_supplicant: 0% =
0% user + 0% kernel / faults: 78 minor 3 major
07-16 17:40:16.538: INFO/ActivityManager(74): TOTAL: 100% = 1% user +
15% kernel + 83% iowait
07-16 17:40:18.358: INFO/ActivityManager(74): Removing old ANR trace
file from /data/anr/traces.txt
07-16 17:40:18.947: INFO/Process(74): Sending signal. PID: 626 SIG: 3
07-16 17:40:18.988: INFO/dalvikvm(626): threadid=7: reacting to signal
3




On Jul 16, 5:23 pm, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 What does the logcat say? There must be some clue there.

 Are you using anything out of the standard kit in your app?

 What device are you seeing this on?

 Does your device have a standard build 

[android-developers] Re: system lock up and restarts when I start and stop my app.

2010-07-16 Thread Marc
I put a copy of the log here:

http://www.catglo.com/log

On Jul 16, 5:45 pm, Marc gobl...@gmail.com wrote:
 My device has a standard build. Its a t-mobile G1.

 I am only not using any extras. Just a basic 1.6 app.

 here is my log, I removed the lines which my program spits out.

 07-16 17:39:09.097: INFO/ActivityManager(74): Starting activity:
 Intent { act=android.intent.action.MAIN
 cat=[android.intent.category.LAUNCHER] flg=0x1020
 cmp=com.catglo.beginerflashlightpro/.BeginnerFlashlightPro }
 07-16 17:39:09.218: INFO/ActivityManager(74): Start proc
 com.catglo.beginerflashlightpro for activity
 com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: pid=626
 uid=10034 gids={1015}
 07-16 17:39:09.268: INFO/jdwp(626): received file descriptor 20 from
 ADB
 07-16 17:39:09.768: DEBUG/ddm-heap(626): Got feature list request
 07-16 17:39:11.648: DEBUG/dalvikvm(626): Trying to load lib /system/
 lib/libsoundpool.so 0x0
 07-16 17:39:12.067: DEBUG/dalvikvm(626): Added shared lib /system/lib/
 libsoundpool.so 0x0
 07-16 17:39:19.138: WARN/ActivityManager(74): Launch timeout has
 expired, giving up wake lock!
 07-16 17:39:19.318: DEBUG/dalvikvm(626): GC freed 3074 objects /
 228504 bytes in 3238ms
 07-16 17:39:20.028: WARN/ActivityManager(74): Activity idle timeout
 for HistoryRecord{4350b710
 com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
 07-16 17:39:21.417: INFO/ActivityManager(74): Displayed activity
 com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: 12253 ms
 (total 215427 ms)
 07-16 17:39:24.968: INFO/ActivityManager(74): Starting activity:
 Intent { act=android.intent.action.MAIN
 cat=[android.intent.category.LAUNCHER] flg=0x1020
 cmp=com.catglo.beginerflashlightpro/.BeginnerFlashlightPro }
 07-16 17:39:35.098: WARN/ActivityManager(74): Launch timeout has
 expired, giving up wake lock!
 07-16 17:39:36.228: WARN/ActivityManager(74): Activity idle timeout
 for HistoryRecord{4335a6e8
 com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
 07-16 17:39:44.067: INFO/ActivityManager(74): Displayed activity
 com.catglo.beginerflashlightpro/.BeginnerFlashlightPro: 18190 ms
 (total 18190 ms)
 07-16 17:39:52.088: DEBUG/dalvikvm(137): GC freed 497 objects / 32488
 bytes in 8807ms
 07-16 17:40:05.768: WARN/WindowManager(74): Key dispatching timed out
 sending to com.catglo.beginerflashlightpro/
 com.catglo.beginerflashlightpro.BeginnerFlashlightPro
 07-16 17:40:05.968: WARN/WindowManager(74): Dispatch state:
 {{KeyEvent{action=0 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to
 Window{433fbf20 com.catglo.beginerflashlightpro/
 com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false} @
 1279327200295 lw=Window{433fbf20 com.catglo.beginerflashlightpro/
 com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}
 lb=android.os.binderpr...@4333e578 fin=false gfw=true ed=true tts=0
 wf=false fp=false mcf=Window{433fbf20 com.catglo.beginerflashlightpro/
 com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}}}
 07-16 17:40:05.978: WARN/WindowManager(74): Current state:
 {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to
 Window{433fbf20 com.catglo.beginerflashlightpro/
 com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false} @
 1279327205972 lw=Window{433fbf20 com.catglo.beginerflashlightpro/
 com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}
 lb=android.os.binderpr...@4333e578 fin=false gfw=true ed=true tts=0
 wf=false fp=false mcf=Window{433fbf20 com.catglo.beginerflashlightpro/
 com.catglo.beginerflashlightpro.BeginnerFlashlightPro paused=false}}}
 07-16 17:40:09.158: WARN/ActivityManager(74): Activity pause timeout
 for HistoryRecord{4335a6e8
 com.catglo.beginerflashlightpro/.BeginnerFlashlightPro}
 07-16 17:40:16.538: INFO/ActivityManager(74): ANR in process:
 com.catglo.beginerflashlightpro (last in
 com.catglo.beginerflashlightpro)
 07-16 17:40:16.538: INFO/ActivityManager(74): Annotation:
 keyDispatchingTimedOut
 07-16 17:40:16.538: INFO/ActivityManager(74): CPU usage:
 07-16 17:40:16.538: INFO/ActivityManager(74): Load: 5.89 / 4.66 / 2.36
 07-16 17:40:16.538: INFO/ActivityManager(74): CPU usage from 12672ms
 to 7421ms ago:
 07-16 17:40:16.538: INFO/ActivityManager(74):   system_server: 13% =
 1% user + 11% kernel / faults: 759 minor 148 major
 07-16 17:40:16.538: INFO/ActivityManager(74):
 com.catglo.beginerflashlightpro: 0% = 0% user + 0% kernel / faults:
 142 minor 11 major
 07-16 17:40:16.538: INFO/ActivityManager(74):   wpa_supplicant: 0% =
 0% user + 0% kernel / faults: 78 minor 3 major
 07-16 17:40:16.538: INFO/ActivityManager(74): TOTAL: 100% = 1% user +
 15% kernel + 83% iowait
 07-16 17:40:18.358: INFO/ActivityManager(74): Removing old ANR trace
 file from /data/anr/traces.txt
 07-16 17:40:18.947: INFO/Process(74): Sending signal. PID: 626 SIG: 3
 07-16 17:40:18.988: INFO/dalvikvm(626): threadid=7: reacting to signal
 3

 On Jul 16, 5:23 pm, Maps.Huge.Info (Maps API Guru)



 cor...@gmail.com wrote

[android-developers] Placing focusable clickable views in a custom expanded view in the notification bar

2010-06-30 Thread Marc Reichelt
Hi!

Has anyone tried to put Views, e.g. Buttons, into a list item of the
notification bar?
In my opinion this would be really helpful for actions that should be
accessible in a very fast manner, like activating/deactivating WiFi or
the 3G network. In fact I saw something like this implementet on the
Samsung Galaxy S device, and now I am trying to achieve the same for
all devices.

I created a custom Notification using this guide:
http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomExpandedView

Placing two buttons in my own layout was easy. But here is the
problem: The class RemoteViews ( 
http://developer.android.com/reference/android/widget/RemoteViews.html
) has a method called setOnClickPendingIntent(int viewId,
PendingIntent  pendingIntent), but it doesn't seem to work. The
buttons are not focusable nor clickable, only the whole list item as
such is clickable. And when it is clicked the PendingIntent of the
notification is executed, not the PendingIntent of one of my buttons.

Any suggestions?


Regards

Marc Reichelt   ||   http://www.marcreichelt.de/

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

2010-06-08 Thread Marc Poppleton
Hi all,

Browsing in the API I've stumbled upon the DialerFilter widget. Since
I can't find much documentation about how to us it, let alone know
what it does, I tried to use it in a little app just to see what comes
out.
I keep getting a IllegalStateException in the Layout builder about the
DialterFilter needing a child EditText named hint. Looking at the
source of the DialterFilter class I can see that the widget is indeed
waiting for a EditText named hint, but not in my R.class but in the
R.android.internal class. So adding a EditText named id+/hint in my
layout XML file won't solve the problem.
So how can I solve this problem? Would it be that DialterFilter is a
private widget that we can't use but happens to be in the API
documentation?
I'm trying to build a clone of the Sense dialer (keypad at the
bottom part of the screen, filtered contact list at the top part of
the screen) and, according to its name, DialterFilter sounds like what
I'm looking for.

Thanks for you help,

Marc

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

2010-06-02 Thread Marc Lester Tan
Hi everybody,

I just want to ask what is the best way to do processing of preview frame from 
the Camera. Right now, I am doing it like this:

1. I put the byte[] from onPreviewFrame to a queue (limited to 10, for this 
example) until the queue is full.
2. ProcessingThread fetches from this queue for processing
3. ProcessingThread post updates to the UIThread for the result of the 
processing.

Is there other way or pattern to do this kind of scenario? Thanks in advance.

Regards,
Marc

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

2010-05-26 Thread Marc Reichelt
Hi!

Is it possible to add header or footer views to a ListView by just
defining them in the layout XML code? So without having to inflate the
views and call addFooterView() or addHeaderView() manually?


Thanks in advance

Marc Reichelt   ||   http://www.marcreichelt.de/

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


[android-developers] Re: How to make the keyboard to show

2010-05-26 Thread Marc
I have a button that brings up the keyboard

final ImageButton abc = (ImageButton)
numbers.findViewById(R.id.ButtonAbc);
abc.setVisibility(View.VISIBLE);
abc.setBackgroundColor(0);
abc.setOnClickListener(new View.OnClickListener() {
public void onClick(final View v) {
final InputMethodManager mgr = 
(InputMethodManager) ((Activity)
context)

.getSystemService(Context.INPUT_METHOD_SERVICE);
// only will trigger it if no physical keyboard 
is open
mgr.showSoftInput(edit,
InputMethodManager.SHOW_FORCED);// .SHOW_IMPLICIT)
}
});



On May 26, 10:12 am, TreKing treking...@gmail.com wrote:
 On Wed, May 26, 2010 at 2:49 AM, oriharel ori.ha...@gmail.com wrote:
  please help?

 Try setting focus on the EditText - the soft keyboard pops up automatically
 for me doing that. Note however that this may depend on the platform version
 and whether the device has a physical keyboard or not. Not sure.

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

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


[android-developers] Re: How to make the keyboard to show

2010-05-26 Thread Marc
This works for me, I have a button the user presses and the keyboard
pops up.

final ImageButton abc = (ImageButton)
numbers.findViewById(R.id.ButtonAbc);
abc.setOnClickListener(new View.OnClickListener() {
public void onClick(final View v) {
final InputMethodManager mgr = 
(InputMethodManager) ((Activity)
context)

.getSystemService(Context.INPUT_METHOD_SERVICE);
// only will trigger it if no physical keyboard 
is open
mgr.showSoftInput(edit,
InputMethodManager.SHOW_FORCED);// .SHOW_IMPLICIT)
}
});

I think I tried to do it in onCreate but that did not work, it had to
be done after the dialog or window was fully created, but my memory is
a little hazy.


On May 26, 10:12 am, TreKing treking...@gmail.com wrote:
 On Wed, May 26, 2010 at 2:49 AM, oriharel ori.ha...@gmail.com wrote:
  please help?

 Try setting focus on the EditText - the soft keyboard pops up automatically
 for me doing that. Note however that this may depend on the platform version
 and whether the device has a physical keyboard or not. Not sure.

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

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

2010-05-25 Thread Marc Lester Tan
Hi all,

I've just upgraded my SDK to 2.2 and now when trying to export signed
application in Eclipse, I am getting the following exception:

*Message:*
Unhandled event loop exception

*Exception Stack Trace:*
java.lang.NullPointerException
at
com.android.ide.eclipse.adt.internal.project.ProjectChooserHelper$NonLibraryProjectOnlyFilter.accept(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getAndroidProjects(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getAndroidProjects(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.project.ProjectChooserHelper.getAndroidProjects(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.wizards.export.ProjectCheckPage.handleProjectNameChange(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.wizards.export.ProjectCheckPage.access$0(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.wizards.export.ProjectCheckPage$1.modifyText(Unknown
Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1254)
at org.eclipse.swt.widgets.Text.setText(Text.java:1801)
at
com.android.ide.eclipse.adt.internal.wizards.export.ProjectCheckPage.onShow(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard$ExportWizardPage.setVisible(Unknown
Source)
at
org.eclipse.jface.wizard.WizardDialog.showStartingPage(WizardDialog.java:1199)
at
org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:551)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at
com.android.ide.eclipse.adt.internal.wizards.actions.ExportWizardAction.run(Unknown
Source)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3441)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3100)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

*Session Data:*
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product -keyring
/Users/marc/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product
org.eclipse.epp.package.jee.product -keyring /Users/marc/.eclipse_keyring
-showlocation

Anyone experiencing the same problem? Any resolution? Thanks in advance.

Regards,
Marc

-- 
You

[android-developers] Why are some of my apps not being listed for someone using ATT and Motorola Cliq?

2010-05-25 Thread Marc
I have 3 published apps. Yet I recently tried to get someone using a
Motorola Cliq with ATT. They can only find 1 of my apps on the market.
Can anybody suggest a way for me to determine why and get them listed.

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

2010-05-25 Thread Marc Lester Tan
Thanks Xav, you are correct, I have broken projects in the workspace. Fixing
them or closing those projects did the trick.

-Marc

On Wed, May 26, 2010 at 5:54 AM, Xavier Ducrohet x...@android.com wrote:

 Ah thanks for the stack trace. I was trying to reproduce I couldn't,

 Do you have Android projects in your workspace that are broken? (ie
 they don't have a valid target?) That would be a reason for the NPE to
 show up.

 We have fixed the error already. I might look into pushing the fix
 sooner than later.

 Xav

 On Tue, May 25, 2010 at 2:48 PM, TAKEphONE shimo...@gmail.com wrote:
  Same here !
 
  On May 25, 4:40 pm, Marc Lester Tan mail...@gmail.com wrote:
  Hi all,
 
  I've just upgraded my SDK to 2.2 and now when trying to export signed
  application in Eclipse, I am getting the following exception:
 
  *Message:*
  Unhandled event loop exception
 
  *Exception Stack Trace:*
  java.lang.NullPointerException
  at
 
 com.android.ide.eclipse.adt.internal.project.ProjectChooserHelper$NonLibrar
 yProjectOnlyFilter.accept(Unknown
  Source)
  at
 
 com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getAndroidPr
 ojects(Unknown
  Source)
  at
 
 com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getAndroidPr
 ojects(Unknown
  Source)
  at
 
 com.android.ide.eclipse.adt.internal.project.ProjectChooserHelper.getAndroi
 dProjects(Unknown
  Source)
  at
 
 com.android.ide.eclipse.adt.internal.wizards.export.ProjectCheckPage.handle
 ProjectNameChange(Unknown
  Source)
  at
 
 com.android.ide.eclipse.adt.internal.wizards.export.ProjectCheckPage.access
 $0(Unknown
  Source)
  at
 
 com.android.ide.eclipse.adt.internal.wizards.export.ProjectCheckPage$1.modi
 fyText(Unknown
  Source)
  at
 org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
  at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1254)
  at org.eclipse.swt.widgets.Text.setText(Text.java:1801)
  at
 
 com.android.ide.eclipse.adt.internal.wizards.export.ProjectCheckPage.onShow
 (Unknown
  Source)
  at
 
 com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard$ExportWiza
 rdPage.setVisible(Unknown
  Source)
  at
 
 org.eclipse.jface.wizard.WizardDialog.showStartingPage(WizardDialog.java:11
 99)
  at
 
 org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:551)
  at org.eclipse.jface.window.Window.create(Window.java:431)
  at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
  at org.eclipse.jface.window.Window.open(Window.java:790)
  at
 
 com.android.ide.eclipse.adt.internal.wizards.actions.ExportWizardAction.run
 (Unknown
  Source)
  at
 org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
  at
 
 org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Actio
 nContributionItem.java:584)
  at
 
 org.eclipse.jface.action.ActionContributionItem.access$2(ActionContribution
 Item.java:501)
  at
 
 org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContrib
 utionItem.java:411)
  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
  at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
  at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3441)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3100)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
  at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
  at
 
 org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332
 )
  at
 
 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at
 
 org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication
 .java:113)
  at
 
 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java
 :194)
  at
 
 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
 (EclipseAppLauncher.java:110)
  at
 
 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseA
 ppLauncher.java:79)
  at
 
 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368
 )
  at
 
 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179
 )
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method

[android-developers] HTML5 video tag improved support

2010-05-12 Thread Marc-André Moreau
Hi Android developers,

I'm trying to get the HTML5 video tag working on Android 2.1, but I'm a
bit confused about its current level of support. The Android 2.0
highlightshttp://developer.android.com/sdk/android-2.0-highlights.html
say
that Android 2.0 has video tag support in fullscreen mode.. I was able
to get the video to work in very limited conditions, where the Android
browser detects a video element on a page, and allows you to start playing
it in full screen only. That seems to be the only level of support for the
HTML5 video tag so far, which lacks the cool features. I tried various video
players that support the video tag for various platforms, but they all don't
work with the Android browser, because it looks like the browser just
launches the video independently of the browser, with no communication
between the browser and the player, such that you can't seek or retrieve the
current time from the browser properly. html5video.org has a page where it
puts links to various players supporting the video tag:

http://www.html5video.org/demos/

Otherwise here is another very good player supporting the video tag that can
be used for testing purposes:

http://camendesign.com/code/video_for_everybody/test.html

While Chrome appears to have very good HTML5 support, the Android browser
seems to be quite behind. Is improved HTML5 video tag support planned for
the next release of Android? Is anybody currently working on improving it?

Thanks,

- Marc-Andre Moreau

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

2010-04-27 Thread Marc Poppleton
Hello,

Is there a way of being notified when a TransitionDrawable has
finished its transition?
I'm looking for a way to animate the background of a LinearLayout,
switching it back and forth between two images thus creating a
pulsating effect. TransitionDrawable works nicely, butonce. I
tried stacking several 'item' in the XML defining the transition, but
no luck. It justs fades from item 1 to item 2 and sits there.
I'm wondering if I shouldn't implement a custom Animation.

Any ideas?

Thanks :)

FYI : target platform is 1.5

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

2010-04-27 Thread Marc Poppleton
Thanks, I'll see what I can do with a custom Drawable.

On 27 avr, 12:53, skink psk...@gmail.com wrote:
 Marc Poppleton wrote:
  Hello,

  Is there a way of being notified when a TransitionDrawable has
  finished its transition?
  I'm looking for a way to animate the background of a LinearLayout,
  switching it back and forth between two images thus creating a
  pulsating effect. TransitionDrawable works nicely, butonce. I
  tried stacking several 'item' in the XML defining the transition, but
  no luck. It justs fades from item 1 to item 2 and sits there.

 yes, TransitionDrawable fades in/out two Drawables and you cannot make
 it work in repeat mode

  I'm wondering if I shouldn't implement a custom Animation.

 i would implement custom Drawable instead



  Any ideas?

  Thanks :)

  FYI : target platform is 1.5

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: memory problem with image... but strange...

2010-04-15 Thread Marc Reichelt
Hi Kofa,

I guess you have a memory leak here. Please make sure that all your
data is cleaned up, i.e. no hard references are left.
Try to call the GC manually and see how much it cleans up.

Tip: Override the finalize() method of your activity and print out a
log message there to see if the activity really is cleaned up later.

Regards
Marc Reichelt   ||   http://www.marcreichelt.de/

On 15 Apr., 16:51, Kofa elk...@gmail.com wrote:
 Hi, I have some headache with an error about the system going out of
 memory.
 When I run the game fo first time there's no problem, but when i quit -
 with finish();- and then start the app again, it gives me an error.

 The LogCat error says:

 VM won't let us allocate 5529600 bytes
 
 Caused by: android.view.InflateException: Binary XML file line #14:
 Error inflating class java.lang.reflect.Constructor
 
 Caused by: java.lang.reflect.InvocationTargetException
 
 Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget.

 it's strange because if I finish the activity and start it again
 without exiting the app then it's everything OKbut when i finish
 the app and push the button to load that activity... it crashes with
 this error and come back to the main menu... please any help will help
 =P. thx 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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: How to switch between views following a finger ?

2010-04-15 Thread Marc
I used this tutorial
http://whyandroid.com/android/174-flipping-your-views.html


On Apr 15, 1:19 am, Julien Del Rio julien.del...@gmail.com wrote:
 Hi,

 I can't find a tutorial on Google for my problem. I'm french and i
 don't find the best google keywords for to describe my goal. I
 decided to ask the question here.

 I want to do an animation between views like on the Home or on the
 Calendar in week mode.
 I want the switch between the views follows the finger. As I have not
 released the pressure, I see a part of the current view an a part of
 the next view.

 Currently, I use a AnimatorView and 2 gestures. But the change happens
 when the pressure is released, and it's not good.

 Can someone explain to me how to do or where to find a tutorial that
 explain?
 Thank you,

 ps : please, don't laugh about my english, it's worst when I speak
 with my very french accent :P

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

2010-04-05 Thread Marc
I used to be a C/C++ programmer before getting in to android. I am not
sure how people maintain 2 versions of a program without using #ifdef
preprocessor macros. Right now I am changing the package name in
eclipse and changing the code manually, but this seems really
inefficient. Can anybody suggest a good way of having 2 or more
projects that share most of the code?

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: Ads in apps... How to successfully generate a larger revenue?

2010-03-31 Thread Marc Lester Tan
Yeah that is true. I have an app that's ~15k active installs and is gaining
$20/day while my other apps where active installs are  20k are just gaining
~ $1 a day. It really depends whether your users are actually using your
application very often.

marc

On Thu, Apr 1, 2010 at 5:23 AM, Greg Donald gdon...@gmail.com wrote:

 On Wed, Mar 31, 2010 at 3:15 PM, Abdul Mateen abmat...@gmail.com wrote:
  I said, if Moto having a 60K earning $150, why should not I earn $10/day
  with 10k install base?

 Because there are many other variables you probably aren't
 considering.. ones such as quality of the app/game, placement of the
 ads, content of the ad, fill rates, etc.  I seriously doubt you will
 find a definitive correlation between any two apps with regards to ad
 revenue.  Some of my free apps make more than my paid ones (exact same
 apps just with and without ads), and vice versa.

 I seriously doubt 60K users make anyone $150/day, especially using
 AdMob.  I've been using them for about 6 months now, so I'd have to
 see it to believe it.


 --
 Greg Donald
 destiney.com | gregdonald.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.comandroid-developers%2bunsubscr...@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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: GLSurfaceView and camera surface

2010-03-25 Thread Marc Lester Tan
You can try this one:
Camera image as an OpenGL texture on top of the native camera viewfinder
http://nhenze.net/?p=172

Marc
http://nhenze.net/?p=172

On Fri, Mar 26, 2010 at 11:22 AM, sleith raysle...@gmail.com wrote:

 Hi, thanks for your response.
 how do i give different z index?
 isn't it automatically when we call add() ?
 so i attach alParent.addView(mCameraView);  first and then
 alParent.addView(view);
 so isn't it means mCameraView at index 0, and view at index 1?
 but still i cannot see the opengl object, only camera preview

 when i change   alParent.addView(view);  first and then
 alParent.addView(mCameraView);
 i see the opengl object only...

 On Mar 25, 1:29 pm, rollbak roll...@gmail.com wrote:
  Hello,
 
  If you want one on top of the other you must use a FrameLayout and
  then give different z index to each when adding them as childs.
 
  regards,
 
  Lucas
 
  On Mar 25, 3:07 am, sleith raysle...@gmail.com wrote:
 
   Hi,
   i tried to have a GLSurfaceView on top of camera surface, so that i
   can draw gl objects with camera preview as background.
   I tried but didn't works. the view i has is something like this:
 
  
 
   AbsoluteLayout alParent = new AbsoluteLayout(this);
   alParent.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
   LayoutParams.FILL_PARENT));
 
   //CameraView extends SurfaceView implements SurfaceHolder.Callback
   mCameraView = new CameraView(this);
   mCameraView.setLayoutParams(new AbsoluteLayout.LayoutParams(
  
 AbsoluteLayout.LayoutParams.FILL_PARENT,
  
 AbsoluteLayout.LayoutParams.FILL_PARENT, 0, 0));
   alParent.addView(mCameraView);
 
   //GLView extends GLSurfaceView
   view = new GLView(this);
   view.setLayoutParams(new AbsoluteLayout.LayoutParams(
  
 AbsoluteLayout.LayoutParams.FILL_PARENT,
  
 AbsoluteLayout.LayoutParams.FILL_PARENT, 0, 0));
   alParent.addView(view);
  
 
 
   it resulting the camera preview only, the opengl is not drawn. ( i
   made sure without camera, the opengl draws cube).
   Anyone have experienced this kind of situation?
   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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Marc
I was recently was doing some file io stuff and discovered that when
debugging the application gets killed in a more drastic way than is
not possible on the phone. What I found is that if a debug session is
started during a file io write the data file gets corrupted. On the
phone you have to pull out the battery which just does not happen that
often.


On Mar 19, 7:48 pm, Matt (preinvent) m...@preinvent.com wrote:
 Well there it is:

 03-19 22:43:02.624: ERROR/AndroidRuntime(2002): Caused by:
 android.database.sqlite.SQLiteDatabaseCorruptException: database disk
 image is malformed
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.AbstractCursor.moveToPosition(AbstractCursor.java:
 171)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)

 Great.  Guess I'll be looking for another storage solution :(

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: MediaPlayer failures on Android 2.1?

2010-03-16 Thread Marc Reichelt
Hi Mark,

thanks for your answer! It really is helpful.
I tried to reproduce the problem by creating an MP3 file on my own,
but the problem did not occur again. So I used my original testfile
and filed a bug:
http://code.google.com/p/android/issues/detail?id=7186


Regards

Marc Reichelt   ||   http://www.marcreichelt.de/

On 16 Mrz., 00:31, Mark Murphy mmur...@commonsware.com wrote:
 Marc Reichelt wrote:
  No idea, anyone? This problem really is severe - if I can't fix this
  all new devices like Nexus One, HTC Desire, Motorola Milestone etc.
  will be affected...   :-(

 Well, I can tell you that I can replicate your problem with your test
 MP3 file, even hosted from my Web server. I can replicate the problem on
 the Motorola DROID (Android 2.0.1) as well. And network speed doesn't
 seem to have an impact -- mine fails with a fairly snappy connection.

 OTOH, these Librivox poetry MP3 files work fine, and they are all
 shorter than your test file:

 http://www.archive.org/download/song_librivox/song_donne_mac_64kb.mp3http://www.archive.org/download/sonnet_23_librivox/sonnet_23_shakespe...http://www.archive.org/download/cow_stevenson3/cow_stevenson_ol_64kb.mp3

 So, file length is not the determining factor. In fact, I have not
 gotten a failure on anything other than your test file.

 So, while there certainly is a bug -- MediaPlayer shouldn't just quietly
 fail -- I do not think it is as widespread as you fear.

 If you can find a couple of legally-distributable files that exhibit the
 problem, package them and a sample project up and file an issue 
 onhttp://b.android.com.

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

 Android Online Training: 26-30 April 2010:http://onlc.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] 3D Physics Engine For Android Demo

2010-03-15 Thread Marc Lester Tan
Works well on my Nexus One. Cool!

On Mon, Mar 15, 2010 at 10:25 PM, Kevin S. dada...@gmail.com wrote:

   I've completed my first Android application.   It as 3D demo with a
 physics engine.   It uses the phone's accelerometer so that you can
 shake the world by moving the phone around.   There are  options to
 adjust things like gravity, friction, and elasticity.

  The physics engine is a 100% Java port of the open source JigLib
 physics engine.

  However, I only have a Motorola Droid, and I don't know if it will
 work on any other phone.   The project is set to use Android 1.6.

  Before I put it in the market, I was hoping to get some feedback
 from the developer community here.

  If anybody is interested in 3D stuff or physics simulation, you can
 give the app a try.   The link is on the follow page.   There is a
 screen shot there so you can get an idea of what the app is.


 http://www.pieintheskysoftware.com/menuitem-resources-pie-3d-physics-1-0.html

 -Kevin

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] MediaPlayer failures on Android 2.1?

2010-03-15 Thread Marc Reichelt
Hi there!

I developed an audioplayer for Android for our new project which plays
local and online files. It works great on the G1, but somehow often
fails on the Nexus One when streaming MP3s from the Internet -
especially smaller files.

The problem is that I am using the prepareAsync() method and an
OnPreparedListener but somehow onPrepared() is not called sometimes -
especially when the network is slow. So I am creating a MediaPlayer
object, set the OnPreparedListener, call setDataSource() with an URL
in it and call prepareAsync() - but onPrepared() is not called,
leaving the MediaPlayer in the completely useless transient state
Preparing. And there seems to be no way to catch this failure.

This is the code I used to track down this error:

--- file: TestMediaPlayer.java ---
package de.marcreichelt.android.testmediaplayer;

import android.app.Activity;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnPreparedListener;
import android.os.Bundle;
import android.util.Log;

public class TestMediaPlayer extends Activity implements
OnPreparedListener {

private static final String TAG =
TestMediaPlayer.class.getSimpleName();

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

MediaPlayer mp = new MediaPlayer();
mp.setOnPreparedListener(this);

try {

// Music from World of Goo Soundtrack
// see http://kylegabler.com/WorldOfGooSoundtrack/ :-)

Log.d(TAG, mp.setDataSource());

mp.setDataSource(http://marcreichelt.de/misc/android/test.mp3;);
Log.d(TAG, mp.prepareAsync());
mp.prepareAsync();

} catch (Exception e) {
Log.e(TAG, , e);
}

}

@Override
public void onPrepared(MediaPlayer mp) {
Log.d(TAG, mp.start());
mp.start();
}

}
--- end of file ---

To test this code I created a new AVD with Google 7 API / Android 2.1
and set the Emulator speed to GPRS (important!). I use the Android
1.6 SDK for compiling my project and minSdkVersion is 4.

This is what I get in Logcat:
03-15 20:31:21.354: INFO/ActivityManager(63): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1020
cmp=de.marcreichelt.android.testmediaplayer/.TestMediaPlayer
bnds=[125,446][235,564] }
03-15 20:31:21.424: DEBUG/TestMediaPlayer(213): mp.setDataSource()
03-15 20:31:21.563: DEBUG/TestMediaPlayer(213): mp.prepareAsync()
03-15 20:31:21.839: INFO/ActivityManager(63): Displayed activity
de.marcreichelt.android.testmediaplayer/.TestMediaPlayer: 440 ms
(total 440 ms)
03-15 20:31:21.946: INFO/PlayerDriver(31): buffering (1)

The method onPrepared() is not called, so I am not able to call
start() on the MediaPlayer object.


Can anyone confirm this problem? Is this a bug in the Android 2.1 SDK
(or maybe 2.0.1, too)? And what can I do to solve this?


Thanks in advance  regards
Marc Reichelt   ||   http://www.marcreichelt.de/

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

2010-03-15 Thread Marc Reichelt
No idea, anyone? This problem really is severe - if I can't fix this
all new devices like Nexus One, HTC Desire, Motorola Milestone etc.
will be affected...   :-(


Regards
Marc Reichelt   ||   http://www.marcreichelt.de/

On 15 Mrz., 20:55, Marc Reichelt mcreich...@googlemail.com wrote:
 Hi there!

 I developed an audioplayer for Android for our new project which plays
 local and online files. It works great on the G1, but somehow often
 fails on the Nexus One when streaming MP3s from the Internet -
 especially smaller files.

 The problem is that I am using the prepareAsync() method and an
 OnPreparedListener but somehow onPrepared() is not called sometimes -
 especially when the network is slow. So I am creating a MediaPlayer
 object, set the OnPreparedListener, call setDataSource() with an URL
 in it and call prepareAsync() - but onPrepared() is not called,
 leaving the MediaPlayer in the completely useless transient state
 Preparing. And there seems to be no way to catch this failure.

 This is the code I used to track down this error:

 --- file: TestMediaPlayer.java ---
 package de.marcreichelt.android.testmediaplayer;

 import android.app.Activity;
 import android.media.MediaPlayer;
 import android.media.MediaPlayer.OnPreparedListener;
 import android.os.Bundle;
 import android.util.Log;

 public class TestMediaPlayer extends Activity implements
 OnPreparedListener {

         private static final String TAG =
 TestMediaPlayer.class.getSimpleName();

         @Override
         public void onCreate(Bundle savedInstanceState) {
                 super.onCreate(savedInstanceState);
                 setContentView(R.layout.main);

                 MediaPlayer mp = new MediaPlayer();
                 mp.setOnPreparedListener(this);

                 try {

                         // Music from World of Goo Soundtrack
                         // seehttp://kylegabler.com/WorldOfGooSoundtrack/:-)

                         Log.d(TAG, mp.setDataSource());
                         
 mp.setDataSource(http://marcreichelt.de/misc/android/test.mp3;);
                         Log.d(TAG, mp.prepareAsync());
                         mp.prepareAsync();

                 } catch (Exception e) {
                         Log.e(TAG, , e);
                 }

         }

         @Override
         public void onPrepared(MediaPlayer mp) {
                 Log.d(TAG, mp.start());
                 mp.start();
         }

 }

 --- end of file ---

 To test this code I created a new AVD with Google 7 API / Android 2.1
 and set the Emulator speed to GPRS (important!). I use the Android
 1.6 SDK for compiling my project and minSdkVersion is 4.

 This is what I get in Logcat:
 03-15 20:31:21.354: INFO/ActivityManager(63): Starting activity:
 Intent { act=android.intent.action.MAIN
 cat=[android.intent.category.LAUNCHER] flg=0x1020
 cmp=de.marcreichelt.android.testmediaplayer/.TestMediaPlayer
 bnds=[125,446][235,564] }
 03-15 20:31:21.424: DEBUG/TestMediaPlayer(213): mp.setDataSource()
 03-15 20:31:21.563: DEBUG/TestMediaPlayer(213): mp.prepareAsync()
 03-15 20:31:21.839: INFO/ActivityManager(63): Displayed activity
 de.marcreichelt.android.testmediaplayer/.TestMediaPlayer: 440 ms
 (total 440 ms)
 03-15 20:31:21.946: INFO/PlayerDriver(31): buffering (1)

 The method onPrepared() is not called, so I am not able to call
 start() on the MediaPlayer object.

 Can anyone confirm this problem? Is this a bug in the Android 2.1 SDK
 (or maybe 2.0.1, too)? And what can I do to solve this?

 Thanks in advance  regards
 Marc Reichelt   ||  http://www.marcreichelt.de/

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