Re: [android-developers] Re: OutofMemory Excepton error in android
Thanks for ur Suggestion. Ooops. I tried it now still same error java.lang.outofMemoryError. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Thu, Mar 14, 2013 at 11:15 AM, Harish hkacho...@gmail.com wrote: Hi Try this code if it helps System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(/data/data/**com.samsaadhani.sandhi1/files/** output),1024))); FileOutputStream fis = openFileOutput(input, Context.MODE_PRIVATE); fis.write(input.getText().**toString().getBytes()); fis.write(\n.getBytes()); fis.close(); LTProc.main(new String[]{/data/data/com.** samsaadhani.sandhi1/files/skt_**morf.bin,/data/data/com.** samsaadhani.sandhi1/files/**input}); -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/feA_XKu8N1o/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
Throwing a line of code isn't going to stop your library from attempting to buffer a huge file... Kris On Thu, Mar 14, 2013 at 1:59 AM, karunakar medamoni kannaiah.chi...@gmail.com wrote: Thanks for ur Suggestion. Ooops. I tried it now still same error java.lang.outofMemoryError. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Thu, Mar 14, 2013 at 11:15 AM, Harish hkacho...@gmail.com wrote: Hi Try this code if it helps System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(/data/data/com.samsaadhani.sandhi1/files/output),1024))); FileOutputStream fis = openFileOutput(input, Context.MODE_PRIVATE); fis.write(input.getText().toString().getBytes()); fis.write(\n.getBytes()); fis.close(); LTProc.main(new String[]{/data/data/com.samsaadhani.sandhi1/files/skt_morf.bin,/data/data/com.samsaadhani.sandhi1/files/input}); -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/feA_XKu8N1o/unsubscribe?hl=en. To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Flickr Photo upload error
public void sendPost() { String title = posttitle.getText().toString(); String body = poststring.getText().toString(); HttpPost hpost = new HttpPost(http://api.tumblr.com/v2/blog/; + blogname.getText().toString() + .tumblr.com/post?api_key= + token); ListNameValuePair nameValuePairs = new ArrayListNameValuePair(2); nameValuePairs.add(new BasicNameValuePair(type, photo)); nameValuePairs.add(new BasicNameValuePair(caption, Testing)); // nameValuePairs // .add(new BasicNameValuePair(source, // URLEncoder.encode(http://www.sanatansociety.org/beeld/Paintings100/ram_ramayana.jpg;))); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); ByteArrayOutputStream bos = new ByteArrayOutputStream(); // bitmap.compress(CompressFormat.JPEG, 0 , bos); bitmap.compress(CompressFormat.JPEG, 50, bos); byte[] bitmapdata = bos.toByteArray(); String img = URLEncoder.encode(com.example.tumblrnew.Base64 .encodeBytes(bitmapdata)); nameValuePairs.add(new BasicNameValuePair(data, Base64 .encodeToString(bitmapdata, Base64.NO_WRAP))); try { hpost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); } catch (UnsupportedEncodingException e) { debug += e.toString(); } consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET); consumer.setTokenWithSecret(token, secret); try { consumer.sign(hpost); } catch (OAuthMessageSignerException e) { debug += e.toString(); } catch (OAuthExpectationFailedException e) { debug += e.toString(); } catch (OAuthCommunicationException e) { debug += e.toString(); } DefaultHttpClient client = new DefaultHttpClient(); HttpResponse resp = null; try { resp = client.execute(hpost); } catch (ClientProtocolException e) { debug += e.toString(); } catch (IOException e) { debug += e.toString(); } String result = null; try { result = EntityUtils.toString(resp.getEntity()); } catch (ParseException e) { debug += e.toString(); } catch (IOException e) { debug += e.toString(); } debug += result; debugStatus.setText(debug); } i had successfully login into the tumblr using oauth but when trying to upload the image it send the error mesg photo uploading error -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] File not found exception, while listed in manifest.xml file
I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.playcez.Start}: java.lang.ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.access$600(ActivityThread.java:134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler.dispatchMessage(Handler.java:99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.main(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.invokeNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.invoke(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.main(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity android:name=Start android:label=@string/app_name android:screenOrientation=portrait intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity 3. Here is class snapshot - import com.facebook.Session; import com.facebook.SessionState; import com.facebook.UiLifecycleHelper; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.AnimationUtils; import android.view.animation.LayoutAnimationController; import android.view.animation.RotateAnimation; import android.view.animation.TranslateAnimation; import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.SlidingDrawer; import android.widget.TextView; public class Start extends FragmentActivity { private final int SPLASH_SCREEN_TIMEOUT = 3000;//1850 private static final int SPLASH = 0; private static final int SELECTION = 1; private static final int FRAGMENT_COUNT = SELECTION +1; private int time=100; private Fragment[] fragments = new Fragment[FRAGMENT_COUNT]; private MenuItem settings; private boolean isResumed = false; private UiLifecycleHelper uiHelper; private Session.StatusCallback callback = new Session.StatusCallback() { @Override public void call(Session session, SessionState state, Exception exception) { onSessionStateChange(session, state, exception); } }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
[android-developers] Re: File not found exception, while listed in manifest.xml file
you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.playcez.Start}: java.lang.ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.access$600(ActivityThread.java:134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler.dispatchMessage(Handler.java:99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.main(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.invokeNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.invoke(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.main(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity android:name=Start android:label=@string/app_name android:screenOrientation=portrait intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity 3. Here is class snapshot - import com.facebook.Session; import com.facebook.SessionState; import com.facebook.UiLifecycleHelper; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.AnimationUtils; import android.view.animation.LayoutAnimationController; import android.view.animation.RotateAnimation; import android.view.animation.TranslateAnimation; import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.SlidingDrawer; import android.widget.TextView; public class Start extends FragmentActivity { private final int SPLASH_SCREEN_TIMEOUT = 3000;//1850 private static final int SPLASH = 0; private static final int SELECTION = 1; private static final int FRAGMENT_COUNT = SELECTION +1; private int time=100; private Fragment[] fragments = new Fragment[FRAGMENT_COUNT]; private MenuItem
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.**playcez.Start}: java.lang.**ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(** ActivityThread.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**handleLaunchActivity(** ActivityThread.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**access$600(ActivityThread.**java:134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**handleMessage(ActivityThread.**java:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler.** dispatchMessage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.**java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**main(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invokeNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invoke(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit$**MethodAndArgsCaller.run(** ZygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.**ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoader.findClass(**BaseDexClassLoader.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader. **loadClass(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader. **loadClass(ClassLoader.java:**461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.**newActivity(Instrumentation.**java:1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(** ActivityThread.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity android:name=Start android:label=@string/app_**name android:screenOrientation=**portrait intent-filter action android:name=android.intent.**action.MAIN / category android:name=android.intent.**category.LAUNCHER / /intent-filter /activity 3. Here is class snapshot - import com.facebook.Session; import com.facebook.SessionState; import com.facebook.**UiLifecycleHelper; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.**Fragment; import android.support.v4.app.**FragmentActivity; import android.support.v4.app.**FragmentManager; import android.support.v4.app.**FragmentTransaction; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.**OnClickListener; import android.view.animation.**AlphaAnimation; import android.view.animation.**Animation; import android.view.animation.**AnimationSet; import android.view.animation.**AnimationUtils; import android.view.animation.**LayoutAnimationController; import android.view.animation.**RotateAnimation; import android.view.animation.**TranslateAnimation; import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.SlidingDrawer; import android.widget.TextView; public class Start extends FragmentActivity { private final int
Re: [android-developers] Re: OutofMemory Excepton error in android
Actually even 5K can crash his app... it all depends on what he did before the allocation. Android has a nasty bug of claiming you dont have enough memory even if your heap has more than enough free space if it grew close to its maximum value previously (and dont't forget fragmentation as well, 10MB of free heap doesn't mean you can allocate 10MB). Basically i found that if i get a OOM exception when the allocated size isn't something enormous, it's usually because is misbehaved earlier :) So my suggestion to Karunakar (assuming he can't do random reads on the file and the file isn't really big) is to profile his app and see if he needs to do some fixing up before he gets to the point of reading the file. Other than that, he can always try the big heap flag or just dump everything to native heap. On Thursday, March 14, 2013 7:38:56 AM UTC+2, Kristopher Micinski wrote: how big is the file you're reading..? In general, you can't allocate that much space on Android. To combat this you need to be able to do lazy I/O. But ... are you trying to read in a dictionary (using apertium?). I'd guess this is a few megabytes at least right? Having a megabyte or two on the heap won't necessarily crash your app, but having more than that certainly can! (This of course, depends on the device..) Kris On Thu, Mar 14, 2013 at 12:49 AM, karunakar medamoni kannaia...@gmail.com javascript: wrote: Hi Richard Good Morning. As per your mail am attaching my android log file. Please have look at once. I ran the same program from command line and also in eclipse. I got the output , when i try to integrate with android am getting this error. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Wed, Mar 13, 2013 at 10:43 PM, karunakar medamoni kannaia...@gmail.com javascript: wrote: Hello Richard Thank u for u reply. I will be back with full stack from LogCat by tomorrow morning. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Wed, Mar 13, 2013 at 6:11 PM, RichardC richard...@googlemail.comjavascript: wrote: Can you include the full stack trace from LogCat please. On Wednesday, March 13, 2013 11:37:16 AM UTC, karunakar medamoni wrote: Hello Every one. This is karunakar working on android project. Am converting apertium based webpage to android app. When i try to run com.apertium.lttoolbox.LTPorc class with two arguments filename.bin file and input file am getting this error. If any help from any one it would be helpful for me. Here am pasting my code please have a look at once. System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(/data/data/com.samsaadhani.sandhi1/files/output; FileOutputStream fis = openFileOutput(input, Context.MODE_PRIVATE); fis.write(input.getText().toString().getBytes()); fis.write(\n.getBytes()); fis.close(); LTProc.main(new String[]{/data/data/com.samsaadhani.sandhi1/files/skt_morf.bin,/data/data/com.samsaadhani.sandhi1/files/input}); -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/feA_XKu8N1o/unsubscribe?hl=en. To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com javascript:wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.**playcez.Start}: java.lang.**ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(** ActivityThread.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**handleLaunchActivity(** ActivityThread.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**access$600(ActivityThread.**java:134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**handleMessage(ActivityThread.**java:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler.* *dispatchMessage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.**java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**main(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invokeNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invoke(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit$**MethodAndArgsCaller.run(** ZygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.**ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoader.findClass(**BaseDexClassLoader.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClass(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClass(ClassLoader.java:**461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.**newActivity(Instrumentation.**java:1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(** ActivityThread.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity android:name=Start android:label=@string/app_**name android:screenOrientation=**portrait intent-filter action android:name=android.intent.**action.MAIN / category android:name=android.intent.**category.LAUNCHER / /intent-filter /activity 3. Here is class snapshot - import com.facebook.Session; import com.facebook.SessionState; import com.facebook.**UiLifecycleHelper; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.**Fragment; import android.support.v4.app.**FragmentActivity; import android.support.v4.app.**FragmentManager; import android.support.v4.app.**FragmentTransaction; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.**OnClickListener; import android.view.animation.**AlphaAnimation; import android.view.animation.**Animation; import android.view.animation.**AnimationSet; import android.view.animation.**AnimationUtils; import android.view.animation.**LayoutAnimationController; import android.view.animation.**RotateAnimation; import android.view.animation.**TranslateAnimation; import android.widget.Button; import android.widget.ImageView; import
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
Rakesh Jha wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) try .Start pskink -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
Yes Piren, application android:allowBackup=true android:icon=@drawable/ic_launcher android:label=@string/app_name android:theme=@style/AppTheme activity android:name=com.playcez.Start android:label=@string/app_name android:screenOrientation=portrait intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=com.playcez.GPSActivity android:label=@string/app_name android:screenOrientation=portrait /activity On Thu, Mar 14, 2013 at 1:47 PM, Piren gpi...@gmail.com wrote: Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/**guide/topics/manifest/** activity-element.htmlhttp://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.playcez.Start}: java.lang.** ClassNotFoundExcepti**on: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**per**formLaunchActivity(**ActivityThr** ead.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**han**dleLaunchActivity(**ActivityThre** ad.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**acc**ess$600(ActivityThread.**java:**134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**h**andleMessage(ActivityThread.**ja** va:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler. **dispatchMes**sage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**mai**n(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invok**eNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invok**e(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**Zygote**Init$**MethodAndArgsCaller.run(**Z** ygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**Zygote**Init.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main**(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.** ClassNotFoundExcepti**on: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoad**er.findClass(**BaseDexClassLoade**r.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClas**s(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClas**s(ClassLoader.java:**461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.**ne**wActivity(Instrumentation.**java** :1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**per**formLaunchActivity(**ActivityThr** ead.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity android:name=Start android:label=@string/app_**nam**e android:screenOrientation=**por**trait intent-filter action android:name=android.intent.**a**ction.MAIN / category android:name=android.intent.**c**ategory.LAUNCHER / /intent-filter /activity 3. Here is class snapshot - import com.facebook.Session; import
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
just to be clear: in the manifest the manifest tag needs to say manifest ...package=com.playcez.start ... then your source directory needs to be ../src/playcez/Start.java And then the activity can have the name as .Start P.S - You should probably add another level to the package declaration... you'd usually want all your apps to share the same package ... so assuming playcez is your dev/company name you should add another level for the app itself... so if you'll have another app, you can still use the com.playcez package. http://en.wikipedia.org/wiki/Java_package#Package_naming_conventions On Thursday, March 14, 2013 10:17:25 AM UTC+2, Piren wrote: Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.**playcez.Start}: java.lang.**ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(** ActivityThread.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**handleLaunchActivity(** ActivityThread.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**access$600(ActivityThread.**java:134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**handleMessage(ActivityThread.** java:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler. **dispatchMessage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.**java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**main(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invokeNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invoke(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit$**MethodAndArgsCaller.run(** ZygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.**ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoader.findClass(**BaseDexClassLoader.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClass(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClass(ClassLoader.java:**461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.**newActivity(Instrumentation.**java:1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(** ActivityThread.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity android:name=Start android:label=@string/app_**name android:screenOrientation=**portrait intent-filter action android:name=android.intent.**action.MAIN / category android:name=android.intent.**category.LAUNCHER / /intent-filter /activity 3. Here is class snapshot - import com.facebook.Session; import com.facebook.SessionState; import com.facebook.**UiLifecycleHelper; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.**Fragment; import android.support.v4.app.**FragmentActivity;
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
Thanks PSKink, I tested all three probability as i mentioned com.playcez.Start Start .Start but not getting any clue. On Thu, Mar 14, 2013 at 1:51 PM, skink psk...@gmail.com wrote: Rakesh Jha wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) try .Start pskink -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks Regards Rakesh Kumar Jha Android Developer, Trainer and Mentor Bangalore Skype - rkjhaw (O) +918050753516 (R) +919886336619 -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
No, Package is only package=com.playcez manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.playcez android:versionCode=1 android:versionName=1.0 Start is a FragmentActivity inside this package.. On Thu, Mar 14, 2013 at 1:53 PM, Piren gpi...@gmail.com wrote: just to be clear: in the manifest the manifest tag needs to say manifest ...package=com.playcez.start ... then your source directory needs to be ../src/playcez/Start.java And then the activity can have the name as .Start P.S - You should probably add another level to the package declaration... you'd usually want all your apps to share the same package ... so assuming playcez is your dev/company name you should add another level for the app itself... so if you'll have another app, you can still use the com.playcez package. http://en.wikipedia.org/wiki/Java_package#Package_naming_conventions On Thursday, March 14, 2013 10:17:25 AM UTC+2, Piren wrote: Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/**guide/topics/manifest/** activity-element.htmlhttp://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.playcez.Start}: java.lang.** ClassNotFoundExcepti**on: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**per**formLaunchActivity(**ActivityThr** ead.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**han**dleLaunchActivity(**ActivityThre** ad.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**acc**ess$600(ActivityThread.**java:**134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**h**andleMessage(ActivityThread.**ja** va:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler. **dispatchMes**sage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**mai**n(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invok**eNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invok**e(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**Zygote**Init$**MethodAndArgsCaller.run(**Z** ygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**Zygote**Init.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main**(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.** ClassNotFoundExcepti**on: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoad**er.findClass(**BaseDexClassLoade**r.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClas**s(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClas**s(ClassLoader.java:**461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.**ne**wActivity(Instrumentation.**java** :1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**per**formLaunchActivity(**ActivityThr** ead.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity android:name=Start android:label=@string/app_**nam**e android:screenOrientation=**por**trait intent-filter action android:name=android.intent.**a**ction.MAIN
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
grrr... made a mistake: manifest ...package=com.playcez ... :-) Also, didn't notice what skink noticed - .Start is correct, capitalization matters On Thursday, March 14, 2013 10:23:47 AM UTC+2, Piren wrote: just to be clear: in the manifest the manifest tag needs to say manifest ...package=com.playcez.start ... then your source directory needs to be ../src/playcez/Start.java And then the activity can have the name as .Start P.S - You should probably add another level to the package declaration... you'd usually want all your apps to share the same package ... so assuming playcez is your dev/company name you should add another level for the app itself... so if you'll have another app, you can still use the com.playcez package. http://en.wikipedia.org/wiki/Java_package#Package_naming_conventions On Thursday, March 14, 2013 10:17:25 AM UTC+2, Piren wrote: Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.**playcez.Start}: java.lang.**ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(** ActivityThread.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**handleLaunchActivity(** ActivityThread.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**access$600(ActivityThread.**java:134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**handleMessage(ActivityThread.** java:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler. **dispatchMessage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.**java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**main(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invokeNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invoke(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit$**MethodAndArgsCaller.run(** ZygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.**ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoader.findClass(**BaseDexClassLoader.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClass(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClass(ClassLoader.java:**461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.**newActivity(Instrumentation.**java:1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(** ActivityThread.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity android:name=Start android:label=@string/app_**name android:screenOrientation=**portrait intent-filter action android:name=android.intent.**action.MAIN / category android:name=android.intent.**category.LAUNCHER / /intent-filter /activity 3. Here is class snapshot - import com.facebook.Session;
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
Sorry skpink Piren, I used capital .Start, but here by mistake i written small, i'm using capital S . like - application android:allowBackup=true android:icon=@drawable/ic_launcher android:label=@string/app_name android:theme=@style/AppTheme activity android:name=.Start android:label=@string/app_name android:screenOrientation=portrait intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity On Thu, Mar 14, 2013 at 1:57 PM, Piren gpi...@gmail.com wrote: grrr... made a mistake: manifest ...package=com.playcez ... :-) Also, didn't notice what skink noticed - .Start is correct, capitalization matters On Thursday, March 14, 2013 10:23:47 AM UTC+2, Piren wrote: just to be clear: in the manifest the manifest tag needs to say manifest ...package=com.playcez.**start ... then your source directory needs to be ../src/playcez/Start.java And then the activity can have the name as .Start P.S - You should probably add another level to the package declaration... you'd usually want all your apps to share the same package ... so assuming playcez is your dev/company name you should add another level for the app itself... so if you'll have another app, you can still use the com.playcez package. http://en.wikipedia.org/wiki/**Java_package#Package_naming_**conventionshttp://en.wikipedia.org/wiki/Java_package#Package_naming_conventions On Thursday, March 14, 2013 10:17:25 AM UTC+2, Piren wrote: Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/**guide/topics/manifest/** activity-element.htmlhttp://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.playcez.Start}: java.lang.** ClassNotFoundExcepti**on: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**per**formLaunchActivity(**ActivityThr** ead.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**han**dleLaunchActivity(**ActivityThre** ad.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**acc**ess$600(ActivityThread.**java:** 134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**h**andleMessage(ActivityThread.**ja** va:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler.**dispatchMes**sage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**mai**n(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invok**eNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invok**e(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**Zygote**Init$**MethodAndArgsCaller.run(**Z* *ygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**Zygote**Init.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main**(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.** ClassNotFoundExcepti**on: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoad**er.findClass(**BaseDexClassLoade**r.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClas**s(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClas**s(ClassLoader.java:**461)
[android-developers] ad-hoc in android
How to implement for entering an ad-hoc network in not rooted android device, i didn't find any solution in the official developer site, so is there an workaround to achieve this :) -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
is the file structure is correct (app/src/com/playcez/Start.java) (which i got wrong before as well lol.. i always forget the com) Also, your activity code doesn't have the package declared in it... it should say package com.playcez; at the top On Thursday, March 14, 2013 10:23:30 AM UTC+2, RKJ (Android developer) wrote: Yes Piren, application android:allowBackup=true android:icon=@drawable/ic_launcher android:label=@string/app_name android:theme=@style/AppTheme activity android:name=com.playcez.Start android:label=@string/app_name android:screenOrientation=portrait intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=com.playcez.GPSActivity android:label=@string/app_name android:screenOrientation=portrait /activity On Thu, Mar 14, 2013 at 1:47 PM, Piren gpi...@gmail.com javascript:wrote: Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/**guide/topics/manifest/** activity-element.htmlhttp://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.playcez.Start}: java.lang.** ClassNotFoundExcepti**on: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**per**formLaunchActivity(**ActivityThr** ead.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**han**dleLaunchActivity(**ActivityThre** ad.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**acc**ess$600(ActivityThread.**java:**134) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**h**andleMessage(ActivityThread.**ja** va:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler. **dispatchMes**sage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**mai**n(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invok**eNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invok**e(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**Zygote**Init$**MethodAndArgsCaller.run(**Z** ygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**Zygote**Init.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main**(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.** ClassNotFoundExcepti**on: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoad**er.findClass(**BaseDexClassLoade**r.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClas**s(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClas**s(ClassLoader.java:**461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.Instrumentation.**ne**wActivity(Instrumentation.**java** :1023) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**per**formLaunchActivity(**ActivityThr** ead.java:1992) 03-14 13:06:49.078: E/AndroidRuntime(25684): ... 11 more 03-14 13:06:49.109: D/dalvikvm(25684): GC_CONCURRENT freed 170K, 4% free 9405K/9719K, paused 1ms+2ms 2. Manifest - activity
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
yes, correct Piren, 1. Activity class package com.playcez; is mentioned. 2. and Start.java is in correct package name Basically this project is working in different box(laptop), and i'm trying to import this project, since 2-3 i'm getting error and not getting any clue. :( On Thu, Mar 14, 2013 at 2:09 PM, Piren gpi...@gmail.com wrote: is the file structure is correct (app/src/com/playcez/Start.java) (which i got wrong before as well lol.. i always forget the com) Also, your activity code doesn't have the package declared in it... it should say package com.playcez; at the top On Thursday, March 14, 2013 10:23:30 AM UTC+2, RKJ (Android developer) wrote: Yes Piren, application android:allowBackup=true android:icon=@drawable/ic_**launcher android:label=@string/app_**name android:theme=@style/**AppTheme activity android:name=com.playcez.**Start android:label=@string/app_**name android:screenOrientation=**portrait intent-filter action android:name=android.intent.**action.MAIN / category android:name=android.intent.**category.LAUNCHER / /intent-filter /activity activity android:name=com.playcez.**GPSActivity android:label=@string/app_**name android:screenOrientation=**portrait /activity On Thu, Mar 14, 2013 at 1:47 PM, Piren gpi...@gmail.com wrote: Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/**g**uide/topics/manifest/**activity-** element.htmlhttp://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.**playcez.Start}: java.lang.** ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(**ActivityThr* ***ead.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**handleLaunchActivity(**ActivityThre* ***ad.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**access$600(ActivityThread.**java:** 13**4) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**handleMessage(ActivityThread.**ja* ***va:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler.**dispatchMessage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.**java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**main(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invokeNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invoke(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit$**MethodAndArgsCaller.run(** ZygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.** ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.** BaseDexClassLoader.findClass(**BaseDexClassLoader.java:61) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClass(ClassLoader.java:**501) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.ClassLoader.**loadClass(ClassLoader.java:**461) 03-14 13:06:49.078: E/AndroidRuntime(25684): at
Re: [android-developers] Re: File not found exception, while listed in manifest.xml file
try the various suggestions offered here: http://stackoverflow.com/questions/4820554/android-unable-to-instantiate-activity-classnotfoundexception Also since you said you imported the project... i'd give it a second go. delete it all, copy the entire app folder again, go into eclipse an import existing project, uninstall for the phone and give it a go. On Thursday, March 14, 2013 10:46:56 AM UTC+2, RKJ (Android developer) wrote: yes, correct Piren, 1. Activity class package com.playcez; is mentioned. 2. and Start.java is in correct package name Basically this project is working in different box(laptop), and i'm trying to import this project, since 2-3 i'm getting error and not getting any clue. :( On Thu, Mar 14, 2013 at 2:09 PM, Piren gpi...@gmail.com javascript:wrote: is the file structure is correct (app/src/com/playcez/Start.java) (which i got wrong before as well lol.. i always forget the com) Also, your activity code doesn't have the package declared in it... it should say package com.playcez; at the top On Thursday, March 14, 2013 10:23:30 AM UTC+2, RKJ (Android developer) wrote: Yes Piren, application android:allowBackup=true android:icon=@drawable/ic_**launcher android:label=@string/app_**name android:theme=@style/**AppTheme activity android:name=com.playcez.**Start android:label=@string/app_**name android:screenOrientation=**portrait intent-filter action android:name=android.intent.**action.MAIN / category android:name=android.intent.**category.LAUNCHER / /intent-filter /activity activity android:name=com.playcez.**GPSActivity android:label=@string/app_**name android:screenOrientation=**portrait /activity On Thu, Mar 14, 2013 at 1:47 PM, Piren gpi...@gmail.com wrote: Are you sure your package is defined properly? Where you put your file matters... On Thursday, March 14, 2013 10:09:42 AM UTC+2, RKJ (Android developer) wrote: Piren, Thanks But i test all 3 posibility like - com.playcez.start .start start but result is same. :( any clue further.. :) On Thu, Mar 14, 2013 at 1:35 PM, Piren gpi...@gmail.com wrote: you're not defining the activity correctly in the manifest... the activity name field needs a fully classified path to the class or should start with a period to fill in the package declared in the manifest. see: http://developer.android.com/**g**uide/topics/manifest/**activity-** element.htmlhttp://developer.android.com/guide/topics/manifest/activity-element.html On Thursday, March 14, 2013 9:38:36 AM UTC+2, RKJ (Android developer) wrote: I have a file called Start and extending FragmentActivity, this file is listed in manifest file still showing File not found exception any clue please - 1. Here is error code 03-14 13:06:49.074: W/dalvikvm(25684): threadid=1: thread exiting with uncaught exception (group=0x40eb8258) 03-14 13:06:49.078: E/AndroidRuntime(25684): FATAL EXCEPTION: main 03-14 13:06:49.078: E/AndroidRuntime(25684): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.playcez/com.**playcez.Start}: java.lang.** ClassNotFoundException: com.playcez.Start 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**performLaunchActivity(**ActivityThr ead.java:2001) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**handleLaunchActivity(**ActivityThre ad.java:2104) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**access$600(ActivityThread.**java:** 13**4) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread$H.**handleMessage(ActivityThread.**ja va:1247) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Handler.**dispatchMessage(Handler.java:**99) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.os.Looper.loop(Looper.**java:154) 03-14 13:06:49.078: E/AndroidRuntime(25684): at android.app.ActivityThread.**main(ActivityThread.java:4624) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invokeNative(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): at java.lang.reflect.Method.**invoke(Method.java:511) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit$**MethodAndArgsCaller.run(* *ZygoteInit.java:809) 03-14 13:06:49.078: E/AndroidRuntime(25684): at com.android.internal.os.**ZygoteInit.main(ZygoteInit.**java:576) 03-14 13:06:49.078: E/AndroidRuntime(25684): at dalvik.system.NativeStart.**main(Native Method) 03-14 13:06:49.078: E/AndroidRuntime(25684): Caused by: java.lang.** ClassNotFoundException:
[android-developers] How I can load doc/xlsx/pdf files into WebView?
How I can load doc/xlsx/pdf files into WebView? I am getting data as base64 format. Please suggest me how to display this? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Enumerate sd cards
I'm using this : http://renzhi.ca/2012/02/03/how-to-list-all-sd-cards-on-android/ Le jeudi 7 mars 2013 05:29:26 UTC+1, yve...@gmail.com a écrit : I am trying to develop an app which has a feature like FTP. So, at the beginning, I want to enumerate all sd card storages on the device, and ask user to pick where they want to store the data. Then if external sd card is removed, I want to change to internal storage if it set to external sd card. If external sd card is put back in, I want to prompt user to see if they want to change back to the external sd card. So, I want to know, first, how to enumerate all storage locations, second, monitor sdcard insert/eject events. Suggestions and, even better, sample codes? Thanks -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] How I can load doc/xlsx/pdf files into WebView?
Append your pdf/xml/doc url to http://docs.google.com/gview?embedded=trueurl=+your file link and then try to load in webview. Hope this helps you. On Thu, Mar 14, 2013 at 3:34 PM, Archana archana.14n...@gmail.com wrote: How I can load doc/xlsx/pdf files into WebView? I am getting data as base64 format. Please suggest me how to display this? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] How I can load doc/xlsx/pdf files into WebView?
Hello Vinay, Thanks for your reply, But I am getting file as base64 data. Its not pointing me to any url. So in that case how can I set URL here? On Thursday, March 14, 2013 2:43:07 PM UTC+4, Vinay Kumar wrote: Append your pdf/xml/doc url to http://docs.google.com/gview?embedded=trueurl=+your file link and then try to load in webview. Hope this helps you. On Thu, Mar 14, 2013 at 3:34 PM, Archana archana...@gmail.comjavascript: wrote: How I can load doc/xlsx/pdf files into WebView? I am getting data as base64 format. Please suggest me how to display this? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
Thanks to everyone. Am using code which are written by the apertium people. Am just integrating apertium program to my programs. I have increase heap size in emulator some time i did not get any result after that i reduced heap size to middle level at this i got same OOM error. What should i do if i suppose to use apertium in my android application. Let we assume that if it works fine when we increase heap size in emulator,later i will install that app in some android tablet or phone. how can we increase the heap size in such devices. Why am have to use Apertium ? Am developing applications which are related to sanskrit languages.Here we can find what exactly am doing .http://sanskrit.uohyd.ac.in/scl/ (web verison) to android platform convertion Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Thu, Mar 14, 2013 at 1:45 PM, Piren gpi...@gmail.com wrote: Actually even 5K can crash his app... it all depends on what he did before the allocation. Android has a nasty bug of claiming you dont have enough memory even if your heap has more than enough free space if it grew close to its maximum value previously (and dont't forget fragmentation as well, 10MB of free heap doesn't mean you can allocate 10MB). Basically i found that if i get a OOM exception when the allocated size isn't something enormous, it's usually because is misbehaved earlier :) So my suggestion to Karunakar (assuming he can't do random reads on the file and the file isn't really big) is to profile his app and see if he needs to do some fixing up before he gets to the point of reading the file. Other than that, he can always try the big heap flag or just dump everything to native heap. On Thursday, March 14, 2013 7:38:56 AM UTC+2, Kristopher Micinski wrote: how big is the file you're reading..? In general, you can't allocate that much space on Android. To combat this you need to be able to do lazy I/O. But ... are you trying to read in a dictionary (using apertium?). I'd guess this is a few megabytes at least right? Having a megabyte or two on the heap won't necessarily crash your app, but having more than that certainly can! (This of course, depends on the device..) Kris On Thu, Mar 14, 2013 at 12:49 AM, karunakar medamoni kannaia...@gmail.com wrote: Hi Richard Good Morning. As per your mail am attaching my android log file. Please have look at once. I ran the same program from command line and also in eclipse. I got the output , when i try to integrate with android am getting this error. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Wed, Mar 13, 2013 at 10:43 PM, karunakar medamoni kannaia...@gmail.com wrote: Hello Richard Thank u for u reply. I will be back with full stack from LogCat by tomorrow morning. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Wed, Mar 13, 2013 at 6:11 PM, RichardC richard...@googlemail.**com wrote: Can you include the full stack trace from LogCat please. On Wednesday, March 13, 2013 11:37:16 AM UTC, karunakar medamoni wrote: Hello Every one. This is karunakar working on android project. Am converting apertium based webpage to android app. When i try to run com.apertium.lttoolbox.LTPorc class with two arguments filename.bin file and input file am getting this error. If any help from any one it would be helpful for me. Here am pasting my code please have a look at once. System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(/data/data/**com.samsaadhani.sandhi1/files/**output; FileOutputStream fis = openFileOutput(input, Context.MODE_PRIVATE); fis.write(input.getText().**toString().getBytes()); fis.write(\n.getBytes()); fis.close(); LTProc.main(new String[]{/data/data/com.**samsaadhani.sandhi1/files/skt_** morf.bin,/data/data/com.**samsaadhani.sandhi1/files/**input}); -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/**topic/android-developers/feA_** XKu8N1o/unsubscribe?hl=enhttps://groups.google.com/d/topic/android-developers/feA_XKu8N1o/unsubscribe?hl=en. To unsubscribe from this group and all its topics, send an email to
[android-developers] Bar code Generator
Hi I want to generate a bar code for euro symbol and rupee symbol.Now i m using zxing library.How can i solve this problem -- *Thanks Regards* *K.Arun Kumar* -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] How I can load doc/xlsx/pdf files into WebView?
I am not clear with this But I am getting file as base64 data could you please elaborate it more, if possible can you provide me a link. On Thu, Mar 14, 2013 at 4:47 PM, Archana archana.14n...@gmail.com wrote: Hello Vinay, Thanks for your reply, But I am getting file as base64 data. Its not pointing me to any url. So in that case how can I set URL here? On Thursday, March 14, 2013 2:43:07 PM UTC+4, Vinay Kumar wrote: Append your pdf/xml/doc url to http://docs.google.com/gview?** embedded=trueurl=+ http://docs.google.com/gview?embedded=trueurl=+your file link and then try to load in webview. Hope this helps you. On Thu, Mar 14, 2013 at 3:34 PM, Archana archana...@gmail.com wrote: How I can load doc/xlsx/pdf files into WebView? I am getting data as base64 format. Please suggest me how to display this? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+**unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Google+ integration
Dear all, Please help me How to post image and text through our android application using google+ integration as like face book integration.. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
it depends on how much heap you defined for the emulator. if it didnt crash with 24mb, you're pretty much safe for 99% of the devices out there (i think even 48mb will cover most devices out there) Otherwise, if you can't figure out a way to reduce your memory allocations, just set the largeHeap flag (http://developer.android.com/guide/topics/manifest/application-element.html#largeHeap) and cross your fingers. On Thursday, March 14, 2013 1:18:11 PM UTC+2, karunakar medamoni wrote: Thanks to everyone. Am using code which are written by the apertium people. Am just integrating apertium program to my programs. I have increase heap size in emulator some time i did not get any result after that i reduced heap size to middle level at this i got same OOM error. What should i do if i suppose to use apertium in my android application. Let we assume that if it works fine when we increase heap size in emulator,later i will install that app in some android tablet or phone. how can we increase the heap size in such devices. Why am have to use Apertium ? Am developing applications which are related to sanskrit languages.Here we can find what exactly am doing .http://sanskrit.uohyd.ac.in/scl/ (web verison) to android platform convertion Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Thu, Mar 14, 2013 at 1:45 PM, Piren gpi...@gmail.com javascript:wrote: Actually even 5K can crash his app... it all depends on what he did before the allocation. Android has a nasty bug of claiming you dont have enough memory even if your heap has more than enough free space if it grew close to its maximum value previously (and dont't forget fragmentation as well, 10MB of free heap doesn't mean you can allocate 10MB). Basically i found that if i get a OOM exception when the allocated size isn't something enormous, it's usually because is misbehaved earlier :) So my suggestion to Karunakar (assuming he can't do random reads on the file and the file isn't really big) is to profile his app and see if he needs to do some fixing up before he gets to the point of reading the file. Other than that, he can always try the big heap flag or just dump everything to native heap. On Thursday, March 14, 2013 7:38:56 AM UTC+2, Kristopher Micinski wrote: how big is the file you're reading..? In general, you can't allocate that much space on Android. To combat this you need to be able to do lazy I/O. But ... are you trying to read in a dictionary (using apertium?). I'd guess this is a few megabytes at least right? Having a megabyte or two on the heap won't necessarily crash your app, but having more than that certainly can! (This of course, depends on the device..) Kris On Thu, Mar 14, 2013 at 12:49 AM, karunakar medamoni kannaia...@gmail.com wrote: Hi Richard Good Morning. As per your mail am attaching my android log file. Please have look at once. I ran the same program from command line and also in eclipse. I got the output , when i try to integrate with android am getting this error. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Wed, Mar 13, 2013 at 10:43 PM, karunakar medamoni kannaia...@gmail.com wrote: Hello Richard Thank u for u reply. I will be back with full stack from LogCat by tomorrow morning. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Wed, Mar 13, 2013 at 6:11 PM, RichardC richard...@googlemail.** com wrote: Can you include the full stack trace from LogCat please. On Wednesday, March 13, 2013 11:37:16 AM UTC, karunakar medamoni wrote: Hello Every one. This is karunakar working on android project. Am converting apertium based webpage to android app. When i try to run com.apertium.lttoolbox.LTPorc class with two arguments filename.bin file and input file am getting this error. If any help from any one it would be helpful for me. Here am pasting my code please have a look at once. System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(/data/data/**com.samsaadhani.sandhi1/files/**output; FileOutputStream fis = openFileOutput(input, Context.MODE_PRIVATE); fis.write(input.getText().**toString().getBytes()); fis.write(\n.getBytes()); fis.close(); LTProc.main(new String[]{/data/data/com.**samsaadhani.sandhi1/files/skt_** morf.bin,/data/data/com.**samsaadhani.sandhi1/files/**input}); -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to
[android-developers] Re: How I can load doc/xlsx/pdf files into WebView?
see the reply you got on stackoverflow, since it already told you exactly what you can do (i'm assuming it's you since the wording is the same) http://stackoverflow.com/questions/15279577/docx-pdf-etc-and-webview On Thursday, March 14, 2013 12:04:42 PM UTC+2, Archana wrote: How I can load doc/xlsx/pdf files into WebView? I am getting data as base64 format. Please suggest me how to display this? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
On Thu, Mar 14, 2013 at 4:15 AM, Piren gpi...@gmail.com wrote: Actually even 5K can crash his app... it all depends on what he did before the allocation. Android has a nasty bug of claiming you dont have enough memory even if your heap has more than enough free space if it grew close to its maximum value previously (and dont't forget fragmentation as well, 10MB of free heap doesn't mean you can allocate 10MB). Notice that I said heap size and not individual allocation because of this :-). This is nothing specific to Andorid: Linux does this too. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] RESTful webservice with auth for mobile application
I have developed many stateless RESTful webservices for a mobile application in Java and they are working very well. *For example:* - h t t p://.../api/coupon - h t t p://.../api/coupon/{id} - ... Now, I have to extend these services because I have to send different data back to the mobile for every user. So I need to know on the server side which user try to get or set information. And I have to prevent the serve of unauthorized users. *There are two different way how user can login into the mobile application: * 1. log in with facebook account 2. log in with an application account I need to develop two login and a logout services because the users who use the mobile application have to login into the application. I read lots of article about auth and RESTful and OAuth. I think I have to develop two login services with two imput parameters: username and password. *For example:* - localLogin(String username, String password) - token - facebookLogin(String username, String password) - token These logon services have to generate a same token and send it back to the mobile application in the http header. And after the login process the mobile client has a token. And the client has to send this token to the server when it makes a RESTful server call. What do you think? Is my idea good? If it is, could you help me how can I start to develop this in Java? If it is not, could you tell me the good way? Thank you. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] RESTful webservice with auth for mobile application
This is what is typically done. Except one thing: I wouldn't ask for the user's Facebook credentials in your app. (At the very least that's unprofessional.) Instead, I'd try to request it from the Facebook app (if they have it installed). https://developers.facebook.com/docs/tutorials/androidsdk/3.0/scrumptious/authenticate/ Kris On Thu, Mar 14, 2013 at 10:03 AM, SoMa arnold.somo...@gmail.com wrote: I have developed many stateless RESTful webservices for a mobile application in Java and they are working very well. For example: h t t p://.../api/coupon h t t p://.../api/coupon/{id} ... Now, I have to extend these services because I have to send different data back to the mobile for every user. So I need to know on the server side which user try to get or set information. And I have to prevent the serve of unauthorized users. There are two different way how user can login into the mobile application: log in with facebook account log in with an application account I need to develop two login and a logout services because the users who use the mobile application have to login into the application. I read lots of article about auth and RESTful and OAuth. I think I have to develop two login services with two imput parameters: username and password. For example: localLogin(String username, String password) - token facebookLogin(String username, String password) - token These logon services have to generate a same token and send it back to the mobile application in the http header. And after the login process the mobile client has a token. And the client has to send this token to the server when it makes a RESTful server call. What do you think? Is my idea good? If it is, could you help me how can I start to develop this in Java? If it is not, could you tell me the good way? Thank you. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] RESTful webservice with auth for mobile application
This tutorial is good for client side (mobile). But I am developing services on server side (backend). How can I link together this client side logon function with my restful web service (with auth) on server side? On Friday, March 15, 2013 1:15:17 AM UTC+11, Kristopher Micinski wrote: This is what is typically done. Except one thing: I wouldn't ask for the user's Facebook credentials in your app. (At the very least that's unprofessional.) Instead, I'd try to request it from the Facebook app (if they have it installed). https://developers.facebook.com/docs/tutorials/androidsdk/3.0/scrumptious/authenticate/ Kris On Thu, Mar 14, 2013 at 10:03 AM, SoMa arnold@gmail.com javascript: wrote: I have developed many stateless RESTful webservices for a mobile application in Java and they are working very well. For example: h t t p://.../api/coupon h t t p://.../api/coupon/{id} ... Now, I have to extend these services because I have to send different data back to the mobile for every user. So I need to know on the server side which user try to get or set information. And I have to prevent the serve of unauthorized users. There are two different way how user can login into the mobile application: log in with facebook account log in with an application account I need to develop two login and a logout services because the users who use the mobile application have to login into the application. I read lots of article about auth and RESTful and OAuth. I think I have to develop two login services with two imput parameters: username and password. For example: localLogin(String username, String password) - token facebookLogin(String username, String password) - token These logon services have to generate a same token and send it back to the mobile application in the http header. And after the login process the mobile client has a token. And the client has to send this token to the server when it makes a RESTful server call. What do you think? Is my idea good? If it is, could you help me how can I start to develop this in Java? If it is not, could you tell me the good way? Thank you. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
As far as i know it's actually a bug in android, as the allocation issue is in the JVM, not the kernel. Do notice that i wasn't talking about fragmentation or reaching the heap size limit... If your heap size is 23.9MB with 100% of it free (thus, plenty of room), i.e 0MB utilization with 23.9MB of FREE heap, it will still failon the next allocation of anything above 100KB (you could allocate 99KB many times, but the first 100KB will fail) On Thursday, March 14, 2013 3:58:56 PM UTC+2, Kristopher Micinski wrote: On Thu, Mar 14, 2013 at 4:15 AM, Piren gpi...@gmail.com javascript: wrote: Actually even 5K can crash his app... it all depends on what he did before the allocation. Android has a nasty bug of claiming you dont have enough memory even if your heap has more than enough free space if it grew close to its maximum value previously (and dont't forget fragmentation as well, 10MB of free heap doesn't mean you can allocate 10MB). Notice that I said heap size and not individual allocation because of this :-). This is nothing specific to Andorid: Linux does this too. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
Is that really the case? I haven't seen any Dalvik bug reports on this, could you manage to point one out, or at least a post / example backing this up..? Kris On Thu, Mar 14, 2013 at 10:43 AM, Piren gpi...@gmail.com wrote: As far as i know it's actually a bug in android, as the allocation issue is in the JVM, not the kernel. Do notice that i wasn't talking about fragmentation or reaching the heap size limit... If your heap size is 23.9MB with 100% of it free (thus, plenty of room), i.e 0MB utilization with 23.9MB of FREE heap, it will still failon the next allocation of anything above 100KB (you could allocate 99KB many times, but the first 100KB will fail) On Thursday, March 14, 2013 3:58:56 PM UTC+2, Kristopher Micinski wrote: On Thu, Mar 14, 2013 at 4:15 AM, Piren gpi...@gmail.com wrote: Actually even 5K can crash his app... it all depends on what he did before the allocation. Android has a nasty bug of claiming you dont have enough memory even if your heap has more than enough free space if it grew close to its maximum value previously (and dont't forget fragmentation as well, 10MB of free heap doesn't mean you can allocate 10MB). Notice that I said heap size and not individual allocation because of this :-). This is nothing specific to Andorid: Linux does this too. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] RESTful webservice with auth for mobile application
That's not the kind of information this group provides, I'd look elsewhere for how you *use* the token. (E.g., Facebook presumably also has information about this too..) Kris On Thu, Mar 14, 2013 at 10:41 AM, SoMa arnold.somo...@gmail.com wrote: This tutorial is good for client side (mobile). But I am developing services on server side (backend). How can I link together this client side logon function with my restful web service (with auth) on server side? On Friday, March 15, 2013 1:15:17 AM UTC+11, Kristopher Micinski wrote: This is what is typically done. Except one thing: I wouldn't ask for the user's Facebook credentials in your app. (At the very least that's unprofessional.) Instead, I'd try to request it from the Facebook app (if they have it installed). https://developers.facebook.com/docs/tutorials/androidsdk/3.0/scrumptious/authenticate/ Kris On Thu, Mar 14, 2013 at 10:03 AM, SoMa arnold@gmail.com wrote: I have developed many stateless RESTful webservices for a mobile application in Java and they are working very well. For example: h t t p://.../api/coupon h t t p://.../api/coupon/{id} ... Now, I have to extend these services because I have to send different data back to the mobile for every user. So I need to know on the server side which user try to get or set information. And I have to prevent the serve of unauthorized users. There are two different way how user can login into the mobile application: log in with facebook account log in with an application account I need to develop two login and a logout services because the users who use the mobile application have to login into the application. I read lots of article about auth and RESTful and OAuth. I think I have to develop two login services with two imput parameters: username and password. For example: localLogin(String username, String password) - token facebookLogin(String username, String password) - token These logon services have to generate a same token and send it back to the mobile application in the http header. And after the login process the mobile client has a token. And the client has to send this token to the server when it makes a RESTful server call. What do you think? Is my idea good? If it is, could you help me how can I start to develop this in Java? If it is not, could you tell me the good way? Thank you. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Google Analytics for Mobile discussion - avg time to uninstall?
How many developers have started using the new capabilities in Google Analytics (v2) for Mobile? I would like to be able to better track the avg time a user uses my app before uninstalling or non-usage (e.g. no sessions for more than 4 weeks). I have decent daily engagement for about 2-3 weeks and then usage drops off. Is there also a metric in the dashboard for installed but not used? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
There's quite a big discussion of this bug somewhere hidden in the bug reports, i've come across the issue myself and found its rather easy to replicate. basically just write a loop that allocate a whole boat load of memory. run it till it poops on you then limit it to do a bit less iterations. that way the heap size will grow to very close to the top limit. then drop all the objects to free up the heap (you can even force a GC). wait a short while to see the heap is truely cleared, then allocate a big object (big enough to pass the difference between Total and Max heap size but smaller than the free heap space). see the world come down and say WTF? basically they check memory allocation against the total heap size instead of the free heap size. Maybe because its easier to compare an int value than to assume there's space, than fail to find sufficient space due to fragmentation.. it could be they did it on purpose just to speed up memory allocations. (since they dont support defragmentation either... which is also why they dont support heap size reductions) On Thursday, March 14, 2013 4:56:37 PM UTC+2, Kristopher Micinski wrote: Is that really the case? I haven't seen any Dalvik bug reports on this, could you manage to point one out, or at least a post / example backing this up..? Kris On Thu, Mar 14, 2013 at 10:43 AM, Piren gpi...@gmail.com javascript: wrote: As far as i know it's actually a bug in android, as the allocation issue is in the JVM, not the kernel. Do notice that i wasn't talking about fragmentation or reaching the heap size limit... If your heap size is 23.9MB with 100% of it free (thus, plenty of room), i.e 0MB utilization with 23.9MB of FREE heap, it will still failon the next allocation of anything above 100KB (you could allocate 99KB many times, but the first 100KB will fail) On Thursday, March 14, 2013 3:58:56 PM UTC+2, Kristopher Micinski wrote: On Thu, Mar 14, 2013 at 4:15 AM, Piren gpi...@gmail.com wrote: Actually even 5K can crash his app... it all depends on what he did before the allocation. Android has a nasty bug of claiming you dont have enough memory even if your heap has more than enough free space if it grew close to its maximum value previously (and dont't forget fragmentation as well, 10MB of free heap doesn't mean you can allocate 10MB). Notice that I said heap size and not individual allocation because of this :-). This is nothing specific to Andorid: Linux does this too. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
On Thu, Mar 14, 2013 at 12:28 PM, Piren gpi...@gmail.com wrote: There's quite a big discussion of this bug somewhere hidden in the bug reports, i've come across the issue myself and found its rather easy to replicate. basically just write a loop that allocate a whole boat load of memory. run it till it poops on you then limit it to do a bit less iterations. that way the heap size will grow to very close to the top limit. then drop all the objects to free up the heap (you can even force a GC). wait a short while to see the heap is truely cleared, then allocate a big object (big enough to pass the difference between Total and Max heap size but smaller than the free heap space). see the world come down and say WTF? basically they check memory allocation against the total heap size instead of the free heap size. Your scenario doesn't necessarily prove this claim. Dalvik's garbage collector is a non-compacting garbage collector. Hence, you can fragment your heap space, whereby while you have lots of free heap, but there is no contiguous block big enough to satisfy a particular request. Your loop that allocate a whole boat load of memory is fragmenting your heap space. The only way that your scenario would prove your claim is if your individual allocations in the whole boat load of memory are larger than the request that then fails. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
What you're saying is true under some conditions (as i stated, i'm aware of fragmentation)... but i think it will take quite a horrible alignment of stars for it to fail because of the reason you stated... in my tests i wasn't allocating huge chunks, barely 100K or so... i truly doubt every single one of my tests didn't have 100K of contiguous space out of 15+ MB of free space left after the GC. The test you describe doesn't prove it 100% either though... if Dalvik is a serious asshole it can decide to put 1 byte of data inside the middle of each of the freed areas just after the GC (for whatever reason) , that would break the test as well... the only way to 100% prove it is to see the error in the source code. Even mapping the memory and seeing it has enough free space wouldn't help since there might be another (unrelated) issue that causes Dalvik to miss contiguous spaces on some occasions. Either way, i had it happen to me and many other users who describes the exact same behavior, i doubt it isnt a real issue :) (though anyway, the way to solve it is the same either case - never allocate so much memory to begin with) On Thursday, March 14, 2013 6:38:47 PM UTC+2, Mark Murphy (a Commons Guy) wrote: On Thu, Mar 14, 2013 at 12:28 PM, Piren gpi...@gmail.com javascript: wrote: There's quite a big discussion of this bug somewhere hidden in the bug reports, i've come across the issue myself and found its rather easy to replicate. basically just write a loop that allocate a whole boat load of memory. run it till it poops on you then limit it to do a bit less iterations. that way the heap size will grow to very close to the top limit. then drop all the objects to free up the heap (you can even force a GC). wait a short while to see the heap is truely cleared, then allocate a big object (big enough to pass the difference between Total and Max heap size but smaller than the free heap space). see the world come down and say WTF? basically they check memory allocation against the total heap size instead of the free heap size. Your scenario doesn't necessarily prove this claim. Dalvik's garbage collector is a non-compacting garbage collector. Hence, you can fragment your heap space, whereby while you have lots of free heap, but there is no contiguous block big enough to satisfy a particular request. Your loop that allocate a whole boat load of memory is fragmenting your heap space. The only way that your scenario would prove your claim is if your individual allocations in the whole boat load of memory are larger than the request that then fails. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: OutofMemory Excepton error in android
Try bufferreader to read chunk of bytes at a time as suggested by android .define buffer size On 14 Mar 2013 13:46, Piren gpi...@gmail.com wrote: Actually even 5K can crash his app... it all depends on what he did before the allocation. Android has a nasty bug of claiming you dont have enough memory even if your heap has more than enough free space if it grew close to its maximum value previously (and dont't forget fragmentation as well, 10MB of free heap doesn't mean you can allocate 10MB). Basically i found that if i get a OOM exception when the allocated size isn't something enormous, it's usually because is misbehaved earlier :) So my suggestion to Karunakar (assuming he can't do random reads on the file and the file isn't really big) is to profile his app and see if he needs to do some fixing up before he gets to the point of reading the file. Other than that, he can always try the big heap flag or just dump everything to native heap. On Thursday, March 14, 2013 7:38:56 AM UTC+2, Kristopher Micinski wrote: how big is the file you're reading..? In general, you can't allocate that much space on Android. To combat this you need to be able to do lazy I/O. But ... are you trying to read in a dictionary (using apertium?). I'd guess this is a few megabytes at least right? Having a megabyte or two on the heap won't necessarily crash your app, but having more than that certainly can! (This of course, depends on the device..) Kris On Thu, Mar 14, 2013 at 12:49 AM, karunakar medamoni kannaia...@gmail.com wrote: Hi Richard Good Morning. As per your mail am attaching my android log file. Please have look at once. I ran the same program from command line and also in eclipse. I got the output , when i try to integrate with android am getting this error. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Wed, Mar 13, 2013 at 10:43 PM, karunakar medamoni kannaia...@gmail.com wrote: Hello Richard Thank u for u reply. I will be back with full stack from LogCat by tomorrow morning. Thanks Regards M. Karunakar University of Hyderabad,Hyd, 9491388035. On Wed, Mar 13, 2013 at 6:11 PM, RichardC richard...@googlemail.**com wrote: Can you include the full stack trace from LogCat please. On Wednesday, March 13, 2013 11:37:16 AM UTC, karunakar medamoni wrote: Hello Every one. This is karunakar working on android project. Am converting apertium based webpage to android app. When i try to run com.apertium.lttoolbox.LTPorc class with two arguments filename.bin file and input file am getting this error. If any help from any one it would be helpful for me. Here am pasting my code please have a look at once. System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream(/data/data/**com.samsaadhani.sandhi1/files/**output; FileOutputStream fis = openFileOutput(input, Context.MODE_PRIVATE); fis.write(input.getText().**toString().getBytes()); fis.write(\n.getBytes()); fis.close(); LTProc.main(new String[]{/data/data/com.**samsaadhani.sandhi1/files/skt_** morf.bin,/data/data/com.**samsaadhani.sandhi1/files/**input}); -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/**topic/android-developers/feA_** XKu8N1o/unsubscribe?hl=enhttps://groups.google.com/d/topic/android-developers/feA_XKu8N1o/unsubscribe?hl=en. To unsubscribe from this group and all its topics, send an email to android-developers+**unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@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 unsubscribe from this group and stop receiving emails from it, send an
Re: [android-developers] Re: OutofMemory Excepton error in android
How about this test: - Figure out the biggest allowable heap for the device - Start a fresh app that tries to allocate one big ass object that will expand the heap to it's maximum size within a minimal distance of it - GC that object and make sure the Free Heap has that big ass object space back - Allocate an object the size of that minimal distance + some extra space The higher the ratio between the big ass object and the OOM object, the higher the chance this issue is real :) (I.e - Very unlikely that after GC's a 20MB object, you would not be able to allocate a 5K due to fragmentation) On Thursday, March 14, 2013 6:38:47 PM UTC+2, Mark Murphy (a Commons Guy) wrote: On Thu, Mar 14, 2013 at 12:28 PM, Piren gpi...@gmail.com javascript: wrote: There's quite a big discussion of this bug somewhere hidden in the bug reports, i've come across the issue myself and found its rather easy to replicate. basically just write a loop that allocate a whole boat load of memory. run it till it poops on you then limit it to do a bit less iterations. that way the heap size will grow to very close to the top limit. then drop all the objects to free up the heap (you can even force a GC). wait a short while to see the heap is truely cleared, then allocate a big object (big enough to pass the difference between Total and Max heap size but smaller than the free heap space). see the world come down and say WTF? basically they check memory allocation against the total heap size instead of the free heap size. Your scenario doesn't necessarily prove this claim. Dalvik's garbage collector is a non-compacting garbage collector. Hence, you can fragment your heap space, whereby while you have lots of free heap, but there is no contiguous block big enough to satisfy a particular request. Your loop that allocate a whole boat load of memory is fragmenting your heap space. The only way that your scenario would prove your claim is if your individual allocations in the whole boat load of memory are larger than the request that then fails. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: image issue while view it as base64 in android mobile2.3
I would try storing the image as a BLOB instead of base64. Thanks. On Wednesday, March 13, 2013 11:17:24 PM UTC-5, senthil kumar wrote: Hi, Using phone and javascript in our application. we want to see the image as base64 from the sqlite db. In some mobile all the image(i.e 4 or 5) are viewed but in some mobile some of the image(even 1 is not displayed) are not viewed we do not know why it happening... is it due to memory? Please explain , if any know about this issue... -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Nested dialogs
I have a search results screen with a complex set of filters that I'm in the process of building out. I'm giving the user a filter icon in the ActionBar that will pop up a dialog with filter options. I feel that this is pretty standard. I don't want the user to feel like they're navigating away when modifying their filters, so I'm not showing a full screen filter activity. Now it's time to implement a few multi-select fields. So, on my filter which is already a dialog on top of the search results activity, I'm going to pop up another dialog with the multi-select options. This doesn't feel great, and I've seen others express that nested dialogs are a bad user experience and I mostly agree with this sentiment. This has to be a common case though, so what is typically the way around this? Is making my filter dialog into a full screen activity my best bet? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] ERROR_NOT_MARKET_MANAGED with draft app
Hello, I have uploaded an app with LVL in draft state on the developer console. I have set LICENSED for the license test response in the console. But when I test my app, I always get ERROR_NOT_MARKET_MANAGED. The version code is the same for both uploaded and tested apps. Please can you tell me what's wrong? I should publish the app ASAP... Thanks in advance, Patrick -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] How to set Google Analytics (v2) API key programmatically?
I can't find how to do this. There's this documentation: https://developers.google.com/analytics/devguides/collection/android/v2/advanced - it shows this method: gaInstance.getTracker(trackingId) I tried this: GoogleAnalytics gaInstance = GoogleAnalytics.getInstance(context); Tracker gaTracker = gaInstance.getTracker(apiKeyGA); gaInstance.setDefaultTracker(gaTracker); But it doesn't work, the api key is not used. I need it, because my app has to track to different accounts, depending of a certain server configuration. The server will send me the api key where to track to. Please don't tell me that it's not possible... Thanks in advance. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Can this variable become null?
What is the problem with singleton? It works very well. I use it to hold global state, for example, translations. They are fetched at the start of the app, and updated each screen launch (if necessary). This holds the translations in memory and I can get them from any activity using simple methods. I can control everything there - reinitialize if destroyed, etc. There's also a very popular image loading library, which works very well for me, which also uses the singleton pattern. It initializes in application's onCreate() and after that everytime you load an image, just use ~1 line of code. Which better approach would you suggest for these use cases, and why? Am Dienstag, 26. Februar 2013 06:19:24 UTC+1 schrieb William Ferguson: You should access it with a getInstance method which will initialize it if it is null. You should initialize the variable in the class initialization and declare it 'final'. There are times when you cannot do this, in which case probably Singleton is the wrong choice. For the rest of the times, Singleton probably is the wrong choice. :-) +1 to 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] How to remove black topbar on activity animation?
Ok, thanks. I ended just doing the animation very fast... such that the user doesn't have time to think about it ;) Am Dienstag, 14. August 2012 08:12:17 UTC+2 schrieb Dianne Hackborn: I assume you mean the part of your window that is normally behind the status bar? If so, there is no simple way to do this. Aside from just making your app fullscreen so there is no status bar (and thus your content draws all the way to the top), you'd need to do an approach like playing games where you make your window translucent, set it to not have a background, and make sure that tap part of your window is transparent when it is drawn. Note that in 3.1 the platform know does some tricks to prevent that top part of the window from being drawn when it determines it is obscured by the status bar prior to any transformation applied by an animation etc. On Sat, Aug 11, 2012 at 2:20 PM, user123 ivans...@gmail.com javascript: wrote: I defined a scale animation from 0 to 1 for entering activity: overridePendingTransition(R.anim.scale, 0); In application tag in Manifest: android:theme=@android:style/Theme.NoTitleBar But I get a black topbar on the entering activity, while it scales... looks very ugly since the activity doesn't have this topbar. How do I hide 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-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hac...@android.com javascript: 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Can this variable become null?
On Thu, Mar 14, 2013 at 7:00 PM, user123 ivanschu...@gmail.com wrote: What is the problem with singleton? http://stackoverflow.com/questions/7026507/why-are-static-variables-considered-evil http://stackoverflow.com/questions/137975/what-is-so-bad-about-singletons And, since they don't seem to emphasize the point quite enough for my taste: static data members are, by definition, memory leaks. How *bad* of a memory leak they are depends on what they are and how they are used. Like many programming techniques, singletons can be used as a scalpel or a sledgehammer. The general advice against singletons is because most people reading that advice are inexperienced and are likely to do damage with either a scalpel or a sledgehammer. On the whole, AFAICT, tolerance for singletons decreases with increased production Java development experience, based on the conversations that I have had on the topic over the past few years. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Can this variable become null?
I really think everyone should stop using the Android Framework, since it has more than a handful of singletons. http://developer.android.com/develop/index.html#q=singleton This is despite research that conclusively proves singletons causing baldness in males and infertility in women. Oh the dangers of working with Android. /irony -- K 2013/3/15 user123 ivanschu...@gmail.com: What is the problem with singleton? It works very well. I use it to hold global state, for example, translations. They are fetched at the start of the app, and updated each screen launch (if necessary). This holds the translations in memory and I can get them from any activity using simple methods. I can control everything there - reinitialize if destroyed, etc. There's also a very popular image loading library, which works very well for me, which also uses the singleton pattern. It initializes in application's onCreate() and after that everytime you load an image, just use ~1 line of code. Which better approach would you suggest for these use cases, and why? Am Dienstag, 26. Februar 2013 06:19:24 UTC+1 schrieb William Ferguson: You should access it with a getInstance method which will initialize it if it is null. You should initialize the variable in the class initialization and declare it 'final'. There are times when you cannot do this, in which case probably Singleton is the wrong choice. For the rest of the times, Singleton probably is the wrong choice. :-) +1 to 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Can this variable become null?
I guess the bigger problem that in Android static data members cannot be statically checked to be alive. By this I mean: you should try to get as much static checking as possible, and if you're using statics you don't have any ability to properly check this. Moreover, in Android it's a fact of life that your app will die and restart. You can really only use statics for caching type purposes, but working with them in a safe way quickly becomes extremely complicated. Instead of doing this, you can typically replace singletons with some Android specific utility (a Service or ContentProvider, say..) that allows you to implement the singleton type pattern. This really *is* a pretty frequent problem when people get UI elements stuck into static variables and then users rotate the screen :-) Kris On Thu, Mar 14, 2013 at 7:11 PM, Mark Murphy mmur...@commonsware.com wrote: On Thu, Mar 14, 2013 at 7:00 PM, user123 ivanschu...@gmail.com wrote: What is the problem with singleton? http://stackoverflow.com/questions/7026507/why-are-static-variables-considered-evil http://stackoverflow.com/questions/137975/what-is-so-bad-about-singletons And, since they don't seem to emphasize the point quite enough for my taste: static data members are, by definition, memory leaks. How *bad* of a memory leak they are depends on what they are and how they are used. Like many programming techniques, singletons can be used as a scalpel or a sledgehammer. The general advice against singletons is because most people reading that advice are inexperienced and are likely to do damage with either a scalpel or a sledgehammer. On the whole, AFAICT, tolerance for singletons decreases with increased production Java development experience, based on the conversations that I have had on the topic over the past few years. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] bluetooth file transfer failure
In order to answer your question, we need to see the code where you create and set mmInstream, too. For all we know, you might have forgotten to connect it to any stream, On Wednesday, March 13, 2013 9:28:08 PM UTC-7, akash roy wrote: here i am trying to send a file over bluetooth but its not sending any data. here the main problem is that its not sending or receiving any data over the two devices but they are connected to each other. on configuring the bluetooth chat example. Sending code: File myFile = new File(message.toURI()); Double nosofpackets = Math.ceil(((int) myFile.length() )/4096); System.out.println(nosofpackets); BufferedInputStream bis= new BufferedInputStream(new FileInputStream(myFile)); byte[] send = new byte[4096]; for(double i=0; inosofpackets; i++) { send = null ; a=bis.read(send, 0,send.length); Log.d(BluetoothChat, data packet + i); if(a==-1) { break; } mChatService.write(send); } Receiving code : while((bytes = mmInStream.read(buffer))0) { Log.d(TAG, data is there for writing); bos.write(buffer); } -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] bluetooth file transfer failure
Indicator Veritatis wrote: In order to answer your question, we need to see the code where you create and set mmInstream, too. For all we know, you might have forgotten to connect it to any stream, Follow this advice: http://sscce.org/ akash roy wrote: here i am trying to send a file over bluetooth but its not sending any data. here the main problem is that its not sending or receiving any data over the two devices but they are connected to each other. on configuring the bluetooth chat example. Sending code: File myFile = new File(message.toURI()); Are you quite certain 'message' translates properly to a URI that the 'File' constructor can use? Are you certain that the abstract pathname represented by the 'File' instance is accessible? Double nosofpackets = Math.ceil(((int) myFile.length() )/4096); 'Math.ceil()' makes no sense with integer expressions. It will only return the argument's value. Are you quite certain that the length of the file will fit in an 'int'? Why does 'nosofpackets' (a non-compliant name) have to be 'Double' rather than 'double'? System.out.println(nosofpackets); BufferedInputStream bis= new BufferedInputStream(new FileInputStream(myFile)); byte[] send = new byte[4096]; for(double i=0; inosofpackets; i++) 'int' would be a better type for a loop index. It's actually pretty strange to think about what a 'double' is doing here. { send = null ; So why do you null out this variable and forget and eventually de-allocate the array? a=bis.read(send, 0,send.length); NPE! You can't get the length of 'null'. You did not tell us you were getting exceptions. How come? What is 'a'? Log.d(BluetoothChat, data packet + i); if(a==-1) { break; } mChatService.write(send); } Receiving code : while((bytes = mmInStream.read(buffer))0) What are these variables? { Log.d(TAG, data is there for writing); bos.write(buffer); } Incomplete question, cannot be answered completely. -- Lew -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Can this variable become null?
Kristopher Micinski wrote: I guess the bigger problem that in Android static data members cannot be statically checked to be alive. By this I mean: you should try to get as much static checking as possible, and if you're using statics you don't have any ability to properly check this. Moreover, in Android it's a fact of life that your app will die and restart. You can really only use statics for caching type purposes, but working with them in a safe way quickly becomes extremely complicated. Instead of doing this, you can typically replace singletons with some Android specific utility (a Service or ContentProvider, say..) that allows you to implement the singleton type pattern. This really *is* a pretty frequent problem when people get UI elements stuck into static variables and then users rotate the screen :-) Kris On Thu, Mar 14, 2013 at 7:11 PM, Mark Murphy mmu...@commonsware.comjavascript: wrote: On Thu, Mar 14, 2013 at 7:00 PM, user123 ivans...@gmail.comjavascript: wrote: What is the problem with singleton? http://stackoverflow.com/questions/7026507/why-are-static-variables-considered-evil http://stackoverflow.com/questions/137975/what-is-so-bad-about-singletons And, since they don't seem to emphasize the point quite enough for my taste: static data members are, by definition, memory leaks. How *bad* of a memory leak they are depends on what they are and how they are used. Like many programming techniques, singletons can be used as a scalpel or a sledgehammer. The general advice against singletons is because most people reading that advice are inexperienced and are likely to do damage with either a scalpel or a sledgehammer. On the whole, AFAICT, tolerance for singletons decreases with increased production Java development experience, based on the conversations that I have had on the topic over the past few years. I've been using Java professionally for fourteen years. The biggest problem I have with singletons is that everyone for some god-awful reason insists on lazily instantiating them. Why? Lazy instantiation is lazy. What's wrong with non-lazy instantiation? Then you can use a 'final' reference to the singleton instance that exists without effort or overhead. -- Lew -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.