[android-developers] Violation of section 4.4 of the Developer Distribution Agreement.

2015-02-15 Thread Atif Farrukh


I have an app that I submitted on Google Play and was removed with 
following message.

 Please address the issue described below, then submit an update with your 
 changes.
 REASON FOR REJECTION:Violation of section 4.4 of the Developer 
 Distribution Agreement.
 After a regular review we have determined that your app interferes with or 
 accesses another service or product in an unauthorized manner. This 
 violates the provision of your agreement with Google referred to above.
 All submission rejections are tracked. Repeated rejections due to policy 
 violation

But I don't get it, what is it I am doing that is causing this violation. 
Here is the working on app 1. Login using Instagram. 2. Place bets on their 
favourite team. 3. If the team wins the losing team will follow them on 
Instagram. App name is Bet for InstaFollowers. There are no ads in the app, 
no third party library, all done using Instagram API. My app just connects 
with my MySQL server.

Any help regarding this will be great. 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Kindly give me this answer.

2012-07-19 Thread Atif Mahmood
I need its answer
http://stackoverflow.com/questions/11501504/android-gcm-unicode-charcters-are-not-received

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

2012-07-10 Thread atif qadri
hello,
i am making an app which : 1) starts the application by running a html 
5 page in the embedded chrome browser in the app.
 2) That uses ftp or http to 
download the file from the server based on the xml config file which it 
received from the server. 

  so , how to embed the browser in the app? making the html page and 
webview or with phonegap is done, but how can i make it open in chrome ? 
plz guide on the 2nd point also.
any help would be appreciated.
thanks .

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

[android-developers] Search a contact using phone number

2012-04-14 Thread Atif Farrukh


I would like to retrieve the name of the contact associated with an 
incoming message number. I came up with the following code.

Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, 
Uri.encode(msgSender));
Cursor c = getContentResolver().query(lookupUri, new 
String[]{Contacts.DISPLAY_NAME},null,null,null);

try {
c.moveToFirst();
displayName = c.getString(0);
} catch (Exception e) {
// TODO: handle exception
}finally{
c.close();
}

The problem is, its working on emulator but not working on my mobile 
device. I tried restarting my phone. But still not working. I searched and 
found codes similar to this one but is not working on actual 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

Re: [android-developers] Search a contact using phone number

2012-04-14 Thread Atif Farrukh
I mean to say, on emulator I am able to get the contact name. But on on my 
phone I am not able to get the contacts name. before this code I did this:
  
  String displayName = ?

after looking for contact name I did:

msgDialog.setTitle(From : + displayName);
the output is 

   From : ?

whereas on emulator I am getting the contact name.

On Saturday, 14 April 2012 18:05:55 UTC+5, MagouyaWare wrote:

 The problem is, its working on emulator but not working on my mobile device

 What exactly do you mean by not working?  Is it crashing?  Are you 
 getting an exception? Does your mobile device catch on fire? Does the code 
 cause your lights to turn on and off?

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Sat, Apr 14, 2012 at 4:27 AM, Atif Farrukh atiffarr...@gmail.comwrote:

 The problem is, its working on emulator but not working on my mobile 
 device




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

2012-04-08 Thread Atif Farrukh
I am trying to make an application, so that my mobile wakes up when it 
receives a sms... I tried and make the appHere is the code::

package com.atiffarrukh.wakemeup;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsMessage;

import android.widget.Toast;
 
public class SmsReceiver extends BroadcastReceiver
{
boolean received = false;
@Override
public void onReceive(Context context, Intent intent) 
{
//---get the SMS message passed in---
Bundle bundle = intent.getExtras();
SmsMessage[] msgs = null;
String str = ;
if (bundle != null)
{
//---retrieve the SMS message received---
Object[] pdus = (Object[]) bundle.get(pdus);
msgs = new SmsMessage[pdus.length];
for (int i=0; imsgs.length; i++){
msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);   
 
str += SMS from  + msgs[i].getOriginatingAddress();   
  
str +=  :;
str += msgs[i].getMessageBody().toString();
str += \n; 
received = true;
}
//---display the new SMS message---
Toast.makeText(context, str, Toast.LENGTH_SHORT).show();
Intent i = new Intent(context,WakeUp.class); //for starting 
activity from broadcast
i.putExtra(ReceivedCheck, received);//put value of received
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//flags the intent to 
start activity
context.startActivity(i);
} 
}
}

and the activity is::

package com.atiffarrukh.wakemeup;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.PowerManager;

public class WakeUp extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
 Intent intent = getIntent();
boolean check = intent.getBooleanExtra(ReceivedCheck, false);
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
//Toast.makeText(getBaseContext(), This is WAKEUP Act, 
Toast.LENGTH_SHORT).show();
boolean isScreenOn = pm.isScreenOn();
if(check  !isScreenOn ){
/*getWindow().setFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON,
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
Toast.makeText(getBaseContext(), This is WAKEUP SCREEN, 
Toast.LENGTH_SHORT).show();
*/
//Toast.makeText(getBaseContext(), This is WAKEUP SCREEN, 
Toast.LENGTH_SHORT).show();
 final PowerManager.WakeLock wl = 
pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, My tag);
wl.acquire();
Thread timer = new Thread(){
public void run(){
try {
sleep(5000);
} catch (InterruptedException e) {
// TODO: handle exception
}finally{
wl.release();
}
}
};
timer.start();
}
}
}

ok... What this app do::
1. Wakes up my mobile but few seconds before the message tone...
2. Open a blank black screen with WakeMeUp as title...

Now What I want::
1. Wakes up the mobile but almost at same time with the message tone...
2. I dont want that blank screen to open when the activity is called...

If anybody wondering , YES I am new to android and also to programming... 

Thanks alot for your help.. in advance... :p

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

[android-developers] Migrate Android Code error

2012-02-29 Thread Atif Farrukh
I am making a menu for my menu... i am using the following code..


switch(item.getItemId()){
case R.id.aboutUs

break;

case R.id.feedback:

break;


}

gave an error, Migrate Android Code , eclipse converted it into if
else statment as below, from the android site,
still getting the same error



int id =  item.getItemId();

if (id == R.id.abooutUs) {}
else if (id == R.id.feedback) {
}
else if (id == R.id.exit) {}


}


on the android site it says that the R file is now like public
static int menu=0x7f05;
but mine is still public static final int menu=0x7f05;.  i mean
the final type.

plz help me out.. i m new to android...


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


Re: [android-developers] Re: How to set the preferred APN through code?

2012-01-24 Thread Sayed Atif Ali
Hi,
What I infer from your code is that you haven't added the APN first into
the database. You need to first write the APN settings into the database
before updating the preferred APN code. The following links will be helpful
in making you understand and resolve the issue:

http://blogs.msdn.com/b/zhengpei/archive/2009/10/13/managing-apn-data-in-google-android.aspx

http://stackoverflow.com/questions/7867079/android-apn-enforcement

Moreover, it is indeed true that from Android 4.0 onwards, apps need root
permissions to modify APN Settings. But if you are developing your app for
Android versions prior to Android 4.0 then you need not worry. :)

I hope this solves your problems.

Warm Regards

On Tue, Jan 24, 2012 at 9:10 PM, Tom t...@malcolmson.ca wrote:

 I haven't actually tried it myself so I can't answer your
 question definitively, but my understanding was that it is no longer
 possible to write any elements of the access point.

 See this issue:
 http://code.google.com/p/android/issues/detail?id=24227

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

2012-01-23 Thread Sayed Atif Ali
You need to set the MCC )(Mobile Country Code) and MNC (Mobile Network
Code) values too in your code to set and display the APN's on Android UI.

Try the following code and see what happens:


 *private static* *final* Uri *PREFERRED_CONTENT_URI* = Uri.*parse*(
 content://telephony/carriers/preferapn);



 // getCurrentPreferredAPN is an internal function to retrieve the _id of
 the current APN.
 String strCurrent = getCurrentPreferredAPN();

 ContentValues values =  *new* ContentValues();

 Uri ret;

   String MCC = null, MNC = null;
   TelephonyManager tel = (TelephonyManager)
getSystemService(this.TELEPHONY_SERVICE);
   String networkOperator = tel.getNetworkOperator();
   if (networkOperator != null) {
MCC = networkOperator.substring(0, 3);
MNC = networkOperator.substring(3);
}



// create the dummy ID

 values.put(*SZ_NAME*, *blah*);
 values.put(*SZ_APN*, *blah*);

 values.put(*SZ_TYPE*
 , *blah*);

 values.put(current, 1);

 values.put(mcc, MCC);
 values.put(mnc, MNC);


  // 'delete' the current entry.
 nUpdated = getContentResolver().delete(PREFERRED_CONTENT_URI, _id=?,
 new String[] { strCurrent };

 // 'insert' a new entry.
 ret = getContentResolver().insert(PREFERRED_*CONTENT_URI*, values);
 *if*(*null* == ret)

 {

 Log.*i*(Add Dummy APN, Failed);

 *return*;

 }



 The call   == insert* ==*  is always returning null for me.



 What is the right way of doing 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

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

2012-01-16 Thread Sayed Atif Ali
Hi Mark,

Thanks for your inputs. I have found another method in the meantime. We can
set the APN's through code and get our device to use our chosen proxy. And
one doesn't need root permissions to do that until Android ICS.
What I want now is, to be notified when the user creates a new APN through
the GUI so that I could update my list. Is there any hook which we can use
or notification generated when a new APN is manually added through the GUI?

Or is there a better way to set the proxy regardless of having root
permissions or not.

I would appreciate anyone who could help me out on this topic.

On Wed, Jan 11, 2012 at 6:18 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jan 10, 2012 at 9:39 PM, Sayed Atif Ali
 sayed.atif@gmail.com wrote:
  I need to set the proxy through my code in android devices upwards of
  Android 2.3.3. The only method which I know of right now is doing it
 through
  the shell in the emulator:
 
  1.  adb shell
 
 
  2. # sqlite3
 /data/data/com.android.providers.settings/databases/settings.db
 
 
  3. sqlite INSERT INTO system VALUES(99,’http_proxy', 'proxy:port');
 
 
  4. sqlite.exit

 And that will only work on the emulator or a rooted device.

  Does android provide an API to do this from within the code

 Not device-wide. You can set properties to affect the proxy used by
 your own app, though.

 --
 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] Setting proxy in android through code

2012-01-11 Thread Sayed Atif Ali
Hi,
I need to set the proxy through my code in android devices upwards of
Android 2.3.3. The only method which I know of right now is doing it
through the shell in the emulator:

1.  adb shell
2. # sqlite3 /data/data/com.android.providers.settings/databases/settings.db
3. sqlite INSERT INTO system VALUES(99,’http_proxy', 'proxy:port');

4. sqlite.exit

Does android provide an API to do this from within the code or is there any
other elegant way out?

Moreover, I saw a new API introduced from Android 4.0 onwards called the
VpnService for establishing VPN connections. Can we set a proxy
programmatically by using the VpnService.Builder class?

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

2011-09-12 Thread Atif Musaddaq
Hi,

I would like to send username and password with SERVICE_URL. do any one know
how to send it, I am getting username and password from prefs. here is my
code at the moment.

String SERVICE_URL = http://10.0.2.2/php_to_json.php;;
String s = execHttpRequest(SERVICE_URL);
final String[] items2 = getTheTimeFromJSONString(s);

-- 
Atif

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

2011-09-06 Thread Atif Musaddaq
Hi,

I am facing a small Problem with GPS data. my activity is not updating the
location whenever it changes.

Here is the code

public class MapTabView extends MapActivity {
  @Override
 protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.maptabview);

MapView view = (MapView) findViewById(R.id.mapview);
view.setBuiltInZoomControls(true);

final MapController control = view.getController();
LocationManager manager =
(LocationManager)this.getSystemService(Context.LOCATION_SERVICE);

LocationListener locationListener = new LocationListener(){

@Override
public void onLocationChanged(Location location) {
control.setCenter(new
GeoPoint((int)location.getLatitude(),(int)location.getLongitude()));
 }


@Override
public void onStatusChanged(String provider, int status,
Bundle extras) {
 }};
manager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
locationListener);

 }
 @Override
 protected boolean isRouteDisplayed() {
   return false;
 }
}

Any Help please

-- 
Musaddaq

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

2011-09-04 Thread Atif Musaddaq
Hi, All

Facing small problem in my Android App. I am getting 4 values from the user
including current date which user can change. Date format is -MM-DD

Code
// this is for Date to be displayed
private void updateDate() {
mDateDisplay.setText(
new StringBuilder()
// Month is 0 based so add 1
.append(mYear).append(-)
.append(mMonth + 1).append(-)
.append(mDay)
);
date=mDateDisplay.getText().toString();
Log.i(Date,date);
}

It is displaying the right date and also updating it on Mobile
device/emulator.

Now i have list of 4 pairs which i am sending with URL to the PHP Server

ListNameValuePair nameValuePairs = new ArrayListNameValuePair(4);
.
nameValuePairs.add(new BasicNameValuePair(Date, date));
..

*It is sending all other 3 values to my mySQL database but not the DATE. I
also changed the Format of the Date but no success.*
*
*
*Any help please*



-- 
Musaddaq

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

2011-04-13 Thread Atif Yousuf
Using Google Calendar API
visit my web
http://www.cygnismedia.com/mobile-phone-application/android-application.html
and much ore information..

On Apr 12, 12:02 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:




 Regards,
 Smaay

http://bit.ly/fqUP2s

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

2011-04-12 Thread Atif Musaddaq
**
*Hi, All*
**
I have some FATAL EXCEPTION which i could not figure it out. Can any one
help me. here is the log cat. will be very thankful to you.




04-12 12:05:17.069: DEBUG/AndroidRuntime(296):  AndroidRuntime
START 
04-12 12:05:17.079: DEBUG/AndroidRuntime(296): CheckJNI is ON
04-12 12:05:17.459: DEBUG/AndroidRuntime(296): --- registering native
functions ---
04-12 12:05:18.559: DEBUG/AndroidRuntime(296): Shutting down VM
04-12 12:05:18.569: DEBUG/dalvikvm(296): Debugger has detached; object
registry had 1 entries
04-12 12:05:18.599: INFO/AndroidRuntime(296): NOTE: attach of thread 'Binder
Thread #3' failed
04-12 12:05:19.269: DEBUG/AndroidRuntime(306):  AndroidRuntime
START 
04-12 12:05:19.269: DEBUG/AndroidRuntime(306): CheckJNI is ON
04-12 12:05:19.519: DEBUG/AndroidRuntime(306): --- registering native
functions ---
04-12 12:05:20.579: INFO/ActivityManager(58): Starting activity: Intent {
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
flg=0x1000 cmp=com.SpinnerDemo/org.me.sfBackendClient.SpinnerDemo }
04-12 12:05:20.659: DEBUG/AndroidRuntime(306): Shutting down VM
04-12 12:05:20.669: DEBUG/dalvikvm(306): Debugger has detached; object
registry had 1 entries
04-12 12:05:20.709: INFO/AndroidRuntime(306): NOTE: attach of thread 'Binder
Thread #3' failed
04-12 12:05:20.749: INFO/ActivityManager(58): Start proc com.SpinnerDemo for
activity com.SpinnerDemo/org.me.sfBackendClient.SpinnerDemo: pid=312
uid=10048 gids={3003, 1015}
04-12 12:05:21.639: DEBUG/AndroidRuntime(312): Shutting down VM
04-12 12:05:21.639: WARN/dalvikvm(312): threadid=1: thread exiting with
uncaught exception (group=0x4001d800)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): FATAL EXCEPTION: main
04-12 12:05:21.669: ERROR/AndroidRuntime(312): java.lang.RuntimeException:
Unable to instantiate activity
ComponentInfo{com.SpinnerDemo/org.me.sfBackendClient.SpinnerDemo}:
java.lang.ClassNotFoundException: org.me.sfBackendClient.SpinnerDemo in
loader dalvik.system.PathClassLoader[/data/app/com.SpinnerDemo-2.apk]
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.os.Looper.loop(Looper.java:123)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.app.ActivityThread.main(ActivityThread.java:4627)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
java.lang.reflect.Method.invokeNative(Native Method)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
java.lang.reflect.Method.invoke(Method.java:521)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
dalvik.system.NativeStart.main(Native Method)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): Caused by:
java.lang.ClassNotFoundException: org.me.sfBackendClient.SpinnerDemo in
loader dalvik.system.PathClassLoader[/data/app/com.SpinnerDemo-2.apk]
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-12 12:05:21.669: ERROR/AndroidRuntime(312): ... 11 more
04-12 12:05:21.689: WARN/ActivityManager(58):   Force finishing activity
com.SpinnerDemo/org.me.sfBackendClient.SpinnerDemo
04-12 12:05:22.212: WARN/ActivityManager(58): Activity pause timeout for
HistoryRecord{440603a8 com.SpinnerDemo/org.me.sfBackendClient.SpinnerDemo}
04-12 12:05:32.754: WARN/ActivityManager(58): Activity destroy timeout for
HistoryRecord{440603a8 com.SpinnerDemo/org.me.sfBackendClient.SpinnerDemo}
04-12 12:06:57.368: DEBUG/SntpClient(58): request time failed:
java.net.SocketException: Address family not supported by protocol
04-12 12:07:00.248: DEBUG/dalvikvm(58): GC_FOR_MALLOC freed 10659 objects /
550192 bytes in 162ms
04-12 12:10:21.770: INFO/Process(312): Sending signal. PID: 312 SIG: 9
04-12 12:10:21.818: 

[android-developers] 24 hour Time mode in android layout file ?

2011-03-16 Thread Atif Musaddaq
Hi,

is there any way to set 24 hour time mode in XML layout file ??

-- 
Atif

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

2011-03-07 Thread Atif Musaddaq
Hi, All

I am fetching data from json to array list, code given below.

JSONArray jsonArray = new JSONArray(json_string);
String[] anArrayOfStrings;
ListString items = new ArrayListString();
for (int i=0; ijsonArray.length(); i++) {
items.add( jsonArray.getString(i) );
}

Now all my data is in Array List items

I would like to populate/generate Spinner out of this array List, How i will
do that. there are lot of examples available on the internet to create
Spinner with Arrays but not Array List.

or How i can convert this Array List to normal Array OR How i can populate
an array using above for loop.

I am beginner to android/java etc...Help will be really
appreciated. Thanks in advance.

-- 
Atif Musaddaq

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

2011-03-05 Thread Atif Musaddaq
i found this resource http://www.embarcadero.com/rad-in-action/php-android

but could not found the solution Yet.


Atif

On Sat, Mar 5, 2011 at 2:17 PM, Atif Musaddaq atif.musad...@gmail.comwrote:

 Hi, All

 I would like to generate a List view in android (spinner) from the list i
 will get from PHP server.

 right now my server code is like this.

 ?php
 $arr = array ('a'=1,'b'=2,'c'=3,'d'=4,'e'=5);

 echo json_encode($arr);

 ?

 my android code is this.

 public class MainActivity extends Activity {
 private Button btn;
 private TextView txt;
  //Change this IP:PORT with you current IP:PORT
 private static String SERVICE_URL = myurl;

 private String getTheTimeFromJSONString(String json_string)
 {
  try {
 JSONObject j = new JSONObject(json_string);
 return j.getString(current_date);
  } catch (JSONException e) {
 e.printStackTrace();
  return json_string;
 }
  }
  private String execHttpRequest(String url) {
  try {
 HttpClient httpclient = new DefaultHttpClient();
 HttpGet httpget = new HttpGet(url);
  //We want the JSON version of resource
 httpget.addHeader(accept, application/json);
  HttpResponse response = httpclient.execute(httpget);
 HttpEntity entity = response.getEntity();
  return EntityUtils.toString(entity);
 } catch (Exception e) {
 e.printStackTrace();
  return e.getMessage();
 }
 }

 /** Called when the activity is first created. */
 @Override
  public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
 btn = (Button) findViewById(R.id.btn_click_me);
  txt = (TextView) findViewById(R.id.txt);
 btn.setOnClickListener(new View.OnClickListener() {
  public void onClick(View arg0) {
 String s = execHttpRequest(SERVICE_URL);
  txt.setText(getTheTimeFromJSONString(s));
 }
 });
  }
 }


 I would like to convert this response in java array or ArrayList so i can
 use it to populate Spinner. May i know how i can do this. Right now i am
 getting the response as seen in the output image attached with this message.

 Please help me in this regard.



 --
 Musaddaq





-- 
Atif Musaddaq
Master in Media Informatics,
RWTH Aachen  University of Bonn,
Germany.
atif.musad...@rwth-aachen.de

*”Design can be art. Design can be aesthetics. Design is so simple, that’s
why it is so complicated.” —Paul Rand*

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

2011-02-21 Thread Atif Musaddaq
Hi, All

I get value of  Longitude and Latitude whenever user Location changes.

double lat = loc.getLatitude();
double lon = loc.getLongitude();

I would like to display it in Text view

final TextView Longitude = (TextView) findViewById(R.id.lang);
final TextView Latitude= (TextView) findViewById(R.id.lat);

Now i donot know how i can either convert *double lat *toString or convert
Longitude and Latitude so they can store value of lat and lon.

also please let me know if i am doing it in a right way ? I would like user
to save its desired location when ever he/she want.

-- 
Atif

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

2011-02-09 Thread Atif Musaddaq
Hi, Guys

I am sending some data to the PHP server and based on this data server is
sending true or false back to me.

e.g

echo true;
OR
echo false;

Now on the android side i write this code in Post method

  try {
post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity();
String responseText = EntityUtils.toString(entity);
Toast.makeText( getApplicationContext(),
responseText,Toast.LENGTH_SHORT).show();
Log.i(Output,responseText);

// till here it is showing me either true or false
if (responseText == true)
{
  // call activity A
}else{

  // call activity B
}

Now it shows me response either true or false based on the data i send. but
it is not comparing the if condition. i would like to further call Activity
A or B based on  true or false.

Can any one help me and tell me what i am doing wrong here ? why it is
not comparing the condition ? responseText is already string and
also comparing String

-- 
Atif Musaddaq

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

2011-01-28 Thread Atif Musaddaq
Hi,

I would like to show map of the current location along with a small form a
text field with a submit button. what exactly i want to do is:

to let user save his desired location, but with addition of that i would
like to show him on the map where he/she is.

Is it possible to do in a single activity ? any sample code, tutorial etc

-- 
Atif Musaddaq

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

2011-01-26 Thread Atif Musaddaq
Hi, Guys

a Simple Question.

I have four buttons and I am using four images for each button. is there any
way to replace the image when user Click on the button. I want to make them
more interactive. Right now it seems boring when user
click on it, no feedback to the user.

Thanks in advance.


Atif

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

2011-01-26 Thread Atif Musaddaq
Hi, Guys

Is there any one facing the same problem.

my Eclipse stuck while running the emulator or connected it with the Mobile
device. I was not facing this problem before. Now i have to restart it again
and again.

Please help if some one already fixed this problem.


-- 
Atif Musaddaq

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

2011-01-18 Thread Atif Musaddaq
Hi, Guys

Facing a small problem, I want to know two things, Either i am going in the
right direction ? Second why i have these two syntax error, See below the
exact line.
1. *Syntax error on token ;, { expected after this token*
*2. **Error: Syntax error, insert } to complete ClassBody*
*
*
*Note I am beginner plz donot mind if i am doing some foolish mistake :-)
Thanks in advance*

here is my simple PHP code.
**
?php
echo param1 value: .$_POST['parameterName1'].\n;
echo param2 value: .$_POST['parameterName2'].\n;
echo Your post was successfully sent;
?
**
Now here come my Java code

//all Required imports and package

public class http_client extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

}
HttpPost httppost;

HttpClient httpclient;

// List with arameters and their values
ListNameValuePair nameValuePairs;

String serverResponsePhrase;
int serverStatusCode;
String bytesSent; * Syntax error on token ;, { expected after
this token*

httppost = new HttpPost(serverURL);
httpclient = new DefaultHttpClient();
nameValuePairs = new ArrayListNameValuePair(2);

// Adding parameters to send to the HTTP server.
nameValuePairs.add(new BasicNameValuePair(parameterName1, value1));
nameValuePairs.add(new BasicNameValuePair(parameterName2, value2));

// Send POST message  with given parameters to the HTTP server.
try {
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

HttpResponse response = httpclient.execute(httppost);

InputStream is = response.getEntity().getContent();
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayBuffer baf = new ByteArrayBuffer(20);

int current = 0;
while((current = bis.read()) != -1)
{
baf.append((byte)current);
}

bytesSent = new String(baf.toByteArray());

// Response from the server
serverResponsePhrase = response.getStatusLine().getReasonPhrase();
serverStatusCode = response.getStatusLine().getStatusCode();
// for receiving response from the server
Toast.makeText(getBaseContext(),
 bytesSent,
 Toast.LENGTH_SHORT).show();


}
catch (Exception e) {
// Exception handling
}

} *  Error: Syntax error, insert } to complete ClassBody*

-- 
Atif

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

2010-11-08 Thread Atif Musaddaq
Did any one already implemented php wit mySql database as REST server and
android as a client?

I need some help to do it, plz recommend some reading about REST or
tutorials.

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

2010-04-05 Thread Atif
I got the Droid last week and I am in the same boat that I don't want
to sign up with Verizon. I know I can use Droid over WiFi, but I can't
use it for testing actual phone related app functionality until I sign
up with Verizon. If anyone wants to trade their N1 with Droid, please
shoot me an email. I will be more than happy to make the switch as I
am already a T-Mobile customer and can swap my SIM from my existing
Android phone to N1 for all kinds of testing.

On Mar 8, 5:19 pm, JasonC jcohe...@gmail.com wrote:
 TheDroidcomes with 30 days for Free service. So you CAN activate the
 phone and get it working so you can test on it.

 On Mar 6, 6:13 pm, anton.slut...@gmail.com anton.slut...@gmail.com
 wrote:



  Do Verizon phones even load without being hooked up to Verizon?  Sorry
  for being ignorant.  Have never had Verizon and not huge on mobile
  protocols.  I know a gsm phone wont let you past the boot prompt
  without a valid sim card.

  On Mar 6, 9:04 pm, Quartertone quartert...@gmail.com wrote:

   Well, I don't know about anyone else, but I would prefer to have a
   device that I can use with my current plan. I have T-mobile service
   with a MyTouch, so I'm definitely hoping for a Nexus One.

   For any developers in the New Orleans area, I have a proposition:
   If you're hoping for aDroidand you get a Nexus One, i'll gladly
   trade you for it (that is, if i end up getting aDroid). Just keep me
   in mind and contact me in 2-4 weeks when you get your device if youre
   interested.

   cheers

   On Mar 6, 6:15 pm, niko20 nikolatesl...@yahoo.com wrote:

Geez people. Who cares if u can't use the phone if its on Verizon.
You can develop on any google phone it doesn't need to ha e actual
service unless u are writing app that uses the phone or such. But for
game writing it would be fine, etc. Actually for example I already
have aDroidbut even if I got a nexus one I couldn't use it much here
since its GSM and I don't get T-Mobile in my area. But I can still
test the apps I make on it.

On Mar 6, 7:01 pm, Mariano Kamp mariano.k...@gmail.com wrote:

 What kind of confirmation is that? Is that the first mail or a 
 confirmation
 after you went to their website?

 I am asking, because I haven't got any email even though I have an 
 app in
 the Market that would qualify. Should I start to worry or are the 
 first
 mails sent out incrementally?

 On Sat, Mar 6, 2010 at 1:10 PM, Thomas Riley 
 tomrile...@googlemail.comwrote:

  I also have the confirmation email.
  It says they will arrive in 2-4 weeks, but can it really be so slow?
  Or is that use an over estimate?

  On Mar 6, 10:51 am, Rootko roo...@gmail.com wrote:
   Just got mine confirmation email, but unfortunately they removed
   leading zero in my zip code, so I've responded to change it. 
   Hopefully
   this won't be a problem and I'll enjoy my Nexus One soon (I'm in 
   EU).

   Hooray, thanks Google!

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] image overlay

2010-03-04 Thread Atif Gulzar
You may use ViewFlipper and then can use setDisplayedChild function to show
the view you desired.



--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Mar 3, 2010 at 11:06 PM, Dan danieljonharring...@gmail.com wrote:

 Is there a way to have an image overlaid over another image.  For
 example, I have an instance where I have an imageview and I would like
 another imageview to take up the same space and appear over the first
 image.  I don't know if there is a way of doing this.  I tried putting
 the second imageview within the first imageview, but that's apparently
 not allowed in the layout xml files.  So is there perhaps a way of
 doing it with a different layout, such as absolute or frame?  Thanks
 for any 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Market Intent Suggestion

2010-03-04 Thread Atif Gulzar
Thanks Vintu


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Thu, Mar 4, 2010 at 3:37 PM, Adrian Vintu adrianvi...@gmail.com wrote:

 Use market://details?id=package

 BR,
 Adrian Vintu

 http://adrianvintu.com


 On Thu, Mar 4, 2010 at 8:15 AM, Atif Gulzar atif.gul...@gmail.com wrote:

 When we search for an application by its fully qualified Java package name
 using

 http://market.android.com/search?q=pname:package or
 market://search?q=pname:package

 It displays a single result in a list.

 Since it a single result it should display the detailed application view
 instead of showing it in a list view.


 Just a suggestion





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


 http://adrianvintu.com

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


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

[android-developers] Market Intent Suggestion

2010-03-03 Thread Atif Gulzar
When we search for an application by its fully qualified Java package name
using

http://market.android.com/search?q=pname:package or
market://search?q=pname:package

It displays a single result in a list.

Since it a single result it should display the detailed application view
instead of showing it in a list view.


Just a suggestion





--
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] TTS

2010-02-27 Thread Atif Gulzar
TTS is supported since 1.6.

Is it possible to set the minimum supported version as 1.5

Where my application will not speak in 1.5 and will speak in 1.6



--
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] 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] Get the user name associated with the device?

2010-02-21 Thread Atif
Hi,

How I can get the user name associated with the device? For example
when you comment on market it aromatically use the name that is
associated with the default gmail account. Is it possible to get that
name?

Thanks and regards,
Atif

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

2010-02-21 Thread Atif Gulzar
Hi,

How can I get the user name against the default gmail account on device. For
example when you comment on some application in market it automatically
shows the name of commenter. Is there any way to get that name. Actually, I
want to present this name while submitting the high score in my game,
ofcourse user can edit it before submitting the score. Thanks


--
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

Re: [android-developers] Re: Disable RadioGroup ?

2010-02-20 Thread Atif Gulzar
Thanks, Yes I can treat individual buttons. But just wondering why I can't
operate on RadioGroup. Is it some bug or I am missing something.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Fri, Feb 19, 2010 at 11:42 PM, DonFrench dcfre...@gmail.com wrote:

 Or you could make them invisible but that isn't the same thing as just
 disabling them of course.

 On Feb 19, 4:39 am, Mark Murphy mmur...@commonsware.com wrote:
  Atif Gulzar wrote:
   Hi
 
   How can I disable RadioGroup, means all the radio buttons should e
   disabled. I already tried setEnabled (false) and setClickable(false)
 but
   this did not help.
 
  Iterate over the RadioButtons and disable them, I imagine.
 
  --
  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.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] Disable RadioGroup ?

2010-02-19 Thread Atif Gulzar
Hi

How can I disable RadioGroup, means all the radio buttons should e disabled.
I already tried setEnabled (false) and setClickable(false) but this did not
help.


--
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] read only time

2010-02-11 Thread Atif Gulzar
Hi,

I would like to implement a functionality in my game to give some daily
goodies. But user can easily abuse it by changing the date of the device
again and again. I know this can be easily implemented through some server.
Is there any way to handle it locally without the involvement of server or
network connectivity? Thanks


--
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

Re: [android-developers] density setting for aspect ration long screens

2010-01-26 Thread Atif Gulzar
Thanks Dianne Hackborn,

But then how one can set its single layout to work on all aspect rations. To
solve the problem for long screens; I created a new folder layout-long and
adjusted my lauouts. Wel it solved the problem for 480x800 but not for
480x854. Any generic solution ??



--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Mon, Jan 25, 2010 at 11:06 PM, Dianne Hackborn hack...@android.comwrote:

 Density and aspect ratio are completely unrelated.  Density is the size of
 the pixels, and we currently only support square pixels (which is what all
 current devices have as far as I know).  The aspect ratio is determined by
 the number of pixels in th x and y dimensions, regardless of their density.

 On Mon, Jan 25, 2010 at 7:04 AM, Atif Gulzar atif.gul...@gmail.comwrote:

 We can set the pixel values in custom views by multiplying them with

 this.getResources().getDisplayMetrics().density;

 This is ok when the screen aspect ratio is normal means not long

 But how can we set the pixels along Y-axis when the aspect ration is long.


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


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

Re: [android-developers] Re: density setting for aspect ration long screens

2010-01-26 Thread Atif Gulzar
Thanks Bob,

I will defiantly review my layout strategy.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Jan 26, 2010 at 9:41 PM, Bob Kerns r...@acm.org wrote:

 Atif, the various layout classes are *intended* to be a generic
 solution, making minor adjustments for minor changes.

 Using different resource folders is intended for making major
 readjustments to layout. If you design a good layout with the layout
 classes, you may not need them at all!

 Generally, separate resource folders are useful for when a particular
 layout strategy simply breaks down when pushed too far. For example,
 rotating to landscape may make the screen simply too short for one
 strategy, but if you move a couple of things to the side, you're OK.

 If you need to distinguish between 480x800 and 480x854 -- and
 especially if it's 480x854 that has the problem -- then I would
 strongly suggest that you take a close look at your layout strategies.
 LinearLayout with some expandable padding elements, TableLayout, or
 the use of a 9-patch instead of a fixed background graphic.

 Android offers a lot of facilities for handling of layout differences.
 I don't think they're always as easy to use and predictable as they
 ought to be, but they're pretty rich and functional, none-the-less.

 So if they aren't doing the job, and you're having to rely on
 differentiating your layouts at the level of 480x800 vs 480x854, then
 to get any help, you're going to need to precisely identify what
 problem the layouts aren't handling for you automatically, and why.

 My guess, however, would be that you're either:
 1) Trying to put too much stuff onto each screen. This makes your
 layouts very brittle, and usually makes the result seem very
 cluttered for the user, as well. There can be times when this is
 appropriate -- for example, when the goal is a single-screen status
 monitoring display. But generally, the strategy here should be to move
 to less-cluttered, more tightly focused screens.

 2) Trying to keep too tight a control on the layouts, rather than
 defining a logical layout strategy, and allowing the system to make
 the layout choices for you, within defined ranges. That does take both
 a lot of understanding, and a lot of testing to identify the usable
 limits of each layout strategy. But the result is that you won't have
 to specify a new layout to handle some new device that adds another 54
 pixels along one edge.

 On Jan 26, 5:10 am, Atif Gulzar atif.gul...@gmail.com wrote:
  Thanks Dianne Hackborn,
 
  But then how one can set its single layout to work on all aspect rations.
 To
  solve the problem for long screens; I created a new folder layout-long
 and
  adjusted my lauouts. Wel it solved the problem for 480x800 but not for
  480x854. Any generic solution ??
 
  --
  Best Regards,
  Atif Gulzar
 
  I  Unicode, ɹɐzlnƃ ɟıʇɐ
 
  On Mon, Jan 25, 2010 at 11:06 PM, Dianne Hackborn hack...@android.com
 wrote:
 
 
 
   Density and aspect ratio are completely unrelated.  Density is the size
 of
   the pixels, and we currently only support square pixels (which is what
 all
   current devices have as far as I know).  The aspect ratio is determined
 by
   the number of pixels in th x and y dimensions, regardless of their
 density.
 
   On Mon, Jan 25, 2010 at 7:04 AM, Atif Gulzar atif.gul...@gmail.com
 wrote:
 
   We can set the pixel values in custom views by multiplying them with
 
   this.getResources().getDisplayMetrics().density;
 
   This is ok when the screen aspect ratio is normal means not long
 
   But how can we set the pixels along Y-axis when the aspect ration is
 long.
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com

Re: [android-developers] cocos2d for Android Update

2010-01-25 Thread Atif Gulzar
This is really an incredible effort. Is there any application on android
market that is using this engine? Thanks


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Mon, Jan 25, 2010 at 1:44 PM, Philip philip.dese...@gmail.com wrote:

 The new update fixes a slew of issues:  parallax is working,
 rendering issues on G1 phones, and handles menus and sprites
 correctly. The touch event handler has been updated to use a singleton
 class with delegates. Thanks to Andrey who pointed out a couple of
 issues with rendering on his phone and sent me a fix for it. Most
 transitions are also working. Menus are also working except for a
 problem with MenuToggle that should be fixed in the next release.

 The next step is to have particle system working (fire is starting to
 work in the demo.) Someone also offered to work on adding Box2D/
 chipmunk to the lot. .

 Thanks to everyone who sent me mail with some suggestions and
 contributions. I really appreciate all the help I can get to make this
 project usable and useful.

 Thanks!

 Philip

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] density setting for aspect ration long screens

2010-01-25 Thread Atif Gulzar
We can set the pixel values in custom views by multiplying them with

this.getResources().getDisplayMetrics().density;

This is ok when the screen aspect ratio is normal means not long

But how can we set the pixels along Y-axis when the aspect ration is long.


--
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

Re: [android-developers] ViewFlipper switching views on screen orientation change

2010-01-24 Thread Atif Gulzar
whenever the orientation is changed the onCreate fuction is called again
(unless you handled it). Means your activity is refreshed.

before orientation change happened  onRetainNonConfigurationInstance()  is
called. You can save you activity state in this function.

And then in onCreate you can get it by calling

Object data = getLastNonConfigurationInstance();


Hope it helps.

--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Mon, Jan 25, 2010 at 9:23 AM, Marc gobl...@gmail.com wrote:

 I have a 3 nested ViewFlippers which seem to be working ok except that
 when I change the screen orientation the view flip back to the first
 one of my views, giving the user the impression it went back a few
 steps.

 I am a bit stumped as to what to do and was hoping someone had some
 experience with this. Thanks.

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

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

2010-01-24 Thread Atif Gulzar
whenever the orientation is changed the current activity is destroyed and
new one is created and onCreate fuction is called again (unless you handled
it). Means your activity is refreshed.


Before orientation change happened  onRetainNonConfigurationInstan

 ce()  is called. You can save you activity state in this function.

 And then in onCreate you can get it by calling

 Object data = getLastNonConfigurationInstance();


 Hope it helps.




--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Mon, Jan 25, 2010 at 10:29 AM, Atif Gulzar atif.gul...@gmail.com wrote:

 whenever the orientation is changed the onCreate fuction is called again
 (unless you handled it). Means your activity is refreshed.

 before orientation change happened  onRetainNonConfigurationInstance()  is
 called. You can save you activity state in this function.

 And then in onCreate you can get it by calling

 Object data = getLastNonConfigurationInstance();


 Hope it helps.

 --
 Best Regards,
 Atif Gulzar

 I  Unicode, ɹɐzlnƃ ɟıʇɐ




 On Mon, Jan 25, 2010 at 9:23 AM, Marc gobl...@gmail.com wrote:

 I have a 3 nested ViewFlippers which seem to be working ok except that
 when I change the screen orientation the view flip back to the first
 one of my views, giving the user the impression it went back a few
 steps.

 I am a bit stumped as to what to do and was hoping someone had some
 experience with this. Thanks.

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




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ContextMenu on TableLayout: how to get selected item position?

2010-01-24 Thread Atif Gulzar
I had the similar issue and solved it with a work around. In your table row
add a TextView and makes its visibility GONE and set its text as 0,1,2,4...
for respective rows. Add a single listener for each row. When some row is
clicked the listener will give you a clicked view. From this view get the
text view from this text view the index.





--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Sat, Jan 23, 2010 at 5:19 AM, Thierry Legras tleg...@gmail.com wrote:

 Hi,

 ContextMenu seems quite handy as long as we are using an AdapterView as we
 can easily get selected item position in onContextItemSelected from
 AdapterContextMenuInfo.position

 Any idea how we can achieve something similar in a TableLayout?
 In my TableLayout, i have some TableRow and i would like to get the row
 index in the onContextItemSelected callback like i would do with a simple
 ListView.

 I guess i will have to register the contextmenu for each row? but how can
 tie the row index with the menu? i see no way to do it with
 registerForContextMenu.

 Thks,
 Thierry.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] Best Server for Android MultiPlayer Games?

2010-01-18 Thread Atif Gulzar
Hi All,

I am developing a multiplayer card game. And currently looking for best
server. I have RD on three servers RED5, SmartFox and Elctro Server.

RED5 is open source but you have to right midle tier for android to
communicate with server.
SmartFox has inherent Android support.

Would you please share your expert thoughts or point me some other servers.
Thanks



--
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

Re: [android-developers] Re: Best Server for Android MultiPlayer Games?

2010-01-18 Thread Atif Gulzar
thanks Robert,

But I am not an expert of server things, that is why I am looking for some
already built server.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Jan 19, 2010 at 11:37 AM, Robert Green rbgrn@gmail.com wrote:

 I used Ruby on Rails with JSON as the high-level protocol for Wixel
 and it worked very well.  I just wrote a gateway service and used AIDL
 to define the interfaces.  Took me about a month to do from start to
 finish.

 On Jan 18, 11:52 pm, Atif Gulzar atif.gul...@gmail.com wrote:
  Hi All,
 
  I am developing a multiplayer card game. And currently looking for best
  server. I have RD on three servers RED5, SmartFox and Elctro Server.
 
  RED5 is open source but you have to right midle tier for android to
  communicate with server.
  SmartFox has inherent Android support.
 
  Would you please share your expert thoughts or point me some other
 servers.
  Thanks
 
  --
  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.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] prominent android developers

2010-01-13 Thread Atif Gulzar
Hi All,

I have compiled a small list  of prominent android developers how frequently
post on Google Android groups (android-developers.googlegroups.com 
android-beginners.googlegroups.com).  There is a flood of emails (200 per
day) on Google Android groups and it is not possible to follow all. But I
filter the below emails to extract (20 per day) valuable information. Would
you please add into this list.



hack...@android.com

romain...@google.com

romain...@android.com

mmur...@commonsware.com

marc...@android.com

roman.baumgaert...@t-mobile.com

yusuf.s...@t-mobile.com

x...@android.com

r...@android.com


--
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] Flash and future of Android game development?

2010-01-10 Thread Atif Gulzar
Hi All,

With the promising news of Flash support for Android what will the future of
Android Game development?


--
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: How to do Both horizontal and vertical scrolling on a screen

2009-12-29 Thread Atif
Yes, it is possible, I just tested it. And thanks for giving hint. I
was also looking for the same solution :)

regards,
Atif Gulzar

On Dec 14, 7:13 pm, Nithin nithin.war...@gmail.com wrote:
 Hi,

 Is it possible to put a scrollView(vertical scroll view) inside
 HorizontalScrollview, so that, I want my screen to scroll both
 horizontally and vertically

 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] retain application/Activity state correct approach?

2009-12-24 Thread Atif Gulzar
 hi,

I just read from internet to maintain the state of my application by
overriding the onKeyDown function as given below. And set the launch mode of
my activity as singleInstance. And it is working perfectly. Just want to
know if it is correct approach. And how it is different from
onSaveInstanceState. Thanks

   @Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
   if (keyCode == KeyEvent.KEYCODE_BACK)
  return this.moveTaskToBack(true);
   return super.onKeyDown(keyCode, event);
};


--
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] retain application/Activity state correct approach?

2009-12-22 Thread Atif Gulzar
hi,

I just read from internet to maintain the state of my application by
overriding the onKeyDown function as given below. And set the launch mode of
my activity as singleInstance. And it is working perfectly. Just want to
know if it is correct approach. And how it is different from
onSaveInstanceState. Thanks

public boolean onKeyDown(int keyCode, KeyEvent event)
{
return this.moveTaskToBack(true);
//return super.onKeyDown(keyCode, event);
};




--
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] view inside a customView

2009-12-11 Thread Atif Gulzar
Is it possible to use standard views inside your custom defined views. e.g.
use ImageView in my class that is extended form View ?

Or is it possible to use one custom view inside another custom view?
Actually I have animations defined in xml view which I want to apply on some
of the images. But predefined animations can only be applied to views.


The scenario is,  I want to animate (rotating, glowing, etc ) some of the
chips  on a board. User can also drag these chips through touch events. And
I do not want to refresh my complete board just to rotate few chips on it.
All my animations are defined in xml files. Looking for some pointers.
Thanks



--
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

Re: [android-developers] Screen Size

2009-12-09 Thread Atif Gulzar
you need to go through this article.

http://d.android.com/guide/practices/screens_support.html


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Dec 8, 2009 at 10:12 AM, Sasikumar.S sasikumar.it1...@gmail.comwrote:

 Hi hongi,

 Thanks for ur reply.

 I'm asking whether the android phone screen size are same or different?..


 On Tue, Dec 8, 2009 at 10:37 AM, hongki park 
 parkhongki.spr...@gmail.comwrote:

 what is a exact meaning of Size ??

 2009/12/8 Mark Murphy mmur...@commonsware.com

  All the Android Models are same size or different size?..

 There are QVGA, WQVGA400, WVGA432, HVGA, WVGA, and WVGA854 resolutions
 defined for Android. Hardware exists for most of those.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Thanks  Regards
 Sasikumar.S

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


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

Re: [android-developers] AsyncTaskPool | Tutorial

2009-11-19 Thread Atif Gulzar
Also, since Donut, the limit of  enqueued tasks in AsyncTask is 128, not
20. So AsyncTask has a maximum of 10 threads running concurrently

so what is the solution for Android 1.5


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Nov 11, 2009 at 9:25 PM, Romain Guy romain...@google.com wrote:

 Please consider the implications of this: does it even make sense to
 have 20+ threads (on a single CPU device) updating the UI at once?
 That is NOT the purpose of AsyncTask. Also, since Donut, the limit of
 enqueued tasks in AsyncTask is 128, not 20. So AsyncTask has a maximum
 of 10 threads running concurrently and can hold up to 128 tasks
 waiting for a thread to be freed in the pool. So basically AsyncTask
 does exactly what you are trying to do here.

 On Wed, Nov 11, 2009 at 1:02 AM, Atif Gulzar atif.gul...@gmail.com
 wrote:
  Android has a limit to rum at MAX 20 concurrent AsyncTask. To handle this
  limit I created a AsyncTaskPool.java utility. Its not a pool in true
 sense
  but a kind of scheduler. I am posting it here for your comments and it
 may
  help others.
 
  import java.util.ArrayList;
 
  import android.os.AsyncTask;
 
  public class AsyncTaskPool
  {
 
  private int poolSize;
  private ArrayListAsyncTask currentTasks = new
 ArrayListAsyncTask();
  private ArrayListObject pendingTasks = new ArrayListObject();
 
  /**
   * @param poolSize
   *: it should be less than 20. As Android only supports
 max.
  20 concurrent Asynch tasks.
   */
  public AsyncTaskPool(int poolSize)
  {
  this.poolSize = poolSize;
  }
 
  public int getPoolSize()
  {
  return poolSize;
  }
 
 
  public boolean addTask(AsyncTask asyncTask, Object... params)
  {
 
  if (currentTasks.size()  poolSize)
  {
  currentTasks.add(asyncTask);
  if (params != null)
  asyncTask.execute(params);
  else
  asyncTask.execute();
  }
  else
  {
  Object[] task = new Object[2];
  task[0] = asyncTask;
  task[1] = params;
 
  pendingTasks.add(task);
  }
 
  return true;
  }
 
  public boolean removeTask(AsyncTask task)
  {
  if(currentTasks.contains(task))
  {
  currentTasks.remove(task);
  return true;
  }
  return false;
  }
 
  //Add this method in the onPostExecute method of AsyncTask
  public boolean removeAndExecuteNext(AsyncTask atask)
  {
  removeTask(atask);
  if (pendingTasks.size()0  currentTasks.size()poolSize)
  {
  Object [] task = (Object []) pendingTasks.get(0);
  pendingTasks.remove(task);
 
  addTask((AsyncTask)task[0], (Object[])task[1]);
 
  }
 
  return false;
  }
 
  }
 
 
 
  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  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.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] AsyncTaskPool | Tutorial

2009-11-11 Thread Atif Gulzar
Android has a limit to rum at MAX 20 concurrent AsyncTask. To handle this
limit I created a AsyncTaskPool.java utility. Its not a pool in true sense
but a kind of scheduler. I am posting it here for your comments and it may
help others.

import java.util.ArrayList;

import android.os.AsyncTask;

public class AsyncTaskPool
{

private int poolSize;
private ArrayListAsyncTask currentTasks = new ArrayListAsyncTask();
private ArrayListObject pendingTasks = new ArrayListObject();

/**
 * @param poolSize
 *: it should be less than 20. As Android only supports max.
20 concurrent Asynch tasks.
 */
public AsyncTaskPool(int poolSize)
{
this.poolSize = poolSize;
}

public int getPoolSize()
{
return poolSize;
}


public boolean addTask(AsyncTask asyncTask, Object... params)
{

if (currentTasks.size()  poolSize)
{
currentTasks.add(asyncTask);
if (params != null)
asyncTask.execute(params);
else
asyncTask.execute();
}
else
{
Object[] task = new Object[2];
task[0] = asyncTask;
task[1] = params;

pendingTasks.add(task);
}

return true;
}

public boolean removeTask(AsyncTask task)
{
if(currentTasks.contains(task))
{
currentTasks.remove(task);
return true;
}
return false;
}

//Add this method in the onPostExecute method of AsyncTask
public boolean removeAndExecuteNext(AsyncTask atask)
{
removeTask(atask);
if (pendingTasks.size()0  currentTasks.size()poolSize)
{
Object [] task = (Object []) pendingTasks.get(0);
pendingTasks.remove(task);

addTask((AsyncTask)task[0], (Object[])task[1]);

}

return false;
}

}



--
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

AsyncTaskPool.java
Description: Binary data


[android-developers] Drawable.createFromStream() and OutOfMemoryError exception

2009-11-10 Thread Atif Gulzar
Hi,

Would you please help me how to handle the memory leak on
Drawable.createFromStream()?

 I am receiving a base64 image from a webservice. And I decode it using
Apache lib. After that I convert it to drawable through
Drawable.createFromStream(). But when the image size is bit larger (~350kb)
it starts throwing OutOfMemoryError exception. Ok, I can handle this by
catching this exception. But eventually after catching 2 or 3 such
exceptions the heap is full and it start throwing exceptions for other
methods and for small images as well.

The relevant code snip is given below.


byte[] arr = null;
InputStream imageStream = null;
try
{
arr = Base64.decodeBase64(result.getScreenShot().getBytes());

imageStream = new BufferedInputStream(new
ByteArrayInputStream(arr));
TJCAppDetail.this.screenShotDrawable =
Drawable.createFromStream(imageStream, src);
screenShot.setImageDrawable(screenShotDrawable);
}
catch (OutOfMemoryError outOfMemoryError)
{
arr = null;
imageStream = null;
if (screenShotDrawable != null)
{
screenShotDrawable.setCallback(null);
if (((BitmapDrawable) screenShotDrawable).getBitmap() != null)
((BitmapDrawable) screenShotDrawable).getBitmap().recycle();
}

Log.e(TJC_EXCEPTION, outOfMemoryError.getMessage());
}



--
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: Drawable.createFromStream() and OutOfMemoryError exception

2009-11-10 Thread Atif Gulzar
seems this is a reported bug?
http://code.google.com/p/android/issues/detail?id=294


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Nov 10, 2009 at 5:51 PM, Atif Gulzar atif.gul...@gmail.com wrote:

 Hi,

 Would you please help me how to handle the memory leak on
 Drawable.createFromStream()?

  I am receiving a base64 image from a webservice. And I decode it using
 Apache lib. After that I convert it to drawable through
 Drawable.createFromStream(). But when the image size is bit larger (~350kb)
 it starts throwing OutOfMemoryError exception. Ok, I can handle this by
 catching this exception. But eventually after catching 2 or 3 such
 exceptions the heap is full and it start throwing exceptions for other
 methods and for small images as well.

 The relevant code snip is given below.


 byte[] arr = null;
 InputStream imageStream = null;
 try
 {
 arr = Base64.decodeBase64(result.getScreenShot().getBytes());

 imageStream = new BufferedInputStream(new
 ByteArrayInputStream(arr));
 TJCAppDetail.this.screenShotDrawable =
 Drawable.createFromStream(imageStream, src);
 screenShot.setImageDrawable(screenShotDrawable);
 }
 catch (OutOfMemoryError outOfMemoryError)
 {
 arr = null;
 imageStream = null;
 if (screenShotDrawable != null)
 {
 screenShotDrawable.setCallback(null);
 if (((BitmapDrawable) screenShotDrawable).getBitmap() != null)
 ((BitmapDrawable)
 screenShotDrawable).getBitmap().recycle();
 }

 Log.e(TJC_EXCEPTION, outOfMemoryError.getMessage());
 }



 --
 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: Drawable.createFromStream() and OutOfMemoryError exception

2009-11-10 Thread Atif Gulzar
Bump

Hi,

Would you please help me how to handle the memory leak on
Drawable.createFromStream()?

 I am receiving a base64 image from a webservice. And I decode it using
Apache lib. After that I convert it to drawable through
Drawable.createFromStream(). But when the image size is bit larger (~350kb)
it starts throwing OutOfMemoryError exception. Ok, I can handle this by
catching this exception. But eventually after catching 2 or 3 such
exceptions the heap is full and it start throwing exceptions for other
methods and for small images as well.

The relevant code snip is given below.


byte[] arr = null;
InputStream imageStream = null;
try
{
arr = Base64.decodeBase64(result.

 getScreenShot().getBytes());

 imageStream = new BufferedInputStream(new
 ByteArrayInputStream(arr));
 TJCAppDetail.this.screenShotDrawable =
 Drawable.createFromStream(imageStream, src);
 screenShot.setImageDrawable(screenShotDrawable);
 }
 catch (OutOfMemoryError outOfMemoryError)
 {
 arr = null;
 imageStream = null;
 if (screenShotDrawable != null)
 {
 screenShotDrawable.setCallback(null);
 if (((BitmapDrawable) screenShotDrawable).getBitmap() != null)
 ((BitmapDrawable)
 screenShotDrawable).getBitmap().recycle();
 }

 Log.e(TJC_EXCEPTION, outOfMemoryError.getMessage());
 }







On Tue, Nov 10, 2009 at 7:11 PM, Atif Gulzar atif.gul...@gmail.com wrote:

 seems this is a reported bug?
 http://code.google.com/p/android/issues/detail?id=294



 --
 Best Regards,
 Atif Gulzar

 I  Unicode, ɹɐzlnƃ ɟıʇɐ



 On Tue, Nov 10, 2009 at 5:51 PM, Atif Gulzar atif.gul...@gmail.comwrote:

 Hi,

 Would you please help me how to handle the memory leak on
 Drawable.createFromStream()?

  I am receiving a base64 image from a webservice. And I decode it using
 Apache lib. After that I convert it to drawable through
 Drawable.createFromStream(). But when the image size is bit larger (~350kb)
 it starts throwing OutOfMemoryError exception. Ok, I can handle this by
 catching this exception. But eventually after catching 2 or 3 such
 exceptions the heap is full and it start throwing exceptions for other
 methods and for small images as well.

 The relevant code snip is given below.


 byte[] arr = null;
 InputStream imageStream = null;
 try
 {
 arr = Base64.decodeBase64(result.getScreenShot().getBytes());

 imageStream = new BufferedInputStream(new
 ByteArrayInputStream(arr));
 TJCAppDetail.this.screenShotDrawable =
 Drawable.createFromStream(imageStream, src);
 screenShot.setImageDrawable(screenShotDrawable);
 }
 catch (OutOfMemoryError outOfMemoryError)
 {
 arr = null;
 imageStream = null;
 if (screenShotDrawable != null)
 {
 screenShotDrawable.setCallback(null);
 if (((BitmapDrawable) screenShotDrawable).getBitmap() != null)
 ((BitmapDrawable)
 screenShotDrawable).getBitmap().recycle();
 }

 Log.e(TJC_EXCEPTION, outOfMemoryError.getMessage());
 }



 --
 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] suppress all notifications

2009-10-06 Thread Atif Gulzar
is it possible to suppress all notification messages e.g. incoming call or
sms notification?  Thanks

--
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: Keeping MediaController from timing out after a certain amount of time

2009-10-06 Thread Atif Gulzar
you may also use .show(timeout) function.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Oct 7, 2009 at 5:23 AM, Marco Nelissen marc...@android.com wrote:


 VideoView itself will hide/show the MediaController as it sees fit, so
 your call to show() will only be in effect until VideoView decides to
 hide (or show with a timeout) it again.
 Also, you are calling MediaController.show() before the
 MediaController is even attached to the VideoView.


 On Tue, Oct 6, 2009 at 2:53 PM, Danny datts...@gmail.com wrote:
 
  I have the following code:
 
  songView = (VideoView)this.findViewById(R.id.VideoView02);
  MediaController mc = new MediaController(this);
  mc.show(0);
  mc.requestFocus();
  songView.setMediaController(mc);
  songView.requestFocus();
 
 
 
 http://developer.android.com/reference/android/widget/MediaController.html#show%28int%29
 
  According to the doc , it says
  public void  show  (int timeout)
  The timeout in milliseconds. Use 0 to show the controller until hide()
  is called.
 
  I can not get the mediacontroller to show permanently or any other
  time. Anyone successfully get this to work? 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] suppress/mute all notifications

2009-10-06 Thread Atif Gulzar
is it possible to suppress all notification messages e.g. incoming call or
sms notification?  Thanks

Actually, I am developing a game and I want to given an option to user to
mute all notifications (some thing like do not disturb :)) while playing
game.



--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Oct 6, 2009 at 8:16 PM, Atif Gulzar atif.gul...@gmail.com wrote:


 is it possible to suppress all notification messages e.g. incoming call or
 sms notification?  Thanks

 --
 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] Is this possible: Capturing Audio while video is being played?

2009-10-05 Thread Atif Gulzar
Hi all,

Can I capture the audio through microphone while video is being played?

2ndly can I capture the touch events on video? (by developing my own video
player)


Thanks


--
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: Get active context dynamically of an application

2009-09-24 Thread Atif Gulzar
bump. Thanks :)

--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar atif.gul...@gmail.com wrote:

 Hi,

 How can get the active context of an application?

 The scenario is, I have an AsyncTask inside an activity_A. And on
 successful completion (means in onPostExecute) of this AsyncTask I want to
 show a dialog

 (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);)



 But in the meanwhile(before completing this AsyncTask) if the application
 is moved to another activity_B. The above dialog context will not be the
 current Context so it will through an Exception.


 So is it possible to get the active Context dianamically? Thanks



 --
 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] Please Help Urgent: Get active context dynamically of an application

2009-09-24 Thread Atif Gulzar

 I posted this questions twice. I will really appreciate your help. Am I
 asking very basic or vice versa? Or it is not possible in Android. Please
 help.



 On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar atif.gul...@gmail.comwrote:

 Hi,

 How can get the active context of an application?

 The scenario is, I have an AsyncTask inside an activity_A. And on
 successful completion (means in onPostExecute) of this AsyncTask I want to
 show a dialog

 (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);)



 But in the meanwhile(before completing this AsyncTask) if the application
 is moved to another activity_B. The above dialog context will not be the
 current Context so it will through an Exception.



 So is it possible to get the active Context dianamically? Thanks



 --
 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] Emulator and android Market

2009-09-14 Thread Atif Gulzar
Can I access Android Market through emulator? Thanks


--
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: Emulator and android Market

2009-09-14 Thread Atif Gulzar
I am following this thread
http://groups.google.com/group/android-developers/browse_thread/thread/7d26272f9064095f/75da068852f85b72#75da068852f85b72

lets see if it possible or not. Seems possible though.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Mon, Sep 14, 2009 at 3:28 PM, zhao lifeng zhaolifeng...@gmail.comwrote:


 You can't !
 On Mon, Sep 14, 2009 at 3:13 PM, Atif Gulzar atif.gul...@gmail.com
 wrote:
  Can I access Android Market through emulator? Thanks
 
 
  --
  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] Get active context dynamically of an application

2009-09-11 Thread Atif Gulzar
Hi,

How can get the active context of an application?

The scenario is, I have an AsyncTask inside an activity_A. And on successful
completion (means in onPostExecute) of this AsyncTask I want to show a
dialog

(AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);)


But in the meanwhile(before completing this AsyncTask) if the application is
moved to another activity_B. The above dialog context will not be the
current Context so it will through an Exception.


So is it possible to get the active Context dianamically? Thanks



--
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] Singleton Objects and Android

2009-09-10 Thread Atif Gulzar
Hi all,

I have some singleton objects in my android project. But these singleton
object are not initialized to null once I close my application on emulator
and run it again. But if I close the emulator and run my application again
these singleton objects are initialize to null. Please help. Thanks

the structure of my singleton objects is something like this

public final class TJCConfig
{
private static TJCConfig config = null;   //this is the line creating
problem

private TJCConfig()
{
   // some initializationn here
}


public static TJCConfig getTJCConfigInstance()
{
if( config == null )
config = new TJCConfig();
return config;
}

...

}



--
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] finishFromChild does not called

2009-09-09 Thread Atif

My child activity X is called from Parent activity P through
startActivity(intent).

I want to close P when X called its finish() method.

I override a method finishFromChild(Activity child) in P and called
finish() in it.

But this functions (finishFromChild(Activity child))  is not being
called after X finish()



Is it a known bug or I am missing some thing? I googled and also
searched the groups but no help.

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

2009-09-01 Thread Atif Gulzar
Hi all,

When I apply setTheme(android.R.style.Theme_Dialog); to my activity. The
width of the activity is wrapped to its content and some time it is very
skinny. Is it possible to force its width to the screen width? Thanks.


--
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] Views below ScrollView

2009-09-01 Thread Atif Gulzar
Hi all,

How can I add some buttons below ScrollView that always stay on screen.


--
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: Views below ScrollView

2009-09-01 Thread Atif Gulzar
ok I find the solution. Set Bottom layout margin of ScrollView to 50dp

and the view that you want to stick on screen sets its Up layout margin to
-50dp


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Sep 1, 2009 at 1:08 PM, Atif Gulzar atif.gul...@gmail.com wrote:

 Hi all,

 How can I add some buttons below ScrollView that always stay on screen.


 --
 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: Activity | Theme_Dialog

2009-09-01 Thread Atif Gulzar
bump


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Sep 1, 2009 at 1:04 PM, Atif Gulzar atif.gul...@gmail.com wrote:

 Hi all,

 When I apply setTheme(android.R.style.Theme_Dialog); to my activity. The
 width of the activity is wrapped to its content and some time it is very
 skinny. Is it possible to force its width to the screen width? Thanks.


 --
 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: Problem Using Jar File

2009-08-28 Thread Atif

Thanks Mark,

But my jar file is referring number of layouts (about 10) and these
layouts contains number of ids (about 100). It is difficult to pass so
many ids as parameters. We also try to include the R file in jar and
in code we refer this R file as com.mypackage.R.layout.* and
com.mypackage.R.id.* etc.

But still client file look ups its own generated R file.

Any workaround?

Thanks and regards,
Atif Gulzar

On Aug 28, 11:36 am, Mark Murphy mmur...@commonsware.com wrote:
             Thanks for your reply.Right now we are not using the R file of
  that project whose jar file is created.Jar file does not contains R files
  of
  that project.So R.layout and R.id's are created in the client project
  where
  i am using jar file.

 And that is precisely your problem, if the Java code in the JAR file tries
 using R.layout, R.id, and kin.

 Go through the Java code that is going into the JAR. Remove all references
 to R.layout, R.id, R.drawable, and so on. Augment your API such that those
 values are passed in as parameters.

 If your Java code in the JAR does not reference R.layout, R.id,
 R.drawable, and so on, then your JAR is fine. Do a clean build of your
 project (e.g., get rid of the contents of gen/ and bin/), and you should
 be OK.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problem Using Jar File

2009-08-28 Thread Atif Gulzar
Thanks Mark, It works, I will look into it how to optimize it.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Fri, Aug 28, 2009 at 1:52 PM, Mark Murphy mmur...@commonsware.comwrote:


  But my jar file is referring number of layouts (about 10) and these
  layouts contains number of ids (about 100). It is difficult to pass so
  many ids as parameters.

 You can try Resources#getIdentifier(). If you get this working, please
 cache your results, as these lookups are apparently expensive (Note: use
 of this function is discouraged. It is much more efficient to retrieve
 resources by identifier than by name.).

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html



 


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

2009-08-27 Thread Atif Gulzar
Hi Mark,

   Thanks for your reply.Right now we are not using the R file of
that project whose jar file is created.Jar file does not contains R files of
that project.So R.layout and R.id's are created in the client project where
i am using jar file.




--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Fri, Aug 28, 2009 at 12:10 AM, Mark Murphy mmur...@commonsware.comwrote:


  i am facing a problem in using jar file.I have created a jar
  file and i am trying to use it in another project.I also copy the xml
  files from res/layout folder of that project whose jar file is created
  to the res/layout folder of the project in which i am using jar file.I
  have also listed all the activites of jar in manifest file of that
  project. But when i call an activity that is inside jar file it loads
  the wrong xml file.I mean if inside an activity i have setContentview
  (R.layout.test1) but it loads another file instead of test1.
 
  Any Help??

 You cannot reference resources by R.layout, R.id, and such from within a
 JAR such as what you have packaged. You need to adjust your API so the
 application reusing your JAR can pass those values in as parameters.

 What happens is that even though you copied over the resources, the
 resource IDs (the numbers that R.layout.foo and R.id.bar map to) will be
 different in the new project.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can I know if some email client is configured?

2009-08-21 Thread Atif Gulzar
How can I know if some email client is configured on device. Actually I want
to compose an email_message.

But if no email account is configured Android treat it as simple message.
But I want to prompt user that no email client is configured, please
configure one.

That is why I need to know how to check if some email client is configured.

Thanks

--
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] Get default email account and compose a message?

2009-08-20 Thread Atif Gulzar
I am looking for some anchors how to get default Email account and compose a
new message. I will appreciate any help. Thanks


--
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: AsyncTask and Exception handling

2009-08-18 Thread Atif Gulzar
then how can I handle exceptions.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Aug 18, 2009 at 7:56 PM, Andrei gml...@gmail.com wrote:


 You can not do any UI activity from background thread
 See here examples
 http://android-developers.blogspot.com/2009/05/painless-threading.html

 On Aug 18, 9:45 am, Atif Gulzar atif.gul...@gmail.com wrote:
  Hi all,
 
  AsyncTask blocks exceptions?
 
  Please see the below code. My getOffersStatus function catches certain
  exceptions and show them in a AlertDialog. But instead of getting my
 custom
  exceptions message I get default error dialog The application ... has
  stopped unexpectdly. Please try again.
 
  Any thoughts ?
 
  protected ArrayListTJCOffersStatus doInBackground(Void... nothing)
  {
  return tj.getOffersStatus(config, test1234);
 
  }
 
  --
  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] is it possible to start an activity from non Activity class

2009-08-18 Thread Atif Gulzar
An activity can be called from existing activity through
*startActivity(intent);
*

Is t possible to call an activity from non Activity class ? and how?

Thanks


--
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: Is it possible to change text color of all child TextViews

2009-08-16 Thread Atif

just refreshing my request

On Aug 13, 2:49 pm, Atif Gulzar atif.gul...@gmail.com wrote:
 Is it possible to change text color of all child TextViews? Actually I want
 to change text color of all columns(TextViews) of a TableRow when it is
 clicked.

 --
 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: how to show dialog with only the progress image

2009-08-13 Thread Atif Gulzar
create a simple layout xml which has progressbar in it and set the
contetview of dialog to this layout.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Thu, Aug 13, 2009 at 2:07 PM, Sundar vmsund...@gmail.com wrote:


 Hi,

 how to show dialog with only the progress image without the rectangle,
 background color and text.
 I want only the spinning image in the dialog.

 Thanks in advance.

 V.Sundar

 


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

2009-08-13 Thread Atif Gulzar
Is it possible to change text color of all child TextViews? Actually I want
to change text color of all columns(TextViews) of a TableRow when it is
clicked.


--
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] default measuring units px or dp

2009-08-13 Thread Atif Gulzar
in xml file we can define measuring units along with the values.

If I want to set some property through code it only takes int value. What
is the default unit for this int?  px(pixels) or dp(density indipendent
pixels) ?


--
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] button press on custom drawable

2009-08-12 Thread Atif

The default button turns yellow|orange when it is pressed.

I just replaced the background through Drawable given below. But now
it stop changing the color on press. Sure I have to provide another
drawable (lets call it pressedButton) for that. But how and on which
even I should apply this pressedButton Drawable. Thanks



?xml version=1.0 encoding=utf-8?
shape xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle
gradient android:startColor=#FF505050
android:centerColor=#
android:endColor=#FF505050 /
padding android:left=5dp android:top=5dp android:right=5dp
android:bottom=5dp /

/shape


--
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] Equi Size button in linearLayout

2009-08-12 Thread Atif

I want to place three button on the bottom of screen. I place these
button in a linear layout and sets its gravity bottom.

Currently these button wrap according to their labels so have
different widths. But I want these button equi size. Means all three
button should have same width (without using fixed widths).

Is it possible?

--
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: button press on custom drawable

2009-08-12 Thread Atif Gulzar
Thanks Jiri,

That is exactly what I was looking for. Thanks again.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Aug 12, 2009 at 12:52 PM, Jiri jiriheitla...@googlemail.com wrote:


 Maybe this will help you:


 http://www.anddev.org/tinytutcustom_button_backgrounds-better_imagebutton-t4298.html

 regards,

 Jiri

 Atif wrote:
  The default button turns yellow|orange when it is pressed.
 
  I just replaced the background through Drawable given below. But now
  it stop changing the color on press. Sure I have to provide another
  drawable (lets call it pressedButton) for that. But how and on which
  even I should apply this pressedButton Drawable. Thanks
 
 
 
  ?xml version=1.0 encoding=utf-8?
  shape xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle
gradient android:startColor=#FF505050
  android:centerColor=#
android:endColor=#FF505050 /
padding android:left=5dp android:top=5dp android:right=5dp
android:bottom=5dp /
 
  /shape
 
 
  --
  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: Equi Size button in linearLayout

2009-08-12 Thread Atif Gulzar
unfortunately it will not make button equi size. As android:layout_weight
only distribute empty space.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Aug 12, 2009 at 1:52 PM, Jeff Sharkey jshar...@android.com wrote:


 Since the buttons are inside a LinearLayout, assign
 android:layout_weight=1 to each of the children.  Or, any fraction
 thereof, as long as the weights are identical.

 j

 On Tue, Aug 11, 2009 at 11:44 PM, Atifatif.gul...@gmail.com wrote:
 
  I want to place three button on the bottom of screen. I place these
  button in a linear layout and sets its gravity bottom.
 
  Currently these button wrap according to their labels so have
  different widths. But I want these button equi size. Means all three
  button should have same width (without using fixed widths).
 
  Is it possible?
 
  --
  Best Regards,
  Atif Gulzar
 
  I  Unicode, ɹɐzlnƃ ɟıʇɐ
 
  
 



 --
 Jeff Sharkey
 jshar...@android.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: Equi Size button in linearLayout

2009-08-12 Thread Atif Gulzar
Thanks mark, it works


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Aug 12, 2009 at 3:46 PM, Mark Murphy mmur...@commonsware.comwrote:


 Atif Gulzar wrote:
  unfortunately it will not make button equi size. As
  android:layout_weight only distribute empty space.

 So, set android:layout_width=0px for both. Then, the entire width is
 empty space, and two equal android:layout_weight=1 values will result
 in two buttons of equal size.

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

 _Beginning Android_ from Apress Now 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: Image with a Button, or text with ImageButton

2009-08-12 Thread Atif Gulzar
you can use a default button. Just use Drawable bottom | top | right | left
for image.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Aug 12, 2009 at 5:53 PM, gosh steve...@unimelb.edu.au wrote:


 Hi there,

 A 'Button' view comes up with text, while the 'ImageButton' widget
 comes up with an image but no text, is there a way to relatively
 easily (e.g. method calls, say), either:

 1. Add text to ImageButton (like those buttons that appear in menu
 item/via the physical menu button)?

 or

 2. Add an icon/image to a Button?

 without resorting to constructing a new button class?

 I.e. I could put text within the image, but then I can't use
 Localization properly/effectively.

 Any suggests, much appreciated here.
 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] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-08-12 Thread Atif Gulzar
have you tried TabActivity
http://developer.android.com/reference/android/app/TabActivity.html


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Aug 12, 2009 at 6:02 PM, Sena s...@imkon.com wrote:


 So the content of a tab is fixed once that tab has been initialised?
 That seems like a severe limit. Or am I missing something, should I be
 trying to achieve the same net result (to the user) some other way?

 Thanks
 S

 On Aug 12, 12:16 pm, Mark Murphy mmur...@commonsware.com wrote:
  Sena wrote:
   I have several tabs in my application. Each of which contains an
   activity. One of these is a ListActivity and I would like to open up
   another activity (in the same tab) when the user clicks on a ListItem.
 
  I am not convinced that this is possible.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://twitter.com/commonsguy
 
  Warescription: Three Android Books, Plus Updates, $35/Year
 


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



[android-developers] R.arawable visuals

2009-08-12 Thread Atif Gulzar
There are many drawables defined under R.drawable 
http://developer.android.com/reference/android/R.drawable.html;. Just
curious if their visuals are available somewhere?


--
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: R.arawable visuals

2009-08-12 Thread Atif Gulzar
Thanks Jack


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Aug 12, 2009 at 8:23 PM, Jack Ha jack...@t-mobile.com wrote:


 Try this link:

http://kapsencode.com/android_drawable/

 If you extract android.jar, you will also find them under the res/
 drawable directory.

 --
 Jack Ha
 Open Source Development Center
 ・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 Aug 12, 5:17 am, Atif Gulzar atif.gul...@gmail.com wrote:
  There are many drawables defined under R.drawable 
 http://developer.android.com/reference/android/R.drawable.html;. Just
  curious if their visuals are available somewhere?
 
  --
  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: add an activity pragmatically in Menifest.xml

2009-08-11 Thread Atif

suppose my library has some activities. Do I need to register these
activities in client menifest file? Thanks

On Aug 10, 6:10 pm, Andrei Bucur andrei.bu...@gmail.com wrote:
 This is how I make libraries for Android in Eclipse:
 1. I make a new Java project
 2. In the project properties, at Java Build Path - Libraries, I replace the
 the JDK library with the android.jar, found in the Android SDK.
 From what I tested, this solution seems to work.

 On Mon, Aug 10, 2009 at 2:54 PM, Atif atif.gul...@gmail.com wrote:

  Hi,

  I want to run an activity without adding it in Menifest.xml file. Is
  it possible? and how?

  Actually I am developing a component (Library) that other users can
  plugged with their programs.

  Best regards,
  Atif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: add an activity pragmatically in Menifest.xml

2009-08-11 Thread Atif Gulzar
is not it an extra task for client to list all activities provided by my
Lib?


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Wed, Aug 12, 2009 at 10:41 AM, Dianne Hackborn hack...@android.comwrote:

 Yes, all activities, services, receivers, and providers must be declared in
 the manifest.

 On Tue, Aug 11, 2009 at 9:05 PM, Atif atif.gul...@gmail.com wrote:


 suppose my library has some activities. Do I need to register these
 activities in client menifest file? Thanks

 On Aug 10, 6:10 pm, Andrei Bucur andrei.bu...@gmail.com wrote:
  This is how I make libraries for Android in Eclipse:
  1. I make a new Java project
  2. In the project properties, at Java Build Path - Libraries, I replace
 the
  the JDK library with the android.jar, found in the Android SDK.
  From what I tested, this solution seems to work.
 
  On Mon, Aug 10, 2009 at 2:54 PM, Atif atif.gul...@gmail.com wrote:
 
   Hi,
 
   I want to run an activity without adding it in Menifest.xml file. Is
   it possible? and how?
 
   Actually I am developing a component (Library) that other users can
   plugged with their programs.
 
   Best regards,
   Atif




 --
 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: disable scrolling touch events in ScrollView, just want to to scroll programmatically

2009-08-10 Thread Atif Gulzar
do not use scrollView at all and use LinearLauout and use combination of
touch events and scrollBy(int,
int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View.html#scrollBy%28int,%20int%29,
scrollTo(int, 
int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View.html#scrollTo%28int,%20int%29.
By this way you can also achieve horizontal scrolling.


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Mon, Aug 10, 2009 at 2:50 PM, rukiman ruksh...@optushome.com.au wrote:


 Just wondering if there is an easier way to simply stop ScrollView
 from being scrolled via touch inputs? I will programmatically get the
 ScrollView to scroll to top or bottom.

 As a last resort, I guess I will have to inherit from ScrollView and
 capture all the ontouch events. But wondering if there is an easier
 way before I take this approach?

 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] add an activity pragmatically in Menifest.xml

2009-08-10 Thread Atif

Hi,

I want to run an activity without adding it in Menifest.xml file. Is
it possible? and how?

Actually I am developing a component (Library) that other users can
plugged with their programs.


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

2009-08-06 Thread Atif Gulzar
 there is a difference in can be used only once and  single running
instance is allowed

The correct is only single running instance is allowed. Once can get the
status through getStatus and can take action accordingly e.g. cancel


if (YourasynchSubClass.getStatus() == AsyncTask.Status.RUNNING)
YourasynchSubClass.cancel(true);

YourasynchSubClass.execute(parms);




--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Fri, Aug 7, 2009 at 6:14 AM, Dianne Hackborn hack...@android.com wrote:

 If they have state associated with them, it can avoid a lot of errors to
 not re-use a stale object.

 On Thu, Aug 6, 2009 at 4:27 PM, Jason Proctor 
 jason.android.li...@gmail.com wrote:


 i must admit i don't quite understand these implementation decisions.
 one-use classes don't make much sense to me. why not make something
 reusable if you can?



 An AsyncTask instance can be used only once indeed. And they're not
 meant to be created/started dozens of times per second so the GC will
 be just fine.
 
 On Thu, Aug 6, 2009 at 4:00 PM, Jason
 Proctorjason.android.li...@gmail.com wrote:
 
   is it true that AsyncTasks can only be executed once? IMHO they
   should be reusable, one-use classes just give the GC more of a job.
 
   --
   jason.software.particle
 

 


 --
 jason.software.particle





 --
 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: Dialog

2009-08-04 Thread Atif Gulzar
I will recommend you to read

http://android-developers.blogspot.com/2009/05/painless-threading.html

and

http://developer.android.com/reference/android/os/AsyncTask.html




--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Tue, Aug 4, 2009 at 3:56 PM, Saurav Mukherjee 
to.saurav.mukher...@gmail.com wrote:

 make use of message for updating the progress dialogbox from the http
 thread. i think it'll b better if u use progress dialog with
 setIndeterminate(true). this wud make it simpler and u dont have to keep
 note of the progress...

 hope this helps.

 cheers!


 On Tue, Aug 4, 2009 at 2:58 PM, Rahul nakate.ra...@gmail.com wrote:


 hi
 i want to Download image from Server using Http Connection and at same
 time i want to show ProgressDialod till is not Downloaded
 i dont undestand how to do this
 plz help me
 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
-~--~~~~--~~--~--~---



[android-developers] Table header alligment

2009-07-31 Thread Atif

Problem Statement: Define Table Header row and allign it column with
other table columns

I have a table with multiple rows and this table is inside a
ScrollView (the code is below) (I add rows by using code)

Now I want to declare a header row for this table that is not
scrolling.

for this I created another table with single header row. But its
columns are not aligned with scrolling table.

How can I align the columns ?



ScrollView android:id=@+id/ScrollView01
android:layout_height=wrap_content
android:layout_width=fill_parent
android:scrollbarStyle=outsideInset
TableLayout android:layout_height=wrap_content
android:id=@+id/HighScoreTable 
android:layout_width=fill_parent
android:stretchColumns=2
/TableLayout
/ScrollView



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