[android-developers] Install .apk without User action

2011-08-01 Thread Mahavir Jain
Hi,

I have one requirement of installing the apk without user intervention.

I know there is very straight forward way to install the apk
programmatically but that requires the user action. I want the way where
user action is not required and that will happen in background.

It is required because the user will have mandatory to install the apk.

I think there is no easy way to do this and it may require to write the own
apk installer or some firmware.

Please share if you have some pointers on how to start with this.

Thanks in advance.

Mahavir

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

2011-06-24 Thread Mahavir Jain
Hi,

I want to know if i can integrate the paypal without using paypal library
for android. (May be using webview)?
Can anyone throw some light on this? I tried to find but didn't got any
proper point to start with.

Thanks in advance.
Mahavir

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

2011-05-29 Thread Mahavir Jain
Anyone out there who had handled such type of scenarios previously?

Regards,
Mahavir

On Sun, May 29, 2011 at 7:51 AM, Mahavir Jain  wrote:

> Hi,
>
> I want to make network operation in every half sec and depending on data, i
> want to update the ListView continuously.
>
> Following is my approach: Using thread and handler.postDelayed, it makes
> the network request every sec and update only those views of the row in
> ListView which needs to be updated. It does not update ListView using
> notifyDatasetChanged().
>
> Though it updates the UI, but it takes time in updating the UI. Is it
> because, I am using emulator?
>
> Is this the right approach for this scenario? Any other best approach for
> this?
>
> Anyone handled such scenarios previously?
>
> Thanks in advance.
>
> Regards,
>
> Mahavir Jain
>

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

2011-05-28 Thread Mahavir Jain
Hi,

I want to make network operation in every half sec and depending on data, i
want to update the ListView continuously.

Following is my approach: Using thread and handler.postDelayed, it makes the
network request every sec and update only those views of the row in
ListViewwhich needs to be updated. It does not update
ListView using notifyDatasetChanged().

Though it updates the UI, but it takes time in updating the UI. Is it
because, I am using emulator?

Is this the right approach for this scenario? Any other best approach for
this?

Anyone handled such scenarios previously?

Thanks in advance.

Regards,

Mahavir Jain

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

2011-04-16 Thread Mahavir Jain
For Facebook, You will have to login through the FB dialog box but you can
post the content through Graph API..

Checkout http://developers.facebook.com/docs/reference/api/

For FB SDK visit http://developers.facebook.com/docs/sdks/

Regards,
Mahavir

On Sat, Apr 16, 2011 at 11:29 AM, Laxmi Verma
wrote:

> Hi,
>
> I want to integrate facebook and twitter into my android app.  Everwhere I
> found the code of showing the dialog box of facebook and twitter login and
> then posting the content from there.
> What I want to do is, on twitter or facebook button click it should forward
> to twitter site for e.g. m.twitter.com and my article id should get
> displayed in the tweet box (twitter) or walll post box (facebook) in the
> site directly.
> Just like it has done in ndtv app.
> Please do help in this.
>
> Thanks & Regards,
> Laxmi Verma
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Android 1.5: Service

2011-04-16 Thread Mahavir Jain
Thanks Kumar..


On Sat, Apr 16, 2011 at 1:54 PM, Kumar Bibek  wrote:

> Check this out
>
> http://developer.android.com/reference/android/app/Service.html#onStartCommand%28android.content.Intent,%20int,%20int%29
>
> Kumar Bibek
> http://techdroid.kbeanie.com
> http://www.kbeanie.com
>
>
>
> On Sat, Apr 16, 2011 at 12:38 PM, Mahavir Jain  wrote:
>
>>  Hi,
>>
>> This may be very basic question but I really cannot find any proper
>> solution for this.
>>
>> I was developing app (which have service) on Android 2.2. Then I realize
>> that I should also make it compatible to Android 1.5.
>>
>> But for android 1.5, onStartCommand() method was not there and instead
>> onStart() method was there. And for Android 2.0+, onStart() method is
>> deprecated.
>>
>> So my question is, As Java don't have support for pre-processor
>> directives, do I need to make two build (one for android 1.5+ and other for
>> android 2.0+)?
>>
>> Or is there any easy solution for this problem?
>>
>> Thanks in advance.
>>
>> Mahavir
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Android 1.5: Service

2011-04-16 Thread Mahavir Jain
Hi,

This may be very basic question but I really cannot find any proper solution
for this.

I was developing app (which have service) on Android 2.2. Then I realize
that I should also make it compatible to Android 1.5.

But for android 1.5, onStartCommand() method was not there and instead
onStart() method was there. And for Android 2.0+, onStart() method is
deprecated.

So my question is, As Java don't have support for pre-processor directives,
do I need to make two build (one for android 1.5+ and other for android
2.0+)?

Or is there any easy solution for this problem?

Thanks in advance.

Mahavir

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

2011-04-15 Thread Mahavir Jain
I really having trouble in displaying Ads through AdWhirl.

Following is the code:

AdWhirlTargeting.setTestMode(true);
AdWhirlAdapter.setGoogleAdSenseAppName(APP_NAME);
AdWhirlAdapter.setGoogleAdSenseCompanyName(COMPANY_NAME);
final DisplayMetrics dm =
showComments.getResources().getDisplayMetrics();
AdWhirlLayout adWhirlLayout = new
AdWhirlLayout(showComments, MyWidgetProvider.ADWHIRL_SDK_KEY);
adWhirlLayout.setMaxWidth((int) (dm.density * 320));
adWhirlLayout.setMaxHeight((int) (dm.density * 52));
adWhirlLayout.setGravity(Gravity.CENTER);
//LayoutInflater inflater=showComments.getLayoutInflater();
View header=inflater.inflate(R.layout.header_layout, null);
FrameLayout
ad_frame=(FrameLayout)header.findViewById(R.id.ad_frame);
ad_frame.addView(adWhirlLayout);

showComments.getListView().addHeaderView(ad_frame);

But Ad never get display. I have set up the SDK key for AdWhirl, AdMob and
InMobi. I also have INTERNET permissions. I set up all the the keys one day
before. I am calling this in main UI thread. And I am testing this on
emulator with test mode set to TRUE.

Following is the LogCat:

04-15 19:46:20.667: INFO/AdWhirl SDK(473): Creating adWhirlManager... 04-15
19:46:20.667: DEBUG/AdWhirl SDK(473): Locale is: en_US 04-15 19:46:20.707:
DEBUG/AdWhirl SDK(473): Hashed device ID is:
7d1dd13a2fa91c0ad174cb69a11549a3 04-15 19:46:20.707: INFO/AdWhirl SDK(473):
Finished creating adWhirlManager 04-15 19:46:20.777: DEBUG/AdWhirl SDK(473):
Prefs{3f3895c9b2924d01ad2af284f82b9e5e}: {"config":
"{"extra":{"location_on":0,"background_color_rgb":{"red":59,"green":89,"blue":152,"alpha":1},"text_color_rgb":{"red":255,"green":255,"blue":255,"alpha":1},"cycle_time":300,"transition":8},"rations":[{"nid":"2eae10658d78483aaf55fcd8d08e7401","type":1,"nname":"admob","weight":50,"priority":1,"key":"a14da6925c1450f"},{"nid":"00fb2956c3a34215abdbcde851c71d15","type":18,"nname":"inmobi","weight":50,"priority":2,"key":"4028cba62f1f1e04012f52d9bf990229"}]}
04-15 19:46:20.777: DEBUG/AdWhirl SDK(473): ", "timestamp": 1302876570581}
04-15 19:46:20.796: INFO/AdWhirl SDK(473): Using stored config data 04-15
19:46:20.796: DEBUG/AdWhirl SDK(473): Received jsonString:
{"extra":{"location_on":0,"background_color_rgb":{"red":59,"green":89,"blue":152,"alpha":1},"text_color_rgb":{"red":255,"green":255,"blue":255,"alpha":1},"cycle_time":300,"transition":8},"rations":[{"nid":"2eae10658d78483aaf55fcd8d08e7401","type":1,"nname":"admob","weight":50,"priority":1,"key":"a14da6925c1450f"},{"nid":"00fb2956c3a34215abdbcde851c71d15","type":18,"nname":"inmobi","weight":50,"priority":2,"key":"4028cba62f1f1e04012f52d9bf990229"}]}
04-15 19:46:20.837: INFO/AdWhirl SDK(473): Rotating Ad 04-15 19:46:20.857:
DEBUG/AdWhirl SDK(473): Dart is <92.86105004071> of <100.0> 04-15
19:46:20.898: INFO/System.out(473): In AttachmentView1==> 04-15
19:46:21.427: INFO/System.out(473): In NormalView1==> 04-15 19:46:21.767:
DEBUG/dalvikvm(473): GC_CONCURRENT freed 537K, 51% free 3097K/6279K,
external 955K/1463K, paused 12ms+38ms 04-15 19:46:21.818:
DEBUG/dalvikvm(63): GC_CONCURRENT freed 855K, 46% free 4393K/8071K, external
1879K/2377K, paused 13ms+35ms 04-15 19:46:21.947: DEBUG/webviewglue(473):
nativeDestroy view: 0x30ab30 04-15 19:46:21.977: DEBUG/webviewglue(473):
nativeDestroy view: 0x251658 04-15 19:46:22.006: DEBUG/webviewglue(473):
nativeDestroy view: 0x3075a8 04-15 19:46:22.019: DEBUG/webviewglue(473):
nativeDestroy view: 0x276d50 04-15 19:46:22.057: DEBUG/AdWhirl SDK(473):
Showing ad: 04-15 19:46:22.057: DEBUG/AdWhirl SDK(473): nid:
00fb2956c3a34215abdbcde851c71d15 04-15 19:46:22.057: DEBUG/AdWhirl SDK(473):
name: inmobi 04-15 19:46:22.057: DEBUG/AdWhirl SDK(473): type: 18 04-15
19:46:22.057: DEBUG/AdWhirl SDK(473): key: 4028cba62f1f1e04012f52d9bf990229
04-15 19:46:22.057: DEBUG/AdWhirl SDK(473): key2: 04-15 19:46:22.086:
DEBUG/AdWhirl SDK(473): Valid adapter, calling handle() 04-15 19:46:22.317:
VERBOSE/(473): in ad request post body.. 04-15 19:46:22.358:
VERBOSE/inmobiandroidwebsdk(473):
requestactivity=AdRequest&d-deviceModel=sdk&d-deviceMachineHW=Linux%28Android%3A2.6.29-00261-g0097074-dirty%29&d-deviceSystemName=BASE&d-deviceSystemVersion=1.0&d-deviceName=generic&d-deviceBTHW=Fri+Apr+15+19%3A27%3A43+GMT%2B05%3A30+2011&d-deviceStorageSize=InBuilt%3A64+MB%2CExt%3A98+MB&d-device-screen-density=1.0&d-device-screen-size=320X480&x-inmobi-phone-useragent=Mozilla%2F5.0+%28Linux%3B+U%3B+Android+2.3%3B+en-us%3B+sdk+Build%2FGRH55%29+AppleWebKit%2F533.1+%28KHTML%2C+like+Gecko%29+Version%2F4.0+Mobile+Safari%2F533.1&mk-siteid=4028cba62f1f1e04012f52d9bf990229&u-id=&mk-version=pr-SPEC-ATATA-20091223&format=xhtml&mk-ads=1&h-user-agent=InMobi_androidsdk%3D2.0&u-InMobi_androidwebsdkVersion=2.0&u-appBId=com.mobisys.android.app_widget&u-appDNM=FBDroidWidget&u-appVer=1.0&d-localization=en_us&d-netType=&mk-banner-size=9
04-15 19:46:

Re: [android-developers] Re: Continuously running service.

2011-04-05 Thread Mahavir Jain
Yes.. I am thinking of that approach only..

Thanks to all.

Mahavir

On Tue, Apr 5, 2011 at 10:05 PM, Nick Kulikaev  wrote:

> Did you consider a bit different approach and use alarm manager to wake up
> your app "after regular interval"? If you only need to send device
> location to the server this should work just fine.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: Continuously running service.

2011-04-05 Thread Mahavir Jain
Positively and productively, use of this application is to monitor the kids
action by parent or to track the sales man or employee (who is daily on
field/site) action..

Some may make the misuse of such application. And there are many such spy
applications in android market.

But my question is related to continuosly running service in the background.
I want to know if something like daemon process (continuously running
process) is possible in android?

Thanks for reply.

Thanks in advance.
Regards,
Mahavir

On Tue, Apr 5, 2011 at 8:29 PM, lbendlin  wrote:

> If you were a user would you like such an application on your phone?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Continuously running service.

2011-04-05 Thread Mahavir Jain
Hi,

I would like to develop an application that will run continuously as a
service in the background invisible to user. And after regular interval, it
will send the location updates to the server.

How can I make my application to run continuously in background invisible to
user?

Regards,
Mahavir Jain

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

2011-03-19 Thread Mahavir Jain
Thanks for time.

Very silly mistake, i just forgot the restore the Facebook session.

Regards,
Mahavir

On Sat, Mar 19, 2011 at 5:25 PM, Kostya Vasilyev  wrote:

>  Mahavir,
>
> You should use the debugger to find out what happens in
> FBQueryAsyncTask.java on line 50. The next thing on the stack is Facebook
> API methods, which eventually crash with a null pointer exception.
>
> A probable cause for this is that you're passing a null pointer to Facebook
> APIs from doInBackground. Use the debugger to confirm this and find out why
> this happens.
>
> -- Kostya
>
> 19.03.2011 14:43, Mahavir Jain пишет:
>
> No, I am not calling from onReceive() method of app-widget.
>
> I will tell you step-by-step what I am doing:
> 1) There is my configuration Activity of my AppWidget class which perform
> the FB authentication and then retrieves the wall post using
> FBQueryAsyncTask. It do this successfully.
> 2) In my updateAppWidget() method, I update the remote views and assign the
> following pending intents to "next" button of my app-widget.
>
> Intent intent=new Intent(context,GetPostService.class);
> //GetPostService is service class
> Bundle b=new Bundle();
> b.putInt(MyWidgetProvider.APP_WIDGET_ID, id);
> b.putInt(MyWidgetProvider.REQUEST_CODE,
> MyWidgetProvider.NEXT_FB_POST);
> intent.putExtras(b);
>
> PendingIntent nextPostService=PendingIntent.getService(context, 0,
> intent, PendingIntent.FLAG_UPDATE_CURRENT);
> views.setOnClickPendingIntent(R.id.next_button, nextPostService);
>
> 3) In GetPostService, I am using the same FBQueryAsync class which I have
> used in configuration activity (to authenticate and retrieve the post) and
> with same parameter. But it throwing exception in my service class and it
> running perfectly in my configuration activity.
>
> I may be missing something. Following is my ManifestXML where I have
> mentioned service, widget provider and cofiguration activity:
>
>  android:theme="@style/Theme.Transparent">
> 
>android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
> 
> 
> 
> 
>  android:name="android.appwidget.action.APPWIDGET_UPDATE" />
> 
>          android:resource="@xml/widget_provider"/>
> 
> 
>
> Thanks for giving time.
>
> Regards,
> Mahavir
>
> On Sat, Mar 19, 2011 at 4:43 PM, Kostya Vasilyev wrote:
>
>> 19.03.2011 13:57, Mahavir Jain пишет:
>>
>>
>>> Is it valid to call AsyncTask from PendingIntent service or activity?
>>>
>>
>>  AsyncTask has nothing to do with pending intents or activities. It's just
>> a utility class.
>>
>> Check your logcat more carefully:
>>
>>
>>  ERROR/AndroidRuntime(473): Caused by: java.lang.NullPointerException
>>> ERROR/AndroidRuntime(473): at
>>> java.net.URLEncoder.encode(URLEncoder.java:53)
>>> ERROR/AndroidRuntime(473): at
>>> com.facebook.android.Util.encodeUrl(Util.java:86)
>>> ERROR/AndroidRuntime(473): at
>>> com.facebook.android.Util.openUrl(Util.java:146)
>>> ERROR/AndroidRuntime(473): at
>>> com.mobisys.android.app_widget.FBQueryAsyncTask.doInBackground(FBQueryAsyncTask.java:50)
>>>
>>
>>  Assuming that com.mobisys is your application, look in FBQueryAsync.java,
>> line 50.
>>
>> Are you somehow calling Facebook classes with a NULL pointer?
>>
>> Are you using AsyncTask from a widget's onReceive?
>>
>> --
>> Kostya Vasilyev -- http://kmansoft.wordpress.com
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
&

Re: [android-developers] PendingIntent, Service and AsyncTask.

2011-03-19 Thread Mahavir Jain
No, I am not calling from onReceive() method of app-widget.

I will tell you step-by-step what I am doing:
1) There is my configuration Activity of my AppWidget class which perform
the FB authentication and then retrieves the wall post using
FBQueryAsyncTask. It do this successfully.
2) In my updateAppWidget() method, I update the remote views and assign the
following pending intents to "next" button of my app-widget.

Intent intent=new Intent(context,GetPostService.class);
//GetPostService is service class
Bundle b=new Bundle();
b.putInt(MyWidgetProvider.APP_WIDGET_ID, id);
b.putInt(MyWidgetProvider.REQUEST_CODE,
MyWidgetProvider.NEXT_FB_POST);
intent.putExtras(b);

PendingIntent nextPostService=PendingIntent.getService(context, 0,
intent, PendingIntent.FLAG_UPDATE_CURRENT);
views.setOnClickPendingIntent(R.id.next_button, nextPostService);

3) In GetPostService, I am using the same FBQueryAsync class which I have
used in configuration activity (to authenticate and retrieve the post) and
with same parameter. But it throwing exception in my service class and it
running perfectly in my configuration activity.

I may be missing something. Following is my ManifestXML where I have
mentioned service, widget provider and cofiguration activity:



  










Thanks for giving time.

Regards,
Mahavir

On Sat, Mar 19, 2011 at 4:43 PM, Kostya Vasilyev  wrote:

> 19.03.2011 13:57, Mahavir Jain пишет:
>
>
>> Is it valid to call AsyncTask from PendingIntent service or activity?
>>
>
> AsyncTask has nothing to do with pending intents or activities. It's just a
> utility class.
>
> Check your logcat more carefully:
>
>
>  ERROR/AndroidRuntime(473): Caused by: java.lang.NullPointerException
>> ERROR/AndroidRuntime(473): at
>> java.net.URLEncoder.encode(URLEncoder.java:53)
>> ERROR/AndroidRuntime(473): at
>> com.facebook.android.Util.encodeUrl(Util.java:86)
>> ERROR/AndroidRuntime(473): at
>> com.facebook.android.Util.openUrl(Util.java:146)
>> ERROR/AndroidRuntime(473): at
>> com.mobisys.android.app_widget.FBQueryAsyncTask.doInBackground(FBQueryAsyncTask.java:50)
>>
>
> Assuming that com.mobisys is your application, look in FBQueryAsync.java,
> line 50.
>
> Are you somehow calling Facebook classes with a NULL pointer?
>
> Are you using AsyncTask from a widget's onReceive?
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2011-03-16 Thread Mahavir Jain
Thanks.. It works..

On Tue, Mar 15, 2011 at 9:18 PM, Mark Murphy wrote:

> On Tue, Mar 15, 2011 at 11:25 AM, Mahavir Jain  wrote:
> > Hi,
> >
> > When we launch child activity from parent activity then we get the result
> of
> > child activity in onActivityResult() method.
> >
> > Likewise if I launched some activity using PendingIntent from my
> AppWidget.
> > Activity perform some network operation, get the result. I want to send
> the
> > result to my AppWidget. How can this be achieve?
>
> You don't "send the result to [your] AppWidget". You update what the
> app widget looks like via AppWidgetManager and a RemoteViews.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Result from Activity to Appwidget.

2011-03-15 Thread Mahavir Jain
Hi,

When we launch child activity from parent activity then we get the result of
child activity in onActivityResult() method.

Likewise if I launched some activity using PendingIntent from my AppWidget.
Activity perform some network operation, get the result. I want to send the
result to my AppWidget. How can this be achieve?

Thanks in advance.

Regards,
Mahavir

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

Re: [android-developers] About Android Application Development

2011-03-14 Thread Mahavir Jain
You can do this in following way:

1) Open command prompt.
2) navigate to the /platform-tools
3) run "adb logcat" command
4) In eclipse, run the application in debug mode.

Regards,
Mahavir

On Tue, Mar 15, 2011 at 9:26 AM, kajal patil wrote:

> Hi all,.
>   I am developing an android application.I used
> system.out.println("message") to display message in logcat.But i did not get
> in logcat.I don't knw  that whether system.out.println("message") is correct
> way.I need it for my project.Please kindly suggest solution.
> Thank you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-03-14 Thread Mahavir Jain
cannot say without looking at code..

But have you used Handler to pass the messages..

I think u may be missing handler..

Regards,
Mahavir

On Tue, Mar 15, 2011 at 9:03 AM, David Williams <
dwilli...@dtw-consulting.com> wrote:

>  Well,
>
> I've had some success with this, but I must be doing something wrong as I
> am not getting the result I am expecting.
>
> My doInBackground returns a Boolean, and according to debug at the return
> command, my Boolean variable is showing as false, which is what I would
> expect based upon my logic.
> Am I right in thinking that the return from doInBackground gets passed to
> onPostExecute?  If so then I'd expect my input parameter (which is Boolean)
> to be false too, but it's not, it's showing as true.
>
> I'm just not getting that.  A bit more information:
>
> private class initialiseServer extends AsyncTask
> protected Boolean doInBackground(Void...voids)  [Inside this code I have a
> Boolean variable that is initialized to false and this variable is
> returned.]
> protected void onPostExecute(Boolean result)
>
> Would appreciate any help on this.
>  --
>
> David Williams
> Check out our WebOS mobile phone app for the Palm Pre and Pixi:
>     Golf 
> Caddie| Golf
> Caddie Forum  | Golf
> Caddie FAQ  by
> DTW-Consulting, Inc.
>
>
>
> On 3/11/2011 4:00 PM, Kostya Vasilyev wrote:
>
> 12.03.2011 0:31, David Williams пишет:
>
> Does Java do certain things asynchronously then?  I was thinking that
> things were done in a serial fashion but perhaps that is not the case.
>
>
> ProgressDialog.show is asynchronous, just like may other UI operations.
>
> Normally, this works, because the Android UI toolkit, just like many others
> (and not just for Java) is built around the "event loop" or "message loop"
> concept. The main thread runs in an infinite loop for processing messages,
> one at a time. Each message is a small task: this can include, for example,
> showing a dialog, redrawing a view, calling one of the application's
> callback methods.
>
> Your code:
>
> - Called by Android in onCreate
> - Calls setContentView
> - Calls ProgressDialog.show
> - Fetches stuff from the Internet
> - Returns from onCreate
>
> All of the above happens on the UI thread, which waits for your onCreate to
> return before proceeding to the next message (== "small task").
>
> What your code in onCreate should do:
>
> - Call setContentView
> - Call ProgressDialog.show
> - Start an asynchronous operation to fetch stuff from the Internet
> - Return from onCreate
> - [ Android processes queued-up operations: draws your activity, shows the
> dialog ]
>
> The asynchronous fetch then should:
>
> - Run on its own thread;
> - When done, "tell" the application to hide the progress dialog and
> proceed.
>
> Hopefully, it starts to make more sense as you read through the links I've
> provided.
>
> This is probably the easiest way to implement asynchronous operations:
>
> http://developer.android.com/reference/android/os/AsyncTask.html
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Appwidget onDisabled not called.

2011-03-14 Thread Mahavir Jain
Solved..

1) Reset the emulator with following command:
emulator -avd -TestDevice -wipe-data
This clears all the AppWidget that were in the memory.

2) Next followed the following tip from Android docs to avoid the above
thing from happening:
*Tip:* When your configuration Activity first opens, set the Activity result
to RESULT_CANCELED. This way, if the user backs-out of the Activity before
reaching the end, the App Widget host is notified that the configuration was
cancelled and the App Widget will not be added.

Regards,
Mahavir

On Sun, Mar 13, 2011 at 5:28 PM, Mahavir  wrote:

> Hi All,
>
> I have AppWidget which runs fine but I want to do some cleanup task
> when last appwidget is deleted. So according to android documents, I
> implemented onDisabled() method in my AppWidgetProvider class.But when
> i delete the last AppWidget, onDisabled is not getting called.
>
> When I implemented onDeleted() method, It gets called. I checked all
> instance of my appwidgets using following code,
>
> AppWidgetManager
> appWidgetManager=AppWidgetManager.getInstance(context);
>
> int[] allAppWidgets=appWidgetManager.getAppWidgetIds(new
> ComponentName(context,MyWidgetProvider.class));
>
> for(int i=0;i
> System.out.println("AppWidget==>"+appWidgetManager.getAppWidgetInfo(allAppWidgets[i]).toString());
>
> It shows that it has got 11 instances of appwidget. But i cannot see
> any instance of my appwidget except the one which i create.
>
> Does anyone knows how to delete all the instances of this invisible
> AppWidgets?
>
> Regards,
> Mahavir
>

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