[android-developers] Detect if bluetooth device has been powered off

2017-02-06 Thread Markus B.
Hi all,

I have to connect my app to a mobile zebra printer. Print via bluetooth 
works fine.
The bt-connection will be established directly with the mac address of the 
bluetooth printer:



minSdkVersion 16
targetSdkVersion 24

public class BluetoothConnection{

private BluetoothAdapter btAdapter = null;
private BluetoothSocket btSocket = null;
private OutputStream outStream = null;
private Context context = null;

// SPP UUID service
private static final UUID MY_UUID = UUID.fromString(
"1101--1000-8000-00805F9B34FB");


public BluetoothConnection(String pAddress, Context pContext){
this.address= pAddress;
btAdapter = BluetoothAdapter.getDefaultAdapter();
this.context = pContext;
checkBTState();
}


private BluetoothSocket createBluetoothSocket(BluetoothDevice device) 
throws IOException {
if(Build.VERSION.SDK_INT >= 10){
try {
final Method  m = device.getClass().getMethod(
"createInsecureRfcommSocketToServiceRecord", new Class[] { UUID.class });
return (BluetoothSocket) m.invoke(device, MY_UUID);
} catch (Exception e) {
}
}
return  device.createRfcommSocketToServiceRecord(MY_UUID);
}

public boolean connect() {

boolean retVal = true;
if (btAdapter == null){
return false;
}

// Set up a pointer to the remote node using it's address.
BluetoothDevice device = btAdapter.getRemoteDevice(address);

try {
btSocket = createBluetoothSocket(device);
retVal = true;
} catch (IOException e1) {
   retVal = false;
}

// Discovery is resource intensive.  Make sure it isn't going on
// when you attempt to connect and pass your message.
btAdapter.cancelDiscovery();

// Establish the connection.  This will block until it connects.
try {
btSocket.connect();
} catch (IOException e) {
try {
btSocket.close();
retVal = true;
} catch (IOException e2) {
retVal = false;
}
}


try {
outStream = btSocket.getOutputStream();
retVal = true;
} catch (IOException e) {
retVal = false;
}

return true;
}


 .




The printing works fine now. I keep the bluetooth connection alive when the 
app runs, because establishing the connection costs 4 - 6 seconds. This 
works fine.
My problem is, I cannot detect if the printer is powered off.

I want to check before each print job if the bluetooth connection to the 
printer still exists & works. btSocket.isConnected() always returns true 
(even if the printer is powered off). I can send data to the outstream with 
write() without getting an IOException.

I tried to use a BroadcastReceiver too. Unfortunatly 
ACTION_ACL_DISCONNECTED is raised when the printer is powered on, not when 
it is powered off. ACTION_ACL_DISCONNECT_REQUESTED is never raised.

registerReceiver(mReceiver, new IntentFilter(BluetoothDevice.
ACTION_ACL_DISCONNECTED));
registerReceiver(mReceiver, new IntentFilter(BluetoothDevice.
ACTION_ACL_DISCONNECT_REQUESTED));

private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
BluetoothDevice device = intent.getParcelableExtra(
BluetoothDevice.EXTRA_DEVICE);

if (BluetoothDevice.ACTION_FOUND.equals(action)) {
Logger.d("Device found");
}
else if (BluetoothDevice.ACTION_ACL_CONNECTED.equals(action)) {
Logger.d("Device is now connected");
}
else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(
action)) {
Logger.d("Done searching");
}
else if (BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED.equals(
action)) {
Logger.d("Device is about to disconnect");
}
else if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) 
{
Logger.d("Device has disconnected");
}
}
};





What can I do to detect if the bluetooth connection exists and works?


-- 
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/7000b843-2574-4cbf-ae74-2bf9aa15796e%40googlegroups.com.
For more options, 

Re: [android-developers] Android FTP file transfer (explicite TLS) failed and create a empty file

2016-09-21 Thread Markus Bodmann
Sorry no solution found.

Am 21.09.2016 22:37 schrieb "chandan debnath" <heritagebo...@gmail.com>:

> Markus, have you solved it. I'm facing the same problem with same code and
> same error for last one week. No solution found yet. Thanks in advance.
>
> --
> 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/9gIzPf82lOM/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/866d5c79-6aeb-4d9e-ba3d-
> 1d8806d7143a%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 
https://groups.google.com/d/msgid/android-developers/CACiOazxv8JNwTfa-eZ0qbb%3DUVshZ%2BojjUAwWPnU3hhZZKMd2Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android FTP file transfer (explicite TLS) failed and create a empty file

2016-09-14 Thread Markus Bodmann
I want to transfer a file to a ftp server wich use explicite TLS/SSL.

When I connect with File Zilla and choose as servertype: FTPES - FTP over 
explicite TLS/SSL i can connect and upload files.

I try to upload some files to a ftp server with explicite TLS.
My code work until the it upload the files. It throws an IOException.
The last response from the server (getReplyStrings()) is

[150 Accepted data connection]



In the upload folder it generates a empty file. I have no access to the FTP 
log on the server.

FTPSClient ftp = new FTPSClient("TLS",false);
ftp.setTrustManager(TrustManagerUtils.getAcceptAllTrustManager());
KeyManagerFactory kmf = null;
try {
kmf = 
KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
kmf.init(null, null);
KeyManager km = kmf.getKeyManagers()[0];
ftp.setKeyManager(km);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (UnrecoverableKeyException e) {
e.printStackTrace();
} catch (KeyStoreException e) {
e.printStackTrace();
}

ftp.setBufferSize(1024 * 1024);
ftp.setConnectTimeout(10);

try {
ftp.connect("domain.com");
ftp.setSoTimeout(100);
if (ftp.login("login", "passsword")) {
ftp.execPBSZ(0);
ftp.execPROT("P");
ftp.changeWorkingDirectory("/");
if (ftp.getReplyString().contains("250")) {
ftp.setFileType(FTP.BINARY_FILE_TYPE);
ftp.enterLocalPassiveMode();
BufferedInputStream buffIn;
for(File file : files) {
Log.d("DEBUG","Uploading: " + file.getPath());
buffIn = new BufferedInputStream(new 
FileInputStream(file.getAbsolutePath()));
boolean result = ftp.storeFile(file.getName(), buffIn);
buffIn.close();
}
}
ftp.logout();
}
ftp.disconnect();
} catch (IOException e) {
System.out.println(Arrays.toString(ftp.getReplyStrings()));
System.out.println(e);
Log.d("DEBUG", Arrays.toString(e.getStackTrace()));
}


This are the last lines from logcat:


09-14 19:54:01.821 18538-18571/com.google.observer D/DEBUG: Uploading: 
/storage/emulated/0/temp/1_20160709_162505.jpg.jpg09-14 19:54:02.871 
18538-18571/com.google.observer I/System.out: [150 Accepted data 
connection]09-14 19:54:02.871 18538-18571/com.google.observer I/System.out: 
javax.net.ssl.SSLException: Write error: ssl=0x7f9d8c6200: I/O error during 
system call, Broken pipe09-14 19:54:02.881 18538-18571/com.google.observer 
D/DEBUG: [com.android.org.conscrypt.NativeCrypto.SSL_write(Native Method),
com.android.org.conscrypt.OpenSSLSocketImpl$SSLOutputStream.write(OpenSSLSocketImpl.java:877),
java.io.BufferedOutputStream.flushInternal(BufferedOutputStream.java:185),
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:85), 
java.io.FilterOutputStream.close(FilterOutputStream.java:61), 
java.io.BufferedOutputStream.close(BufferedOutputStream.java:152), 
org.apache.commons.net.ftp.FTPClient._storeFile(FTPClient.java:666), 
org.apache.commons.net.ftp.FTPClient.__storeFile(FTPClient.java:624), 
org.apache.commons.net.ftp.FTPClient.storeFile(FTPClient.java:1976), 
com.google.observer.Ftp.upload(Ftp.java:66), 
com.google.observer.MainActivity$1.run(MainActivity.java:30)]




-- 
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/c00cd6fa-d64e-48ff-b2cb-01a81f9a4bb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Working around API-purchase-logic-flaws for consumables in Google Play's Billing API v3 (Relevant to everyone using consumables with API v3)

2016-02-24 Thread Markus A.
Hi Gary,

thank you for your reply!

Unfortunately "trusting" the Google Play API is exactly what I'm having a
problem with in this case:

I'm convinced that Problem 2 in my original post is a fundamental design
flaw in the API. And I still haven't found a good way to work around it
(other than adding and maintaining multiple versions of each consumable SKU
into the Play Store (yuck!)). I'm pretty sure that that failure mode is
exactly the reason why every other app store (including Google Play in the
past!) does make the distinction between consumable and non-consumable
items. The practical difference between the two being that ownership for
consumable items is tracked on a per-device level while ownership for
non-consumable items is tracked globally across all devices for a given
user. Removing this distinction from the API, the way I understand it, was
a mistake that Google made and Problem 2 is how this mistake plays out in
the real world...

What I'm really trying to do is find some way to get a hold of someone at
the relevant Google team about this. I've tried StackOverflow, here, and
messaging them directly on Hangouts. I just cannot get a hold of anyone.

-- 
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/CAF%2BPrGigVYONDMa%3DoVeN6_BZy_JD6DqZgwuE5586mYx-gepDUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Working around API-purchase-logic-flaws for consumables in Google Play's Billing API v3 (Relevant to everyone using consumables with API v3)

2016-02-23 Thread Markus A.
Bump!

I'm really amazed that nobody seems to care about this! Shouldn't this be 
relevant to everyone selling consumable items on the Play Store? Has no-one 
ever experienced this failure mode coming up in production?

Obviously, there's always the possibility that I'm just misunderstanding 
something and there really is no issue, but given that every single other 
app-store that I've ever worked with does distinguish between consumable 
and non-consumable products makes me think there's a good reason for it.

But, in the unlikely event that I am just seeing things here, PLEASE TELL 
ME SO!

-- 
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/11a7b384-ce03-4d2a-b616-7090131105dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] In-App Billing v3 getSkuDetails() returns empty "description" on old versions of Play Store

2016-02-16 Thread Markus A.
When testing In-App Billing on an cheap, but relatively current device (the 
Samsung Replenish M580) that runs Android 2.2.2 and only supports Play 
Store v3.9.16, I found that the DETAILS_LIST returned by getSkuDetails() 

 always 
contains an empty string as the value of the "description" key for all my 
in-app products. On newer devices, everything works fine.

Is this a bug in the early implementations of the Billing API or is there 
something else that might lead to an empty description, like some locale 
setting (the device is set to US-English, which is also the only language 
that I provided in the product details translations)?

-- 
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/c47109de-f185-4e84-a877-ce5b1cae0743%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Working around API-purchase-logic-flaws for consumables in Google Play's Billing API v3 (Relevant to everyone using consumables with API v3)

2016-02-16 Thread Markus A.
PS: This is a cross-post from StackOverflow 
(http://stackoverflow.com/questions/30921789/working-around-api-purchase-logic-flaws-for-consumables-in-google-plays-billing)
 
where I haven't been able to get any answers to this. Also: My apologies 
for all the line-breaks. Not sure where they all came from. In the editor, 
it looked fine...

-- 
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/1da8d81f-0767-44c8-8c52-570628f0fd16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Working around API-purchase-logic-flaws for consumables in Google Play's Billing API v3 (Relevant to everyone using consumables with API v3)

2016-02-16 Thread Markus A.


Version 3 of the Billing API removed the distinction between consumable and 
non-consumable products 
. Both 
have been combined into a new type called "managed" and behave somewhat 
like a hybrid: The app needs to actively call a method to "consume" the 
items. If that is never done for a set of skus, those items basically 
behave as if they were non-consumable.


The documentation 

 describes 
the intended purchase flow as follows:

   1. Launch a purchase flow with a getBuyIntent call.
   2. Get a response Bundle from Google Play indicating if the purchase 
   completed successfully.
   3. If the purchase was successful, consume the purchase by making a 
   consumePurchase call.
   4. Get a response code from Google Play indicating if the consumption 
   completed successfully.
   5. If the consumption was successful, provision the product in your 
   application.
   
I see two problems with this approach. One is fairly obvious and more a 
"bug" in the documentation than the API, but the other is rather subtle and 
I still haven't figured out how to best handle it. Let's start with the 
obvious one for completeness:



*Problem 1: Lost purchases on single device:*


The docs say that an app should call getPurchases every time it is launched 
to "check if the user owns any outstanding consumable in-app products". If 
so, the app should consume these and provision the associated item. This 
covers the case where the purchase flow is interrupted after the purchase 
is completed, but before the item is consumed (i.e. around step 2).


But what if the purchase flow is interrupted between step 4 and 5? I.e. the 
app has successfully consumed the purchase but it got killed (phone call 
came in and there wasn't enough memory around, battery died, crash, 
whatever) before it had a chance to provision the product to the user. In 
such a case, the purchase will no longer be included in getPurchases and 
basically the user never receives what he paid for *(insert angry support 
email and one-star review here)*...


Luckily this problem is fairly easy to fix by introducing a "journal" (like 
in a file system ) to 
change the purchase flow to something more like this (Steps 1 and 2 same as 
above):

   1. Launch a purchase flow with a getBuyIntent call.
   2. Get a response Bundle from Google Play indicating if the purchase 
   completed successfully.
   3. If the purchase was successful, make entry into journal saying 
   "increase coins from 300 to 400 once purchase ** is 
   successfully consumed."
   4. After journal entry is confirmed, consume the purchase by making a 
   consumePurchase call.
   5. Get a response code from Google Play indicating if the consumption 
   completed successfully.
   6. If the consumption was successful, provision the product in your 
   application.
   7. When provisioning is confirmed, change journal entry to "purchase 
** completed".
   8. Then, every time the app starts, it shouldn't just check getPurchases, 
   but also the journal. If there is an entry there for an incomplete purchase 
   that wasn't reported by getPurchases, continue at step 6. If a later 
   getPurchase should ever return that order ID as owned again (e.g. if the 
   consumption failed after all), simply ignore the transaction if the journal 
   lists this order ID as complete.
   
This *should* fix problem 1, but please do let me know if there are any 
flaws in this approach.



*Problem 2: Issues when multiple devices are involved:*


Let's say a user owns two devices (a phone and a tablet, for example) with 
the same account on both.


He (or she - to be implied from now on) could try to purchase more coins on 
his *phone* and the app could get killed after the purchase completed, but 
before it is consumed. Now, if he opens the app on his *tablet* next, 
getPurchases will report the product as owned.


The app on the tablet will have to assume that the purchase was initiated 
there and that it died before the journal entry was created, so it will 
create the journal entry, consume the product, and provision the coins.


If the phone app died before it had a chance to make the journal entry, the 
coins will never be provisioned on the phone *(insert angry support email 
and one-star review here)*. And if the phone app died after the journal 
entry was created, the coins will *also* be provisioned on the phone, 
basically giving the user a purchase for free on the tablet *(insert lost 
revenue here)*.


One way around this is to add some unique install or device ID as a payload 
to the purchase to check whether the purchase was meant for this device. 
Then, the tablet can simply ignore the purchase and only the phone will 
ever credit the coins and consume the item.


*BUT:* Since the sku is still in the 

[android-developers] Same database cursor in ListFragment and ViewPager

2014-11-25 Thread Markus
Hi guys,

I have a ListFragment where I load a Cursor through a Loader in 
 onCreateLoader(int i, Bundle bundle).
If I click on a ListItem then I replace the Fragment to another Fragment 
DetailsPageSlider and set as argument position and count.
In my FragmentStateAdapter in getItem(int position) I create my Details 
Fragment which needs the database _id as argument.
So now I have to match the position in getItem with the database _id! 

How I could solve that problem?

1) Should I load exactly the same cursor for my FragmentStatePagerAdapter 
to get the database _id through the position.

2) Or Is it possible to use the same Cursor in my ListFragment and also in 
my FragmentStatePagerAdapter?

3) Or any other ideas?

greets
Markus


-- 
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] NPE in ZoomManager

2014-11-21 Thread Markus
My only WebView is an AdView so this has to be ad-related.

This happened on a Nexus 7 (2012) still at Android 4.2.2.

java.lang.NullPointerException
at 
android.webkit.ZoomManager.setupZoomOverviewWidth(ZoomManager.java:1087)
at android.webkit.ZoomManager.onNewPicture(ZoomManager.java:1028)
at android.webkit.WebViewClassic.setNewPicture(WebViewClassic.java:7986)
at 
android.webkit.WebViewClassic$PrivateHandler.handleMessage(WebViewClassic.java:7327)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)

(I am reporting this here because I could not find a category for AdMob in 
the issue tracker.)

-- 
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] Re: NPE in ZoomManager

2014-11-21 Thread Markus
Sorry, this should have gone to AdMob Ads Developers...

On Friday, November 21, 2014 10:30:24 AM UTC+1, Markus wrote:

 My only WebView is an AdView so this has to be ad-related.

 This happened on a Nexus 7 (2012) still at Android 4.2.2.

 java.lang.NullPointerException
 at 
 android.webkit.ZoomManager.setupZoomOverviewWidth(ZoomManager.java:1087)
 at android.webkit.ZoomManager.onNewPicture(ZoomManager.java:1028)
 at 
 android.webkit.WebViewClassic.setNewPicture(WebViewClassic.java:7986)
 at 
 android.webkit.WebViewClassic$PrivateHandler.handleMessage(WebViewClassic.java:7327)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:137)
 at android.app.ActivityThread.main(ActivityThread.java:5041)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:511)
 at 
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
 at dalvik.system.NativeStart.main(Native Method)

 (I am reporting this here because I could not find a category for AdMob in 
 the issue tracker.)


-- 
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] Individual order of favourites

2012-10-21 Thread Markus Piribauer
Hi

i wonder that this feature is not implemented yet, sometimes you have 10, 
20 or more favourites and want to order them in a special way, like your 
family first, but at the moment it doesn´t seem to be possible. I´m sure a 
lot of people are working with favourites in their contactlist but it seems 
that this can be solved only via an app. Are there any other solutions?

cheers

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

[android-developers] Android Frameworks/Technologies to improve development

2012-07-18 Thread Markus Unger
Hey!

I am planing my new Android project and I would like to know which 
frameworks/technologies you can recommend.
Currently I want to use:

- roboguice
- greenDAO

Anybody another good tools to improve Android development?

Thanks for help!

Regards,

Markus

-- 
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] Focus problem

2012-02-29 Thread Markus Lindner
Hello,

In my small application I have 2 EditTexts and a Button. If something
is entered in EditText1 and confirmed by Enter, the focus should be
set to EditText-Field2. Therefore I use an OnKeyListener on the first
EditText. The method requestFocus is called in onKey on the second
EditText.

But there is problem. After something is entered in EditText1, the
focus changes to the Button.

Why does that happen?

Here is the layout and the actitivity:

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical 

LinearLayout
android:id=@+id/linearLayout1
android:layout_width=match_parent
android:layout_height=wrap_content
android:layout_weight=1
android:orientation=vertical 

EditText
android:id=@+id/editText1
android:layout_width=match_parent
android:layout_height=wrap_content
android:inputType=number 

requestFocus /
/EditText

EditText
android:id=@+id/editText2
android:layout_width=match_parent
android:layout_height=wrap_content
android:inputType=number /
/LinearLayout

Button
android:id=@+id/button1
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=Button /

/LinearLayout

package de.mih.myandroidtest;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnKeyListener;
import android.widget.Button;
import android.widget.EditText;

public class MyAndroidTestActivity extends Activity {

EditText _t1;
EditText _t2;

Button _b1;

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

_t1 = (EditText) findViewById(R.id.editText1);
_t1.setOnKeyListener(new OnKeyListener() {

public boolean onKey(View v, int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_ENTER:
_t1.setEnabled(false);
_t2.requestFocus();
}
return false;
}
});

_t2 = (EditText) findViewById(R.id.editText2);

_b1 = (Button) findViewById(R.id.button1);
_b1.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
_t1.setEnabled(true);
_t1.setText();
_t2.setEnabled(true);
_t2.setText();

_t1.requestFocus();
}
});
}
}

Thanks a lot

-- 
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] Messages between App and Server without C2DM

2011-12-21 Thread Markus Unger
Hello!

My App send Http Request to Webservice in the Google App Engine. So I
need to inform some User, maybe that they receiver a new Message...
But I don't want to use C2DM.

Do's anybody know a good solution? Currently I check the Webservice
every 10 Seconds.. But I definitely not the best solution.

Thanks for help!

Regards, Markus

-- 
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] requestLocationUpdates Question

2011-12-15 Thread Markus Unger
Hello!

The method requestLocationUpdates

public void requestLocationUpdates (String provider, long minTime,
float minDistance, LocationListener listener)

has minTime and a minDistance. So if I would say

requestLocationUpdates (gps, 1000l * 60l * 5l, 0, new
LocationListener);

I will receiver every 5 Minutes a location or? I know that it can be
longer... But could it be shorter?

Currently I do it every 5 Minutes with 0 Meters and I receive
sometimes 50 Locations in a minute.. it wait's and I get 10-20 Seconds
later the next, then 40 Seconds...

But it is definitely NOT every 5 Minutes or longer...

Thanks for help!
Regards, Markus

-- 
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: requestLocationUpdates Question

2011-12-15 Thread Markus Unger
The requestSingleUpdate is no Option, cause I need to support 2.1 and
the method is just available at 2.3.

-- 
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] Gravity virtual sensor source code

2011-12-05 Thread markus
Hi all!

Now that Ice Cream Sandwich is out, I thought I'd have a look at how
the virtual sensors have their data calculated, in particular
TYPE_GRAVITY. Of course it will involve data from some or all of the
real sensors (accelerometer, gyroscope, and magnetic field), but I've
read somewhere (can't find where just now) that from Android 4 ICS,
the virtual sensors, and TYPE_GRAVITY in particular, will be more
accurate, because they involve the gyroscope, if it's available in
the
phone.

I've got the Android 4 source code downloaded, but I can't find the
place where this data is calculated. It's not in the Java code, as
far
as I can tell, so it must be in native code somewhere. I'm new to
looking at the Android source code, so maybe someone could point me
in
the right direction?

Thank you very much!

Regards,
Markus

(This is actually an old email, that apparently got posted to a random
list here on Google Groups. No idea how that happened. And not the
first time it's happened, looking at my posting history...)

-- 
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] Publishing Apps

2011-12-05 Thread Markus Unger
Hello!

I tried to publish a example app. Not for public only for me and an
other developer. So I had register at the android market and it works
fine. Not I had uploaded the APK and add the description and so on..
now I see the App in the overview..

For Free, not publish.. all seems ok. I will it just publish for me
and one other developer. So I added in the profile under test account
the email of the other developer.

But if I search for the name of the app. I didn't find it...

Where is my fault?

Thanks for help,

Regards Markus

-- 
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] Gravity virtual sensor source code

2011-11-15 Thread markus
Hi all!

Now that Ice Cream Sandwich is out, I thought I'd have a look at how
the virtual sensors have their data calculated, in particular
TYPE_GRAVITY. Of course it will involve data from some or all of the
real sensors (accelerometer, gyroscope, and magnetic field), but I've
read somewhere (can't find where just now) that from Android 4 ICS,
the virtual sensors, and TYPE_GRAVITY in particular, will be more
accurate, because they involve the gyroscope, if it's available in the
phone.

I've got the Android 4 source code downloaded, but I can't find the
place where this data is calculated. It's not in the Java code, as far
as I can tell, so it must be in native code somewhere. I'm new to
looking at the Android source code, so maybe someone could point me in
the right direction?

Thank you very much!

Regards,
Markus

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


[android-developers] Android Visualizer getWaveForm() behaves weird at high volumes

2011-11-14 Thread Markus
I am using the Android Visualizer to obtain the waveform data of an
audio stream and calculate the RMS of it.

public int[] getFormattedData(byte[] rawVizData) {
for (int i = 0; i  formattedVizData.length; i++) {
// convert from unsigned 8 bit to signed 16 bit
int tmp = ((int) rawVizData[i]  0xFF) - 128;
formattedVizData[i] = tmp;
}
return formattedVizData;
}

//...

double rms = 0;
int[] formattedVizData = getFormattedData(buffer);
if (formattedVizData.length  0) {
for (int i = 0; i  formattedVizData.length; i++) {
int val = formattedVizData[i];
rms += val * val;
}
rms = Math.sqrt(rms / formattedVizData.length);
}

I set the capture size to 1024 and expected the RMS value of the
signal to grow if the playback volume is higher. I test with a 440Hz
sine test tone and get the following results:

 VOLUMERMS  MIN VALUE  MAX VALUE
  6.67%5.5 -8  7
 13.33%   13.3-19 18
 20.00%   28.1-40 39
 26.67%   42.6-60 59
 33.33% 68-96 95
 40.00% 54-77 76
 46.67% 81   -115114
 53.33% 64-91 90
 60.00% 51-91 90
 66.67% 68-97 96
 73.33% 48-69 68
 80.00% 68-97 96
 86.67% 45-65 64
 93.33% 64-91 90
100.00% 90   -128127

Why does my assumption not hold anymore for volumes  33.33%? What am
I missing here? Is there some obvious bug in my code I just seem to be
unable to find?

I tried for days now finding out why this is not working and so far
couldn't come up with a solution.

Any help is greatly appreciated.

Markus

-- 
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: SensorEvent timestamp doesn't always update

2011-11-07 Thread markus
Hi,

I only saw your answer today, thanks for it.

It appears do make a difference, now it works. I still don't get why,
though. The method always gets invoked by the same thread (which I've
checked by outputting Thread.currentThread().getName() to the log), so
it doesn't get invoked concurrently (because that's impossible if only
one thread is involved). Even if I synchronize the method invocation
on the listener object, it doesn't make a difference when storing only
the object pointer.

Where's the flaw in my reasoning?

Thanks again!

Regards,
Markus

On Oct 28, 10:38 pm, josean1968 josean1...@gmail.com wrote:
 Hello,

 You have this:

 ...
     private SensorEvent lastEvent;
 ...

 @Override
     public void onSensorChanged(SensorEvent event) {
         if (lastEvent == null) {
             lastEvent = event;
             return;
         }

         Log.v(TAG, dT [ + Thread.currentThread().getName() + ]:  +
 (event.timestamp - lastEvent.timestamp));
     }

 

 The problem is that the onSensorChanged() method can be invoked
 concurrently because it is an event listener.
 Declare a local variable and copy the value (not just a pointer to the
 object):

 @Override
     public void onSensorChanged(SensorEvent event) {
       ...
       int lastTimestamp = event.timestamp;
       ...
     }

-- 
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: SensorEvent timestamp doesn't always update

2011-11-07 Thread markus
Hi again,

sorry to spam. I just found the following note in
http://developer.android.com/reference/android/hardware/SensorEventListener.html#onSensorChanged(android.hardware.SensorEvent)

NOTE: The application doesn't own the event object passed as a
parameter and therefore cannot hold on o it. The object may be part of
an internal pool and may be reused by the framework.

I don't know how I missed that, which explains the problem.

Thanks again for your help.

Regards,
Markus

On Oct 28, 10:38 pm, josean1968 josean1...@gmail.com wrote:
 Hello,

 You have this:

 ...
     private SensorEvent lastEvent;
 ...

 @Override
     public void onSensorChanged(SensorEvent event) {
         if (lastEvent == null) {
             lastEvent = event;
             return;
         }

         Log.v(TAG, dT [ + Thread.currentThread().getName() + ]:  +
 (event.timestamp - lastEvent.timestamp));
     }

 

 The problem is that the onSensorChanged() method can be invoked
 concurrently because it is an event listener.
 Declare a local variable and copy the value (not just a pointer to the
 object):

 @Override
     public void onSensorChanged(SensorEvent event) {
       ...
       int lastTimestamp = event.timestamp;
       ...
     }

-- 
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] SensorEvent timestamp doesn't always update

2011-10-26 Thread markus
Hello all,

I'm doing some calculations on sensor data where I need to use the 
timestamp of the sample. See some sample code 
here: http://pastebin.com/2X4LzLdC

The problem is, a lot of the time (actually, most of the time), the 
timestamp doesn't get updated in the SensorEvent, so the time differende dT 
equals 0. I've tested with three sensor types (accelerometer, magnetic 
field, gyroscope) on two different phones (Nexus One with Android 2.3.6, 
HTC Desire with 2.2). Am I missing something obvious, or doing something 
wrong? Maybe a synchronization issue / Java memory model issue? Or is there 
a bug somewhere? I couldn't find an explanation in this Google Group, nor 
in the issue/bug list or googling.

Thank you for reading. :)

Regards,
Markus

-- 
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] Registering Intent for Sending a link / web page

2011-10-13 Thread Markus Wolff
Hi,

I'm trying to register an intent so that my app pops up as a possible
choise when choosing Share link from the browser's context menu or
More - Share page from the browser's application menu.

To do this, I have so far created a new activity called
ShareActivity and updated the manifest like this:

activity android:label=@string/app_name
android:name=SendActivity
  intent-filter
   action android:name=android.intent.action.SEND /
   category android:name=android.intent.category.DEFAULT /
   data android:scheme=http / --
  /intent-filter
/activity

Sadly, this doesn't work. The browser (in a default Android 2.3.3
image running in the emulator) does not offer any choice when tapping
Share link - instead, it goes straight to the SMS app and wants to
send it this way.

When I use android.intent.action.VIEW instead of .SEND, my activity is
actually called when I just tap a link - a dialog is displayed,
allowing to choose between the default browser and my app. However,
that's not what I want.

I've tried any combination of activity and category that seemed
somewhat logical (and yes, even seemingly illogical choices), but to
no avail.

Can anyone offer any pointers to what I'm doing wrong?

Much appreciated!

Regards,
Markus

-- 
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] Registering Intent for Sending a link / web page

2011-10-13 Thread Markus Wolff
Aaah, yes, thanks for the hint - logcat indeed revealed the secret: The 
intent that's fired is actually CHOOSER, not SEND - despite everything I've 
read in countless tutorials. Alright, then :-)

Thanks a lot!

-- 
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: NFC Secure Element

2011-06-21 Thread Markus
Hello,
I cant load the key ff ff ff ff ff ff to the 4k MIFARE.
If my Nexus S is in Card Emulation I tried with JCShell to do
something.
Reading UID and ATR is no problem it works.
But by loading the Key, occurs an error:

/send FF82201A06
= FF 82 20 1A 06 FF FF FF FF FF FF   .. 
(407461 nsec)
= 69 86  i.
Status: Command not allowed (no current EF)

Anybody know where is the fault???


greets
Markus


On 19 Mai, 19:51, Martin martin.buellesb...@googlemail.com wrote:
 Hello all,

 Michael as you already mentioned, it is possible to activate the card
 emulation mode and theSecureElementin the Nexus S.
 I did that and also changed the permissions from
 android.permission.WRITE_SECURE_SETTINGS to android.permission.NFCin
 NfcService.java to get access to theSecureElement.
 Now I am able to create and open a connection to theSecureElement
 and get its UID.
 After enabling the card emulation mode on the Nexus S, I am able to
 read and write data to the emulated MiFare Classic 4k card by an
 externalNFCreader. I would like to do that within an android app.
 Why is that not possible through an android application? You have
 spoken about the access keys, but aren't they the same for internal
 and external access?
 If I have understood you correctly, there is nothing more I can do so
 far, right?

 Thanks a lot!

 Martin

 On 19 Mai, 00:59, Michael Roland mi.rol...@gmail.com wrote:







  Hallo,

   I more or less understand how to do it but I don't understand if after
   is possible to build application on card emulation.

  Regarding the internalsecureelement(SmartMX): No. Even if you
  activate this chip as thesecureelement, you could only use its UID for
  your application. To edit data on it/install applications into it you
  would need to have the access keys for thatsecureelement.

  Regarding an externalsecureelementon the UICC (SIM card): Partly
  yes. You can activate an SWP-UICC assecureelement. But access is
  limited to external readers for the moment. Until now, there is no known
  way to get access to application on the UICC from a phone application.

   Moreover some of you speak about authentication, and about a password
   that is not possible to have? (What are you talking about when you
   speak about this stuff).

  The SmartMX in the Nexus S contains a JavaCard operating system that is
  compliant to GlobalPlatform. GlobalPlatform defines methods to manage
  multiple applications on this JavaCard. A central component of this card
  management is the Card Manager, which itself is one application on 
  thesecureelement. The card manager provides an interface to load, install,
  ... delete applications on thesecureelement. Additionally it controls
  access to these methods. To establish asecurechannel with the card
  manager (i.e. a connection that provides authenticity, integrity and
  possibly confidentiality) both, the entity that wants to manage the card
  and the card manager need to know one or more shared secrets, the
  authentication keys.

   Anyway some news aboutNFCcard emulation
   [nearfieldcommunicationworld]
   it seems that Google dev will not give use api about that in the next
   future.

  Still there is some developments towards card emulation going on 
  (cf.http://www.nfctimes.com/news/android-card-emulation-expected-despite-...
  )

   Moreover, what does it mean And if you improperly authenticate
   yourself a certain number of times, there aresecureelements out
   there that will physically destroy themselves and can never be
   recovered? Is related to the password of my previous questions?

  While the card manager is protected by access keys, there still exist
  some methods to find such keys. One of these methods would be brute
  forces (i.e. trying each possible key value). While such methods are
  usually very inefficient (if the key has an appropriate length) there
  might be some methods that could significantly speed up this process. As
  a safety mechanism the card manager usually implements an additional
  protection against such an attack: After ten consecutive authentication
  failures, the card manager locks itself and refuses any further
  commands. (Other applications that were previously installed on that
  card will continue to function as usual.) Once this lockdown has
  happened, there is *NO* way of reversing this. THerefore, once in
  lockdown no applications can be installed on, removed from, ... 
  thesecureelement.

  br
  Michael

   On May 16, 3:48 pm, Goo_Goo danny.w.s...@gmail.com wrote:
   Could someone please post the the image withcardemulationenabled
   for Nexus S?

   On May 13, 5:08 am, Markus markus.tau...@gmail.com wrote:

   mtk
   you wrote after call
   phLibNfc_SE_SetMode(seID,phLibNfc_SE_ActModeWired,nfc_jni_se_set_mode_callb
ack,
   (void *)nat);
   your nexus s was incardemulation

   I called it with mode default
   phLibNfc_SE_SetMode(seID

[android-developers] Re: NFC Secure Element

2011-06-20 Thread Markus
Hi Michael,

On 19 Mai, 00:59, Michael Roland mi.rol...@gmail.com wrote:
 Regarding an external secure element on the UICC (SIM card): Partly
 yes. You can activate an SWP-UICC as secure element. But access is
 limited to external readers for the moment. Until now, there is no known
 way to get access to application on the UICC from a phone application.

You are sure its not possible to access it from an android
application?
In Madlmayers Blog he wrote, its possible because of the additional AT
Commands in RIL since 2.3.2.

Question about UICC

Have somebody activate the Card Emulation with UICC?
I tryed it, with SmartMX SE it was no problem Card Emulation was
running.
When I tried the ID of my UICC in the Method doSelectSecureElement
from NFC Service,
then the Card Emulation was not running, Reader dont detect a Tag.

Somebody knows why doSelectSecureElement Method dont working with
UICC?




-- 
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: NFC Secure Element

2011-05-13 Thread Markus
mtk
you wrote after call
phLibNfc_SE_SetMode(seID,phLibNfc_SE_ActModeWired,nfc_jni_se_set_mode_callback,
(void *)nat);
your nexus s was in card emulation

I called it with mode default
phLibNfc_SE_SetMode(seID,phLibNfc_SE_ActModeDefault,nfc_jni_se_set_mode_callback,
(void *)nat);
and get following log
5-12 22:08:54.421: DEBUG/NFC JNI(303): NFC capabilities: HAL =
8150100, FW = a70414, HW = 620003, Model = 0, HCI = 1, Full_FW = 104,
FW Update Info = 0
05-12 22:08:54.769: DEBUG/NFC JNI(303):
phLibNfc_SE_GetSecureElementList()
05-12 22:08:54.769: DEBUG/NFC JNI(303):  Number of Secure
Element(s) : 1
05-12 22:08:54.769: DEBUG/NFC JNI(303):
phLibNfc_SE_GetSecureElementList(): SMX detected, handle=0xabcdef
05-12 22:08:54.769: DEBUG/NFC JNI(303): phLibNfc_SE_SetMode() returned
0x000d[NFCSTATUS_PENDING]
05-12 22:08:54.828: INFO/NFC JNI(303): NFC Initialized
05-12 22:08:54.828: DEBUG/NfcService(303): NFC-EE routing OFF
05-12 22:08:54.847: DEBUG/NfcService(303): NFC-C discovery ON

BUT reader is not detecting a Tag on my phone
Is there maybe a problem to setting the mode
returned 0x000d[NFCSTATUS_PENDING] sounds not so great

I am working with CyanogenMod 7 (Android 2.3.4)

regards
Markus

-- 
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] Stable Built environment for Nexus S

2011-05-11 Thread Markus
Hello friends,

I am looking for a stable built environment to build a custom ROM.
BUT all branches I tryed dont work clean in Nexus S.

My attemts:
repo init -u git://android.git.kernel.org/platform/manifest.git -b
android-2.3.3_r1
repo init -u git://android.git.kernel.org/platform/manifest.git -b
android-2.3.3_r1.1
repo init -u git://android.git.kernel.org/platform/manifest.git -b
android-2.3.4_r1
repo init -u git://android.git.kernel.org/platform/manifest.git -b
gingerbread
repo init -u git://android.git.kernel.org/platform/manifest.git -b
master

On all branches there are problems with NFC (an error occures is
showing when I activate it)
And when I try to activate WLAN then thy System is hang up and I have
to remove the battery to restart it.

On Installation I get an error that the baseband version is not right,
my baseband is I9020XXKB3
If I add my baseband version to board-info then installation is OK.

Maybe is that the reason for my Hardware Errors with NFC and WLAN?

would be happy for some infos and tips

best regards
Markus

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


[android-developers] Android Build dont work on Nexus S

2011-05-08 Thread Markus
Hello,

I got the android sourcecode and made a built and then I flashed my
Nexus S with that built.

but there is a problem to boot the system I see the android sign all
5 seconds the android sign is coming new
but the system never boots anybody have an idea???

I attached the error log:
05-09 05:44:01.894: ERROR/installd(76): eof
05-09 05:44:01.894: ERROR/installd(76): failed to read size
05-09 05:44:02.164: ERROR/AudioHardware(1721): Can't load libsecril-
client.so
05-09 05:44:04.250: ERROR/Zygote(1723): setreuid() failed. errno: 17
05-09 05:44:04.605: ERROR/Sensors(1730): AkmSensor: unable to load AKM
Library, Cannot load library: load_library[1104]: Library 'libakm.so'
not found
05-09 05:44:05.539: ERROR/BluetoothService.cpp(1730): Could not get
onto the system bus: Failed to connect to socket /dev/socket/dbus: No
such file or directory
05-09 05:44:05.550: ERROR/EventHub(1730): could not get driver version
for /dev/input/mice, Not a typewriter
05-09 05:44:05.558: ERROR/BluetoothEventLoop.cpp(1730):
initializeNativeDataNative: Could not get onto the system bus!
05-09 05:44:05.558: ERROR/libdbus(1730): arguments to
dbus_connection_set_exit_on_disconnect() were incorrect, assertion
connection != NULL failed in file external/dbus/dbus/dbus-
connection.c line 2887.
05-09 05:44:05.558: ERROR/libdbus(1730): This is normally a bug in
some application using the D-Bus library.

I made no changes on android code,
just get the gingerbread branch
and lunch it with full_crespo-userdebug

where is the problem??

best regards
markus

-- 
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] Are dialogs supposed to be modal?

2011-04-14 Thread Markus Junginger
After years of using dialogs, today I got doubts that they are
strictly modal after all. There seems to be a short time span in which
it is possible to hit other Views AFTER show() of the dialog is
called.

Does this work as intended?

Any ideas how to make a dialog really modal?

Have a look here for some details:
http://stackoverflow.com/questions/5666707/bypass-modal-android-dialogs-by-clicking-buttons-twice-fast-enough

-- 
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] ADT 10.0.0 Issues

2011-03-02 Thread Markus Junginger
Thanks for the information, it's nice to see the ongoing effort and the 
increased development speed in the last months. :)


I attached the thread dump, Tor requested. Hope it helps.

Markus

--
Markus Junginger

http://greenrobot.de, http://twitter.com/greenrobot_de

Dollinger  Junginger Unternehmergesellschaft (haftungsbeschränkt)
Agnes-Pockels-Bogen 1, 80992 München
Handelsregister München HRB 179018
Geschäftsführer: Markus Junginger, Vivien Dollinger

This message is intended only for the use of the Addressee and may contain 
information that is PRIVILEDGED and CONFIDENTIAL. If you are not the intended 
recipient, dissemination of this communication is prohibited. If you have 
received this communication in error, please erase all copies of the message 
and its attachments and notify us immediately.

--
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=enFull thread dump Java HotSpot(TM) 64-Bit Server VM (17.0-b16 mixed mode):

AsyncQueryWorker prio=6 tid=0x488f7800 nid=0x2bac runnable 
[0x5090f000]
   java.lang.Thread.State: RUNNABLE
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:119)
at android.os.Looper.loop(Looper.java:116)
at android.os.HandlerThread.run(HandlerThread.java:60)

AWT-Windows daemon prio=6 tid=0x48931800 nid=0x3784 runnable 
[0x4d05f000]
   java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:293)
at java.lang.Thread.run(Thread.java:619)

Java2D Disposer daemon prio=10 tid=0x48927800 nid=0x1a78 in 
Object.wait() [0x4c42f000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x21d78390 (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked 0x21d78390 (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at sun.java2d.Disposer.run(Disposer.java:127)
at java.lang.Thread.run(Thread.java:619)

Thread-3 daemon prio=6 tid=0x4a3a3000 nid=0x9c4 in Object.wait() 
[0x5345f000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x1ac27eb8 (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked 0x1ac27eb8 (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at 
org.tmatesoft.svn.core.javahl.SVNClientImplTracker.run(SVNClientImplTracker.java:65)
at java.lang.Thread.run(Thread.java:619)

Device List Monitor prio=6 tid=0x4a3a4000 nid=0x3aec runnable 
[0x52e1f000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:237)
at sun.nio.ch.IOUtil.read(IOUtil.java:210)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
- locked 0x18b16e18 (a java.lang.Object)
at com.android.ddmlib.DeviceMonitor.read(DeviceMonitor.java:949)
at com.android.ddmlib.DeviceMonitor.readLength(DeviceMonitor.java:922)
at 
com.android.ddmlib.DeviceMonitor.deviceMonitorLoop(DeviceMonitor.java:187)
at com.android.ddmlib.DeviceMonitor.access$000(DeviceMonitor.java:42)
at com.android.ddmlib.DeviceMonitor$1.run(DeviceMonitor.java:82)

Worker-62 prio=6 tid=0x4a3a1000 nid=0x1c9c in Object.wait() 
[0x52b1f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x16c784e8 (a 
org.eclipse.core.internal.jobs.WorkerPool)
at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:185)
- locked 0x16c784e8 (a 
org.eclipse.core.internal.jobs.WorkerPool)
at 
org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:217)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:51)

Worker-44 prio=6 tid=0x488f8000 nid=0x17f4 in Object.wait() 
[0x5191f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x16c784e8 (a 
org.eclipse.core.internal.jobs.WorkerPool

[android-developers] ADT 10.0.0 Issues

2011-03-01 Thread Markus Junginger
Since I updated ADT, I am experiencing CPU load issues. One of the
cores goes to 100% when I use the layout editor for a while. I am
running Windows 7, and a friend confirmed this issue with Linux. Is
there a known workaround?

Also, at least when running Windows, the new palette looks shaggy due
to bitmap scaling issues.

And speaking of ADT: are there any known plans to improve performance?
We have several larger project and every time we update a single file,
ADT seems to build the entire APK from scratch. This takes up to
almost a minute, which decreases productivity. The builder could be
more intelligent and just update the deltas.

Lastly, I am just writing an article on ADT, so I could mention some
future plans, if anyone from Google happens to read this.

Thanks,
Markus

--
http://greenrobot.de

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


[android-developers] How to call the dialog of a DialogPreference withouth requiring the user to click on it?

2011-02-03 Thread markus
Hello,

I'm having a hard time how to open a preference dialog from code.

Let's say I have a ListPreference with the key abc defined in XML.
When the user navigates through the preferences and clicks on that
ListPreference, a dialog pops up and the user can select it. Is there
any way to open that dialog from code, e.g. simulating that the user
opens preferences and clicks on the item?

I've tried several ways, eg.

( (android.preference.DialogPreference)
prefMgr.findPreference( abc )).showDialog(null);

but with no result. (This does not work because it is a protected
method).

Of course I gut build my own dialog which looks like the dialog of the
preference and does the same, but that would be building the same
thing again and I had to track the changes done to either dialog/
preference to update the other.

StackOverflow does not seem to have an answer, see eg [1] or [2],
maybe here's someone that can tell if it's possible (or at least say
it is not)?

[1] 
http://stackoverflow.com/questions/4805896/how-to-open-a-android-dialogpreference-created-with-xml-from-code
[2] 
http://stackoverflow.com/questions/4659197/programmatically-perform-click-in-android-preferenceactivity

-- 
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] pause AudioTrack correctly

2011-01-12 Thread Markus Drösser
Hello,

I hope that somebody can explain how to pause AudioTrack correctly. I
am recording and playing back a pcm file with the
OnPlaybackPositionUpdateListener in a remote service. This works fine.
Now when I call pause() on the audioTrack object, the playback pauses
and if I want to resume I call start() again. This works in general,
but some frames are skipped and the playback does not resume from the
point it paused but from a few frames later. Why is that? Please show
me how to pause a AudioTrack correctly without losing frames. Here is
my code for the PlaybackListener


audioTrack.setPlaybackPositionUpdateListener(new
OnPlaybackPositionUpdateListener() {

@Override
public void onPeriodicNotification(AudioTrack 
track) {

try {
int error=0;
if(ramfile!=null)
{
error = 
ramfile.read(buffer);
}

if(error==-1)
{

audioTrack.stop();

audioTrack.flush();

if(ramfile!=null)
ramfile = null;
audioTrack=null;
playing=false;
}

if(audioTrack!=null 
audioTrack.getPlayState()==AudioTrack.PLAYSTATE_PLAYING)

audioTrack.write(buffer, 0, buffer.length);


} catch (IOException e) {
Log.d(EX,We run into an 
Exception);
e.printStackTrace();
}
}

@Override
public void onMarkerReached(AudioTrack track) {

}
});


Greetings,

Markus

-- 
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] Problem binding a remote service

2010-12-03 Thread Markus Drösser
hey guys,

strange problem ~.~ trying that out the whole day. its made after an
example i found in a book. in my case the example simply does not
work.

if i do


public class Launcher extends Activity {


IRemoteRecordService mRemoteRecordService = null;

private ServiceConnection remoteRecordServiceVerbindung = new
ServiceConnection()
{

public void onServiceConnected(ComponentName name, IBinder 
service)
{
// TODO Auto-generated method stub
mRemoteRecordService =
IRemoteRecordService.Stub.asInterface(service);

}

};


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

//Verbindung zum Service aufnehmen
Intent intent = new
Intent(IRemoteRecordService.class.getName());
if(bindService(intent, remoteRecordServiceVerbindung,
Context.BIND_AUTO_CREATE))
System.out.println(Service successfully bound!);

if(mRemoteRecordService==null) System.out.println(Our
mRemoteRecordService is null :( );

  }
}


... i always get the message that my mRemoteRecordService is null in
logcat. how can that be?
no other errors, but i can not work with a nullpointerexception of
course ;D

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] Crash report: NoSuchFieldError

2010-10-21 Thread Markus
Hi all,

Yesterday I noticed this awkward crash report on the Android Market
Home:

java.lang.ExceptionInInitializerError
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1429)
at android.app.Instrumentation.newApplication(Instrumentation.java:
957)
at android.app.Instrumentation.newApplication(Instrumentation.java:
942)
at android.app.ActivityThread
$PackageInfo.makeApplication(ActivityThread.java:644)
at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:
4232)
at android.app.ActivityThread.access$3000(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
2071)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoSuchFieldError:
at com.xxx.yyy.Application.clinit(Application.java:30)
... 16 more

The device was a Nexus One and apparently this happened twice (but
only to one user).

Any idea what might be the cause of this?

Markus

-- 
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] Download Files via Android Browser an https not possible

2010-09-21 Thread Markus
Hello!

I want to try to download some file about the android browser. But
every time I start the download via https the download manager show
only the download with the message Waiting for data
I tried different host, but the problem ist always the same.

I used a Milestone with 2.1 and a Samsung Galaxy 9000 with 2.1

Anybody an idea?

-- 
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] Invoke Download APK from my Application

2010-09-20 Thread Markus
Hello!

I developed a simple Application.. So I want to implement a automatic
update. If anybody starts the app, they start a request to a
webservice where a new file path is found or not if the app is up to
date.

But if not I want to start the download (http://www.myDomain.com/
myApp_01.apk) but I have no idea how?
I think I must invoke an Intent... or something else.

Can anybody help me?

Regards Markus

-- 
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: Invoke Download APK from my Application

2010-09-20 Thread Markus
But with this invoke I redirect to any Application on the Device that
could use this URL or? This could not only be the Downloadmanager...
Is there a way to download this file only by the download manager?

Regards Markus

-- 
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] Remote Service - Reconnecting

2010-08-11 Thread Markus Feuerstein
Thanks for your quick answer.
If I understand right, I could solve it like this:

@Override
public void onStart( Intent intent, int startId ){
super.onStart( intent, startId );
if( !mServiceRunning ) {
mServiceHandler = new Handler();
mServiceHandler.post( mTask );
mServiceRunning = true;
}
}

Now I can call startService from the client side, before I will bind or
rebind to the service.
Is this the recommended way, to deal with remote services?

Thanks for your help!
Regards, Markus


On Wed, Aug 11, 2010 at 3:35 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Wed, Aug 11, 2010 at 9:19 AM, maecky markus.feuerst...@gmail.com
 wrote:
  How do I know if the service has already been started (therefore i
  would only need to bind to the service again) or not (then I would
  need to call startService() first and then bind to the service)?

 You don't know.

  What would happen, if I call startService() if the service is already
  running?

 Nothing much. The service will be called with onStart(), so if you are
 overriding that, you will get control there.

  Does the OS start a second service, or will it affect the
  service which is already running?

 At most one instance of a service will be running at one time.

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

 Android 2.2 Programming Books: http://commonsware.com/books

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

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

[android-developers] Secure an TCP-Connection

2010-06-30 Thread Markus Keil
Hi!

I try to secure an TCP-Connection bewteen an Android-App and an Java-
Application.
I try to use SSL and CipherInputStream/CipherOutputStream but i can't
get it working.

on the JAVA-Application it's fine with an JKS-Keystore created with
keytool.

Code of creating an listening SSL-Socket in the JAVA-Application:
[code]
//Setup Keys
KeyStore ks = KeyStore.getInstance(JKS);
ks.load(new FileInputStream(esvdrpkeys), 
esvdrp.toCharArray());
KeyManagerFactory kmf = 
KeyManagerFactory.getInstance(X509);
kmf.init(ks, esvdrp.toCharArray());
SSLContext sslcontext = SSLContext.getInstance(SSLv3);
sslcontext.init(kmf.getKeyManagers(), null, null);

SSLServerSocketFactory factory =
sslcontext.getServerSocketFactory();
enc_sock = (SSLServerSocket)
factory.createServerSocket(esvdrp_port);
[/code]

Now i want to connect with the Android-app to this ssl-serversocket.
i've got following problems:
- JKS is not supported by Android
- BKS is not supported by the JAVA-Application
- i don't know how to create an BKS keystore

with the CipherStreams i've got the problem, that i don't know how to
implement a non-block cipher.

Is there some example Code for an encrypted TCP-Connection between an
android-app and an JAVA-Application?

Greets Markus

-- 
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] TextView/Spannable - Applying Alignment to portion of the text

2010-06-20 Thread Markus
Dear Community

I've been struggling with a problem concerning Spannables. What I'm
trying to do is apply a AlignmentSpan.Standard(Alignment.ALIGN_NORMAL)
to the left portion of the text, and
AlignmentSpan.Standard(Alignment.ALIGN_OPPOSITE) to the right portion
of the text.
However, this does not work. ALIGN_OPPOSITE only makes a difference
when I apply it to the whole text.

Here's what I did:

TextView availableText = new TextView(this);
availableText.setText(left right,TextView.BufferType.SPANNABLE);
Spannable span = (Spannable) availableText.getText();
span.setSpan(new AlignmentSpan.Standard(Alignment.ALIGN_NORMAL),0, 4,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new AlignmentSpan.Standard(Alignment.ALIGN_OPPOSITE),5,
span.length()-1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

Can anyone shed some light on this? I am interested in knowing why it
doesen't work and also, if I'm on the wrong track here, an alternative
solution.

Thanks so much!
Cheers, Markus

-- 
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] Communication with the Server

2010-06-10 Thread Markus
Hello!

! try to develope a Android Application that communicate with a
Webserver to talk to Webservices. So the User logged in and a Service
runs in the Background and request every 5 minutes to the Webserver
and get an XML File. The XML File would be parsed and the new jobs
will be insert in the sql-lite db..

So if a User finished a job.. I send an XML File to the Server and
after a successfull response, i mark the data entries as send.

So is that a good workflow or have anybody a better idea?

Regards Markus

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


[android-developers] How to determine current screen brightness?

2010-05-12 Thread Markus
I try to find a way to determine the current screen brightness.

Currently I use Settings.System.getInt(getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS) but unfortunately the result is not
accurate when the phone is set to automatic brightness.

Thanks,
Markus

-- 
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] IPv6 Problem solved

2010-04-05 Thread Markus Schaber
Hi,

Just do document it here (as suggested by evancharlton on freenode
#android-dev), so it's googlable:

On my Debian Lenny x86_64 machine, both the eclipse plugin and the
ddms standalone application were unable to connect to the adb daemon.
adb devices showed both the emulator and my milestone, so that
connection was okay.

ddms and eclipse both kept spitting out the following messages every
second:

57:29 E/DeviceMonitor: Connection attempts: 1
57:30 E/DeviceMonitor: Connection attempts: 2
57:31 E/DeviceMonitor: Connection attempts: 3
57:32 E/DeviceMonitor: Connection attempts: 4
57:33 E/DeviceMonitor: Connection attempts: 5
57:34 E/DeviceMonitor: Connection attempts: 6
57:35 E/DeviceMonitor: Connection attempts: 7
57:36 E/DeviceMonitor: Connection attempts: 8
57:37 E/DeviceMonitor: Connection attempts: 9
57:38 E/DeviceMonitor: Connection attempts: 10
[...]

I tried this for 5 minutes and longer without any connection.

I tried all the usual workarounds, including adb reset in eclipse,
adb kill-server from command line, and rebooting, and asked on the
abovementioned IRC channel.

After hours of trying and googling, I suspected it to be an IPv6
problem, as I found some reports some IPv6 problems under Windows.
However, editing /etc/hosts in analogy to the windows solution did not
solve my problem.

Some tries and googling later, I found the solution: Adding the jvm
argument -Djava.net.preferIPv4Stack=true to both the ddms shell script
and the eclipse.ini vm arguments solved the problem for eclipse and
ddms.

I hope this helps others to solve this problem, which annoyed me for
more than 6 hours now when trying to get sdk_r05 to run, and an equal
amount of time when I had my first try using sdk_r04 some weeks ago.
My hope was that r05 fixes that problem, which is not really true, it
seems.

HTH,
Markus

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-29 Thread Markus
Uhm, people HAVE received Droids.

I would be interested in people from Europe. Has anyone received their
device yet? (Not from ADC of course)

Thank you.

On Mar 27, 10:19 pm, Jason arm...@gmail.com wrote:
 Was the shipper for the DROID someone other than brightpoint?

 On Mar 27, 12:23 pm, niko20 nikolatesl...@yahoo.com wrote:

  Damnit, got a DROID today in Madison WIum I already have a DROID.
  I doubt anyone is ever gonna wanna trade a Nexus one for this..lol

  -

  On Mar 27, 11:21 am, Greg Donald gdon...@gmail.com wrote:

   Droid, Nashville TN.

   --
   Greg Donald
   destiney.com | gregdonald.com

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-24 Thread Markus
I called them too (Switzerland).
Guy did the search but told me there's no package on the way for me.
So either it has not been sent yet or they don't use Fedex over here.

On Mar 24, 8:02 pm, Thomas Riley tomrile...@googlemail.com wrote:
 I tried live chat (in the UK) and it's not much use (same applies on
 phone actually)

 To be able to track they want to know dispatch date, which I of course
 don't know!

 On Mar 24, 6:40 pm, Bryan Allen browne.al...@gmail.com wrote:

  Live chat with FedEx works great. Your address, the shipper name, and you're
  golden. I spent about 4 minutes on it and found out it's arriving today!
  Better than a 20 minute hold on the phone.

  -Bryan

  On Wed, Mar 24, 2010 at 1:14 PM, abowman abow...@gmail.com wrote:
   If you trust your neighbors, just leave a note for them to leave the
   package at your door.

   On Mar 24, 1:19 pm, JasonC jcohe...@gmail.com wrote:
Ya Rocco, they will give you the info even without a tracking number.
I called FedEx yesterday and waited on hold for 20 minutes. Gave them
my name address and phone number and I found out that my phone will be
delivered tomorrow between 8am and 6pm, unfortunately i will be at
work so I will have to drive out to the hub on friday to pick it up.

Jason

On Mar 23, 9:18 pm, Rocco optikalsa...@gmail.com wrote:

 If you're in the US and Google sent you a confirmation number and you
 want to know when you're getting your handset, just give FedEx a call
 from the number you provided Google with when you filled out the form.
 Even without your tracking number, as long as you contact them from
 that number and give the customer service rep your delivery address
 they will be able to tell you when they expect to deliver it. They
 might have you verify the name of the shipper as well which in this
 case is Brightpoint.

 I just did this earlier and found out I should expect my phone between
 the hours of 8am-6pm on Friday March 26th, 2010. Now I no longer have
 to play the guessing game or check this message 8 times a day to see
 if anyone in Oregon got their handset ;)

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

   To unsubscribe from this group, send email to android-developers+
   unsubscribegooglegroups.com or reply to this email with the words REMOVE
   ME as the subject.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-05 Thread Markus
Cool idea. I will definately use this in my next project.
Thanks.

On Mar 4, 11:11 pm, Mark Murphy mmur...@commonsware.com wrote:
 Wayne Wenthin wrote:
  Yeah the rest of us are really interested in your good fortune.  

  Honestly if the market were worth its salt there wouldn't be angry
  customers because we developers that are trying could actually
  communicate with the 1 stars out there that just say crap like FC's too
  much without even trying to contact support.

 Catch and report your exceptions from the field back to you, and you may
 not need them to contact support:

 http://www.androidguys.com/2009/11/16/diagnosing-sporadic-errors/

 For example, I purchased a $10 app just the other day, and I was able to
 get it to crash. The developer had a default exception handler in place,
 but it wasn't automatically sending the stack traces back to him. When I
 followed the instructions and sent the error code to the support email,
 I pointed out the above link.

 The developer turned around, integrated one of the exception-reporting
 libraries, and shot me a beta. I reproduced the crash, and he had a
 stack trace that allowed him to fix the bug.

 Now, in this case, the developer benefited because I actually contacted
 support. However, the real magic was in the crash reporting, which the
 developer could have added without my involvement.

 If users are complaining about FC's, that suggests you do not have any
 default exception handler (see Thread's
 setDefaultUncaughtExceptionHandler()), let alone one that reports crash
 data back to you. Add that, and you'll be armed with more data to help
 you find the bugs in your app that your users are encountering and
 complaining about.

  Stuff
  like this does nothing but anger me because if I not tried to build
  something uniq and just built another fart app I could have got a free
  phone.

 And your proof that all of the top-rated apps are fart apps is...what,
 exactly?

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

 _Android Programming Tutorials_ Version 2.0 Available!

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


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-05 Thread Markus
Surely not, as I'd bet they intend to identify you based on your
market developer order number you had to supply.

@Nikolay: _Very_ good job by the way on Bebbled :)

On Mar 5, 11:52 pm, bryan browne.al...@gmail.com wrote:
 Did anyone else fill out the form with their personal email address
 rather than the one that the Android Device Seeding Program message
 was emailed to? I used my personal address without thinking about it.
 I hope that isn't an issue.

 On Mar 5, 3:02 pm, Nikolay Ananiev devuni...@gmail.com wrote:

  Nothing in the spam folder, so I'll fill the form anyway. Hope they won't
  mind.

  On Fri, Mar 5, 2010 at 10:54 PM, Maps.Huge.Info (Maps API Guru) 

  cor...@gmail.com wrote:
   Nikolay,

   600k+ downloads? This is an Android discussion group, not iPhone...

   Seriously, I would check your spam trap. Also, check what e-mail
   account you signed up for with the market.

   -John Coryat

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

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


[android-developers] Re: OutOfMemory with 9M free heap because of bitmaps!?

2010-03-04 Thread Markus Junginger
Btw, how do SQLite databases fit in here? Does SQLite run inside an
app's process and does it consume memory from the external
allocation space? Does it have limits in memory allocation or will it
just grab any memory it can make use of?

(The app I wrote about earlier does not use SQLite, I was just
wondering generally.)

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


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-04 Thread Markus
Nope, not yet. Though I'm sitting on fire waiting for it ;)

On Mar 4, 10:13 pm, Thomas Riley tomrile...@googlemail.com wrote:
 Ok, so I know its still early days, but has anyone had their dispatch
 confirmation email yet?

-- 
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] OutOfMemory with 9M free heap because of bitmaps!?

2010-03-03 Thread Markus Junginger
Our app has some memory peaks, which let the heap grow to 13M. After
the peak, there's 9M of free heap. Everything's fine until Bitmap
objects come into play. Despite having 9M of free heap creating
Bitmaps, which have only some 100k, now fail with a
OutOfMemoryException!

My theory: Allocation fails if (Java) heap *size* plus external
allocations (e.g. Bitmaps) exceed 16M, no matter that there is lots of
free memory in the heap. The VM could shrink the heap, but actually
does not. Would be quite a flaw in the VM.

Does anyone share this theory?

On the downside of this theory: I do not see anything appropriate
(killing the process is probably not) an app developer could do to
prevent those OutOfMemoryExceptions given that those memory peaks are
legitimate and unavoidable.

Please share your knowledge  thoughts!

Thanks,
Markus

-- 
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: OutOfMemory with 9M free heap because of bitmaps!?

2010-03-03 Thread Markus Junginger
On 3 Mrz., 23:01, Streets Of Boston flyingdutc...@gmail.com wrote:
 Yes, you're right.
I hope I am not, let's see...

 The OOM exception is thrown if your process' memory would exceed
 16MByte (or 24MByte on some phones). This includes non-JVM memory such
 as raw bitmap-data.
That's the easy part.

 You may have 9MByte available in the java-heap,
 but if your process is still holding on to almost 7MByte of bitmap-
 data memory (which is not part of the java heap), you'll get an OOM
 when trying to allocate more memory.
This is getting confusing, let me go back to the example to see if we
are on the same track.

If the heap size is 13M of which 9M are free, it makes 4M of occupied
heap. In theory, that would make a potential 12M for external
allocations (given a 16M limit). My guess is that instead of the 12M
only 3M are actually available on Dalvik. That is, thee potentially
free 9M inside the Dalvik VM heap cannot be used for external
allocations, and Dalvik does not seem to make any attempts to shrink
its heap size.

Again, these are just my interpretations of what's going on. In the
app there are not even huge bitmaps involved, nor a big number of
them. There's a Bitmap cache involved storing in memory with
SoftReferences as a 1st level and storing to files as a 2nd level
cache. I checked for leaks with Eclipse Memory Analyzer without
finding any.

 Also, if i'm not mistaken, the DalvikVM's garbage collector is non-
 compacting.
Which would not make it easier... :/

-- 
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: OutOfMemory with 9M free heap because of bitmaps!?

2010-03-03 Thread Markus Junginger
 catch( Exception e )
 {
   System.gc();
   bm = BitmapFactory.decodeResource( resources, R.drawable.my_bm );

 }

 I know it's not the prettiest, but I've never seen the second attempt
 (after GC) fail.

Interesting. So, what you are saying is that Dalvik's GC does not a
good job freeing memory on its own?

I'll try if this work around makes it any better. However it is
limited because some of the Bitmaps get loaded during initialization
of layouts, where you can hardly interact. Hmm, a try/catch around
each setContentView also? Boy, this is getting ugly... ;)

-- 
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: OutOfMemory with 9M free heap because of bitmaps!?

2010-03-03 Thread Markus Junginger
Thanks guys for all of your replies so far!

 I'm not entirely comfortable with that generalization.  The HeapWorker
 thread wakes up during idle moments and looks for 4K pages with
 nothing in them.  When it finds them, the memory is made available to
 the system again (madvise() system call).
I have not been able to see the heap size shrink yet. Is there any way
(directly or indirectly) to trigger the HeapWorker manually?

 As currently implemented the pixel memory isn't discarded until the
 Bitmap finalizers execute, and finalizers can't run until after the GC
 has finished doing its thing, which is why sometimes allocating a
 bitmap twice in a row succeeds when the first try fails.
What you did not refer to is the tons of free memory in the virtual
heap in my situation, which is the essential point I wanted to make.
So, can you confirm that free memory in the heap is completely
irrelevant (HeapWorker is not triggered, etc.) when trying to allocate
external resources?

Back to the external allocation: I guess calling gc+runFinalization
does not make a difference compared to just gc?

In the end, I do not think running gc to help Dalvik cleaning up the
external allocations won't make much of a difference in my app. With a
steadily growing virtual heap (with tons of free sections in it), the
space for external allocations decreases over time.

 The external alloc stuff is also getting fixed (veterinarian-style) by
 the aforementioned GC people.
At least there's light at the end of the tunnel. :) Can you hint at a
specific release when this will be improved?

Thanks,
Markus

-- 
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: Petition: Google, please improve the Android Market.

2010-02-24 Thread Markus
Tim et al,

I read both the petition and your piece, while I do agree with the
other poster that the maintaining of multiple versions is not my own
preference to approach the fragmentation, I think the petition raises
good points and Tim, I read through your whole post and could NOT
agree more to what you wrote and many of your items should be on top
of any such petition. Some of what you describe should be pretty easy
kills (comparatively :) but really impactful to our sales.

One question though: This is an open group as far as I know, right? As
much as companies do like constructive criticism (and I have seen the
Google guys definitely welcoming constructive feedback), as much can
this hurt the cause when done publicly.
I guess I am wondering if we could find a more closed format for this
discussion and such a petition, for instance only for developers who
have active apps in the market, like a Wiki or protected google doc
where folks have to go through a quick signup process. I think this
could dramatically increase not only the awareness of such a petition
but it would also come without any negative connotation when delivered
to the android team. You can always apply more public pressure if
you feel you don't get heard but again, my gut feel is that a compiled
weighted list signed by active developers would be quite well received
by the team.

In any case, great initiative, great points raised, I'm not trying to
kill it with this comment :)

Markus

On Feb 23, 12:27 pm, Tim H. timho...@gmail.com wrote:
 I agree that the petition should be phrased a little more 'nicely' -
 it shouldn't sound like a complaint form, even though it is ;)

 On Feb 22, 11:20 am, Streets Of Boston flyingdutc...@gmail.com
 wrote:

  About the 325 char limit:
  Maybe i'm a little slow, but I discovered just recently that you can
  put a little more text into your app's description using FireFox than
  when using IE.

  IE adds 2 characters for each newline (\r\n), while FireFox only adds
  1 char (\n only).
  (and in FireFox, the screenshots and promo-image are properly shown...
  not so in IE).

 The fact that you are looking for those couple extra characters shows
 how ridiculously bad we need some of this stuff fixed! :) I am sure
 that Google is working on updates to the market (or I hope), but the
 market is unchanged, since its October 2008 launch - other than the
 September 2009 look refresh, with one functionality update
 (screenshots). The developer console remains unchanged, with the
 exception of being able to add screenshots and teaser images (that
 never get used)

 My short list of needed functionality/comments/recommendations:

 Give the brief description, with additional description link.
 Allow for more than two pics.. a gasp gallery!
 Allow for links to YOUTUBE allowing video! (you know, since there is
 an app that is built in to Google Experience phones?)
 Better USER functionality by showing them the date that the app was
 updated, not just the current version.
 Dev option to provide change history, that can be viewed by the user,
 or better yet, give each app its' own mini forum that we can moderate.
 Dev option to upload LITE and FULL versions for the same app.
 Allow dev to comment on posts, or at the very least.. let the
 developer download their OWN app for free so they can comment.

 For god sakes, update the results a little more frequently, or at the
 very least... add categories for 'today, this week, this month, all
 time' - so the same damn things aren't always displayed! I have seen
 the same 4-5 apps for each category in the 'teaser screens' since they
 launched it... half the time, those teaser apps are already in the top
 of the featured apps or top paid/free sections! The 'Top Paid' and
 'Top Free' sections have had for the most part the same apps since
 launch. I guess it is based on all time sales? The 'Featured Apps'
 section is the only thing that seems to get updated relatively
 frequently, and these are decided upon, and having nothing/little to
 do with user feedback. I need to be able to see what apps users are
 'buzzing' about (see what I did there).. which apps are picking up
 popularity, when big name companies/sites launch their apps - I should
 be able to find them - I can't do this stuff right now.

 More Control of content displayed - Filtering/Blacklisting apps/
 developers - nothing pisses me off more as a developer and a user than
 when I try to go in to 'Just In' and see 50 'web browser' apps from
 the same developer. If I could simply blacklist the app or developer,
 I wouldn't need to deal with this, because I wouldn't see their crap
 again. Of course, that doesn't stop them from just getting another dev
 account, but it would make it more manageable.. and these developers
 wouldn't be so sure that every android user was seeing their 50+ apps
 in 'Just In' - they'd have to work a bit harder get more display time.
 Oh, and fortunately for me, I don't care if I see risque

[android-developers] Figure on transparent background: Change the color?

2009-11-09 Thread Markus
Hello everybody

At the moment I've got an ImageView containing a PNG. This PNG has a
colored object with a transparent background. That works well.

However, now I'd like to be able to set the color of the object, but
STILL have a transparent background.

In case this is unclear, I've illustrated my problem:
http://talionis.net/metter/android/questions/transparencyquestion.jpg


Could anyone tell how to accomplish that? A nudge in the right
direction would do :)


Thank you in advance.

Cheers, Markus

-- 
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] Double quotes in resources?

2009-10-31 Thread Markus
I'm probably missing something obvious, but for some reason I don't
manage to put a string with double quotes in a resources file.

strings.xml:
   resources
  string name=message_empty_folderFolder quot;%squot; is
empty./string
   /resources

LIstFolderActivity.java:
   String format = getResources().getString
(R.string.message_empty_folder);
   System.out.println(format);

Log output:
   Folder %s is empty.

What's eating up the double quotes?

Thanks in advance,
Markus

-- 
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: Double quotes in resources?

2009-10-31 Thread Markus
On Oct 31, 11:28 pm, Mark Murphy mmur...@commonsware.com wrote:
  I'm probably missing something obvious, but for some reason I don't
  manage to put a string with double quotes in a resources file.

  strings.xml:
     resources
        string name=message_empty_folderFolder quot;%squot; is
  empty./string
     /resources

  LIstFolderActivity.java:
     String format = getResources().getString
  (R.string.message_empty_folder);
     System.out.println(format);

  Log output:
     Folder %s is empty.

  What's eating up the double quotes?

 Try using \ and see if that works.

Works, many thanks!

Is this a bug or a feature? I don't see the purpose..

Markus

-- 
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: Double quotes in resources?

2009-10-31 Thread Markus
On Oct 31, 11:40 pm, Mark Murphy mmur...@commonsware.com wrote:
  Is this a bug or a feature? I don't see the purpose..

 I think it's documented somewhere. I remember it from my one book, and I
 doubt I just made it up. ;-)

 So, I vote feature.

Found it on 
http://developer.android.com/guide/topics/resources/available-resources.html:

quoteIf you use an apostrophe or a quote in your string, you must
either escape it or enclose the whole string in the other kind of
enclosing quotes/quote

Does not give a reason though.

Thanks again,
Markus

-- 
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] T2S OnUtteranceCompletedListener not working

2009-10-28 Thread Markus Gursch

Hello

i have a problem to recognize when speak has finished.

here is my code

t2s = new TextToSpeech(this, this);
int result = t2s.setOnUtteranceCompletedListener(completeListener);

result is equal to TextToSpeech.ERROR (-1) - i don't know why.

i speak like this but onUtteranceComplete is not fired:

HashMapString, String params = new HashMapString, String();
params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, theUtId);
t2s.speak(speechText, TextToSpeech.QUEUE_FLUSH, params);

what is the 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
-~--~~~~--~~--~--~---



[android-developers] Re: T2S OnUtteranceCompletedListener not working

2009-10-28 Thread Markus Gursch


Thanks, i saw this entries, but they didnt help me. my problem is at
adding the listener.

but i dont know what i am doing wrong


On 28 Okt., 14:45, blindfold seeingwithso...@gmail.com wrote:
 Perhaps related 
 tohttp://groups.google.com/group/tts-for-android/browse_frm/thread/6d5f...
 or else ask in that group?

 On Oct 28, 2:37 pm, Markus Gursch swordia...@gmail.com wrote:

  Hello

  i have a problem to recognize when speak has finished.

  here is my code

  t2s = new TextToSpeech(this, this);
  int result = t2s.setOnUtteranceCompletedListener(completeListener);

  result is equal to TextToSpeech.ERROR (-1) - i don't know why.

  i speak like this but onUtteranceComplete is not fired:

  HashMapString, String params = new HashMapString, String();
  params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, theUtId);
  t2s.speak(speechText, TextToSpeech.QUEUE_FLUSH, params);

  what is the 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
-~--~~~~--~~--~--~---



[android-developers] Re: T2S OnUtteranceCompletedListener not working

2009-10-28 Thread Markus Gursch

other hints 

i need to know when the speak is over

On 28 Okt., 14:52, Markus Gursch swordia...@gmail.com wrote:
 Thanks, i saw this entries, but they didnt help me. my problem is at
 adding the listener.

 but i dont know what i am doing wrong

 On 28 Okt., 14:45, blindfold seeingwithso...@gmail.com wrote:

  Perhaps related 
  tohttp://groups.google.com/group/tts-for-android/browse_frm/thread/6d5f...
  or else ask in that group?

  On Oct 28, 2:37 pm, Markus Gursch swordia...@gmail.com wrote:

   Hello

   i have a problem to recognize when speak has finished.

   here is my code

   t2s = new TextToSpeech(this, this);
   int result = t2s.setOnUtteranceCompletedListener(completeListener);

   result is equal to TextToSpeech.ERROR (-1) - i don't know why.

   i speak like this but onUtteranceComplete is not fired:

   HashMapString, String params = new HashMapString, String();
   params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, theUtId);
   t2s.speak(speechText, TextToSpeech.QUEUE_FLUSH, params);

   what is the 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
-~--~~~~--~~--~--~---



[android-developers] How to access assets of test project

2009-10-26 Thread Markus

I'd like to load some data from the assets folder of my test project.

Unfortunately AndroidTestCase.getContext().getAssets() returns an
AssetManager for the target project, not the test project.

Class android.app.Instrumentation seems to have what I am looking for:
getContext() and getTargetContext. But from where do I get an instance
of that class?

Thanks in advance,
Markus
--~--~-~--~~~---~--~~
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] Create database on sd card?

2009-10-21 Thread Markus

I want to create a database that may become relatively large, a few
megabytes maybe. maybe I should put this database on the sd card to
save internal storage.

With SQLiteDatabase.openOrCreateDatabase() this should be quite
straightforward.

But I'd like to use SQLiteOpenHelper since it takes care of creating
and updating the db so nicely. Unfortunately SQLiteOpenHelper seems to
be restricted to the internal storage.

Now I have noticed that SQLiteOpenHelper uses
Context.openOrCreateDatabase() and Context.getDatabasePath()
internally.

Would it be too much of a dirty hack if I wrote my own ContextWrapper
that implements these methods to create a database on the sd card? Or
would this be a legitimate use of the API?

Thanks,
Markus
--~--~-~--~~~---~--~~
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] ListView and Adapter with Button

2009-10-19 Thread Markus

Hello,

I have a unusual problem. I had a ListView that I fill with my own
Adapter.
This Adapter had a few elements with a TableLayout. In this
Tablelayout I added one Row with text on the left and a button on the
right.
But the Button is optional...

So I get a list with 6 Elements without a button and 6 with button. I
set the onItemClickListener on the list...
Thats all no problem.

But.. I click on a element without button the listener startet.. I
click on the element with button, no reaction. But the button is
clickable... Could it be that android disabled the click event on a
element if the element contains a buttonor something other clickable?

I tested it with a Row with text on the left an text on the right. The
listener works...

Thanks for 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] Default display unit px or dp?

2009-10-12 Thread Markus

I always thought the default display unit would be pixels.

But when I run my application on WVGA800 in the emulator the lines are
five pixels wide even though I called Paint.setStrokeWidth(3). The
same seems to happen with Drawable.setBounds(); the value I provide
gets multiplied by 1.5 internally.

If that's the case, how can I specify pixels instead of dips if I want
pixels?

Can someone clarify this?

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



[android-developers] Re: Default display unit px or dp?

2009-10-12 Thread Markus

Specifying android:minSdkVersion=4 in the android manifest did the
trick.

Thanks,
Markus

On Oct 12, 11:19 pm, Romain Guy romain...@google.com wrote:
 The Java APIs work only with pixels. Your app is probably running in
 compatibility mode.



 On Mon, Oct 12, 2009 at 12:20 PM, Markus markus.wiederk...@gmail.com wrote:

  I always thought the default display unit would be pixels.

  But when I run my application on WVGA800 in the emulator the lines are
  five pixels wide even though I called Paint.setStrokeWidth(3). The
  same seems to happen with Drawable.setBounds(); the value I provide
  gets multiplied by 1.5 internally.

  If that's the case, how can I specify pixels instead of dips if I want
  pixels?

  Can someone clarify this?

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

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Activate network on debug device

2009-10-01 Thread Markus

Hello,

I developer a android app. Today I get the HTC hero for testing. I
installed the driver and can start the app on the device. The problem
is that I need a network connection. I am connect via usb to my
desktop computer. Can the device that is on usb connect use my i-net
connection to send a request?

Thanks for 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] SMS Database with new Hero ROM

2009-09-24 Thread Markus

Hello

I've developed an sms application. With the new Hero rom, the app
doesen't work anymore. It seems as if the database has changed.

I use the following approach to get the data I need:

private String[] mProjection = new String[]
{thread_id,address,body,read,date,m_type,type};
private Uri mUri = Uri.parse(content://mms-sms/conversations);

Cursor smsCursor= context.getContentResolver().query
(mUri,mProjection,null, null,DATE DESC);

This code now suddenly crashes on HTC Hero phones, complaining about
missing tables (thread_id for instance).


How can I fix this? Where do I get additional information about new
db design? And more generally: How in gods name am I supposed to
handle different behaviour on different phones when I develop my apps
on the standard SDK???

--~--~-~--~~~---~--~~
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 :Re: [android-developers] Re: SMS Database with new Hero ROM

2009-09-24 Thread markus etter
Subject:
Re: [android-developers] Re: SMS Database with new Hero ROMFrom:
Markus Etter met...@talionis.netDate:
Thu, 24 Sep 2009 20:33:58 +0200To:
android-developers@googlegroups.com

Mark Murphy wrote:

I've developed an sms application. With the new Hero rom, the app
doesen't work anymore. It seems as if the database has changed.

I use the following approach to get the data I need:

private String[] mProjection = new String[]
{thread_id,address,body,read,date,m_type,type};
private Uri mUri = Uri.parse(content://mms-sms/conversations);

Cursor smsCursor= context.getContentResolver().query
(mUri,mProjection,null, null,DATE DESC);

This code now suddenly crashes on HTC Hero phones, complaining about
missing tables (thread_id for instance).

How can I fix this? Where do I get additional information about new
db design? And more generally: How in gods name am I supposed to
handle different behaviour on different phones when I develop my apps
on the standard SDK???



Do you have any evidence that the SMS database is part of Android's public
API?

If it is not -- and it does not seem to appear in android.provider, where
the officially-supported providers reside -- then you will run into
problems like this. Any device manufacturer is welcome to replace the
built-in applications, including SMS.

Solving this may not be possible, unless you can do queries with wildcards
on the content provider (never tried that) and can therefore inspect at
least the column names that way. Even then, that implies that you can
learn the schemas for all devices that change the original schema and can
adapt your application to each.

This is not significantly different than building an application that
assumes the existence of Outlook that then crashes when the user only has
Outlook Express, Mozilla Thunderbird, or some other email client.

If there isn't an issue already, you might consider putting an issue in
http://b.android.com, asking for a common SMS store to become part of the
official API (again, assuming it is not official already).



Hello Mark

Thank you for your quick and enlightening reply. It wasn't clear to me that
something I can access using the standard SDK might actually not be part of
the public API. If it actually is not it would completely prevent the
development of alot of SMS applications.
There actually IS an open issue for this located here:
http://code.google.com/p/android/issues/detail?id=914q=smscolspec=ID%20Type%20Status%20Owner%20Summary%20Stars

However there still are SMS apps that do not seem to be influenced by this
problem; ergo I assume there's some dirty way around?


Cheers, Markus

--~--~-~--~~~---~--~~
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] Proxy support not working in Android 1.6 emulator

2009-09-17 Thread Markus Junginger

After upgrading to SDK 1.6 the emulator seems to be unable the
Internet through a proxy (-http-proxy option). The same is working in
SDK 1.5R3.

Can anyone confirm? Did I miss something?

Thanks
Markus

--~--~-~--~~~---~--~~
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: WebKit capabilities

2009-09-16 Thread Markus Junginger

I am also very interested in some Android specific documentation for
Android's WebKit. Just read a post from January that touch events are
not supported in JavaScript, which are available on the iPhone. What
about, for example, orientation events? Anyway, a clear reference for
WebKits' (Chrome's) capabilities seems to be missing in the Android
documentation.

Btw, I would love to see jQTouch on Android, so I hope David gets some
help.

Thanks,
Markus
--~--~-~--~~~---~--~~
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: Scrollable area like in Robo Defense game(both horizontal and vertical)

2009-08-20 Thread Markus Junginger

On Aug 20, 2:26 am, Dan Sherman impact...@gmail.com wrote:
 I would imagine that robo defence is doing custom scrolling within their
 application, and not relying on a UI component for that piece.

They must use there own custom UI component because it's not supported
by Android 1.5. Most games won't scroll any child views but will
implement a single game View and handle scrolling just for this
view. At least that's how I do it.

Nevertheless, what I was looking for is view something else. To
clarify my requirements a little more: there is just a fixed size View
which is larger than the screen and you need to scroll that and its
child views in both directions. I hope someone shares his/her
solution.
--~--~-~--~~~---~--~~
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: Scrollable area like in Robo Defense game(both horizontal and vertical)

2009-08-19 Thread Markus Junginger

I'm in the same boat and need a custom ScrollView capable of scrolling
in both directions. Before I start it on my own, I wanted to check
here first. This has probably done before a couple of times and maybe
someone does not mind sharing some code?

Anyone knows if Donut is going to support scrolling in both
directions?

Thanks,
Markus
--~--~-~--~~~---~--~~
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] Secure data storage (rooted phones)

2009-07-20 Thread Markus Junginger

Hello everyone,

Let's say there are hard security requirements that must include the
possibility of rooting a phone. So when a phone gets lost, the
sensitive data on it should still be as secure as possible even if the
phone is rooted.

Any hints and ideas on this?

The first thought was that one could generate a key based on some
device/user ID, but this information is available to all applications.
So given some reverse engineering and effort, this can be cracked too.

I am not exactly a security expert, but maybe there are some around
here in this group.

Thanks for all comments!

Regards,
Markus




--~--~-~--~~~---~--~~
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: Secure data storage (rooted phones)

2009-07-20 Thread Markus Junginger

Time and resources are limited, of course. :)

To further clarify the objective: a single file should be encrypted.
The other important point is, that there should be no user interaction
like password entry.

Given this, I guess a secure solution is impossible on rooted phones
in a strict sense (again, I am no security expert) because you can
reverse engineer code and access all data. The question is if there
are means to increase security to a level that makes significantly
harder for attackers while spending only a reasonable effort.

For example, I have heard of Keychain, which Developers can use on
MacOS X and iPhone to store data securely, but I do not know how it
works and how secure it actually is.

Any feedback and ideas are welcome!

Thanks,
Markus
--~--~-~--~~~---~--~~
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] InputMethodService and landscape mode

2009-06-19 Thread Markus

Hi,

I've implemented a new InputMethodService, which uses a GLSurfaceView
to display the letters in a 3D scene. In portrait mode, it is working
fine now, but not in landscape mode. It is always launching in
fullscreen mode and displaying a textinput box from the base class. Is
there are way to disable the textinput box?

Moreover, my GLSurfaceView is not displayed at all in landscape mode.
Therefore, I've set onEvaluateFullscreenMode() to return always false
to disable the fullscreen mode, but in this case, nothing is shown at
all. So what do I have to do to use the same displaying mode  in
landscape mode as in protrait mode?

Sometimes, the services also starts without focus. Where can I set to
give always focus to the service?

bye
Markus

--~--~-~--~~~---~--~~
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] ListView app dies

2009-06-16 Thread Markus Gursch

Hey at all,
i have a strange problem and i dont know what to do

i have an activity with an layout
-linearlayout
   - listview
   - textview ( on the bottom line )


to make some nice listview lines i have my own adapter (extends
baseadapter)

when i show this activity everything looks ok, but when i try to
scroll it, the app dies with following debug messages:

06-16 15:44:44.908: INFO/DEBUG(539): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
06-16 15:44:44.908: INFO/DEBUG(539): Build fingerprint: 'generic/sdk/
generic/:1.5/CUPCAKE/147336:eng/test-keys'
06-16 15:44:44.918: INFO/DEBUG(539): pid: 825, tid: 826  
com.moneymanager.android 
06-16 15:44:44.918: INFO/DEBUG(539): signal 11 (SIGSEGV), fault addr
0004
06-16 15:44:44.918: INFO/DEBUG(539):  r0 0004  r1 40021800  r2
0004  r3 ad3296c5
06-16 15:44:44.918: INFO/DEBUG(539):  r4   r5   r6
ad342da5  r7 41039fb8
06-16 15:44:44.918: INFO/DEBUG(539):  r8 100ffd00  r9 41039fb0  10
41039fa0  fp 0001
06-16 15:44:44.918: INFO/DEBUG(539):  ip ad35b874  sp 100ffce8  lr
ad3296cf  pc afb045a8  cpsr 0010
06-16 15:44:45.418: INFO/DEBUG(539):  #00  pc 45a8  /
system/lib/libcutils.so
06-16 15:44:45.437: INFO/DEBUG(539):  #01  lr ad3296cf  /
system/lib/libandroid_runtime.so
06-16 15:44:45.477: INFO/DEBUG(539): stack:
06-16 15:44:45.487: INFO/DEBUG(539): 100ffca8  
06-16 15:44:45.507: INFO/DEBUG(539): 100ffcac  
06-16 15:44:45.517: INFO/DEBUG(539): 100ffcb0  
06-16 15:44:45.517: INFO/DEBUG(539): 100ffcb4  
06-16 15:44:45.538: INFO/DEBUG(539): 100ffcb8  
06-16 15:44:45.548: INFO/DEBUG(539): 100ffcbc  41f844ec
06-16 15:44:45.567: INFO/DEBUG(539): 100ffcc0  0001
06-16 15:44:45.577: INFO/DEBUG(539): 100ffcc4  41f844ec
06-16 15:44:45.587: INFO/DEBUG(539): 100ffcc8  0001
06-16 15:44:45.597: INFO/DEBUG(539): 100ffccc  
06-16 15:44:45.597: INFO/DEBUG(539): 100ffcd0  
06-16 15:44:45.617: INFO/DEBUG(539): 100ffcd4  410a79d0
06-16 15:44:45.627: INFO/DEBUG(539): 100ffcd8  100ffd30
06-16 15:44:45.637: INFO/DEBUG(539): 100ffcdc  000a
06-16 15:44:45.658: INFO/DEBUG(539): 100ffce0  df002777
06-16 15:44:45.658: INFO/DEBUG(539): 100ffce4  e3a070ad
06-16 15:44:45.668: INFO/DEBUG(539): #00 100ffce8  
06-16 15:44:45.677: INFO/DEBUG(539): 100ffcec  ad3296cf  /system/
lib/libandroid_runtime.so
06-16 15:44:45.686: INFO/DEBUG(539): 100ffcf0  100ffd20
06-16 15:44:45.696: INFO/DEBUG(539): 100ffcf4  ad342db5  /system/
lib/libandroid_runtime.so
06-16 15:44:45.718: INFO/DEBUG(539): 100ffcf8  40021800
06-16 15:44:45.718: INFO/DEBUG(539): 100ffcfc  ad00e3b8  /system/
lib/libdvm.so
06-16 15:44:45.737: INFO/DEBUG(539): 100ffd00  410a79d0
06-16 15:44:45.737: INFO/DEBUG(539): 100ffd04  00141850  [heap]
06-16 15:44:45.747: INFO/DEBUG(539): 100ffd08  ad342da5  /system/
lib/libandroid_runtime.so
06-16 15:44:45.766: INFO/DEBUG(539): 100ffd0c  40021800
06-16 15:44:45.766: INFO/DEBUG(539): 100ffd10  1071
06-16 15:44:45.776: INFO/DEBUG(539): 100ffd14  00141850  [heap]
06-16 15:44:45.788: INFO/DEBUG(539): 100ffd18  100ffd20
06-16 15:44:45.788: INFO/DEBUG(539): 100ffd1c  ad040a8d  /system/
lib/libdvm.so
06-16 15:44:45.788: INFO/DEBUG(539): 100ffd20  41039fb0
06-16 15:44:45.788: INFO/DEBUG(539): 100ffd24  41fffe7d
06-16 15:44:45.807: INFO/DEBUG(539): 100ffd28  ad342da5  /system/
lib/libandroid_runtime.so
06-16 15:44:45.817: INFO/DEBUG(539): 100ffd2c  100ffd98
06-16 15:44:48.758: INFO/ActivityManager(569): Process
com.moneymanager.android (pid 825) has died.
06-16 15:44:48.798: INFO/WindowManager(569): WIN DEATH: Window
{43722ae0 com.moneymanager.android/
com.moneymanager.android.StartActivity paused=false}
06-16 15:44:48.828: INFO/WindowManager(569): WIN DEATH: Window
{435c5150 com.moneymanager.android/
com.moneymanager.android.OverviewActivity paused=false}


can anyone help me with this 

thanks a lot

--~--~-~--~~~---~--~~
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] ListView app dies

2009-06-16 Thread Markus Gursch

hey all

i have an activity with layout

- linearlayout
   - listview
   - textview ( on the bottom line )


to make nice rows in the listview i have my own adapter. when i show
the activity everything looks fine until i try to scroll. then the app
crashes with following messages:

06-16 15:44:44.908: INFO/DEBUG(539): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
06-16 15:44:44.908: INFO/DEBUG(539): Build fingerprint: 'generic/sdk/
generic/:1.5/CUPCAKE/147336:eng/test-keys'
06-16 15:44:44.918: INFO/DEBUG(539): pid: 825, tid: 826  
com.moneymanager.android 
06-16 15:44:44.918: INFO/DEBUG(539): signal 11 (SIGSEGV), fault addr
0004
06-16 15:44:44.918: INFO/DEBUG(539):  r0 0004  r1 40021800  r2
0004  r3 ad3296c5
06-16 15:44:44.918: INFO/DEBUG(539):  r4   r5   r6
ad342da5  r7 41039fb8
06-16 15:44:44.918: INFO/DEBUG(539):  r8 100ffd00  r9 41039fb0  10
41039fa0  fp 0001
06-16 15:44:44.918: INFO/DEBUG(539):  ip ad35b874  sp 100ffce8  lr
ad3296cf  pc afb045a8  cpsr 0010
06-16 15:44:45.418: INFO/DEBUG(539):  #00  pc 45a8  /
system/lib/libcutils.so
06-16 15:44:45.437: INFO/DEBUG(539):  #01  lr ad3296cf  /
system/lib/libandroid_runtime.so
06-16 15:44:45.477: INFO/DEBUG(539): stack:
06-16 15:44:45.487: INFO/DEBUG(539): 100ffca8  
06-16 15:44:45.507: INFO/DEBUG(539): 100ffcac  
06-16 15:44:45.517: INFO/DEBUG(539): 100ffcb0  
06-16 15:44:45.517: INFO/DEBUG(539): 100ffcb4  
06-16 15:44:45.538: INFO/DEBUG(539): 100ffcb8  
06-16 15:44:45.548: INFO/DEBUG(539): 100ffcbc  41f844ec
06-16 15:44:45.567: INFO/DEBUG(539): 100ffcc0  0001
06-16 15:44:45.577: INFO/DEBUG(539): 100ffcc4  41f844ec
06-16 15:44:45.587: INFO/DEBUG(539): 100ffcc8  0001
06-16 15:44:45.597: INFO/DEBUG(539): 100ffccc  
06-16 15:44:45.597: INFO/DEBUG(539): 100ffcd0  
06-16 15:44:45.617: INFO/DEBUG(539): 100ffcd4  410a79d0
06-16 15:44:45.627: INFO/DEBUG(539): 100ffcd8  100ffd30
06-16 15:44:45.637: INFO/DEBUG(539): 100ffcdc  000a
06-16 15:44:45.658: INFO/DEBUG(539): 100ffce0  df002777
06-16 15:44:45.658: INFO/DEBUG(539): 100ffce4  e3a070ad
06-16 15:44:45.668: INFO/DEBUG(539): #00 100ffce8  
06-16 15:44:45.677: INFO/DEBUG(539): 100ffcec  ad3296cf  /system/
lib/libandroid_runtime.so
06-16 15:44:45.686: INFO/DEBUG(539): 100ffcf0  100ffd20
06-16 15:44:45.696: INFO/DEBUG(539): 100ffcf4  ad342db5  /system/
lib/libandroid_runtime.so
06-16 15:44:45.718: INFO/DEBUG(539): 100ffcf8  40021800
06-16 15:44:45.718: INFO/DEBUG(539): 100ffcfc  ad00e3b8  /system/
lib/libdvm.so
06-16 15:44:45.737: INFO/DEBUG(539): 100ffd00  410a79d0
06-16 15:44:45.737: INFO/DEBUG(539): 100ffd04  00141850  [heap]
06-16 15:44:45.747: INFO/DEBUG(539): 100ffd08  ad342da5  /system/
lib/libandroid_runtime.so
06-16 15:44:45.766: INFO/DEBUG(539): 100ffd0c  40021800
06-16 15:44:45.766: INFO/DEBUG(539): 100ffd10  1071
06-16 15:44:45.776: INFO/DEBUG(539): 100ffd14  00141850  [heap]
06-16 15:44:45.788: INFO/DEBUG(539): 100ffd18  100ffd20
06-16 15:44:45.788: INFO/DEBUG(539): 100ffd1c  ad040a8d  /system/
lib/libdvm.so
06-16 15:44:45.788: INFO/DEBUG(539): 100ffd20  41039fb0
06-16 15:44:45.788: INFO/DEBUG(539): 100ffd24  41fffe7d
06-16 15:44:45.807: INFO/DEBUG(539): 100ffd28  ad342da5  /system/
lib/libandroid_runtime.so
06-16 15:44:45.817: INFO/DEBUG(539): 100ffd2c  100ffd98
06-16 15:44:48.758: INFO/ActivityManager(569): Process
com.moneymanager.android (pid 825) has died.
06-16 15:44:48.798: INFO/WindowManager(569): WIN DEATH: Window
{43722ae0 com.moneymanager.android/
com.moneymanager.android.StartActivity paused=false}
06-16 15:44:48.828: INFO/WindowManager(569): WIN DEATH: Window
{435c5150 com.moneymanager.android/
com.moneymanager.android.OverviewActivity paused=false}


can anyone help me 

thanks a lot

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



[android-developers] Android Workflow

2009-06-03 Thread Markus

Hello,

I try to develop a Android Application but I don't know how to handle
the workflow.
All examples are using one Activity and add some small functions. But
how is it if
I need a lot of more functions and views.

I don't think that all should be in one activity, so I checked out the
k9mail source code
and let me inspire ;)

I found this code:

Accounts.actionLaunch(this);
finish();

public static void actionLaunch(Context context) {
Intent intent = new Intent(context, Accounts.class);
intent.putExtra(EXTRA_STARTUP, true);
context.startActivity(intent);
}

The start from a activity another and destroy the other. So is that
the correct workflow of developing apps in android? Or is all
functions in one activity recommend?

Thanks for help.

PS: I am a struts developer so I mostly create for a new part of my
app a new action. So iam realy confuse with the android...

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



[android-developers] SSL Certificate HTTPClient

2009-05-28 Thread Markus

Hello,

I had configure a Tomcat webserver with SSL and client autification.
So I need a clienKey.p12 File to visit the site. If I import the key
into Firefox, it works fine.

So I tried to develop a Client from normal Java. That works:

---

final static String KEYSTORE_FILE   = file:///C:/Programme/Java/
jdk1.6.0_13/bin/clientKey.p12;
final static String PASSWORD= rAtIoNaLcLiEnT;

public static void main(String[] args) throws Exception {
Protocol authhttps = new Protocol(https, new
AuthSSLProtocolSocketFactory(new URL(KEYSTORE_FILE), PASSWORD,new URL
(KEYSTORE_FILE), PASSWORD), 8443);

HttpClient client = new HttpClient();
client.getHostConfiguration().setHost(localhost, 8443, 
authhttps);
GetMethod httpget = new 
GetMethod(/Head/android/services/login.do?
user=Jaeckpassword=asd);
int statuscode = client.executeMethod(httpget);
if(statuscode == 200) {
String xmlResponse =
httpget.getResponseBodyAsString();
System.out.println(xmlResponse);
} else {
System.err.println(Statuscode:  + statuscode);
System.err.println(Fehler beim Aufruf des Webservice);
}
}

---

Now I try to develope a Client into Android and I am getting crazy

Here my two Android implementation:

---

boolean first = true;

KeyStore key = KeyStoreHelper.getKeyStore(getApplication());

if(first) {

SSLSocketFactory sslSocketFactory = new 
SSLSocketFactory(key,
rAtIoNaLcLiEnT);

HttpParams parameters = new BasicHttpParams();

SchemeRegistry schemeRegistry = new 
SchemeRegistry();

//  sslSocketFactory.setHostnameVerifier
(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);

schemeRegistry.register(new Scheme(https, 
sslSocketFactory,
8443));

ClientConnectionManager manager = new 
ThreadSafeClientConnManager
(parameters, schemeRegistry);

HttpClient httpClient = new 
DefaultHttpClient(manager,
parameters);


httpClient.getParams().setParameter(http.connection.timeout,
new Integer(3000));

HttpGet ping = new 
HttpGet(https://192.168.0.22:8443;);
HttpResponse response = httpClient.execute(ping);

int status = response.getStatusLine().getStatusCode();

if(status == 200) {
InputStream content = 
response.getEntity().getContent();
int c = -1;
StringBuffer buffer = new StringBuffer();
while((c=content.read()) != -1) {
buffer.append((char)c);
}
content.close();
Log.i(EXAMPLE, buffer.toString());
} else {
Log.i(EXAMPLE, status + );
}
} else {

KeyManagerFactory kmf = 
KeyManagerFactory.getInstance(X509);

kmf.init(key, rAtIoNaLcLiEnT.toCharArray());

TrustManagerFactory tmf = 
TrustManagerFactory.getInstance
(X509);

tmf.init(key);

SSLContext sc = SSLContext.getInstance(TLS);
sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), 
new
SecureRandom());

javax.net.ssl.SSLSocketFactory f = 
sc.getSocketFactory();
SSLSocket c = (SSLSocket) 
f.createSocket(192.168.0.22, 8443);
c.startHandshake();
BufferedReader r = new BufferedReader(new 
InputStreamReader
(c.getInputStream()));

}

---

I always geht the following Exception:

 java.io.IOException: SSL handshake failure: Failure in SSL library,
usually a protocol error
 error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad
certificate (external/openssl/ssl/s3_pkt.c:1053 0x1be510:0x0003)
 at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconnect
(Native Method)
 at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake
(OpenSSLSocketImpl.java:308)
 at org.apache.http.conn.ssl.AbstractVerifier.verify
(AbstractVerifier.java:92)
 at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket
(SSLSocketFactory.java:321)
 at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection
(DefaultClientConnectionOperator.java:129)
 at 

[android-developers] Re: OutofMemory exception when dealing with large Bitmaps

2009-03-29 Thread Markus Junginger

On Mar 27, 5:10 pm, mark.ka...@gmail.com wrote:
    This is a common problem when using the BimapFactory.decode, there
 is a bug or memory leak. We've had lengthy discussions about this in
 previous threads. Using smaller bitmaps, using bitmap.recycle(), and
 turning down the sample size can mitigate, but not eliminate this
 problem.

I use BitmapFactory a lot for all sizes of bitmaps (e.g. 2 mega
pixels) and I am not aware of any problems with it. I remember a
similar discussion here where Romain wrote he's sure it's not
BitmapFactory bug. So I am curious about this issue.

Btw, I think if you rotate a 1MP image, I would not be surprised if it
takes more than 10M of memory. The internal bitmap during rotation
might be bigger ( 2MP), especially at 45 degrees.

If 16 bits per pixel is OK in terms of quality: they just need half
the memory.

Markus

--
http://greenrobot.de

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



[android-developers] Re: How to track memory consumption? (Bitmaps)

2009-03-27 Thread Markus Junginger

Thanks Michael for your reply.

On Mar 27, 12:07 am, Michael MacDonald googlec...@antlersoft.com
wrote:
 AFAIK, bitmaps *are* created outside the Java heap, and there is a limit
 of 16MB imposed on the *sum* of the Java heap and the total of the
 allocated bitmaps.
So, does this mean, that there is currently no instrumentation for a
reliable memory tracking in Android as of today? If the sum of Java
and native heap counts, it would very helpful to have this value
accessible. From another viewpoint one could say the jav.lang.Runtime
memory stats are buggy because they do not count all resources. Which
leads to the next question: which resources are invisible to the
memory stats? I bet all media resources fall in this category.


 I don't know what you can look at to tell exactly how big the bitmap is,
 but I think they are essentially the size you think they would be: i.e.,
 4 bytes per pixel for 24-bit color 8-bit alpha.
Yup, trying to approximate it yourself seems the only option left. :\

In my test case each Bitmap was around 2.4 MB (1664x768 16 bit, no
alpha). On the fifth, when it crashed, it sums up to 12 MB. The
java.lang.Runtime stats say that 2 MB are allocated by Java objects.
So another ~2MB are missing. This may make sense, because at that
point the app holds other resources as well. It does not sum up to 2
MB (only ~1 MB), but there may be memory fragmentation issues as well.

Nevertheless, I would really appreciate a reliable memory
instrumentation. Especially when one needs to debug when theory and
practice do not fit together nicely like in my test case.
--~--~-~--~~~---~--~~
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: The problem about the sensor!!!

2009-03-27 Thread Markus Junginger

I can confirm this issue. Since I switched from portrait to landscape,
the sensor values are messed up *sometimes* (swapped) and then I need
to restart the app!
Did we miss something or are the sensor values buggy in landscape
mode?

--~--~-~--~~~---~--~~
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: The problem about the sensor!!!

2009-03-27 Thread Markus Junginger

Reading the bold docs in upper case is always good. :) I did not
remember this info, and it's working as expected. Thanks!

BUT: I use a *fixed* landscape orientation, so the orientation should
not change. On the screen it does not when opening the keyboard, but
if the sensor does it seems more like a bug to me. At least it's a
pretty weird behaviour and I cannot make up a use case where it would
make sense.
--~--~-~--~~~---~--~~
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: The problem about the sensor!!!

2009-03-27 Thread Markus Junginger

On Mar 27, 11:11 am, Lukasz M lukasz.mosd...@gmail.com wrote:
 I had the same problem.
 I fixed it using a static sensor-reading object. Therefore while
 changing between activities sensors didnt swap.
But what happens when you start the app with the keyboard open?
Wouldn't you have swapped values then?

I think using the raw sensor values ([3], [4], and [5]) should be
better.

Oh, there's probably a problem using the raw values in the future: I
guess they will be swapped on devices that will come with a landscape
format screen, like the Kogan device.

So we have the choice if our app breaks now or later... ;)

Does anyone know how the orientation sensor sensor works in cupcake?
Does it handle a fixed orientation correctly?



--~--~-~--~~~---~--~~
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: Anything on Android that can do smooth scrolling?

2009-03-27 Thread Markus Junginger

I strongly agree with the idea that foreground processes should be
preferred. Currently I develop a game, which - like most games -
relies on a constant high frame rate. At first, the game pretty sloppy
until I realized some background app was draining CPU resources. So I
uninstalled some of them until it ran smoothly. Clearly, this is
nothing you want to tell a user to do.

So, my first thought on how to solve this is a guaranteed CPU slice
for the foreground app. Let the foreground task constantly get 90-95%
of the CPU time if it needs it, no matter what's running in the
background. The remaining 5-10% should be enough for background tasks.
I think that's perfectly fine if, for example, emails are received a
little slower when the user plays a game. Of course, if the foreground
task does not use the CPU entirely, background tasks should be able to
get a bigger slice.

Oh, and by the way, what about a JIT or a hotspot compiler? If Android
apps would be running a factor ~10 the problem would be smaller by the
same factor. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to track memory consumption? (Bitmaps)

2009-03-26 Thread Markus Junginger

How can one track memory consumption in Android? The Android Heap
view in Eclipse and java.lang.Runtime methods seem failing for my
purpose.

I tried to figure out how much memory my app consumes in order to make
decisions for future directions. Most of the memory goes into Bitmap
objects. Just to test memory consumption I created huge bitmaps in a
Loop and logged the java.lang.Runtime memory values:
created bitmap (610k free, 2371k total, 16384k max)
created bitmap (615k free, 2371k total, 16384k max)
created bitmap (615k free, 2371k total, 16384k max)
created bitmap (615k free, 2371k total, 16384k max)

Nothing seems to hapen, but on the fifth Bitmap:
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:343)
at de.greenrobot.colorball.GameView.init(GameView.java:86)

This seems confusing at first. Is java.lang.Runtime the right place to
check application memory stats in Android at all? Are Bitmaps
allocated outside the app's heap? How can I track it?

Thanks
Markus

--
http://greenrobot.de
http://jars.de

--~--~-~--~~~---~--~~
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: Loading 3D Models

2009-03-11 Thread Markus Feuerstein
Hi!
I'm really interested in this issue too! I would be very pleased if someone
could share their experience!

Anyway, does someone know some good opengl 'tutorials' or documentations?

Regards markus

On Mar 11, 2009 9:53 AM, geoff geoff@gmail.com wrote:


How are people here loading in their models?

I'm just manually parsing a OBJ file into my own model class and
drawing that.




--~--~-~--~~~---~--~~
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: TERRIBLE BUG IN MARKET APPLICATION (was Re: Paid apps related questions discussion list?)

2009-03-02 Thread Markus Junginger

I wonder if it might be the same issue I ran into:
http://groups.google.com/group/android-developers/browse_thread/thread/c529496c831eded2/e0e8a406084f0a24
http://code.google.com/p/android/issues/detail?id=2047

I have only free apps, but paid apps are always copy protected, right?
So, if apps break that rely on file / DB access, and the others don't
it could make sense.
--~--~-~--~~~---~--~~
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] JKS or PKCS12 Keystores

2009-03-01 Thread Markus

Hi,

I've read that I can't import private and public keys from a PKCS12 or
JKS-Keystore in order to sign or encode a message within my android-
application.

Are there any other possibilites to import my private key into an app?

Is it planned to support these keystores?

--~--~-~--~~~---~--~~
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: What happens between two View.onDraw calls? (Game, FPS)

2009-02-27 Thread Markus Junginger

Hi Romain, thanks for your reply.

On Feb 27, 10:42 pm, Romain Guy romain...@google.com wrote:
 You cannot achieve more than 60 fps because of the way the UI is
 sync'd with the underlying hardware.
So basically the framework waits for the next update cycle, I assume?

I still wonder about what's going on behind the scene. When I operate
on the Canvas, a pixel buffer is probably filled directly (Bitmap)? Is
this buffer/bitmap then copied once (for every frame) into a hardware
buffer, which is the source for the hardware display?

 The invalidate/onDraw mechanism
 can be very costly for a game if you have a deep view  hierarchy.
There is just one View, so that would be OK in terms of costs? Or are
there any less costly ways?

So the advantage of using a SurfaceView would be that one could use
these in between times to prepare the next frame, I suppose? So,
this might result in a smoother result (when the timing is right)...

Any other advantages/disadvantages I missed?
--~--~-~--~~~---~--~~
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: What happens between two View.onDraw calls? (Game, FPS)

2009-02-27 Thread Markus Junginger

Thanks for the clarification.

I will switch to SurfaceView some time. Maybe I will do some
comparisons in terms of performance of the two approaches. Anyone done
this before?

Another thought was if it would matter in terms of performance if one
could directly write to hardware buffers to prevent copying. But I
guess copying 300KB (320x480x2 Bytes) of memory for every frame does
not take long anyway.

Markus
--~--~-~--~~~---~--~~
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: Amazon Web Services (AWS) from Android

2009-02-25 Thread Markus Junginger



On Feb 25, 1:27 pm, Sena Gbeckor-Kove s...@imkon.com wrote:
 Use a proxy server or adapter?

I think that does not make a difference to Amazon - they seem to
disallow using the data on mobile devices, no matter where the data
came from.
--~--~-~--~~~---~--~~
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: Amazon Web Services (AWS) from Android

2009-02-23 Thread Markus Junginger

Btw, if you are talking about Amazon Associates Web Service:
http://aws.amazon.com/agreement/#5.1
5.1.5. Unless we have provided you our express written consent in
advance, you are not permitted to use Amazon Associates Web Service in
connection with any handheld, mobile or mobile phone application.

--~--~-~--~~~---~--~~
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] Broken after update: FileNotFoundException on openFileOutput

2009-02-20 Thread Markus Junginger

In the Android Market, I saw that users of my app had serious
problems:
http://www.cyrket.com/package/de.jars.android.quicksearch

After updating to a new version from the Market, the app became
unusable. This line is causing the trouble:
FileOutputStream fileOut = context.openFileOutput(searches,
Context.MODE_PRIVATE);

Exception stack:
java.io.FileNotFoundException: /data/data/de.jars.android.quicksearch/
files/searches
 at org.apache.harmony.luni.platform.OSFileSystem.open
(OSFileSystem.java:227)
 at java.io.FileOutputStream.init(FileOutputStream.java:97)
 at android.app.ApplicationContext.openFileOutput
(ApplicationContext.java:364)
 at android.content.ContextWrapper.openFileOutput(ContextWrapper.java:
146)

I do not see a reason for a FileNotFoundException here - is it a
Android bug?

/data/data seems strange, too (should it not be just /data?).

Quick help would be nice; the less frustrated users, the better... ;)

Thanks a lot!
Markus
--~--~-~--~~~---~--~~
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: Broken after update: FileNotFoundException on openFileOutput

2009-02-20 Thread Markus Junginger

I just added some logging for debugging:
 File fileFile = context.getFileStreamPath(file);
 CommonLog.i(Opening file for output:  + fileFile.getAbsolutePath()
+ , exists:  + fileFile.exists());

The output shows that the file exists:
Opening file for output: /data/data/de.jars.android.quicksearch/files/
searches, exists: true

So the file is there... Maybe it is a permission issue? Is my app not
allowed to access a file that it created in a previous version?? Would
not make sense to me, but I still do not know what is going on..

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