https://developer.an...ing/studio.html
![]()
Ma c'è qui qualcuno che programma per android ?
Oggi ho fatto la mia prima successful "hello world"
Posted 26 August 2014 - 12:57
https://developer.an...ing/studio.html
![]()
Ma c'è qui qualcuno che programma per android ?
Oggi ho fatto la mia prima successful "hello world"
Posted 26 August 2014 - 13:04
io, ma sono fermo alla 4.3 quindi non so roba nuova tipo android L
Posted 26 August 2014 - 13:14
Cosa usi ? eclipse ? android studio ?
Posted 26 August 2014 - 13:25
eclipse, android studio è stato presentato poco tempo fa e manca di tutto il supporto che ha eclipse.
per fortuna si so decisi a farsi un'ide tutta loro.
spero soprattuto l'emulatore sia stato perfezionato perche faceva veramente cagare.
Posted 26 August 2014 - 13:42
Quindi se ho domande chiedo a te.
Oddio, android è linux quindi non so quanto mi convenga ![]()
Posted 26 August 2014 - 13:45
si possono fare gui sugli android ? ![]()
Posted 26 August 2014 - 13:46
solo gui su android ![]()
comunque piu che linux android è java. A meno che non devi fare robe parecchio a basso livello.
Posted 26 August 2014 - 13:48
le cose importanti da sapere sono:
activity, indent, thread, servizi e quel fottuto manifest.
Posted 26 August 2014 - 13:49
la cosa bella è che cambierà un bel pezzo con android L, curioso di vedere cosa fare se devi mantenere un app per 4.x e per L.
Posted 26 August 2014 - 13:49
Si infatti mi stavo informando su come usare c++ ma poi ho visto che ci metto meno ad usare java, tanto non mi servono prestazioni.
Insomma, non devo fare un task manager a linea di comando.
Posted 26 August 2014 - 13:50
le cose importanti da sapere sono:
activity, indent, thread, servizi e quel fottuto manifest.
Activity e manifest li ho già scoperti, indent cos'è ?
Posted 26 August 2014 - 14:01
ho toppato volevo dire intent. non indent.
http://developer.and...ent/Intent.html
http://www.html.it/p...-azioni-intent/
Edited by Killer application, 26 August 2014 - 14:01.
Posted 26 August 2014 - 14:39
FIRMA FOTTUTAMENTE EDITATA. IL FOTTUTO STAFF.
Mai più giorni felici
Posted 26 August 2014 - 16:35
Usare il fortran vi pare brutto?
Posted 26 August 2014 - 16:39
Posted 26 August 2014 - 16:39
se cominci adesso imho ti conviene usare android studio
Sono un aflabeto
⎝o͜ﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞﱞo⎠
Posted 30 August 2014 - 20:32
Sarebbe più da 3d java ma scrivo qui.
Sto cercando di scaricare un pdf da dropbox e visualizzarlo su una mia test app android.
Visualizzarlo no problem (se lo carico direttamente dalla sdcard) ma scaricarlo non ci riesce.
Cioè, scarica ma la dimensione è sbagliata e l'errore dice che "it might not be a pdf".
Uso un HttpsURLConnection perchè dropbox usa https ma anche un HttpURLConnection si comporta allo stesso modo.
Cosa sbaglio ?
fileURL= "https://www.dropbox....cplluj/spir.pdf"
protected Object doInBackground(Object... params)
{
{
try
{
URL u = new URL(fileURL);
HttpsURLConnection c = (HttpsURLConnection) u.openConnection();
//HttpURLConnection c = (HttpURLConnection) u.openConnection();
c.setRequestMethod("GET");
c.setDoOutput(false);
c.connect();
InputStream in;
int status = c.getResponseCode();
if (status >= org.apache.http.HttpStatus.SC_BAD_REQUEST)
{
in = c.getErrorStream();
return null;
}
else //file input is from the url
{
in = c.getInputStream();
}
//lenghtOfFile is used for calculating download progress
int lenghtOfFile = c.getContentLength();
File dir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath() + "/testAndroid/");
if (!(dir.exists() && dir.isDirectory()))
{
dir.mkdirs();
}
File file = new File(dir, fileName);
file.createNewFile(); //CREATE THE FILE FIRST!
//this is where the file will be seen after the download
FileOutputStream f = new FileOutputStream(file);
//here’s the download code
byte[] buffer = new byte[1024];
int len1 = 0;
long total = 0;
String s = in.toString();
while ((len1 = in.read(buffer)) > 0)
{
total += len1;
publishProgress("" + (int)((total*100)/lenghtOfFile));
f.write(buffer, 0, len1);
}
f.close();
intent.putExtra(PdfViewerActivity.EXTRA_PDFFILENAME, dir + "/" + fileName );
if (intent != null)
{
startActivity(intent);
}
}
catch (Exception e)
{
Log.d(LOG_TAG, e.getMessage());
}
}
return null;
}
}
Posted 30 August 2014 - 21:16
io so in ferie 7 gg senza quasi internet (terronia, quasi africa) quindi non ti posso essere d'aiuto.
Posted 30 August 2014 - 21:22
I know what you mean, a Gallipoli con TIM ero senza internet, non quasi.
Grazie lo stesso.