[android-developers] Re: what is wrong with AppWidgetManager.getAppWidgetIds()?

2010-10-20 Thread Jerome Deng
Hi Kostva,
Long time no access.
The widgetprovider name is right.
Refer to "which widget coming", I meant that if the same widget
provider has different widget instances on Home Screen, then we can
not know what is the ID of the current widget that the user interacts
with.
Through getAppWidgetIds() method, I wanted to get how many instances
of widget that the same widget provider owns. But it failed.

I still have no idea of this.
Thanks

On Sep 21, 6:08 pm, Kostya Vasilyev  wrote:
> Make sure that ComponentName you use to get AppWidgetManager matches the
> widget provider in the manifest. If it doesn't, you'll get an empty list
> (ids.length = 0, the loop won't execute).
>
> Not sure what you mean by "which widget coming".
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com
>
> 21.09.2010 11:56 пользователь "Jerome Deng"  написал:
>
> Hi guys,
> I have searched many topics about AppWidgetManager.getAppWidgetIds().
> But I don't get any compellent answers. In my code, I first get all
> widget ids by
> AppWidgetManager.getAppWidgetIds(provider), and then do a for loop as
> below:
> for (int id : ids) {...}
> However, I see the for loop never executed. And if I call ids.length,
> the sentence never executed yet.
>
> Some people said getAppWidgetIds() can not return the right id set,
> that is because the some widgets were deleted but their ids are still
> there.
>
> My target is to know how many widgets are created by the specified
> widget provider, so I think getAppWidgetIds() can meet this. But it
> fails now.
>
> I think getAppWidgetIds() has something wrong, and the widget
> framework should fix this. Also, in widget provider, if it can
> distinguish which widget instance is coming, that means the current
> widget id can be passed in, then all things will be better. Why not do
> this in widget framework?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Apps running cuncurrently

2010-09-21 Thread Jerome Deng
If there is less memory available, the resource used by the paused
apps will be recycled by Davilk VM.
When you open the first app again, it will be relaunched. But not all
previously opened apps must restarted, as they may be still in paused
state.

On Sep 21, 2:10 pm, parag  wrote:
> hi folks,
>
> i have a situation, i want to know that following,
>
> suppose I have opened 9 apps,  i want to open the 10th one,
> The previous opened apps are in background,
>
> if there is less memory available, will some of the earlier opened app
> be closed without notification or the state will be saved , so that
> when i open the first app again it will resume rather then start all
> over again?
>
> reg
> Parag

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

2010-09-21 Thread Jerome Deng
Try to add below lines to your app2's manifest file:



On Sep 21, 2:57 pm, Sohan badaya  wrote:
> Hi All,
>
> I have a doubt regarding content provider.My doubt is
> I create a app1 that creates ContentProvider and in second
> application(app2) i am using app1's contentprovider methods(like
> insert, update etc). It's working fine
> but i want to set some permissions in app1, so that if any other app
> wants to use that provider it must have to get this permissions( permissions) then only it should be able to use providers.
>
> But when i write
>                          android:name="MyContactsProvider"
>                         android:authorities="com.permission.test"
>                         android:readPermission="android.permission.permRead"
>                         
> android:writePermission="android.permission.permWrite"/>
>
> in app1, other applications are not being able to use provider. I want
> to know what is the tag that i have to write in other application to
> use provider.
>
> Please help me for the same.
>
> Thanks and Regards,
> Sohan Badaya

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

2010-09-21 Thread Jerome Deng
Hi guys,
I have searched many topics about AppWidgetManager.getAppWidgetIds().
But I don't get any compellent answers. In my code, I first get all
widget ids by
AppWidgetManager.getAppWidgetIds(provider), and then do a for loop as
below:
for (int id : ids) {...}
However, I see the for loop never executed. And if I call ids.length,
the sentence never executed yet.

Some people said getAppWidgetIds() can not return the right id set,
that is because the some widgets were deleted but their ids are still
there.

My target is to know how many widgets are created by the specified
widget provider, so I think getAppWidgetIds() can meet this. But it
fails now.

I think getAppWidgetIds() has something wrong, and the widget
framework should fix this. Also, in widget provider, if it can
distinguish which widget instance is coming, that means the current
widget id can be passed in, then all things will be better. Why not do
this in widget framework?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Why Monkey was stopped by "Error: RemoteException while injecting event." ?

2010-07-04 Thread Jerome Deng
I met such issue for many times recently.
Sundar, I have a dump file, but seems there is no stack trace.
Any suggestions?


On Jun 29, 12:43 pm, "deepa.sundar...@wipro.com"
 wrote:
> Do you get a stack trace?
> The reason what caused the remote exception would have been mentioned
> in Monkey logs.
> You need to handle that exception in your code to resolve the error.
>
> Android Programmer.
>
> On Jun 28, 9:20 pm, Jerome Deng  wrote:
>
> > I see every time when monkey stopped, the log file contains  such info
> > "System appears to have crashed at event...".
> > So the root cause need further analysis.
> > Not sure if network timeout causes RemoteException .
>
> > On 6月29日, 上午11时16分, Dianne Hackborn  wrote:
>
> > > As the last line says, this is usually because the system process has
> > > crashed.
>
> > > On Mon, Jun 28, 2010 at 7:31 PM, Jerome Deng  
> > > wrote:
> > > > Hi buddies,
> > > > I am doing monkey test for my APP, and I meet RemoteException many
> > > > times. I don't know why remote-invocation errors occurs. Has anyone
> > > > experienced such exception?
>
> > > > Monkey Log snippet:
> > > > :Sending Pointer ACTION_MOVE x=-1.0 y=-3.0
> > > > :Sending Pointer ACTION_DOWN x=322.0 y=77.0
> > > > :Sending Pointer ACTION_UP x=322.0 y=77.0
> > > > :Sending Pointer ACTION_DOWN x=299.0 y=488.0
> > > > ** Error: RemoteException while injecting event.
> > > > Events injected: 11088
> > > > :Dropped: keys=0 pointers=2 trackballs=0 flips=0
> > > > ## Network stats: elapsed time=1511978ms (1511978ms mobile, 0ms wifi,
> > > > 0ms not connected)
> > > > ** System appears to have crashed at event 11088 of 56000 using seed
> > > > 25194847
>
> > > > 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
>
> > > --
> > > 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: Why Monkey was stopped by "Error: RemoteException while injecting event." ?

2010-06-28 Thread Jerome Deng
I see every time when monkey stopped, the log file contains  such info
"System appears to have crashed at event...".
So the root cause need further analysis.
Not sure if network timeout causes RemoteException .

On 6月29日, 上午11时16分, Dianne Hackborn  wrote:
> As the last line says, this is usually because the system process has
> crashed.
>
>
>
>
>
>
>
> On Mon, Jun 28, 2010 at 7:31 PM, Jerome Deng  wrote:
> > Hi buddies,
> > I am doing monkey test for my APP, and I meet RemoteException many
> > times. I don't know why remote-invocation errors occurs. Has anyone
> > experienced such exception?
>
> > Monkey Log snippet:
> > :Sending Pointer ACTION_MOVE x=-1.0 y=-3.0
> > :Sending Pointer ACTION_DOWN x=322.0 y=77.0
> > :Sending Pointer ACTION_UP x=322.0 y=77.0
> > :Sending Pointer ACTION_DOWN x=299.0 y=488.0
> > ** Error: RemoteException while injecting event.
> > Events injected: 11088
> > :Dropped: keys=0 pointers=2 trackballs=0 flips=0
> > ## Network stats: elapsed time=1511978ms (1511978ms mobile, 0ms wifi,
> > 0ms not connected)
> > ** System appears to have crashed at event 11088 of 56000 using seed
> > 25194847
>
> > 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
>
> --
> 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] Why Monkey was stopped by "Error: RemoteException while injecting event." ?

2010-06-28 Thread Jerome Deng
Hi buddies,
I am doing monkey test for my APP, and I meet RemoteException many
times. I don't know why remote-invocation errors occurs. Has anyone
experienced such exception?

Monkey Log snippet:
:Sending Pointer ACTION_MOVE x=-1.0 y=-3.0
:Sending Pointer ACTION_DOWN x=322.0 y=77.0
:Sending Pointer ACTION_UP x=322.0 y=77.0
:Sending Pointer ACTION_DOWN x=299.0 y=488.0
** Error: RemoteException while injecting event.
Events injected: 11088
:Dropped: keys=0 pointers=2 trackballs=0 flips=0
## Network stats: elapsed time=1511978ms (1511978ms mobile, 0ms wifi,
0ms not connected)
** System appears to have crashed at event 11088 of 56000 using seed
25194847

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: what is the detailed relation between contacts and raw_contacts?

2010-03-11 Thread Jerome Deng
"A row in the ContactsContract.Contacts table represents an aggregate
of one or more RawContacts presumably describing the same person. "
I think my question is resolved. That is, one contact may be mapping
with one or many rawcontacts. This is dependent on whether "aggregate"
is adopted.

On 3月11日, 下午12时27分, Dmitri Plotnikov  wrote:
> There is basic API documentation 
> here:http://developer.android.com/reference/android/provider/ContactsContr...
>
> 2010/3/10 Jerome Deng > ^_^Oh, fail to connect to 
> android developer site in China if don't use
> > proxy.
>
> > Thanks brain. You are right, there is no document about this.
> > Any one can help interpret with details?
>
> > On 3月9日, 上午8时29分, brian  wrote:
> > > +1 - the documentation in this area needs some work.  To do the
> > > simplest thing takes hours of reverse engineering.
> > > For example, try and figure out how to enable presence for a 3rd party
> > > provider
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Looking to becoming a developer part time

2010-03-10 Thread Jerome Deng
SDK is the best assistant.

On 3月10日, 上午3时36分, TreKing  wrote:
> On Mon, Mar 8, 2010 at 1:12 PM, omnilaw  wrote:
> > I plan on spending a little time a night trying
> > to learn the programming needed and get familiar with the SDK once I'm
> > up to speed but wasn't sure where to start.
>
> Do you know Java? If not, that's priority #1. If you do, a book on Android
> and the online documentation and samples are probably a good place to start.
>
> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

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


[android-developers] Re: what is the detailed relation between contacts and raw_contacts?

2010-03-10 Thread Jerome Deng
^_^Oh, fail to connect to android developer site in China if don't use
proxy.

Thanks brain. You are right, there is no document about this.
Any one can help interpret with details?


On 3月9日, 上午8时29分, brian  wrote:
> +1 - the documentation in this area needs some work.  To do the
> simplest thing takes hours of reverse engineering.
> For example, try and figure out how to enable presence for a 3rd party
> provider

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

2010-03-08 Thread Jerome Deng
Hi,
Any one can help interpret the relation between the table "contacts" and
"raw_contacts"?Is it one-to-one or one-to-many relation?I am puzzled because
the SDK seems indicate it is one-to-many relation but after I checkout all
data from the database table,I found it is one-to-one relation.

And is there any detailed relation diagram describing  android database
tables?

Jerome
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