[android-developers] Re: Problem in install app programatically in android

2019-12-01 Thread Suraj Gupta
The apk may have issue while building. try to check individually.

On Thursday, November 28, 2019 at 12:46:31 PM UTC+5:30, Ashutosh Kakdiya 
wrote:
>
> I get *"There was a problem parsing the package"* error when i install 
> app programatically in android 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/4ae3057b-03df-4292-8b79-cfff9eda63c2%40googlegroups.com.


[android-developers] Re: problem in uses permission

2017-02-11 Thread Nivrutti Patil
i think you use API Level 23 and above, its required run time permission

see below link 
http://www.journaldev.com/10409/android-handling-runtime-permissions-example




-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/df7aac14-147b-4ab0-8c22-12e737d1d53b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Problem with Android 6.0 and Bluetooth

2016-09-26 Thread Sébastien Schutz


Le lundi 26 septembre 2016 12:01:00 UTC+2, Sébastien Schutz a écrit :
>
> Hi,
>
> I'm currently developping an application which uses Bluetooth.
>
> I connect to two Bluetooth devices with the smartphone. I use one 
> BluetoothGatt instance per BluetoothDevice.
>
> I was testing the application with my Samsung Galaxy A5 which is under 
> Android 5.0.2, and it was working without any problem.
>
> A friend tests the application on his smartphone which is a Blackview 
> BV6000s which is under Android 6., and it's not working.
>
> As I was trying to debug, I found that the discover of services of the 
> second gatt instance didn't work.
>
> Could you help me ? Do you think it is about the version of Android or 
> more about the smartphone and its stack ? (The same problem with a Samsung 
> Galaxy Note under Android 6).
>
> Thank you !
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/a0f1ae33-13b4-45de-89c2-72f4b41bf199%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Problem in usb debugging

2016-06-03 Thread Usha Hegde
Hi,
  This article gives how to debug your apps in MAC. 
http://esausilva.com/2010/10/02/how-to-set-up-adb-android-debug-bridge-in-mac-osx/.
 

Just give it a try.
-Usha Hegde

On Thursday, June 2, 2016 at 4:01:29 PM UTC+5:30, akshaybiss...@gmail.com 
wrote:
>
> I would be glad if someone could help me. I am using an ASUS Memo Pad 
> ME172V. I am using Android Studio for developing applications and I am 
> using a MAC. When I am connecting my device to the MAC. My device is not 
> being listed in the available devices for debugging list. I request if 
> someone could help.
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/2dec9fc8-320f-48d2-913c-0302da60d916%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Problem in the guide "Building your first app"

2016-06-02 Thread Noam Meirovitch
Hey,
Try to use "Basic Activity" template , it should create the content.xml 
file for you in the layout..

בתאריך יום חמישי, 2 ביוני 2016 בשעה 15:54:27 UTC+3, מאת Jesper Lindberg:
>
> Hello!
> I'm going to take an android programming course this summer and I thought 
> I could start and get prepared by following some of the guides on 
> developer.andoird.com
> I was following the guide "Building your first app" when I encounter a 
> problem.
> The problem I encounter was on step "Display the message"
>
> https://developer.android.com/training/basics/firstapp/starting-activity.html
>
> The "content" file for my ny activity do not exist. (
> content_display_message.xml)
> The contant file for my frist activity do exist. The only thing I did 
> diffrent fomr the guide was when I was going to make the second activity. I 
> took "empty actiity" instead of "blank activity" since I couldent find 
> blank activity. Now, is there an easy way to get a content file?
>
> I tried ofc googeling the question first but diden't find any good awnsers 
> more then what the content file was for and why it was important.
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/3ad2ff78-5cca-4cf9-9bc3-003b4344ec10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: problem with sending data from app by volley to mysqli

2016-04-20 Thread VISHAL TIKKU
Try from postman client and analyze the response.

On 20 April 2016 at 10:17, Nizzam Mohd  wrote:

> I also facing the same problem, I already debug and everything looks fine.
> Could it be a server response ?
>
> On Sunday, December 6, 2015 at 6:09:11 PM UTC+8, AbdulMajeed Mohammad
> wrote:
>>
>> Hi,
>>
>> I have problem with sending data from app to mysql by php file, I hope to
>> get some help
>> I don't know also if I did it in right way,
>>
>> contact.java
>>
>> public class Contact extends AppCompatActivity {
>>
>> EditText name,phone,email,subject;
>> Button add;
>> RequestQueue requestQueue;
>> String addUrl = "http://10.0.2.2/alruthea/contact/addcontact.php;;
>>
>> @Override
>> protected void onCreate(Bundle savedInstanceState) {
>> super.onCreate(savedInstanceState);
>> setContentView(R.layout.activity_contact);
>> getSupportActionBar().setDisplayShowCustomEnabled(true);
>> getSupportActionBar().setCustomView(R.layout.actionbar);
>>
>> name = (EditText) findViewById(R.id.contactname);
>> phone = (EditText) findViewById(R.id.contactphone);
>> email = (EditText) findViewById(R.id.contactemail);
>> subject = (EditText) findViewById(R.id.contactsubject);
>> add = (Button) findViewById(R.id.contactsend);
>>
>>
>> requestQueue = Volley.newRequestQueue(getApplicationContext());
>>
>>
>> add.setOnClickListener(new View.OnClickListener() {
>> @Override
>> public void onClick(View view) {
>> StringRequest request = new StringRequest(Request.Method.POST, 
>> addUrl, new Response.Listener() {
>> @Override
>> public void onResponse(String response) {
>>
>> }
>> }, new Response.ErrorListener() {
>> @Override
>> public void onErrorResponse(VolleyError error) {
>>
>> }
>> }) {
>> @Override
>> protected Map getParams() throws 
>> AuthFailureError {
>> Map parameters = new HashMap> String>();
>> parameters.put("name", name.getText().toString());
>> parameters.put("phone", phone.getText().toString());
>> parameters.put("email", email.getText().toString());
>> parameters.put("subject", subject.getText().toString());
>>
>> return parameters;
>> }
>> };
>> requestQueue.add(request);
>> }
>>
>> });
>>
>>
>> }
>>
>> }
>>
>>
>>
>> connection.php
>>
>> >
>> define('hostname','localhost');
>> define('user' , 'root');
>> define('password','');
>> define('databaseName','alruthea');
>>
>> $connect = mysqli_connect(hostname, user, password, databaseName);
>>
>> ?>
>>
>>
>>
>>
>>
>> addcontact.php
>>
>> >
>> if($_SERVER["REQUEST_METHOD"]=="POST"){
>>require 'alruthea/contact/connection.php';
>>createContact();
>>}
>>
>>function createcontact()
>>{
>>global $connect;
>>
>>$name = $_POST["name"];
>>$phone = $_POST["phone"];
>>$email = $_POST["email"];
>>$subject = $_POST["subject"];
>>
>>$query = "Insert into contact(name,phone,email,subject) values
>> ('$name;,'$phone','$email','$subject');";
>>
>>mysqli_query($connect, $query) or die (mysqli_error($connect));
>>mysqli_close($connect);
>>}
>>
>>?>
>>
>>
>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/ofI7CeDO9gM/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/ad591b4c-999c-4191-a1e5-2cd0b8ce4ca1%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 

[android-developers] Re: problem with sending data from app by volley to mysqli

2016-04-19 Thread Nizzam Mohd
I also facing the same problem, I already debug and everything looks fine. 
Could it be a server response ?

On Sunday, December 6, 2015 at 6:09:11 PM UTC+8, AbdulMajeed Mohammad wrote:
>
> Hi,
>
> I have problem with sending data from app to mysql by php file, I hope to 
> get some help
> I don't know also if I did it in right way,
>
> contact.java
>
> public class Contact extends AppCompatActivity {
>
> EditText name,phone,email,subject;
> Button add;
> RequestQueue requestQueue;
> String addUrl = "http://10.0.2.2/alruthea/contact/addcontact.php;;
>
> @Override
> protected void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.activity_contact);
> getSupportActionBar().setDisplayShowCustomEnabled(true);
> getSupportActionBar().setCustomView(R.layout.actionbar);
>
> name = (EditText) findViewById(R.id.contactname);
> phone = (EditText) findViewById(R.id.contactphone);
> email = (EditText) findViewById(R.id.contactemail);
> subject = (EditText) findViewById(R.id.contactsubject);
> add = (Button) findViewById(R.id.contactsend);
>
>
> requestQueue = Volley.newRequestQueue(getApplicationContext());
>
>
> add.setOnClickListener(new View.OnClickListener() {
> @Override
> public void onClick(View view) {
> StringRequest request = new StringRequest(Request.Method.POST, 
> addUrl, new Response.Listener() {
> @Override
> public void onResponse(String response) {
>
> }
> }, new Response.ErrorListener() {
> @Override
> public void onErrorResponse(VolleyError error) {
>
> }
> }) {
> @Override
> protected Map getParams() throws 
> AuthFailureError {
> Map parameters = new HashMap String>();
> parameters.put("name", name.getText().toString());
> parameters.put("phone", phone.getText().toString());
> parameters.put("email", email.getText().toString());
> parameters.put("subject", subject.getText().toString());
>
> return parameters;
> }
> };
> requestQueue.add(request);
> }
>
> });
>
>
> }
>
> }
>
>
>
> connection.php
>
> 
> define('hostname','localhost');
> define('user' , 'root');
> define('password','');
> define('databaseName','alruthea');
>
> $connect = mysqli_connect(hostname, user, password, databaseName);
>
> ?>
>
>
>
>
>
> addcontact.php
>
> 
> if($_SERVER["REQUEST_METHOD"]=="POST"){
>require 'alruthea/contact/connection.php';
>createContact();
>}
>
>function createcontact()
>{
>global $connect;
>
>$name = $_POST["name"];
>$phone = $_POST["phone"];
>$email = $_POST["email"];
>$subject = $_POST["subject"];
>
>$query = "Insert into contact(name,phone,email,subject) values 
> ('$name;,'$phone','$email','$subject');";
>
>mysqli_query($connect, $query) or die (mysqli_error($connect));
>mysqli_close($connect);
>}
>
>?>
>
>
>
>
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/ad591b4c-999c-4191-a1e5-2cd0b8ce4ca1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: problem while publishing my application

2016-02-07 Thread Vitaly Fadeev


суббота, 6 февраля 2016 г., 21:24:40 UTC+3 пользователь Vitaly Fadeev 
написал:
>
> I have a problem, while publish my application in google play.
> There is an  icon description in 
> AndroidManifest.xml :
>
> 
> http://schemas.android.com/apk/res/android;
> package="ru.thetheory.losscalculator"
> android:versionCode="1"
> android:versionName="1.0"
> >
> 
> android:allowBackup="true"
> android:icon="@drawable/loss_picture"
> android:label="@string/app_title"
> android:theme="@style/AppTheme">
>  android:label="@string/app_title"
> android:name="ru.thetheory.losscalculator.StartActivity"
> android:icon="@drawable/loss_picture">
> 
> 
> 
> 
> 
>
> 
>
> 
>
>
> There are files 
>
>
> res\drawable\drawable-hdpi\loss_picture.png  72x72
>
> res\drawable\drawable-ldpi\loss_picture.png  36x36
>
> res\drawable\drawable-mdpi\loss_picture.png  48x48
>
> res\drawable\drawable-xhdpi\loss_picture.png 96x96
>
> res\drawable\drawable-xxhdpi\loss_picture.png   144x144
>
> res\drawable\drawable-xxxhdpi\loss_picture.png  192x192
>
>
> in the project. 
>
>
> Pictures are displayed correctly  on the emulator, and on the  lenovo phones 
> ...
>
>
> But google play return error message "The is no image file in APK", when i 
> try upload it in google play ?
>
> What is  the reason of the error message ?
>
>
> I asked the question...
>
> I answer it...
I recreate the project in andoid developer studio and  after it play 
accepted the file...
I started my project about a half year ago... 
It seems, that something bacame wrong after uptate  andriod studio version 
  
May be, the problem is in gradle config file ,,, 

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/23cae5ef-029a-4a70-abec-4af3153e4ee4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Problem with battery on Android 6.0.1.

2016-01-10 Thread niks
Here is a solution that someone found about your problem (please not that 
if that works credits go to somebody else from another forum):

 issue of 6.0.1. I have a very large unreported battery consumption 
--

Here's what I found and tested working the last week or so, while I was 
also suffering from the bug but no trick could help me
To all of you that turning off WIFI scanning does not help, try after 
disabling it, to open a relevant app eg. Google maps. Marshmallow then will 
probably show a dialog box proposing to enable the setting --> [now, later 
or NEVER]
To me, it "worked" only after selecting the "never" option there and not 
when I simply turned it off in location settings.
Of course I say trick "worked" in quotes, because the bug still exists 
under the hood if someone wants to have that extra location help with wifi 
scanning setting active like me, and I recognize that this CAN NOT be, in 
anyway, considered as a kind of permanent solution...

PS: Proving my thoughts correct as a trick and not a full solution, is the 
fact that the WIFI bar in the second battery graph named "History details" 
for SOT, charging, signal etc. still shows constant no matter if wifi was 
turned on/off during the cycle...
PS 2: Battery life for all this week "without" the bug, seems almost 
unchanged compared to the extreme 30% + drain percentages displayed, so I 
still stand to my "conclusion" (mark my quotes plz) that the core of the 
issue is calculation and not real battery consumption/drain that 
corresponds to the numbers



Τη Κυριακή, 10 Ιανουαρίου 2016 - 10:29:24 π.μ. UTC+2, ο χρήστης Ольга 
Панфёрова έγραψε:
>
> After updating my phone with android 6.0.1. I have a very large unreported 
> battery consumption . Up to 35 per cent in a single charge cycle . Only 
> when wi-fi is off, it's stops. What can help me to fix this problem? 
> Nexus 5x

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/87ddb404-294e-4563-beef-79c6b1e4580c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: problem with sending data from app by volley to mysqli

2015-12-07 Thread VISHAL TIKKU
Hi Abdul
Firstly check whether your controller is getting the request if yes then go 
through your log to check if there is some syntax error in query while 
inserting into table.

On Monday, December 7, 2015 at 4:41:14 PM UTC+5:30, AbdulMajeed Mohammad 
wrote:
>
> any help please

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/78b42273-5860-4a1c-9b19-d6256aa2da15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Problem to grant temporary access to custom content provider using FLAG_GRANT_READ_URI_PERMISSION

2014-02-10 Thread DiscoS2
Hi Jin, 

Did you ever get this sorted? I have the same issue however it doesn't 
occur on Ice Cream Sandwich and Jellybean only on the Gingerbread I have. 



On Friday, 16 November 2012 22:45:55 UTC, Jin wrote:

 Hi, I am trying to query custom content provider(App A) from another 
 app(App B). 

 I can do that when there is no permission protection for content provider. 
 Specifically, I build custom content provider on App A and sent an intent 
 containing the URI to App B. Then App B get the URI and query the 
 corresponding data in content provider.

 Then, I add these permissions to the provider:
 provider 
 android:authorities=com.ck.contentprovider.MyContentProvider
 android:name=com.ck.contentprovider.MyContentProvider 
* android:readPermission=android.permission.permRead*
 *android:writePermission=android.permission.permWrite*
 *android:grantUriPermissions=true*
 /provider
 And add this sentence to the intent so as to grant temporary access to App 
 B
 sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
 However, this time, when I query content provider from App B, errors occur:
 java.lang.RuntimeException: Unable to start activity 
 ComponentInfo{com.android.web/com.android.web.Provid}: 
 *java.lang.SecurityException: 
 Permission Denial: opening provider 
 *com.ck.contentprovider.MyContentProvider 
 from ProcessRecord{426c6ea8 17032:com.android.web/u0a95} (pid=17032, 
 uid=10095) *requires android.permission.permRead or 
 android.permission.permWrite*

 It seems that App B did not make use of the temporary permission to 
 access. In other word, how to utilize FLAG_GRANT_READ_URI_PERMISSION?

 Thanks for attention
 Jin



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


[android-developers] Re: Problem running Android JUnit Test on eclipse

2013-11-27 Thread Amon Olimov


 I restarted my eclipse and all ok :)

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


[android-developers] Re: Problem with getScanResults()

2013-10-08 Thread BearTi
How? What do u need?



Am Dienstag, 8. Oktober 2013 21:14:55 UTC+2 schrieb BearTi:

 Hi,

 I´ve a big problem with the getScanResults() function. I always get 0 
 as result.

 Here is my Code (it´s a service):

 public void onCreate() {
 super.onCreate();
 
 wifiMgr = (WifiManager)getSystemService(Context.WIFI_SERVICE);
 sharedPreferences = 
 PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
 intentScan = new IntentFilter();
 intentScan.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
 scanReceiver = new ScanReceiver();
 
 screenOnReceiver = new ScreenOnReceiver();  
 registerReceiver(screenOnReceiver, new 
 IntentFilter(Intent.ACTION_SCREEN_ON));
 
 screenOffReceiver = new ScreenOffReceiver();
 registerReceiver(screenOffReceiver, new 
 IntentFilter(Intent.ACTION_SCREEN_OFF));
 }
 
 @Override
 public void onDestroy () {
   unregisterReceiver(screenOnReceiver);
   unregisterReceiver(screenOffReceiver);
 }
 
 @Override
 public void onStart(Intent intent, int startId) {
 wifiMgr = (WifiManager)getSystemService(Context.WIFI_SERVICE);
 
 registerReceiver(scanReceiver, intentScan); 
 
 showToasts = sharedPreferences.getBoolean(checkbox_notification, 
 true);
 autoSync = sharedPreferences.getBoolean(checkbox_autosync, true);
 if(wifiMgr.getConnectionInfo().getNetworkId() == -1) {
 if(wifiMgr.setWifiEnabled(true)) {
 
if(!wifiMgr.startScan()){ 
unregisterReceiver(scanReceiver);
}
 }
 }else{
 if(showToasts)
 Toast.makeText(this.getApplicationContext(),R.string.toast_nochange, 
 Toast.LENGTH_SHORT).show();
 }
 }


  

 public class ScanReceiver extends BroadcastReceiver {
 @Override
 public void onReceive(Context context, Intent intent) {
 Log.d(wifi, ScanComplete - +intent.getAction());
 
 ListWifiConfiguration wifiListSupplicant = 
 wifiMgr.getConfiguredNetworks();
 ListScanResult wifiListScan = wifiMgr.getScanResults();
 

 Log.d(wifi, LIST: +wifiListScan.size());

 } } 



 Somebody an idea?

 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
--- 
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/groups/opt_out.


Re: [android-developers] Re: Problem with getScanResults()

2013-10-08 Thread Robert Greenwalt
adb bugreport  mybug

and send me the resulting mybug file


On Tue, Oct 8, 2013 at 1:08 PM, BearTi mlrti...@gmail.com wrote:

 How? What do u need?



 Am Dienstag, 8. Oktober 2013 21:14:55 UTC+2 schrieb BearTi:

 Hi,

 I´ve a big problem with the getScanResults() function. I always get 0
 as result.

 Here is my Code (it´s a service):

 public void onCreate() {
 super.onCreate();

 wifiMgr = (WifiManager)getSystemService(**Context.WIFI_SERVICE);
 sharedPreferences = PreferenceManager.**
 getDefaultSharedPreferences(**this.getApplicationContext());
 intentScan = new IntentFilter();
 intentScan.addAction(**WifiManager.SCAN_RESULTS_**
 AVAILABLE_ACTION);
 scanReceiver = new ScanReceiver();

 screenOnReceiver = new ScreenOnReceiver();
 registerReceiver(**screenOnReceiver, new
 IntentFilter(Intent.ACTION_**SCREEN_ON));

 screenOffReceiver = new ScreenOffReceiver();
 registerReceiver(**screenOffReceiver, new
 IntentFilter(Intent.ACTION_**SCREEN_OFF));
 }

 @Override
 public void onDestroy () {
   unregisterReceiver(**screenOnReceiver);
   unregisterReceiver(**screenOffReceiver);
 }

 @Override
 public void onStart(Intent intent, int startId) {
 wifiMgr = (WifiManager)getSystemService(**Context.WIFI_SERVICE);

 registerReceiver(scanReceiver, intentScan);

 showToasts = sharedPreferences.getBoolean(**checkbox_notification,
 true);
 autoSync = sharedPreferences.getBoolean(**checkbox_autosync,
 true);
 if(wifiMgr.getConnectionInfo()**.getNetworkId() == -1) {
 if(wifiMgr.setWifiEnabled(**true)) {

if(!wifiMgr.startScan()){
unregisterReceiver(**scanReceiver);
}
 }
 }else{
 if(showToasts)
 Toast.makeText(this.**getApplicationContext(),R.**string.toast_nochange,
 Toast.LENGTH_SHORT).show();
 }
 }




 public class ScanReceiver extends BroadcastReceiver {
 @Override
 public void onReceive(Context context, Intent intent) {
 Log.d(wifi, ScanComplete - +intent.getAction());

 ListWifiConfiguration wifiListSupplicant =
 wifiMgr.getConfiguredNetworks(**);
 ListScanResult wifiListScan = wifiMgr.getScanResults();


 Log.d(wifi, LIST: +wifiListScan.size());

 } }



 Somebody an idea?

 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
 ---
 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/groups/opt_out.


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


[android-developers] Re: Problem with getScanResults()

2013-10-08 Thread BearTi
Hmm, I don´t think the problem is caused because of my device what can 
you see in this bug-report?

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
--- 
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/groups/opt_out.


[android-developers] Re: problem centering the camera in Maps V2

2013-09-27 Thread gjs
Hi,

Don't know.

What happens if you comment out the marker, is the map still centered at 
the same location ? 

Also does this vary with device rotation  / or different zoom - eg 21,  
on phone or tablet ?

I think there's also an option to move / animate  zoom the camera at the 
same, something like - map.moveCamera(CameraUpdateFactory.newLatLngZoom(
center, zoom)) - maybe try that as well.

I notice that the map moves a bit when you press on a marker, to show the 
text.

Regards

On Friday, September 27, 2013 9:50:45 AM UTC+10, Gary Blakely wrote:

 In my android app I have the following code...

 CameraUpdate center= CameraUpdateFactory.newLatLng(new LatLng(Lat,Lon));
 DebugLog.debugLog(centered camera on  + Lat +  and  + Lon, false);
 CameraUpdate zoom=CameraUpdateFactory.zoomTo(15);
 map.moveCamera(center);
 map.animateCamera(zoom);
 map.addMarker(new MarkerOptions()
  .position(new LatLng(Lat, Lon))
  .title(Phone Location)
  );

 Lat is 31.7898
 Lon is -111.0354

 The marker is exactly at that location.  However the camera is centered 
 about 5 miles north of that location on the v2 map.
 Why?
 Thanks
 Gary


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


[android-developers] Re: problem centering the camera in Maps V2

2013-09-27 Thread lbendlin
What happens if you set the camera tilt to zero?

On Thursday, September 26, 2013 7:50:45 PM UTC-4, Gary Blakely wrote:

 In my android app I have the following code...

 CameraUpdate center= CameraUpdateFactory.newLatLng(new LatLng(Lat,Lon));
 DebugLog.debugLog(centered camera on  + Lat +  and  + Lon, false);
 CameraUpdate zoom=CameraUpdateFactory.zoomTo(15);
 map.moveCamera(center);
 map.animateCamera(zoom);
 map.addMarker(new MarkerOptions()
  .position(new LatLng(Lat, Lon))
  .title(Phone Location)
  );

 Lat is 31.7898
 Lon is -111.0354

 The marker is exactly at that location.  However the camera is centered 
 about 5 miles north of that location on the v2 map.
 Why?
 Thanks
 Gary


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


[android-developers] Re: problem centering the camera in Maps V2

2013-09-27 Thread Gary Blakely
After reading the docs at
I found that the following code works well.  However my original code 
should have worked so I guess there are still some bugs.

CameraPosition cameraPosition = new CameraPosition.Builder()
.target(new LatLng(Lat, Lon))
.zoom(15)
.bearing(0)
.tilt(45)
.build();
map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
map.addMarker(new MarkerOptions()
 .position(new LatLng(Lat, Lon))
 .title(Phone Location)
 ); 


On Thursday, September 26, 2013 4:50:45 PM UTC-7, Gary Blakely wrote:

 In my android app I have the following code...

 CameraUpdate center= CameraUpdateFactory.newLatLng(new LatLng(Lat,Lon));
 DebugLog.debugLog(centered camera on  + Lat +  and  + Lon, false);
 CameraUpdate zoom=CameraUpdateFactory.zoomTo(15);
 map.moveCamera(center);
 map.animateCamera(zoom);
 map.addMarker(new MarkerOptions()
  .position(new LatLng(Lat, Lon))
  .title(Phone Location)
  );

 Lat is 31.7898
 Lon is -111.0354

 The marker is exactly at that location.  However the camera is centered 
 about 5 miles north of that location on the v2 map.
 Why?
 Thanks
 Gary


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


[android-developers] Re: Problem with layout_above in conjunction with layout_alignBaseline

2013-06-05 Thread Dusk Jockeys Android Apps
Thanks, Piren.
 

Unfortunately none of that helps, as sometimes you really need things to 
work as they should. In my case it is A and B that are fixed, and C has to 
depend on them. 

I resorted to messing about with Font Metrics, working out manual 
displacements based on font size, which is pretty messy. Honestly I don’t 
see why this should be a dependency issue, when 

layout_alignBottom which does exactly the same thing (but without the 
vertical offset) works fine, C happily sits above B if B is aligned to A's 
bottom, rather than its baseline.

 

However, that led me to find a little quirk, if you align B to A using 
simultaneous layout_alignBottom and  layout_alignBaseline flags, then C’s 
positioning now works, it happily sits above B exactly as if just 
layout_alignBottom was being used, although B is still aligned to A’s 
baseline. The caveat is that C’s positioning is sligthty lower than normal; 
it behaves as if the B is aligned to A’s bottom, then C is positioned, and 
then B is realigned to A’s baseline, without C changing position. However I 
can get round that with some margin offsets, and at least it can be done 
via XML.
 

On Tuesday, May 21, 2013 11:37:51 PM UTC+8, Piren wrote:

 I'm not too sure why this is happening... i'm guess that alignBaseline 
 affects measuring differently and causes a cyclic dependency (Romain?)

 Try changing the relationships so you'll define A and B Below C instead, 
 since C has a constant location anyhow.

 Also if your View hierarchy isnt too complex and wouldn't need to be 
 refreshed too often, you can let yourself use more ViewGroups (use a 
 linearlayout to divide the top and the bottom views)... Although that 
 increases the amount of views you have and makes the rendering tree bigger, 
 it will be easier for you to read the XML and understand the behavior and 
 also prevent this weird behavior. 

 On Tuesday, May 21, 2013 5:49:20 PM UTC+3, Dusk Jockeys Android Apps wrote:

 I have a layout issue which it seems should be simple to do in a 
 RelativeLayout.
  
 I have a view A, and a view B which is aligned to A's baseline, and 
 aligned to the right of the parent. B appears correctly.
  
 Then I want a view C to be directly above B, and also aligned to the 
 right of the parent. However, C never appears. 
  
 However, if I change B to be aligned to the *bottom* of A, as opposed to 
 its *baseline*, then C appears. 
  
 So it seems that layout_above doesn't like to act upon something that 
 references another view via layout_alignBaseline, but is fine acting upon 
 something that references another View via layout_alignBottom.
  
 Can anyone shed any light upon this? It seems like it is a common 
 scenario that should work. See the following.
  
 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android
 
 android:id=@+id/mainlayout
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:orientation=vertical 
 TextView
 android:id=@+id/A
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=A
 android:textColor=@android:color/white
 android:textSize=182dp /
 TextView
 android:id=@+id/B
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_alignBaseline=@id/A
 android:layout_alignParentRight=true
 android:text=B
 android:textColor=@android:color/white
 android:textSize=26dp /
 TextView
 android:id=@+id/C
 android:layout_width=wrap_content
 android:layout_height=wrap_content
  android:layout_alignParentRight=true
 android:layout_above=@id/B
 android:text=C never appears!
 android:textColor=@android:color/white
 android:textSize=20dp /
 /RelativeLayout
  
 Regards,
 James



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




[android-developers] Re: Problem with layout_above in conjunction with layout_alignBaseline

2013-06-05 Thread Piren
I've discovered a long time ago that when it comes to Android, not 
everything works as it should :)


On Wednesday, June 5, 2013 1:28:18 PM UTC+3, Dusk Jockeys Android Apps 
wrote:

 Thanks, Piren.
  

 Unfortunately none of that helps, as sometimes you really need things to 
 work as they should. In my case it is A and B that are fixed, and C has to 
 depend on them. 

 I resorted to messing about with Font Metrics, working out manual 
 displacements based on font size, which is pretty messy. Honestly I don’t 
 see why this should be a dependency issue, when 

 layout_alignBottom which does exactly the same thing (but without the 
 vertical offset) works fine, C happily sits above B if B is aligned to A's 
 bottom, rather than its baseline.

  

 However, that led me to find a little quirk, if you align B to A using 
 simultaneous layout_alignBottom and  layout_alignBaseline flags, then C’s 
 positioning now works, it happily sits above B exactly as if just 
 layout_alignBottom was being used, although B is still aligned to A’s 
 baseline. The caveat is that C’s positioning is sligthty lower than normal; 
 it behaves as if the B is aligned to A’s bottom, then C is positioned, and 
 then B is realigned to A’s baseline, without C changing position. However I 
 can get round that with some margin offsets, and at least it can be done 
 via XML.
  

 On Tuesday, May 21, 2013 11:37:51 PM UTC+8, Piren wrote:

 I'm not too sure why this is happening... i'm guess that alignBaseline 
 affects measuring differently and causes a cyclic dependency (Romain?)

 Try changing the relationships so you'll define A and B Below C instead, 
 since C has a constant location anyhow.

 Also if your View hierarchy isnt too complex and wouldn't need to be 
 refreshed too often, you can let yourself use more ViewGroups (use a 
 linearlayout to divide the top and the bottom views)... Although that 
 increases the amount of views you have and makes the rendering tree bigger, 
 it will be easier for you to read the XML and understand the behavior and 
 also prevent this weird behavior. 

 On Tuesday, May 21, 2013 5:49:20 PM UTC+3, Dusk Jockeys Android Apps 
 wrote:

 I have a layout issue which it seems should be simple to do in a 
 RelativeLayout.
  
 I have a view A, and a view B which is aligned to A's baseline, and 
 aligned to the right of the parent. B appears correctly.
  
 Then I want a view C to be directly above B, and also aligned to the 
 right of the parent. However, C never appears. 
  
 However, if I change B to be aligned to the *bottom* of A, as 
 opposed to its *baseline*, then C appears. 
  
 So it seems that layout_above doesn't like to act upon something that 
 references another view via layout_alignBaseline, but is fine acting upon 
 something that references another View via layout_alignBottom.
  
 Can anyone shed any light upon this? It seems like it is a common 
 scenario that should work. See the following.
  
 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=
 http://schemas.android.com/apk/res/android;
 android:id=@+id/mainlayout
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:orientation=vertical 
 TextView
 android:id=@+id/A
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=A
 android:textColor=@android:color/white
 android:textSize=182dp /
 TextView
 android:id=@+id/B
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_alignBaseline=@id/A
 android:layout_alignParentRight=true
 android:text=B
 android:textColor=@android:color/white
 android:textSize=26dp /
 TextView
 android:id=@+id/C
 android:layout_width=wrap_content
 android:layout_height=wrap_content
  android:layout_alignParentRight=true
 android:layout_above=@id/B
 android:text=C never appears!
 android:textColor=@android:color/white
 android:textSize=20dp /
 /RelativeLayout
  
 Regards,
 James



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




[android-developers] Re: Problem restoring values after rotation in a custom view (when it is added twice to the layout)

2013-06-02 Thread Piren
The same issue was posted here not long ago... My assumption is that 
because both of your views have the same child IDs, the activity fails to 
store (or restore) the data appropriately.
You should handle these yourself (use onRetainInstanceState and 
onRestoreInstanceState/ onCreate) to save and update the view information 
properly or stop using view ids on the children (not tested it, but i 
believe that if you drop all ids from the children, the issue will be 
resolved. you'll need to find them by their order in the parent instead of 
their id).

On Sunday, June 2, 2013 1:44:26 PM UTC+3, charlie babitt wrote:

 Hi!

 I have the following problem:
 I want to write a specialized Date Input view, which basically has a 
 EditText, with button for clearing the input and another button opening a 
 date picker.

 Thefore I started with writing a ClearableTextView, which extends 
 RelativeLayout. This view only has an EditText and the button for clearing 
 the edit text. Now I implement a ClearableDatePicker which extends the 
 ClearableTextView. It only adds the button for opening the Date Picker.
 In the layout of the activity I add it using  

 com.test.view.ClearableDatePicker
 android:id=@id/cdpBirthDate
 android:hint=@string/tvBirthDate
 android:padding=3dip
 android:scrollHorizontally=true /

 Everything works great until I add a second one and then rotate the 
 device. Now something really strange happens. The value of the second 
 EditText is restored to the first one and the second one is empty. I can't 
 explain this behavior. Does anyone have an idea?

 Thanks
 Charlie


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




[android-developers] Re: Problem with layout_above in conjunction with layout_alignBaseline

2013-05-21 Thread Piren
I'm not too sure why this is happening... i'm guess that alignBaseline 
affects measuring differently and causes a cyclic dependency (Romain?)

Try changing the relationships so you'll define A and B Below C instead, 
since C has a constant location anyhow.

Also if your View hierarchy isnt too complex and wouldn't need to be 
refreshed too often, you can let yourself use more ViewGroups (use a 
linearlayout to divide the top and the bottom views)... Although that 
increases the amount of views you have and makes the rendering tree bigger, 
it will be easier for you to read the XML and understand the behavior and 
also prevent this weird behavior. 

On Tuesday, May 21, 2013 5:49:20 PM UTC+3, Dusk Jockeys Android Apps wrote:

 I have a layout issue which it seems should be simple to do in a 
 RelativeLayout.
  
 I have a view A, and a view B which is aligned to A's baseline, and 
 aligned to the right of the parent. B appears correctly.
  
 Then I want a view C to be directly above B, and also aligned to the right 
 of the parent. However, C never appears. 
  
 However, if I change B to be aligned to the *bottom* of A, as opposed to 
 its *baseline*, then C appears. 
  
 So it seems that layout_above doesn't like to act upon something that 
 references another view via layout_alignBaseline, but is fine acting upon 
 something that references another View via layout_alignBottom.
  
 Can anyone shed any light upon this? It seems like it is a common scenario 
 that should work. See the following.
  
 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
 android:id=@+id/mainlayout
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:orientation=vertical 
 TextView
 android:id=@+id/A
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:text=A
 android:textColor=@android:color/white
 android:textSize=182dp /
 TextView
 android:id=@+id/B
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:layout_alignBaseline=@id/A
 android:layout_alignParentRight=true
 android:text=B
 android:textColor=@android:color/white
 android:textSize=26dp /
 TextView
 android:id=@+id/C
 android:layout_width=wrap_content
 android:layout_height=wrap_content
  android:layout_alignParentRight=true
 android:layout_above=@id/B
 android:text=C never appears!
 android:textColor=@android:color/white
 android:textSize=20dp /
 /RelativeLayout
  
 Regards,
 James


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




[android-developers] Re: Problem on Android 4.2 with screen-on wakelocks

2013-05-11 Thread sebouh00
I found a way to turn the screen off but it requires Admin privilege. I 
used DevicePolicyManager.lockNow().

More here: 
http://marakana.com/s/post/1291/android_device_policy_administration_tutorial

On Saturday, April 20, 2013 1:15:20 AM UTC+3, sebouh00 wrote:

 I have the following goal in my application. I want to wake the phone up 
 and turn the screen on for 1 second from within my service and let the 
 phone go back to sleep. I would like to do this in intervals throughout the 
 day. The sole purpose of this is that turning the screen on will update the 
 cell network data for some devices. I use this data in my application to 
 execute some actions based on the cell id.

 I've used the following approach successfully on earlier releases of 
 Android: acquire a wakelock with ACQUIRE_CAUSES_WAKEUP 
 and SCREEN_DIM_WAKE_LOCK flag with a timeout of 1000 ms.

 When this executes, the screen goes on for 1 sec and then switches off. 
 The problem is on 4.2 the screen stays on until the user-set display 
 timeout expires, even though I've release the wakelock. I have tested this 
 several times on several devices running 4.2.2 and 4.2.1. I would 
 appreciate some advise on how to do this. I understand that the 
 SCREEN_DIM_WAKE_LOCK is deprecated, but I have not found any other means of 
 achieving this.

 Thank you,
 Sebouh.



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




[android-developers] Re: Problem in multiple web service request using AsyncTask

2013-05-05 Thread Piren
I'm not sure why you're asking how to do it in AsyncTask, you're already 
doing it in an AsyncTask ...
Also not sure why you're asking about security, what exactly do you want to 
secure here?
 
Both of these are not related to the first issues you described which have 
to do with your HTTP client implementation and nothing to do with the 
AsyncTask itself... for these anyhow, you just need to increase the default 
values for timeouts.
 
Either way, you should really refactor your code since it has some 
fundemental issues... any failure in the process will require you to 
restart the whole thing... if you fail at the last table, you'd have to 
retrieve all the data beforehand again until you'd get to that table (even 
though all previous tables are already up to date). Even without seperating 
those into multiple concurrent tasks, you should at least provide a 
cache/restore/failover machenism.

On Sunday, May 5, 2013 9:04:52 PM UTC+3, Guilherme Bernardi wrote:

 Hi.

 I implemented a process that do multiple web service request to fill the 
 tables one by one, but I'm having some problems for example:

 - The same process on my Razr(Android 4.0.4) the process completed 
 normally, but in a smartphone with Android(2.2) for example, I get errors 
 like 'SocketTimeout', connections problems and exceptions (FutureTask).

 The process:

 on my doInBackground I'm calling all the requests:

 @Override
 protected Void doInBackground(Void... params) {
 // TODO Auto-generated method stub
  Cliente cliente = new Cliente();
 cliente.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 cliente.importarDados();
  TabelaPreco tabelaPreco = new TabelaPreco();
 tabelaPreco.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 tabelaPreco.importarDados();
  ClienteEndereco clienteEndereco = new ClienteEndereco();
 clienteEndereco.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 clienteEndereco.importarDados();
  Comprador comprador = new Comprador();
 comprador.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 comprador.importarDados();
  ProdutoPreco produtoPreco = new ProdutoPreco();
 produtoPreco.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 produtoPreco.importarDados();
  Embalagem embalagem = new Embalagem();
 embalagem.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 embalagem.importarDados();
  Produto produto = new Produto();
 produto.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 produto.importarDados();
  Grupo grupo = new Grupo();
 grupo.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 grupo.importarDados();
  FormaPagamento formaPagamento = new FormaPagamento();
 formaPagamento.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 formaPagamento.importarDados();
  Cidade cidade = new Cidade();
 cidade.setWsRepresentante(getSharedPreferences(PREFS_PRIVATE, 
 MODE_PRIVATE).getInt(representante, 0));
 cidade.importarDados();
  return null;
 }

 This importarDados() call the super method from each class that execute 
 this process that fill the table with the results:

 DataBase = new 
 DadosBD(Singleton.getContextoAplicacao());
 SoapObject request = new SoapObject(this.getWsNameSpace(), 
 this.getWsNomeMetodo());
 request.addProperty(representante, WsRepresentante);
 SoapSerializationEnvelope envelope = new 
 SoapSerializationEnvelope(SoapEnvelope.VER11);
 envelope.dotNet = true;
 envelope.implicitTypes = false;
 envelope.setOutputSoapObject(request);
  HttpTransportSE httpTransport = new HttpTransportSE(this.getWsUrl());
 httpTransport.call(this.getWsNameSpace() +  + this.getWsNomeMetodo(), 
 envelope);
 SoapObject result = (SoapObject) envelope.getResponse();
  if (result != null) {
  int resultCount = result.getPropertyCount();
  if(resultCount  0){
  SoapObject objResult = new SoapObject();
 SoapObject objSoap = new SoapObject();
  objResult = (SoapObject) result.getProperty(1);
 if(objResult.getPropertyCount()  0){
  objSoap = (SoapObject) objResult.getProperty(0);
 int propertyResultCount = objSoap.getPropertyCount();
 
 if (propertyResultCount  0){

  DataBase.BeginTransaction();
  
  SQLiteStatement stmtInsert = 
 DataBase.getDataBase().compileStatement(DataBase.ExecInsertBuilder(Tabela, 
 TabelaColunaComposta));
  SQLiteStatement stmtSelect = 
 DataBase.getDataBase().compileStatement(DataBase.ExecSelectBuilder(false, 
 Tabela, TabelaSelecaoArgumentos, TabelaSelecao, TabelaGroupBy, 
 TabelaHaving, TabelaOrderBy, 1));
  

[android-developers] Re: Problem with getSystemService in a thread

2013-04-22 Thread Carlos Alberto Castaño García
You must send Activity's context to thread and do:

context.getSystemService(...);

So works!.


El miércoles, 21 de octubre de 2009 06:27:30 UTC-5, cedcox escribió:

 Hello everybody, 

 I would like re-read a KML file with the GPS. As the inside-GPS 
 eclipse don't manage altitude (cf my last post) i decided to create a 
 thread that do it. 

 So, i have a service that Listen my provider GPS simulation and i 
 would like create the thread that set coordonate information for 
 simulation provider. 

 But in my thread with this line : 
 monLocationManager = (LocationManager) getSystemService 
 (Context.LOCATION_SERVICE); 

 Eclipse says that getSystemService is undefined 

 So, i found a solution that works but i think it's not very very 
 beautiful and i think i haven't to do that : 
 I declare a locationManager in my thread's class and in my service, i 
 affect the locationManager of my service to the location manager of my 
 thread. 


 here is my code (simplified with only code interesting) of the 
 service: 

 public class ServiceGPS extends Service { 

 // variables declaration 
 public LocationManager monLocationManager = null; 
 simuThread monSimuThread; 
 [ others variables ] 

 public class MonBinder extends Binder 
 {ServiceGPS getService(){return ServiceGPS.this;}} 

 @Override 
 public IBinder onBind(Intent arg0) {return new MonBinder();} 

 @Override 
 public void onStart(Intent MonIntent, int startId) 
 { 
 monLocationManager = (LocationManager) getSystemService 
 (Context.LOCATION_SERVICE); 

 [  some code ... ] 

 monSimuThread = new simuThread(); 
 monSimuThread.monLocationManager = monLocationManager; // 
 == 
 HERE !! 
 monSimuThread.start(); 

 monLocationListener = new LocationListener() 
 { 
 public void onLocationChanged(Location maLocation) 
 { 
 double maLatitude = 
 maLocation.getLatitude(); 
 double maLongitude = 
 maLocation.getLongitude(); 
 double monAltitude = 
 maLocation.getAltitude(); 

 Intent MonIntent = new Intent 
 (EVENT_NOUVELCOORD); 
 MonIntent.putExtra(latitude, 
 String.valueOf(maLatitude)); 
 [... other putExtra ...] 

 ServiceGPS.this.sendBroadcast(MonIntent); 

 } // fin onLocationChanged 

 [  some code ... ] 
 } // fin LocationListener 

 monLocationManager.requestLocationUpdates(provider,   
  6, 

 500,monLocationListener); 

 super.onStart(MonIntent, startId); 
 } // fin onStart 
 } 

 ** 

 here is my code for the thread : 

 public class simuThread extends Thread { 

 // Variables Declaration 
 LocationManager monLocationManager = null; 
 [ others variables ] 

 public void run() 
 { 
 try 
 { 
 while (!arretThread) 
 { 
 Thread.sleep(1000); 
 Location maLocation = new Location(simulation); 
 maLocation.setAltitude(1000); 
 maLocation.setLatitude(2.87566); 
 maLocation.setLongitude(48.456456); 
 monLocationManager.setTestProviderLocation(simulation, maLocation); 
 } 
 } 
 catch (Exception e) 
 {[  some code ... ]} 

 super.run(); 

 } // fin run 
 } 

 Can somewone tell me how i can do that more beautifully ??? 

 Thx a lot 

 Cedric

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




[android-developers] Re: Problem while sending unicode character via SMS

2013-04-02 Thread vong borey

Hi Andu,

I am very new to android, and face the same problem. Reading your post I am 
very happy to follow but I really don't know to use that class for sending.
Could you please give me some tips?

Thank in advance,


On Tuesday, December 29, 2009 4:02:22 PM UTC+7, andu wrote:

 How are you all?


 I am developing application for android phone. Currently I am testing
 my system in the emulator. In my application, I want to send unicode
 character (Amharic language character) via SMS to the other emulator
 instance. But in the receiver side, the message is not viewed
 properly. I think the problem is some character encoding related
 problem.

 In addition similar problem happens for texts which are queried for
 the sqlite database. that is when I send a query result via SMS the
 same problem occurs. Please help me.

 Sorry for posting the same message again. Please help me.

 Thank you

 Andu.



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




[android-developers] Re: Problem while facebook login through my app

2013-03-11 Thread Tamilarasi Sivaraj
Already you have *Facebook native apk*  in your  *physical device or 
emulator*.So you have met this problem..

Regards
Android developer
Trinay Technology Solutions
www.trinaytech.com
5705750475

On Thursday, March 7, 2013 10:26:26 PM UTC+5:30, Bajrang Asthana wrote:

 Hi;

 I am not able to log-in to Facebook through my android app (*tried from 
 phone as well as on emulator)*, I am getting error your app is not 
 correctly configured. I am getting this problem only if *Facebook native 
 apk* is installed. 

 I look for android hash key and app id many times and everything seems OK 
 to me. I am not getting, is there anything else which can be the cause of 
 this problem.

 Please suggest :)




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




[android-developers] Re: problem in detecting samsung android tablet 2 P5100

2013-03-05 Thread bob
 

Are you talking about the Galaxy Tab 2?


Thanks.



On Monday, March 4, 2013 9:40:56 PM UTC-6, |-NK-| wrote:

 I have enabled Usb debugging.
 However i am not sure whether installing kies will install adb drivers.
 So do u know where can I find adb drivers for that specific tablet.

 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
--- 
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/groups/opt_out.




[android-developers] Re: problem in detecting samsung android tablet 2 P5100

2013-03-05 Thread |-NK-|
Yes. I am referring to 
samsung galaxy tab2 GT-P5100

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




[android-developers] Re: problem in detecting samsung android tablet 2 P5100

2013-03-05 Thread |-NK-|
Yes. I am referring to 
samsung galaxy tab2 GT-P5100

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




[android-developers] Re: problem in detecting samsung android tablet 2 P5100

2013-03-05 Thread bob
Okay, this sounds like the 10.1 inch version.

You should be able to get the drivers here:

http://www.samsung.com/us/support/owners/product/GT-P5113TSYXAR

What version of Windows do you have?


https://lh6.googleusercontent.com/-3eeNPjgecWA/UTY_f5vwwLI/ATw/RMFXrx2jd9g/s1600/samsung.png



On Tuesday, March 5, 2013 11:16:33 AM UTC-6, |-NK-| wrote:

 Yes. I am referring to 
 samsung galaxy tab2 GT-P5100


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




Re: [android-developers] Re: Problem with gradle build version 0.3 and signing (signingConfigs)

2013-03-04 Thread Daniel Rindt
2013/3/1 Jonathan S xfsuno...@gmail.com

 Okay, I fixed this.

 signingConfigs {
 myConfig {
 storeFile file(signingStoreLocation)
 storePassword signingStorePassword
 keyAlias signingKeyAlias
 keyPassword signingKeyPassword
 }
 }

 buildTypes {
 release {
 signingConfig signingConfigs.myConfig

 }
 }


Thank you, that fixes my issue.
Daniel

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




[android-developers] Re: problem in detecting samsung android tablet 2 P5100

2013-03-04 Thread Jonathan S
on Windows, you need ADB Drivers for your tablet.
on tablet, USB Debugging needs to be enabled.

On Monday, March 4, 2013 3:16:18 PM UTC-5, |-NK-| wrote:

 Hello,
 I bought a samsung android tablet 2 P5100. I am developing an application 
 and wanted to debug it on this tablet using eclipse.
 However my device did not get detected as android device( saw it in the 
 list of connected android device in command prompt).

 I downloaded the samsung kies from samsung website but still no success.

 Does anyone know why my device is not getting detected.

 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
--- 
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/groups/opt_out.




[android-developers] Re: problem in detecting samsung android tablet 2 P5100

2013-03-04 Thread |-NK-|
I have enabled Usb debugging.
However i am not sure whether installing kies will install adb drivers.
So do u know where can I find adb drivers for that specific tablet.

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
--- 
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/groups/opt_out.




[android-developers] Re: Problem with gradle build version 0.3 and signing (signingConfigs)

2013-03-01 Thread Jonathan S
http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Signing-Configurations
 
I see string values

On Friday, March 1, 2013 6:53:19 AM UTC-5, Daniel Rindt wrote:

 Hello,

 using the builder version 0.3 and try to sign my app. Those values are 
 present in ~/.gradle/gradle.properties and worked fine in version 0.2.
 Here is my definition:
 apply plugin: 'android'

 def getCurrentVersionCodeOrBuildNumber() {
 ext.v = System.getenv().BUILD_NUMBER?.toInteger()
 if (ext.v == -1 || ext.v == null)
 ext.v = 1

 return ext.v
 }

 android {
 compileSdkVersion 17
 sourceSets {
 main {
 manifest {
 srcFile AndroidManifest.xml
 }
 res {
 srcDir res
 }
 java {
 srcDirs = ['src', 'src-gen']
 }
 }
 }
 defaultConfig {
 versionCode getCurrentVersionCodeOrBuildNumber()
 }
 signingConfigs {
 release {
 storeLocation project.ext.androidSigningStoreLocation
 storePassword project.ext.androidSigningStorePassword
 keyAlias project.ext.androidSigningKeyAlias
 keyPassword project.ext.androidSigningKeyPassword
 }
 }
 buildTypes {
 release {
 signingConfig signingConfigs.release
 }
 }
 }

 dependencies {
 compile ':android-support:v4'
 compile ':greenDAO:'
 compile ':gson:2.2.2'
 compile project(':ZXing')
 }

 when i do a gradle assembleDebug i got:
 A problem occurred evaluating project ':ProjectC'.
  Could not find method storeLocation() for arguments 
 [/home/drindt/.android/debug.keystore] on 
 SigningConfigDsl_Decorated{name=release, storeFile=null, 
 storePassword=null, keyAlias=null, keyPassword=null, storeType=null}.

 The keystore file exits and its accessible with the credentials.

 Thank you for suggestions and help.
 Daniel


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




[android-developers] Re: Problem with gradle build version 0.3 and signing (signingConfigs)

2013-03-01 Thread Jonathan S
Okay, I fixed this.

signingConfigs {
myConfig {
storeFile file(signingStoreLocation)
storePassword signingStorePassword
keyAlias signingKeyAlias
keyPassword signingKeyPassword
}
}

buildTypes {
release {
signingConfig signingConfigs.myConfig
}
}

On Friday, March 1, 2013 4:06:37 PM UTC-5, Jonathan S wrote:


 http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Signing-ConfigurationsI
  see string values

 On Friday, March 1, 2013 6:53:19 AM UTC-5, Daniel Rindt wrote:

 Hello,

 using the builder version 0.3 and try to sign my app. Those values are 
 present in ~/.gradle/gradle.properties and worked fine in version 0.2.
 Here is my definition:
 apply plugin: 'android'

 def getCurrentVersionCodeOrBuildNumber() {
 ext.v = System.getenv().BUILD_NUMBER?.toInteger()
 if (ext.v == -1 || ext.v == null)
 ext.v = 1

 return ext.v
 }

 android {
 compileSdkVersion 17
 sourceSets {
 main {
 manifest {
 srcFile AndroidManifest.xml
 }
 res {
 srcDir res
 }
 java {
 srcDirs = ['src', 'src-gen']
 }
 }
 }
 defaultConfig {
 versionCode getCurrentVersionCodeOrBuildNumber()
 }
 signingConfigs {
 release {
 storeLocation project.ext.androidSigningStoreLocation
 storePassword project.ext.androidSigningStorePassword
 keyAlias project.ext.androidSigningKeyAlias
 keyPassword project.ext.androidSigningKeyPassword
 }
 }
 buildTypes {
 release {
 signingConfig signingConfigs.release
 }
 }
 }

 dependencies {
 compile ':android-support:v4'
 compile ':greenDAO:'
 compile ':gson:2.2.2'
 compile project(':ZXing')
 }

 when i do a gradle assembleDebug i got:
 A problem occurred evaluating project ':ProjectC'.
  Could not find method storeLocation() for arguments 
 [/home/drindt/.android/debug.keystore] on 
 SigningConfigDsl_Decorated{name=release, storeFile=null, 
 storePassword=null, keyAlias=null, keyPassword=null, storeType=null}.

 The keystore file exits and its accessible with the credentials.

 Thank you for suggestions and help.
 Daniel



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




[android-developers] Re: Problem while sending JSON from android app to Java servlet using post method

2013-02-14 Thread Brill Pappin
This isn't really an Android specific problem.
However, your content type is wrong if you are sending the JSON as a POST 
parameter. You should be using form encoding or even multipart.
If you a dumping the JSON into the POST data then you should likely be 
using a PUT instead of a POST.



On Wednesday, 13 February 2013 10:09:46 UTC-5, Bajrang Asthana wrote:

 I am trying to send JSON object from android app to my servlet using 
 HttpPost. 
 But while retrieving this JSON object at server side I am getting null. 
 Below is code snippet-

 In android app-

 HttpClient client = new DefaultHttpClient();

 HttpPost request = new HttpPost(hostNameCollection);

 StringEntity se = new StringEntity(jsonObj.toString());

 request.setHeader(Accept, application/json);
 request.setHeader(Content-type, application/json);


 request.setEntity(se);
 HttpResponse response = client.execute(request);


  In java servlet(under post method)-
 req.getParameterMap();

 I have also try to send post parameter using NameValuePair but it could 
 also not solve the problem.

 Please suggest what should I do to get rid of this.

 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
--- 
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/groups/opt_out.




[android-developers] Re: problem accessing external library

2013-01-28 Thread Lew
Jim wrote:

 I just figured out the answer.

 For some reason, the new Android SDK tools need any external libraries to 
 be accessed from a libs directory that is a subdirectory of the project's 
 directory. I made the directory and copied the jsoup library to it, redid 
 the build path, and voila! It works!


 Could the reason be:
http://developer.android.com/tools/projects/index.html
libs/
Contains private libraries. ?

See also
http://lmgtfy.com/?q=android+add+jar+to+project

-- 
Lew

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




[android-developers] Re: problem accessing external library

2013-01-27 Thread Jungle Jim
I just figured out the answer.

For some reason, the new Android SDK tools need any external libraries to 
be accessed from a libs directory that is a subdirectory of the project's 
directory. I made the directory and copied the jsoup library to it, redid 
the build path, and voila! It works!

On Sunday, January 27, 2013 11:44:19 PM UTC-6, Jungle Jim wrote:

 I have been using jsoup 1.6.3 successfully in an Android app to read data 
 from a website.
 I recently upgraded the Android SDK tools to version 21.0.1 and the 
 Android SDK Platform-toolls to version 16.0.1 and now it no longer works. 
 When I rebuild the application, install it on a device, and run it, I get 
 Sorry! The application X has stopped unexpectedly.
 My code seems to import the library successfully with:
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.select.Elements;
 But then in my method, the first time I try to do anything with jsoup:
 Document document = Jsoup.connect(SPOT_SERVER_BASE).get();
 I get the above error message with I try to run the app on a device. And 
 the logcat says:
 could not find method org.jsoup,Jsoup.connect
 I get the idea that my app isn't connecting with the jsoup library at all. 
 I have also downloaded version 1.7.1 and I get the same results. Any ideas 
 what I am doing wrong?
 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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group, send email to 
android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Problem in larger xml parsing with SOAP web service

2013-01-08 Thread ss04091993
hi spike,
As rajan post output of web service when returning dataset.

Actual problem: I am creating a web service in net which returns Dataset 
in XML format. Using KSOAP i am calling web service methods to get dataset 
which retuns Dataset. Webserice response stored in a string variable. So 
string Display Output as
anyType{NewDataSet=anyType{Table=anyType{AdSpaceID=423; 
AdspaceName=Hoarding at football, (Amul); 
Address=football,(Amul)-Ahmedabad; }; Table=anyType{AdSpaceID=424; 
AdspaceName=Hoarding at football, tow. Bhulabhai.(Amul); Address=football, 
tow. Bhulabhai.(Amul)-Ahmedabad; }; Table=anyType{AdSpaceID=425; 
AdspaceName=Hoarding at Bhulabhai 4 Road Junction; Address=Bhulabhai 4 Road 
Junction-Ahmedabad; }; Table=anyType{AdSpaceID=426; AdspaceName=Hoarding at 
Bhulabhai Park, Tow. S.T. Stand; Address=Bhulabhai Park, Tow. S.T. 
Stand-Ahmedabad; }; Table=anyType{AdSpaceID=427; AdspaceName=Hoarding at 
Bhulabhai Park,Tow. Maninagar  Shah- Alam; Address=Bhulabhai 
Park,-Ahmedabad; }; Table=anyType{AdSpaceID=428; AdspaceName=Hoarding at 
Foot-ball Ground, Tow. Apsara Aradhana Cinema  tow. Bhulabhai; 
Address=Foot-ball Ground, Tow. Apsara Aradhana Cinema  tow. 
Bhulabhai-Ahmedabad; }; Table=anyType{AdSpaceID=429; AdspaceName=Hoarding 
at Khokhra circle.Shivam foot; Address=Khokhra circle,Shivam 
foot-Ahmedabad; }; Table=anyType{AdSpaceID=430; AdspaceName=Hoarding at 
Khokhra circle,Shivam foot; Address=Khokhra circle,Shivam foot-Ahmedabad; 
}; Table=anyType{AdSpaceID=431; AdspaceName=Hoarding at Khokhra circle; 
Address=Khokhra circle-Ahmedabad; }; Table=anyType{AdSpaceID=432; 
AdspaceName=Hoarding at Khokhra Bridge, Rly. Yard,; Address=Khokhra Bridge, 
Rly. Yard,-Ahmedabad; }; Table=anyType{AdSpaceID=433; AdspaceName=Hoarding 
at  Rly. Yard,; Address=Khokhra Bridge, Rly. Yard,-Ahmedabad; }; 
Table=anyType{AdSpaceID=434; AdspaceName=Hoarding at O/B  Tow.Sraspur; 
Address=O/B  Tow.Sraspur-Ahmedabad; }; Table=anyType{AdSpaceID=435; 
AdspaceName=Hoarding at Nr. Six road junction,near kalupur darwaja; 
Address=Nr. Six road junction,near kalupur darwaja-Ahmedabad; }; 
Table=anyType{AdSpaceID=436; AdspaceName=Hoarding at kalupur circle,; 
Address=kalupur circle,-Ahmedabad; }; Table=anyType{AdSpaceID=437; 
AdspaceName=Hoarding at near prem darwaja; Address=near prem 
darwaja-Ahmedabad; }; Table=anyType{AdSpaceID=438; AdspaceName=Hoarding at 
law garden circle; Address=law garden circle-Ahmedabad; }; 
Table=anyType{AdSpaceID=439; AdspaceName=Hoarding at law garden circle; 
Address=law garden circle-Ahmedabad; }; Table=anyType{AdSpaceID=440; 
AdspaceName=Hoarding at ritz hotel; Address=opp ritz hotel-Ahmedabad; }; 
Table=anyType{AdSpaceID=441; AdspaceName=Hoarding at  Jawahar chowk; 
Address=Jawahar chowk-Ahmedabad; }; Table=anyType{AdSpaceID=442; 
AdspaceName=Hoarding at Jawahar chowk; Address=Jawahar chowk-Ahmedabad; }; 
Table=anyType{AdSpaceID=443; AdspaceName=Hoarding at Nr. Rambaug; 
Address=Nr. Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=444; 
AdspaceName=Hoarding at Rambaug; Address=Nr. Rambaug-Ahmedabad; }; 
Table=anyType{AdSpaceID=445; AdspaceName=Hoarding at Rambaug; 
Address=Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=446; 
AdspaceName=Hoarding at Nr. Rambaug; Address=Nr. Rambaug-Ahmedabad; }; 
Table=anyType{AdSpaceID=447; AdspaceName=Hoarding at Nr. Bhulabhai 
Park,Above Chaitanya Medical Stores; Address=Nr. Bhulabhai Park,Above 
Chaitanya Medical Stores-Ahmedabad; }; Table=anyType{AdSpaceID=448; 
AdspaceName=Hoarding at Railway colony; Address=Railway colony-Ahmedabad; 
}; Table=anyType{AdSpaceID=449; AdspaceName=Hoarding at gautam nagar; 
Address=gautam nagar-Ahmedabad; }; Table=anyType{AdSpaceID=450; 
AdspaceName=Hoarding at gautam nagar; Address=gautam nagar-Ahmedabad; }; 
Table=anyType{AdSpaceID=451; AdspaceName=Hoarding at pushp kunj; 
Address=pushp kunj-Ahmedabad; }; Table=anyType{AdSpaceID=452; 
AdspaceName=Hoarding at Maninagar  o/b; Address=Maninagar  o/b-Ahmedabad; 
}; Table=anyType{AdSpaceID=453; AdspaceName=Hoarding at gor no kuva; 
Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=454; 
AdspaceName=Hoarding at gor no kuva; Address=gor no kuva-Ahmedabad; }; 
Table=anyType{AdSpaceID=455; AdspaceName=Hoarding at gor no kuva; 
Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=456; 
AdspaceName=Hoarding at 4 road jnc.; Address=4 road jnc.-Ahmedabad; };

Then how i parse it and display data in the listview in android.
Plz help Splike . my mail id: ss04091...@gmail.com

Are you understand my problem.

My main Aim is to display data's from the sql server into the listview of 
android.

My webservice url:shreeomex.com/service.asmx 

If any Other complete solution then send me.

thanks spike


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

Re: [android-developers] Re: Problem in larger xml parsing with SOAP web service

2013-01-08 Thread ss04091993
same problem with me, if u have any solution then plz send to me..
mail id:ss04091...@gmail.com

thanks

On Friday, August 17, 2012 2:15:12 PM UTC+5:30, Rajan wrote:

 I am getting this kind of response 
 *
 -
 *
 anyType{NewDataSet=anyType{Table=anyType{AdSpaceID=423; 
 AdspaceName=Hoarding at football, (Amul); 
 Address=football,(Amul)-Ahmedabad; }; Table=anyType{AdSpaceID=424; 
 AdspaceName=Hoarding at football, tow. Bhulabhai.(Amul); Address=football, 
 tow. Bhulabhai.(Amul)-Ahmedabad; }; Table=anyType{AdSpaceID=425; 
 AdspaceName=Hoarding at Bhulabhai 4 Road Junction; Address=Bhulabhai 4 Road 
 Junction-Ahmedabad; }; Table=anyType{AdSpaceID=426; AdspaceName=Hoarding at 
 Bhulabhai Park, Tow. S.T. Stand; Address=Bhulabhai Park, Tow. S.T. 
 Stand-Ahmedabad; }; Table=anyType{AdSpaceID=427; AdspaceName=Hoarding at 
 Bhulabhai Park,Tow. Maninagar  Shah- Alam; Address=Bhulabhai 
 Park,-Ahmedabad; }; Table=anyType{AdSpaceID=428; AdspaceName=Hoarding at 
 Foot-ball Ground, Tow. Apsara Aradhana Cinema  tow. Bhulabhai; 
 Address=Foot-ball Ground, Tow. Apsara Aradhana Cinema  tow. 
 Bhulabhai-Ahmedabad; }; Table=anyType{AdSpaceID=429; AdspaceName=Hoarding 
 at Khokhra circle.Shivam foot; Address=Khokhra circle,Shivam 
 foot-Ahmedabad; }; Table=anyType{AdSpaceID=430; AdspaceName=Hoarding at 
 Khokhra circle,Shivam foot; Address=Khokhra circle,Shivam foot-Ahmedabad; 
 }; Table=anyType{AdSpaceID=431; AdspaceName=Hoarding at Khokhra circle; 
 Address=Khokhra circle-Ahmedabad; }; Table=anyType{AdSpaceID=432; 
 AdspaceName=Hoarding at Khokhra Bridge, Rly. Yard,; Address=Khokhra Bridge, 
 Rly. Yard,-Ahmedabad; }; Table=anyType{AdSpaceID=433; AdspaceName=Hoarding 
 at  Rly. Yard,; Address=Khokhra Bridge, Rly. Yard,-Ahmedabad; }; 
 Table=anyType{AdSpaceID=434; AdspaceName=Hoarding at O/B  Tow.Sraspur; 
 Address=O/B  Tow.Sraspur-Ahmedabad; }; Table=anyType{AdSpaceID=435; 
 AdspaceName=Hoarding at Nr. Six road junction,near kalupur darwaja; 
 Address=Nr. Six road junction,near kalupur darwaja-Ahmedabad; }; 
 Table=anyType{AdSpaceID=436; AdspaceName=Hoarding at kalupur circle,; 
 Address=kalupur circle,-Ahmedabad; }; Table=anyType{AdSpaceID=437; 
 AdspaceName=Hoarding at near prem darwaja; Address=near prem 
 darwaja-Ahmedabad; }; Table=anyType{AdSpaceID=438; AdspaceName=Hoarding at 
 law garden circle; Address=law garden circle-Ahmedabad; }; 
 Table=anyType{AdSpaceID=439; AdspaceName=Hoarding at law garden circle; 
 Address=law garden circle-Ahmedabad; }; Table=anyType{AdSpaceID=440; 
 AdspaceName=Hoarding at ritz hotel; Address=opp ritz hotel-Ahmedabad; }; 
 Table=anyType{AdSpaceID=441; AdspaceName=Hoarding at  Jawahar chowk; 
 Address=Jawahar chowk-Ahmedabad; }; Table=anyType{AdSpaceID=442; 
 AdspaceName=Hoarding at Jawahar chowk; Address=Jawahar chowk-Ahmedabad; }; 
 Table=anyType{AdSpaceID=443; AdspaceName=Hoarding at Nr. Rambaug; 
 Address=Nr. Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=444; 
 AdspaceName=Hoarding at Rambaug; Address=Nr. Rambaug-Ahmedabad; }; 
 Table=anyType{AdSpaceID=445; AdspaceName=Hoarding at Rambaug; 
 Address=Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=446; 
 AdspaceName=Hoarding at Nr. Rambaug; Address=Nr. Rambaug-Ahmedabad; }; 
 Table=anyType{AdSpaceID=447; AdspaceName=Hoarding at Nr. Bhulabhai 
 Park,Above Chaitanya Medical Stores; Address=Nr. Bhulabhai Park,Above 
 Chaitanya Medical Stores-Ahmedabad; }; Table=anyType{AdSpaceID=448; 
 AdspaceName=Hoarding at Railway colony; Address=Railway colony-Ahmedabad; 
 }; Table=anyType{AdSpaceID=449; AdspaceName=Hoarding at gautam nagar; 
 Address=gautam nagar-Ahmedabad; }; Table=anyType{AdSpaceID=450; 
 AdspaceName=Hoarding at gautam nagar; Address=gautam nagar-Ahmedabad; }; 
 Table=anyType{AdSpaceID=451; AdspaceName=Hoarding at pushp kunj; 
 Address=pushp kunj-Ahmedabad; }; Table=anyType{AdSpaceID=452; 
 AdspaceName=Hoarding at Maninagar  o/b; Address=Maninagar  o/b-Ahmedabad; 
 }; Table=anyType{AdSpaceID=453; AdspaceName=Hoarding at gor no kuva; 
 Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=454; 
 AdspaceName=Hoarding at gor no kuva; Address=gor no kuva-Ahmedabad; }; 
 Table=anyType{AdSpaceID=455; AdspaceName=Hoarding at gor no kuva; 
 Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=456; 
 AdspaceName=Hoarding at 4 road jnc.; Address=4 road jnc.-Ahmedabad; };
 *
 -
 * 
 *
 *
 *so how can i parse it...*
 *===*
 *
 *
 On Fri, Aug 17, 2012 at 12:42 PM, Rajan Thakrar 
 r.d.t...@gmail.comjavascript:
  wrote:

 Ohh! I am so sorry krishana, i have tried your code and it is working 
 perfectly, but now i got the output that is neither XML nor JSON   (output 
 is available in Dataset). so what can i do ? How can i parse the 

Re: [android-developers] Re: Problem in larger xml parsing with SOAP web service

2013-01-08 Thread Krishna Mahadik
Hi,
Give me a days time. I am busy right now, will come back to see ur query
ASAP.

Thanks  Regards,
Spike

On Fri, Dec 28, 2012 at 5:15 PM, ss04091...@gmail.com wrote:

 hi spike,
 As rajan post output of web service when returning dataset.

 Actual problem: I am creating a web service in net which returns Dataset
 in XML format. Using KSOAP i am calling web service methods to get dataset
 which retuns Dataset. Webserice response stored in a string variable. So
 string Display Output as
 anyType{NewDataSet=anyType{**Table=anyType{AdSpaceID=423;
 AdspaceName=Hoarding at football, (Amul); Address=football,(Amul)-**Ahmedabad;
 }; Table=anyType{AdSpaceID=424; AdspaceName=Hoarding at football, tow.
 Bhulabhai.(Amul); Address=football, tow. Bhulabhai.(Amul)-Ahmedabad; };
 Table=anyType{AdSpaceID=425; AdspaceName=Hoarding at Bhulabhai 4 Road
 Junction; Address=Bhulabhai 4 Road Junction-Ahmedabad; };
 Table=anyType{AdSpaceID=426; AdspaceName=Hoarding at Bhulabhai Park, Tow.
 S.T. Stand; Address=Bhulabhai Park, Tow. S.T. Stand-Ahmedabad; };
 Table=anyType{AdSpaceID=427; AdspaceName=Hoarding at Bhulabhai Park,Tow.
 Maninagar  Shah- Alam; Address=Bhulabhai Park,-Ahmedabad; };
 Table=anyType{AdSpaceID=428; AdspaceName=Hoarding at Foot-ball Ground, Tow.
 Apsara Aradhana Cinema  tow. Bhulabhai; Address=Foot-ball Ground, Tow.
 Apsara Aradhana Cinema  tow. Bhulabhai-Ahmedabad; };
 Table=anyType{AdSpaceID=429; AdspaceName=Hoarding at Khokhra circle.Shivam
 foot; Address=Khokhra circle,Shivam foot-Ahmedabad; };
 Table=anyType{AdSpaceID=430; AdspaceName=Hoarding at Khokhra circle,Shivam
 foot; Address=Khokhra circle,Shivam foot-Ahmedabad; };
 Table=anyType{AdSpaceID=431; AdspaceName=Hoarding at Khokhra circle;
 Address=Khokhra circle-Ahmedabad; }; Table=anyType{AdSpaceID=432;
 AdspaceName=Hoarding at Khokhra Bridge, Rly. Yard,; Address=Khokhra Bridge,
 Rly. Yard,-Ahmedabad; }; Table=anyType{AdSpaceID=433; AdspaceName=Hoarding
 at  Rly. Yard,; Address=Khokhra Bridge, Rly. Yard,-Ahmedabad; };
 Table=anyType{AdSpaceID=434; AdspaceName=Hoarding at O/B  Tow.Sraspur;
 Address=O/B  Tow.Sraspur-Ahmedabad; }; Table=anyType{AdSpaceID=435;
 AdspaceName=Hoarding at Nr. Six road junction,near kalupur darwaja;
 Address=Nr. Six road junction,near kalupur darwaja-Ahmedabad; };
 Table=anyType{AdSpaceID=436; AdspaceName=Hoarding at kalupur circle,;
 Address=kalupur circle,-Ahmedabad; }; Table=anyType{AdSpaceID=437;
 AdspaceName=Hoarding at near prem darwaja; Address=near prem
 darwaja-Ahmedabad; }; Table=anyType{AdSpaceID=438; AdspaceName=Hoarding at
 law garden circle; Address=law garden circle-Ahmedabad; };
 Table=anyType{AdSpaceID=439; AdspaceName=Hoarding at law garden circle;
 Address=law garden circle-Ahmedabad; }; Table=anyType{AdSpaceID=440;
 AdspaceName=Hoarding at ritz hotel; Address=opp ritz hotel-Ahmedabad; };
 Table=anyType{AdSpaceID=441; AdspaceName=Hoarding at  Jawahar chowk;
 Address=Jawahar chowk-Ahmedabad; }; Table=anyType{AdSpaceID=442;
 AdspaceName=Hoarding at Jawahar chowk; Address=Jawahar chowk-Ahmedabad; };
 Table=anyType{AdSpaceID=443; AdspaceName=Hoarding at Nr. Rambaug;
 Address=Nr. Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=444;
 AdspaceName=Hoarding at Rambaug; Address=Nr. Rambaug-Ahmedabad; };
 Table=anyType{AdSpaceID=445; AdspaceName=Hoarding at Rambaug;
 Address=Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=446;
 AdspaceName=Hoarding at Nr. Rambaug; Address=Nr. Rambaug-Ahmedabad; };
 Table=anyType{AdSpaceID=447; AdspaceName=Hoarding at Nr. Bhulabhai
 Park,Above Chaitanya Medical Stores; Address=Nr. Bhulabhai Park,Above
 Chaitanya Medical Stores-Ahmedabad; }; Table=anyType{AdSpaceID=448;
 AdspaceName=Hoarding at Railway colony; Address=Railway colony-Ahmedabad;
 }; Table=anyType{AdSpaceID=449; AdspaceName=Hoarding at gautam nagar;
 Address=gautam nagar-Ahmedabad; }; Table=anyType{AdSpaceID=450;
 AdspaceName=Hoarding at gautam nagar; Address=gautam nagar-Ahmedabad; };
 Table=anyType{AdSpaceID=451; AdspaceName=Hoarding at pushp kunj;
 Address=pushp kunj-Ahmedabad; }; Table=anyType{AdSpaceID=452;
 AdspaceName=Hoarding at Maninagar  o/b; Address=Maninagar  o/b-Ahmedabad;
 }; Table=anyType{AdSpaceID=453; AdspaceName=Hoarding at gor no kuva;
 Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=454;
 AdspaceName=Hoarding at gor no kuva; Address=gor no kuva-Ahmedabad; };
 Table=anyType{AdSpaceID=455; AdspaceName=Hoarding at gor no kuva;
 Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=456;
 AdspaceName=Hoarding at 4 road jnc.; Address=4 road jnc.-Ahmedabad; };

 Then how i parse it and display data in the listview in android.
 Plz help Splike . my mail id: ss04091...@gmail.com

 Are you understand my problem.

 My main Aim is to display data's from the sql server into the listview of
 android.

 My webservice url:shreeomex.com/service.asmx

 If any Other complete solution then send me.

 thanks spike


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers 

Re: [android-developers] Re: Problem in larger xml parsing with SOAP web service

2013-01-08 Thread Rajan Thakrar
see this link :
http://stackoverflow.com/questions/1270191/how-to-parse-this-web-service-response-in-android

(see: Rooban Abraham http://stackoverflow.com/users/831834/rooban-abraham
 POST)


On Tue, Jan 8, 2013 at 6:48 PM, Krishna Mahadik
krishna.maha...@gmail.comwrote:

 Hi,
 Give me a days time. I am busy right now, will come back to see ur query
 ASAP.

 Thanks  Regards,
 Spike

 On Fri, Dec 28, 2012 at 5:15 PM, ss04091...@gmail.com wrote:

 hi spike,
 As rajan post output of web service when returning dataset.

 Actual problem: I am creating a web service in net which returns Dataset
 in XML format. Using KSOAP i am calling web service methods to get dataset
 which retuns Dataset. Webserice response stored in a string variable. So
 string Display Output as
 anyType{NewDataSet=anyType{**Table=anyType{AdSpaceID=423;
 AdspaceName=Hoarding at football, (Amul); 
 Address=football,(Amul)-**Ahmedabad;
 }; Table=anyType{AdSpaceID=424; AdspaceName=Hoarding at football, tow.
 Bhulabhai.(Amul); Address=football, tow. Bhulabhai.(Amul)-Ahmedabad; };
 Table=anyType{AdSpaceID=425; AdspaceName=Hoarding at Bhulabhai 4 Road
 Junction; Address=Bhulabhai 4 Road Junction-Ahmedabad; };
 Table=anyType{AdSpaceID=426; AdspaceName=Hoarding at Bhulabhai Park, Tow.
 S.T. Stand; Address=Bhulabhai Park, Tow. S.T. Stand-Ahmedabad; };
 Table=anyType{AdSpaceID=427; AdspaceName=Hoarding at Bhulabhai Park,Tow.
 Maninagar  Shah- Alam; Address=Bhulabhai Park,-Ahmedabad; };
 Table=anyType{AdSpaceID=428; AdspaceName=Hoarding at Foot-ball Ground, Tow.
 Apsara Aradhana Cinema  tow. Bhulabhai; Address=Foot-ball Ground, Tow.
 Apsara Aradhana Cinema  tow. Bhulabhai-Ahmedabad; };
 Table=anyType{AdSpaceID=429; AdspaceName=Hoarding at Khokhra circle.Shivam
 foot; Address=Khokhra circle,Shivam foot-Ahmedabad; };
 Table=anyType{AdSpaceID=430; AdspaceName=Hoarding at Khokhra circle,Shivam
 foot; Address=Khokhra circle,Shivam foot-Ahmedabad; };
 Table=anyType{AdSpaceID=431; AdspaceName=Hoarding at Khokhra circle;
 Address=Khokhra circle-Ahmedabad; }; Table=anyType{AdSpaceID=432;
 AdspaceName=Hoarding at Khokhra Bridge, Rly. Yard,; Address=Khokhra Bridge,
 Rly. Yard,-Ahmedabad; }; Table=anyType{AdSpaceID=433; AdspaceName=Hoarding
 at  Rly. Yard,; Address=Khokhra Bridge, Rly. Yard,-Ahmedabad; };
 Table=anyType{AdSpaceID=434; AdspaceName=Hoarding at O/B  Tow.Sraspur;
 Address=O/B  Tow.Sraspur-Ahmedabad; }; Table=anyType{AdSpaceID=435;
 AdspaceName=Hoarding at Nr. Six road junction,near kalupur darwaja;
 Address=Nr. Six road junction,near kalupur darwaja-Ahmedabad; };
 Table=anyType{AdSpaceID=436; AdspaceName=Hoarding at kalupur circle,;
 Address=kalupur circle,-Ahmedabad; }; Table=anyType{AdSpaceID=437;
 AdspaceName=Hoarding at near prem darwaja; Address=near prem
 darwaja-Ahmedabad; }; Table=anyType{AdSpaceID=438; AdspaceName=Hoarding at
 law garden circle; Address=law garden circle-Ahmedabad; };
 Table=anyType{AdSpaceID=439; AdspaceName=Hoarding at law garden circle;
 Address=law garden circle-Ahmedabad; }; Table=anyType{AdSpaceID=440;
 AdspaceName=Hoarding at ritz hotel; Address=opp ritz hotel-Ahmedabad; };
 Table=anyType{AdSpaceID=441; AdspaceName=Hoarding at  Jawahar chowk;
 Address=Jawahar chowk-Ahmedabad; }; Table=anyType{AdSpaceID=442;
 AdspaceName=Hoarding at Jawahar chowk; Address=Jawahar chowk-Ahmedabad; };
 Table=anyType{AdSpaceID=443; AdspaceName=Hoarding at Nr. Rambaug;
 Address=Nr. Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=444;
 AdspaceName=Hoarding at Rambaug; Address=Nr. Rambaug-Ahmedabad; };
 Table=anyType{AdSpaceID=445; AdspaceName=Hoarding at Rambaug;
 Address=Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=446;
 AdspaceName=Hoarding at Nr. Rambaug; Address=Nr. Rambaug-Ahmedabad; };
 Table=anyType{AdSpaceID=447; AdspaceName=Hoarding at Nr. Bhulabhai
 Park,Above Chaitanya Medical Stores; Address=Nr. Bhulabhai Park,Above
 Chaitanya Medical Stores-Ahmedabad; }; Table=anyType{AdSpaceID=448;
 AdspaceName=Hoarding at Railway colony; Address=Railway colony-Ahmedabad;
 }; Table=anyType{AdSpaceID=449; AdspaceName=Hoarding at gautam nagar;
 Address=gautam nagar-Ahmedabad; }; Table=anyType{AdSpaceID=450;
 AdspaceName=Hoarding at gautam nagar; Address=gautam nagar-Ahmedabad; };
 Table=anyType{AdSpaceID=451; AdspaceName=Hoarding at pushp kunj;
 Address=pushp kunj-Ahmedabad; }; Table=anyType{AdSpaceID=452;
 AdspaceName=Hoarding at Maninagar  o/b; Address=Maninagar  o/b-Ahmedabad;
 }; Table=anyType{AdSpaceID=453; AdspaceName=Hoarding at gor no kuva;
 Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=454;
 AdspaceName=Hoarding at gor no kuva; Address=gor no kuva-Ahmedabad; };
 Table=anyType{AdSpaceID=455; AdspaceName=Hoarding at gor no kuva;
 Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=456;
 AdspaceName=Hoarding at 4 road jnc.; Address=4 road jnc.-Ahmedabad; };

 Then how i parse it and display data in the listview in android.
 Plz help Splike . my mail id: ss04091...@gmail.com

 Are you understand my problem.

 My main Aim 

[android-developers] Re: Problem exit,close my application...

2012-12-19 Thread bob
 

Change this:


runnable.run();


to this:


*new Thread(runnable).start();*




On Wednesday, December 19, 2012 5:25:01 AM UTC-6, Antonis Kanaris wrote:


 I make an application download data from web send to bluetooth,listen 
 bluetooth and upload to web with loopbut when push button close my apk 
 freeze...no work...


 /** Called when the activity is first created. */
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity2);
  
 //txt=(TextView)findViewById(R.id.txt);
 myLabel = (TextView)findViewById(R.id.label);
 temptext = (TextView)findViewById(R.id.temptxt);
 
 SharedPreferences preferences = getSharedPreferences(dataioweb , 
 MODE_PRIVATE);
 
strValue = preferences.getString(Url,);
   TextView text = (TextView) findViewById(R.id.txt1);
   text.setText(strValue);
strValue2 = preferences.getString(DevName,);
   TextView text2 = (TextView) findViewById(R.id.txt2);  
   text2.setText(strValue2);
   
   
  
 }
 
 private class DownloadWebPageTask extends AsyncTaskString, Void, 
 String {
 @Override
 protected String doInBackground(String... urls) {
   String response = ;
   for (String url : urls) {
 DefaultHttpClient client = new DefaultHttpClient();
 HttpGet httpGet = new HttpGet(url);
 try {
   HttpResponse execute = client.execute(httpGet);
   InputStream content = execute.getEntity().getContent();

   BufferedReader buffer = new BufferedReader(new 
 InputStreamReader(content));
   String s = ;
   while ((s = buffer.readLine()) != null) {
 response += s;
   }

 } catch (Exception e) {
   e.printStackTrace();
 }
   }
   return response;
 }

 @Override
 protected void onPostExecute(String result) {
 TextView text3 = (TextView) findViewById(R.id.txt3);
 text3.setText(result);
 try {
 sendData(result);
 } catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 }
 
 }
   }


 
 protected void onStart() {
 super.onStart();
 
 try
 { 
 findBT();
 openBT();
 }
 catch (IOException ex) { }
 
 runnable.run();
  
   }

   private Runnable runnable = new Runnable()
   {

   public void run()
   {
  
   DownloadWebPageTask task = new DownloadWebPageTask();
   task.execute(new String[] { strValue });//Download data 
 on/off
   
   beginListenForData();//Listen Bluetooth temperature
   
   SimpleHttpPut task2 = new SimpleHttpPut();
 task2.execute(new String[] { urlt,data });//Upload data 
 class
 
 if(work){  handler.postDelayed(this, 3);}//Refresh page time
   }
   };
   
   void findBT()
   {
   mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
   if(mBluetoothAdapter == null)
   {
   myLabel.setText(No bluetooth adapter available);
   }
  
   if(!mBluetoothAdapter.isEnabled())
   {
   //mBluetoothAdapter.enable();
   Intent enableBluetooth = new 
 Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
   startActivityForResult(enableBluetooth, 0);
   
   
   }
  
   SetBluetoothDevice pairedDevices = 
 mBluetoothAdapter.getBondedDevices();
   if(pairedDevices.size()  0)
   {
   for(BluetoothDevice device : pairedDevices)
   {
   if(device.getName().equals(strValue2))
   {
   mmDevice = device;
   break;
   }
   }
   }
   myLabel.setText(Bluetooth Device Found);
   }
  
   void openBT() throws IOException
   {
   UUID uuid = UUID.fromString(1101--1000-8000-00805f9b34fb); 
 //Standard SerialPortService ID
   mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);   
   mmSocket.connect();
   mmOutputStream = mmSocket.getOutputStream();
   mmInputStream = mmSocket.getInputStream();
  
  // beginListenForData();
  
   myLabel.setText(Bluetooth Opened);
   }
  
   void sendData(String msg) throws IOException
   {
  
   msg += \n;
   mmOutputStream.write(msg.getBytes());
   myLabel.setText(Data Sent);
   }
  
   void beginListenForData()
   {
   final Handler handler = new Handler(); 
   final byte delimiter = 10; //This is the 

[android-developers] Re: Problem with AnimationDrawable

2012-12-17 Thread Hassy

Hi,

 I had the same problem.
you can execute a runnable to start your frame animation like this

Handler startHandler = new Handler();
startHandler.postDelayed(new Runnable(){
public void run() {
//animate
animate();
 }}, 100);


hope it helps you

On Tuesday, November 23, 2010 5:34:50 PM UTC+9, Serdel wrote:

 Hello, 

 I have problems with AnimationDrawable which i use to animate a 
 'striped' gif file. In fact I have two animations that I want to use 
 in one activity (and they must be used in the same activity). Both 
 animation are build with 7 frames : 

 ?xml version=1.0 encoding=utf-8? 
 animation-list xmlns:android=http://schemas.android.com/apk/res/ 
 android 
  android:id=@+id/analyse android:oneshot=false 
  item android:drawable=@drawable/analyse_frame_0 
 android:duration=50 / 
  item android:drawable=@drawable/analyse_frame_1 
 android:duration=50 / 
 item android:drawable=@drawable/analyse_frame_2 
 android:duration=50 / 
  item android:drawable=@drawable/analyse_frame_3 
 android:duration=50 / 
 item android:drawable=@drawable/analyse_frame_4 
 android:duration=50 / 
  item android:drawable=@drawable/analyse_frame_5 
 android:duration=50 / 
 item android:drawable=@drawable/analyse_frame_6 
 android:duration=50 / 
 /animation-list 

 The second one is the same, just different files but also 7 frames. 

 In the onCrate() method of my activity I start the first animation and 
 launch a 15 second timer (the idea is that the first animation is 
 playing when the timer ticks). I use the following code: 

   //The onCreate method of the activity class. 
   public void onCreate(Bundle savedInstanceState) { 
   super.onCreate(savedInstanceState); 
   setContentView(R.layout.third); 
   
 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); 

   layout = 
 (LinearLayout)findViewById(R.id.widget40); 
   analyseImage = (ImageView) 
 findViewById(R.id.ImageView02); 
   
 analyseImage.setBackgroundResource(R.drawable.analyse_animation); 

   analyseAnimation = (AnimationDrawable) 
 analyseImage.getBackground(); 
   analyseAnimation.start(); 

   MyCount counter = new MyCount(15000,1000);. 
   counter.start(); 
   } 


 Unfortunately this does not work. However when the timer finishes I 
 want to start a second animation and launch a seperate thread. And 
 this works - when I start the animation in the 'onFinish' method of 
 the timer, the animation starts properly: 

//the onFinish() method of timer. 
   public void onFinish() 
 { 
   
 layout.setBackgroundResource(R.drawable.id_app4); 

   
 analyseImage .destroyDrawingCache(); 
   
 analyseImage .setVisibility(View.GONE); 

   connectImage = (ImageView) 
 findViewById(R.id.ImageView02); 
   
 connectImage.setBackgroundResource(R.drawable.connect_animation); 
   connectAnimation = 
 (AnimationDrawable) analyseImage.getBackground(); 
   
 connectAnimation.start(); 
   
 startThread(connectTh,myConnector); 
 } 

 Unfortunately this does not work so good because it only works when I 
 comment-out the first one - otherwise I get an Exception : 
 'OutOfMemoryError: bitmap size exceeds VM budget'. As you see I try to 
 release some memory but this does not help. This is a crucial problem, 
 since my application is working in a 'ring' of couple activities. So 
 when I finish the last one it goes back to the first one - it is 
 possible that the activity with animations will be called many times 
 in the life-time of the whole app. So I need to release the memory 
 from the second one as well. 

 So now here are my questions: 
 - why can't I start the first animation instantly after the activity 
 starts and how to do this? 
 - How to release the memory from the animations? 

 Can anyone please help? 

 PS: I am working on Android 1.5

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

2012-12-17 Thread Hassy
Hi,

 I had the same problem.
you can execute a runnable to start your frame animation without using 
buttons like this

Handler startHandler = new Handler();
startHandler.postDelayed(new Runnable(){
public void run() {
//animate
animate();
 }}, 100);


hope it helps 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] Re: Problem get data web sent bluetooth

2012-11-27 Thread bob
 

Maybe you should close the Bluetooth connection before opening it again?



On Tuesday, November 27, 2012 12:34:32 AM UTC-6, Antonis Kanaris wrote:

 Hello.I try this code 

 package com.example.timer1;
 ;

 public class ReadWebArduino1 extends Activity {

 TextView txt;
 
 Handler handler = new Handler();
 
 
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
 txt=(TextView)findViewById(R.id.txt);
 myLabel = (TextView)findViewById(R.id.label);
 }
 
 private class DownloadWebPageTask extends AsyncTaskString, Void, 
 String {
 @Override
 protected String doInBackground(String... urls) {
   String response = ;
   for (String url : urls) {
 DefaultHttpClient client = new DefaultHttpClient();
 HttpGet httpGet = new HttpGet(url);
 try {
   HttpResponse execute = client.execute(httpGet);
   InputStream content = execute.getEntity().getContent();

   BufferedReader buffer = new BufferedReader(new 
 InputStreamReader(content));
   String s = ;
   while ((s = buffer.readLine()) != null) {
 response += s;
   }

 } catch (Exception e) {
   e.printStackTrace();
 }
   }
   return response;
 }

 @Override
 protected void onPostExecute(String result) {
   txt.setText(result);
 }
   }

   public void readWebpage(View view) {
  
   DownloadWebPageTask task = new DownloadWebPageTask();
   task.execute(new String[] { http://www.site.net/LEDstate.txt; 
 });
   
  }
 
 
 protected void onStart() {
   super.onStart();
 runnable.run();
 }

 private Runnable runnable = new Runnable() 
 {

 public void run() 
 {
 
 DownloadWebPageTask task = new DownloadWebPageTask();
 task.execute(new String[] { http://www.site.net/LEDstate.txt; 
 });
 try 
 {
 findBT();
 openBT();
 sendData();
 }
 catch (IOException ex) { }
 
 handler.postDelayed(this, 1);//Refresh page time is 10secs
 }
 };
 
 void findBT()
 {
 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
 if(mBluetoothAdapter == null)
 {
 myLabel.setText(No bluetooth adapter available);
 }
 
 if(!mBluetoothAdapter.isEnabled())
 {
 Intent enableBluetooth = new 
 Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
 startActivityForResult(enableBluetooth, 0);
 }
 
 SetBluetoothDevice pairedDevices = 
 mBluetoothAdapter.getBondedDevices();
 if(pairedDevices.size()  0)
 {
 for(BluetoothDevice device : pairedDevices)
 {
 if(device.getName().equals(HC-07)) 
 {
 mmDevice = device;
 break;
 }
 }
 }
 myLabel.setText(Bluetooth Device Found);
 }
 
 void openBT() throws IOException
 {
 UUID uuid = 
 UUID.fromString(1101--1000-8000-00805f9b34fb); //Standard 
 SerialPortService ID
 mmSocket = 
 mmDevice.createRfcommSocketToServiceRecord(uuid);
 mmSocket.connect();
 mmOutputStream = mmSocket.getOutputStream();
 //mmInputStream = mmSocket.getInputStream();
 
// beginListenForData();
 
 myLabel.setText(Bluetooth Opened);
 }
 
 void sendData() throws IOException
 {
 //String msg = myTextbox.getText().toString();
 String msg=H;
 msg += \n;
 mmOutputStream.write(msg.getBytes());
 myLabel.setText(Data Sent);
 }
 
 
 }

 my problem is bt data no loop(work only the first time) and how sent the 
 web data to msg variable for out to bt.Thanks.


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

[android-developers] Re: problem regarding umount mmcblk0p14 on android jellybean

2012-11-25 Thread ash
below is the file system error messages:

4[4.877105] EXT4-fs warning (device mmcblk0p14): 
ext4_clear_journal_err:4152: Filesystem error recorded from previous mount: 
IO failure
4[4.889343] EXT4-fs warning (device mmcblk0p14): 
ext4_clear_journal_err:4153: Marking fs in need of filesystem check.
4[4.902740] EXT4-fs (mmcblk0p14): warning: mounting fs with errors, 
running e2fsck is recommended
4[4.914215] EXT4-fs (mmcblk0p14): Ignoring delalloc option - 
requested data journaling mode
6[4.922790] EXT4-fs (mmcblk0p14): recovery complete
6[4.933074] EXT4-fs (mmcblk0p14): mounted filesystem with journalled 
data mode. Opts: data=journal

2[8.549713] EXT4-fs error (device mmcblk0p14): 
ext4_init_inode_table:1288: comm ext4lazyinit: Something is wrong with 
group 0
2[8.549713] Used itable blocks: 20itable unused count: 0
2[8.549713] 
3[8.582855] Aborting journal on device mmcblk0p14-8.
2[8.64] EXT4-fs (mmcblk0p14): Remounting filesystem read-only



~ash

On Saturday, 24 November 2012 22:22:28 UTC+5:30, ash wrote:

 Hi All,

 I have upgraded my mobile from Android Gingerbread to Android  jelly bean 
 and facing the below problem.

 $mount
 /dev/block/mmcblk0p14 /data/mnt/modemfs1 ext4 
 ro,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0

 umount /data/mnt/modemfs1   - Gingerbread : I am able to umount and 
 mount the mmcblk0p14
- Jellybean : I am not able to umount the 
 mmcblk0p14(abd shell getting hanged when executing ). When I did ctrl + C 
 mmcblk0p14 
  entry not availble under the $mount. When I try 
 to repair this file system using e2fsck showing the below  error: 
  Device or resource busy while trying to open 
 /dev/block/mmcblk0p14 
 
  Filesystem mounted or opened exclusively by another program?


 Please any one help me to solve this problem or which android 
 service/daemon is using mmcblk0p14.

 Any help appreciated .

 Thanks in Advance 
 Ash



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

2012-11-21 Thread Piren
I think the more important question is : Why the fuck are you doing all of 
THAT instead of just using Java IO?

On Tuesday, November 20, 2012 11:44:14 PM UTC+2, Lew wrote:

 Ali Ahmadi wrote:

 i [sic] made a android [sic] app, which works correctly.
 now i put some parts of my application into a library and as a jar file.
 now my code is not working
 i read some values through this command:

 suProcess = Runtime.getRuntime().exec(ls /sdcard/folder*');
   
   DataOutputStream oStream = new 
 DataOutputStream(suProcess.getOutputStream());


 The 'Process' output stream from an ls will not be a 'DataOutputStream'.
  

   DataInputStream osRes = new 
 DataInputStream(suProcess.getInputStream());


 Likewise the input stream. ls is a text-oriented command.
  

   DataInputStream errStream = new 
 DataInputStream(suProcess.getErrorStream()); 

   if (null != oStream  null != osRes  null!= errStream)
   {
   while (errStream.available()0)
   errVal += errStream.readLine();
   while (osRes.available()0)
   retval = osRes.readLine(); 
   }

 but nothing would return as output.
 why this happens just when i use jar file?


 Did you set up the project that generates the JAR as an Android library 
 project?
 http://developer.android.com/tools/projects/index.html#LibraryProjects

 Did you create a /libs directory within your Android project directory 
 and copy the JAR file to that directory?
 http://mobile.tutsplus.com/tutorials/android/jar-for-android/

 Did you google for an answer?

 -- 
 Lew



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 while displaying same list which is initialized in parent fragment into two different sub childs fragments

2012-11-21 Thread Piren
you can't add the same view to two viewgroups at the same time.
if you want two lists, you'll have to initialize and set two lists.

On Wednesday, November 21, 2012 3:57:20 PM UTC+2, Bajrang Asthana wrote:

 I am implementing swipe functionality using ViewPager and want to display 
 same list in two fragments which is initialized in parent fragment .
 I am having
 1) One base Fragment 
 2) Two child fragments
 3) One activity(FragmentActivity) in which adding two child fragments 
 through ViewPager dynamically. 

 Base fragment contain list which is common in both child fragment.I have 
 initialized and set list adapter in onActivityCreated() of base fragment 
 but it is creating list only for one fragment and not for the other.

 please suggest me where to set my adapter in base fragment so list is 
 display in both fragments or any other solution will be very helpful for me.
 *
 *


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

2012-11-20 Thread Lew
Ali Ahmadi wrote:

 i [sic] made a android [sic] app, which works correctly.
 now i put some parts of my application into a library and as a jar file.
 now my code is not working
 i read some values through this command:

 suProcess = Runtime.getRuntime().exec(ls /sdcard/folder*');
   
   DataOutputStream oStream = new 
 DataOutputStream(suProcess.getOutputStream());


The 'Process' output stream from an ls will not be a 'DataOutputStream'.
 

   DataInputStream osRes = new 
 DataInputStream(suProcess.getInputStream());


Likewise the input stream. ls is a text-oriented command.
 

   DataInputStream errStream = new 
 DataInputStream(suProcess.getErrorStream()); 

  if (null != oStream  null != osRes  null!= errStream)
   {
   while (errStream.available()0)
   errVal += errStream.readLine();
   while (osRes.available()0)
   retval = osRes.readLine(); 
   }

 but nothing would return as output.
 why this happens just when i use jar file?


Did you set up the project that generates the JAR as an Android library 
project?
http://developer.android.com/tools/projects/index.html#LibraryProjects

Did you create a /libs directory within your Android project directory and 
copy the JAR file to that directory?
http://mobile.tutsplus.com/tutorials/android/jar-for-android/

Did you google for an answer?

-- 
Lew

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

2012-11-19 Thread skink


Mark Phillips wrote:
 Any suggestions on how to set the value of the spinner index by searching
 the strings in the spinner array?

why would you do that?

why not simply:

// set C deg
s.setSelection(0)
// set F deg
s.setSelection(1)
// set K deg
s.setSelection(2)

pskink

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


Re: [android-developers] Re: Problem Searching the Array in a Spinner

2012-11-19 Thread Mark Phillips
The screen with the temperature spinner is an edit screen which is filled
at run time with the data the user entered in a previous session. The data
will eventually come from a cursor/sqlite database, but for now as I work
on the ui, I am simulating the app with sample data using string arrays and
simple array adapters. I have some helper methods in a static class that
provided the data in the form of arrays to the app (ie as a  standin for
the db backend until the db is stable). I guess I can wait to solve this
problem when I get to the cursor/sqlite integration phase, and just change
my sample data to hold the index instead of the actual string value.

The heart of my question is if there is another way to search the
arrayadapter for formatted strings.

Thanks,

Mark

On Mon, Nov 19, 2012 at 2:08 AM, skink psk...@gmail.com wrote:



 Mark Phillips wrote:
  Any suggestions on how to set the value of the spinner index by searching
  the strings in the spinner array?

 why would you do that?

 why not simply:

 // set C deg
 s.setSelection(0)
 // set F deg
 s.setSelection(1)
 // set K deg
 s.setSelection(2)

 pskink

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


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

2012-11-19 Thread bob
 

Try launching it again.



On Saturday, November 17, 2012 3:37:59 AM UTC-6, mohammed Nuhail wrote:

 hi friends...
  I have a problem with google play store in 7inch tablet. wen i launched 
 that app i got this dialog message ( Unfortunately google play store has 
 stopped ) . please help me out with it...
 thanks in advance


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

Re: [android-developers] Re: Problem Searching the Array in a Spinner

2012-11-19 Thread skink


Mark Phillips wrote:
 The heart of my question is if there is another way to search the
 arrayadapter for formatted strings.


sure you can: use an object returned by adapter.getItem()

pskink

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


[android-developers] Re: Problem while updating adapter from AsyncTask

2012-11-04 Thread Danny D



 I'm pretty sure that you're going to need to do these updates through the 
runOnUiThread() method.
Here's an example of how I typically notify the list adapter/view /etc.

Basically, if I think that there's any chance of cross thread problems, opt 
for the runOnUiThread()

 @Override

public void imageAvailable(String imageName) {
this.runOnUiThread(new Runnable(){
@Override
public void run() {
m_backpackAdapter.notifyDataSetChanged();
}
});
}



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 in the map display (gray pixels appear on the map)

2012-10-25 Thread Pegun
Does anyone know how to solve this problem?

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

Re: [android-developers] Re: Problem in the map display (gray pixels appear on the map)

2012-10-25 Thread TreKing
On Thu, Oct 25, 2012 at 4:02 AM, Pegun ptgn.and...@gmail.com wrote:

 Does anyone know how to solve this problem?


Show a screen shot of the problem and maybe some small bits of code where
you do your drawing to the map.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

2012-10-17 Thread androidom


2008年3月14日金曜日 23時46分06秒 UTC+1 hackbod:

 The in-call UI and lock UI are special parts of the system UI; they 
 are not normal applications. 

 You can't intercept the home key.  We really really do not want to 
 allow apps to do so -- the user needs a way they can rely on to always 
 get out of an application. 


Hi there,
I am stuck in a similar area. I want to get out of the application or 
rather turn my screen off.. when a user presses this home button. Can you 
suggest a method how to do that.. ?
thanks
 

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

[android-developers] Re: problem With Home Back screen button

2012-10-17 Thread lbendlin
read about the activity lifecycle. You can do the necessary stuff in onPause

On Wednesday, October 17, 2012 2:24:46 PM UTC-4, androidom wrote:



 2008年3月14日金曜日 23時46分06秒 UTC+1 hackbod:

 The in-call UI and lock UI are special parts of the system UI; they 
 are not normal applications. 

 You can't intercept the home key.  We really really do not want to 
 allow apps to do so -- the user needs a way they can rely on to always 
 get out of an application. 


 Hi there,
 I am stuck in a similar area. I want to get out of the application or 
 rather turn my screen off.. when a user presses this home button. Can you 
 suggest a method how to do that.. ?
 thanks
  


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

[android-developers] Re: problem

2012-10-11 Thread bob
 

It sounds like you will want to use SQLite and a ListView.

On Thursday, October 11, 2012 7:18:54 AM UTC-5, Anything wrote:

 Hello ,
  my Problem is: Thousand (1000) of data come from Database (Sql 
 Server,mySql,Sqlite).
 than how it handle and display on screen.
 Please give me solution.my Id is sanandiya...@gmail.com javascript:. 
 send me answer.


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

2012-09-25 Thread bob
 

You will want to mount your SD drive to your PC and run TreeSize.  This 
will show you where your space is.



On Monday, September 17, 2012 1:37:39 AM UTC-5, Iskandar Muda wrote:

 Dear google support team

 I have problem with my device after migration to ICS. My device is Sony 
 Ericsson Live with Walkman (WT19). Few days ago I upgrade my android to 
 ICS. After that,i found my sd card always full and can't take picture 
 because memory space has full. I remember there are 130mb space left. So I 
 try to unistall some program and get few mb space. But when I want to take 
 picture it happen again,my space is full.
 After I check with file manager finaly I found that there are tumbnail 
 file with size precisely same with my empty space before. I try to delete, 
 but my space not recover until I unmount my sdcard. After mounted back,my 
 space is recover,but after several minute left it happen again. This make 
 me frustation. I think this caused by virus,so I download avg and norton 
 from googleplay,but it dont make result. I have scanned with kaspersky from 
 my pc and have some result. Then I try to repair using SE Driver while I 
 upgrade again to android 4.0.4, because I think there are some bugs. But it 
 no effect,its still occure. Now I using version 4.1.B.0.587

 Please help me,at least I want to know the cause. Is my sdcard damage or 
 else. Sorry for long story,i hope you can help me.

 Best regard
 Iskandar


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 Getting the first and last day of current week.

2012-09-03 Thread skink


Seshu wrote:
 Hi All,
  I am using Calendar objects in my application and based on
 the current date i am retrieving first and last date of current week.
 In emulator o/p is coming as week starting from Sunday to Saturday
 correct and in some device the o/p is showing as Monday to Sunday. I
 used same code in java. there also o/p is showing from Sunday to
 Saturday only. i need the output as Sunday to Saturday only. I used
 these code..

 Calendar cal = Calendar.getInstance();
   int weekOfYear = cal.get(Calendar.WEEK_OF_YEAR);
   cal.set(Calendar.WEEK_OF_YEAR, weekOfYear);
   SimpleDateFormat formatter = new 
 SimpleDateFormat(MM/dd/);

   Calendar first = (Calendar) cal.clone();
   first.add(Calendar.DAY_OF_WEEK, 
 first.getFirstDayOfWeek() -
 first.get(Calendar.DAY_OF_WEEK));
   Calendar last = (Calendar) first.clone();
   last.add(Calendar.DAY_OF_YEAR, 6);

   String fromDate = formatter.format(first.getTime());
   String toDate = formatter.format(last.getTime());

 If anybody knows the reason means then plz tell me the solution. if
 these method is wrong means then plz send the code

 Thanks for All,
 S.Seshu

read carefully Calendar's documentation

pskink

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


[android-developers] Re: Problem with fragments

2012-09-02 Thread dminik
One more thing, in if -statement =) There is a kind of typo: 
R.*layout*.container_calendar. 
The right way it suppose to be is R.*id*.calendar_container... since I'm 
using findViewById -method =) Noh, at least I found out it. Problem can be 
marked as SOLVED.

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

2012-08-23 Thread lbendlin
The code works as you designed it. To get fresh locations you need to fully 
implement onLocationChanged()

On Thursday, August 23, 2012 7:53:25 AM UTC-4, Rajan wrote:

 Hey guys

 i am trying to get the user's current location through GPS but i always 
 get the previous LastKnownLocation.

 I am trying this since last 4 to 5 hours but i didn't find the refereched 
 current location.

 can anybody plz tell me how can i remove a listener of the 
 lastknownlocation.

 i had also try this code : locationManager.removeUpdates(locationListener);
 but i didn't get success.


 ===
  
 this is my code : 

 ===
 Location location=null;
 double lat1,lng1;
 LocationManager mlocManager = 
 (LocationManager)getSystemService(Context.LOCATION_SERVICE);
 LocationListener mlocListener = new MyLocationListener();
 mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, 
 mlocListener);
 location = 
 mlocManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
 

  mlocManager.removeUpdates(mlocListener);
  Toast.makeText(this, previous update is removed, 
 Toast.LENGTH_LONG).show();
  mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 
 0, mlocListener);
  location = 
 mlocManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
  
  try
 {
  lat1=location.getLatitude();
  lng1=location.getLongitude();
  Toast.makeText(this, lat : +lat1+, lng : +lng1, 
 Toast.LENGTH_LONG).show();
 }
 catch(Exception e)
 {
  e.printStackTrace();
  Toast.makeText(getApplicationContext(), 
  Your current location is 
 temporarily unavailable - Try Again!, Toast.LENGTH_LONG).show();
 }



 ===
  
 public class MyLocationListener implements LocationListener
 {
 @Override
 public void onLocationChanged(Location loc)
 {
 }

 @Override
 public void onProviderDisabled(String provider)
 {

 }

 @Override
 public void onProviderEnabled(String provider)
 {

 }

 @Override
 public void onStatusChanged(String provider, int status, Bundle extras)
 {
 }
  }

 ===

 Please help me what can i do? i didn't understand... 
 


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 with creating android account in google play

2012-08-22 Thread karkung
error this same  Your Registration to Google Play is still being processed. 

On Wednesday, August 22, 2012 12:34:45 AM UTC+7, surya pavan wrote:

 Hai to all,
  i was created new account in google play, after creating one problem is 
 occurred that is 
 Your Registration to Google Play is still being processed.
 You can upload applications to Google Play but you cannot publish until 
 your registration is completed.

 Plz help me


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Problem with creating android account in google play

2012-08-22 Thread surya pavan
Thankq , registration was completed
On Aug 23, 2012 2:18 AM, karkung howt...@gmail.com wrote:

 error this same  Your Registration to Google Play is still being
 processed.

 On Wednesday, August 22, 2012 12:34:45 AM UTC+7, surya pavan wrote:

 Hai to all,
  i was created new account in google play, after creating one problem is
 occurred that is
 Your Registration to Google Play is still being processed.
 You can upload applications to Google Play but you cannot publish until
 your registration is completed.

 Plz help me

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

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

[android-developers] Re: Problem with creating android account in google play

2012-08-21 Thread bob
 

It's probably an issue with your payment of 25 dollars being processed or 
possibly the country you are in.



On Tuesday, August 21, 2012 12:34:45 PM UTC-5, surya pavan wrote:

 Hai to all,
  i was created new account in google play, after creating one problem is 
 occurred that is 
 Your Registration to Google Play is still being processed.
 You can upload applications to Google Play but you cannot publish until 
 your registration is completed.

 Plz help me


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Problem in larger xml parsing with SOAP web service

2012-08-17 Thread Rajan Thakrar
Ohh! I am so sorry krishana, i have tried your code and it is working
perfectly, but now i got the output that is neither XML nor JSON   (output
is available in Dataset). so what can i do ? How can i parse the response
data.

On Fri, Aug 17, 2012 at 11:14 AM, Rajan Thakrar r.d.thak...@gmail.comwrote:

 hi  Krishna, so i am going on wrong track, is it so ??

 B'cos i am also trying this code with small xml response at that time it
 will be worked fine, but when i get that the larger xml at that time i am
 facing the problem.

 And yes i have already tried out your code before creating this post, but
 i didn't get the success that is why i am using this code.

 Thank you for reply.


 On Thu, Aug 16, 2012 at 10:30 PM, Krishna Mahadik 
 krishna.maha...@gmail.com wrote:

 Hi Rajan,

 If your are looking for hitting .net web service from android
 application, you need to use an external jar file KSOAP2 at Android end.

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
 setContentView(R.layout.login);
 final String NAMESPACE = http://tempuri.org/;;
 final String METHOD_NAME = Login;
 final String SOAP_ACTION = http://tempuri.org/Login;;
 final String URL = 
 http://ipaddressofwebserver/Dashboard/Service.asmx;;

 Button login = (Button)this.findViewById(R.id.btnLogin);



 login.setOnClickListener(new View.OnClickListener()
 {
  public void onClick(View arg0)
 {
  String [] data = {};
 String x =  ;
  String username=null;
  String password=null;

 EditText id = (EditText)findViewById(R.id.txt_username);
 EditText passkey = (EditText)findViewById(R.id.txt_password);

  try {
  username=id.getText().toString();
  password=passkey.getText().toString();
  SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

 SoapSerializationEnvelope envelope = new
 SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
 request.addProperty(uname, username);
   request.addProperty(pass, password);
envelope.setOutputSoapObject(request);

 HttpTransportSE androidHttpTransport = new
 HttpTransportSE(URL);
 androidHttpTransport.call(SOAP_ACTION, envelope);
 SoapObject response = (SoapObject)envelope.getResponse();  
 //we
 get soap object as response...
 data = getarray(response);

 x = data[0].toString();  //u can convert object to string
 also, but i have passed array object in soap response



 if(data[0].toString().equalsIgnoreCase(true))
  {
   Toast.makeText(Login.this, Login in
 successful,Toast.LENGTH_LONG).show();
 }
else
   {
  Toast.makeText(Login.this, data[1].toString(),Toast.LENGTH_LONG).show();
   }

  }
catch (Exception e)
 {
  Toast.makeText(Login.this,error,Toast.LENGTH_LONG).show();
 }
  }
 });

 }

  public static String[] getarray(SoapObject soap)
 {
 String[] categories = new String[soap.getPropertyCount()];
 for (int i = 0; i  categories.length; i++)
 {
 categories [i] = soap.getProperty(i).toString();
  }
 return categories;
 }

 }






 On Thu, Aug 16, 2012 at 8:09 PM, JP joachim.pfeif...@gmail.com wrote:

 This looks to me like you're trying to skin existing code over the
 Android platform?
 In my experience, DOM (tree parsing in general) isn't so great in the
 mobile environment as you have to load the tree structure up front to get
 to that last piece of data that you actually might be interested in.
 In an ideal world, you would probably want to break this down and
 implement the web services and SOAP elements on a web server. Your mobile
 app then queries this web server through small interactions. Using stream
 parsing and perhaps JSON in place of XML.




 On Thursday, August 16, 2012 3:46:32 PM UTC+2, Rajan wrote:

 i am trying to fetch the record from the SOAP web service but due to
 larger xml size i didn't get the proper output,
 here i'm putting my code as well as logcat entry.

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




 --
 --
 . \\\///
 .   /\
 .   | \\   // |
 . ( | (.) (.) |)
 --o00o--(_)--o00o-

 Yesterday is not ours to recover, but
 tomorrow is ours to win or to lose.

 ---ooo0---
 .   (   )   0ooo
 .\ (  (   )
 . \_) ) /
 .(_/

 --
 You 

Re: [android-developers] Re: Problem in larger xml parsing with SOAP web service

2012-08-17 Thread Rajan Thakrar
I am getting this kind of response
*
-
*
anyType{NewDataSet=anyType{Table=anyType{AdSpaceID=423;
AdspaceName=Hoarding at football, (Amul);
Address=football,(Amul)-Ahmedabad; }; Table=anyType{AdSpaceID=424;
AdspaceName=Hoarding at football, tow. Bhulabhai.(Amul); Address=football,
tow. Bhulabhai.(Amul)-Ahmedabad; }; Table=anyType{AdSpaceID=425;
AdspaceName=Hoarding at Bhulabhai 4 Road Junction; Address=Bhulabhai 4 Road
Junction-Ahmedabad; }; Table=anyType{AdSpaceID=426; AdspaceName=Hoarding at
Bhulabhai Park, Tow. S.T. Stand; Address=Bhulabhai Park, Tow. S.T.
Stand-Ahmedabad; }; Table=anyType{AdSpaceID=427; AdspaceName=Hoarding at
Bhulabhai Park,Tow. Maninagar  Shah- Alam; Address=Bhulabhai
Park,-Ahmedabad; }; Table=anyType{AdSpaceID=428; AdspaceName=Hoarding at
Foot-ball Ground, Tow. Apsara Aradhana Cinema  tow. Bhulabhai;
Address=Foot-ball Ground, Tow. Apsara Aradhana Cinema  tow.
Bhulabhai-Ahmedabad; }; Table=anyType{AdSpaceID=429; AdspaceName=Hoarding
at Khokhra circle.Shivam foot; Address=Khokhra circle,Shivam
foot-Ahmedabad; }; Table=anyType{AdSpaceID=430; AdspaceName=Hoarding at
Khokhra circle,Shivam foot; Address=Khokhra circle,Shivam foot-Ahmedabad;
}; Table=anyType{AdSpaceID=431; AdspaceName=Hoarding at Khokhra circle;
Address=Khokhra circle-Ahmedabad; }; Table=anyType{AdSpaceID=432;
AdspaceName=Hoarding at Khokhra Bridge, Rly. Yard,; Address=Khokhra Bridge,
Rly. Yard,-Ahmedabad; }; Table=anyType{AdSpaceID=433; AdspaceName=Hoarding
at  Rly. Yard,; Address=Khokhra Bridge, Rly. Yard,-Ahmedabad; };
Table=anyType{AdSpaceID=434; AdspaceName=Hoarding at O/B  Tow.Sraspur;
Address=O/B  Tow.Sraspur-Ahmedabad; }; Table=anyType{AdSpaceID=435;
AdspaceName=Hoarding at Nr. Six road junction,near kalupur darwaja;
Address=Nr. Six road junction,near kalupur darwaja-Ahmedabad; };
Table=anyType{AdSpaceID=436; AdspaceName=Hoarding at kalupur circle,;
Address=kalupur circle,-Ahmedabad; }; Table=anyType{AdSpaceID=437;
AdspaceName=Hoarding at near prem darwaja; Address=near prem
darwaja-Ahmedabad; }; Table=anyType{AdSpaceID=438; AdspaceName=Hoarding at
law garden circle; Address=law garden circle-Ahmedabad; };
Table=anyType{AdSpaceID=439; AdspaceName=Hoarding at law garden circle;
Address=law garden circle-Ahmedabad; }; Table=anyType{AdSpaceID=440;
AdspaceName=Hoarding at ritz hotel; Address=opp ritz hotel-Ahmedabad; };
Table=anyType{AdSpaceID=441; AdspaceName=Hoarding at  Jawahar chowk;
Address=Jawahar chowk-Ahmedabad; }; Table=anyType{AdSpaceID=442;
AdspaceName=Hoarding at Jawahar chowk; Address=Jawahar chowk-Ahmedabad; };
Table=anyType{AdSpaceID=443; AdspaceName=Hoarding at Nr. Rambaug;
Address=Nr. Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=444;
AdspaceName=Hoarding at Rambaug; Address=Nr. Rambaug-Ahmedabad; };
Table=anyType{AdSpaceID=445; AdspaceName=Hoarding at Rambaug;
Address=Rambaug-Ahmedabad; }; Table=anyType{AdSpaceID=446;
AdspaceName=Hoarding at Nr. Rambaug; Address=Nr. Rambaug-Ahmedabad; };
Table=anyType{AdSpaceID=447; AdspaceName=Hoarding at Nr. Bhulabhai
Park,Above Chaitanya Medical Stores; Address=Nr. Bhulabhai Park,Above
Chaitanya Medical Stores-Ahmedabad; }; Table=anyType{AdSpaceID=448;
AdspaceName=Hoarding at Railway colony; Address=Railway colony-Ahmedabad;
}; Table=anyType{AdSpaceID=449; AdspaceName=Hoarding at gautam nagar;
Address=gautam nagar-Ahmedabad; }; Table=anyType{AdSpaceID=450;
AdspaceName=Hoarding at gautam nagar; Address=gautam nagar-Ahmedabad; };
Table=anyType{AdSpaceID=451; AdspaceName=Hoarding at pushp kunj;
Address=pushp kunj-Ahmedabad; }; Table=anyType{AdSpaceID=452;
AdspaceName=Hoarding at Maninagar  o/b; Address=Maninagar  o/b-Ahmedabad;
}; Table=anyType{AdSpaceID=453; AdspaceName=Hoarding at gor no kuva;
Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=454;
AdspaceName=Hoarding at gor no kuva; Address=gor no kuva-Ahmedabad; };
Table=anyType{AdSpaceID=455; AdspaceName=Hoarding at gor no kuva;
Address=gor no kuva-Ahmedabad; }; Table=anyType{AdSpaceID=456;
AdspaceName=Hoarding at 4 road jnc.; Address=4 road jnc.-Ahmedabad; };
*
-
*
*
*
*so how can i parse it...*
*===*
*
*
On Fri, Aug 17, 2012 at 12:42 PM, Rajan Thakrar r.d.thak...@gmail.comwrote:

 Ohh! I am so sorry krishana, i have tried your code and it is working
 perfectly, but now i got the output that is neither XML nor JSON   (output
 is available in Dataset). so what can i do ? How can i parse the response
 data.


 On Fri, Aug 17, 2012 at 11:14 AM, Rajan Thakrar r.d.thak...@gmail.comwrote:

 hi  Krishna, so i am going on wrong track, is it so ??

 B'cos i am also trying this code with small xml response at that time it
 will be worked fine, but when i get that the larger xml at that time i am
 facing the 

Re: [android-developers] Re: Problem in larger xml parsing with SOAP web service

2012-08-17 Thread Krishna Mahadik
Hi Rajan,

First tell me your scenario. I am not sure what your are trying to do.  r u
trying to read xml coming from web service or reading xml on server ??






On Fri, Aug 17, 2012 at 11:14 AM, Rajan Thakrar r.d.thak...@gmail.comwrote:

 hi  Krishna, so i am going on wrong track, is it so ??

 B'cos i am also trying this code with small xml response at that time it
 will be worked fine, but when i get that the larger xml at that time i am
 facing the problem.

 And yes i have already tried out your code before creating this post, but
 i didn't get the success that is why i am using this code.

 Thank you for reply.


 On Thu, Aug 16, 2012 at 10:30 PM, Krishna Mahadik 
 krishna.maha...@gmail.com wrote:

 Hi Rajan,

 If your are looking for hitting .net web service from android
 application, you need to use an external jar file KSOAP2 at Android end.

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
 setContentView(R.layout.login);
 final String NAMESPACE = http://tempuri.org/;;
 final String METHOD_NAME = Login;
 final String SOAP_ACTION = http://tempuri.org/Login;;
 final String URL = 
 http://ipaddressofwebserver/Dashboard/Service.asmx;;

 Button login = (Button)this.findViewById(R.id.btnLogin);



 login.setOnClickListener(new View.OnClickListener()
 {
  public void onClick(View arg0)
 {
  String [] data = {};
 String x =  ;
  String username=null;
  String password=null;

 EditText id = (EditText)findViewById(R.id.txt_username);
 EditText passkey = (EditText)findViewById(R.id.txt_password);

  try {
  username=id.getText().toString();
  password=passkey.getText().toString();
  SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

 SoapSerializationEnvelope envelope = new
 SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
 request.addProperty(uname, username);
   request.addProperty(pass, password);
envelope.setOutputSoapObject(request);

 HttpTransportSE androidHttpTransport = new
 HttpTransportSE(URL);
 androidHttpTransport.call(SOAP_ACTION, envelope);
 SoapObject response = (SoapObject)envelope.getResponse();  
 //we
 get soap object as response...
 data = getarray(response);

 x = data[0].toString();  //u can convert object to string
 also, but i have passed array object in soap response



 if(data[0].toString().equalsIgnoreCase(true))
  {
   Toast.makeText(Login.this, Login in
 successful,Toast.LENGTH_LONG).show();
 }
else
   {
  Toast.makeText(Login.this, data[1].toString(),Toast.LENGTH_LONG).show();
   }

  }
catch (Exception e)
 {
  Toast.makeText(Login.this,error,Toast.LENGTH_LONG).show();
 }
  }
 });

 }

  public static String[] getarray(SoapObject soap)
 {
 String[] categories = new String[soap.getPropertyCount()];
 for (int i = 0; i  categories.length; i++)
 {
 categories [i] = soap.getProperty(i).toString();
  }
 return categories;
 }

 }






 On Thu, Aug 16, 2012 at 8:09 PM, JP joachim.pfeif...@gmail.com wrote:

 This looks to me like you're trying to skin existing code over the
 Android platform?
 In my experience, DOM (tree parsing in general) isn't so great in the
 mobile environment as you have to load the tree structure up front to get
 to that last piece of data that you actually might be interested in.
 In an ideal world, you would probably want to break this down and
 implement the web services and SOAP elements on a web server. Your mobile
 app then queries this web server through small interactions. Using stream
 parsing and perhaps JSON in place of XML.




 On Thursday, August 16, 2012 3:46:32 PM UTC+2, Rajan wrote:

 i am trying to fetch the record from the SOAP web service but due to
 larger xml size i didn't get the proper output,
 here i'm putting my code as well as logcat entry.

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




 --
 --
 . \\\///
 .   /\
 .   | \\   // |
 . ( | (.) (.) |)
 --o00o--(_)--o00o-

 Yesterday is not ours to recover, but
 tomorrow is ours to win or to lose.

 ---ooo0---
 .   (   )   0ooo
 .\ (  (   )
 . \_) ) /
 .(_/

 --
 You received this message because you are subscribed to the Google
 

[android-developers] Re: Problem in larger xml parsing with SOAP web service

2012-08-16 Thread JP
This looks to me like you're trying to skin existing code over the Android 
platform?
In my experience, DOM (tree parsing in general) isn't so great in the 
mobile environment as you have to load the tree structure up front to get 
to that last piece of data that you actually might be interested in.
In an ideal world, you would probably want to break this down and implement 
the web services and SOAP elements on a web server. Your mobile app then 
queries this web server through small interactions. Using stream parsing 
and perhaps JSON in place of XML.



On Thursday, August 16, 2012 3:46:32 PM UTC+2, Rajan wrote:

 i am trying to fetch the record from the SOAP web service but due to 
 larger xml size i didn't get the proper output, 
 here i'm putting my code as well as logcat entry.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Problem in larger xml parsing with SOAP web service

2012-08-16 Thread Krishna Mahadik
Hi Rajan,

If your are looking for hitting .net web service from android application,
you need to use an external jar file KSOAP2 at Android end.

   public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
setContentView(R.layout.login);
final String NAMESPACE = http://tempuri.org/;;
final String METHOD_NAME = Login;
final String SOAP_ACTION = http://tempuri.org/Login;;
final String URL = 
http://ipaddressofwebserver/Dashboard/Service.asmx;;

Button login = (Button)this.findViewById(R.id.btnLogin);



login.setOnClickListener(new View.OnClickListener()
{
 public void onClick(View arg0)
{
String [] data = {};
String x =  ;
 String username=null;
 String password=null;

EditText id = (EditText)findViewById(R.id.txt_username);
   EditText passkey = (EditText)findViewById(R.id.txt_password);

try {
 username=id.getText().toString();
 password=passkey.getText().toString();
 SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

   SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
   envelope.dotNet = true;
   request.addProperty(uname, username);
  request.addProperty(pass, password);
  envelope.setOutputSoapObject(request);

HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject response = (SoapObject)envelope.getResponse();  //we
get soap object as response...
data = getarray(response);

x = data[0].toString();  //u can convert object to string also,
but i have passed array object in soap response



if(data[0].toString().equalsIgnoreCase(true))
 {
  Toast.makeText(Login.this, Login in
successful,Toast.LENGTH_LONG).show();
   }
   else
  {
Toast.makeText(Login.this, data[1].toString(),Toast.LENGTH_LONG).show();
  }

 }
  catch (Exception e)
{
Toast.makeText(Login.this,error,Toast.LENGTH_LONG).show();
}
}
});

}

 public static String[] getarray(SoapObject soap)
{
String[] categories = new String[soap.getPropertyCount()];
for (int i = 0; i  categories.length; i++)
{
categories [i] = soap.getProperty(i).toString();
 }
return categories;
}

}






On Thu, Aug 16, 2012 at 8:09 PM, JP joachim.pfeif...@gmail.com wrote:

 This looks to me like you're trying to skin existing code over the Android
 platform?
 In my experience, DOM (tree parsing in general) isn't so great in the
 mobile environment as you have to load the tree structure up front to get
 to that last piece of data that you actually might be interested in.
 In an ideal world, you would probably want to break this down and
 implement the web services and SOAP elements on a web server. Your mobile
 app then queries this web server through small interactions. Using stream
 parsing and perhaps JSON in place of XML.




 On Thursday, August 16, 2012 3:46:32 PM UTC+2, Rajan wrote:

 i am trying to fetch the record from the SOAP web service but due to
 larger xml size i didn't get the proper output,
 here i'm putting my code as well as logcat entry.

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




-- 
-- 
. \\\///
.   /\
.   | \\   // |
. ( | (.) (.) |)
--o00o--(_)--o00o-

Yesterday is not ours to recover, but
tomorrow is ours to win or to lose.

---ooo0---
.   (   )   0ooo
.\ (  (   )
. \_) ) /
.(_/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Problem in larger xml parsing with SOAP web service

2012-08-16 Thread Rajan Thakrar
hi  Krishna, so i am going on wrong track, is it so ??

B'cos i am also trying this code with small xml response at that time it
will be worked fine, but when i get that the larger xml at that time i am
facing the problem.

And yes i have already tried out your code before creating this post, but i
didn't get the success that is why i am using this code.

Thank you for reply.

On Thu, Aug 16, 2012 at 10:30 PM, Krishna Mahadik krishna.maha...@gmail.com
 wrote:

 Hi Rajan,

 If your are looking for hitting .net web service from android application,
 you need to use an external jar file KSOAP2 at Android end.

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
 setContentView(R.layout.login);
 final String NAMESPACE = http://tempuri.org/;;
 final String METHOD_NAME = Login;
 final String SOAP_ACTION = http://tempuri.org/Login;;
 final String URL = 
 http://ipaddressofwebserver/Dashboard/Service.asmx;;

 Button login = (Button)this.findViewById(R.id.btnLogin);



 login.setOnClickListener(new View.OnClickListener()
 {
  public void onClick(View arg0)
 {
  String [] data = {};
 String x =  ;
  String username=null;
  String password=null;

 EditText id = (EditText)findViewById(R.id.txt_username);
 EditText passkey = (EditText)findViewById(R.id.txt_password);

  try {
  username=id.getText().toString();
  password=passkey.getText().toString();
  SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

 SoapSerializationEnvelope envelope = new
 SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
 request.addProperty(uname, username);
   request.addProperty(pass, password);
envelope.setOutputSoapObject(request);

 HttpTransportSE androidHttpTransport = new
 HttpTransportSE(URL);
 androidHttpTransport.call(SOAP_ACTION, envelope);
 SoapObject response = (SoapObject)envelope.getResponse();  
 //we
 get soap object as response...
 data = getarray(response);

 x = data[0].toString();  //u can convert object to string
 also, but i have passed array object in soap response



 if(data[0].toString().equalsIgnoreCase(true))
  {
   Toast.makeText(Login.this, Login in
 successful,Toast.LENGTH_LONG).show();
 }
else
   {
  Toast.makeText(Login.this, data[1].toString(),Toast.LENGTH_LONG).show();
   }

  }
catch (Exception e)
 {
  Toast.makeText(Login.this,error,Toast.LENGTH_LONG).show();
 }
  }
 });

 }

  public static String[] getarray(SoapObject soap)
 {
 String[] categories = new String[soap.getPropertyCount()];
 for (int i = 0; i  categories.length; i++)
 {
 categories [i] = soap.getProperty(i).toString();
  }
 return categories;
 }

 }






 On Thu, Aug 16, 2012 at 8:09 PM, JP joachim.pfeif...@gmail.com wrote:

 This looks to me like you're trying to skin existing code over the
 Android platform?
 In my experience, DOM (tree parsing in general) isn't so great in the
 mobile environment as you have to load the tree structure up front to get
 to that last piece of data that you actually might be interested in.
 In an ideal world, you would probably want to break this down and
 implement the web services and SOAP elements on a web server. Your mobile
 app then queries this web server through small interactions. Using stream
 parsing and perhaps JSON in place of XML.




 On Thursday, August 16, 2012 3:46:32 PM UTC+2, Rajan wrote:

 i am trying to fetch the record from the SOAP web service but due to
 larger xml size i didn't get the proper output,
 here i'm putting my code as well as logcat entry.

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




 --
 --
 . \\\///
 .   /\
 .   | \\   // |
 . ( | (.) (.) |)
 --o00o--(_)--o00o-

 Yesterday is not ours to recover, but
 tomorrow is ours to win or to lose.

 ---ooo0---
 .   (   )   0ooo
 .\ (  (   )
 . \_) ) /
 .(_/

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

[android-developers] Re: problem in SOAP - asmx web service

2012-08-08 Thread Rajan
Yeh finally i got the solution,
this is my code
--
public class HTTPOST 
{
public String getResponseByXML(String URL, String request) 
{
HttpPost httpPost = new HttpPost(URL);
StringEntity entity;
String response_string = null;
try
{
entity = new StringEntity(request, HTTP.UTF_8);
httpPost.setHeader(Content-Type,text/xml;charset=UTF-8);
// httpPost.setHeader(Content-Type,application/soap+xml;charset=UTF-8);
httpPost.setEntity(entity);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(httpPost);
response_string = EntityUtils.toString(response.getEntity());
Log.d(request, response_string);
}
catch (Exception e) 
{
e.printStackTrace();
}
return response_string;
}
 public String getResponseByFile(String URL,String xml)
{
HttpPost httpPost = new HttpPost(URL);

FileEntity entity;
String response_string = null;
try 
{
StringEntity ent=new StringEntity(xml,UTF-8);
//entity = new FileEntity(new 
File(Environment.getExternalStorageDirectory()+File.separator+request.xml), 
UTF-8);
httpPost.setHeader(Content-Type,text/xml;charset=UTF-8);
//httpPost.setHeader(Content-Type,application/soap+xml;charset=UTF-8);
//httpPost.setEntity(entity);
httpPost.setEntity(ent);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(httpPost);
response_string = EntityUtils.toString(response.getEntity());
Log.d(request, **---*** Response : 
+Html.fromHtml(response_string).toString());
}
catch (Exception e) 
{
e.printStackTrace();
}
return response_string;
}
}
--
 

public class SoapHTTPPostActivity extends Activity
{
private String URL = 
http://stage.simformsolutions.com:55109/WebServices/BAAccountService.asmx;;
 @Override
public void onCreate(Bundle savedInstanceState) 
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

String xml = ?xml version=\1.0\ encoding=\utf-8\?+
soap:Envelope xmlns:xsi=\http://www.w3.org/2001/XMLSchema-instance\; 

xmlns:xsd=\http://www.w3.org/2001/XMLSchema\; 

xmlns:soap=\http://schemas.xmlsoap.org/soap/envelope/\;+
  soap:Body+
GetAllAdspacesByBusiness xmlns=\http://tempuri.org/\;+
  businessID+3+/businessID+
/GetAllAdspacesByBusiness+
  /soap:Body+
/soap:Envelope;
String result=null;
try
{
 InputStream is = new ByteArrayInputStream(xml.getBytes());
result=convertStreamToString(is);

//xml = convertStreamToString(getAssets().open(request.xml));
} 
catch (Exception e) 
{
e.printStackTrace();
}
String request = String.format(result);
HTTPOST httpost = new HTTPOST();
httpost.getResponseByXML(URL, request);
httpost.getResponseByFile(URL,xml);
}

public static String convertStreamToString(InputStream is) throws Exception 
{
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null)
{
sb.append(line+\n);
}
is.close();
return sb.toString();
}
}
 END 
-  


On Wednesday, 1 August 2012 19:09:43 UTC+5:30, Rajan wrote:

 i am trying to get the response from the SOAP asmx web service but it 
 didn't give proper response


 ---
  
 here i putting my logcat entry
 -

 08-01 19:08:06.891: W/System.err(1994): 
 org.xmlpull.v1.XmlPullParserException: unterminated entity ref 
 (position:TEXT  ?  ? '
 ?...@1:18 in java.io.InputStreamReader@44e9c180) 

 08-01 19:08:06.891: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.exception(KXmlParser.java:273)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.error(KXmlParser.java:269)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.pushEntity(KXmlParser.java:787)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.pushText(KXmlParser.java:855)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.nextImpl(KXmlParser.java:354)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.next(KXmlParser.java:1385)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:1415)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:127)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.ksoap2.transport.Transport.parseResponse(Transport.java:100)
 08-01 19:08:06.901: W/System.err(1994): at 
 

Re: [android-developers] Re: problem in SOAP - asmx web service

2012-08-08 Thread Krishna Mahadik
Hi,

Is the web service link up. I m getting following error. Is your web
service properly hosted on web.
The test form is only available for requests from the local machine.

and

instead of
 private static String URL = http://pro.bookadspace.com/**
WebServices/BAAccountService.**asmx?op=**GetAllAdspacesByBusinesshttp://pro.bookadspace.com/WebServices/BAAccountService.asmx?op=GetAllAdspacesByBusiness
;
 go with
 private static String URL = http://pro.bookadspace.com/**
WebServices/BAAccountService.**asmxhttp://pro.bookadspace.com/WebServices/BAAccountService.asmx?op=GetAllAdspacesByBusiness
;

only...on this page it will look for web method..which your are
supplying separately..


Thanks  Regards
Krishna V. Mahadik

-- 
. \\\///
.   /\
.   | \\   // |
. ( | (.) (.) |)
--o00o--(_)--o00o-

Yesterday is not ours to recover, but
tomorrow is ours to win or to lose.

---ooo0---
.   (   )   0ooo
.\ (  (   )
. \_) ) /
.(_/

On Tue, Aug 7, 2012 at 3:43 PM, Rajan r.d.thak...@gmail.com wrote:

 i am follwing this tutorial


 http://translate.google.com.ua/translate?hl=uksl=rutl=enu=http://mobile-developer.ru/uncategorized/rabota-s-soap-web-servisami-v-android-prilozheniyax/



 On Tuesday, 7 August 2012 15:38:25 UTC+5:30, Rajan wrote:

 Hello RichardC,

 First of all thank you for the reply

 i didn't find out my solution so here i am putting my code as well as web
 service live url also.

 so can you please check it out and guide me where i'm wrong.
 --**--**
 --**--**
 --
 import org.ksoap2.SoapEnvelope;
 import org.ksoap2.serialization.**PropertyInfo;
 import org.ksoap2.serialization.**SoapObject;
 import org.ksoap2.serialization.**SoapSerializationEnvelope;
 import org.ksoap2.transport.**HttpTransportSE;

 import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;
 import android.widget.TextView;

 public class WebServiceDemo extends Activity
 {
 private TextView response;

 private static String SOAP_ACTION = http://tempuri.org/**
 GetAllAdspacesByBusiness http://tempuri.org/GetAllAdspacesByBusiness;
 private static String NAMESPACE = http://tempuri.org/;;
 private static String METHOD_NAME = GetAllAdspacesByBusiness;
 private static String URL = http://pro.bookadspace.com/**
 WebServices/BAAccountService.**asmx?op=**GetAllAdspacesByBusinesshttp://pro.bookadspace.com/WebServices/BAAccountService.asmx?op=GetAllAdspacesByBusiness
 ;

 int masterID=98;
 @Override
 protected void onCreate(Bundle savedInstanceState)
 {
 super.onCreate(**savedInstanceState);
 setContentView(R.layout.main);
 response=(TextView)**findViewById(R.id.response);
  try
 {
 String resp=callService(masterID);
 response.setText(resp);
 Log.d(Web Service,Response : + resp);
 }
 catch (Exception e)
 {
 response.setText(Exception : +e.toString());
 e.printStackTrace();
 }
 }
  public String callService(int masterID) throws Exception
 {
 SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

 PropertyInfo info = new PropertyInfo();
 info.setName(businessID);
 info.setValue(new Integer(masterID).toString());
 request.addProperty(info);

 SoapSerializationEnvelope envelope = new
 SoapSerializationEnvelope(**SoapEnvelope.VER11);
 envelope.dotNet = true;
 envelope.setOutputSoapObject(**request);

 HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
 androidHttpTransport.**setXmlVersionTag(?xml version=\1.0\
 encoding=\utf-8\?);
 androidHttpTransport.call(**SOAP_ACTION, envelope);

 SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
 return resultsRequestSOAP.**getProperty(0).toString();
 }
 }

 --**--**
 --**--**
 --
 OUTPUT
 --**--**
 --**--**
 --
 I am getting this kind of output,

 
 ***
 anyType{schema=anyType
 {element=anyType{complexType=**anyType
 {choice=anyType{element=**anyType
 {complexType=anyType{sequence=**anyType
 {element=anyType{}; element=anyType{}; element=anyType{}; }
 ; }; }; }; }; }; };
 diffgram=anyType{}; }
 
 ***

 But this is not a proper output, so what can i do ??
 --**--**
 --**--**
 

[android-developers] Re: problem in SOAP - asmx web service

2012-08-07 Thread Rajan
Hello RichardC,

First of all thank you for the reply 

i didn't find out my solution so here i am putting my code as well as web 
service live url also.

so can you please check it out and guide me where i'm wrong.
--
 
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class WebServiceDemo extends Activity 
{
private TextView response;

private static String SOAP_ACTION = 
http://tempuri.org/GetAllAdspacesByBusiness;;
private static String NAMESPACE = http://tempuri.org/;;
private static String METHOD_NAME = GetAllAdspacesByBusiness;
private static String URL = 
http://pro.bookadspace.com/WebServices/BAAccountService.asmx?op=GetAllAdspacesByBusiness;;

int masterID=98; 
@Override
protected void onCreate(Bundle savedInstanceState) 
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
response=(TextView)findViewById(R.id.response);
 try 
{
String resp=callService(masterID);
response.setText(resp);
Log.d(Web Service,Response : + resp);
}
catch (Exception e) 
{
response.setText(Exception : +e.toString());
e.printStackTrace();
}
}
 public String callService(int masterID) throws Exception 
{
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

PropertyInfo info = new PropertyInfo();
info.setName(businessID);
info.setValue(new Integer(masterID).toString());
request.addProperty(info);

SoapSerializationEnvelope envelope = new 
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);

HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.setXmlVersionTag(?xml version=\1.0\ 
encoding=\utf-8\?);
androidHttpTransport.call(SOAP_ACTION, envelope);

SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
return resultsRequestSOAP.getProperty(0).toString();
}
}

--
OUTPUT
--
 
I am getting this kind of output, 

***
anyType{schema=anyType
{element=anyType{complexType=anyType
{choice=anyType{element=anyType
{complexType=anyType{sequence=anyType
{element=anyType{}; element=anyType{}; element=anyType{}; }
; }; }; }; }; }; }; 
diffgram=anyType{}; }
***
 

But this is not a proper output, so what can i do ??
--
 


On Wednesday, 1 August 2012 19:12:53 UTC+5:30, RichardC wrote:

 Print the stream instead of trying to parse it, and look at it, I guess 
 @1:18 is line 1 position 18.


 On Wednesday, August 1, 2012 2:39:43 PM UTC+1, Rajan wrote:

 i am trying to get the response from the SOAP asmx web service but it 
 didn't give proper response


 ---
  
 here i putting my logcat entry
 -

 08-01 19:08:06.891: W/System.err(1994): 
 org.xmlpull.v1.XmlPullParserException: unterminated entity ref 
 (position:TEXT  ?  ? '
 ?...@1:18 in java.io.InputStreamReader@44e9c180) 

 08-01 19:08:06.891: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.exception(KXmlParser.java:273)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.error(KXmlParser.java:269)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.pushEntity(KXmlParser.java:787)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.pushText(KXmlParser.java:855)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.nextImpl(KXmlParser.java:354)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.next(KXmlParser.java:1385)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:1415)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:127)
 08-01 19:08:06.901: W/System.err(1994): at 
 

[android-developers] Re: problem in SOAP - asmx web service

2012-08-07 Thread Rajan
i am follwing this tutorial

http://translate.google.com.ua/translate?hl=uksl=rutl=enu=http://mobile-developer.ru/uncategorized/rabota-s-soap-web-servisami-v-android-prilozheniyax/
 

On Tuesday, 7 August 2012 15:38:25 UTC+5:30, Rajan wrote:

 Hello RichardC,

 First of all thank you for the reply 

 i didn't find out my solution so here i am putting my code as well as web 
 service live url also.

 so can you please check it out and guide me where i'm wrong.

 --
  
 import org.ksoap2.SoapEnvelope;
 import org.ksoap2.serialization.PropertyInfo;
 import org.ksoap2.serialization.SoapObject;
 import org.ksoap2.serialization.SoapSerializationEnvelope;
 import org.ksoap2.transport.HttpTransportSE;

 import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;
 import android.widget.TextView;

 public class WebServiceDemo extends Activity 
 {
 private TextView response;

 private static String SOAP_ACTION = 
 http://tempuri.org/GetAllAdspacesByBusiness;;
 private static String NAMESPACE = http://tempuri.org/;;
 private static String METHOD_NAME = GetAllAdspacesByBusiness;
 private static String URL = 
 http://pro.bookadspace.com/WebServices/BAAccountService.asmx?op=GetAllAdspacesByBusiness
 ;
 
 int masterID=98; 
 @Override
 protected void onCreate(Bundle savedInstanceState) 
 {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 response=(TextView)findViewById(R.id.response);
  try 
 {
 String resp=callService(masterID);
 response.setText(resp);
 Log.d(Web Service,Response : + resp);
 }
 catch (Exception e) 
 {
 response.setText(Exception : +e.toString());
 e.printStackTrace();
 }
 }
  public String callService(int masterID) throws Exception 
 {
 SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
 
 PropertyInfo info = new PropertyInfo();
 info.setName(businessID);
 info.setValue(new Integer(masterID).toString());
 request.addProperty(info);
 
 SoapSerializationEnvelope envelope = new 
 SoapSerializationEnvelope(SoapEnvelope.VER11);
 envelope.dotNet = true;
 envelope.setOutputSoapObject(request);
 
 HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
 androidHttpTransport.setXmlVersionTag(?xml version=\1.0\ 
 encoding=\utf-8\?);
 androidHttpTransport.call(SOAP_ACTION, envelope);
 
 SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
 return resultsRequestSOAP.getProperty(0).toString();
 }
 }


 --
 OUTPUT

 --
  
 I am getting this kind of output, 


 ***
 anyType{schema=anyType
 {element=anyType{complexType=anyType
 {choice=anyType{element=anyType
 {complexType=anyType{sequence=anyType
 {element=anyType{}; element=anyType{}; element=anyType{}; }
 ; }; }; }; }; }; }; 
 diffgram=anyType{}; }

 ***
  

 But this is not a proper output, so what can i do ??

 --
  


 On Wednesday, 1 August 2012 19:12:53 UTC+5:30, RichardC wrote:

 Print the stream instead of trying to parse it, and look at it, I guess 
 @1:18 is line 1 position 18.


 On Wednesday, August 1, 2012 2:39:43 PM UTC+1, Rajan wrote:

 i am trying to get the response from the SOAP asmx web service but it 
 didn't give proper response


 ---
  
 here i putting my logcat entry
 -

 08-01 19:08:06.891: W/System.err(1994): 
 org.xmlpull.v1.XmlPullParserException: unterminated entity ref 
 (position:TEXT  ?  ? '
 ?...@1:18 in java.io.InputStreamReader@44e9c180) 

 08-01 19:08:06.891: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.exception(KXmlParser.java:273)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.error(KXmlParser.java:269)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.pushEntity(KXmlParser.java:787)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.pushText(KXmlParser.java:855)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.nextImpl(KXmlParser.java:354)
 08-01 19:08:06.901: W/System.err(1994): at 
 

[android-developers] Re: problem in SOAP - asmx web service

2012-08-01 Thread RichardC
Print the stream instead of trying to parse it, and look at it, I guess 
@1:18 is line 1 position 18.


On Wednesday, August 1, 2012 2:39:43 PM UTC+1, Rajan wrote:

 i am trying to get the response from the SOAP asmx web service but it 
 didn't give proper response


 ---
  
 here i putting my logcat entry
 -

 08-01 19:08:06.891: W/System.err(1994): 
 org.xmlpull.v1.XmlPullParserException: unterminated entity ref 
 (position:TEXT  ?  ? '
 ?...@1:18 in java.io.InputStreamReader@44e9c180) 

 08-01 19:08:06.891: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.exception(KXmlParser.java:273)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.error(KXmlParser.java:269)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.pushEntity(KXmlParser.java:787)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.pushText(KXmlParser.java:855)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.nextImpl(KXmlParser.java:354)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.next(KXmlParser.java:1385)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:1415)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:127)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.ksoap2.transport.Transport.parseResponse(Transport.java:100)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:214)
 08-01 19:08:06.901: W/System.err(1994): at 
 org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:96)
 08-01 19:08:06.911: W/System.err(1994): at 
 com.simform.soapparsing.MainActivity.onCreate(MainActivity.java:61)
 08-01 19:08:06.911: W/System.err(1994): at 
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

 ---

 i also use google for finding this problem but it gives me a rply like : 

 In your xml file there are some closing tag is missing.
 e.g item form 123 /item

 BUT

 my xml is ok and i also validate on W3C

 So, what can i do, i didn't understand 

 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] Re: Problem installing the ADT Plugin for Eclipse

2012-07-26 Thread Fred Queiroz
Fucking Firewall.

Em sexta-feira, 26 de agosto de 2011 11h48min42s UTC-3, ORIT VIDERMAN 
escreveu:

 I am trying to build an Android development environment on my PC. But 
 I'm encountering some problems, and desperately need help. 
 Operating System: Windows 7 (64 bit) 
 Installed components: 
 - Android SDK  (installer_r12-windows (from 
 http://developer.android.com/sdk/index.html) 
 - Eclipse Classic 3.7 for Windows 64 bit (from 
 http://www.eclipse.org/downloads/) 

 I am trying to install the ADT Plugin for Eclipse but I'm having some 
 trouble with it. 
 I tried following the instructions listed on the official site (http:// 
 developer.android.com/sdk/eclipse-adt.html) but without success. 
 I first tried setting the location for the new repository to 
 https://dl-ssl.google.com/android/eclipse/ as suggested, but I got the 
 following error message: 
 Unable to connect to repository 
 https://dl-ssl.google.com/android/eclipse/content.xml; 
 (I tried using http instead of https but got the same results). 
 When I submit this url in the location bar of my browser I get the 404 
 error. (The requested URL was not found ...) 
 I then tried as suggested to download the ADT Plugin zip file, and set 
 the location of the new repository to the local copy I downloaded. 
 But, this time I couldn't go through with the installation because of 
 the following problem: 
 Cannot complete the install because one or more required items could 
 not be found. 
 Software being installed: Android Development Tools 
 12.0.0.v201106281929-138431 (com.android.ide.eclipse.adt.feature.group 
 12.0.0.v201106281929-138431) 

 I tried installing a different version of Eclipse but had no success. 
 Can someone help? 


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

[android-developers] Re: Problem installing the ADT Plugin for Eclipse

2012-07-26 Thread Fred Queiroz
Mike Adams you're the man. I was search at several sites and nothing... You 
do not have notion of how much helped me. You will listening still talk 
about me.
Sorry for my bad English, but the important thing is to thank for your 
reply.
Very thank you, you saved to my life.

Em sexta-feira, 26 de agosto de 2011 11h48min42s UTC-3, ORIT VIDERMAN 
escreveu:

 I am trying to build an Android development environment on my PC. But 
 I'm encountering some problems, and desperately need help. 
 Operating System: Windows 7 (64 bit) 
 Installed components: 
 - Android SDK  (installer_r12-windows (from 
 http://developer.android.com/sdk/index.html) 
 - Eclipse Classic 3.7 for Windows 64 bit (from 
 http://www.eclipse.org/downloads/) 

 I am trying to install the ADT Plugin for Eclipse but I'm having some 
 trouble with it. 
 I tried following the instructions listed on the official site (http:// 
 developer.android.com/sdk/eclipse-adt.html) but without success. 
 I first tried setting the location for the new repository to 
 https://dl-ssl.google.com/android/eclipse/ as suggested, but I got the 
 following error message: 
 Unable to connect to repository 
 https://dl-ssl.google.com/android/eclipse/content.xml; 
 (I tried using http instead of https but got the same results). 
 When I submit this url in the location bar of my browser I get the 404 
 error. (The requested URL was not found ...) 
 I then tried as suggested to download the ADT Plugin zip file, and set 
 the location of the new repository to the local copy I downloaded. 
 But, this time I couldn't go through with the installation because of 
 the following problem: 
 Cannot complete the install because one or more required items could 
 not be found. 
 Software being installed: Android Development Tools 
 12.0.0.v201106281929-138431 (com.android.ide.eclipse.adt.feature.group 
 12.0.0.v201106281929-138431) 

 I tried installing a different version of Eclipse but had no success. 
 Can someone help? 


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

[android-developers] Re: problem with AlertDialog and power button

2012-07-26 Thread 曾祥鑫

hi,friend
you know Android's Activity lifecycle as following:

https://lh3.googleusercontent.com/-TZN_L7z9w3A/UA39seq4q3I/AB8/VGNbeMWsSwM/s1600/activity_lifecycle.png
you create the alertdialog in onResume, but when the dialog is showed , the 
activity will exectutes onPause(), and when you click the exit button ,the 
activity will exectute the onResume! So you have the problem!
 
On Tuesday, 24 July 2012 08:47:04 UTC+8, Brad Justice wrote:

 I am creating an AlertDialog in my activity onResume with the following 
 code:
 LayoutInflater li =  LayoutInflater.from(this) ;
 View view = li.inflate(R.layout.welcome,null);
 AlertDialog.Builder builder = new AlertDialog.Builder(this);
 builder.setTitle(Welcome to StreamHold);
 builder.setView(view);
 welcome = builder.create();
 welcome.show();   

 The dialog has an exit button. When clicked the following code executes in 
 the onClick listener:
 welcome.dismiss();
 and normally the dialog disappears. This fails, however, if while the 
 dialog box is displayed I press the power button to blank the display and 
 then press it a second time to restore. In this case, the dismiss fails. 
 Repeated pressing of the exit button will re-execute the dismiss(), but the 
 box remains visible and the exit button is still active. I have attempted 
 various workarounds: replacing dismiss() with cancel(); adding hide(); 
 requesting focus for the underlying window; various experiments with 
 invalidating the underlying layout and the layout of the dialog box.. None 
 of these have worked. If, however,  you tap the exposed portion of the 
 underlying window or press the back button the dialog box does disappear.

 Am I doing something wrong here, or is this a known issue?

 Thanks,

 Brad Justice

 I have reproduced this on a Nexus 7 running 4.1.1.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 getting id of a resource when using a Library project

2012-07-24 Thread Francisco M. Marzoa Alonso
I found a solution, but it is a bit weird and since I use a library for
not making repetitive changes on different versions of same game
(tipically free and pay versions), also a bit annoying.

In this context, net.iberdroid.mygamecore is the Library Project shared
by payment and free versions, and net.iberdroid.gamefree and
net.iberdroid.gamepro are the Android Projects for free and pay versions
of the game.

If I change the package name on the previous code by
net.iberdroid.gamefree it works fine. But the problem is that that
code is within the library, and will be used also by
net.iberdroid.gamepro, so putting the package name of the free version
will broken the pay one and viceversa.

So if I want to still share that code within the library, I will need to
get the package name of the project dinamically. So this will do the trick:

|public static int getDrawableId(String dname) {
String pn = context.getPackageName();
int resId = context.getResources().getIdentifier(dname, drawable, pn);
return resId;
}

|


On 24/07/12 12:53, Francisco M. Marzoa Alonso wrote:
 Hi there,

 I am facing problems getting the id of a resource by name when using a
 library project:

 int resId = context.getResources().getIdentifier(myresname,
 drawable, net.iberdroid.mygamecore);

 It seems like this always returns 0 when using the project as a library,
 but it were working flawlessly while it was an standalone project.

 net.iberdroid.mygamecore is where those resources resides, and in fact
 they are there.

 That code is even executed within the library project package, not from
 the android project that links it.

 Any ideas?


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

2012-07-23 Thread Steve White
Thanks frealek,

This worked for me on my Ubuntu 12.04 system.

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

2012-07-16 Thread Kurt Huwig
I've got the same problem with Linux since one of the last updates. It used 
to work before, but I cannot tell which update broke it.

Am Sonntag, 15. Juli 2012 19:20:31 UTC+2 schrieb jibeso:

 I have a Macbook Pro, I've just launched my device following your amazing 
 tutorial and tried to download an app following a video about how getting 
 apps on our android emulator with 4shared.com . I tried to download the 
 app called Kakaotalk but when trying to open it, it doesn't work (here's a 
 screenshot: http://i49.tinypic.com/szyeqr.png) as in there's no help 
 button I can click. Plus, I don't know why but when typing I have to use 
 the emulator keyboard because if I type through my pc keyboard it doesn't 
 work like it doesn't type anything. Screenshot: 
 http://i47.tinypic.com/24bvuav.png  As you can see I can only type 
 clicking with my pc's mouse on each letter of the keyboard on bottom left. 
 I'd be really grated if you might help me.. 

 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] Re: Problem with running an app on Android Emulator

2012-07-16 Thread Kurt Huwig
And I found the solution:

http://android.stackexchange.com/questions/2/how-can-i-use-my-pcs-keyboard-on-the-android-emulator

You have to edit the AVD and add a new Hardware setting Keyboard support 
= yes. Then it's working again.

Am Sonntag, 15. Juli 2012 19:20:31 UTC+2 schrieb jibeso:

 I have a Macbook Pro, I've just launched my device following your amazing 
 tutorial and tried to download an app following a video about how getting 
 apps on our android emulator with 4shared.com . I tried to download the 
 app called Kakaotalk but when trying to open it, it doesn't work (here's a 
 screenshot: http://i49.tinypic.com/szyeqr.png) as in there's no help 
 button I can click. Plus, I don't know why but when typing I have to use 
 the emulator keyboard because if I type through my pc keyboard it doesn't 
 work like it doesn't type anything. Screenshot: 
 http://i47.tinypic.com/24bvuav.png  As you can see I can only type 
 clicking with my pc's mouse on each letter of the keyboard on bottom left. 
 I'd be really grated if you might help me.. 

 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] Re: problem getting current EGL config

2012-07-15 Thread Latimerius
Never mind, after an hour more googling I found out that
eglQueryContext() is probably just another thing that's FUBAR in
Android EGL implementation.  It appears that it basically returns a
random config ID.


On Sun, Jul 15, 2012 at 4:04 PM, Latimerius l4t1m3r...@googlemail.com wrote:
 I'm using code to query the current EGL config similar to this:

 int [] curConfigId = new int [1];
 egl.eglQueryContext (curDisp, curCtxt, EGL11.EGL_CONFIG_ID, 
 curConfigId);

 EGLConfig [] cfgs = new EGLConfig [1];
 int [] numCfgs = new int [1];
 egl.eglChooseConfig (curDisp, new int [] { 
 EGL11.EGL_CONFIG_ID,
 curConfigId[0], EGL11.EGL_NONE }, cfgs, 1, numCfgs);

 It's hard to get detailed info on EGL but for all I know, this should
 work - except that it doesn't.  In particular, the EGLConfig this gets
 me has a 16bit depth buffer whereas actually there are no ancillary
 buffers attached to the current context or surface.

 In contrast, if I just run eglChooseConfig(), requesting the first
 config with RGB 565, I get the current config.

 (I can tell if I got the correct EGLConfig because I use it then to
 make a pbuffer which I subsequently eglMakeCurrent() with the current
 EGLContext.  This fails with EGL_BAD_MATCH (I think) if the config
 used to create the pbuffer was not compatible with the current
 context's config.)

 Am I messing up somewhere, or is this a bug in Android EGL implementation?

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

2012-07-14 Thread slow
yh just disable your firewall in the control panel and in your ANTI-VIRUS

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Problem optimizing views for having a fast scroll

2012-07-10 Thread 伟刘
hi steve, please help me, i already registered in the mailing list, but i
could not send mail to this group for i have never received the mail i sent
.

Could you help me on this? thanks

2012/7/10 Steve steveyzh...@gmail.com

 Thanks for Garreau and other

 There is a topic that I'm interested in. I also check why cacheColorHint
 interrupt the performance.
 #00 means transparent to background, so the View must blend to back
 gourd very frame. It's terrible for performance.

 Some reference for more information:

 http://stackoverflow.com/questions/8345677/getting-black-screen-while-scrolling-in-listview-in-android

 *
 *
 On Wednesday, July 4, 2012 11:20:19 PM UTC+8, jean-francois garreau wrote:

 I finally found the source of all my GC ! it comes from my activity xml
 layout... Indeed for my expandView, I use this :

   ExpandableListView
android:id=@+id/**resultListResult
android:layout_width=fill_**parent
android:layout_height=fill_**parent
android:cacheColorHint=#**
/

 And if I remove this : android:cacheColorHint=#**  the
 animation is very smooth !

 Thanks for your help


 Le mardi 3 juillet 2012 13:23:24 UTC+2, Kostya Vasilyev a écrit :

 A custom view, assuming it's at the root of your item layout, is just as
 good as a view holder.

 Here is what you can do:

 - Override onFinishInflate in your item layout root view
 - Call this.findViewById to find children
 - Store them as member variables
 - Access in the adapter's getView, like itemView.mText1, itemView.mText2
 -- rather than doing itemView.findViewById(...)

 -- K

 2012/7/3 jean-francois garreau 
 jean.francois.garreau@gmail.**comjean.francois.garr...@gmail.com
 

 I already saw that presentation and I can't use the ViewHolder pattern
 because i need a customView.

 So I'm looking for a way to optimize my CustomView because I don't know
 what I'm doing wrong with this view that causing thoses GC

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

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

[android-developers] Re: Problem with SQLite File

2012-07-10 Thread lbendlin
use standard Java functions. InutStream, OutputStream, read(buffer) and 
write(buffer), flush() and close()

On Tuesday, July 10, 2012 9:49:04 AM UTC-4, Seshu wrote:

 Hi All, 
 I have SQLite url i.e., https://sample.sqlite. I 
 downloaded the these sqlite file and these file was saved in 
 /data/data/+ myContext.getApplicationContext().getPackageName()+ / 
 files/ + DB_NAME; 

 but i want to change the files into database folder??? i.e., 
 /data/data/+ myContext.getApplicationContext().getPackageName()+ / 
 databases/ + DB_NAME;. How can i achieve these one?? 

 Thanks, 
 SatyaSeshu..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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 building android library project with multiple source directories using ant and r14

2012-07-10 Thread Yue
I think this is a bug and Android should fix it.
I encountered the same problem and wasted a lot of time to come up with a 
really lousy hack for it.

Please take a look at these lines in android-sdk/tools/ant/build.xml, which 
Android uses to instruct ant to build the project properly. These lines are 
specifically used for generating jars for library projects.

jar destfile=${out.library.jar.file}
fileset dir=${out.classes.absolute.dir}
includes=**/*.class

excludes=${project.app.package.path}/R.class 
${project.app.package.path}/R$*.class 
${project.app.package.path}/Manifest.class/${project.app.package.path}/Manifest$*.class
 
${project.app.package.path}/BuildConfig.class/
fileset dir=${source.absolute.dir} 
excludes=**/*.java ${android.package.excludes} /
/jar

This invocation of jar somehow cannot interpret the parameter fileset 
dir=${source.absolute.dir} correctly, where we intended to pass in 
multiple directories. For example, in your case, the whole string 
/Users/grantland/development/kiip/android-sdk/kiip/src;libs/apache/src/java;libs/signpost/signpost-core/src/main/java;libs/signpost/signpost-commonshttp4/src/main/java;libs/gchttprequest/src
 
is passed in as a source directory. What we really want is to pass multiple 
source directories. 

So here is what I did to fix it

jar destfile=${out.library.jar.file}
fileset dir=${out.classes.absolute.dir}
includes=**/*.class

excludes=${project.app.package.path}/R.class 
${project.app.package.path}/R$*.class 
${project.app.package.path}/Manifest.class/${project.app.package.path}/Manifest$*.class
 
${project.app.package.path}/BuildConfig.class/
fileset dir=${jarsource1.absolute.dir} 
excludes=**/*.java ${android.package.excludes} /
fileset dir=${jarsource2.absolute.dir} 
excludes=**/*.java ${android.package.excludes} /
fileset dir=${jarsource3.absolute.dir} 
excludes=**/*.java ${android.package.excludes} /
... ...
/jar

and I need to specify in my build.properties

jarsource1.absolute.dir=/Users/grantland/development/kiip/android-sdk/kiip/src
jarsource2.absolute.dir=libs/apache/src/java
... ...

Please let me know if there are better fixes.

Thank you,
Yue

On Thursday, October 27, 2011 8:53:27 PM UTC-4, Grantland wrote:

 I don't know if this is a bug or if i'm doing something wrong, but I 
 am unable to build my Android library with multiple source directories 
 using ant with ADK r14. 

 My ant.properties: 
 source.dir=src;libs/apache/src/java;libs/signpost/signpost-core/src/ 
 main/java;libs/signpost/signpost-commonshttp4/src/main/java;libs/ 
 gchttprequest/src 

 My build.xml is clean and created by android update project -p . 


 I run: 
 $ ant clean release 


 Crashlog: 
 ... 

 -compile: 
 [javac] /Developer/android-sdk/tools/ant/build.xml:600: warning: 
 'includeantruntime' was not set, defaulting to 
 build.sysclasspath=last; set to false for repeatable builds 
 [javac] Compiling 68 source files to /Users/grantland/development/ 
 kiip/android-sdk/kiip/bin/classes 
 [javac] Note: /Users/grantland/development/kiip/android-sdk/kiip/ 
 libs/signpost/signpost-core/src/main/java/oauth/signpost/ 
 AbstractOAuthProvider.java uses or overrides a deprecated API. 
 [javac] Note: Recompile with -Xlint:deprecation for details. 
  [echo] Creating library output jar file... 

 BUILD FAILED 
 /Developer/android-sdk/tools/ant/build.xml:580: The following error 
 occurred while executing this line: 
 /Developer/android-sdk/tools/ant/build.xml:620: /Users/grantland/ 
 development/kiip/android-sdk/kiip/src;libs/apache/src/java;libs/ 
 signpost/signpost-core/src/main/java;libs/signpost/signpost- 
 commonshttp4/src/main/java;libs/gchttprequest/src does not exist. 


 I've checked and all my source directories exist and the lines in the 
 main build.xml it crashes in is: 
 620:jar destfile=${out.library.jar.file} 
 621:fileset dir=${out.classes.absolute.dir} 
 excludes=**/R.class **/R$*.class/ 
 622:fileset dir=${source.absolute.dir} 
 excludes=**/*.java ${android.package.excludes} / 
 623:/jar 


 I'm pretty sure line 623 causes the crash since fileset is unable to 
 accept multiple directories. I can get around this by copying the 
 entire -compile target and commenting out line 622 and it works. 

 Am I doing something wrong, or is this a bug?

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

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-09 Thread Steve
Thanks for Garreau and other

There is a topic that I'm interested in. I also check why cacheColorHint 
interrupt the performance. 
#00 means transparent to background, so the View must blend to back 
gourd very frame. It's terrible for performance.

Some reference for more information:
http://stackoverflow.com/questions/8345677/getting-black-screen-while-scrolling-in-listview-in-android

*
*
On Wednesday, July 4, 2012 11:20:19 PM UTC+8, jean-francois garreau wrote:

 I finally found the source of all my GC ! it comes from my activity xml 
 layout... Indeed for my expandView, I use this : 

   ExpandableListView
android:id=@+id/resultListResult
android:layout_width=fill_parent
android:layout_height=fill_parent
android:cacheColorHint=# 
/

 And if I remove this : android:cacheColorHint=#  the animation 
 is very smooth !

 Thanks for your help


 Le mardi 3 juillet 2012 13:23:24 UTC+2, Kostya Vasilyev a écrit :

 A custom view, assuming it's at the root of your item layout, is just as 
 good as a view holder.

 Here is what you can do:

 - Override onFinishInflate in your item layout root view
 - Call this.findViewById to find children
 - Store them as member variables
 - Access in the adapter's getView, like itemView.mText1, itemView.mText2 
 -- rather than doing itemView.findViewById(...)

 -- K

 2012/7/3 jean-francois garreau jean.francois.garr...@gmail.com

 I already saw that presentation and I can't use the ViewHolder pattern 
 because i need a customView. 

 So I'm looking for a way to optimize my CustomView because I don't know 
 what I'm doing wrong with this view that causing thoses GC



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Problem optimizing views for having a fast scroll

2012-07-04 Thread jean-francois garreau
I finally found the source of all my GC ! it comes from my activity xml 
layout... Indeed for my expandView, I use this : 

  ExpandableListView
   android:id=@+id/resultListResult
   android:layout_width=fill_parent
   android:layout_height=fill_parent
   android:cacheColorHint=# 
   /

And if I remove this : android:cacheColorHint=#  the animation is 
very smooth !

Thanks for your help
   

Le mardi 3 juillet 2012 13:23:24 UTC+2, Kostya Vasilyev a écrit :

 A custom view, assuming it's at the root of your item layout, is just as 
 good as a view holder.

 Here is what you can do:

 - Override onFinishInflate in your item layout root view
 - Call this.findViewById to find children
 - Store them as member variables
 - Access in the adapter's getView, like itemView.mText1, itemView.mText2 
 -- rather than doing itemView.findViewById(...)

 -- K

 2012/7/3 jean-francois garreau jean.francois.garr...@gmail.com

 I already saw that presentation and I can't use the ViewHolder pattern 
 because i need a customView. 

 So I'm looking for a way to optimize my CustomView because I don't know 
 what I'm doing wrong with this view that causing thoses GC



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Problem optimizing views for having a fast scroll

2012-07-03 Thread jean-francois garreau
I already saw that presentation and I can't use the ViewHolder pattern 
because i need a customView. 

So I'm looking for a way to optimize my CustomView because I don't know 
what I'm doing wrong with this view that causing thoses GC

Le lundi 2 juillet 2012 18:11:32 UTC+2, Daniel Drozdzewski a écrit :

 On 2 July 2012 12:20, jean-francois garreau 
 jean.francois.garr...@gmail.com wrote:

 little Up beacause not fixed

 Le jeudi 28 juin 2012 16:12:35 UTC+2, jean-francois garreau a écrit :

 The problem is : as I'm creating my custom view heriting from View, I 
 don't have any findById so the pattent viewHolder won't be useFull for me :(

 And I'm already implemnting it with the view recycling view system. 
 Indeed, in my View I use some Paint elements that I keep in the instance of 
 my view.


 You have to refactor your code, so that you use all suggested 
 optimisations out there, but HolderPattern is a must. Recycling view 
 objects is build into the ListView, so use it, or be slow. Creating new 
 view object per item is going to hurt.

 Just read some articles, watch Romain Guy talks from Google IO and see 
 where you have gone wrong.
 http://www.youtube.com/watch?v=N6YdwzAvwOA 
 http://www.vogella.com/articles/AndroidListView/article.html 

 Daniel




  

 Le jeudi 28 juin 2012 15:58:53 UTC+2, MagouyaWare a écrit :

 Nope... 
 http://lmgtfy.com/?q=android+**viewholder+patternhttp://lmgtfy.com/?q=android+viewholder+pattern

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


 On Thu, Jun 28, 2012 at 7:50 AM, jean-francois garreau 
 jean.francois.garreau@gmail.**com jean.francois.garr...@gmail.comwrote:

 You mean  : 



 public View getChildView(int groupPosition, int childPosition, boolean 
 isLastChild, View convertView, ViewGroup parent) {






   ObjectSubViewNew subView = null;



   if (convertView == null) {


   subView = new ObjectSubViewNew(mainContext, kmUnit);


   } else {


   subView = (ObjectSubViewNew) convertView;


   }


  
 }



 ?


 Le jeudi 28 juin 2012 14:27:14 UTC+2, jean-francois garreau a écrit :

 Hi everyone, 

 I have a problem for optimzing my application. More particulary, an 
 ExpandListView. I found the scroll animation pretty slow compare to what 
 I 
 can see on other application. I have done severals optimizations yet but 
 now I'm faced to a lack of idea for have a fluent scroll...

 What have done : 

1. First i start to create CustomView inherting from View
2. I saw that in log I have lots of GC 
3. I have use allocationTracket in DDMS in order to see what are 
the object created who could cause my GC
4. I identify lots of instanciations of String so I've modify my 
model in order to carry all the string i need in order to avoid new 
creations of String 
5. I also try to write a reusable object corresponding to a 
drawable instruction in order to skim throught all instruction during 
 the 
draw method


 In order to gives you all information for helping me with my code, 
 here is a litle piece of functionnal.

 My app is an application which gives you the movies showtimes near 
 your position. The expand list show thoses informations :

  *Name Cinema :   [Image]
 *
  distance  
 ----
 --
 *Movie Name 1 :* time
 passed time 1 | passed time 2 | *nearest time* | 
 futur time 1 | futur time 2 
 --
 ---
 *Movie Name 2 :* time
 passed time 1 | passed time 2 | *nearest time* | 
 futur time 1 | futur time 2 
 --
 ---


 etc.

 As you can see, on each movie I list all showtimes for the cinema and 
 I have a diferent display according to the current time

 In term of Model Object, I have this structure in my adapter : 

 ArrayListTheaterBean theaterList; // The list of my cinema
 HashMapString, Movie mapMovie; // An hashmap which gives me the 
 movie corresponding to an id


 The problem I'm facing now is that when i look at the log, I still 
 have lots of GC... and when i looked to the allocationTracker i see that 
 :

 In first position comes android.graphic.Bitmap from method 
 nativeCreate and it's corresponding stack is : 

 android.graphics.Bitmap nativeCreate Bitmap.java -2 true 
 android.graphics.Bitmap createBitmap Bitmap.java 477 false 
 android.view.View buildDrawingCache View.java 6599 false 
 android.view.View getDrawingCache View.java 6450 false 
 android.view.ViewGroup drawChild ViewGroup.java 1571 false 
 android.view.ViewGroup dispatchDraw 

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau
jean.francois.garr...@gmail.com wrote:
 I already saw that presentation and I can't use the ViewHolder pattern
 because i need a customView.

That makes absolutely no sense whatsoever.

- TextView inherits from View
- ImageView inherits from View
- CheckableTextView inherits from View
- your custom View subclass inherits from View

And:

- TextView works just fine with the ViewHolder pattern
- ImageView works just fine with the ViewHolder pattern
- CheckableTextView works just fine with the ViewHolder pattern

Hence, I am fairly comfortable that for any well-written custom View
subclass, the ViewHolder pattern can apply. There should be nothing
magic about  your particular subclass of View compared to any other.

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

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

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


Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Kostya Vasilyev
A custom view, assuming it's at the root of your item layout, is just as
good as a view holder.

Here is what you can do:

- Override onFinishInflate in your item layout root view
- Call this.findViewById to find children
- Store them as member variables
- Access in the adapter's getView, like itemView.mText1, itemView.mText2 --
rather than doing itemView.findViewById(...)

-- K

2012/7/3 jean-francois garreau jean.francois.garr...@gmail.com

 I already saw that presentation and I can't use the ViewHolder pattern
 because i need a customView.

 So I'm looking for a way to optimize my CustomView because I don't know
 what I'm doing wrong with this view that causing thoses GC



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: Problem optimizing views for having a fast scroll

2012-07-03 Thread jean-francois garreau
Ok so can you please explain me how to do a view like this : 

--
*NameMovie*
1h20min
11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm
-

--
Text(in bold)
SubText(in gray)
Text1 (in gray) Text2 (in gray) Text3 (in bold) Text4 (normal)
-

I won't use viewHolder because my CustomView doesn't inherites from 
LinearLayout, I don't any xml file. I'm using a class that inherites from 
View.

Considerating that I don't know in advance how many Texts in gra, same 
thing for Text in bold and Text normal. AND I have to take care to cariage 
returns .

I first use this model : 

LinearLayout
  align:'vertical'

TextView id=movieName/
TextView id=timeMovie/
TextView id=showtimes/
/LinearLayout

And with the view holder pattern it works but I have low performance for 
the generation of the string : 11:00am | 2:00pm | *4:00pm* | 8:00pm | 
10:00pm because I need to use a HTML paint

So after talking with lots of people I decided to write my own View 
inheriting from View. The problem is : according to time of day, the view 
will show : 
11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm 
and after 11:00am | 2:00pm | 4:00pm | *8:00pm* | 10:00pm
etc.

And according to the couple movie / cinema, I don't have the same number of 
showtimes so I can't say that I will use 4 textView for the showtimes 
because it will be wrong for the next movie to print.

Or maybe I don't have understand how to use the ViewHolderPattern...
In my Adapter, I directly use the viewObjects. How can i use the 
viewHolderPattern if my view inherites from view and don't have any view 
element in it ?

regards


Le mardi 3 juillet 2012 13:20:55 UTC+2, Mark Murphy (a Commons Guy) a 
écrit :

 On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau 
 jean.francois.garr...@gmail.com wrote: 
  I already saw that presentation and I can't use the ViewHolder pattern 
  because i need a customView. 

 That makes absolutely no sense whatsoever. 

 - TextView inherits from View 
 - ImageView inherits from View 
 - CheckableTextView inherits from View 
 - your custom View subclass inherits from View 

 And: 

 - TextView works just fine with the ViewHolder pattern 
 - ImageView works just fine with the ViewHolder pattern 
 - CheckableTextView works just fine with the ViewHolder pattern 

 Hence, I am fairly comfortable that for any well-written custom View 
 subclass, the ViewHolder pattern can apply. There should be nothing 
 magic about  your particular subclass of View compared to any other. 

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

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


Le mardi 3 juillet 2012 13:20:55 UTC+2, Mark Murphy (a Commons Guy) a 
écrit :

 On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau 
 jean.francois.garr...@gmail.com wrote: 
  I already saw that presentation and I can't use the ViewHolder pattern 
  because i need a customView. 

 That makes absolutely no sense whatsoever. 

 - TextView inherits from View 
 - ImageView inherits from View 
 - CheckableTextView inherits from View 
 - your custom View subclass inherits from View 

 And: 

 - TextView works just fine with the ViewHolder pattern 
 - ImageView works just fine with the ViewHolder pattern 
 - CheckableTextView works just fine with the ViewHolder pattern 

 Hence, I am fairly comfortable that for any well-written custom View 
 subclass, the ViewHolder pattern can apply. There should be nothing 
 magic about  your particular subclass of View compared to any other. 

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

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


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

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 7:48 AM, jean-francois garreau
jean.francois.garr...@gmail.com wrote:
 Ok so can you please explain me how to do a view like this :

 --
 NameMovie
 1h20min
 11:00am | 2:00pm | 4:00pm | 8:00pm | 10:00pm
 -

That is a single TextView, assuming your lines of dashes are supposed
to be the ListView row divider lines (and therefore are not part of
your actual row). Use SpannableStringBuilder, along with
ForegroundColorSpan and StyleSpan, to handle the color changes and
weight (bold vs. not) changes.

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

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

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


Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Daniel Drozdzewski
On 3 July 2012 12:48, jean-francois garreau jean.francois.garr...@gmail.com
 wrote:

 Ok so can you please explain me how to do a view like this :

 --
 *NameMovie*
 1h20min
 11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm
 -

 --
 Text(in bold)
 SubText(in gray)
 Text1 (in gray) Text2 (in gray) Text3 (in bold) Text4 (normal)
 -

 I won't use viewHolder because my CustomView doesn't inherites from
 LinearLayout, I don't any xml file. I'm using a class that inherites from
 View.


Your class inherits from View, therefore it has View.setTag() and
View.getTag(), to hold on to children Views within each list item. Each
list item has all those sub-views, but each of sub-views has a different
atributes (text, text color, ...) set durring each ListAdapter.getView().
This means that your convertView reference passed into getView will have
Tag object set with all your sub-views ready to be customised for the given
list element.


 Considerating that I don't know in advance how many Texts in gra, same
 thing for Text in bold and Text normal. AND I have to take care to cariage
 returns .


See Mark's comment. If you can get away with one View. If however each of
those times is clickable, then just set max number of TextViews in each
list element, as simply removing unused ones by calling
setVisibility(INVISIBLE) on each one.





 I first use this model :

 LinearLayout
   align:'vertical'
 
 TextView id=movieName/
 TextView id=timeMovie/
 TextView id=showtimes/
 /LinearLayout

 And with the view holder pattern it works but I have low performance for
 the generation of the string : 11:00am | 2:00pm | *4:00pm* | 8:00pm |
 10:00pm because I need to use a HTML paint

 So after talking with lots of people I decided to write my own View
 inheriting from View. The problem is : according to time of day, the view
 will show :
 11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm
 and after 11:00am | 2:00pm | 4:00pm | *8:00pm* | 10:00pm
 etc.

 And according to the couple movie / cinema, I don't have the same number
 of showtimes so I can't say that I will use 4 textView for the showtimes
 because it will be wrong for the next movie to print.

 Or maybe I don't have understand how to use the ViewHolderPattern...
 In my Adapter, I directly use the viewObjects. How can i use the
 viewHolderPattern if my view inherites from view and don't have any view
 element in it ?

 regards


 Le mardi 3 juillet 2012 13:20:55 UTC+2, Mark Murphy (a Commons Guy) a
 écrit :

 On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau
 jean.francois.garreau@gmail.**com jean.francois.garr...@gmail.com
 wrote:
  I already saw that presentation and I can't use the ViewHolder pattern
  because i need a customView.

 That makes absolutely no sense whatsoever.

 - TextView inherits from View
 - ImageView inherits from View
 - CheckableTextView inherits from View
 - your custom View subclass inherits from View

 And:

 - TextView works just fine with the ViewHolder pattern
 - ImageView works just fine with the ViewHolder pattern
 - CheckableTextView works just fine with the ViewHolder pattern

 Hence, I am fairly comfortable that for any well-written custom View
 subclass, the ViewHolder pattern can apply. There should be nothing
 magic about  your particular subclass of View compared to any other.

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

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


 Le mardi 3 juillet 2012 13:20:55 UTC+2, Mark Murphy (a Commons Guy) a
 écrit :

 On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau
 jean.francois.garreau@gmail.**com jean.francois.garr...@gmail.com
 wrote:
  I already saw that presentation and I can't use the ViewHolder pattern
  because i need a customView.

 That makes absolutely no sense whatsoever.

 - TextView inherits from View
 - ImageView inherits from View
 - CheckableTextView inherits from View
 - your custom View subclass inherits from View

 And:

 - TextView works just fine with the ViewHolder pattern
 - ImageView works just fine with the ViewHolder pattern
 - CheckableTextView works just fine with the ViewHolder pattern

 Hence, I am fairly comfortable that for any well-written custom View
 subclass, the ViewHolder pattern can apply. There should be nothing
 magic about  your particular subclass of View compared to any other.

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 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
 

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread jean-francois garreau
Ok I will try that thanks !

But I think the problem is somewhere else  because, I comment all the code 
of my adapter in order to return static string for fix number of child and 
group items and I still have lots of GC So the problem maybe doesn't 
comes finally from my CustomView

I will look deeper into that direction and after, i will look at your 
advice with SpannableStringBuilder

regards

Le mardi 3 juillet 2012 14:24:38 UTC+2, Mark Murphy (a Commons Guy) a 
écrit :

 On Tue, Jul 3, 2012 at 7:48 AM, jean-francois garreau 
 jean.francois.garr...@gmail.com wrote: 
  Ok so can you please explain me how to do a view like this : 
  
  -- 
  NameMovie 
  1h20min 
  11:00am | 2:00pm | 4:00pm | 8:00pm | 10:00pm 
  - 

 That is a single TextView, assuming your lines of dashes are supposed 
 to be the ListView row divider lines (and therefore are not part of 
 your actual row). Use SpannableStringBuilder, along with 
 ForegroundColorSpan and StyleSpan, to handle the color changes and 
 weight (bold vs. not) changes. 

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 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

  1   2   3   4   5   6   7   8   9   10   >