[android-developers] Re: viewport size A4 ?
basically, i want to render html in A4 size, no matter what is the webview size. please help On Tuesday, May 8, 2012 7:27:36 PM UTC+5:30, Jags wrote: Hi All, I am trying to render a html page in WebView in my app, everything works fine, but the content is wraped arounf width of browser. But my requirement is that the content be rendered in A4 size even if i have to deal with horizontal and vertical screen. I tried meta tag with view port with width = 595 but it still it wraps around device width Can I get some suggestions please ? thanks and regards jags -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] setting context menu for a button
i tried with registerForContextMenu(button ). and setting onConext Menu Listerner also but it did nt work . Did you override onCreateContextMenu() to actually build the menu? Define 'did not work'? What *did* happen - anything at all? Try this link as an example of how to build one: http://www.stealthcopter.com/blog/2010/04/android-context-menu-example-on-long-press-gridview/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: viewport size A4 ?
I am trying to render a html page in WebView in my app, everything works fine, but the content is wraped arounf width of browser. But my requirement is that Have you tried making the main view a ScrollView, and embedding the WebView as a child of that, allowing it to be larger than the physical display? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: why am I receiving location updates without WakeLock if the device is put to sleep?
Am Dienstag, 8. Mai 2012 13:22:04 UTC+2 schrieb lbendlin: your location provider is network. Network means WiFi or cellular. One of the two is on while the device is asleep, and possibly you have another application that uses location updates (so you may be getting them passively) I have a strong suspicion that the Google Maps app is the culprit here. When I reboot the phone and check the running services (before even starting my app), I see that NetworkLocationService of the Google Maps app is running. That app cannot be uninstalled, btw., at least not on my device - I can only uninstall updates. Btw. I have found an solution for my second question here: https://github.com/commonsguy/cwac-locpoll -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] In-App purchase with Google map
Hi All, I have exposed one paid service (payment by in-App purchase), which enable user to view current location. But i am using Google map to show user current user location. Do I need to subscribe Google map for Free? or Do I need to purchase Google Map paid service? Waiting for reply. Thanks, Vitthal Khatpe. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 usb network
Hi All, I'm looking a good way to bring Android device in intranet using USB, what I want is to connect my Android tablet to a PC in network and then work on Tablet as a PC. In that way I can take print from a network printer also take adventage of better network connection within my network. Just to give a idea, I'm developing a application which runs in Intranet and few user will have Tablet as interface and few user will have deskstop as interface. Tablet user should be able to work just like a desktop user but with rich user interface so that user can just work with there fingers insted of keyboard/mouce. please point me to right direction,links. as long as possible I do not wants to create any dependancy to third party application for this purpose. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Unable to perform BT createInsecureRfcommSocketToServiceRecord
I am writing my own application to pair BT HID keyboard with Google Nexus S. I am using the UUID 1124--1000-8000-00805F9B34FB The connection fails . The log cat is 05-09 06:35:12.977: E/BluetoothService.cpp(155): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 05-09 06:35:15.579: E/BluetoothEventLoop.cpp(155): onCreateDeviceResult: D-Bus error: org.bluez.Error.AlreadyExists (Already Exists) 05-09 06:35:18.802: D/BluetoothEventLoop(155): Device property changed: 14:02:20:12:A0:09 property: Connected value: true 05-09 06:35:18.880: I/ActivityManager(155): Start proc com.google.android.carhome for broadcast com.google.android.carhome/.receiver.BluetoothLaunchReceiver: pid=3497 uid=10045 gids={3002, 3001} 05-09 06:35:20.106: D/BluetoothService(155): updateDeviceServiceChannelCache(14:02:20:12:A0:09) 05-09 06:35:20.110: D/BluetoothService(155):uuid(application): 1124--1000-8000-00805f9b34fb 0 05-09 06:35:20.110: D/BluetoothService(155): Making callback for 1124--1000-8000-00805f9b34fb with result 0 05-09 06:35:24.134: D/BluetoothEventLoop(155): Device property changed: 14:02:20:12:A0:09 property: Connected value: false -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: 802.11e Support available in android ?
bump On Thursday, May 12, 2011 8:57:00 AM UTC-4, GD wrote: Hi Team, I need to know wether the 802.11e is supported in android, as the code in which the enums doesnt say anything about 802.11e in - 802_11Defs.h can any one help me to know what are all the 802.11 standards supported in android how where to find that ? typedef enum { DOT11_B_MODE= 1, DOT11_A_MODE= 2, DOT11_G_MODE= 3, DOT11_DUAL_MODE = 4, DOT11_N_MODE= 5, DOT11_MAX_MODE } EDot11Mode; GD .. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] using RFCOMM APIs to communicate with HID profile Keyboard
Hello , I am developing an application for BT pairing of keyboard via NFC without pass key. I trying to use the RFCOM APIs BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(Device_address); mBluetoothSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID); mBluetoothAdapter.cancelDiscovery(); mBluetoothSocket.connect(); My UUID is correct 1124--1000-8000-00805F9B34FB after the connect API i get Service Discovery Failed . I am pasting the log also 05-09 06:53:18.372: D/BluetoothEventLoop(155): Device property changed: 14:02:20:12:A0:09 property: Connected value: true 05-09 06:53:19.618: D/BluetoothService(155): updateDeviceServiceChannelCache(14:02:20:12:A0:09) 05-09 06:53:19.622: D/BluetoothService(155): uuid(application): 1124--1000-8000-00805f9b34fb 0 05-09 06:53:19.622: D/BluetoothService(155): Making callback for 1124--1000-8000-00805f9b34fb with result 0 05-09 06:53:24.145: D/BluetoothEventLoop(155): Device property changed: 14:02:20:12:A0:09 property: Connected value: false a) Is it possible to pair the BT HID profile keyboard using the above APIs . The android version 4.0 b) What is mistake i am doing in my logic or what is the correct method of doing pairing without pass key -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] About the WebView's multiple javascritpInterface
Recently, I meet a troublesome problem about the WebView's multiple javascriptInterface. I will show two demo out to describe the problem. Demo1: this.webView.loadUrl(http://www.google.com;); this.webView.addJavascriptInterface(test1, test1); this.webView.addJavascriptInterface(test11, test11); this.webView.loadUrl(javascript:window.test1.describle('Hello1');); this.webView.loadUrl(javascript:window.test11.describle('Hello11');); Of course, The two interface test1 and test11 can work. Demo2: this.webView.loadUrl(http://www.google.com;); this.webView.addJavascriptInterface(test1, test1); this.webView.loadUrl(javascript:window.test1.describle('Hello1');); this.webView.addJavascriptInterface(test11, test11); this.webView.loadUrl(javascript:window.test11.describle('Hello11');); In the Demo2, the WebChromeClient will tell me TypeError: Result of expression 'window.test11' [undefined] is not an object. at undefined:1 I don't whether it is a normal case. But it is block my project. Looking forwards your suggestion. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Simulate PreferenceActivity with Fragment
Hi, I'm developing a ViewPager with several fragments, one of them I want it to be a PreferenceActivity the problem is that I'm using API7, so no PreferencesFragment... I've already search for a way to embed an activity (PreferencesActivity) in a Fragment, and given up for lack of results. So my next take is to build a preference activity Look and feel in a fragment, so my question is this how can I build an interface that looks just like the preference activity, more specifically a listPreferences lookalike (with the text title and description, icon, behavior, etc)? Thanks very much for your 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] how to submit the cts report to google
hi all How to submit the cts report to google, except the result a .zip file and need another inforation. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Display Ip Camera on Android
fails when the server requires a user authentication ? El miércoles, 2 de mayo de 2012 16:58:54 UTC+2, pax escribió: Hello, I am a java developer, but it's the first time I develop on android. The goal of my application is to display mjpeg stream from an ip camera knowing its parameters(url, id, port , passord,.). I found a code on internet but when I run it I have a black screen. I even put messages in catch section to see what the matter but the exception seems not to be thrown. Can someone tells me what's wrong with this code? I tried both emulator and sony ericsson xperia ray. cohe here : http://stackoverflow.com/questions/3205191/android-and-mjpeg It's in the answer section , MjpegSample Class by carlos PS: Sorry for my english it's not my first language :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add picture into android Content Provider
I don't know if you still need it, but it should look like this: ops.add(ContentProviderOperation.newInsert(android.provider.ContactsContrac t.Data.CONTENT_URI) .withValueBackReference(Data.RAW_CONTACT_ID, rawContactInsertIndex) .withValue(Data.MIMETYPE, Photo.CONTENT_ITEM_TYPE) .withValue(Data.IS_SUPER_PRIMARY, 1) .withValue(Photo.DATA15, yourPicture) .build()); yourPicture is a byte[]. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Unable to start activity ComponentInfo{...}: java.lang.NullPointerException
Hi, I have a problem with Android 3.2. The following line causes the NullPointer exception under Android 3.2: btnAbout.setOnClickListener(aboutSelected); In the debugger I can see that aboutSelected is NOT null. The same code runs without problems under Android 4.0.3 and 2.3.3. Does anybody knows how to solve that problem ? Thanks Andre Code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); GridView gridView = (GridView) findViewById(R.id.hersteller); gridView.setAdapter(new ImageAdapter(this)); gridView.setOnItemClickListener(herstellerSelected); Button btnSuchen = (Button) findViewById(R.id.btnSuche); btnSuchen.setOnClickListener(sucheSelected); Button btnAbout = (Button) findViewById(R.id.btnAbout); btnAbout.setOnClickListener(aboutSelected); //Button btnKonfiguration = (Button) findViewById(R.id.btnKonfiguration); //btnKonfiguration.setOnClickListener(konfigurationSelected); SQLiteDatabase.loadLibs(this); dbAdapter myDbAdapter = new dbAdapter(this); boolean dbExist = myDbAdapter.checkDatabase(); if (!dbExist) try { myDbAdapter.createDatabase(); } catch (IOException e) { throw new Error (Datenbank kann nicht kopiert werden); } myDbAdapter.close(); SharedPreferences einstellungen = PreferenceActivity.getEinstellungen(this); String land = einstellungen.getString(ListLand, ); if (land.equals()) { land = getString(R.string.Deutschland); SharedPreferences.Editor editor = einstellungen.edit(); editor.putString(ListLand, land); editor.commit(); } if (isOnline()) { // } else { // Keine Internetverbindung = Warnmeldung anzeigen ! AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(getString(R.string.KeineInternetverbindung)); builder.setCancelable(false); builder.setPositiveButton(getString(R.string.Ok), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); } } Trace: 05-08 06:35:47.770: E/AndroidRuntime(572): FATAL EXCEPTION: main 05-08 06:35:47.770: E/AndroidRuntime(572): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wiget.autokatalog/ com.wiget.autokatalog.AutokatalogActivity}: java.lang.NullPointerException 05-08 06:35:47.770: E/AndroidRuntime(572): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 1815) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 1831) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.app.ActivityThread.access$500(ActivityThread.java:122) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.os.Handler.dispatchMessage(Handler.java:99) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.os.Looper.loop(Looper.java:132) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.app.ActivityThread.main(ActivityThread.java:4123) 05-08 06:35:47.770: E/AndroidRuntime(572): at java.lang.reflect.Method.invokeNative(Native Method) 05-08 06:35:47.770: E/AndroidRuntime(572): at java.lang.reflect.Method.invoke(Method.java:491) 05-08 06:35:47.770: E/AndroidRuntime(572): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:841) 05-08 06:35:47.770: E/AndroidRuntime(572): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) 05-08 06:35:47.770: E/AndroidRuntime(572): at dalvik.system.NativeStart.main(Native Method) 05-08 06:35:47.770: E/AndroidRuntime(572): Caused by: java.lang.NullPointerException 05-08 06:35:47.770: E/AndroidRuntime(572): at com.wiget.autokatalog.AutokatalogActivity.onCreate(AutokatalogActivity.java: 47) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.app.Activity.performCreate(Activity.java:4397) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1048) 05-08 06:35:47.770: E/AndroidRuntime(572): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 1779) 05-08 06:35:47.770: E/AndroidRuntime(572): ... 11 more -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to
Re: [android-developers] Display Ip Camera on Android
fails when the server requires a user authentication? El jueves, 3 de mayo de 2012 12:04:20 UTC+2, Rami sleiman escribió: I have the same problem. On Wed, May 2, 2012 at 5:58 PM, pax mugisha...@gmail.com wrote: Hello, I am a java developer, but it's the first time I develop on android. The goal of my application is to display mjpeg stream from an ip camera knowing its parameters(url, id, port , passord,.). I found a code on internet but when I run it I have a black screen. I even put messages in catch section to see what the matter but the exception seems not to be thrown. Can someone tells me what's wrong with this code? I tried both emulator and sony ericsson xperia ray. cohe here : http://stackoverflow.com/questions/3205191/android-and-mjpeg It's in the answer section , MjpegSample Class by carlos PS: Sorry for my english it's not my first language :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Server mode SSL startHandshake on Android took 12 seconds to finish
Hi, I am new to Android. For an application, I need to upgrade a plain TCP socket to SSL socket (server mode) on Android. The following code worked, but it took about 12 seconds to finish the SSL handshake on Samsung Galaxy S with Android 2.3.3 (API 10). I also tested the same code on simulator with android 4.0.3 (API 15), the result was same. The client was Chrome browser. From the Wireshark trace, all the SSL handshake messages flowed very fast, and then there was a 10 seconds gap between the Change Cipher Spec/Encrypted Handshake message (last two messages of SSL handshake on server side) and the first application Data (it was HTTP GET from chrome). private boolean handleSSLHandshake() { try { SSLContext sc = SSLContext.getInstance(TLS); sc.init(this.kmf.getKeyManagers(), null, null); SSLSocketFactory factory = sc.getSocketFactory(); this.sslSocket = (SSLSocket) factory.createSocket(this.socket, this.socket.getInetAddress().getHostAddress(), this.socket.getPort(), true); this.sslSocket.setUseClientMode(false); this.sslSocket.addHandshakeCompletedListener(this); this.sslSocket.startHandshake(); Log.d(TAG, SSL upgrade succeeds!); this.input = this.sslSocket.getInputStream(); this.output = this.sslSocket.getOutputStream(); } catch (NoSuchAlgorithmException e) { Log.d(TAG, Got NoSuchAlgorithmException while upgrading to SSL + e); this.sslSocket = null; return false; } catch (KeyManagementException e) { Log.d(TAG, Got KeyManagementException while upgrading to SSL + e); } catch (UnknownHostException e) { Log.d(TAG, Got UnknownHostException while upgrading to SSL + e); this.sslSocket = null; return false; } catch (IOException e) { Log.d(TAG, Got IOException while upgrading to SSL + e); this.sslSocket = null; return false; } return true; } Does anyone have clue on which code took 10 seconds? How to reduce this? And how to debug the SSL handshake on Android? Thanks a lot for help, /Kaiduan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] AudioRecord
Hi, I want to create an recorder and take the buffer to play the sound but it doesn't work. I have no idea for my misstake and hope for your help ;) public class input { private static final String TAG = Aufnahme; private AudioRecord recorder = null; private boolean isRecording = false; private int SAMPLERATE = 8000; private int CHANNELS = AudioFormat.CHANNEL_CONFIGURATION_MONO; private int AUDIO_FORMAT = AudioFormat.ENCODING_PCM_16BIT; private int bufferSize = AudioRecord.getMinBufferSize(SAMPLERATE, CHANNELS, AUDIO_FORMAT); private Thread recordingThread = null; public void startRecording() { recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, SAMPLERATE, CHANNELS, AUDIO_FORMAT, bufferSize); recorder.startRecording(); isRecording = true; recordingThread = new Thread(new Runnable() { public void run() { writeAudioData(); } }); recordingThread.start(); } public void stopRecording() { isRecording = false; recorder.stop(); recorder.release(); recorder = null; recordingThread = null; } private void writeAudioData() { byte data[] = new byte[bufferSize]; while (isRecording) { recorder.read(data, 0, bufferSize); send(data); } } private void send(byte[] data) { int minBufferSize = AudioTrack.getMinBufferSize(8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT); AudioTrack at = new AudioTrack(AudioManager.STREAM_MUSIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, minBufferSize, AudioTrack.MODE_STREAM); at.play(); at.write(data, 0, bufferSize); at.stop(); at.release(); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Popup Windows can control main window
Hi there, I am new in android, now I want to pop up a window which has a seek bar, and this pop up window can be moved. I also want to keep this pop up window and do something in main window. Now I create an alert-dialog, but it can not be moved and when it pops up I can not do something in the main window. How can I implement this function? Which kind of dialog should I use? Thank you 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] LVL-Testing with non-publisher/test account enabled device
Hi, Good Morning !!! I just want to get clarification on testing LVL service on an app which is not-published but uploaded to the publisher account. I have tested the behavior of the app on publisher and test accounts, and its working perfectly as expected. My questions when i try to test the app on a device synced with non- test/published accounts LVL checker always allows the check and i am able to play with my app. Why does LVL checker allow unauthorized user, i hope it should react only to the test-publisher acccounts when uploaded (non-published apps). Please let me the clarifications that would be grateful. Thanks in advance. Regards, MG -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Tab Host linking with XML file and Actitivity class
Hi, I am trying to set the tab host so that each of the tabs has an XML file and and Activity file currently I am using intent = new Intent().setClass(this, Settings.class); spec = tabHost.newTabSpec(Settings).setIndicator(Settings, res.getDrawable(R.drawable.ic_tab_settings)) .setContent(R.layout.settings); tabHost.addTab(spec); whit this tabs are viewed as it is supposed buy the Activity class is not connected how can I do this pls? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] HTML Pagination
Hi guys, hope you are all doing fine. I need to convert a pdf document into android standalone application. I had the options of just using texts views and just copy paste the text of that document in text views. But then I came to know that applications can be made using only HTML and CSS and then use WebView. Then I came to know about something called as *Pagination*. Now let me define the problem, *Problem* : I wish to put all the text of document in html file and then use pagination to show that large html as many pages. Can I get some help?...Can any one point me to some concrete tutorials about using pagination in WebView. I tried searching stack overflow but either there was nothing I needed or I couldn't understand what was there. Any help will be appreciated. Thanks *Saqib Khan * *Saqib Khan * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] User Registration using CouchDB
I am trying to do a user registration form on Android using CouchDB on localhost I want to accomplish the basics of a registration which are in my case FULL NAME, EMAIL AND PASSWORD, I am new to android and I am not sure how to go about it. I have installed CouchDB on my localhost at port 5984. my layout file looks like this: LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=wrap_content android:layout_below=@id/header android:orientation=vertical android:padding=10dip TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/fname android:textColor=#372c24 / EditText android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginBottom=20dip android:layout_marginTop=5dip android:hint=@string/fnamehint android:singleLine=true / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/email android:textColor=#372c24 / EditText android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginBottom=20dip android:layout_marginTop=5dip android:hint=@string/emailhint android:singleLine=true / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/pass android:textColor=#372c24 / EditText android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginTop=5dip android:hint=@string/phint android:password=true android:singleLine=true / !-- Register button -- Button android:id=@+id/btnRegister android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginTop=10dip android:text=@string/login / !-- Link to login Screen -- I also have two classes that will handle the login and user registration, login.java and register.java , please help me. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android Camera Newbie
0 down vote favoritehttp://stackoverflow.com/questions/10503148/android-camera-newbie# *1* share [g+] share [fb] share [tw] i;m new to android development, and right now i want to make a program that takes a picture, geo tag it and store it on my server. 1) my question is, is there a way to take the picture but not save it? i only want to take the picture, compress it and send it to my server. i don't want to store it to an sd card or internal storage or anything, just send it. if this is not possible, then how can i store it temporarily and delete? 2) also, how do i access the picture i just took an to send it?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Sporadic false negatives on client devices
Same here... Just yesterday I began running into problems. My own app is on my 2.3.7 phone and my 4.0.3 tablet. The lvl check times out on the 2.3.7 device and runs fine on the 4.0.3 device. I've tried everything on the 2.3.7 device (uninstalling, restarting, etc) and it just keeps timing out. Obviously, I know the connection on the 2.3.7 device is just since since gmail, weather apps, etc. don't have a problem. It's very frustrating because my lvl check is also essentially stock. I even have it separated out into its own activity. Something is wrong. On May 8, 6:28 am, albnok alb...@gmail.com wrote: I get this on my own app, also having LVL. Quite embarrassing to try to demonstrate the app to a friend and then it occasionally says that my copy is not licensed - I have purchased it (since it was published using a different account.) On Monday, May 7, 2012 9:07:23 PM UTC+8, Florin wrote: Hello, I have an Android developer account and a couple of paid apps published on the Market since a while now. I have decided to use Android LVL for copy protection from the start on all of my apps, I found it pretty straightforward to use so I told myself why not? extra security is better than no security, right? However, after almost one year since my apps have been out in the wild, I keep getting from time to time unsatisfied customers which after purchasing one app constantly get NOT_LICENSED replies from Android licensing servers. And I'm not talking only about occasional NOT_LICENSED caused either by lack of network coverage etc. but about clients which try for days and days(yes, there are clients like this, and they are right, since they paid for their apps!) and still get NOT_LICENSED. Now, here goes my questions: 1) For Android dev and apps publishers out there: have you noticed any wave of false negatives complaints from your clients lately? The above- mentioned symptom occurs in my case since the beginning, but since 2 weeks now it happens at a much higher frequency. 2) For any Google representative who might see this: are there any kind of License Validation statistics on the Android Licensing server side? Like for instance validation attempts per application, with timestamp and Android Market client version and client ID(not email for security reasons but something)? And with some extra message giving a reason for NOT_LICENSED?(apart the obvious didn't buy reason, could there be others?) I think this should be implemented at LVL level and not at app level due to permissions requirement(an app implementing statistics would definitely require network access which for some apps does not justify). So, can we have access to these statistics? If not now, maybe sometimes in the future? Florin. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 make android games?
-- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] [Question]SensorManager.getOrientation
Hello. I can't understand following description in this URL. ↓ http://developer.android.com/reference/android/hardware/SensorManager.html#getOrientation(float[], float[]) When it returns, the array values is filled with the result: •values[0]: azimuth, rotation around the Z axis. •values[1]: pitch, rotation around the X axis. •values[2]: roll, rotation around the Y axis. What does ”azimuth, rotation around the Z axis.rotation around the Z axis.”mean? I think azimuth is different from rotation around the Z axis. But this document seems to say they are the same. Please teach me in detail. Sorry. I'm not good at English. So there may be grammatical mistakes in this question. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Disable call, SMS, email programmatically.
Is there any way to disable the abilities to call, text(SMS/MMS) and email programmatically? Other than Airplane mode. I want to make an application by which user can disable all the above facility yet can use the other app. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Select by month strftime
How i do a select by month? The select down isn't work. cursor = conn.rawQuery(SELECT * FROM table WHERE date('%m', field) = '04', null); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: 802.11e Support available in android ?
It would indeed be interesting to know when 802.11e (802.11-2007) support is planned. As WiFi becomes ubiquitous, QOS functionality will be required. On Thursday, May 12, 2011 8:57:00 AM UTC-4, GD wrote: Hi Team, I need to know wether the 802.11e is supported in android, as the code in which the enums doesnt say anything about 802.11e in - 802_11Defs.h can any one help me to know what are all the 802.11 standards supported in android how where to find that ? typedef enum { DOT11_B_MODE= 1, DOT11_A_MODE= 2, DOT11_G_MODE= 3, DOT11_DUAL_MODE = 4, DOT11_N_MODE= 5, DOT11_MAX_MODE } EDot11Mode; GD .. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Indian keyboard featuers
My app will show kannada/hindi IME and lets the user type the contents in kannada/Hindi. Now I am adding a textview where he can type the content in Kannada/hindi even if the phone does not support the font. This content can be saved in a file or sent as sms or mail or even facebook. Now what other features can be added to it so that those who do not have Indian languages fonts can still use it? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 4.0.3 Recovery-maybe_install_firmware_update
Hi All: In ICS source code, I find that the main function(in /bootable/Recovery/Recovery.c) doesn't use the maybe_install_firmware_update function.Also I can't find this function's declaration in anywhere. whether it is the code's change for ICS? Can someone help me? Thank you very much. -- Best Regards Tony -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] MapOverlay and displaying location as an address
I am beginning to learn how to develop Android applications and I have created an app that currently brings up the user's current location on Google Maps. However I would like to extend the app in two ways: -I would like to add a MapOverlay, where it pin-points the location on the Map, I understand I need to follow the Google Map View tutorial to the Developer website to do this. However I am unsure what I need to include to make the Overlay item point to the current location? What do I need to include in the Activity? -I would like the app to instead of bringing up the latitude and longitude, to bring up the address of where the user currently is. Many thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to add picture into android Content Provider
ops.add(ContentProviderOperation.newInsert(android.provider.ContactsContrac t.Data.CONTENT_URI) .withValueBackReference(Data.RAW_CONTACT_ID, rawContactInsertIndex) .withValue(Data.MIMETYPE, Photo.CONTENT_ITEM_TYPE) .withValue(Data.IS_SUPER_PRIMARY, 1) .withValue(Photo.DATA15, picture) .build()); picture is a byte[]. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] HTML Pagination
Hi guys, hope you are all doing fine. I need to convert a pdf document into android standalone application. I had the options of just using texts views and just copy paste the text of that document in text views. But then I came to know that applications can be made using only HTML and CSS and then use WebView. Then I came to know about something called as *Pagination*. Now let me define the problem, *Problem* : I wish to put all the text of document in html file and then use pagination to show that large html as many pages. Can I get some help?...Can any one point me to some concrete tutorials about using pagination in WebView. I tried searching stack overflow but either there was nothing I needed or I couldn't understand what was there. Any help will be appreciated. Thanks *Saqib Khan * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 modules
Hello, Iam investigating possbility to port as3 project to android java. Main problem for me is module support in android, as our as3 application have main part that can load many sub part (swfs) in it and show them. Basicly main application is like player for modules. These modules cant be used alone as they need information from main application. I would like to know if its posible to emulate such behavior on android java. To precompile some part of aplication and load at runtime or downloaded before. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 expandableListView animate slide up?
I want to animate slide down and slide up on expandablelistview when I click the groupItem.Then I have finish the slide down. public class ExpandAnimation extends Animation { private static final String TAG = ExpandAnimation; private View mAnimatedView; private LayoutParams mViewLayoutParams; private int mMarginStart, mMarginEnd; private boolean mIsVisibleAfter = false; private boolean mWasEndedAlready = false; /** * Initialize the animation * @param view The layout we want to animate * @param duration The duration of the animation, in ms */ public ExpandAnimation(View view, int duration) { setDuration(duration); mAnimatedView = view; mViewLayoutParams = (LayoutParams) view.getLayoutParams(); // if the bottom margin is 0, // then after the animation will end it'll be negative, and invisible. mIsVisibleAfter = (mViewLayoutParams.bottomMargin == 0); mMarginStart = mViewLayoutParams.bottomMargin; Log.i(TAG, mMarginStart:+mMarginStart); mMarginEnd = (mMarginStart == 0 ? (0- view.getHeight()) : 0); Log.i(TAG, mMarginEnd:+mMarginEnd); view.setVisibility(View.VISIBLE); } @Override protected void applyTransformation(float interpolatedTime, Transformation t) { super.applyTransformation(interpolatedTime, t); Log.i(TAG, applyTransformation--+interpolatedTime); if (interpolatedTime 1.0f) { // Calculating the new bottom margin, and setting it mViewLayoutParams.bottomMargin = mMarginStart + (int) ((mMarginEnd - mMarginStart) * interpolatedTime); // Invalidating the layout, making us seeing the changes we made mAnimatedView.requestLayout(); // Making sure we didn't run the ending before (it happens!) } else if (!mWasEndedAlready) { mViewLayoutParams.bottomMargin = mMarginEnd; mAnimatedView.requestLayout(); if (mIsVisibleAfter) { mAnimatedView.setVisibility(View.GONE); } mWasEndedAlready = true; } } } public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { Log.i(TAG, getChildView); @SuppressWarnings(unchecked) String text = ((MapString, String) getChild(groupPosition, childPosition)).get(child); if (convertView == null) { LayoutInflater layoutInflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = layoutInflater.inflate(R.layout.child, null); } View toolbar = convertView.findViewById(R.id.toolbar); setAnimationView(toolbar); ((LinearLayout.LayoutParams) toolbar.getLayoutParams()).bottomMargin = -75; toolbar.setVisibility(View.GONE); ExpandAnimation expandAni = new ExpandAnimation(toolbar, 1000); toolbar.startAnimation(expandAni); TextView tv = (TextView) convertView.findViewById(R.id.childTo); tv.setText(text); return convertView; } But when I click the groupItem to collapse the group,it doesn't call the getChildView() method.So how can I to call the getChildView() and let it slide up? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android WebView fail to add multiple javascriptInterface
When I wanna to add multiple javascriptInterface, I meet the warming/error that I could not find the object. The source codes are enclosed. The GoogleWebViewActivity_error.java could not work when you invoke the interface such as test11. I also ask the same question on the stack overflow: http://stackoverflow.com/questions/10511990/android-webview-fail-to-add-multiple-javascriptinterface It blocks my project. Looking forwards your suggestion Thank you all Xin Huang -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=enpackage maigoxin.googleWebView; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.webkit.WebChromeClient; import android.webkit.WebView; public class GoogleWebViewActivity extends Activity { /** Called when the activity is first created. */ private WebView webView; Test1 test1 = new Test1(); Test1 test11 = new Test1(); Test2 test2 = new Test2(); Test2 test22 = new Test2(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.webView = (WebView)findViewById(R.id.webView1); this.webView.getSettings().setJavaScriptEnabled(true); this.webView.setWebChromeClient(new MyWebChromeClient()); this.webView.loadUrl(http://www.google.com;); this.webView.addJavascriptInterface(test1, test1); this.webView.addJavascriptInterface(test11, test11); this.webView.addJavascriptInterface(test2, test2); this.webView.addJavascriptInterface(test22, test22); this.webView.loadUrl(javascript:window.test1.describle('Hello1');); this.webView.loadUrl(javascript:window.test11.describle('Hello11');); this.webView.loadUrl(javascript:window.test2.describle('Hello2');); this.webView.loadUrl(javascript:window.test22.describle('Hello22');); } class Test1{ public void describle(String using){ Log.d(maigoxin,I'm Test1:+using); } } class Test2{ public void describle(String using){ Log.d(maigoxin,I'm Test2:+using); } } class MyWebChromeClient extends WebChromeClient{ } }package maigoxin.googleWebView; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.webkit.WebChromeClient; import android.webkit.WebView; public class GoogleWebViewActivity extends Activity { /** Called when the activity is first created. */ private WebView webView; Test1 test1 = new Test1(); Test1 test11 = new Test1(); Test2 test2 = new Test2(); Test2 test22 = new Test2(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.webView = (WebView)findViewById(R.id.webView1); this.webView.getSettings().setJavaScriptEnabled(true); this.webView.setWebChromeClient(new MyWebChromeClient()); this.webView.loadUrl(http://www.google.com;); this.webView.addJavascriptInterface(test1, test1); this.webView.loadUrl(javascript:window.test1.describle('Hello1');); this.webView.addJavascriptInterface(test11, test11); this.webView.addJavascriptInterface(test2, test2); this.webView.addJavascriptInterface(test22, test22); this.webView.loadUrl(javascript:window.test1.describle('Hello1');); this.webView.loadUrl(javascript:window.test11.describle('Hello11');); this.webView.loadUrl(javascript:window.test2.describle('Hello2');); this.webView.loadUrl(javascript:window.test22.describle('Hello22');); } class Test1{ public void describle(String using){ Log.d(maigoxin,I'm Test1:+using); } } class Test2{ public void describle(String using){ Log.d(maigoxin,I'm Test2:+using); } } class MyWebChromeClient extends WebChromeClient{ } }
Re: [android-developers] Android 4.0.3 Recovery-maybe_install_firmware_update
This list is for development with the SDK. Check http://source.android.com/community/index.html for an appropriate list dealing with the source code. Thanks On Tue, May 8, 2012 at 9:42 PM, Tony Qian pigmike1...@gmail.com wrote: Hi All: In ICS source code, I find that the main function(in /bootable/Recovery/Recovery.c) doesn't use the maybe_install_firmware_update function.Also I can't find this function's declaration in anywhere. whether it is the code's change for ICS? Can someone help me? Thank you very much. -- Best Regards Tony -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood https://market.android.com/developer?pub=Appaholics http://www.appaholics.in/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to make android games?
http://lmgtfy.com/?q=how+to+make+android+games -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Unable to start activity ComponentInfo{...}: java.lang.NullPointerException
btnAbout.setOnClickListener(aboutSelected); The NPE could also be because btnAbout is null - does the debugger confirm that *that* is OK? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] hello all~
Anyone try the free app development tool called m-bizmaker? I found this free app develop tool but it seems not many ppl use it yet. Let me know if anyone tried this program and how good is that. you can go download www.mbizmaker.com Thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] User Registration using CouchDB
Please share full code, otherwise nobody will help you. On Tue, May 8, 2012 at 2:44 PM, Samboga lmatj...@gmail.com wrote: I am trying to do a user registration form on Android using CouchDB on localhost I want to accomplish the basics of a registration which are in my case FULL NAME, EMAIL AND PASSWORD, I am new to android and I am not sure how to go about it. I have installed CouchDB on my localhost at port 5984. my layout file looks like this: LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=wrap_content android:layout_below=@id/header android:orientation=vertical android:padding=10dip TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/fname android:textColor=#372c24 / EditText android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginBottom=20dip android:layout_marginTop=5dip android:hint=@string/fnamehint android:singleLine=true / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/email android:textColor=#372c24 / EditText android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginBottom=20dip android:layout_marginTop=5dip android:hint=@string/emailhint android:singleLine=true / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/pass android:textColor=#372c24 / EditText android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginTop=5dip android:hint=@string/phint android:password=true android:singleLine=true / !-- Register button -- Button android:id=@+id/btnRegister android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginTop=10dip android:text=@string/login / !-- Link to login Screen -- I also have two classes that will handle the login and user registration, login.java and register.java , please help me. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: why am I receiving location updates without WakeLock if the device is put to sleep?
Unfortunately shutting down the Google Maps app (which killed the running service) did not help. After doing that, starting my app and pressing Power to go back to sleep, I still got location fixes. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] User Registration using CouchDB
import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.view.Window; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; public class RegisterActivity extends Activity implements OnClickListener { private static final int SERVER_PORT = 5984; private String SERVER_HOST = 127.0.0.1; public static final String PREFS_NAME = MydroidPREFS; private SharedPreferences settings; private ProgressDialog progress; public void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); settings = getSharedPreferences(PREFS_NAME, 0); super.onCreate(savedInstanceState); // requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.register); Button login = (Button) findViewById(R.id.btnRegister); login.setOnClickListener(this); // going back to login page via a textview TextView reg = (TextView) findViewById(R.id.link_to_login); reg.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(getApplicationContext(), LoginActivity.class); startActivity(i); EditText usernameEditText = (EditText) findViewById(R.id.txtname); EditText passwordEditText = (EditText) findViewById(R.id.txtpass); String sUserName = usernameEditText.getText().toString(); String sPassword = passwordEditText.getText().toString(); String address = http://; + SERVER_HOST + : + SERVER_PORT+ /database.html?afterdbLogin= + sUserName + Password= + sPassword + ; if (usernameEditText == null || passwordEditText == null) { Context context = getApplicationContext(); CharSequence text = These fields cannot be empty, please enter Username and Password; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); } else { //registration successful Log.i(DEB_TAG, Username: + sUserName + nPassword: + sPassword); Log.i(DEB_TAG, Requesting to + address); } } }); } @Override public void onClick(View v) { Button login = (Button) findViewById(R.id.btnRegister); login.setOnClickListener(this); } public void setUserNameText(String $username) { EditText usernameEditText = (EditText) findViewById(R.id.txtname); usernameEditText.setText($username); } public void setPasswordText(String $username) { EditText passwordEditText = (EditText) findViewById(R.id.txtpass); passwordEditText.setText($username); } } This is the code for registration class, when I click register button nothing happens. Please help so that I can do this.. On Wednesday, May 9, 2012 10:42:03 AM UTC+2, sourabh wrote: Please share full code, otherwise nobody will help you. On Tue, May 8, 2012 at 2:44 PM, Samboga wrote: I am trying to do a user registration form on Android using CouchDB on localhost I want to accomplish the basics of a registration which are in my case FULL NAME, EMAIL AND PASSWORD, I am new to android and I am not sure how to go about it. I have installed CouchDB on my localhost at port 5984. my layout file looks like this: LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=wrap_content android:layout_below=@id/header android:orientation=vertical android:padding=10dip TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/fname android:textColor=#372c24 / EditText android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginBottom=20dip android:layout_marginTop=5dip android:hint=@string/fnamehint android:singleLine=true / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/email android:textColor=#372c24 / EditText android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginBottom=20dip android:layout_marginTop=5dip android:hint=@string/emailhint android:singleLine=true / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/pass android:textColor=#372c24 / EditText android:layout_width=fill_parent
[android-developers] Re: setting context menu for a button
I tried as the same in the example defined here . but didn't get the menu displayed . did not work - i am not getting the conext menu at all after clicking button . On May 9, 11:58 am, Jason Teagle teagle.ja...@gmail.com wrote: i tried with registerForContextMenu(button ). and setting onConext Menu Listerner also but it did nt work . Did you override onCreateContextMenu() to actually build the menu? Define 'did not work'? What *did* happen - anything at all? Try this link as an example of how to build one:http://www.stealthcopter.com/blog/2010/04/android-context-menu-exampl... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] User Registration using CouchDB
This is the code for registration class, when I click register button nothing happens. Please help so that I can do this.. Take a look at the code you have in the click handler you added (near the beginning) to the button. This click handler is near the bottom of the file: @Override public void onClick(View v) { Button login = (Button) findViewById(R.id.btnRegister); login.setOnClickListener(this); } Notice that all you do here is grab this exact same button, and set the exact same click listener back into it. This is why it appears to do nothing. The actual code that attempts to log in is in the click listener you add to the *TextView*: TextView reg = (TextView) findViewById(R.id.link_to_login); reg.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { etc. Not sure why you added a click listener to the TextView - it appears you may have got a little mixed up about how you want your interface to work. To start with, to try and help make your code a little easier to follow, I recommend two things: 1. Move the code that attempts the login from the body of the click listener you added to the TextView into a separate method of the class, called doLogin() or something similar. For now, don't add the click listener to the TextView - you can sort out that additional functionality later. 2. Don't make the RegisterActivity implement ClickListener - instead, be consistent and add an anonymous click listener to the button (to replace the one you add at the moment at the start of onCreate() ). From that onClick() method, get it to attempt the login (and yes, I deliberately didn't specify exactly how, to give you a chance to examine the revised code and try and work it out for yourself). See if you can repair your code from 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: Unable to start activity ComponentInfo{...}: java.lang.NullPointerException
Yes the btnAbout was also not null. The strange thing... today I can't reproduce it anymore after rebooting the eclipse (heap problem). Thanks for your answer. On 9 Mai, 10:04, Jason Teagle teagle.ja...@gmail.com wrote: btnAbout.setOnClickListener(aboutSelected); The NPE could also be because btnAbout is null - does the debugger confirm that *that* is OK? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: setting context menu for a button
I tried as the same in the example defined here . but didn't get the menu displayed . did not work - i am not getting the conext menu at all after clicking button . OK. At this point I would recommend (for test purposes) you leave your existing project alone, start a new project with a new activity, add one button to the layout, and try adding the necessary code to add and show the context menu to the button. If it still doesn't work in a fresh project (which should be nice and small since it only has the one button and handler in it), then post your code here for us to look at. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Unable to start activity ComponentInfo{...}: java.lang.NullPointerException
The strange thing... today I can't reproduce it anymore after rebooting the eclipse (heap problem). It wouldn't be the first time Eclipse has got a bit messed up... I had some infinite recursion in some code this morning and Eclipse needed a couple of kicks up the backside after I'd fixed the problem to get going again! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] AudioRecord
plz refer this link may be you get some idea!!! http://code.google.com/p/krvarma-android-samples/source/browse/#svn/trunk/AudioRecorder.2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Disable call, SMS, email programmatically.
may be possible in airplane 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: Disable call, SMS, email programmatically.
Other than Airplane mode. I want to make an application by which user can disable all the above facility yet can use the other app. Out of interest, why would you want to let the user disable these by some method other than Airplane mode? Is it some sort of parental control type of thing? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Long running Android service is getting recreated over and over
I have a simple Android Activity with one button to start and stop a long running Android Service (which does some simple logging). As soon as I start the service, I close the app (Activity) and the service should then run in the background indefinitely. But it doesn't. At random times, the Application object this Service belongs to is recreated by the OS and then my Service is as well. So it's not just that the Service is getting onStartCommand called, but first it gets onCreate called, creating a new Service. I don't know what happens to the old one, it just goes away - onDestroy is not called or anything. I run the Service as START_STICKY, I am not using the main UI thread in any way, so there should be no issues there. I am Logging all activity from the Service, logging exceptions, etc. Nothing is out of the ordinary except that my Service is getting recreated over and over. I just can't understand what the problem is. The Service is running fine, then boom, my Application gets an onCreate, my Service gets an onCreate and onStartCommand and the old Service, which was in the middle of logging goes, away without any notice or warning. The new Service starts logging. I end up with a bunch of disconnected logs where there should be just one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Long running Android service is getting recreated over and over
The process gets killed and then gets recreated (typically 5 seconds later) because of START_STICKY. onDestroy does not get called, along with any other callbacks, the process just goes away. There is no duplicate instance of Service object. This might help: http://android-developers.blogspot.com/2010/02/service-api-changes-starting-with.html And speaknig more broadly, eternal services is something that really scares some users, the ones that use various system monitoring tools more than all other apps combined, but they'll be the ones leaving one star comments in Market. -- K 2012/5/9 William Kelley williamtkel...@gmail.com I have a simple Android Activity with one button to start and stop a long running Android Service (which does some simple logging). As soon as I start the service, I close the app (Activity) and the service should then run in the background indefinitely. But it doesn't. At random times, the Application object this Service belongs to is recreated by the OS and then my Service is as well. So it's not just that the Service is getting onStartCommand called, but first it gets onCreate called, creating a new Service. I don't know what happens to the old one, it just goes away - onDestroy is not called or anything. I run the Service as START_STICKY, I am not using the main UI thread in any way, so there should be no issues there. I am Logging all activity from the Service, logging exceptions, etc. Nothing is out of the ordinary except that my Service is getting recreated over and over. I just can't understand what the problem is. The Service is running fine, then boom, my Application gets an onCreate, my Service gets an onCreate and onStartCommand and the old Service, which was in the middle of logging goes, away without any notice or warning. The new Service starts logging. I end up with a bunch of disconnected logs where there should be just one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Starting an activity from Fragments.
Let me explain the structure of my application, In my app i have 3 main tabs implemented using Fragments. And one of the main tab contains 3 sub tabs in its fragment, and one sub tab contains listview. Now i want to start an Activity when an item from the list is selected. How it is possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Starting an activity from Fragments.
This is listview onClivk listener lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView? arg0, View view, int position, long id) { RecordObjects obj=(RecordObjects)lv.getItemAtPosition(position); String name=obj.getName(); String url=obj.getUrl(); intent=new Intent(getActivity(),player.class); intent.putExtra(task,Draft); intent.putExtra(name,name); intent.putExtra(read_path,url); startActivityForResult(intent, 0); } }); and the error i got is: 05-09 16:19:07.723: D/PhoneWindow(7043): couldn't save which view has focus because the focused view android.widget.LinearLayout@44ecc1d8 has no id. 05-09 16:19:07.741: D/AndroidRuntime(7043): Shutting down VM 05-09 16:19:07.741: W/dalvikvm(7043): threadid=3: thread exiting with uncaught exception (group=0x4001b188) 05-09 16:19:07.751: E/AndroidRuntime(7043): Uncaught handler: thread main exiting due to uncaught exception 05-09 16:19:07.771: E/AndroidRuntime(7043): java.lang.RuntimeException: Unable to pause activity {com.m2.smartGui/ com.m2.smartGui.smartGuiPagerFragmentActivity}: java.lang.NullPointerException 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 3162) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 3119) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java: 3102) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.ActivityThread.access$2400(ActivityThread.java:119) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1870) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.os.Handler.dispatchMessage(Handler.java:99) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.os.Looper.loop(Looper.java:123) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.ActivityThread.main(ActivityThread.java:4363) 05-09 16:19:07.771: E/AndroidRuntime(7043): at java.lang.reflect.Method.invokeNative(Native Method) 05-09 16:19:07.771: E/AndroidRuntime(7043): at java.lang.reflect.Method.invoke(Method.java:521) 05-09 16:19:07.771: E/AndroidRuntime(7043): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 05-09 16:19:07.771: E/AndroidRuntime(7043): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 05-09 16:19:07.771: E/AndroidRuntime(7043): at dalvik.system.NativeStart.main(Native Method) 05-09 16:19:07.771: E/AndroidRuntime(7043): Caused by: java.lang.NullPointerException 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.support.v4.app.FragmentManagerImpl.saveFragmentBasicState(FragmentManager.java: 1576) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.support.v4.app.FragmentManagerImpl.saveAllState(FragmentManager.java: 1617) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java: 481) 05-09 16:19:07.771: E/AndroidRuntime(7043): at com.m2.smartGui.smartGuiPagerFragmentActivity.onSaveInstanceState(smartGuiPagerFragmentActivity.java: 78) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.Activity.performSaveInstanceState(Activity.java:1022) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java: 1180) 05-09 16:19:07.771: E/AndroidRuntime(7043): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 3144) 05-09 16:19:07.771: E/AndroidRuntime(7043): ... 12 more -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Starting an activity from Fragments.
and one sub tab contains listview. Now i want to start an Activity when an item from the list is selected. How it is possible? Have you tried adding a listener to the list view to watch for selection changes? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Starting an activity from Fragments.
and the error i got is: 05-09 16:19:07.723: D/PhoneWindow(7043): couldn't save which view has focus because the focused view android.widget.LinearLayout@44ecc1d8 has no id. Take a look at that line - what does it say is the reason for being unable to do what it wants? The error message is pretty clear about the reason for the failure - and should be a clue as to how to fix the problem either in your XML file or if you are building the UI manually, by making an extra call on the LinearLayout. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Starting an activity from Fragments.
05-09 16:19:07.751: E/AndroidRuntime(7043): Uncaught handler: thread main exiting due to uncaught exception 05-09 16:19:07.771: E/AndroidRuntime(7043): java.lang.RuntimeException: Unable to pause activity {com.m2.smartGui/ com.m2.smartGui.smartGuiPagerFragmentActivity}: java.lang.NullPointerException There's another problem here, but it's a little hard to sort out exactly who did what here. It appears to be trying to pause as if you are moving away from the app. What *exactly* happens in your app, and at what stage? Does it start running OK? Does it crash / abort when you change tabs? Does it go wrong when you click an item in the list view? And when it goes wrong, what exactly happens? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Starting an activity from Fragments.
The app crashes when i click on list item. Actually this listview resides in a tab which is in another tab of a fragment. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Starting an activity from Fragments.
The app crashes when i click on list item. Actually this listview resides in a tab which is in another tab of a fragment. It could be the nesting that is the problem, or the starting of the activity. So let's just try and isolate the cause - in your click handler, instead of creating the intent and starting the activity, just do nothing. If that doesn't crash, construct the intent as before (but don't start the activity yet). If that is OK, pop up a message with Toast after creating the intent (so we are hopefully taking the focus away from the tab layout briefly). If all of that is OK, try creating a dummy activity of your own with a button, and have the intent use *that* class (and start the activity) - so we start an activity but it's a small, harmless(!) one of your own. Tell us if any of those steps still causes a crash, or if all of it works OK. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Starting an activity from Fragments.
no problem when changing tabs, the listview consists of details of recorded audio files, so when any list item is clicked, it should start new Activity player to play the audio file, but it goes wrong when an item is clicked. :( :( :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Starting an activity from Fragments.
instead of creating the intent and starting the activity, just do nothing. -- didnt crash. If that doesn't crash, construct the intent as before (but don't start the activity yet). If that is OK, pop up a message with Toast after creating the intent (so we are hopefully taking the focus away from the tab layout briefly). yes, pop up message was shown successfully. If all of that is OK, try creating a dummy activity of your own with a button, and have the intent use *that* class (and start the activity) - didnt work, application crashed. LogCat: 05-09 17:08:39.082: D/AndroidRuntime(13361): Shutting down VM 05-09 17:08:39.091: W/dalvikvm(13361): threadid=3: thread exiting with uncaught exception (group=0x4001b188) 05-09 17:08:39.091: E/AndroidRuntime(13361): Uncaught handler: thread main exiting due to uncaught exception 05-09 17:08:39.101: E/AndroidRuntime(13361): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.m2.smartGui/com.m2.smartGui.dummyActivity}; have you declared this activity in your AndroidManifest.xml? 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java: 1404) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1378) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.app.Activity.startActivityForResult(Activity.java:2749) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.support.v4.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java: 689) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.support.v4.app.Fragment.startActivityForResult(Fragment.java: 794) 05-09 17:08:39.101: E/AndroidRuntime(13361):at com.m2.smartGui.RecordActivity$Recordings $3.onItemClick(RecordActivity.java:201) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.widget.AdapterView.performItemClick(AdapterView.java:284) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.widget.ListView.performItemClick(ListView.java:3285) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.widget.AbsListView$PerformClick.run(AbsListView.java:1640) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.os.Handler.handleCallback(Handler.java:587) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.os.Handler.dispatchMessage(Handler.java:92) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.os.Looper.loop(Looper.java:123) 05-09 17:08:39.101: E/AndroidRuntime(13361):at android.app.ActivityThread.main(ActivityThread.java:4363) 05-09 17:08:39.101: E/AndroidRuntime(13361):at java.lang.reflect.Method.invokeNative(Native Method) 05-09 17:08:39.101: E/AndroidRuntime(13361):at java.lang.reflect.Method.invoke(Method.java:521) 05-09 17:08:39.101: E/AndroidRuntime(13361):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 05-09 17:08:39.101: E/AndroidRuntime(13361):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 05-09 17:08:39.101: E/AndroidRuntime(13361):at dalvik.system.NativeStart.main(Native Method) 05-09 17:08:39.121: I/dalvikvm(13361): threadid=7: reacting to signal 3 05-09 17:08:39.152: I/dalvikvm(13361): Wrote stack trace to '/data/anr/ traces.txt' -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Starting an activity from Fragments.
Sorry, It worked! I forgot to add the activity in manifest. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Starting an activity from Fragments.
Sorry, It worked! I forgot to add the activity in manifest. (Don't worry, I just learned something about activities there as well!) OK, so the dummy activity worked, and that also means that taking focus away from the tab arrangement *shouldn't* be the problem - since that would have happened for your dummy activity. Is the 'player' activity one of your own classes? I'm afraid the fault points to that now. I recommend you start isolating parts of that (in its onCreate() ) and try to narrow down the cause like we did here. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Starting an activity from Fragments.
Thank you Jason Teagle, The error was in player activity, the player class needed a native library and that library was missing. You were so kind to listen me. Thankyou so much. On May 9, 4:46 pm, Jason Teagle teagle.ja...@gmail.com wrote: Sorry, It worked! I forgot to add the activity in manifest. (Don't worry, I just learned something about activities there as well!) OK, so the dummy activity worked, and that also means that taking focus away from the tab arrangement *shouldn't* be the problem - since that would have happened for your dummy activity. Is the 'player' activity one of your own classes? I'm afraid the fault points to that now. I recommend you start isolating parts of that (in its onCreate() ) and try to narrow down the cause like we did here. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Activity lifecycle and a null cursor
I don't know if my assumptions are right, anyway I pushed an update that seems to fix the bug (at least, I have zero reports since I put the new version online, whereas I used to have a few dozens). Here is what I did currently 1. Removed android:onClick in my XML files 2. Manually set the listener inside my custom adapter bindView() 3. Avoid leaks: since the listener happens to be an activity, I unset it either onPause() (via AbsListView.reclaimViews(ListView) and via a custom AbsListView.RecycleListener I want to remark, I don't know if my assumptions are correct and I don't know it this solves the bug. However if both of these are true, we have a collision between View and Activity lifecycle. Basically, if I am right, the View is reused in another activity (since its original one is paused) but still has the old one set as its listener. This causes the NPE because the old activity cursor is effectively null. Again, note that I don't have a single proof of these assumptions: I think the whole thing would be indeed very dangerous, but is the only coherent and conceptually right explanation. The problem here is that I've never been able to reproduce the bug, so I must base my assumptions on the crash reports (which are stopped after the upgrade). I'd like some Android dev on the list to tell if this is indeed possible, because it would be a dangerous thing (it could also be the case for memory leaks). I read the sources myself, but didn't find the relevant code. There is AbsListView.RecycleBin, but it's an instance field of the ListView and I don't think that the whole list view is reused among different Activities in this case. Related question on StackOverflowhttp://stackoverflow.com/q/10475359/315306 2012/5/7 Jason Teagle teagle.ja...@gmail.com Unfortunately the crash reports don't show the device model. The NPE happens when the user clicks a row or one of the buttons in a row (since all three actions share the same code). I have imagined a possible cause for this issue. Looking into the sources (android/view/View.java) here is what the constructor does when it founds android:onClick in XML: an anonymous listener is created, and this listener will call the method on the Context returned by View.getContext(), but this context may be a different instance than the one currently holding the view. This is because Adapter.getView()http://developer.android.com/reference/android/widget/Adapter.html#getView(int,%20android.view.View,%20android.view.ViewGroup)gives a chance for reusing an already existing View, and the default strategy for CursorAdapter (as seen in the sources) is to reuse that simply if it's not null. So here is my scenario 1. Instance#1 of MyActivity is created, its listview is set up and shown. Instance#1 is set as the listener for the list_item view, as per android:onClick in my XML layout 2. onPause is called on instance#1, which causes my method to set adapter's cursor to null 3. the system decides that a new instance of MyActivity is needed, so instance#2 is created. A new cursor is also created and its contents are shown in the list view (via bindView()), but the list item views are recycled somehow, since they were kept in a cache. The old views still keep a reference to instance#1, so when the click event is triggered, instance#1.onClick() is fired and it founds a null cursor, thus throwing the NPE This explanation requires a little bit of imagination, but I think it's still realistic, even if all is to be demonstrated. I am writing a separated, minimal test case to dive into the Android classes with the debugger, but it's not simple. I use an activity with a list view as the only content view, and a list_item with an android:onClick property defined in XML. My goal is to see if a new instance of the activity can be created even when another one is already available. From the Android doc, this would be perfectly legitimate, but is not easy to trigger. The second step is to click the list item and compare the list_item's context with the current Activity. If they are different, we have caught it. Does anybody have any suggestion or experience on this? @Jason, as per the tap tempo, the algorithm to detect the BPM requires three taps at enough close intervals, and the resulting value must also be in the constraints. If you try to tap while you listen a song, it will do its job @Blake, I can argue it from the stack trace. The NPE is throws at this line int position = cursor.getPosition(); so the cursor is obviously null, and the only code that change the cursor (and the adapter) is onPause(), where I set adapter.changeCursor(null); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to
[android-developers] ListView items
Hi, How to generate xml file form list view items. Please help me... Thanking you. nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Starting an activity from Fragments.
Thank you Jason Teagle, The error was in player activity, the player class needed a native library and that library was missing. You were so kind to listen me. Thankyou so much. Another happy customer {;v) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to show map in android apps
Hi, please don't follow third parties. if you learn any thing new then better to approach our site that is developer.andorid.com. iam telling this things by experience. and come to your request for that follow the below link http://developer.android.com/resources/tutorials/views/hello-mapview.html Thanks On Wed, May 9, 2012 at 11:21 AM, TreKing treking...@gmail.com wrote: On Wed, May 9, 2012 at 12:42 AM, Yogeshkumar Tiwari yogeshtiwari2...@gmail.com wrote: so pls help me how to show the map in android apps. http://lmgtfy.com/?q=how+to+show+map+in+android - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Regarding WIFIInfo bssid ssid
Hi, I want my app to make connection over the defined wifi network. Now I am checking the currently active wifi network on the device comparing the ssids. If it matches with mine, I am allowing network call from my app over that matched wifi network.. But the problem is that two wifi networks can have same ssids.. So just want to know is any there any unique identifier for wifi network which will be unique constant on all devices.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: removing image data from memory
Bitmaps have a recycle() method. I don't think that will fix the problem, I'm replying with it only because you haven't specifically listed it. I was using it, and like you have said: it helped a bit but did not solve the problem. I'm afraid I'm making sure I don't get an OOM crash by calling System.exit(0) whenever the user switches away from my app - means it takes a couple of seconds for them to get back in, but I rate them not seeing the app crash above instant-access. I realise that doesn't help you - I was crashing on Resume, whereas you are running out of memory during operation. Hope you come up with something! Iain On Monday, 30 April 2012 19:15:02 UTC+1, momo wrote: I have to believe there's a way to clear image data from memory once it's no longer required, but despite exhaustive searching I can't find a solution. Both this list and stack are full of questions regarding OOM errors, specifically bitmap size exceeds VM budget, but I still don't see a clear answer. I understand there are hard memory limits on devices, and I understand it's not realistic to load up and display or cache large amounts of image data, but there should be away to discard data that's no longer required. For example, imagine this very basic hypothetical app, that emulates a lot of the behavior of the native gallery app: 1. An image gallery that allows the user to peruse images from a remote server. 2. There might be any number of images on that server. 3. The app displays 1 image at a time, and allows a user to go back or forward 1 image at a time through button presses or swiping. 4. There'd be a maximum of 3 images rendered at any one time (so the user can see the one immediately to the left or right of the current image when swiping). All other image data should be discarded. 5. Images are loaded using URL.openStream and Drawable.createFromStream or BitmapFactory.decodeStream. Streams are closed appropriately. 6. Images are sized appropriately *on the server* before being fetched. 7. Loading happens in AsyncTasks. Tasks that are no longer needed (due to moving away from an image with an incomplete task) are cancelled. Any references in the AyncTask are WeaklyReferenced. 8. When any image is no longer required, it's cleared via: A) getBackground().setCallback(null) B) Listeners are set to null C) setImageDrawable/Bitmap(null) D) removeView This simple construct, that takes into account all the suggest practices I'm aware of, will inevitably crash with an OOM error at some point. Using BitmapFactory.Options inSampleSize and inPreferredConfig will delay the inevitable, but not forever, and at the cost of image quality. In this example, I've used remote images, but the issue exists with images stored in /assets/ or in internal memory, etc. My feeling is that if we can display X amount of image data at one point, and we take all steps to remove that image data from memory, we should be able to display that same amount of data later, without having to compensate for what has happened before. With the sheer quantity of questions about this very issue, I'd hope to have a standard solution documented, but if there is one, I can't find it. I've seen answers posted by Romain Guy, who otherwise seems very generous with his knowledge and active in the community, that say something like Simple. Don't use so much memory. OK. Tell me how. Am I missing something fundamental? Is there a way to discard image data once it's no longer being used? What is missing from the above to create a simple photo gallery? Assuming the built-in gallery app uses the FW, I imagine there has to be a way... TYIA. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Regarding WIFIInfo bssid ssid
So just want to know is any there any unique identifier for wifi network which will be unique constant on all devices.. The MAC address? This can be obtained from a WifiInfo object... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ListView items
http://danroundhill.com/2009/12/18/working-with-the-android-listview/ On Wed, May 9, 2012 at 5:49 PM, nageswara rao rajana nagu.raj...@gmail.comwrote: Hi, How to generate xml file form list view items. Please help me... Thanking you. nagu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- WITH REGARDS ARUN KUMAR P D +91-9994794759 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Regarding WIFIInfo bssid ssid
But is it device wifi mac address or active wifi network mac address... On 9 May 2012 18:27, Jason Teagle teagle.ja...@gmail.com wrote: So just want to know is any there any unique identifier for wifi network which will be unique constant on all devices.. The MAC address? This can be obtained from a WifiInfo object... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@**googlegroups.comandroid-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=enhttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Regarding WIFIInfo bssid ssid
But is it device wifi mac address or active wifi network mac address... It will be the MAC address of the phone / device the software is being run on. I may have misunderstood what you were trying to do here - are you trying to identify the 'other' end of the wi-fi connection? The access point? So any phone / tablet can use your software (this end can be any network), but it can only perform this action when connected to a specific access point? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Regarding WIFIInfo bssid ssid
mac address is of the hardware On Wed, May 9, 2012 at 6:51 PM, Bunty syed itsmeatfo...@gmail.com wrote: But is it device wifi mac address or active wifi network mac address... On 9 May 2012 18:27, Jason Teagle teagle.ja...@gmail.com wrote: So just want to know is any there any unique identifier for wifi network which will be unique constant on all devices.. The MAC address? This can be obtained from a WifiInfo object... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@** googlegroups.com 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=enhttp://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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to send commands to OS through bluetooth
i want to send commands to OS thourgh bluetooth, where my system should handle it by is own bluetooth service listener. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: why am I receiving location updates without WakeLock if the device is put to sleep?
Your phone is using wifi as the location source. If wifi is set to stay up during phone sleep, LocationManager will continue to provide updates unless you remove your location update subscription in onSuspend(). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Music notation application
I mean just develop the graphics using primative methods to produce the output you want. Like sprites (jpg, png), but procedural based. eg.. void drawWholeNote(canvas, centerx,centery, scale) { canvas.drawCircle(etc.); } void drawHalfNote(canvas, centerx,centery, scale) { canvas.drawCircle(etc.) canvas.drawLine(etc) } On Tuesday, May 8, 2012 8:43:52 AM UTC-7, Simon Giddings wrote: Thank you for taking the time to reply. Can you point me in the direction for what this procedure based rendering is about ? On Tuesday, 8 May 2012 17:38:30 UTC+2, JackN wrote: you might want to consider procedure based rendering. Should scale well (and easy). I wish you luck and I would get you app when it is done. On Tuesday, May 8, 2012 6:43:08 AM UTC-7, Simon Giddings wrote: I am researching the writing of a simple music notation program which will permit simple actions such as - Display - Transposition - Annotation - etc My first hurdle is how to display the music. The majority of desktop apps use music fonts, which makes zooming and resizing quite simple. However, it would appear that I would need to be able to access the individual glyphs to do this - which is not possible in android as far as I understand. Should I stick with a music font and try to find a way to get the information needed ? Should I abandon this and be looking at using svg files or transparent PNGs ? Can anyone advise here, please ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 deal with negative anonymous reviews?
One of my apps is the victim of repeated negative reviews by an anonymous poster. No comments are made, just a star rating of 1 done twice, probably by the same poster. I reported this to Google, but they don't seem interested in doing anything about it. Here is their reply to an e-mail I sent on the subject: Hi Robert, Thank you for your note. We really appreciate your thoughtful feedback, and we'll keep it in mind as we work to improve Google Play. Regards, The Google Play Team Has anyone else experienced this sort of abuse and if so, what have you done about it? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to deal with negative anonymous reviews?
We really appreciate your thoughtful feedback, and we'll keep it in mind as we work to improve Google Play. Wow... hot off the photocopier, methinks. Sorry to hear about your situation. I can only recommend - since it is clear you're not going to get any help from Google on this - that you rely on the common sense of the average user. If I see a low rating with no comment, I generally ignore it. I would only take note of a low rating if the accompanying comment looked like it had been constructed carefully and presented comprehensive points, as opposed to simply ranting. Like the subject of licencing and cracking, sometimes the best approach is simply to put the effort into making the apps good and useful so that the good people buy them - and don't waste valuable time and effort on trying to stamp out the negative, since no matter how hard you try, there's always someone around the corner who's going to undo your hard work. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 deal with negative anonymous reviews?
The simple answer: Nothing can be done about it. The more you worry about such things, the worse, for you, it will be. Since we can't respond to negative comments and ratings, the best thing to do is just keep improving your app and not get too wrapped up about things you cannot change or control. -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.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Music notation application
I remember doing this in C# for a directx app. Depending on how picky you are, the numbers for time signatures, and the clefs, can be a pain. Good luck. On May 9, 2012 11:00 AM, JackN j...@jacknorth.com wrote: I mean just develop the graphics using primative methods to produce the output you want. Like sprites (jpg, png), but procedural based. eg.. void drawWholeNote(canvas, centerx,centery, scale) { canvas.drawCircle(etc.); } void drawHalfNote(canvas, centerx,centery, scale) { canvas.drawCircle(etc.) canvas.drawLine(etc) } On Tuesday, May 8, 2012 8:43:52 AM UTC-7, Simon Giddings wrote: Thank you for taking the time to reply. Can you point me in the direction for what this procedure based rendering is about ? On Tuesday, 8 May 2012 17:38:30 UTC+2, JackN wrote: you might want to consider procedure based rendering. Should scale well (and easy). I wish you luck and I would get you app when it is done. On Tuesday, May 8, 2012 6:43:08 AM UTC-7, Simon Giddings wrote: I am researching the writing of a simple music notation program which will permit simple actions such as - Display - Transposition - Annotation - etc My first hurdle is how to display the music. The majority of desktop apps use music fonts, which makes zooming and resizing quite simple. However, it would appear that I would need to be able to access the individual glyphs to do this - which is not possible in android as far as I understand. Should I stick with a music font and try to find a way to get the information needed ? Should I abandon this and be looking at using svg files or transparent PNGs ? Can anyone advise here, please ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to inflate a MapView inside a ViewFlipper??
Hi, I'm stuck in this issue for a while now.. went around forums, books (M.Murphy, R.Meier) and I did not find any real helpful threads.. My main activity is a ListActivity, where the view(main.xml) contains a ListView and a ViewFlipper just below. For each selected line in my ListView i want to update the content of the ViewFlipper. Based on two buttons, my ViewFlipper would switch between the MapView and a basic LinearLayout. As far as i understand i should inflate my MapView but I did not find any informatio about how to do that.. Of course I'm aware that a MapActivity should appear somewhere.. If someone could provide me a link to a snippet code or answer me with a sample code it would be great!! (the other option is to start a new activity based on a MapActivity where i would not need to inflate anthing, but it would not be so nice) Thanks, Pedro Here below my main.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=match_parent android:orientation=vertical !-- android:background=#77ff -- LinearLayout android:id=@+id/linearLayout1 android:layout_width=fill_parent android:layout_height=0dp android:layout_weight=0.3 Button android:id=@+id/prevViewFlipperButt android:layout_width=wrap_content android:layout_height=wrap_content android:onClick=onPrevChangeViewFlipper android:text=PREV / Button android:id=@+id/nextViewFlipperButt android:layout_width=wrap_content android:layout_height=wrap_content android:onClick=onNextChangeViewFlipper android:text=NEXT / /LinearLayout ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=0dp android:layout_weight=1 android:cacheColorHint=# / ViewFlipper android:id=@+id/viewFlipperFromListView android:layout_width=fill_parent android:layout_height=0dp android:layout_weight=1 include android:id=@+id/flipper1 layout=@layout/details_flipper_view / include android:id=@+id/flipper2 layout=@layout/map_flipper_view / /ViewFlipper TextView android:id=@+id/selectionTxtView android:layout_width=fill_parent android:layout_height=0dp android:layout_weight=0.3 android:textSize=44sp / /LinearLayout details_flipper_view.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/PochtroDetailsFlipperLayout android:layout_width=match_parent android:layout_height=match_parent android:orientation=vertical TextView android:id=@+id/textView1 android:layout_width=wrap_content android:layout_height=wrap_content android:text=Large Text android:textAppearance=?android:attr/textAppearanceLarge / TextView android:id=@+id/textView4 android:layout_width=wrap_content android:layout_height=wrap_content android:text=Small Text android:textAppearance=?android:attr/textAppearanceSmall / /LinearLayout map_flipper_view.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/frame android:orientation=vertical android:layout_width=wrap_content android:layout_height=wrap_content com.google.android.maps.MapView android:id=@+id/map_view android:apiKey=XX android:enabled=true android:clickable=true android:layout_height=wrap_content android:layout_width=fill_parent / /LinearLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to inflate a MapView inside a ViewFlipper??
On Wed, May 9, 2012 at 12:17 PM, pedro242 pedro.contreir...@gmail.comwrote: My main activity is a ListActivity, where the view(main.xml) contains a ListView and a ViewFlipper just below. For each selected line in my ListView i want to update the content of the ViewFlipper. Based on two buttons, my ViewFlipper would switch between the MapView and a basic LinearLayout. As far as i understand i should inflate my MapView but I did not find any informatio about how to do that.. Of course I'm aware that a MapActivity should appear somewhere.. You'd have to change your main activity from a ListActivity to a MapActivity and handle the list-related behaviors yourself. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Regarding WIFIInfo bssid ssid
http://developer.android.com/reference/android/net/wifi/WifiInfo.html The method you probably want is getBssid 09.05.2012 17:33 пользователь Raunaque Quaiser rmquai...@gmail.com написал: mac address is of the hardware On Wed, May 9, 2012 at 6:51 PM, Bunty syed itsmeatfo...@gmail.com wrote: But is it device wifi mac address or active wifi network mac address... On 9 May 2012 18:27, Jason Teagle teagle.ja...@gmail.com wrote: So just want to know is any there any unique identifier for wifi network which will be unique constant on all devices.. The MAC address? This can be obtained from a WifiInfo object... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@** googlegroups.com 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=enhttp://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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android usb network
Are you developing this device or using an existing device? You should look at the EthernetStateTracker class. You need to modify the networkattributes config.xml property to instantiate type 9 and add type 9 to the radioattributes config entry. You'll need to add an ethernet dhcp agent to init.rc. You'll need to add a usb-ethernet driver to your kernel image. These things I think are available in the TOT of AOSP, but may not be available on older devices. It may be simpler to have an internet-visible gateway into your intranet app, then you could access it worldwide and wouldn't need to do this busywork of usb-ethernet. Alternatively add a wifi access point to your lan and connect your tablet that way. Wires are passe. R On Tue, May 8, 2012 at 10:16 PM, Harishk hkacho...@gmail.com wrote: Hi All, I'm looking a good way to bring Android device in intranet using USB, what I want is to connect my Android tablet to a PC in network and then work on Tablet as a PC. In that way I can take print from a network printer also take adventage of better network connection within my network. Just to give a idea, I'm developing a application which runs in Intranet and few user will have Tablet as interface and few user will have deskstop as interface. Tablet user should be able to work just like a desktop user but with rich user interface so that user can just work with there fingers insted of keyboard/mouce. please point me to right direction,links. as long as possible I do not wants to create any dependancy to third party application for this purpose. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to inflate a MapView inside a ViewFlipper??
Have you ever tried this? Not sure it works, since i will likely face another issue in managing the ListView without the ListActivity... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to inflate a MapView inside a ViewFlipper??
No such issues. Just try it out. A MapView is really special and requires a MapActivity. A ListView does not *require* a ListActivity, it's only there to make things a tiny bit easier. 09.05.2012 22:02 пользователь pedro242 pedro.contreir...@gmail.com написал: Have you ever tried this? Not sure it works, since i will likely face another issue in managing the ListView without the ListActivity... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] MapOverlay and displaying location as an address
On Wed, May 9, 2012 at 1:35 AM, chelsjo chelsea.jon...@gmail.com wrote: However I am unsure what I need to include to make the Overlay item point to the current location? What do I need to include in the Activity? Look at MyLocationOverlay. This is exactly what it's for. -I would like the app to instead of bringing up the latitude and longitude, to bring up the address of where the user currently is. Look at GeoCoder. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Long running Android service is getting recreated over and over
That is the expected behavior. The longer your service runs, the more likely it is to be killed (and then restarted if you asked for it to be sticky). On Wed, May 9, 2012 at 3:13 AM, William Kelley williamtkel...@gmail.comwrote: I have a simple Android Activity with one button to start and stop a long running Android Service (which does some simple logging). As soon as I start the service, I close the app (Activity) and the service should then run in the background indefinitely. But it doesn't. At random times, the Application object this Service belongs to is recreated by the OS and then my Service is as well. So it's not just that the Service is getting onStartCommand called, but first it gets onCreate called, creating a new Service. I don't know what happens to the old one, it just goes away - onDestroy is not called or anything. I run the Service as START_STICKY, I am not using the main UI thread in any way, so there should be no issues there. I am Logging all activity from the Service, logging exceptions, etc. Nothing is out of the ordinary except that my Service is getting recreated over and over. I just can't understand what the problem is. The Service is running fine, then boom, my Application gets an onCreate, my Service gets an onCreate and onStartCommand and the old Service, which was in the middle of logging goes, away without any notice or warning. The new Service starts logging. I end up with a bunch of disconnected logs where there should be just one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] OpenDocument
On Wed, May 2, 2012 at 11:54 PM, huberte svend.wal...@gmail.com wrote: Would like to use the native OpenDocument to open a jpg file that's in my app. There's no guarantee that this OpenDocument is native. Is there a way to open this file with the native app (zooming resizing, etc) but that it cant be copied to the phone ? Show the image yourself, in your app. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Confirmation with pressing back button
Hi Justin, Nice to read you again. I think you have miss understood me, probably cause I did not explain myself right neither: my English is not the best one exactly... The method linked by Jason uses onBackPressed() ONLY, so what I meant is that I cannot use that method if I want to kept backward compatibility, so I need to use the other one proposed by you that relies on onKeyDown. Yes, it also uses onBackPressed, but I though it was clear what i wanted to say just pasting the first lines of code of each proposed solution. Anyway It works fine in my Samsung GS2, and also in a 2.1 emulator, but it does not on a 1.6 emulator. At least not with my code. Both versions calls to onBackPressed as expected, but while on 2.1+ Android does not close the application after that call, in 1.6 it does it. I have also additional problems with this: when I try to get back from pause on 1.6, the application crashes, but it still works fine in 2.1+. May be I will nd up using API level 5... is there any place with stats about SDK usage to know how many market I will lost in that case? Best regards and thanks again by your help, On May 8, 5:12 pm, Justin Anderson magouyaw...@gmail.com wrote: Thanks a lot Jason and Justin. My game works fine on 1.6+, at least on simulator. AFAIK that's API level 4, so I cannot use this method if I wan to keep that compatibility: @Override public void onBackPressed() { return; } That's not true... Set your target API level to something high enough that you can use the onBackPressed. Did you read the link I gave you? It specifically addresses this and tells you how to use both depending on the API level. Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Tue, May 8, 2012 at 7:01 AM, Fran fmmar...@gmail.com wrote: Thanks a lot Jason and Justin. My game works fine on 1.6+, at least on simulator. AFAIK that's API level 4, so I cannot use this method if I wan to keep that compatibility: @Override public void onBackPressed() { return; } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Long running Android service is getting recreated over and over
So, if I want a long running process (logging GPS points over several hours), I would need to use START_STICKY and then maintain some knowledge of state between service restarts. That is, save state to disk (filename that I am writing to, specifically). And since onDestroy is not called and there is no other warning that the service is about to end, I can't use any kind of buffered file writer because I can't guarantee that the buffer is written and I can't know to call flush. Am I understanding this correctly? And thanks Kostya for the info and very useful link. Thanks! On Wednesday, May 9, 2012 11:35:15 AM UTC-7, Dianne Hackborn wrote: That is the expected behavior. The longer your service runs, the more likely it is to be killed (and then restarted if you asked for it to be sticky). -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Long running Android service is getting recreated over and over
Right. And in general everlasting services are an antipattern... kris On Wed, May 9, 2012 at 3:17 PM, William Kelley williamtkel...@gmail.com wrote: So, if I want a long running process (logging GPS points over several hours), I would need to use START_STICKY and then maintain some knowledge of state between service restarts. That is, save state to disk (filename that I am writing to, specifically). And since onDestroy is not called and there is no other warning that the service is about to end, I can't use any kind of buffered file writer because I can't guarantee that the buffer is written and I can't know to call flush. Am I understanding this correctly? And thanks Kostya for the info and very useful link. Thanks! On Wednesday, May 9, 2012 11:35:15 AM UTC-7, Dianne Hackborn wrote: That is the expected behavior. The longer your service runs, the more likely it is to be killed (and then restarted if you asked for it to be sticky). -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Formatting localized preference sensitive date time with seconds
I would like to create a locale sensitive string (for presentation in the UI) *generally* looking like: dd/mm/ hh:mm:ss a or /mm/dd HH.mm.ss I want the numeric date format set by the user in Settings (mm/dd/ or /mm/dd), and time is either 12 or 24 hour time format as specified in Settings also. Android has several helper classes, for this, but none seem to fully meet my criteria. * java.DateFormat.createDateTimeInstance() : produces localized formats, but ignores what user has set for numeric date format and 12/24 format in Settings. * android.text.format.DateUtils.formatDateTime() : does not print seconds * android.text.format.DateFormat.getTimeFormat() : does not include seconds One hackish approach might be to use getTimeFormat, cast it back to a SimpleDateFormat, and use toPattern() and some magic to add ':ss' to the pattern, but this is gross and we don't really know what the localized separator is anyhow. So I have the following code, which seems rather ugly, but fixes the time into a non-localized format: // Get date format as specified in Settings DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(context); boolean is24HourFormat = android.text.format.DateFormat.is24HourFormat(context); String timePattern = context.getString(is24HourFormat ? R.string.twenty_four_hour_time_format : R.string.twelve_hour_time_format); // Get 12 or 24 hour time format using timePattern DateFormat timeFormat = new SimpleDateFormat(timePattern); Date now = new Date(); return dateFormat.format(date) + , + timeFormat.format(date); With my own format strings: string name=twelve_hour_time_formath:mm:ss a/string string name=twenty_four_hour_time_formatHH:mm:ss/string This seems like a huge mess, is there a better way to do this? Notice I had to provide my own template, but they are not localized for every locale. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Long running Android service is getting recreated over and over
Thanks. I'm not sure why long running services are frowned upon. As long as they don't overly consume resources and are done with the user's knowledge, and indeed the user *wants* the features of a long running service, then what is the harm? If a user wants to log something for a long time, an everlasting service is necessary. And if the user doesn't want this feature, they simply don't use the app. On Wednesday, May 9, 2012 12:32:17 PM UTC-7, Kristopher Micinski wrote: Right. And in general everlasting services are an antipattern... kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Long running Android service is getting recreated over and over
Because Android doesn't have many programs that should constantly be consuming background memory and charging through the CPU. The use case is things like phones, where you put it in your pocket, and you just want it to go away. Remember that you can't do computation continually if you don't have a wakelock, and if you keep a wake lock and burn CPU time your users are going to basically hate your app. If this is for development, that's one thing, but I can't really think of many services that should be eating up battery life continuously. Instead, people use an AlarmManager to occasionally wake up their app, do some work, then maybe go back to sleep (or run for a while). So, in short, no, the platform is different, this isn't the days of the unix daemon where you can just write an app and hope it will live forever, and very few apps have legitimate use cases for continually doing computation. We consistently see people who say but my app is different it *really should* be running continuously, and all too frequently people come to a consensus that the app should not -- in reality -- be running forever. Instead, like I mentioned, look into an AlarmManager to wake up your app on occasion, do some work, and then perhaps schedule a little bit of time to run. We all know those apps you download that hold a wake lock forever, try to connect to a chat service, and then kill your device within three or four hours. kris On Wed, May 9, 2012 at 4:18 PM, William Kelley williamtkel...@gmail.com wrote: Thanks. I'm not sure why long running services are frowned upon. As long as they don't overly consume resources and are done with the user's knowledge, and indeed the user *wants* the features of a long running service, then what is the harm? If a user wants to log something for a long time, an everlasting service is necessary. And if the user doesn't want this feature, they simply don't use the app. On Wednesday, May 9, 2012 12:32:17 PM UTC-7, Kristopher Micinski wrote: Right. And in general everlasting services are an antipattern... kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en