w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android Studio - Build an Android project with Android library which depends on another Android Library
The manifest files for the library must currently have a <application /> node, even if it's empty. It's a restriction we'll remove at some point but for now, just add it.

Categories : Android

Android Studio IDE unable to refer to classes from a library module
If you are trying to add a library, go to File -> Project Structure -> Libraries -> click + then add the jar. Once it has been added, it will ask you for the module which is dependent on jar. Select ProjectA from the list. That should link the library to Module.

Categories : Android

How to make android native shared library(.so) to be unable to debug by attaching
You can relatively easily detect a JVM debugger but detecting a native debugger is a bit harder. You can use the standard ptrace(PTRACE_ME) call to figure out if someone's attached a debugger. I've not tried this but I believe it should work. Personally, I would use my own code-signing to figure out the state of the application, coupled with support from Play Services. In any case, as with all things software, given enough patience all security measures can be circumvented.

Categories : Android

Cannot include Android Library dependency from another Android Library using Gradle
It appears that classes.jar is not being built/packaged for ABS, but the resources are building just fine. Also, everything in AndroidUtils builds fine, including classes.jar. The build succeeds after manually copying classes.jar into the exploded bundles directory. For some reason Gradle isn't copying this file. Update: Somehow, nuking the project and re-cloning the repo fixed the gradle builds.

Categories : Android

How to represent a group of C++ dynamically allocated objects as a BGL (Boost Graph Library) graph in order to obtain their dependency graph?
The integers are indices to the vertices and edges of the graph. So, in your example, the first vertex is a and the second vertex is b while the first edge connects vertices 1 and 2 ( a and b ) Each vertex has properties. So, in your example, the first vertex is named a and has a pointer to a. The graph algorithms use the integer indices to manipulate the graph, and your code can use the indices to get back to the properties that you are interested in, such as names and pointers. Here is how I would code the example you posted: /** Bundled properties for graph vertices Simply contains a pointer to the associated MyObject */ class cVertex { public: MyObject * pObject; }; class cEdge { }; class cGraphProps { }; .... // The BGL graph typedef boost::adjacency_list <

Categories : C++

Accessing map values in a vector in Lemon Graph Library
You probably want to display P_names[0][...] or something like that. Your Node_names is a define, you probably cannot use the angle brackets like that. Think of it like if you removed your typedef, you would have to write it like that: ListDigraph::NodeMap<string>[0][P_names[0]]. Would that make sense? We can't really help you more if you don't provide more information I'm afraid... Edit: try (*P_names[0])["test"], maybe that would do it (providing you have all necessary elements). One thing you can do though is using as many temp variables as you want. You really need to understand what types are P_names[0], *P_names[0], (*P_names[0])[...] etc. Try to compile the code, write class names on a paper, have a look at some diagrams in the documentation, draw diagrams (with a pencil on

Categories : C++

ClassLoader loading android class which extends android class from android support library
So I have finally figured it out. I needed to remove android support library from my plugin application so with help from this article http://android-developers.blogspot.cz/2011/07/custom-class-loading-in-dalvik.html I was able to use ant to compile my plugin application without android support library classes. Then it worked like a charm.

Categories : Android

Sending data from an AsyncTask located in an Android Library to project Android AppWidgetProvider
Use Intent and IntentFilter(Manifest) <i> Intent intent = new Intent(); intent.setAction(MY_ACTION); intent.put("key", value); context.startActivity(intent); </i> In Activity <i> String s = intent.getExtra().getString("key"); </i>

Categories : Android

After adding library to android project, the XML tag is still "unallowed in Android resource files"
Figured it out. AndroidStudio is still in it's "ghetto" stage so if you try to add a library dependency in typical IntelliJ fashion you get a warning telling you that whatever you do in the project/module dialog (which shows up when you select it) actually has no effect on your build and that you must edit build.gradle manually. In the case of Androidplot 0.5.2 heres what you do: Add androidplot-core-0.5.2.jar into your /libs dir In the dependencies section of build. gradle add: compile files('libs/androidplot-core-0.5.2.jar') Once you've done this you should be OK. Nick

Categories : Java

Maven repository and "Android support library", revision 18 for Android Studio 0.2.x
Install fresh Android Studio 0.2.x. Upgrade from pre 0.2 doesn't work as mentioned here http://developer.android.com/sdk/installing/studio.html#Updating Reason is that new Android Studio is shipped with maven repo for serving support libraries. Alternatively edit build.gradle and replace compile 'com.android.support:support-v4:13.0.+' with compile files('/libs/android-support-v4.jar') then copy support jar to libs folder.

Categories : Android

How to setup and test an Android Library Project with Gradle and Android-Studio?
i think this tutorial will help you : http://cyrilmottier.com/2013/06/27/a-productive-android-development-environment/ !

Categories : Java

How do I add the library android-support-v7 in IntelliJ IDEA (Not Android Studio/Gradle)?
You just need to add "@string/abc_action_mode_done" in your appcompat/res/values/strings.Do not "set mediarouter as a dependency for appcompat library".(In my case,"@string/abc_action_mode_done" already exists in the appcompat/res/values/strings.I don't know why you miss it.) "add depenency appcompat to mediarouter" is necessary.

Categories : Android

How to adjust images to all android screen devices using cocos2d android library without using xml layout for Game designing
CGSize winSize = CCDirector.sharedDirector().displaySize(); CCSprite background=CCSprite.sprite("background.png"); background.setScaleX(winSize .width/background.getTexture().getWidth()); background.setScaleY(winSize.height/background.getTexture().getHeight()); background.setPosition(CGPoint.make(winSize.width/2, winSize.height/2)); addChild(background); Set to exact , what is the screen size

Categories : Android

Android Studio - Export Android library aar with pure gradle
You should try updating/upgrading your build tools and gradle through AndroidStudio. Once you do this, or if you have already done it, you should be able to modify your build file to reflect the updates: classpath 'com.android.tools.build:gradle:0.5.+' ... buildToolsVersion "18.0.1" NOTE: I am still unable to generate aar files even with this setup, although compiling is fine. At least this might get you past this hurdle.

Categories : Android

Send plain text from an Android library to an Android project
You could achieve this communication with the aid of interfaces. The idea is to crate a callback method that will be implemented in your activity, and will be called by the project library to send text back to you (in android project). For example, create an interface: public interface OnTaskFinishedListener(){ void onTaskFinished(String text); } Let assume that in your project library you have a class named Task with a method doTask() that you use in your Android project to perform some task and then send the result back to you. Then the implementation of Task will look like this: public class Task{ // ...... public void doTask(OnTaskFinishedListener listener){ // Do the task... String textToSend = // some text to send to caller activity listener.onTask

Categories : Android

How to compile Android native library with Android Studio?
NDK integration is very basic, limited, and not documented (per the New Build System page) at the time of this writing. There a couple of examples in the samples at the bottom of that page that illustrate how this can be done. You can also check the Gradle Plugin User Guide periodically to see if any additional documentation is available.

Categories : Android

Android Studio: how to import Android library project
Go back to Project Structure window where you added the new module. Click on your main module, go to Dependencies tab, click the plus icon and select Module Dependency.

Categories : Android

Android Studio: Plugin with id 'android-library' not found
Instruct Gradle to download Android plugin from Maven Central repository. You do it by pasting the following code at the beginning of the Gradle build file: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.1.1' } } Replace version string 1.0.+ with the latest version. Released versions of Gradle plugin can be found in official Maven Repository or on MVNRepository artifact search.

Categories : Gradle

IBM Worklight v6.0 - Android AppCenter app unable to launch in Android Emulator
Please see a possible solution here: com.google.android.gsf package couldn't be found Seems to be related to not using the correct settings for the Android emulator.

Categories : Android

Add a non-Android library project to an Android app in Eclipse
Method#1 seems so far the option to go for, but you need to study why you're getting that ClassNotFoundException - unpack the APK (since it's an archive), undex it and see why the library classes are not included. From experience, if you're working with Eclipse, I believe you're getting that exception because you didn't check the library as exported when you're adding it to Android project - after you've added it to build path, do the following: Project Props -> Build Path -> Order and Export, here make sure your library project is selected. There is a known issue/frustration about this ClassNotFoundException and the work-around is to select the export tab. I believe this article contains more details or this SO topic. When it comes to debugging the jar code, you need to include in the

Categories : Java

Creating a new Android Library in Android Studio
Updated my Android Studio today and guess what, it's fixed! So anyone who has this problem just update asap. Tried this on Mac and Windows and it now works on both. PS: I'm on version 0.2.6 now (version of august 24). Guess I was one day too early with the question :P

Categories : Android

Drawing a graph with some properties displayed with Boost Graph Library
NEW ANSWER Its a dube, see How to print a boost graph in graphviz with one of the properties displayed? boost graph library - minimal example of vertex colors and graphviz output http://www.boost.org/doc/libs/1_54_0/libs/graph/doc/write-graphviz.html How to print a graph in graphviz with multiple properties displayed drawing custom BGL graph with graphviz C++ Boost Graph Library: outputting custom vertex properties OLD ANSWER: There are many resources online which specifies how to draw advanced graphs using Graphviz. Here are some which I have found useful in the past: www.graphviz.org/pdf/dotguide.pdf‎ www.graphviz.org/content/attrs www.graphviz.org/content/output-formats www.graphviz.org/doc/info/shapes.html http://graphviz-dev.appspot.com/ The last link is an online render,

Categories : Misc

Android zxing library bacrcode scanner forcing the library to open on current app
This link may help you .. There is one example gitHub project.

Categories : Android

Link to shared library from Android library project with ndk-build
First create a module that will compile your libA.so library as prebuilt shared library in your project B. include $(CLEAR_VARS) LOCAL_MODULE := libA LOCAL_SRC_FILES := path/to/libA.so include $(PREBUILT_SHARED_LIBRARY) Then, add this module to your main module of your project by: LOCAL_SHARED_LIBRARIES := libA I have never tried IMPORT_MODULE option in my project but this works in my case.

Categories : Java

unable to get the database rows values in the android database?
Make sure that that the database have been created when your first call your database.. e.g public Database(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { String CREATE_EMPLOY_TABLE = "CREATE TABLE " + TABLE_EMPLOY + "(" + KEY_ID + " INTEGER PRIMARY KEY," + KEY_NAME + " TEXT," + KEY_EMAIL + " TEXT" + ")"; db.execSQL(CREATE_EMPLOY_TABLE); } by this point verify your query Cursor cursor = db.query(TABLE_EMPLOY, new String[] { KEY_ID, KEY_NAME, KEY_EMAIL }, KEY_EMAIL + " = ?", new String[] { String.valueOf(eid) }, null, null, null, null);

Categories : Android

Android NDK/JNI: Build shared library using static library
Even though I can't put my hand on any related documentation, it seems to me that the LOCAL_EXPORT_C_INCLUDES should point to the folder instead of the file: LOCAL_EXPORT_C_INCLUDES := include It would seem logic, as this flag is an equivalent of the usual -I CFLAG, which would have been -Iinclude and not -Iinclude/myHeader.hpp Tell me if this solved your problem!

Categories : Android

Android:jar library won't work compared to project library
> Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.testphilippe.Jokerly" ... In page "Order and Export" your jar is not marked as "copy this jar into the android-apk" so the classloader cannot find it. Set the checkmark and "ClassNotFoundException" will go away.

Categories : Java

How to use jars from a Java Project in an Android project transitively over the included Android library?
I think you should be able to go to the properties of your Android library project, go to Java Build Path, switch to the tab Order and Export and select the java library so that it is exposed to the Android project that uses the Android library.

Categories : Java

How to remove selected items from listview when click remove button in android
I'm a little confused because I don't think your adapter shows what you want even before deletion because of this: public int getCount() { return count; } public Object getItem(int position) { return position; } Once your adapter will be correctly set with the array of data to display (in your case items I think) you just have to remove the objects you want delete from this array (items.remove(obj)) and then call notifyDataSetChanged() on the adapter. Edit: I think there is some logic problems in your code here. I assume that you want display data from an Array so you should probably extends ArrayAdapter in place of BaseAdapter. Next I think there is a confusion between item and item position. A classical implementation of getItem() is, for arrays, some

Categories : Android

create-android-project.sh:line 103:/home/laschweinski/android/android-sdk-linux_86/tools/android:No such file or directory
Open create-android-project.sh file, you should see two line codes like this: NDK_ROOT_LOCAL="/home/laschweinski/android/android-ndk-r5" ANDROID_SDK_ROOT_LOCAL="/home/laschweinski/android/android-sdk-linux_86" Then what you just need replace these paths with yourself's paths, as mentioned in your post NDK_ROOT_LOCAL="D:AndroidGameToolAndroid-ndk" ANDROID_SDK_ROOT_LOCAL="D:Softwareadt-bundle-windows-x86_64-20130522sdk"

Categories : Java

Android graph view
You can use achartengine for more effective customization. It is the most popular free graphview library for Android.You can find latest version and tutorials here http://www.achartengine.org/

Categories : Android

3D Bar graph using OpenGLES in android
2 Before glTranslate and rotate calls you should use glPushMatrix and after that glPopMatrix functions, or call glTranslate without increment. Because glTranslate multiply existing projection matrix on new matrix from glTranslate parameters 3 gl.glPushMatrix() ; gl.glTranslate(0,y,0); mcube[i].draw(gl); gl.glPopMatrix(); with y= - Barheight/2 in your case or change vertex coordinates of your bars

Categories : Android

classes from android project library not resolved in android project
Recently, Google updated its tools and it introduced some strange behaviour when using library projects. I'm not sure you're dealing with the same problem, but try this: right click on your library project, choose Properties in the menu on the left, click on Java Build Path now click ont the Order and export tab make sure "Android private libraries" and "Android dependencies" are checked. Do the same for your application project. After these steps, clean both projects and maybe your problem is fixed ;-) good luck!

Categories : Android

Catching data from a graph in android
If you want to write data to external or internal storage of the phone, so that these can be read e.g. in the OnClick Method of your button after the application was ended, you can use http://developer.android.com/training/basics/data-storage/files.html. So 1. you set the permissions to write / read from external/internal storage: <manifest ...> <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" /> ... </manifest> 2. Saving any raw data types like a String with outputStream: String filename = "myfile"; String string = "This text becomes written on internal storage"; FileOutputStream outputStream; try{ outputStream = openFileOutput(filename, Conte

Categories : Android

Android OpenGL Graph Issue
choosing the right primitive with your draw call has only to do with the disposition of the vertecies, which we can't see without looking at your data. I woud look at something like this image (tfc.duke.free.fr/old/models/images/05.gif) to see if your data matches the primitive you are using.

Categories : Android

Is it better to plot android Graph using JAR or OpenGL
Address your platform you want to use This speed issue can weigh in on both ends. The library (jar as you call it) approach will be faster to draw initially because I assume they draw on canvas. We use this approach to draw some complex charts on our app. This way is simple and straight forward. The charts are mostly static with some features for interaction. The OpenGL approach will take longer to render initially because it needs to first load the GLView and start up OpenGL before the chart can draw and this can sometimes be time consuming but as soon as this is loaded it will be way faster to perform draw operations and fancy features than the jar approach. In the end it comes down to what you want to do. If you only want to plot a chart and update it with the latest data I wouldn't

Categories : Android

Facebook Android Open Graph
the problem is that you send the content of the object as the parameter as in {title:flightNumber,description:flightInfo} but you should send the object with its contents as the parameter as in {object:{title:flightNumber,description:flightInfo}}

Categories : Java

How to animate a graph being drawn in Android
Here is the general direction to try: Make sure you are comfortable with Canvas drawing. Then you will want to create a new View (subclass it) and override the onDraw method. This method should only draw the graph partially, based on the elapsed time since the start of the animation.

Categories : Android

Line graph with achartengine android
You can modify the minimum distance (in pixels) between chart values in order to get several of them displayed. For instance: renderer.setDisplayChartValuesDistance(50);

Categories : Android

2d animated line graph code android
You need a curved motion, take a look at this http://graphics-geek.blogspot.com/2013/07/devbytes-curved-motion.html

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.