[android-developers] hi bud

2015-11-28 Thread leigh8347 via Android Developers
Interesting news
http://www.mobile-application-developers.net/sphtalrk/sulukuxu.php?def=1697+idconn=poqjra+statoavanzamid=268577


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


[android-developers] spliting srings

2012-03-02 Thread leigh8347
Hello

sorry for the simple and i guess basic question but how would i get
some lines ot text saved in a .txt file on a sd card.

then split the line and display word 1 and word 3. the words are
separated by commas.

i have spent a good few hours looking through google for the answer
but have not come up with any code that works.

i can read a file and display it
and i can split a string

but i cant seem to merge these two parts and get it to work

regards

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

2011-11-02 Thread leigh8347
The peice of code im using to disply the date and time is as follows

datetime.toString()

but like i said this does not update
regards


On Nov 2, 12:02 am, Lew lewbl...@gmail.com wrote:
 leigh8347 wrote:

  im [sic] making an app that writes to a .txt file and at the end of each
  save i want to put the date and time.

  this is my code that turns the time/date into a string. which works
  fine.

  SimpleDateFormat dateFormat = new SimpleDateFormat(dd/MM/
  hh:mm:ss);
  java.util.Date date = new java.util.Date();
  final String datetime = dateFormat.format(date);

  The problem im [sic] having is every time i save the time does not update.
  each row has the same time and date?

 Sounds like you are using the same 'datetime' reference for each save,
 perhaps by doing the save at the end of a longer process?

 It's impossible to say since the problem is in the code you have not shown.

 http://sscce.org/
 please

 --
 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: date and time

2011-11-02 Thread leigh8347
Thank you but this did not work. Any other ideas

regards

On Nov 2, 11:04 am, Robert Slama robsl...@gmail.com wrote:
 try add follow line before format to string :
 date.setTime(System.currentTimeMillis());

 r^

 On 2 November 2011 10:44, leigh8347 leigh8...@aol.com wrote:







  The peice of code im using to disply the date and time is as follows

  datetime.toString()

  but like i said this does not update
  regards

  On Nov 2, 12:02 am, Lew lewbl...@gmail.com wrote:
   leigh8347 wrote:

im [sic] making an app that writes to a .txt file and at the end of
  each
save i want to put the date and time.

this is my code that turns the time/date into a string. which works
fine.

SimpleDateFormat dateFormat = new SimpleDateFormat(dd/MM/
hh:mm:ss);
java.util.Date date = new java.util.Date();
final String datetime = dateFormat.format(date);

The problem im [sic] having is every time i save the time does not
  update.
each row has the same time and date?

   Sounds like you are using the same 'datetime' reference for each save,
   perhaps by doing the save at the end of a longer process?

   It's impossible to say since the problem is in the code you have not
  shown.

  http://sscce.org/
   please

   --
   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 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: date and time

2011-11-02 Thread leigh8347
well

here is the code for file update but this seems to work fine.

public void onClick(View v) {
try {
BufferedWriter out = new BufferedWriter(new 
FileWriter(/sdcard/
data_file.txt, true));
out.write(A + txtData.getText() + , + P +
txtData2.getText() + , + datetime.toString());
out.write(\r\n);
out.close();

Toast.makeText(getBaseContext(),Saved,Toast.LENGTH_SHORT).show();
} catch (Exception e) {
Toast.makeText(getBaseContext(), e.getMessage(),
Toast.LENGTH_SHORT).show();
}

txtData.setText();
txtData2.setText();

}



On Nov 2, 7:22 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 The date / time conversion variations you posted all seem Ok.

 If the issue is with how you update the file, look for a bug there, not
 in date formatting.

 -- Kostya

 02.11.2011 22:59, leigh8347 пишет:

  Thank you but this did not work. Any other ideas

  regards

 --
 Kostya Vasilyev

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

2011-11-02 Thread leigh8347
I will look into that

Thank you for your help so far, might need to come back if i cant
figure it out.

regards


On Nov 2, 7:48 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 In this snippet, you're not re-initializing datetime to the current
 time, so it's going to keep the same value you assigned to it earlier
 (in onCreate?), no matter how many times you click the button.

 Oh, and rather than getBaseContext(), use your activity
 class.class or v.getContext().

 -- Kostya

 02.11.2011 23:39, leigh8347 пишет:









  well

  here is the code for file update but this seems to work fine.

  public void onClick(View v) {
             try {
                 BufferedWriter out = new BufferedWriter(new 
  FileWriter(/sdcard/
  data_file.txt, true));
                 out.write(A + txtData.getText() + , + P +
  txtData2.getText() + , + datetime.toString());
                 out.write(\r\n);
                 out.close();

  Toast.makeText(getBaseContext(),   Saved,Toast.LENGTH_SHORT).show();
             } catch (Exception e) {
                     Toast.makeText(getBaseContext(), e.getMessage(),
                                     Toast.LENGTH_SHORT).show();
             }

                     txtData.setText();
                     txtData2.setText();

     }

  On Nov 2, 7:22 pm, Kostya Vasilyevkmans...@gmail.com  wrote:
  The date / time conversion variations you posted all seem Ok.

  If the issue is with how you update the file, look for a bug there, not
  in date formatting.

  -- Kostya

  02.11.2011 22:59, leigh8347 пишет:

  Thank you but this did not work. Any other ideas
  regards
  --
  Kostya Vasilyev

 --
 Kostya Vasilyev

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


[android-developers] date and time

2011-11-01 Thread leigh8347
hello

im making an app that writes to a .txt file and at the end of each
save i want to put the date and time.

this is my code that turns the time/date into a string. which works
fine.

SimpleDateFormat dateFormat = new SimpleDateFormat(dd/MM/
hh:mm:ss);
java.util.Date date = new java.util.Date();
final String datetime = dateFormat.format(date);

The problem im having is every time i save the time does not update.
each row has the same time and date?

can anybody help?

regards

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

2011-10-30 Thread leigh8347
hello

can anyone help?

on my app im trying to do the following - Save 2 user inputs to a .txt
file and save it, then be able to enter 2 more inputs and save again
and repeat many times.

so far my code creates a file, writes the first 2 inputs and saves.
but when i try saving another 2 it just replaces the first. im quite
confused.

here is what i have

txtData = (EditText) findViewById(R.id.input1);
txtData2 = (EditText) findViewById(R.id.input2);

btnWriteSDFile = (Button) findViewById(R.id.save);
btnWriteSDFile.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
// write on SD card file data in the text box
try {
File myFile = new 
File(Environment.getExternalStorageDirectory(),
parkrun_barcode.txt);
myFile.createNewFile();
FileOutputStream fOut = new FileOutputStream(myFile);
OutputStreamWriter myOutWriter = new 
OutputStreamWriter(fOut);

myOutWriter.append(txtData.getText() + ,  + 
txtData2.getText());
myOutWriter.close();
fOut.close();
Toast.makeText(getBaseContext(),
Saved',
Toast.LENGTH_SHORT).show();
} catch (Exception e) {
Toast.makeText(getBaseContext(), e.getMessage(),
Toast.LENGTH_SHORT).show();
}

txtData.setText();
txtData2.setText();


}
});

}

}

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

2011-10-05 Thread leigh8347
Well that is the problem. I cant seem to fine any info on how to do
it. I can fine bit and bobs. But when tryed to put together nothing
works.

Any ideas?

On Oct 5, 12:00 am, TreKing treking...@gmail.com wrote:
 On Tue, Oct 4, 2011 at 4:36 PM, leigh8347 leigh8...@aol.com wrote:
  any help would be great

 Help with what? You explained what you're trying to do but not what problem
 you're having.

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

2011-10-04 Thread leigh8347
hello

Is there anyone out there that can help me?

i have been look for info on the fileWriter. i am trying to write a
piece of code that will create a .txt file on the opening of a
activity.
Write input from 2 textboxes + date and time. (eg. input1,input2,
04/10/2011 09:37:36)   then save on the click of a button.

i need this action to be repeated untill the task is done.

any help would be great

many 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] barcode scanner not launching

2011-09-30 Thread leigh8347
im having a little trouble with my app

i want the barcode scanner to open on the click of a button(scan1),
scan barcode, and return details to a edittext (barcode1).

here is what i have so far..

package com.android.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Scanner extends Activity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.scanner);}

public Button.OnClickListener scan1 = new
Button.OnClickListener() {
public void onClick(View v) {
Intent intent = new
Intent(com.google.zxing.client.android.SCAN);
intent.setPackage(com.google.zxing.client.android);
intent.putExtra(SCAN_MODE, PRODUCT_MODE);
startActivityForResult(intent, 0);
}
};

public void onActivityResult(int requestCode, int resultCode,
Intent intent) {
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
String contents =
intent.getStringExtra(SCAN_RESULT);
// Handle successful scan
EditText editComment =
(EditText)findViewById(R.id.barcode1);
editComment.setText(contents);
} else if (resultCode == RESULT_CANCELED) {
// Handle cancel
}
}
}

}


this is my manifest entry..

activity android:name=.Scanner 
android:label=@string/app_name 
intent-filter
action android:name=com.google.zxing.client.android.SCAN/
category android:name=android.intent.category.DEFAULT/
  /intent-filter
/activity


any help would be great

many 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] excel file in android

2011-09-27 Thread leigh8347
Is it possible to create a last view form an excel file?
Or any ideas how it is done

many 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] barcode scanner - displaying info

2011-09-26 Thread leigh8347
hello

im having a bit of trouble displaying the results of a bar code scan
in a EditText box please can you help

here is what i have

package com.android.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;


public class Scanner extends Activity {


EditText barcode1;



/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.scanner);}


public Button.OnClickListener scan1 = new
Button.OnClickListener() {
public void onClick(View v) {
Intent intent = new
Intent(com.google.zxing.client.android.SCAN);

intent.putExtra(com.google.zxing.client.android.SCAN.SCAN_MODE,
ONE_D_MODE);
startActivityForResult(intent, 0);
}
};


public void onActivityResult(int requestCode, int resultCode,
Intent intent) {
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
String contents  =
intent.getStringExtra(SCAN_RESULT);
String format =
intent.getStringExtra(SCAN_RESULT_FORMAT);
// Handle successful scan
} else if (resultCode == RESULT_CANCELED) {
// Handle cancel


barcode1.setText(getString(contents));
}
}
}



}

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

2011-09-20 Thread leigh8347
Hi,

I have had a look through it and im still really confused. Please can
you shed any light on it or know of any tutorials

mant thanks

On Sep 20, 2:50 am, Nick Risaro nris...@gmail.com wrote:
 Read 
 thishttp://download.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html(or a
 newer version) and try to implement the formula. If you have any problem
 come back.
 On Sep 19, 2011 9:42 PM, leigh8347 leigh8...@aol.com wrote:



  I am currently working on an app that takes 4 user input values and
  puts them through the following equation and gives an answer. The only
  thing is that it wont work.

  the equation is as follows.

  answer = max { round ( (value1 / 10.9375)+(value2 / 9.2105)+(value3 /
  3.889)-(value4 / 12.5) ) ,0 }

  so far i have the following

  package com.android.app;

  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;

  public class Equation extends Activity {

  Button submit;
  EditText val1,val2,val3,val4r;
  TextView answer;

  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  /* First Tab Content */
  setContentView(R.layout.equation);

  val1 = (EditText) findViewById(R.id.value1);
  val2 = (EditText) findViewById(R.id.value2);
  val3 = (EditText) findViewById(R.id.value3);
  val4 = (EditText) findViewById(R.id.value4);
  submit = (Button) findViewById(R.id.submit);
  answer = (TextView) findViewById(R.id.answer);
  submit.setOnClickListener(new clicker());
  }
  class clicker implements Button.OnClickListener
  {

  public void onClick(View v)
  {
  String a,b,c,d;
  Integer Int;
  a = val1.getText().toString();
  b = val2.getText().toString();
  c = val3.getText().toString();
  d = val4.getText().toString();
  Int = max { round ( (a / 10.9375)+(b / 9.2105)+(c / 3.889)-
  (d / 12.5) ) ,0 }

  points.setText(Int.toString());
  }
  }
  }

  so... thats what i have, can you 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

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

2011-09-19 Thread leigh8347
I am currently working on an app that takes 4 user input values and
puts them through the following equation and gives an answer. The only
thing is that it wont work.

the equation is as follows.

answer = max { round ( (value1 / 10.9375)+(value2 / 9.2105)+(value3 /
3.889)-(value4 / 12.5) ) ,0 }

so far i have the following


package com.android.app;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Equation extends Activity {

Button  submit;
EditText val1,val2,val3,val4r;
TextView answer;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

/* First Tab Content */
setContentView(R.layout.equation);

val1 = (EditText) findViewById(R.id.value1);
val2 = (EditText) findViewById(R.id.value2);
val3 = (EditText) findViewById(R.id.value3);
val4 = (EditText) findViewById(R.id.value4);
submit = (Button) findViewById(R.id.submit);
answer = (TextView) findViewById(R.id.answer);
submit.setOnClickListener(new clicker());
 }
 class  clicker implements Button.OnClickListener
 {

 public void onClick(View v)
{
 String a,b,c,d;
 Integer Int;
 a = val1.getText().toString();
 b = val2.getText().toString();
 c = val3.getText().toString();
 d = val4.getText().toString();
 Int =  max { round ( (a / 10.9375)+(b / 9.2105)+(c / 
3.889)-
(d / 12.5) ) ,0 }

 points.setText(Int.toString());
}
 }
}


so... thats what i have, can you 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