[android-developers] Re: Android Database

2010-02-26 Thread skink


On Feb 25, 8:24 pm, Mark Murphy mmur...@commonsware.com wrote:
 Julian wrote:
  I am trying to create an application that reads information from a
  database on a separate server(not the android phone).  Does anyone
  have any information on how to create a database connector class?

 Write a Web service that connects to the database and runs on some
 server, then access the Web service from the phone. I recommend
 REST-style APIs, since Android does not have built-in support for SOAP
 or XML-RPC.


for the latter, one can use very thin client 
http://code.google.com/p/android-xmlrpc/

pskink

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


[android-developers] Re: Disable Home Key?

2010-02-26 Thread DroidBy
Hi Sean Hodges,

I am happy that you give me a clue on this, however I am not able to
open the link that you post, it will redirect me to a blank webpage.
Can you repaste the link? or the main link that I can browse into the
sub-pages of this?

Btw, Do you have any idea on the KeyGuardManager? Can I use that to
disable the HOME key?

Thanks. :)


On Feb 26, 2:44 am, Sean Hodges seanhodge...@googlemail.com wrote:
 On Thu, Feb 25, 2010 at 1:39 AM, DroidBy meikeng@gmail.com wrote:

 I am doing a security Lock system for my project. I am interested to

  know how to disable the HOME key or handle it at framework layer, in
  order to prevent user to by pass the security lock by presing HOME. I
  know that I am not able to do it at android application layer, so
  thinking to get some tips in handling it in framework layer.

 Have you taken a look at the existing projects out there?

 MyLock seems to achieve this using a lock mediator, to intercept a
 forbidden action and react to it:

 http://www.google.com/codesearch/p?hl=en#zvQ8rp58BUs/trunk/myLock/src...

 Can't say I've tried anything like this before though.

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

2010-02-26 Thread Shekhar
Hi Mark,

Could you please provide some pointers on how to implement listener
object for the service.

Regards,
Shekhar


On Feb 16, 11:25 pm, Mark Murphy mmur...@commonsware.com wrote:
 Shekharwrote:
  Now the service running in the background has to pass data to the
  activity continously for UI updates.For this I have
  written the following code

  Intent intent = new Intent(Service.this, Activity.class);
  intent.putExtra(Data, data);
  intent.setAction(Intent.ACTION_ATTACH_DATA);
  sendBroadcast(intent,null); (Do I need to broadcast the intent???)

  In activity I have done following things:-
  Implemented broadcast reciever:

  private BroadcastReceiver mBroadcastReceiver = new
  BroadcastReceiver()
  {
  @Override
  public void onReceive(Context context, Intent intent)
  {
  if (Intent.ACTION_ATTACH_DATA.equals(intent.getAction()))
  {
  Bundle extra = intent.getExtras();
  float Data[] = extra.getFloatArray(Data);
  update(Data);
  }
  }
  }

  Also registered the broadcast reciever in the OnStart function as
  below:-

  public void onStart()
  {
  super.onStart();
  IntentFilter filter = new IntentFilter();
  filter.addAction(Intent.ACTION_ATTACH_DATA);
  registerReceiver(mBroadcastReceiver, null);
  }

  Is this the right way of meeting my requirements.

 It's certainly one way. An alternative is to have the activity register
 some sort of callback or listener object with the service, that the
 service uses when events need to be propagated to the activity. That
 will be more efficient and more private than your implementation, but it
 involves a bit more code, usually.

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

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

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


[android-developers] where to store files?

2010-02-26 Thread kavitha
Hi All,

I am in confusion,where to store my data files.

Which is convenient?

1.sdcard
2.cache of context
3.data folder of package

Thanks
Kavitha

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

2010-02-26 Thread Sean Hodges
On Fri, Feb 26, 2010 at 8:17 AM, DroidBy meikeng@gmail.com wrote:
 I am happy that you give me a clue on this, however I am not able to
 open the link that you post, it will redirect me to a blank webpage.
 Can you repaste the link? or the main link that I can browse into the
 sub-pages of this?

Strange, the link works for me. I linked to a formatted page on the
Google Code site, but if the link isn't working for you, try viewing
the file directly:

http://mylockforandroid.googlecode.com/svn/trunk/myLock/src/i4nc4mp/myLock/LiteLockMediator.java

 Btw, Do you have any idea on the KeyGuardManager? Can I use that to
 disable the HOME key?

Sorry, I have no idea. I'm not familiar with the key guard stuff. Take
a look at some of the other screen locking code out there, there are
quite a few projects on Sourceforge and Google 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


[android-developers] Re: Contacts FAQ?

2010-02-26 Thread sazilla
Hi Berto,

do you managed to render the contacts edit fields from a custom
account using the native contacts app? or for contacts view only?

thanks
Carlo

On 25 Gen, 17:25, Berto mstbe...@gmail.com wrote:
 Just an update for those of you still lost on adding custom accounts,
 sync adapters, etc.  I found a great article here:

 http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-2/

 Part 2 was the part I needed (how to render the information you synced
 to a contact).

 HTH,

 Berto

 On Jan 22, 4:57 pm, Berto mstbe...@gmail.com wrote:



  So, it turns out that anything you put into your own ExternalSource
  will never get parsed and therefore (theoretically) never show up.  Or
  am I doing something wrong?  The code looks like it will parse only
  the information in ContactsDataKind and not the EditField node from
  the following:

  ContactsSource xmlns:android=http://schemas.android.com/apk/res/
  android
      ContactsDataKind
          android:mimeType=com.example.mimetype
          android:icon=@drawable/icon
          android:summaryColumn=data2
          android:detailColumn=data3
          EditField column=data1 title=@string/sample_string /
      /ContactsDataKind
  /ContactsSource

  Essentially, I have adding an account and the sync adapter working.
  But when I try to create a new contact through the contacts app, I can
  never see any of the fields I added in the XML structure defined by
  meta-data android:name=android.provider.CONTACTS_STRUCTURE
  android:resource=@xml/contacts /.  Has anyone figured out an
  answer to this problem yet?  I've seen a few posts, but nothing with a
  solid answer.

  On Jan 12, 4:45 am, Jens dunkingbikk...@gmail.com wrote:

   You could check the Email app - its the current location of the
   Exchange ActiveSync SyncAdapter implementation.

  http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=s...

   Note that this adapter isn't the complete story as any contacts you
   create with your custom accounts will be next to useless without
   looking into the wonky ExternalSource.java integration required for
   custom adapters (unless your happy with contacts that only contains a
   name and photo).

  http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;...

   Sources.java contains the super-special-let's-not-use-our-own-API:s-
   because-that's-hard-work-and-might-require-us-to-actually-document-
   anything-or-heaven-forbid-test-it if-statement that determines the
   layout of your contacts in the Contacts app - and gives super-special
   treatment to accounts with the type com.google or
   com.android.exchange.

   ExternalSource.java contains the sparse and incomplete API
   documentation that you're going to have to use.

   On 9 Jan, 22:16, joebowbeer joe.bowb...@gmail.com wrote:

On Dec 10 2009, 7:03 am, ydario mc6...@mclink.it wrote:

 I tried addingcontactscode to this project

http://code.google.com/p/androidaccounts/

The referenced project no longer exists. Are there any similar
projects to check out? If not, could someone who has a handle on this
start anewproject?

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

2010-02-26 Thread zhangjun
you can check code in PhoneWindowManager.java, you can disable launch
Home function when your lock show same as keyguard show


On Fri, 2010-02-26 at 00:17 -0800, DroidBy wrote:

 Hi Sean Hodges,
 
 I am happy that you give me a clue on this, however I am not able to
 open the link that you post, it will redirect me to a blank webpage.
 Can you repaste the link? or the main link that I can browse into the
 sub-pages of this?
 
 Btw, Do you have any idea on the KeyGuardManager? Can I use that to
 disable the HOME key?
 
 Thanks. :)
 
 
 On Feb 26, 2:44 am, Sean Hodges seanhodge...@googlemail.com wrote:
  On Thu, Feb 25, 2010 at 1:39 AM, DroidBy meikeng@gmail.com wrote:
 
  I am doing a security Lock system for my project. I am interested to
 
   know how to disable the HOME key or handle it at framework layer, in
   order to prevent user to by pass the security lock by presing HOME. I
   know that I am not able to do it at android application layer, so
   thinking to get some tips in handling it in framework layer.
 
  Have you taken a look at the existing projects out there?
 
  MyLock seems to achieve this using a lock mediator, to intercept a
  forbidden action and react to it:
 
  http://www.google.com/codesearch/p?hl=en#zvQ8rp58BUs/trunk/myLock/src...
 
  Can't say I've tried anything like this before though.
 

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

[android-developers] Unexpected MEDIA_BUTTON action broadcasting when unplugging headset

2010-02-26 Thread Urakagi
I'm writing music app, and find a confusing issue about headset
buttons.
My app has a BroadcastReceiver class to receive headset button
controls, with

action android:name=android.intent.action.MEDIA_BUTTON/

as intent filter.

The problem is, when I unplug a wired headset slowly, sometimes
Android will broadcast MEDIA_BUTTON intents with
KeyEvent.KEYCODE_HEADSETHOOK. It equals to a normal play/pause button
pressing, so my app starts playing automatically.
But the default Music app does not come up, and I can't find anything
checking or preventing this in the Android source code.
Anyone have idea about how to avoid this? Thank you very much!

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

2010-02-26 Thread Neha
Hi,

Does anyone have any updates on this issue? I'm facing the same
problem with my activity when launchMode=singleTask.
 - Launcher - Activity A (singleTask) - Activity B (standard)
 - Press HOME
 - Long-press HOME or go to Launcher
 - Activity A (B's onDestroy called)

adb shell dumpsys activity shows only Activity A in the stack for
this task. The intent flags are:
Long press HOME - FLAG_ACTIVITY_NEW_TASK,
FLAG_ACTIVITY_BROUGHT_TO_FRONT and FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
Launcher - FLAG_ACTIVITY_NEW_TASK, FLAG_ACTIVITY_BROUGHT_TO_FRONT and
FLAG_ACTIVITY_RESET_TASK_IF_NEEDED

Any pointers on how to fix this would be helpful.
Thanks!

On Feb 17, 10:41 pm, Dianne Hackborn hack...@android.com wrote:
 When you say launch do you mean launching from Eclipse?  If so, there is a
 bug in older SDKs where this would use the wrong intent so when you later
 launch it from the launcher you would get a new task.

 You can use adb shell dumpsys activity to see the current state of the
 activity stack at whatever point you want to help diagnose what is going on.



 On Thu, Mar 26, 2009 at 8:55 AM, jseghers jsegh...@cequint.com wrote:

  The code that starts the .About activity is:
     protected void startAbout()
     {
         Intent aIntent = new Intent(this, About.class);
         startActivity(aIntent);
     }

  The Manifest entries for .UserLaunch and .About are in my original
  post.
  The intent that returns the task to the front is generated by the
  Launcher.

  What flags do I need to set (and where) to prevent this from
  happening? Is one of the default values causing it?

  My test case here is:
  1) launch .UserLaunch from the launcher
  2) start .About
  3) hit Home key
  4) launch .UserLuanch from the launcher

  There are no long delays in any of this, so the 30 minute auto-clear
  should not be invoked.

  - John

  On Mar 25, 12:15 pm, Dianne Hackborn hack...@android.com wrote:
   That means you are using some CLEAR_TOP or finish flag in an intent or in
   the manifest.  Or possibly it has been  30 minutes since the app was
  last
   launched, in which case the system will restart it automatically.

   On Wed, Mar 25, 2009 at 11:12 AM, jseghers jsegh...@cequint.com wrote:

Thank you for your reply!

I am seeing am_task_to_front followed by am_finish_activity.
I found the event-log-tags file and apparently the reason is clear.
What is not clear to me though is why the activity manager thinks it
should clear the the task.

The relevant lines of the log are:
I/am_on_resume_called(   94): com.android.launcher.Launcher
I/dvm_gc_info(   94):
[7017575181485176104,-9053780441931634733,-4010030953047537782,8554533]
I/force_gc(  209): bg
I/dvm_gc_info(  209):
[7163384747111232651,-9098816781953771608,-4017912252395432053,7919391]
I/am_pause_activity(   52):
[1128800640,com.android.launcher/.Launcher]
I/am_task_to_front(   52): 3
I/am_finish_activity(   52):
[1129575992,3,com.cequint.cityid/.About,clear]
I/am_destroy_activity(   52): [1129575992,3,com.cequint.cityid/.About]
I/am_new_intent(   52):

  [112951,3,com.cequint.cityid/.UserLaunch,android.intent.action.MAIN,,,
274726912]
I/am_on_paused_called(   94): com.android.launcher.Launcher
I/am_resume_activity(   52):
[1129749080,3,com.cequint.cityid/.UserLaunch]
I/am_on_resume_called(  209): com.cequint.cityid.UserLaunch
I/dvm_gc_madvise_info(   94): [290816,245760]
I/dvm_gc_madvise_info(  209): [352256,241664]
I/force_gc(   94): bg

- John
On Mar 25, 10:16 am, Dianne Hackborn hack...@android.com wrote:
 You can do adb logcat -b events to see the event log which will
  include
a
 line the activity manager prints when finishing an activity, with the
reason
 why it is doing it.

 On Tue, Mar 24, 2009 at 7:24 PM, jseghers jsegh...@cequint.com
  wrote:

  I am just starting on an Android app and I am puzzled about why my
  Task activity stack is being reset any time the application is
  launched from the Home screen.

  I used the ADT tools to create the application in Eclipse.
  The main activity is .UserLaunch and it starts the activity
  .About
  when the user presses a button.
  If the user then presses HOME and then relaunches the app,
  .UserLaunch
  is displayed and is the only thing on the stack.

  .UserLaunch has the launchMode singleTask. .About is standard.
  According to the documentation at
 http://developer.android.com/guide/topics/fundamentals.html#lmodes:

     However, a singleTask activity may or may not have other
  activities above it in the stack. If it does, it is not in position
  to
  handle the intent, and the intent is dropped. (Even though the
  intent
  is dropped, its arrival would have caused the task to come to the
  foreground, where it would remain.) 

  The Task stack should be brought to the foreground and 

[android-developers] Re: AudioTrack.getPlaybackHeadPosi tion() is buggy????

2010-02-26 Thread blindfold
 thanks, though therein i didnt find anything about
 getPlaybackHeadPosition() 

Then you missed my posts 12 and 13 in that thread,

http://groups.google.com/group/android-developers/tree/browse_frm/thread/56ab381d56069436/a3905a29d60466f6?rnum=11lnk=nl

as well as my bug report

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

Regards

On Feb 26, 12:33 am, HeHe cnm...@gmail.com wrote:
 thanks, though therein i didnt find anything about
 getPlaybackHeadPosition() 

 i just cannot believe that a simple function like
 getPlaybackHeadPosition() can go wrong.

 anyone has getPlaybackHeadPosition() work with pause()?

 On Feb 25, 12:38 am, blindfold seeingwithso...@gmail.com wrote:

  See the earlier 
  threadhttp://groups.google.com/group/android-developers/browse_frm/thread/5...

  I did not get useful results from trying to get the current playing
  position and gave up on it. I do not know if Android 2.1 is any better
  here.

  On Feb 25, 1:12 am, HeHe cnm...@gmail.com wrote:

   folks,

   does anybody use AudioTrack.getPlaybackHeadPosition()?
   i found that, if i call AudioTrack.pause() in the middle of playing
   audio frames, at end of playback getPlaybackHeadPosition() always
   returns hundreds of frames less than the number of frames fed into
   the
   AudioTrack object .

   did anybody also run into the same issue?

   if you did, how did you work around this unexpected behavior?

   thank u~



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

2010-02-26 Thread Anthoni
On Feb 26, 7:43 am, ko5tik kpriblo...@yahoo.com wrote:
 Backdating the Phone would be major PITA , and surely screw up
 all the calendar and synchronization stuff. Is the app in question as
 expensive to mandate this PITA?

Some people would just to avoid paying for it. But like has been
mentioned before, these NEVER would be customers anyway, so.

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


[android-developers] How to customize onscreen keyboard? Please help!

2010-02-26 Thread EvgenyV
Hi All!

I need to hide all keys except numbers, point and dash and change the
dash behaviour.

Unfortunately attribute android:inputType=number|numberSigned|
numberDecimal doesn't hide @, #, $ etc. keys.

How can I customize the soft keyboard view? I actually need to show
and react to my custom view. What is is the fast and right way to
implement it?

Please advise some example or code snippets helps to move forward.

Thanks in advance,
Evgeny

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

2010-02-26 Thread zhangjun
no priority in Activity and Task now, so i guess no solution for your
requirement :(
maybe google can design it in future, but it is difficult for
Application to implement high priority Activity or services


On Thu, 2010-02-25 at 18:19 -0800, nigel wrote:

 Thank you for your answer.
 Can I let my app have a high priority than default sms that I can
 receive the message before it?
 Or have any another ways to prevent sms receive short message?
 
 I only have a demand that prevent sms receive some short message which
 matches conditions I specify.
 
 On 24 Feb, 14:14, Kumar Bibek coomar@gmail.com wrote:
  You can of courseinterceptincomingsms. But you cannot disable the
  notification. Also, you have to do your bit of work within  a certain
  time limit, else your process will be closed.
  You can also not abort the broadcast.
 
  On Feb 24, 9:32 am, nigel wang_...@163.com wrote:
 
   requirements:
   1.Caninterceptshort messages by condition I specify(means that the
   system'ssmscan't receive any messages and don't send any
   notification to user). If the short message isn't match my condition
   that my app will notinterceptit and thesmscan receive the short
   message.
 
   2.When Iinterceptasmssuccessfully,I can handle this message such
   as store it to a custom table.
 
   I implement the functionality above by ContentObserver class,but it
   not work well.Sometimes it can'tinterceptshort message in time.I
   think it's due to system delay.In this case,thesmsand my app will
   receive the short message and send notification at the same
   time.So,now I hope who can help me to solve this issue or give me some
   hints.
 
   Thanks a lot.
 

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

[android-developers] Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread westmeadboy
I want to do something very similar (in terms of appearance) to the
app details activity of the Market app.

It looks like a cross between linear layout (not all rows the same),
list (scrolling nature), preferences (headings).

My guess is its a linear layout in a scroll view (ignoring activity
header/footer) and the headings are just hard coded...

Is that the best way to do it?

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


[android-developers] Bluetooth connect not working

2010-02-26 Thread Jamie
I am trying to establish a connection to another Bluetooth device on
my Nexus One (2.1) with the following code, which occurs when on the
broadcast receiver when a device is found.

BluetoothDevice device = (BluetoothDevice)
intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
BluetoothSocket btSocket = null;

try
{
btSocket = device.createRfcommSocketToServiceRecord(MY_UUID);
BluetoothClass btClass = device.getBluetoothClass();
Log.d(BLUETOOTH, -- createRfcommSocketToServiceRecord
WORKED:  + btClass.toString());
btSocket.connect();
Log.e(BLUETOOTH, ON RESUME: BT connection established, data
transfer link);
}
catch (IOException e)
{
Log.e(BLUETOOTH, IOException:  + e);
}

I have tried both the following UUIDs for both the SPP and OOP
profiles:

private static final UUID MY_UUID =
UUID.fromString(1101--1000-8000-00805F9B34FB);
private static final UUID MY_UUID =
UUID.fromString(1105--1000-8000-00805F9B34FB);

Every time I call the connect command I get an IOException with
Service discovery failed. I have tried connecting to a G1, iPhone
and a Nokia phone all with the same results.

What am I doing wrong?

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


[android-developers] my FileDescriptor doesn't work with mediaplayer (plz help)

2010-02-26 Thread genxsol
Hi Experts,

i have a filedescriptor through a script like this

Class? execClass = Class.forName(android.os.Exec);
Method createSubprocess =
execClass.getMethod(createSubprocess,
String.class, String.class, String.class,
int[].class);
Method waitFor = execClass.getMethod(waitFor,
int.class);

// Executes the command.
// NOTE: createSubprocess() is asynchronous.
int[] pid = new int[1];
  FileDescriptor   fd =
(FileDescriptor)createSubprocess.invoke(
null, /system/bin/cat, /sdcard/chunk.3gp,
null, pid);


i can read bytes from fd and it seems working fine but when i pass it
to the mediaplayer as datasource.
it doesn't show anything. (this is just 1 sec video)
same video works fine with direct path but i need to decrypt the file
bytes by bytes while its playing.
i thought this solution might help me but no luck so far.
can anybody guide me to the right direction how can i decrypt the file
while playing ?
or do i need to change in native code and build the opencore (pv
player ) separately and any change in there?

please help

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


[android-developers] [Android-developers]How many SurfaceHolder objects can be created in one activity having one view?

2010-02-26 Thread Latha Shivanna
Hi All,

I need to have an app where i can play both video and audio using
mediaplayer APIs.
But my problem here is , for video . i have to use
SURFACE_TYPE_PUSH_BUFFERS and pass this to mp.setDisplay().

SurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

Where as, An audio file can not be played with
SURFACE_TYPE_PUSH_BUFFERS being On.

What is the best solution to achieve this?

Is it possible to have more than 2 SurfaceHolder objects can be
created in one activity having one view?(one for audio with no
SURFACE_TYPE_PUSH_BUFFERS and other one is for Video)

Please do advise.

thanks
Latha

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


[android-developers] Android Market List Order

2010-02-26 Thread barisistanbul
What order Market Application use for application listing?
Today in the first 30 application for all application has 25
downloads except dictionary.com application which is #10 between #15
according to carrier. It was listed #5 on All applications category
and #1 on Reference category while it has download volume
10,000-50,000. What is the list order. Are all applications equal but
some of them MORE equal than others...
Do anybody know the list order and could it be exception to that?
Thanks

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


[android-developers] Re: Piracy sucks, or does it?

2010-02-26 Thread Hekki
Hi,

People cheat, it's in our human nature, it's even an economic rule :
Individuals try to get the most with their limited resources. So if
they can have something for free, they will.

The problem is not really to fight this, because we'll never win (RIAA
anyone : ), it's to find a way to leverage it and to find an
equilibrium.

I'm french and here some of our stand-up comedians are upset with
youtube and the likes because youtube makes money on they're work and
they don't see a single penny of it.
The thing is, it's not true at all : I bought two tickets to one of
those stand-up comedy show after I've spent a couple of hours looking
at various bits on youtube. I had stumble on it and didn't even know
the comedian in the first place.
My point is, I'll never buy something I don't know exists.

I'm not saying to do nothing about it, i'm saying don't loose your
sleep over it and certainly don't spend half your production time and
budget on securing your app.
Hackers, the real ones, the ones that cracks your security codes and
then gives away your cracked app, hack because it's easy for them and
fast and sometimes represent a small challenge.
They are not 15 years old, they are computer engineers with degrees
and too much time on their hand.
Music and DVD industry has put several BILLIONS of dollars in DRMs and
you can still enjoy any movie in divx can't you ? And YOU don't have a
few billions dollars, do you (if you do, maybe we can meet : ) ?

So put mild protection in place so that the average user has the
incentive to buy.
Use guilt techniques (help our developpers, you enjoyed our game help
us do more, ...)
Release a free version with ads,
Release your own pirated version with a scary time bomb (after 10
usages : You are using a pirated version of this app, next launch
will erase all your data from your phone. Don't ever actually put the
threat to execution !)
And if you don't want to go free with ads  on the market, just make it
your pirated version :D

Good luck with your work and your apps.

Yahel






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

2010-02-26 Thread Hekki
I do not know what a PITA is but I agree.

Changing your phone time just to play a game or  use an app is to much
work to worth the trouble.
If someone does that, then he is either very, very poor, or very very
pathetic with avarice and you won't get anything from him anyway.

Yahel

On 26 fév, 08:43, ko5tik kpriblo...@yahoo.com wrote:
 Backdating the Phone would be major PITA , and surely screw up
 all the calendar and synchronization stuff. Is the app in question as
 expensive to mandate this PITA?

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

2010-02-26 Thread Sean Hodges
On Fri, Feb 26, 2010 at 12:15 PM, Hekki kaye...@gmail.com wrote:
 I'm french and here some of our stand-up comedians are upset with
 youtube and the likes because youtube makes money on they're work and
 they don't see a single penny of it.

There is nothing in this world quite like witnessing a penniless upset
French stand-up comedian hurling abuse at YouTube :)

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

2010-02-26 Thread Hekki
 There is nothing in this world quite like witnessing a penniless upset
 French stand-up comedian hurling abuse at YouTube :)

Well you know when we're not on strike or ranting about our first
lady, we need the vent :D

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


Re: [android-developers] How to customize onscreen keyboard? Please help!

2010-02-26 Thread Mark Murphy
EvgenyV wrote:
 Hi All!
 
 I need to hide all keys except numbers, point and dash and change the
 dash behaviour.

You can't. You can create your own soft keyboard, and convince users to
switch to it -- but then you will need to create a *complete* soft
keyboard, since their choice is for their phone, not your application.

 I actually need to show
 and react to my custom view.

Then make your soft keyboard be part of your custom view. Sounds like
12 Button widgets would do the trick.

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

Android Development Wiki: http://wiki.andmob.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] Alert Dialog to display across activities?

2010-02-26 Thread Mark Murphy
Sam wrote:
 Does anyone know if it's possible to get a Dialog box to display
 between activities?

If, by this, you mean Activity A opens the Dialog and it stays open
until Activity B is on-screen and dismisses it, I'm fairly certain that
is not possible.

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

Android Development Wiki: http://wiki.andmob.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] Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread Mark Murphy
westmeadboy wrote:
 I want to do something very similar (in terms of appearance) to the
 app details activity of the Market app.
 
 It looks like a cross between linear layout (not all rows the same),
 list (scrolling nature), preferences (headings).
 
 My guess is its a linear layout in a scroll view (ignoring activity
 header/footer) and the headings are just hard coded...

My guess was, and is, that it is a ListView with an appropriate ListAdapter.

To have a mixed bag of row types, including some enabled and some not
(headings), you can either roll your own ListAdapter, or use my
MergeAdapter:

http://github.com/commonsguy/cwac-merge

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

Android Development Wiki: http://wiki.andmob.org

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


[android-developers] Re: Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread westmeadboy
Thanks Mark - that MergeAdapter will definitely come in handy for some
other things I'm doing.

In the Market activity, only the Comments section can really be
described as a list.

So wouldn't the MergeAdapter only be useful in the situation where
there is more than one sublist?

In my case, I don't really have any sublists. Its a bunch of rows each
with their own header and each (below-each-header-part) very different
from one another.

I've never used ScrollView before. Are there any potential pitfalls
using a LinearLayout within a ScrollView?

On Feb 26, 1:46 pm, Mark Murphy mmur...@commonsware.com wrote:
 westmeadboy wrote:
  I want to do something very similar (in terms of appearance) to the
  app details activity of the Market app.

  It looks like a cross between linear layout (not all rows the same),
  list (scrolling nature), preferences (headings).

  My guess is its a linear layout in a scroll view (ignoring activity
  header/footer) and the headings are just hard coded...

 My guess was, and is, that it is a ListView with an appropriate ListAdapter.

 To have a mixed bag of row types, including some enabled and some not
 (headings), you can either roll your own ListAdapter, or use my
 MergeAdapter:

 http://github.com/commonsguy/cwac-merge

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

 Android Development Wiki:http://wiki.andmob.org

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


[android-developers] Re: Free Version of App

2010-02-26 Thread String
On Feb 25, 7:58 pm, Streets Of Boston flyingdutc...@gmail.com wrote:

 How do you make a time limited trial version, where limiting the time
 is fairly fool-proof? How do you know how long the user has your app
 installed (including the possibility that the app has been uninstalled
 one or more times...)?

I go the server-registration route. The app in question already needs
net access, and I have a server that it talks to already, so I just
created a narrow MySQL table server-side and a simple PHP script to
interface with it. Essentially, I store the IMEI, app version number,
and the date of first use, and use that to validate the trial period.
My original implementation didn't include version number, but I soon
realized that it was desirable to let people re-trial when I released
a new version.

I've also decided not to bother with any encryption on the trial
period validation. I recognize that my approach is vulnerable to MITM
attacks, but it's sufficient to keep honest people honest; if
someone's going to that much trouble to screw me out of $2, there's
not much hope, is there? Besides, the whole Android-market piracy
aspect is a much bigger security hole. It's far more likely that
someone will simply download my license app from a warez site than
bother with cracking my validation routine.

String

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


Re: [android-developers] Re: Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread Mark Murphy
westmeadboy wrote:
 In the Market activity, only the Comments section can really be
 described as a list.

That is a misconception. Try using your D-pad or trackball or whatever
on that screen. You will find that the comments, the three items below
the About the developer heading, and the Flag as inappropriate row
are all selectable. Hence, I'm reasonably certain this is a ListView
overall.

 So wouldn't the MergeAdapter only be useful in the situation where
 there is more than one sublist?

It is useful anyplace where you have the need for a ListView where the
content does not all come from a single adapter. That could be headings.
That could be a mix of fixed rows (e.g., Flag as inappropriate) and
data-driven rows (e.g., the comments). It could be both. It could be
something else.

 In my case, I don't really have any sublists. Its a bunch of rows each
 with their own header and each (below-each-header-part) very different
 from one another.

If the non-header rows are to be selectable and/or clickable, then you
probably want to use a ListView. If not, a ScrollView should work.

 I've never used ScrollView before. Are there any potential pitfalls
 using a LinearLayout within a ScrollView?

You cannot have scrollable things inside scrollable things. Hence, you
cannot have a ListView inside of a ScrollView, for example.

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

_Android Programming Tutorials_ Version 1.0 In Print!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread westmeadboy
I see that the description section is not selectable and assume it is
pretty trivial to define whether something like that (and headings) is
selectable or not...

In my case, some rows are selectable and others have views within them
that are selectable (think of a displayed sentence where individual
words are clickable).

Given this, and if I understand you correctly, then the MergeAdapter
is the best way to go?

On Feb 26, 2:07 pm, Mark Murphy mmur...@commonsware.com wrote:
 westmeadboy wrote:
  In the Market activity, only the Comments section can really be
  described as a list.

 That is a misconception. Try using your D-pad or trackball or whatever
 on that screen. You will find that the comments, the three items below
 the About the developer heading, and the Flag as inappropriate row
 are all selectable. Hence, I'm reasonably certain this is a ListView
 overall.

  So wouldn't the MergeAdapter only be useful in the situation where
  there is more than one sublist?

 It is useful anyplace where you have the need for a ListView where the
 content does not all come from a single adapter. That could be headings.
 That could be a mix of fixed rows (e.g., Flag as inappropriate) and
 data-driven rows (e.g., the comments). It could be both. It could be
 something else.

  In my case, I don't really have any sublists. Its a bunch of rows each
  with their own header and each (below-each-header-part) very different
  from one another.

 If the non-header rows are to be selectable and/or clickable, then you
 probably want to use a ListView. If not, a ScrollView should work.

  I've never used ScrollView before. Are there any potential pitfalls
  using a LinearLayout within a ScrollView?

 You cannot have scrollable things inside scrollable things. Hence, you
 cannot have a ListView inside of a ScrollView, for example.

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

 _Android Programming Tutorials_ Version 1.0 In Print!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread Mark Murphy
westmeadboy wrote:
 I see that the description section is not selectable and assume it is
 pretty trivial to define whether something like that (and headings) is
 selectable or not...
 
 In my case, some rows are selectable and others have views within them
 that are selectable (think of a displayed sentence where individual
 words are clickable).
 
 Given this, and if I understand you correctly, then the MergeAdapter
 is the best way to go?

Having rows that should be selectable screams use ListView to me,
because rolling that yourself could be messy.

Whether you use MergeAdapter or your own custom BaseAdapter is up to
you. Your own custom adapter class gives you more control; MergeAdapter
is plug-and-play.

BTW, if you elect to use MergeAdapter and have questions, please join
the [cw-android] Google Group and post the questions there -- no sense
in cluttering up this list.

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

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

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


[android-developers] Re: Dialog goes away on click of search button

2010-02-26 Thread Bolha
Hey, Amit!

Specifically to the search button problem, I've found the following
solution:

case DIALOG_PROGRESS_SPINNER:
progressDialog = new ProgressDialog(this) {
@Override

public boolean onSearchRequested() {
return false;
}
};

progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progressDialog.setMessage(Loading);
progressDialog.setCancelable(false);

return progressDialog;
}

As the code above, try to override the onSearchRequested in the
ProgressDialog class (or any other class you want no to be interrupted
by the search box). If you return false, the event is invalidated and
the search button isn't shown. But, for income calls and other events
that interrupt you application, the dialog probably will be hidden.
I was trying something related to the android:configChanges=..., but
without success. If you find something that solves your problem in a
more general way, please, let us know (hehe, I've just found my app
suffers from something similar...)

Thanks for the attention!

Bolha

On 26 fev, 03:52, A R amit.r...@gmail.com wrote:
 Bolha, Thanks for responding.

 Dialog is created using onCreateDialog and I am invoking it by
 showDialog(int id)

 Below is the code. When my PurchaseActivity starts I do not want the
 dialog to go away until I get response from the server but clicking on
 the search button removes it. For now I have created a customer
 ProgressDialog class and eating the search button, which makes sure
 dialog doesnt go, but there will be other scenarios like incoming call
 which will remove the dialog

 public abstract class MyBaseActivity extends Activity {
         public static final int DIALOG_PROGRESS_SPINNER = 3;

         Handler handler = new Handler();
         ProgressDialog progressDialog;

         protected Dialog onCreateDialog(int id) {
                 switch (id) {
                 case DIALOG_PROGRESS_SPINNER:
                         progressDialog = new ProgressDialog(this);
                         
 progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
                         
 progressDialog.setMessage(getString(R.string.loading));
                         progressDialog.setCancelable(false);

                         return progressDialog;
                 }
                 return super.onCreateDialog(id);
         }

 }

 public class PurchaseActivity extends MyBaseActivity {
         protected void onCreate(Bundle savedInstanceState) {
                 super.onCreate(savedInstanceState);

                 setContentView(R.layout.purchase_screen);

                 //do other stuff

                 handler.post(new Runnable() {

                         @Override
                         public void run() {
                                 showDialog(DIALOG_PROGRESS_SPINNER);
                                 //call asynch thread to do some server work 
 which will call
 listener in the same activity to dismiss dialog
                         }
                 });

         }

 }

 On Feb 26, 4:08 am, Bolha lucasros...@gmail.com wrote:

  Amit,

  How are you creating the dialog? Sometimes, when creating a dialog
  outside the overriden method onCreateDialog (from Activity class),
  the dialog can have strange behaviors (mainly because it sometimes the
  dialog instance is lacking a reference to its parent). Can you post a
  piece of your source code?

  Thanks

  Bolha

  On 25 fev, 16:53, A R amit.r...@gmail.com wrote:

   Hi,

    I have an activity which starts with a progress bar and I do not want
   the progress bar to go away until the processing is done, I have set
   the dialog to be setCancelable(false) so now user cannot cancel it
   with back but there are several other situations which hides the
   dialog for eg pressing 'search'.

    On clicking of 'search' button the search box and keyboard pops up,
   back button hides it and shows my activity which is always in the
   background but the dialog is gone.

    I can disable the search button but ideally I would want dialog to
   come back when the activity comes in foreground again. Any ideas how
   to do it?

   Regards,
   Amit.

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


[android-developers] Re: Android, send me logs! - code library for detecting force-close and sending logs

2010-02-26 Thread Nanard
Inserting a try {} catch {xxxException ...} in the code an be hard...
if the crash occurs in a place we don't expect/suspect of not being
stable.

A solution for Google team, would be in the Manifest.xml to add
field :
sendErrorLogsTo=m...@me.com

So, for each Force Close we could receive a mail from Google  (not
from the user).

At least we could track the number of crash, check if they decrease
over time, etc...

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

2010-02-26 Thread ani
You didn't miss anything: currently the plugging-in of a wired
accessory will not interrupt/reroute BT A2DP streaming, A2DP has
priority over wired connections. We intend to change that behavior in
a future release. Do you have a specific use-case you can share? We
can add it to our usage-scenarios to make sure this is the right
behavior to adopt.
Thanks,
   Jean-Michel.

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


[android-developers] Apps, Market and MyTouch 3G 3.5mm.

2010-02-26 Thread BlackLight
Hello.

I've got several messages from my users. All of them has MyTouch 3G
3.5mm and they cannot find my app in the Market (even search shows
nothing found). Users with G1, Droid, Hero can find and download
app.

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.someapp
  android:versionCode=1
  android:versionName=1.0

uses-sdk android:minSdkVersion=3 /

uses-permission android:name=android.permission.VIBRATE /
uses-permission android:name=android.permission.RECORD_AUDIO /
uses-permission
android:name=android.permission.READ_PHONE_STATE /
uses-permission android:name=android.permission.INTERNET /
uses-permission android:name=android.permission.WAKE_LOCK /

application android:icon=@drawable/icon android:label=@string/
app_name
...

Is something wrong with AndroidManifest.xml?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread westmeadboy
ok, ListView it is!

I think the thing that bothers me, is I would like to define the whole
layout in XML (as if I were using a LinearLayout). I wonder if its
still possible (or recommended) to do that. Inflate the layout and
then read off the children into the Adapter...??

On Feb 26, 2:27 pm, Mark Murphy mmur...@commonsware.com wrote:
 westmeadboy wrote:
  I see that the description section is not selectable and assume it is
  pretty trivial to define whether something like that (and headings) is
  selectable or not...

  In my case, some rows are selectable and others have views within them
  that are selectable (think of a displayed sentence where individual
  words are clickable).

  Given this, and if I understand you correctly, then the MergeAdapter
  is the best way to go?

 Having rows that should be selectable screams use ListView to me,
 because rolling that yourself could be messy.

 Whether you use MergeAdapter or your own custom BaseAdapter is up to
 you. Your own custom adapter class gives you more control; MergeAdapter
 is plug-and-play.

 BTW, if you elect to use MergeAdapter and have questions, please join
 the [cw-android] Google Group and post the questions there -- no sense
 in cluttering up this list.

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

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

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


Re: [android-developers] Re: Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread Mark Murphy
westmeadboy wrote:
 ok, ListView it is!
 
 I think the thing that bothers me, is I would like to define the whole
 layout in XML (as if I were using a LinearLayout). I wonder if its
 still possible (or recommended) to do that. Inflate the layout and
 then read off the children into the Adapter...??

You can make the rows and stuff be individual XML files. I would be
nervous about trying to combine them all into one and reparent widgets
on the fly.

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

Android Training in US: 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] How to customize onscreen keyboard? Please help!

2010-02-26 Thread Evgeny V
I got it.
Thank you very much!

On Fri, Feb 26, 2010 at 2:43 PM, Mark Murphy mmur...@commonsware.comwrote:

 EvgenyV wrote:
  Hi All!
 
  I need to hide all keys except numbers, point and dash and change the
  dash behaviour.

 You can't. You can create your own soft keyboard, and convince users to
 switch to it -- but then you will need to create a *complete* soft
 keyboard, since their choice is for their phone, not your application.

  I actually need to show
  and react to my custom view.

 Then make your soft keyboard be part of your custom view. Sounds like
 12 Button widgets would do the trick.

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

 Android Development Wiki: http://wiki.andmob.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.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] Re: Which View/Layout does the Market app (1.6) details activity use?

2010-02-26 Thread westmeadboy
I think you're right, it could get messy.

Having said that, I think there is a good case for creating a custom
widget like LinearLayout2ListView (i.e. extends ListView and takes a
linear layout resource as an argument).

A man of your talents Mark, could polish that off in about half an
hour :)

On Feb 26, 2:44 pm, Mark Murphy mmur...@commonsware.com wrote:
 westmeadboy wrote:
  ok, ListView it is!

  I think the thing that bothers me, is I would like to define the whole
  layout in XML (as if I were using a LinearLayout). I wonder if its
  still possible (or recommended) to do that. Inflate the layout and
  then read off the children into the Adapter...??

 You can make the rows and stuff be individual XML files. I would be
 nervous about trying to combine them all into one and reparent widgets
 on the fly.

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

 Android Training in US: 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] Alert Dialog to display across activities?

2010-02-26 Thread TreKing
On Thu, Feb 25, 2010 at 11:10 PM, Sam samm...@gmail.com wrote:

 Does anyone know if it's possible to get a Dialog box to display
 between activities?


What are you trying to achieve by doing this? Maybe there's another / better
way ...

-
TreKing - Chicago transit tracking app for Android-powered devices
http://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] USB mass storage issue in Eclair

2010-02-26 Thread Saikat
I have an issue for USB host in éclair(eclair + some fix for USB).



1.   Connect USB Mass Storage using a adapter in phone.

2.   The USB mass storage will be mounted properly.

3.   Unmount the same and take out the drive and it is happening
properly.

4.   Now connect back the mass storage device with its adapter
again and nothing will happen.



The error is coming from Kernel



device not accepting address 2 error -110



This problem was not there is DONUT.

In éclair the OTG is now msm72k_otg where as it was msm_otg in donut.



1st time mount/unmount successful but next time nothing is happening.



Moreover, if we do not disconnect the adapter from phone in éclair and
do multiple time plug in/plug out without disconnecting the adapter
everything happening fine.



Can anybody help on this?

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


[android-developers] is it possible to get user name against the default Gmail account.

2010-02-26 Thread Atif Gulzar
Hi,

Is it possible to get the user name against the default Gmail account on
device?

For example when we comment on some application in Market, it automatically
deduct the user name form device.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ

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

2010-02-26 Thread nigel
Thank you,zhangjun.It's a piece of dismal news.
It seems I have to  change my design.
Thanks a lot.

On 26 Feb, 17:19, zhangjun jun.zh...@borqs.com wrote:
 no priority in Activity and Task now, so i guess no solution for your
 requirement :(
 maybe google can design it in future, but it is difficult for
 Application to implement high priority Activity or services

 On Thu, 2010-02-25 at 18:19 -0800, nigel wrote:
  Thank you for your answer.
  Can I let my app have a high priority than default sms that I can
  receive the message before it?
  Or have any another ways to prevent sms receive short message?

  I only have a demand that prevent sms receive some short message which
  matches conditions I specify.

  On 24 Feb, 14:14, Kumar Bibek coomar@gmail.com wrote:
   You can of courseinterceptincomingsms. But you cannot disable the
   notification. Also, you have to do your bit of work within  a certain
   time limit, else your process will be closed.
   You can also not abort the broadcast.

   On Feb 24, 9:32 am, nigel wang_...@163.com wrote:

requirements:
1.Caninterceptshort messages by condition I specify(means that the
system'ssmscan't receive any messages and don't send any
notification to user). If the short message isn't match my condition
that my app will notinterceptit and thesmscan receive the short
message.

2.When Iinterceptasmssuccessfully,I can handle this message such
as store it to a custom table.

I implement the functionality above by ContentObserver class,but it
not work well.Sometimes it can'tinterceptshort message in time.I
think it's due to system delay.In this case,thesmsand my app will
receive the short message and send notification at the same
time.So,now I hope who can help me to solve this issue or give me some
hints.

Thanks a lot.

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


Re: [android-developers] is it possible to get user name against the default Gmail account.

2010-02-26 Thread Sean Hodges
On Fri, Feb 26, 2010 at 2:19 PM, Atif Gulzar atif.gul...@gmail.com wrote:
 Is it possible to get the user name against the default Gmail account on
 device?

I sure hope not...

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

2010-02-26 Thread HeHe
thank you again. yes, i found getPlaybackHeadPosition() in your
posts.

since my sampling rate is 8000, i have no problem with
getPlaybackHeadPosition() if pause() is NOT called.

On Feb 26, 1:06 am, blindfold seeingwithso...@gmail.com wrote:
  thanks, though therein i didnt find anything about
  getPlaybackHeadPosition() 

 Then you missed my posts 12 and 13 in that thread,

 http://groups.google.com/group/android-developers/tree/browse_frm/thr...

 as well as my bug report

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

 Regards

 On Feb 26, 12:33 am, HeHe cnm...@gmail.com wrote:



  thanks, though therein i didnt find anything about
  getPlaybackHeadPosition() 

  i just cannot believe that a simple function like
  getPlaybackHeadPosition() can go wrong.

  anyone has getPlaybackHeadPosition() work with pause()?

  On Feb 25, 12:38 am, blindfold seeingwithso...@gmail.com wrote:

   See the earlier 
   threadhttp://groups.google.com/group/android-developers/browse_frm/thread/5...

   I did not get useful results from trying to get the current playing
   position and gave up on it. I do not know if Android 2.1 is any better
   here.

   On Feb 25, 1:12 am, HeHe cnm...@gmail.com wrote:

folks,

does anybody use AudioTrack.getPlaybackHeadPosition()?
i found that, if i call AudioTrack.pause() in the middle of playing
audio frames, at end of playback getPlaybackHeadPosition() always
returns hundreds of frames less than the number of frames fed into
the
AudioTrack object .

did anybody also run into the same issue?

if you did, how did you work around this unexpected behavior?

thank u~

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


[android-developers] Re: Android, send me logs! - code library for detecting force-close and sending logs

2010-02-26 Thread Streets Of Boston
I haven't made it public yet (i will at some point), but i have a
similar system for my apps.

The process of my activities registers itself by calling
Thread.setDefaultUncaughtExceptionHandler(uncaughtXcptHandler) and
binds to service that i wrote that runs in a different process (since
my app will be dying because of an exception, it's tricky to properly
handle the exception in the dying process itself).

Then in the uncaughtXcptHandler.void uncaughtException(Thread t,
Throwable e), I write out an error-log file with the stack-trace and
some other info. Then i call an asynchronous method on my service that
will pop up a dialog allowing the user to send me the error report or
not. If the user clicks 'Yes', then the error-log file is read and
sent to my webserver. My webserver then sends me an e-mail. This way,
users can remain anonymous (no e-mail/reply address necessary).

I let my app die immediately after calling the asynchronous method. If
my app couldn't bind to the service for any reason, the old and
trusted force-close message from Android is shown instead.



On Feb 25, 3:10 pm, focuser linto...@gmail.com wrote:
 Hi fellow Android developers,

 How many times have you asked users to send you the logcat result to
 track down a nasty force-close?  How many users have actually replied?

 It's not that users are lazy or busy.  Having to run the logcat
 command or download an external log collector app just means too much
 trouble for them.  It should be much simpler.  It should be just one
 tap.

 In fact I'm surprised (or being ignorant) that an easier error
 reporting mechanism has not existed yet in the Android API, especially
 for the infamous force-close.  That is why I coded and open-sourced
 Android, send me logs!, a small code library that makes it easy to
 detect force-close and send logs from within your own apps.  You can
 program it to report errors with just one tap, and also include your
 own tracing information.

 Please check it out athttp://code.google.com/p/android-send-me-logs/.
 It's still in very early stage, and I would appreciate your critism,
 suggestions, comments, or even code contributions.

 Linton Ye

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


[android-developers] Ringtone.stop() wont work?

2010-02-26 Thread draf...@gmail.com
I currently start a Ringtone on Android and it plays fine.

However when I try to stop the ringtone it doesn't stop or atleast
doesn't stop straight away, it will keep in playing until it just
plays out.

Here is how I set up the Ringtone:

int rm = audio_service.getRingerMode();
int vs =
audio_service.getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER);

android.os.Vibrator v = (Vibrator)
getSystemService(Context.VIBRATOR_SERVICE);

if ((rm == AudioManager.RINGER_MODE_VIBRATE ||
(rm == AudioManager.RINGER_MODE_NORMAL  vs ==
AudioManager.VIBRATE_SETTING_ON)))
v.vibrate(vibratePattern,1);

if (audio_service.getStreamVolume(AudioManager.STREAM_RING)  0)
{

oRingtone = RingtoneManager.getRingtone(this,
Settings.System.DEFAULT_RINGTONE_URI);
oRingtone.setStreamType(AudioManager.STREAM_RING);
oRingtone.play();

}

And here is how I try to stop it

if (CallDialogActivity.oRingtone != null) {
  Log.d(RINGTONE, Into Ringtone if);
  Ringtone ringtone = CallDialogActivity.oRingtone;
  oRingtone = null;
  ringtone.stop();
}

Has anyone come across similiar problems or see any mistakes in my
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


[android-developers] Re: Free Version of App

2010-02-26 Thread Streets Of Boston
Thanks for the info! Especially the bit about the re-trial is
interesting.

But i have one question:
You use the IMEI number. What if the user gets a new phone?
Aren't app downloads tied to a user's Google Checkout account. If the
user gets a new phone, uses the same Google Checkout account, he/she
has to buy your app again. Shouldn't you use the 'ANDROID_ID' instead?


On Feb 26, 8:02 am, String sterling.ud...@googlemail.com wrote:
 On Feb 25, 7:58 pm, Streets Of Boston flyingdutc...@gmail.com wrote:

  How do you make a time limited trial version, where limiting the time
  is fairly fool-proof? How do you know how long the user has your app
  installed (including the possibility that the app has been uninstalled
  one or more times...)?

 I go the server-registration route. The app in question already needs
 net access, and I have a server that it talks to already, so I just
 created a narrow MySQL table server-side and a simple PHP script to
 interface with it. Essentially, I store the IMEI, app version number,
 and the date of first use, and use that to validate the trial period.
 My original implementation didn't include version number, but I soon
 realized that it was desirable to let people re-trial when I released
 a new version.

 I've also decided not to bother with any encryption on the trial
 period validation. I recognize that my approach is vulnerable to MITM
 attacks, but it's sufficient to keep honest people honest; if
 someone's going to that much trouble to screw me out of $2, there's
 not much hope, is there? Besides, the whole Android-market piracy
 aspect is a much bigger security hole. It's far more likely that
 someone will simply download my license app from a warez site than
 bother with cracking my validation routine.

 String

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


Re: [android-developers] Re: Android, send me logs! - code library for detecting force-close and sending logs

2010-02-26 Thread mike

On 02/25/2010 11:57 PM, focuser wrote:

Mike - I think Apple's approach may be good for Apple, and probably
not that compatible with the openness of Android?
Also, what's better of Apple's approach other than that users don't
have to give their identity (email addresses etc) to individual
developers?  If you suggest it here, we could definitely consider to
add it to the library if appropriate.
   


What's nice about Apple's approach here is that developers
don't have to do anything... it's a good way of improving the code
quality for *all* apps. I was pretty surprised and happy when it
came online a month or two ago because it confirmed that what
was crashing across our user base were known issues. Most of
the battle is getting *any* information about how the app is
behaving in the field, so the auto-crash reports are really nice.

I don't think there's an inherent conflict with Android's openness.
The crashes are anonymized, and developers and users do chose
to go through the Android Market -- which unlike Apple isn't the
only way to get apps.

I should say that I don't think of this as an either/or with what you're
doing though. Apple's just pulling up crash dumps, whereas what
you're doing is allowing big chunks of the log to be sent back. There's
room for both of these to exist at the same time.

Mike

mssmison - thanks for your interest and compliment.  Please let me
know if you have any issues with the code.

On Feb 25, 4:38 pm, mssmisoncpoul...@gmail.com  wrote:
   

I love this idea!
  I'd like to build it into the source itself, that would be a life
saver.. lol
 
   


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


[android-developers] Watching Activities - Updating their UI OR notify

2010-02-26 Thread sperfect
I'm just joinning the community, so Hello, Android

I thought it could be useful when browsing an Application (e.g. one
just installed) to be able to have information about the presence of
OptionsMenu and ContextMenu.
So that the user can know visually if Menu Button pressing button  or
long touching on a View can provide him more options, without having
to try every element on the screen.
I believe its useful feature for a comprehensive and easy HCI.

I'm trying to implement this idea through the API, with something like
Service and/or a Receiver, listening for Window/ Stack changes.

1) What should a Receiver listen about for such changes or, if no luck
in that, which System Service could provide me with an approproate
listener? Ofcourse an event is much more preferable than a power-
consuming Timer looking for changes.

2) Having caught the top Activity, is there a way to updateits UI
elements, for example dim bright shortly a View or mark it somehow.
This a less important problem, but equally intrested. Could be
bypaseed with a Notification of some type, but with carefull design
should be very pleasant..

Are these issues dealt through the API, or only with FrameWork level
work?

Thank you in advance,
Stelios Chatziefstratiou

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

2010-02-26 Thread kknight
My application often experienced OutOfMemory exception. To trace
memory leak, I got memory dump from my application process and
examined it in Eclipse Memory Analysis.

The tool gave me a report of potential memory leak. The report is
listed below. The report said there are many
android.webkit.WebHistoryItem instances in the process and the used a
lot of memory. My application has two activities. Activity A starts
Activity B, and B finishes when a button on Activity B is pressed.
Only Activity B contains a WebView. And this activity only opens one
HTML page each time. In the code, I cleared the web history when the
Activity containing the WebView finishes:

public void onDestroy() {
super.onDestroy();
m_storyWebView.clearCache(false);
m_storyWebView.clearHistory();
}

When I got the memory dump, Activity B is closed. Now the question is,
why there are still many WebHistoryItem existing in the process. And,
how can I get rid of the WebHistoryItem instances completely?

Thanks.

*** Eclipse Memory Analysis report
**
26 instances of android.webkit.WebHistoryItem, loaded by system
class loader occupy 1,210,328 (27.03%) bytes.

Biggest instances:

* android.webkit.WebHistoryItem @ 0x43cf6fd8 - 80,120 (1.79%)
bytes.
* android.webkit.WebHistoryItem @ 0x43fb2670 - 80,120 (1.79%)
bytes.
* android.webkit.WebHistoryItem @ 0x43e93e00 - 78,176 (1.75%)
bytes.
* android.webkit.WebHistoryItem @ 0x43f63cb8 - 78,176 (1.75%)
bytes.
* android.webkit.WebHistoryItem @ 0x43cf5d60 - 65,168 (1.46%)
bytes.
* android.webkit.WebHistoryItem @ 0x43f19a88 - 65,168 (1.46%)
bytes.
* android.webkit.WebHistoryItem @ 0x43d1c280 - 62,408 (1.39%)
bytes.
* android.webkit.WebHistoryItem @ 0x43d11720 - 58,992 (1.32%)
bytes.
* android.webkit.WebHistoryItem @ 0x43d51a48 - 57,912 (1.29%)
bytes.
* android.webkit.WebHistoryItem @ 0x43d9e6c8 - 57,672 (1.29%)
bytes.
* android.webkit.WebHistoryItem @ 0x43d2fcc8 - 55,728 (1.24%)
bytes.
* android.webkit.WebHistoryItem @ 0x43d143d0 - 51,344 (1.15%)
bytes.
* android.webkit.WebHistoryItem @ 0x43e202e0 - 49,568 (1.11%)
bytes.
* android.webkit.WebHistoryItem @ 0x43ef74d8 - 49,304 (1.10%)
bytes.
* android.webkit.WebHistoryItem @ 0x43f513f8 - 47,144 (1.05%)
bytes.
* android.webkit.WebHistoryItem @ 0x43f18808 - 46,280 (1.03%)
bytes.

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


[android-developers] Unsubscribe

2010-02-26 Thread conor hogan
Unsubscribe

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

[android-developers] AutoCompleteTextView and show suggestions

2010-02-26 Thread Steven
Hello,

If I have an EditText, it shows suggestions of words automatically
when typing.  For example, when I start typing Tra, it suggests words
above the keyboard such as travel, training, etc.  However, if I make
the field an AutoCompleteTextView, I can get it to drop down
suggestions of previously entered values like Trader Joe's.

The problem is the suggestions above the keyboard are gone now so it
makes it more difficult to enter longer names, especially with
multiple words.  Any idea on how to get both to work at the same time?

Thanks,
Steve

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


[android-developers] Multiple Icon on Android App

2010-02-26 Thread Simone Francesca
I am trying to build an app that would have multiple icons with
multiple captions based on the area. HOw can i do that in Android
because right now there is no way to change the icon dynamically. It
is tied to teh AndroidManifest file? Can I override it ?

I was directed here by Android Market Forum

Thanks in advance for all your help.

Sim

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


[android-developers] Notepad tutorial questions about calling super

2010-02-26 Thread Hunk of Hulk
 Hi there,

I find the Notepad tutorial to be anything but simple for me.  Could
someone tell me in the code below why you call super immediately in
method 1 and then last in method 2?  I had thought that if you're
going to call super,you had to do it immediately (or is that only with
a constructor but not with a method)?

Also, if you return true in method 2, does that mean that super is
never called b/c you exit the switch statement immediately?  If you do
exit, then you're not chaining up to the superclass' method, which I
thought you always want to do.  I'm not even sure what the superclass'
onOptionsItemSelected() does anyway.  Does everyone understand every
line of code or should I just stop trying to analyze what every
parameter means and just sort of follow a formula?  I guess that I am
finding Android extremely hard to understand from the documentation.


METHOD 1
@Override
public boolean onCreateOptionsMenu(Menu menu) {
boolean result = super.onCreateOptionsMenu(menu);
menu.add(0, INSERT_ID, 0, R.string.menu_insert);
return result;
}

METHOD 2
 @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case INSERT_ID:
createNote();
return true;
}

return super.onOptionsItemSelected(item);
}

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] Bluetooth A2DP/AVRCP profiles on Android

2010-02-26 Thread Loco Moco
Hello,

I would like to develop a software using Bluetooth A2DP/AVRCP profiles
on Android.
I could not find the related API on the developer's website at this
moment.
But, I found a product by Sybase below.
http://www.sybase.com/detail?id=1064424
Do we have any other option?
Thank you very much in advance.

Regards,

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


Re: [android-developers] Watching Activities - Updating their UI OR notify

2010-02-26 Thread Mark Murphy
sperfect wrote:
 I'm just joinning the community, so Hello, Android
 
 I thought it could be useful when browsing an Application (e.g. one
 just installed) to be able to have information about the presence of
 OptionsMenu and ContextMenu.
 So that the user can know visually if Menu Button pressing button  or
 long touching on a View can provide him more options, without having
 to try every element on the screen.
 I believe its useful feature for a comprehensive and easy HCI.

This would have to be implemented in the operating system. It cannot be
implemented via an SDK application.

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

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

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


[android-developers] Developer Phone Number Listing

2010-02-26 Thread polyclefsoftware
When I first started publishing Android apps as an indie developer, I
posted my phone number on the app's submission page, thinking it would
not be listed publicly. When I found out that it was, I removed the
number from the app listing. I don't have the resources to handle
phone support, and much prefer to handle support via email. Besides,
there is no requirement that we provide phone support, as long as we
provide support in some way, correct?

Anyway, these days I'm getting fewer phone calls, but I'm still
getting calls. We are required to list a phone number in our developer
profile, but it is stated that this is used for Google to contact us
directly in case there are issues.

So where are users still getting my phone number, and how can I make
sure it's not 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] Developer Phone Number Listing

2010-02-26 Thread TreKing
On Fri, Feb 26, 2010 at 9:35 AM, polyclefsoftware dja...@gmail.com wrote:

 So where are users still getting my phone number, and how can I make sure
 it's not listed?


Have you tried asking the people that call you where they got your number
... ?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://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: where to store files?

2010-02-26 Thread Christine
I put them on the sdcard so my app doesn't use more memory than
necessary and the user can see the files and they can delete them if
they don't like them.

On Feb 26, 9:47 am, kavitha kavith...@gmail.com wrote:
 Hi All,

 I am in confusion,where to store my data files.

 Which is convenient?

 1.sdcard
 2.cache of context
 3.data folder of package

 Thanks
 Kavitha

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


[android-developers] can't compile opencore

2010-02-26 Thread genxsol
Hi Dear,
i am trying to compile opencore module separatley at cygwin.

downloaded the source code
followed steps in startup file
---
 cd opencore/build_config/opencore_dynamic
source setup.sh opencore
make -j
--

error:
/cygdrive/c/opencore/extern_tools_v2/bin/linux/make: /cygdrive/c/
opencore/extern
_tools_v2/bin/linux/make: cannot execute binary file


can anybody help how can i compile opencore?

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


[android-developers] Re: Push Notification API

2010-02-26 Thread Mark Wyszomierski
I wonder if this is 'real' push, or are they just waking a process
every N seconds to poll their server to simulate push. They say
they're not using sms or email to provide push support.

On Feb 17, 12:58 am, roland roland...@gmail.com wrote:
 Just saw this one,http://www.xtify.com/, i didn't test it yet.

 On 1 fév, 19:58, Kevin Duffey andjar...@gmail.com wrote:



  What sort of push notification API are you looking for?

  On Mon, Feb 1, 2010 at 10:42 AM, nikhil nik...@gmail.com wrote:
   No

   On Jan 30, 11:22 pm, Alie Lee alie@gmail.com wrote:
Hi,

Is there any push notification API for Android... I tried search with
   Google
but couldnt find any.

Regards,
Alie

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   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%2Bunsubs
cr...@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] Google Maps

2010-02-26 Thread Julian
Does each Android phone have a GPS installed inside it or does it use
the location by accessing the cells where your phone is located?

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


[android-developers] Intercepting incoming/outgoing email messages

2010-02-26 Thread Anonymous Guy

I'm going to guess this:

http://groups.google.com/group/android-developers/browse_thread/thread/27f46bcbbaa51163#

still hasn't been addressed since almost a year ago.  I just went
through the API and found nothing to intercept incoming and outgoing
email messages.  Please, correct me if I'm wrong.


An Anonymous Guy





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

2010-02-26 Thread Mark Murphy
Anonymous Guy wrote:
 I'm going to guess this:
 
 http://groups.google.com/group/android-developers/browse_thread/thread/27f46bcbbaa51163#
 
 still hasn't been addressed since almost a year ago.  I just went
 through the API and found nothing to intercept incoming and outgoing
 email messages.  Please, correct me if I'm wrong.

You are correct. Intercepting incoming and outgoing email messages
across the board is considered malware on most platforms, so I for one
am grateful for this.

Email clients are welcome to implement a plug-in or add-on architecture
to allow third-party extensions. Such extensions would not have a
blanket ability to intercepting incoming and outgoing email messages
for the OS, but particular to that client. This is the approach taken by
Microsoft Outlook (leastways, the last time I did Outlook add-ons),
Mozilla Thunderbird
(https://developer.mozilla.org/en/Extensions/Thunderbird/HowTos), etc.

If you feel such a plug-in architecture is important, I would start with
third-party mail clients (e.g., K9) and work with them to implement it
and come up with a de facto standard. This will help anyone who uses
those apps or buys a device with those apps pre-loaded. After
demonstrating the value in real life, you may find it easier to work
with the core Android team to implement the same architecture for the
native email application, and the Gmail team may at some point elect to
follow it as well.

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

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

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


[android-developers] Re: Android, send me logs! - code library for detecting force-close and sending logs

2010-02-26 Thread dadical
For those of you that are comfortable using Flurry, a similar approach
works nicely.  Flurry already collects uncaught exceptions, but for
some reason doesn't actually log the stack trace.  To get around this,
I add an exceptionHandler that logs a Flurry event with the stack
trace as a parameter, like this:

OutputStream lOS = new ByteArrayOutputStream();
PrintStream lPS = new PrintStream(lOS, true);
t.printStackTrace(lPS);
lPS.flush();
MapString, String lArgs = new HashMapString, String();
lArgs.put(stackTrace, lOS.toString());

SharedPreferences lPrefs =
PreferenceManager.getDefaultSharedPreferences(pCtxt);
if(lPrefs.getBoolean(PREFS_REMOTE_DEBUG, true)){
FlurryAgent.onEvent(FLURRY_EVENT_UNCAUGHT_EXCEPTION, 
lArgs);
}

One big advantage of this approach is that Flurry collects lots of
metrics w.r.t. the frequency, timing, and sequencing of the events.
Works very, very nicely.





On Feb 26, 10:10 am, Streets Of Boston flyingdutc...@gmail.com
wrote:
 I haven't made it public yet (i will at some point), but i have a
 similar system for my apps.

 The process of my activities registers itself by calling
 Thread.setDefaultUncaughtExceptionHandler(uncaughtXcptHandler) and
 binds to service that i wrote that runs in a different process (since
 my app will be dying because of an exception, it's tricky to properly
 handle the exception in the dying process itself).

 Then in the uncaughtXcptHandler.void uncaughtException(Thread t,
 Throwable e), I write out an error-log file with the stack-trace and
 some other info. Then i call an asynchronous method on my service that
 will pop up a dialog allowing the user to send me the error report or
 not. If the user clicks 'Yes', then the error-log file is read and
 sent to my webserver. My webserver then sends me an e-mail. This way,
 users can remain anonymous (no e-mail/reply address necessary).

 I let my app die immediately after calling the asynchronous method. If
 my app couldn't bind to the service for any reason, the old and
 trusted force-close message from Android is shown instead.

 On Feb 25, 3:10 pm, focuser linto...@gmail.com wrote:

  Hi fellow Android developers,

  How many times have you asked users to send you the logcat result to
  track down a nasty force-close?  How many users have actually replied?

  It's not that users are lazy or busy.  Having to run the logcat
  command or download an external log collector app just means too much
  trouble for them.  It should be much simpler.  It should be just one
  tap.

  In fact I'm surprised (or being ignorant) that an easier error
  reporting mechanism has not existed yet in the Android API, especially
  for the infamous force-close.  That is why I coded and open-sourced
  Android, send me logs!, a small code library that makes it easy to
  detect force-close and send logs from within your own apps.  You can
  program it to report errors with just one tap, and also include your
  own tracing information.

  Please check it out athttp://code.google.com/p/android-send-me-logs/.
  It's still in very early stage, and I would appreciate your critism,
  suggestions, comments, or even code contributions.

  Linton Ye

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


[android-developers] what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

2010-02-26 Thread HeHe
it is frustrating to get StackOverflowError exception when i just call
LinearLayout.setBackgroundResource(wallpaper) trying to to beautify
background of an activity.

after i comment out the setBackgroundResource() call, the exception
has gone.

it makes me wonder if my view layout has (easily) reached a critical
point of stack size limit.

could android team raise the stack size limit so that such a
background beautification wont get hit by the exception?

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] help on graphics from newbie

2010-02-26 Thread social hub
Guys,

I almost there of what i want to do but i am stuck at a point where I need
some expert pointers

this is what i do so far

I have rectangle white box

on cliking the rectangle I will draw a toolbar beneath the box and also call
relayout to accomodate the toolbar ( size+100) ( i used surfaceview and in
secondary thread i draw the toolbar)

on click again on rectangle box it will disappear the toolbar and also has
to resize the layout to original size (ie size-100) this is where I get
stuck.

I can disappear the toolbar however I cant call relayout either from
secondary thread (says cant call from secondary thread).

So I created a while loop in onlayout( this is where i create a thread to
draw the toolbar)  if i call requestlayout after while loop ends it doesnt
do anything it doesnt call onmeasure etc.

Please help me where I am doing wrong.

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

Re: [android-developers] what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

2010-02-26 Thread Mark Murphy
HeHe wrote:
 it makes me wonder if my view layout has (easily) reached a critical
 point of stack size limit.

Use hierarchyviewer both to determine your View hierarchy depth and
determine where you may be able to consolidate some containers, to
reduce the hierarchy depth and in turn eliminate your stack size problem.

One of the reasons I rail against the use of activities as the contents
of tabs, for example, is because doing so is very wasteful from a View
hierarchy standpoint. Just switching those to be Views in tabs, rather
than Activities in tabs, can clear up problems.

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

Android Development Wiki: http://wiki.andmob.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] MD5 Fingerprint

2010-02-26 Thread Julian
I am trying to get the MD5 Fingerprint to sign my applications.
In the command prompt I inserted the following:

 $ keytool -list -alias androiddebugkey \
-keystore path_to_debug_keystore.keystore \
-storepass android -keypass android

but I got the following error:

'$' is not recognized as an internal or external command, operable
program or batch file

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

2010-02-26 Thread Mark Murphy
Julian wrote:
 I am trying to get the MD5 Fingerprint to sign my applications.
 In the command prompt I inserted the following:
 
  $ keytool -list -alias androiddebugkey \
 -keystore path_to_debug_keystore.keystore \
 -storepass android -keypass android
 
 but I got the following error:
 
 '$' is not recognized as an internal or external command, operable
 program or batch file

The $ in the instructions is the representation of your shell prompt --
it is not part of the command, which begins with keytool.

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

_Android Programming Tutorials_ Version 2.0 Available!

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


Re: [android-developers] Re: Piracy sucks, or does it?

2010-02-26 Thread Angel Cruz
Nothing if fool proof for sure, but security and piracy is like a cat and
mouse game.  The hacker and developer actually form a symbiotic
relationship, both making each other stronger.

Just another thought:

What about setting the time bomb based on the Yahoo server api call?

http://developer.yahoo.com/util/timeservice/V1/getTime.html

http://developer.yahoo.com/util/timeservice/V1/getTime.htmlOf course this
would require that the game will only work if there's internet connection,
which most likely the user will.

On Fri, Feb 26, 2010 at 4:36 AM, Hekki kaye...@gmail.com wrote:

  There is nothing in this world quite like witnessing a penniless upset
  French stand-up comedian hurling abuse at YouTube :)

 Well you know when we're not on strike or ranting about our first
 lady, we need the vent :D

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] How to handle a cloned service from paid and free app?

2010-02-26 Thread Moto
I would like to make my life easier by having one common code base for
my service for both paid and free apps.  I want to eliminate the
complex merging I find my self doing every time I need to release!

As of now I had to change the service file name along with the Remote
service aidl calls.

Please any advice would be helpful!

-Moto!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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, send me logs! - code library for detecting force-close and sending logs

2010-02-26 Thread Dan Sherman
Just pointing out an alternative as well (I've used it in a few apps):
http://code.google.com/p/android-remote-stacktrace/

- Dan

On Fri, Feb 26, 2010 at 11:58 AM, dadical keyes...@gmail.com wrote:

 For those of you that are comfortable using Flurry, a similar approach
 works nicely.  Flurry already collects uncaught exceptions, but for
 some reason doesn't actually log the stack trace.  To get around this,
 I add an exceptionHandler that logs a Flurry event with the stack
 trace as a parameter, like this:

OutputStream lOS = new ByteArrayOutputStream();
PrintStream lPS = new PrintStream(lOS, true);
t.printStackTrace(lPS);
lPS.flush();
MapString, String lArgs = new HashMapString, String();
lArgs.put(stackTrace, lOS.toString());

SharedPreferences lPrefs =
 PreferenceManager.getDefaultSharedPreferences(pCtxt);
if(lPrefs.getBoolean(PREFS_REMOTE_DEBUG, true)){
FlurryAgent.onEvent(FLURRY_EVENT_UNCAUGHT_EXCEPTION,
 lArgs);
}

 One big advantage of this approach is that Flurry collects lots of
 metrics w.r.t. the frequency, timing, and sequencing of the events.
 Works very, very nicely.





 On Feb 26, 10:10 am, Streets Of Boston flyingdutc...@gmail.com
 wrote:
  I haven't made it public yet (i will at some point), but i have a
  similar system for my apps.
 
  The process of my activities registers itself by calling
  Thread.setDefaultUncaughtExceptionHandler(uncaughtXcptHandler) and
  binds to service that i wrote that runs in a different process (since
  my app will be dying because of an exception, it's tricky to properly
  handle the exception in the dying process itself).
 
  Then in the uncaughtXcptHandler.void uncaughtException(Thread t,
  Throwable e), I write out an error-log file with the stack-trace and
  some other info. Then i call an asynchronous method on my service that
  will pop up a dialog allowing the user to send me the error report or
  not. If the user clicks 'Yes', then the error-log file is read and
  sent to my webserver. My webserver then sends me an e-mail. This way,
  users can remain anonymous (no e-mail/reply address necessary).
 
  I let my app die immediately after calling the asynchronous method. If
  my app couldn't bind to the service for any reason, the old and
  trusted force-close message from Android is shown instead.
 
  On Feb 25, 3:10 pm, focuser linto...@gmail.com wrote:
 
   Hi fellow Android developers,
 
   How many times have you asked users to send you the logcat result to
   track down a nasty force-close?  How many users have actually replied?
 
   It's not that users are lazy or busy.  Having to run the logcat
   command or download an external log collector app just means too much
   trouble for them.  It should be much simpler.  It should be just one
   tap.
 
   In fact I'm surprised (or being ignorant) that an easier error
   reporting mechanism has not existed yet in the Android API, especially
   for the infamous force-close.  That is why I coded and open-sourced
   Android, send me logs!, a small code library that makes it easy to
   detect force-close and send logs from within your own apps.  You can
   program it to report errors with just one tap, and also include your
   own tracing information.
 
   Please check it out athttp://code.google.com/p/android-send-me-logs/.
   It's still in very early stage, and I would appreciate your critism,
   suggestions, comments, or even code contributions.
 
   Linton Ye

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] Any built-in intent for viewing a single image?

2010-02-26 Thread Mark Wyszomierski
Hi,

Is there a built-in intent which will let you pass it the path of an
image (png or jpg) and show it full-screen with panning / zooming
controls? Basically the same controls WebView has, but only for a
single image. I saw that iPhone has something like this, just
wondering if there's already something like this on android before
writing a new one,

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: Bluetooth A2DP/AVRCP profiles on Android

2010-02-26 Thread Matt
Did you look at this 
http://developer.android.com/intl/de/guide/topics/wireless/bluetooth.html

On Feb 25, 1:53 pm, Loco Moco fujimo...@us.panasonic.com wrote:
 Hello,

 I would like to develop a software using Bluetooth A2DP/AVRCP profiles
 on Android.
 I could not find the related API on the developer's website at this
 moment.
 But, I found a product by Sybase below.http://www.sybase.com/detail?id=1064424
 Do we have any other option?
 Thank you very much in advance.

 Regards,

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


Re: [android-developers] Any built-in intent for viewing a single image?

2010-02-26 Thread Mark Murphy
Mark Wyszomierski wrote:
 Is there a built-in intent which will let you pass it the path of an
 image (png or jpg) and show it full-screen with panning / zooming
 controls? Basically the same controls WebView has, but only for a
 single image. I saw that iPhone has something like this, just
 wondering if there's already something like this on android before
 writing a new one,

The Gallery has an activity for that. However, that probably only works
for images in the MediaStore, and I don't think it is documented. The
former may be a show-stopper for you; the latter is a show-stopper for
everyone.

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

Android App Developer Training: http://commonsware.com/training

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


Re: [android-developers] How to handle a cloned service from paid and free app?

2010-02-26 Thread Frank Weiss
This is a recurring question. I think it should be added to the Android dev
docs.

On Feb 26, 2010 9:39 AM, Moto medicalsou...@gmail.com wrote:

I would like to make my life easier by having one common code base for
my service for both paid and free apps.  I want to eliminate the
complex merging I find my self doing every time I need to release!

As of now I had to change the service file name along with the Remote
service aidl calls.

Please any advice would be helpful!

-Moto!

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Re: Obtain unicode string for Roslien Language

2010-02-26 Thread Bob Kerns
The Unicode Consortium has not addressed non-human languages. Not even
Klingon, whose script has been around for 30 years, even longer than
Unicode!

But if you Google unicode klingon, you can find how people have
addressed this for Klingon, e.g. using the Private Use area.

I'd also look around for a tool to examine the content of a .TTF file,
and identify what code points it assigns its characters to. If it does
NOT use a Private Use area, I'd remap it so it did so. Otherwise, it
will conflict with other characters. On the other hand, you'll also
need an input method to type them!

On Feb 25, 12:37 am, Takami Labs takamil...@gmail.com wrote:
 Hi,

 I have an assignment to be completed.
 The assignment needs sms texting service facility in Roslien Font (for
 each  English alphabet we have a corresponding alphabet in Roslien,
 something like  Wingdings) for Android platform.
 On going through the posts available on different forums in internet,
 I observed that in order to send a different language text, I need to
 send the sms as a unicode string.
 The problem is,  I have no  clue on how to obtain the unicode string
 for a completely  new font , Roslien.
 I have a  .ttf   file for the font which as such which contains the
 alphabets in the language.

 Please help me , how do I obtain unicode string for the particular
 font.

 Thanking You,

 Regards,
 Srikant Aggarwal
 Android Developer

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

2010-02-26 Thread Bob Kerns
Reflection is an old computer language term. Think of it as
referring to the ability of a language to see itself, as in a mirror.
Languages such as C and C++ don't have it. Java, Lisp, and many
scripting languages do.

On Feb 25, 8:46 pm, Nick Owens nicow...@gmail.com wrote:
 All:

 So I realized my date/time is already formatted by time zone and re-adding
 the default time zone was subtracting the time zone offset again from the
 time!  So, new code to replace the formatting function is below:

         Date date = df.parse(dateTime);

         if (sdk  3) {

                 finalDateTime = df.format(date);

         } else {

                 finalDateTime = DateUtils.getRelativeDateTimeString(this,
 date.getTime(), dateMin, dateMax, dateFlags).toString();

         }

 So, why is it called reflection anyways?  Is it like reflecting on all
 those previous SDK versions and thinking about the special times we had w/
 them?

 Thanks,
 Nick Owens
 VP, ThreeClix
 Office: (904) 429-7039
 Mobile: (847) 565-9392
 After Hours: (904) 540-5830



 -Original Message-
 From: Nick Owens [mailto:nicow...@gmail.com]
 Sent: Thursday, February 25, 2010 5:38 PM
 To: 'android-developers@googlegroups.com'
 Subject: RE: [android-developers] Re: FormatDateTime

 Mark (et. al. interested parties):

 Thank you for the example on reflection.  I got it working and thought it
 might be prudent to share my results w/ the world so the completed code is
 below.  For the record, this date value (as a string) is being retrieved
 from a SQLite database and the function formatDateTime() is used in a custom
 adapter for display of the date for each record in a ListView.

 This compiles in Eclipse using Android 1.5.  This allows me to set a minimum
 sdk version of 2, while still utilizing this really nifty date display
 function.

 --- -
 
 public class ResourcesList extends ListActivity {

         ...

         int sdk = new Integer(Build.VERSION.SDK).intValue();

         private static final long dateMin = 6;
         private static final long dateMax = (8640 * 2);
         private static final int dateFlags = 0;

         ...

         public String formatDateTime(String dateTime) {

                 if (dateTime == null) {

                         return Never;

                 } else {

                         String finalDateTime;

                         DateFormat df = new SimpleDateFormat(-MM-dd
 HH:mm:ss);

                         try {

                                 Date date = df.parse(dateTime);

                                 if (sdk  3) {

                                         finalDateTime = df.format(date);

                                 } else {

                                         long when = date.getTime();

                                         finalDateTime =
 DateUtils.getRelativeDateTimeString(this, (when +
 TimeZone.getDefault().getOffset(when)), dateMin, dateMax,
 dateFlags).toString();

                                 }

                         } catch (Exception e) {

                                 finalDateTime = Unknown;

                         }

                         return finalDateTime;

                  }

          }

         ...

 }

 Thanks,
 Nick Owens
 VP, ThreeClix
 Office: (904) 429-7039
 Mobile: (847) 565-9392
 After Hours: (904) 540-5830

 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
 Sent: Thursday, February 25, 2010 4:23 PM
 To: android-developers@googlegroups.com
 Subject: Re: [android-developers] Re: FormatDateTime

 Nick Owens wrote:
  On another note, is it possible to provide a conditional instruction for
  formatting date/time based on the user's Android package:

  if (package  1.1)  {

    //cooler date time format

  } else {

    //regular date time format

  }

 Yes, either via reflection or via conditional class loading.

  Let me guess?  It is technically possible, but not in Eclipse since
 Eclipse
  won't even let it compile w/ a function that doesn't compile.

 No, it should work fine. However, you need to compile for the higher
 version.

  Or can I
  build it for Android 1.2 but allow users of 1.1 to download it by
 specifying
  a different min-SDK level than it is built for?

 Dunno. What's Android 1.2? :-)

  If so, can I write a
  conditional instruction based on the device's SDK level?

 Yes, either via reflection or via conditional class loading.

 This was discussed here:

 http://stackoverflow.com/questions/2312321/how-to-use-contacts-api-fo...
 id-1-x-and-2-x-simultaneously

 and here:

 http://stackoverflow.com/questions/2044985/android-contactscontract-a...
 ding-across-multiple-sdk-versions

 Some sample projects are here:

 

[android-developers] Re: How to handle a cloned service from paid and free app?

2010-02-26 Thread Moto
Ok, any recurring answers?

On Feb 26, 1:24 pm, Frank Weiss fewe...@gmail.com wrote:
 This is a recurring question. I think it should be added to the Android dev
 docs.

 On Feb 26, 2010 9:39 AM, Moto medicalsou...@gmail.com wrote:

 I would like to make my life easier by having one common code base for
 my service for both paid and free apps.  I want to eliminate the
 complex merging I find my self doing every time I need to release!

 As of now I had to change the service file name along with the Remote
 service aidl calls.

 Please any advice would be helpful!

 -Moto!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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 
 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: Android, send me logs! - code library for detecting force-close and sending logs

2010-02-26 Thread Bob Kerns
I take it a step further, and send one event for each exception cause
(up to three).
I also process the stacktrace to make it more compact (taking out
filenames, removing package prefixes that I expect, etc.) so that more
trace fits within Flurry's limits.

I find it useful already, even though my app's not on the market yet.

Flurry's tools aren't quite ideal for this. You'd like to
automatically cluster errors, and present each one with a count, with
a graph and history available, and links to individual event traces.

I've done similar stuff in the past for server applications. It
really, really pays off.

On Feb 26, 8:58 am, dadical keyes...@gmail.com wrote:
 For those of you that are comfortable using Flurry, a similar approach
 works nicely.  Flurry already collects uncaught exceptions, but for
 some reason doesn't actually log the stack trace.  To get around this,
 I add an exceptionHandler that logs a Flurry event with the stack
 trace as a parameter, like this:

                 OutputStream lOS = new ByteArrayOutputStream();
                 PrintStream lPS = new PrintStream(lOS, true);
                 t.printStackTrace(lPS);
                 lPS.flush();
                 MapString, String lArgs = new HashMapString, String();
                 lArgs.put(stackTrace, lOS.toString());

                 SharedPreferences lPrefs =
 PreferenceManager.getDefaultSharedPreferences(pCtxt);
                 if(lPrefs.getBoolean(PREFS_REMOTE_DEBUG, true)){
                         FlurryAgent.onEvent(FLURRY_EVENT_UNCAUGHT_EXCEPTION, 
 lArgs);
                 }

 One big advantage of this approach is that Flurry collects lots of
 metrics w.r.t. the frequency, timing, and sequencing of the events.
 Works very, very nicely.

 On Feb 26, 10:10 am, Streets Of Boston flyingdutc...@gmail.com
 wrote:



  I haven't made it public yet (i will at some point), but i have a
  similar system for my apps.

  The process of my activities registers itself by calling
  Thread.setDefaultUncaughtExceptionHandler(uncaughtXcptHandler) and
  binds to service that i wrote that runs in a different process (since
  my app will be dying because of an exception, it's tricky to properly
  handle the exception in the dying process itself).

  Then in the uncaughtXcptHandler.void uncaughtException(Thread t,
  Throwable e), I write out an error-log file with the stack-trace and
  some other info. Then i call an asynchronous method on my service that
  will pop up a dialog allowing the user to send me the error report or
  not. If the user clicks 'Yes', then the error-log file is read and
  sent to my webserver. My webserver then sends me an e-mail. This way,
  users can remain anonymous (no e-mail/reply address necessary).

  I let my app die immediately after calling the asynchronous method. If
  my app couldn't bind to the service for any reason, the old and
  trusted force-close message from Android is shown instead.

  On Feb 25, 3:10 pm, focuser linto...@gmail.com wrote:

   Hi fellow Android developers,

   How many times have you asked users to send you the logcat result to
   track down a nasty force-close?  How many users have actually replied?

   It's not that users are lazy or busy.  Having to run the logcat
   command or download an external log collector app just means too much
   trouble for them.  It should be much simpler.  It should be just one
   tap.

   In fact I'm surprised (or being ignorant) that an easier error
   reporting mechanism has not existed yet in the Android API, especially
   for the infamous force-close.  That is why I coded and open-sourced
   Android, send me logs!, a small code library that makes it easy to
   detect force-close and send logs from within your own apps.  You can
   program it to report errors with just one tap, and also include your
   own tracing information.

   Please check it out athttp://code.google.com/p/android-send-me-logs/.
   It's still in very early stage, and I would appreciate your critism,
   suggestions, comments, or even code contributions.

   Linton Ye

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

2010-02-26 Thread DonFrench
Did you try using the Bluetooth Chat example without modification
except for changing the UUID?   That is what I did and it worked for
me.

On Feb 26, 1:53 am, Jamie jamie.higg...@gmail.com wrote:
 I am trying to establish a connection to another Bluetooth device on
 my Nexus One (2.1) with the following code, which occurs when on the
 broadcast receiver when a device is found.

 BluetoothDevice device = (BluetoothDevice)
 intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
 BluetoothSocket btSocket = null;

 try
 {
     btSocket = device.createRfcommSocketToServiceRecord(MY_UUID);
     BluetoothClass btClass = device.getBluetoothClass();
     Log.d(BLUETOOTH, -- createRfcommSocketToServiceRecord
 WORKED:  + btClass.toString());
     btSocket.connect();
     Log.e(BLUETOOTH, ON RESUME: BT connection established, data
 transfer link);}

 catch (IOException e)
 {
     Log.e(BLUETOOTH, IOException:  + e);

 }

 I have tried both the following UUIDs for both the SPP and OOP
 profiles:

 private static final UUID MY_UUID =
 UUID.fromString(1101--1000-8000-00805F9B34FB);
 private static final UUID MY_UUID =
 UUID.fromString(1105--1000-8000-00805F9B34FB);

 Every time I call the connect command I get an IOException with
 Service discovery failed. I have tried connecting to a G1, iPhone
 and a Nokia phone all with the same results.

 What am I doing wrong?

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

2010-02-26 Thread AndroidDev


On Feb 26, 11:22 am, Mark Murphy mmur...@commonsware.com wrote:
 Julian wrote:
  I am trying to get the MD5 Fingerprint to sign my applications.
  In the command prompt I inserted the following:

   $ keytool -list -alias androiddebugkey \
  -keystore path_to_debug_keystore.keystore \
  -storepass android -keypass android

  but I got the following error:

  '$' is not recognized as an internal or external command, operable
  program or batch file

 The $ in the instructions is the representation of your shell prompt --
 it is not part of the command, which begins with keytool.

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

 _Android Programming Tutorials_ Version 2.0 Available!

What do I have to set the shell prompt to in order to perform the
command?

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

2010-02-26 Thread Bob Kerns
I think in this situation, the IMEI is a better choice for identifying
when a trial has expired. You'd like to let them try your app on their
new fancy faster phone with the bigger screen!

The ANDROID_ID is a better choice (if it really is tied to the account
and not the phone?) if you're checking a paid license. But is there
value in doing that? It would seem to simply duplicate the fact that
they'd done the purchase in the market, and not provide any additional
security.

The IMEI approach works even for phones with no Market access, if
you're looking to sell your app via other channels. Does the
ANDROID_ID exist on devices even when there's no Marketplace?

On Feb 26, 7:13 am, Streets Of Boston flyingdutc...@gmail.com wrote:
 Thanks for the info! Especially the bit about the re-trial is
 interesting.

 But i have one question:
 You use the IMEI number. What if the user gets a new phone?
 Aren't app downloads tied to a user's Google Checkout account. If the
 user gets a new phone, uses the same Google Checkout account, he/she
 has to buy your app again. Shouldn't you use the 'ANDROID_ID' instead?

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


[android-developers] Re: what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

2010-02-26 Thread HeHe
Mark, thank you so much for the pointer and information!!

you are right on the tabs and activity. the view hierarchy depth of my
activity is only 6 but, because the activity is 'hosted' by another
TabActivity, the total depth on StackOverflowError exception is 13
(6+7).

what i don't understand is:

1). is the critical point measured by the depth of hierarchy or by the
total memory size used by all the views on the hierarchy?

2). how does setBackgroundResource() increase the depth or memory
usage of 'the stack'?


thanks again!!



On Feb 26, 9:06 am, Mark Murphy mmur...@commonsware.com wrote:
 HeHe wrote:
  it makes me wonder if my view layout has (easily) reached a critical
  point of stack size limit.

 Use hierarchyviewer both to determine your View hierarchy depth and
 determine where you may be able to consolidate some containers, to
 reduce the hierarchy depth and in turn eliminate your stack size problem.

 One of the reasons I rail against the use of activities as the contents
 of tabs, for example, is because doing so is very wasteful from a View
 hierarchy standpoint. Just switching those to be Views in tabs, rather
 than Activities in tabs, can clear up problems.

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

 Android Development Wiki:http://wiki.andmob.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] Re: what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

2010-02-26 Thread Mark Murphy
HeHe wrote:
 1). is the critical point measured by the depth of hierarchy or by the
 total memory size used by all the views on the hierarchy?

For StackOverflowException, the depth is more critical than the total,
AFAIK.

 2). how does setBackgroundResource() increase the depth or memory
 usage of 'the stack'?

It presumably triggers a different code path that makes more/deeper
nested set of calls.

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

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

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


[android-developers] Re: Intercepting incoming/outgoing email messages

2010-02-26 Thread Anonymous Guy
While I can understand your opinion, I'll have to disagree.  See these
below links:

http://www.blackberry.com/developers/docs/4.5.0api/net/rim/blackberry/api/mail/SendListener.html
http://www.blackberry.com/developers/docs/4.5.0api/net/rim/blackberry/api/mail/event/ViewListener.html

Maybe the insecurity you refer to comes from the core values of the
OS?  I don't know enough of Android to offer up an opinion, but I know
enough of the Blackberry OS to say that I've never heard of any
malware being installed that causes an issue, as there are avenues
of recourse and finding out who was directly responsible for anything
in the wild that was released.  As it is, the most secure OS allows
email interception (and, imho, for good reason), which directly
refutes the reason you put forth as the reason you are grateful for
this.


An Anonymous Guy


On Feb 26, 11:48 am, Mark Murphy mmur...@commonsware.com wrote:
 Anonymous Guy wrote:
  I'm going to guess this:

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

  still hasn't been addressed since almost a year ago.  I just went
  through the API and found nothing to intercept incoming and outgoing
  email messages.  Please, correct me if I'm wrong.

 You are correct. Intercepting incoming and outgoing email messages
 across the board is considered malware on most platforms, so I for one
 am grateful for this.

 Email clients are welcome to implement a plug-in or add-on architecture
 to allow third-party extensions. Such extensions would not have a
 blanket ability to intercepting incoming and outgoing email messages
 for the OS, but particular to that client. This is the approach taken by
 Microsoft Outlook (leastways, the last time I did Outlook add-ons),
 Mozilla Thunderbird
 (https://developer.mozilla.org/en/Extensions/Thunderbird/HowTos), etc.

 If you feel such a plug-in architecture is important, I would start with
 third-party mail clients (e.g., K9) and work with them to implement it
 and come up with a de facto standard. This will help anyone who uses
 those apps or buys a device with those apps pre-loaded. After
 demonstrating the value in real life, you may find it easier to work
 with the core Android team to implement the same architecture for the
 native email application, and the Gmail team may at some point elect to
 follow it as well.

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

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

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


[android-developers] Re: MD5 Fingerprint

2010-02-26 Thread AndroidDev


On Feb 26, 12:55 pm, AndroidDev julianvillalt...@gmail.com wrote:
 On Feb 26, 11:22 am, Mark Murphy mmur...@commonsware.com wrote:





  Julian wrote:
   I am trying to get the MD5 Fingerprint to sign my applications.
   In the command prompt I inserted the following:

    $ keytool -list -alias androiddebugkey \
   -keystore path_to_debug_keystore.keystore \
   -storepass android -keypass android

   but I got the following error:

   '$' is not recognized as an internal or external command, operable
   program or batch file

  The $ in the instructions is the representation of your shell prompt --
  it is not part of the command, which begins with keytool.

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

  _Android Programming Tutorials_ Version 2.0 Available!

 What do I have to set the shell prompt to in order to perform the
 command?

I figured the last part out but now I am getting the  error:
'keytool' is not recognized as an internal or external command

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

2010-02-26 Thread A R
Hey Bolha,

 Yes, I implemented the similar thing by overriding onKeyDown and
checking keycode

 Will be working on the incoming call case tomorrow :)

On Feb 26, 6:29 pm, Bolha lucasros...@gmail.com wrote:
 Hey, Amit!

 Specifically to the search button problem, I've found the following
 solution:

 case DIALOG_PROGRESS_SPINNER:
                         progressDialog = new ProgressDialog(this) {
                                 @Override

                                 public boolean onSearchRequested() {
                                         return false;
                                 }
                         };
                         
 progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
                         progressDialog.setMessage(Loading);
                         progressDialog.setCancelable(false);

                         return progressDialog;
                 }

 As the code above, try to override the onSearchRequested in the
 ProgressDialog class (or any other class you want no to be interrupted
 by the search box). If you return false, the event is invalidated and
 the search button isn't shown. But, for income calls and other events
 that interrupt you application, the dialog probably will be hidden.
 I was trying something related to the android:configChanges=..., but
 without success. If you find something that solves your problem in a
 more general way, please, let us know (hehe, I've just found my app
 suffers from something similar...)

 Thanks for the attention!

 Bolha

 On 26 fev, 03:52, A R amit.r...@gmail.com wrote:

  Bolha, Thanks for responding.

  Dialog is created using onCreateDialog and I am invoking it by
  showDialog(int id)

  Below is the code. When my PurchaseActivity starts I do not want the
  dialog to go away until I get response from the server but clicking on
  the search button removes it. For now I have created a customer
  ProgressDialog class and eating the search button, which makes sure
  dialog doesnt go, but there will be other scenarios like incoming call
  which will remove the dialog

  public abstract class MyBaseActivity extends Activity {
          public static final int DIALOG_PROGRESS_SPINNER = 3;

          Handler handler = new Handler();
          ProgressDialog progressDialog;

          protected Dialog onCreateDialog(int id) {
                  switch (id) {
                  case DIALOG_PROGRESS_SPINNER:
                          progressDialog = new ProgressDialog(this);
                          
  progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
                          
  progressDialog.setMessage(getString(R.string.loading));
                          progressDialog.setCancelable(false);

                          return progressDialog;
                  }
                  return super.onCreateDialog(id);
          }

  }

  public class PurchaseActivity extends MyBaseActivity {
          protected void onCreate(Bundle savedInstanceState) {
                  super.onCreate(savedInstanceState);

                  setContentView(R.layout.purchase_screen);

                  //do other stuff

                  handler.post(new Runnable() {

                          @Override
                          public void run() {
                                  showDialog(DIALOG_PROGRESS_SPINNER);
                                  //call asynch thread to do some server work 
  which will call
  listener in the same activity to dismiss dialog
                          }
                  });

          }

  }

  On Feb 26, 4:08 am, Bolha lucasros...@gmail.com wrote:

   Amit,

   How are you creating the dialog? Sometimes, when creating a dialog
   outside the overriden method onCreateDialog (from Activity class),
   the dialog can have strange behaviors (mainly because it sometimes the
   dialog instance is lacking a reference to its parent). Can you post a
   piece of your source code?

   Thanks

   Bolha

   On 25 fev, 16:53, A R amit.r...@gmail.com wrote:

Hi,

 I have an activity which starts with a progress bar and I do not want
the progress bar to go away until the processing is done, I have set
the dialog to be setCancelable(false) so now user cannot cancel it
with back but there are several other situations which hides the
dialog for eg pressing 'search'.

 On clicking of 'search' button the search box and keyboard pops up,
back button hides it and shows my activity which is always in the
background but the dialog is gone.

 I can disable the search button but ideally I would want dialog to
come back when the activity comes in foreground again. Any ideas how
to do it?

Regards,
Amit.



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

[android-developers] Re: what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

2010-02-26 Thread HeHe
thanks for the answers~_~

On Feb 26, 11:07 am, Mark Murphy mmur...@commonsware.com wrote:
 HeHe wrote:
  1). is the critical point measured by the depth of hierarchy or by the
  total memory size used by all the views on the hierarchy?

 For StackOverflowException, the depth is more critical than the total,
 AFAIK.

  2). how does setBackgroundResource() increase the depth or memory
  usage of 'the stack'?

 It presumably triggers a different code path that makes more/deeper
 nested set of calls.

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

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

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


Re: [android-developers] Re: Intercepting incoming/outgoing email messages

2010-02-26 Thread Mark Murphy
Anonymous Guy wrote:
 While I can understand your opinion, I'll have to disagree.

You are welcome to do so.

 Maybe the insecurity you refer to comes from the core values of the
 OS?

Android is pro-consumer and, therefore, anti-malware. This has side effects.

 I don't know enough of Android to offer up an opinion, but I know
 enough of the Blackberry OS to say that I've never heard of any
 malware being installed that causes an issue, as there are avenues
 of recourse and finding out who was directly responsible for anything
 in the wild that was released.

You mean like the email interceptor installed on Blackberries in the UAE
last summer, one that perhaps used the very APIs you wish Android to have?

http://news.bbc.co.uk/2/hi/8161190.stm
http://www.wired.com/threatlevel/2009/07/blackberry-spyware/

A BlackBerry software upgrade in the Middle East that turned out to be
an e-mail interception program was likely a buggy beta version of a
U.S.-made surveillance product, according to an analyst who dissected
the malicious code.

 As it is, the most secure OS allows
 email interception (and, imho, for good reason), which directly
 refutes the reason you put forth as the reason you are grateful for
 this.

You have a curious definition of secure considering the above
incident. For me, the Blackberry incident is a fantastic example of the
problem that I hope Android, Symbian, and/or Meego eventually resolve,
by giving users options for using firmware that has been vetted by
independent groups against such corporate- or government-sponsored
interception.

Hence, I don't care if there are avenues of recourse, since whether or
not those avenues are actually followed is determined by people with
many more dollars and many more tanks than I have.

In fact, this very issue is a large part of the reason why I'm helping
out Android.

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

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

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


[android-developers] Re: MD5 Fingerprint

2010-02-26 Thread AndroidDev
Nevermind I figured it out, Thanks anyway

On Feb 26, 1:18 pm, AndroidDev julianvillalt...@gmail.com wrote:
 On Feb 26, 12:55 pm, AndroidDev julianvillalt...@gmail.com wrote:





  On Feb 26, 11:22 am, Mark Murphy mmur...@commonsware.com wrote:

   Julian wrote:
I am trying to get the MD5 Fingerprint to sign my applications.
In the command prompt I inserted the following:

 $ keytool -list -alias androiddebugkey \
-keystore path_to_debug_keystore.keystore \
-storepass android -keypass android

but I got the following error:

'$' is not recognized as an internal or external command, operable
program or batch file

   The $ in the instructions is the representation of your shell prompt --
   it is not part of the command, which begins with keytool.

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

   _Android Programming Tutorials_ Version 2.0 Available!

  What do I have to set the shell prompt to in order to perform the
  command?

 I figured the last part out but now I am getting the  error:
 'keytool' is not recognized as an internal or external command

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

2010-02-26 Thread Anonymous Guy
We're never going to agree, that much I can see.  My opinion is that
the user should be able to install anything they want (it's their
device) and if they end up installing something that was malware, it's
their own fault.  Do you gladly sit and click on the EXE files you
have coming to you?  Probably not, as you know better.

You want to protect users by not giving developers APIs.  I want to
give developers APIs and have the users protect themselves.

And that OS patch when it came out, iirc, was pushed out by the
carrier.  That means that people got it from a trusted source -- any
system and any OS could be compromised if a trusted source gives
someone malware.


An Anonymous Guy


On Feb 26, 2:37 pm, Mark Murphy mmur...@commonsware.com wrote:
 Anonymous Guy wrote:
  While I can understand your opinion, I'll have to disagree.

 You are welcome to do so.

  Maybe the insecurity you refer to comes from the core values of the
  OS?

 Android is pro-consumer and, therefore, anti-malware. This has side effects.

  I don't know enough of Android to offer up an opinion, but I know
  enough of the Blackberry OS to say that I've never heard of any
  malware being installed that causes an issue, as there are avenues
  of recourse and finding out who was directly responsible for anything
  in the wild that was released.

 You mean like the email interceptor installed on Blackberries in the UAE
 last summer, one that perhaps used the very APIs you wish Android to have?

 http://news.bbc.co.uk/2/hi/8161190.stmhttp://www.wired.com/threatlevel/2009/07/blackberry-spyware/

 A BlackBerry software upgrade in the Middle East that turned out to be
 an e-mail interception program was likely a buggy beta version of a
 U.S.-made surveillance product, according to an analyst who dissected
 the malicious code.

  As it is, the most secure OS allows
  email interception (and, imho, for good reason), which directly
  refutes the reason you put forth as the reason you are grateful for
  this.

 You have a curious definition of secure considering the above
 incident. For me, the Blackberry incident is a fantastic example of the
 problem that I hope Android, Symbian, and/or Meego eventually resolve,
 by giving users options for using firmware that has been vetted by
 independent groups against such corporate- or government-sponsored
 interception.

 Hence, I don't care if there are avenues of recourse, since whether or
 not those avenues are actually followed is determined by people with
 many more dollars and many more tanks than I have.

 In fact, this very issue is a large part of the reason why I'm helping
 out Android.

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

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

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


Re: [android-developers] Re: Intercepting incoming/outgoing email messages

2010-02-26 Thread Greg Donald
On Fri, Feb 26, 2010 at 2:06 PM, Anonymous Guy
anonymousguygen...@gmail.com wrote:
 You want to protect users by not giving developers APIs.  I want to
 give developers APIs and have the users protect themselves.

Exactly.  Android is as only as open as Google allows it to be.


-- 
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.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Free Version of App

2010-02-26 Thread Streets Of Boston
I get your point! Thanks!

You're checking a trial/free license and not a paid license.

And when they change phones, you don't lock them out of your app if
they don't buy it again. Instead, you give them again another trial-
period.

Let me get this straight :)
- Users download your free app.
  It checks the license, using IMEI, and this gives them a 30-days
trial amount.
- When the license says that trial has expired:
  - They don't get your paid version. And that's it. If they
move to a new phone, they get another trial! This is nice for the
customers.
Since customers don't change phones every month, it's not bad for
the
developer either.
  - They do get your paid version. If they move to new phone
they may as well download your paid app again, since they already
paid for it.


On Feb 26, 1:57 pm, Bob Kerns r...@acm.org wrote:
 I think in this situation, the IMEI is a better choice for identifying
 when a trial has expired. You'd like to let them try your app on their
 new fancy faster phone with the bigger screen!

 The ANDROID_ID is a better choice (if it really is tied to the account
 and not the phone?) if you're checking a paid license. But is there
 value in doing that? It would seem to simply duplicate the fact that
 they'd done the purchase in the market, and not provide any additional
 security.

 The IMEI approach works even for phones with no Market access, if
 you're looking to sell your app via other channels. Does the
 ANDROID_ID exist on devices even when there's no Marketplace?

 On Feb 26, 7:13 am, Streets Of Boston flyingdutc...@gmail.com wrote:



  Thanks for the info! Especially the bit about the re-trial is
  interesting.

  But i have one question:
  You use the IMEI number. What if the user gets a new phone?
  Aren't app downloads tied to a user's Google Checkout account. If the
  user gets a new phone, uses the same Google Checkout account, he/she
  has to buy your app again. Shouldn't you use the 'ANDROID_ID' instead?- 
  Hide quoted text -

 - Show quoted text -

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


[android-developers] Re: Crash in glDrawElements() using VBOs just after glBufferData()

2010-02-26 Thread Viktor Linder
Sure!
It doesn't really do very much, just a wrapper around a buffer.
frame_reset() is called once each frame.

public class DynamicBuffer {
private static final int BUFFER_SIZE = 32*1024;
private static final int SCRATCH_SIZE = 32*1024;
private static int _p = 0;
public static FloatBuffer _buffer;
public static float _scratch[] = new float[SCRATCH_SIZE];


static {
_buffer = Util.create_floatbuffer(BUFFER_SIZE);
}

public static int allocate(int size) {
int r = _p;
_p += size;
if(_p  BUFFER_SIZE)
throw new RuntimeException(Dynamic buffer overflow);

return r;
}

// will only deallocate the last consecutive sequence of allocated
blocks
public static void deallocate(int size) {
_p -= size;
if(_p  0)
throw new RuntimeException(Dynamic buffer underflow);
}

// write to dynamic buffer at offset off (returned by allocate())
contents of buf at [buf_off,buf_off+buf_len)
public static void put(int off, float[] buf, int buf_off, int
buf_len) {
_buffer.position(off);
_buffer.put(buf, buf_off, buf_len);
}

public static void frame_reset() {
_p = 0;
}
}

public class Util {
...
public static FloatBuffer create_floatbuffer(int size) {
ByteBuffer bb = ByteBuffer.allocateDirect(size*4);
bb.order(ByteOrder.nativeOrder());
FloatBuffer fb = bb.asFloatBuffer();
return fb;
}
...
}

On 26 Feb, 00:49, Robert Green rbgrn@gmail.com wrote:
 Viktor,

 Would you be willing to show a bit of your DynamicBuffer code so I can
 see what it's doing?  It's hard for me to help when there's a black
 box in the middle.

 On Feb 25, 1:41 pm, Viktor Linder linder.vik...@gmail.com wrote:

  To clarify, in the original example, no buffer is allocated. The call
  to DynamicBuffer.allocate() simply moves a position in a previously
  allocated buffer which is filled each frame - ie. an arena
  allocator. DynamicBuffer.deallocate_last(size) simply moves the
  position back without destroying any memory.

  So it is not a gc issue. Also, while the buffer might get filled with
  junk it will still be valid floats of some sort, since the array is
  only written to from java.

  Best regards,
  Viktor Linder

  On 25 Feb, 20:08, Robert Green rbgrn@gmail.com wrote:

   Actually, let me clear something technical up.  I just realized that
   the OpenGL native side is using GetPrimitiveArrayCritical and not
   GetDirectBufferAddress.  I'm not sure why they decided to take that
   route but I'm sure there was a good reason for it.  The fact of the
   matter is that while GPAC doesn't guarantee the actual array address
   (it has the option to make a copy), it's most likely that it won't
   make a copy and will instead hand over the actual array address.  This
   of course depends on the VM's implementation.  The could have easily
   implemented it to always use the actual address.  Someone from that
   camp would have to comment because I'm not going to dig through
   Dalvik's source :)

   Read more about it 
   here:http://java.sun.com/j2se/1.3/docs/guide/jni/jni-12.html#GetPrimitiveA...

   That being said - all of what I talked about still stands.  It's just
   a different JNI function to get to it.

   On Feb 25, 12:39 pm, Robert Green rbgrn@gmail.com wrote:

Let me explain something.  Using directly allocated NIO buffers is a
DIRECT LINK between Java and native.  The pointer you get from (void
*)GetDirectBufferAddress points to the exact memory that the Java
buffer is using.  The memory is not managed in Java on the heap like
everything else.  This is one of the few cases where you can write to
natively accessible code that does not need to be copied to work on
like an array does.

It's not a copy.  It's the original buffer data that the native side
sees.  That memory will be freed when the Buffer's java object is GCed
(from no more references.)  It's safe to use that address so long as
you're still holding on to a reference to the Buffer (in Java, not
native.  That native pointer is only as good as the java
counterpart).  In the context of OpenGL, the memory is needed during
the GL bufferdata or GL array call and most likely during the draw
call (As that normally needs to read from system memory, particularly
with arrays) but I don't know if it needs it all the way to the end of
the flush.  One would have to ask why you'd be allocating/deallocating
memory in a real time simulation, though :)  Preallocation throughout
the sim would be the ideal solution and that wouldn't have issues with
invalidating memory before it's done being used.

Like 

[android-developers] Re: Task activity stack always reset when launched from Home

2010-02-26 Thread jotobjects
There was another thread about this recently.  This message summarizes
the behavior with singleTask

http://groups.google.com/group/android-developers/msg/471bef9e235f6c65

In short, with launchMode=singleTask the behavior after re-visiting
Home is different depending on whether the activity at the top of the
stack was started implicitly (with an intent filter) or explicitly
(with a class name).  ASFAIK this is not documented. Not clear if it
is a bug or not.


On Feb 26, 1:05 am, Neha nehas...@gmail.com wrote:
 Hi,

 Does anyone have any updates on this issue? I'm facing the same
 problem with my activity when launchMode=singleTask.
  - Launcher - Activity A (singleTask) - Activity B (standard)
  - Press HOME
  - Long-press HOME or go to Launcher
  - Activity A (B's onDestroy called)

 adb shell dumpsys activity shows only Activity A in the stack for
 this task. The intent flags are:
 Long press HOME - FLAG_ACTIVITY_NEW_TASK,
 FLAG_ACTIVITY_BROUGHT_TO_FRONT and FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
 Launcher - FLAG_ACTIVITY_NEW_TASK, FLAG_ACTIVITY_BROUGHT_TO_FRONT and
 FLAG_ACTIVITY_RESET_TASK_IF_NEEDED

 Any pointers on how to fix this would be helpful.
 Thanks!

 On Feb 17, 10:41 pm, Dianne Hackborn hack...@android.com wrote:

  When you say launch do you mean launching from Eclipse?  If so, there is a
  bug in older SDKs where this would use the wrong intent so when you later
  launch it from the launcher you would get a new task.

  You can use adb shell dumpsys activity to see the current state of the
  activity stack at whatever point you want to help diagnose what is going on.

  On Thu, Mar 26, 2009 at 8:55 AM, jseghers jsegh...@cequint.com wrote:

   The code that starts the .About activity is:
      protected void startAbout()
      {
          Intent aIntent = new Intent(this, About.class);
          startActivity(aIntent);
      }

   The Manifest entries for .UserLaunch and .About are in my original
   post.
   The intent that returns the task to the front is generated by the
   Launcher.

   What flags do I need to set (and where) to prevent this from
   happening? Is one of the default values causing it?

   My test case here is:
   1) launch .UserLaunch from the launcher
   2) start .About
   3) hit Home key
   4) launch .UserLuanch from the launcher

   There are no long delays in any of this, so the 30 minute auto-clear
   should not be invoked.

   - John

   On Mar 25, 12:15 pm, Dianne Hackborn hack...@android.com wrote:
That means you are using some CLEAR_TOP or finish flag in an intent or 
in
the manifest.  Or possibly it has been  30 minutes since the app was
   last
launched, in which case the system will restart it automatically.

On Wed, Mar 25, 2009 at 11:12 AM, jseghers jsegh...@cequint.com wrote:

 Thank you for your reply!

 I am seeing am_task_to_front followed by am_finish_activity.
 I found the event-log-tags file and apparently the reason is clear.
 What is not clear to me though is why the activity manager thinks it
 should clear the the task.

 The relevant lines of the log are:
 I/am_on_resume_called(   94): com.android.launcher.Launcher
 I/dvm_gc_info(   94):
 [7017575181485176104,-9053780441931634733,-4010030953047537782,8554533]
 I/force_gc(  209): bg
 I/dvm_gc_info(  209):
 [7163384747111232651,-9098816781953771608,-4017912252395432053,7919391]
 I/am_pause_activity(   52):
 [1128800640,com.android.launcher/.Launcher]
 I/am_task_to_front(   52): 3
 I/am_finish_activity(   52):
 [1129575992,3,com.cequint.cityid/.About,clear]
 I/am_destroy_activity(   52): [1129575992,3,com.cequint.cityid/.About]
 I/am_new_intent(   52):

   [112951,3,com.cequint.cityid/.UserLaunch,android.intent.action.MAIN,,,
 274726912]
 I/am_on_paused_called(   94): com.android.launcher.Launcher
 I/am_resume_activity(   52):
 [1129749080,3,com.cequint.cityid/.UserLaunch]
 I/am_on_resume_called(  209): com.cequint.cityid.UserLaunch
 I/dvm_gc_madvise_info(   94): [290816,245760]
 I/dvm_gc_madvise_info(  209): [352256,241664]
 I/force_gc(   94): bg

 - John
 On Mar 25, 10:16 am, Dianne Hackborn hack...@android.com wrote:
  You can do adb logcat -b events to see the event log which will
   include
 a
  line the activity manager prints when finishing an activity, with 
  the
 reason
  why it is doing it.

  On Tue, Mar 24, 2009 at 7:24 PM, jseghers jsegh...@cequint.com
   wrote:

   I am just starting on an Android app and I am puzzled about why my
   Task activity stack is being reset any time the application is
   launched from the Home screen.

   I used the ADT tools to create the application in Eclipse.
   The main activity is .UserLaunch and it starts the activity
   .About
   when the user presses a button.
   If the user then presses HOME and then relaunches the app,
   .UserLaunch
   is displayed 

[android-developers] Re: How to handle a cloned service from paid and free app?

2010-02-26 Thread Streets Of Boston
This is not optimal, but this is what i did.

Implement your service, aidl and related java classes in one of your
apps (either the free or the paid one) in your Android project. Make
sure that your service is up to snuff at some point and all runs well.
Be sure to put the aid and all related java classes under one package
name (or sub-packages). This makes it easier to move later.

Create a regular Java project. Use the android.sdk (instead of JDK1.5)
in the library path.
Physically move the package (and sub-packages) of your service code,
your aidl and your related java class, AND the java class generated
from your aidl, from your Android project to this new Java project.

Remove this package (and sub-packages) of your service code from your
Android project (including the java file generated by the aidl under
the 'gen' folder) if they are still there.

In your Android projects, both your paid and free version, link to the
newly created regular Java project that contains the code for your
service.

It works well for me.
However, if i need to make a change in the aidl, it won't re-generated
its java file, since it's no longer part of an Android project. That's
a downside.

In your Android projects subclass the class from your regular Java
project that is the Service. E.g. 'com.me.myapp.free.SomeService
extends MyService' and 'com.me.myapp.paid.SomeService extends
MyService', where 'MyService' is now defined in your regular Java
project. And put the SomeService in your Manifest.

On Feb 26, 12:39 pm, Moto medicalsou...@gmail.com wrote:
 I would like to make my life easier by having one common code base for
 my service for both paid and free apps.  I want to eliminate the
 complex merging I find my self doing every time I need to release!

 As of now I had to change the service file name along with the Remote
 service aidl calls.

 Please any advice would be helpful!

 -Moto!

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


[android-developers] Re: Developer Phone Number Listing

2010-02-26 Thread Streets Of Boston
You are required to hava a phone-number for your own checkout account.

But you are not required to put your phone-number on the Android
Market.
Go to your developer console, select your app and on the bottom, in
the 'Contact Information' remove your phone-number. Hit Save.

If customers still have your phone-number, maybe they get them from
market browsers such as cyrket and androlib. They got your number when
you first (and accidentally) listed it and they're slow to update your
changed market-info.
Or they just wrote down your number before you unlisted it.

On Feb 26, 10:35 am, polyclefsoftware dja...@gmail.com wrote:
 When I first started publishing Android apps as an indie developer, I
 posted my phone number on the app's submission page, thinking it would
 not be listed publicly. When I found out that it was, I removed the
 number from the app listing. I don't have the resources to handle
 phone support, and much prefer to handle support via email. Besides,
 there is no requirement that we provide phone support, as long as we
 provide support in some way, correct?

 Anyway, these days I'm getting fewer phone calls, but I'm still
 getting calls. We are required to list a phone number in our developer
 profile, but it is stated that this is used for Google to contact us
 directly in case there are issues.

 So where are users still getting my phone number, and how can I make
 sure it's not 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


[android-developers] Re: How to handle a cloned service from paid and free app?

2010-02-26 Thread Moto
Hi St. of Boston!

That's great feedback!  It's really nice to know what other developers
are doing!  I'll look into that...

-Moto!

On Feb 26, 3:39 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
 This is not optimal, but this is what i did.

 Implement your service, aidl and related java classes in one of your
 apps (either the free or the paid one) in your Android project. Make
 sure that your service is up to snuff at some point and all runs well.
 Be sure to put the aid and all related java classes under one package
 name (or sub-packages). This makes it easier to move later.

 Create a regular Java project. Use the android.sdk (instead of JDK1.5)
 in the library path.
 Physically move the package (and sub-packages) of your service code,
 your aidl and your related java class, AND the java class generated
 from your aidl, from your Android project to this new Java project.

 Remove this package (and sub-packages) of your service code from your
 Android project (including the java file generated by the aidl under
 the 'gen' folder) if they are still there.

 In your Android projects, both your paid and free version, link to the
 newly created regular Java project that contains the code for your
 service.

 It works well for me.
 However, if i need to make a change in the aidl, it won't re-generated
 its java file, since it's no longer part of an Android project. That's
 a downside.

 In your Android projects subclass the class from your regular Java
 project that is the Service. E.g. 'com.me.myapp.free.SomeService
 extends MyService' and 'com.me.myapp.paid.SomeService extends
 MyService', where 'MyService' is now defined in your regular Java
 project. And put the SomeService in your Manifest.

 On Feb 26, 12:39 pm, Moto medicalsou...@gmail.com wrote:

  I would like to make my life easier by having one common code base for
  my service for both paid and free apps.  I want to eliminate the
  complex merging I find my self doing every time I need to release!

  As of now I had to change the service file name along with the Remote
  service aidl calls.

  Please any advice would be helpful!

  -Moto!

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