Help needed Spark Android app

Hello

I have imported android project and i see ‘SparkCOre’ and ‘FOntify’. THere are no issues with Fontify but with ‘SparkCore’ build is failing. The error is shown at following 2 lines in smartconfigservice.java,


import com.integrity_project.smartconfiglib.FirstTimeConfig;
import com.integrity_project.smartconfiglib.FirstTimeConfigListener;

Am i supposed to import any other library? DO let me know.

regards
sanjukul

Have you got the SmartConfig kib from TI and the required fonts, as the repo docs do state?

Required Fonts

The Spark app distributed via Google Play uses several typefaces in the Gotham family. If you have a license to these, you can place the following 4 files in SparkCore/assets/fonts.

gotham_bold.otf
gotham_book.otf
gotham_light.otf
gotham_medium.otf
Otherwise, in order to build a working app, you will need to either modify the app not to look for the fonts or put some other fonts in their place.

Required TI SmartConfig Library

You must add smartconfiglib.jar to the SparkCore/libs directory.

To get the SmartConfig library, go to the CC3000 Wi-Fi Downloads page. Search the page for the Android SmartConfig Application. Download and unpack the app, which will require Windows. :-/ You can find smartconfiglib.jar in the libs directory of TI's app.

As mentioned in another post, for smartconfiglib.jar you don’t actually have to install it. Just rename the EXE into ZIP and then you can extract the file without installation.

See my post here

1 Like

Thanks @ScruffR… It works…

My bad. I overlooked all the details present at the git from where i downloaded the code.

I have replaced the licensed fonts with other fonts and able to install the app in my moto g running 4.4.4.

Login screen is shown and when i enter the login details, app crashes…

Following are error messages from LogCat,


11-16 23:38:28.625: E/AndroidRuntime(9590): FATAL EXCEPTION: main
11-16 23:38:28.625: E/AndroidRuntime(9590): Process: io.spark.core.android, PID: 9590
11-16 23:38:28.625: E/AndroidRuntime(9590): java.lang.RuntimeException: Unable to start activity ComponentInfo{io.spark.core.android/io.spark.core.android.ui.corelist.CoreListActivity}: java.lang.RuntimeException: native typeface cannot be made
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.app.ActivityThread.access$800(ActivityThread.java:139)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.os.Handler.dispatchMessage(Handler.java:102)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.os.Looper.loop(Looper.java:136)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.app.ActivityThread.main(ActivityThread.java:5097)
11-16 23:38:28.625: E/AndroidRuntime(9590): at java.lang.reflect.Method.invokeNative(Native Method)
11-16 23:38:28.625: E/AndroidRuntime(9590): at java.lang.reflect.Method.invoke(Method.java:515)
11-16 23:38:28.625: E/AndroidRuntime(9590): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
11-16 23:38:28.625: E/AndroidRuntime(9590): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
11-16 23:38:28.625: E/AndroidRuntime(9590): at dalvik.system.NativeStart.main(Native Method)
11-16 23:38:28.625: E/AndroidRuntime(9590): Caused by: java.lang.RuntimeException: native typeface cannot be made
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.graphics.Typeface.(Typeface.java:175)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.graphics.Typeface.createFromAsset(Typeface.java:149)
11-16 23:38:28.625: E/AndroidRuntime(9590): at io.spark.core.android.ui.assets.Typefaces.getTypeface(Typefaces.java:38)
11-16 23:38:28.625: E/AndroidRuntime(9590): at io.spark.core.android.ui.BaseActivity.onPostCreate(BaseActivity.java:96)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1173)
11-16 23:38:28.625: E/AndroidRuntime(9590): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2181)
11-16 23:38:28.625: E/AndroidRuntime(9590): … 11 more


I am very poor in android development and this is new to me and i have started learning only recently.

I need help.

What do you mean by this?

The error here

would suggest, that something seems wrong with the fonts.

If you are using different fonts you’ll have to search the whole project for any occurance of the original font names, because the original code has some hardcoded references scattered around.
In my ExtTinkerApp I’ve cleaned this up a bit but the pull request never made it into the main branch. But if you are interested have a look here.

I used the fonts from here without a problem. Just rename to lower case with underscore.

Thanks @ScruffR and @CuriousTech… Now its working. I had forgotten to edit Typefaces.java.

Now its fine.

Glad to hear :+1:

I downloaded the Tinker App master from GIT.
I have JRE,JDK and gradle installed and working but i seem to get this error while trying to build the app

Error:Could not find com.android.tools.build:gradle:2.11.
Searched in the following locations:
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.11/gradle-2.11.pom
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.11/gradle-2.11.jar
    https://jcenter.bintray.com/com/android/tools/build/gradle/2.11/gradle-2.11.pom
    https://jcenter.bintray.com/com/android/tools/build/gradle/2.11/gradle-2.11.jar
Required by:
    :photon-tinker-android-master:unspecified

I have tried using a local folder for Gradle but it seems to have no effct.
What am i missong out?