[android-developers] Re: Extending ScrollView

2012-03-12 Thread Lazarus 101
you can use custom views in layout files like this:

your.package.name.YourScrollView
...
/your.package.name.YourScrollView

On Mar 12, 7:01 am, Put_tiMe putt...@gmail.com wrote:
 I might have to extend ScrollView and I would like to call it *myScrollView*
 .
 Is it possible to specify this *myScrollView* in the XML file itself?
 Or can it be done only programmatically?

 If it can be done only through code, then, can I squeeze in a layout
 specified in the XML file into *myScrollView?*
 So that *myScrollView* becomes the parent.

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


[android-developers] ViewPager, change page on page title click

2012-02-06 Thread Lazarus 101
Hi everyone, i'm using a ViewPager with a custom PagerAdapter. The
swipe works well but I would like to change the current page when the
title is clicked. The Market app has implemented this so I assume it
is achievable but I couldn't find a way to do it.

Thanks in advance

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


[android-developers] NoClassDefFoundError when starting an AIDL service

2011-01-09 Thread Lazarus 101
I have two projects, the first one has the aidl files and other
classes that will be shared with the client aps, and the second one
has the implementation for aidl. First project is set as a dependency
for the second one, everything compiles just fine and run. But when I
try to access the service from a client a get a Runtime error
NoClassDefFoundError.

01-09 18:48:28.003: ERROR/AndroidRuntime(11084):
java.lang.NoClassDefFoundError: my.app.MyService$1
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
my.app.myService.init(MyService.java:37)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
java.lang.Class.newInstanceImpl(Native Method)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
java.lang.Class.newInstance(Class.java:1429)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
android.app.ActivityThread.handleCreateService(ActivityThread.java:
2940)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
android.app.ActivityThread.access$3300(ActivityThread.java:125)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
android.os.Handler.dispatchMessage(Handler.java:99)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
android.os.Looper.loop(Looper.java:123)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
android.app.ActivityThread.main(ActivityThread.java:4627)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
java.lang.reflect.Method.invokeNative(Native Method)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
java.lang.reflect.Method.invoke(Method.java:521)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-09 18:48:28.003: ERROR/AndroidRuntime(11084): at
dalvik.system.NativeStart.main(Native Method)


The problem is fixed if I copy the aidl file in the second project so
that the generated java interface is in the gen folder from the
second project. But this is not a viable option because I have to use
a build server (I don't have direct access to it) and all aidl files
have to be in the first project.

Anyone else had a similiar problem?

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

2010-05-25 Thread Lazarus 101
multitouch for 3rd party apps works on my Desire. Just tried
multitouch visible test and it works.

On May 25, 8:21 pm, Robert Green rbgrn@gmail.com wrote:
 A user just told me that the built-in apps on his desire have working
 multitouch but none of the downloadable ones are working, including
 multitouch visible test and multitouch visualizer.  He said Dolphin HD
 is working.

 I'm a little confused.  Why would some apps get multiple touch points
 and others not?  Is there something in the manifest that we need to
 specify now for 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 
 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] SQLiteDatabaseCorruptException

2009-10-16 Thread Lazarus 101

Just got this exception on 1.6 emulator. Everything in my database was
lost, the db file was still there but the tables were gone. Did anyone
else experienced this? What might have caused this? I hope this is
just an emulator bug...

E/Database(  876): Failed to setLocale() when constructing, closing
the
database
E/Database(  876):
android.database.sqlite.SQLiteDatabaseCorruptException: database disk
image is malformed
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.native_setLocale(Native
Method)
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:
1637)
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java:
1587)
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.openDatabase
(SQLiteDatabase.java:638)
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:659)
...
E/Database(  876):  at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
E/Database(  876):  at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2364)
E/Database(  876):  at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)
E/Database(  876):  at android.app.ActivityThread.access$2100
(ActivityThread.java:
116)
E/Database(  876):  at android.app.ActivityThread$H.handleMessage
(ActivityThread.java:
1794)
E/Database(  876):  at android.os.Handler.dispatchMessage
(Handler.java:
99)
E/Database(  876):  at android.os.Looper.loop(Looper.java:
123)
E/Database(  876):  at android.app.ActivityThread.main
(ActivityThread.java:
4203)
E/Database(  876):  at java.lang.reflect.Method.invokeNative
(Native
Method)
E/Database(  876):  at java.lang.reflect.Method.invoke(Method.java:
521)
E/Database(  876):  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:
791)
E/Database(  876):  at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:
549)
E/Database(  876):  at dalvik.system.NativeStart.main(Native
Method)
E/Database(  876): Deleting and re-creating corrupt database /data/
data/com.test/test.db
E/Database(  876):
android.database.sqlite.SQLiteDatabaseCorruptException: database disk
image is malformed
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.native_setLocale(Native
Method)
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:
1637)
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java:
1587)
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.openDatabase
(SQLiteDatabase.java:638)
E/Database(  876):  at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:659)
...
E/Database(  876):  at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
E/Database(  876):  at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2364)
E/Database(  876):  at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)
E/Database(  876):  at android.app.ActivityThread.access$2100
(ActivityThread.java:
116)
E/Database(  876):  at android.app.ActivityThread$H.handleMessage
(ActivityThread.java:
1794)
E/Database(  876):  at android.os.Handler.dispatchMessage
(Handler.java:
99)
E/Database(  876):  at android.os.Looper.loop(Looper.java:
123)
E/Database(  876):  at android.app.ActivityThread.main
(ActivityThread.java:
4203)
E/Database(  876):  at java.lang.reflect.Method.invokeNative
(Native
Method)
E/Database(  876):  at java.lang.reflect.Method.invoke(Method.java:
521)
E/Database(  876):  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:
791)
E/Database(  876):  at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:
549)
E/Database(  876):  at dalvik.system.NativeStart.main(Native
Method)

E/Database(  876): Failure 1 (no such table: app_data) on 0x1d0b68
when preparing 'DELETE from app_data WHERE key='102''.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Disabling Contact Sync

2009-10-13 Thread Lazarus 101

Hi Jonathan,

do you mind sharing your solution with us?

I've managed to change the contacts sync settings like this:

final Uri CONTENT_URI = Uri.parse(content://sync/settings);

 //disable google sync
 ContentValues values = new ContentValues();
 values.put(name, sync_provider_contacts);
 values.put(value, false);
 context.getContentResolver().insert(CONTENT_URI, values);

//enable google sync
values = new ContentValues();
values.put(name, sync_provider_contacts);
values.put(value, true);
context.getContentResolver().insert(CONTENT_URI, values);


is there a better way to do it?


On Oct 7, 5:04 pm, Jonathan Herriott herri...@gmail.com wrote:
 So, I figured out a way to do it.  It's a way that things shouldn't be
 done since it requires using APIs that have @hide.

 On Oct 6, 4:18 pm, Jonathan Herriott herri...@gmail.com wrote:



  Hi,

  So, I'm trying to figure out a way to disable Auto-Sync of the
  Contacts database because there may be cases where my application
  tries to write 1000 contacts to the database, which can take a very
  long time.  I've noticed that some apps on the market have the ability
  to disable syncing, but I can't find a way to do it.  I've noticed
  that there are two permission:

  android.permission.WRITE_SYNC_SETTINGS
  android.permission.READ_SYNC_SETTINGS

  but I can't find where these are used in the Android source code.  I
  don't even need to disable gmail/calendar syncing, I just need to
  disable Contact syncing.  Any help would be great.

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

2009-10-13 Thread Lazarus 101

try baksmali http://code.google.com/p/smali/

On Oct 7, 5:39 am, Raja Nagendra Kumar nagendra.r...@tejasoft.com
wrote:
 Hi,

 Is there a way to unzip and see what files exists in classes.dex file.
 Are there winzip like utilities for .dex viewers.

 Regards,
 Raja Nagendra Kumar,
 C.T.Owww.tejasoft.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: get outgoing call details in background

2009-10-13 Thread Lazarus 101

just remove startManagingCursor and call the close() method on the
cursor when you've finished reading from it

On Oct 13, 5:02 am, Nemat nemate...@gmail.com wrote:
 @Roman

 But How would we get the state when the call is received?I mean call
 duration means the difference of the time when call is received and
 the time when the call is disconnected.OFFHOOK is the state when caLL
 is placed.So we should be notified when the call is received.How can
 we get that?

 @nEx.Software

 if its not possible with service then it is of no use for me.

 Anyways is there any way to read the call-log in service?

 On Oct 12, 11:08 pm, nEx.Software email.nex.softw...@gmail.com
 wrote:

  You are getting the error on startManagingCursor because that method
  does not exist in a Service.
  Leave that out and make sure you close the cursor when you are done
  with it.

  On Oct 12, 11:00 am, Roman ( T-Mobile USA) roman.baumgaert...@t-

  mobile.com wrote:
   You should be able to measure the time between multiple
   onCallStateChanged events.

   In case of an outgoing call the state would switch from IDLE to
   CAll_STATE_OFFHOOK to to IDLE again.

   --
   Roman Baumgaertner
   Sr. SW Engineer-OSDC
   ·T· · ·Mobile· stick together
   The views, opinions and statements in this email are those of the
   author solely in their individual capacity, and do not necessarily
   represent those of T-Mobile USA, Inc.

   On Oct 12, 3:14 am, Nemat nemate...@gmail.com wrote:

Hi friends,

Actually I was working to get duration of outgoing call.But I dont
find any way of doing this.Then I decided to get the details of
outgoing call from call log.

But my code works only for Activity.I want this to work with Services
because I want to get the details related to outgoing call in
background using services.What should I do to get these details in
background.I currently implement it for Activity.Here is my complete
code:
public void outgoingRecord()
  {
          Cursor c = getContentResolver().query(
              android.provider.CallLog.Calls.CONTENT_URI,
              null,
              null,
              null,
              android.provider.CallLog.Calls.DATE+  DESC);
          startManagingCursor(c);

  int numberColumn = c.getColumnIndex(
          android.provider.CallLog.Calls.NUMBER);
int dateColumn = c.getColumnIndex(
          android.provider.CallLog.Calls.DATE);
// type can be: Incoming, Outgoing or Missed
int typeColumn = c.getColumnIndex(
          android.provider.CallLog.Calls.TYPE);
int durationColumn=c.getColumnIndex(
        android.provider.CallLog.Calls.DURATION);

// Will hold the calls, available to the cursor
ArrayListString callList = new ArrayListString();

try{
boolean moveToFirst=c.moveToFirst();
Log.d(MOVETOFIRST, moveToFirst=+moveToFirst);}

catch(Exception e)
{
          Log.e(MOVETOFIRSTERROR,MOVETOFIRST Error=+e.toString());

}

         String callerPhoneNumber = c.getString(numberColumn);
         int callDate = c.getInt(dateColumn);
         int callType = c.getInt(typeColumn);
         int duration=c.getInt(durationColumn);

         Log.d(CALLS, callDate=+callDate);

             switch(callType){
              case android.provider.CallLog.Calls.INCOMING_TYPE:

                          Log.d(INCOMINGCALLLOG, CallerPhoneNum=+
callerPhoneNumber+ +Duration=+duration);

                                break;
              case android.provider.CallLog.Calls.MISSED_TYPE:
                                  break;
              case android.provider.CallLog.Calls.OUTGOING_TYPE:
                             Log.d(OUTGOINGCALLLOG,
CallerPhoneNum=+ callerPhoneNumber+ +Duration=+duration);
                                 break;

}

  }

I got error in   startManagingCursor(c).

Should I use another way to do this?If yes,What would be that way?- 
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: Alarm is canceled if app is stopped

2009-10-13 Thread Lazarus 101

Hi Nicolas,

I'm using your app on my personal phone, but I kill apps from the Task
Bar widget, so I chose carefully which one I want to kill, but most
users are using the other widget which only displays the number of
apps running and kills all (except system apps and those on ignore
list) of them if clicked.
Well I guess the only thing I can do is warn my users about this...



On Oct 13, 6:50 pm, Nicolas Thibaut nthibau...@gmail.com wrote:
 :)
 I am the taskiller developper.

 If an user choose to kill your app. Your app may not be restarted.

 Users are using taskiller because too more apps have bad  implemention
 of  broadcasters.
 Too many apps are launching without user action, like uninstalled
 widgets, because they receive
 Broadcast and dont verify the effective use of the app.
 Too many apps are implementing Start on boot when not needed.

 With taskiller, users are checking that too many apps are loaded on
 startup and 50% of these apps are not useful at startup(like
 meeboo,facebook,.. )

 Too many apps are not explaining what they do. If your apps are using
 background service, inform the user that the app will stay
 in background, and maybe the users will not kill stupidly your app.

 And the bad news is that others task managers are implementing
 autokill or Boot killwhich can made many apps crashing (if
 your app use an intents to another app...if this app is autokilled
 your app will never worl :( ...

 On Oct 13, 1:09 am, Lazarus 101 lazarus...@gmail.com wrote:

  Thanks Dianne for the quick answer.

  ActuallyTasKilleris not automatically killing apps, but it has a
  widget that allows users to kill (almost) all apps with one click.
  Most of the Android users that I know are using something similar 
  toTasKillerso this is a tricky problem, users will blame my app for not
  doing what it says it does.
  I saw there is a PACKAGE_RESTARTED broadcast but obviously the
  restarted package does not receive the notification so there's not
  much I can do to fix this problem...

  Having applications that can affect the functionality of every other
  apps installed on the system is not such a good idea IMHO. A Task
  Manager is needed but the user should be clearly informed that the
  apps he choses to kill are not working anymore because that's exactly
  what he wanted. Also the permission is called restart other
  application it should be kill other applications, that's why I
  thought alarms are not affected by this and that services are getting
  restarted (I saw services being restarted after crashes or after being
  killed due to lack of memory so I though it's the same behaviour when
  calling ActivityManager.restartPackage).

  On Oct 12, 11:22 pm, Dianne Hackborn hack...@android.com wrote:

   That is intentional.  Stopping an application is there for the user to 
   stop
   everything associated with it -- processes, alarms, services, 
   notifications,
   etc.  They will not be restarted until someone explicitly does so 
   (typically
   this would be the user re-launching the app and having it do the 
   appropriate
   thing).

   It sounds likeTasKilleris abusing this API.  The API is there for the user
   to explicitly stop an app from running without going to the most extreme
   measure of uninstalling the app.  Trying to use it to automatically stop
   things behind the user's back seems...  questionable, and probably not 
   what
   the user actually wants.

   On Mon, Oct 12, 2009 at 1:00 PM, Lazarus 101 lazarus...@gmail.com wrote:

I have an app that does some polling every 2 hours. I set a repeating
   alarmthat starts a service but I have noticed that if I use some task
manager (e.g.TasKiller) to kill my app then the polling will not be
performed from that moment on. I know this because I store the time of
the last poll, I have also checked the server logs and there are no
requests received from the client after I force close my app.
Is this the way alarms work or should I look somewhere else for a
crash or smth? because if alarms really get canceled then how should
we implement the polling?

I'm also interested in what happens with a running service  if it gets
killed from another app (I assume all task managers are using
ActivityManager.restartPackage() to kill other apps), does it get
restarted?

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see 
   and
   answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers

[android-developers] Alarm is canceled if app is stopped

2009-10-12 Thread Lazarus 101

I have an app that does some polling every 2 hours. I set a repeating
alarm that starts a service but I have noticed that if I use some task
manager (e.g. TasKiller) to kill my app then the polling will not be
performed from that moment on. I know this because I store the time of
the last poll, I have also checked the server logs and there are no
requests received from the client after I force close my app.
Is this the way alarms work or should I look somewhere else for a
crash or smth? because if alarms really get canceled then how should
we implement the polling?

I'm also interested in what happens with a running service  if it gets
killed from another app (I assume all task managers are using
ActivityManager.restartPackage() to kill other apps), does it get
restarted?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Alarm is canceled if app is stopped

2009-10-12 Thread Lazarus 101

Thanks Dianne for the quick answer.

Actually TasKiller is not automatically killing apps, but it has a
widget that allows users to kill (almost) all apps with one click.
Most of the Android users that I know are using something similar to
TasKiller so this is a tricky problem, users will blame my app for not
doing what it says it does.
I saw there is a PACKAGE_RESTARTED broadcast but obviously the
restarted package does not receive the notification so there's not
much I can do to fix this problem...

Having applications that can affect the functionality of every other
apps installed on the system is not such a good idea IMHO. A Task
Manager is needed but the user should be clearly informed that the
apps he choses to kill are not working anymore because that's exactly
what he wanted. Also the permission is called restart other
application it should be kill other applications, that's why I
thought alarms are not affected by this and that services are getting
restarted (I saw services being restarted after crashes or after being
killed due to lack of memory so I though it's the same behaviour when
calling ActivityManager.restartPackage).


On Oct 12, 11:22 pm, Dianne Hackborn hack...@android.com wrote:
 That is intentional.  Stopping an application is there for the user to stop
 everything associated with it -- processes, alarms, services, notifications,
 etc.  They will not be restarted until someone explicitly does so (typically
 this would be the user re-launching the app and having it do the appropriate
 thing).

 It sounds like TasKiller is abusing this API.  The API is there for the user
 to explicitly stop an app from running without going to the most extreme
 measure of uninstalling the app.  Trying to use it to automatically stop
 things behind the user's back seems...  questionable, and probably not what
 the user actually wants.



 On Mon, Oct 12, 2009 at 1:00 PM, Lazarus 101 lazarus...@gmail.com wrote:

  I have an app that does some polling every 2 hours. I set a repeating
  alarm that starts a service but I have noticed that if I use some task
  manager (e.g. TasKiller) to kill my app then the polling will not be
  performed from that moment on. I know this because I store the time of
  the last poll, I have also checked the server logs and there are no
  requests received from the client after I force close my app.
  Is this the way alarms work or should I look somewhere else for a
  crash or smth? because if alarms really get canceled then how should
  we implement the polling?

  I'm also interested in what happens with a running service  if it gets
  killed from another app (I assume all task managers are using
  ActivityManager.restartPackage() to kill other apps), does it get
  restarted?

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can i start my own activity for new notification?

2009-08-04 Thread Lazarus 101

you want to display a notification and when the user selects it
display an activity?

NotificationManager mNotificationManager = (NotificationManager)
getSystemService(NOTIFICATION_SERVICE);

Intent intent = new Intent(context, Screen.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

PendingIntent contentIntent = PendingIntent.getActivity(
this, 0, intent, 0);

Notification not = new Notification(R.drawable.icon,
ticker text, System.currentTimeMillis());

not
.setLatestEventInfo(
   context,
contentTitle,
contentText,
contentIntent);

mNotificationManager.notify(Constants.NOTIFICATION_ID,
not);


or do you want to show your own activity for any notification fired by
other apps? if this is the case I don't think it's possible and I also
don't see why would you want to do that.

Best regards.

On Aug 4, 7:37 am, android.vinny vinny.s...@gmail.com wrote:
 Hi

 How can i start my own activity when a new notification arrives to our
 status bar if click that notification my activity should play...

 any body guide me regarding this...
 thanks a lot in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How can i start my own activity for new notification?

2009-08-04 Thread Lazarus 101

you want to display a notification and when the user selects it
display an activity?

NotificationManager mNotificationManager = (NotificationManager)
getSystemService(NOTIFICATION_SERVICE);

Intent intent = new Intent(context, Screen.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

PendingIntent contentIntent = PendingIntent.getActivity(
this, 0, intent, 0);

Notification not = new Notification(R.drawable.icon,
ticker text, System.currentTimeMillis());

not
.setLatestEventInfo(
   context,
contentTitle,
contentText,
contentIntent);

mNotificationManager.notify(Constants.NOTIFICATION_ID,
not);


or do you want to show your own activity for any notification fired by
other apps? if this is the case I don't think it's possible and I also
don't see why would you want to do that.

Best regards.

On Aug 4, 7:37 am, android.vinny vinny.s...@gmail.com wrote:
 Hi

 How can i start my own activity when a new notification arrives to our
 status bar if click that notification my activity should play...

 any body guide me regarding this...
 thanks a lot in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: .Net support

2009-08-03 Thread Lazarus 101



On Jul 31, 7:27 am, smehaffie pcresources...@gmail.com wrote:
 If Google was smart it would do the following the following:

 1) Make is so it support running native .Net application on it and
 create SDK for .Net:


oh yeah, depending on m$ technology would be really smart. The only
multiplatform, free .net implementation that I know is Mono and I
haven't heard too many positive things about it. Even Mono would
probably require some work to be ported on Android, so why would they
do that when they have Dalvik  a very nice and light VM optimized for
low memory.


 * This would open up millions of .Net developers so they can create
 programs for Android without having to learn a new programming
 language.

then millions of Java developers would have to learn a new
programming language, and most of the mobile developers know Java ME
not .NET. Besides the Java syntax is very similar to C#, it wouldn't
take more than 1-2 weeks for a good .NET developer to get to know the
basics classes and packages from Java. All developers who start
programming


 Benefits to Google:

 * Use MS development environment/framework to write application for
 their mobile platform.  This might just be enough to either get MS to
 get there butts in gear and make their mobile platform competive, or
 just give up on the mobile front.

M$ development environment is not multiplatform nor free. So what
about developers who are using Linux or Mac?


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

2009-07-26 Thread Lazarus 101

Hi Ronald,

My guess is that they are using an activity with transparent
background. Just use handler.postDelayed(...) in your
PhoneStateListener with 1 or 2 seconds delay to make sure your
activity  will be displayed on top of the incoming call screen so it
will look like a popup on top of it. Also, make sure you finish your
activity when the phone state changes again (i.e. user answers or
rejects the call).

On Jul 21, 3:57 pm, Ronald Pompa ronald.po...@gmail.com wrote:
 Hi.

 I've got a PhoneStateListener to see call state changes, when a call
 is incoming I make my app show a toast notification to display caller
 data which I retrieve from a search service. Due to toasts limitation,
 i would like to show a dialog instead which allows me to show the
 notification longer and customize it with imageviews etc...

 The problem is that when I implement the dialog and execute the show
 method in the state listener class, my application crashes.

 Does anyone know how to implement this and have an example? It seems
 like WhitePages have solved this with their Caller ID app.

 http://blog.whitepages.com/2009/02/27/caller-id-by-whitepages-a-new-a...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to autorun program when Android start running?

2009-07-23 Thread Lazarus 101

Try using Runtime.getRuntime.exec(/path/to/yourprogram) in the
BOOT_COMPLETED receiver

On Jul 23, 4:58 am, bluestar bluestar8...@gmail.com wrote:
 Dear Sir:

 The reference is for android application.
 My program was linux program and I used adb to connect FR to
 execute it.
 The commands are like below

   1. after connecting to FR
   2. #cd /data/app
   #./myprogram

 I hope these program would auto-run after entering Android OS.
 Could you have one sample code to provide?

 Thanks for your big help.

 On 7月22日, 下午10時00分, Micah mi...@ourmailbox.net wrote:

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

  On Jul 22, 5:09 am, bluestar bluestar8...@gmail.com wrote:

   I have one program and I used adb to connect FR to execute it.
   I hope this program would auto-execute when entering Android OS of FR
   How to add it to initial schedule? Modify init.rc or some files?

   Thanks for your big help.- 隱藏被引用文字 -

  - 顯示被引用文字 -


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



[android-developers] Re: Dose Android sdk 1.5 allow to create our own screen when a call is in or out

2009-07-16 Thread Lazarus 101

I've seen an app that displays a popup on top of the incoming call
screen with a button on the lower part of the screen that allows the
user to send a text saying i'm busy or smth, the in call screen
functionality is not altered in any way. How is that possible? Is it a
Toast?

On Jul 16, 6:37 am, Ivy ytang1...@gmail.com wrote:
 When a call in or out,what does the android do ?Get the changed state
 and turn to the default screen?
 Where is it in th source code?I cant find it ...In which class?

 On 7月16日, 上午9时33分, Jason Proctor jason.android.li...@gmail.com
 wrote:



  if you bring up an Activity with UI when the phone state listener
  goes off, the call UI appears on top of it. you can hit the back
  button to get back to your Activity, but, again, there is no current
  way to override the call UI.

  you have to live with it for now.

  Could i just intercept the incoming and ourgoing calls then let my
  screen be top of the screen?
  Or i just need to listen the phone's state?

  I don't want to modify the firmware.That's really a huge work.I'm just
  learing Android for 10 days

  --
  jason.software.particle

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