khadicha
Lurker
Hello everybody,
I'm new in Android Studio.
Recently, I get a trial license key for SciChart Android v2x. I read many times tutorial to set license(https://www.scichart.com/licensing-scichart-android/) but cannot activate my license. Because it is not written in which file should I put the licence code. So I tried to write it in my MainActivity.java file of my application like below:
"
public class MainActivity extends AppCompatActivity {
private AppBarConfiguration mAppBarConfiguration;
String license = ("<LicenseContract>\n" +
" <Customer>nnuni@mail.ru</Customer>\n" +
" <OrderId>Trial</OrderId>\n" +
" <LicenseCount>1</LicenseCount>\n" +
" <IsTrialLicense>true</IsTrialLicense>\n" +
" <SupportExpires>12/31/2019 00:00:00</SupportExpires>\n" +
" <ProductCode>SC-ANDROID-2D-ENTERPRISE-SRC</ProductCode>\n" +
" <KeyCode>28a24cba44.........038a6c</KeyCode>\n" +
"</LicenseContract>");
// Use Static method SciChartSurface.setRuntimeLicenseKey()
SciChartSurface.setRuntimeLicenseKey(license);
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
........................................................"
But it gives me the error <Cannot resolve symbol"setRuntimeLicenseKey">
Perhaphs it is because I did't intialise static SciChartSurface class. But I think it is built in class so I don't know how to do.
Second issue was I right to put this code in this MainActivity.Java class or Should I create new file for it.
If everybody has experience with setting SciChart license in Android Studio, please help me with real example.
Thanks in advance
Khadicha
I'm new in Android Studio.
Recently, I get a trial license key for SciChart Android v2x. I read many times tutorial to set license(https://www.scichart.com/licensing-scichart-android/) but cannot activate my license. Because it is not written in which file should I put the licence code. So I tried to write it in my MainActivity.java file of my application like below:
"
public class MainActivity extends AppCompatActivity {
private AppBarConfiguration mAppBarConfiguration;
String license = ("<LicenseContract>\n" +
" <Customer>nnuni@mail.ru</Customer>\n" +
" <OrderId>Trial</OrderId>\n" +
" <LicenseCount>1</LicenseCount>\n" +
" <IsTrialLicense>true</IsTrialLicense>\n" +
" <SupportExpires>12/31/2019 00:00:00</SupportExpires>\n" +
" <ProductCode>SC-ANDROID-2D-ENTERPRISE-SRC</ProductCode>\n" +
" <KeyCode>28a24cba44.........038a6c</KeyCode>\n" +
"</LicenseContract>");
// Use Static method SciChartSurface.setRuntimeLicenseKey()
SciChartSurface.setRuntimeLicenseKey(license);
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
........................................................"
But it gives me the error <Cannot resolve symbol"setRuntimeLicenseKey">
Perhaphs it is because I did't intialise static SciChartSurface class. But I think it is built in class so I don't know how to do.
Second issue was I right to put this code in this MainActivity.Java class or Should I create new file for it.
If everybody has experience with setting SciChart license in Android Studio, please help me with real example.
Thanks in advance
Khadicha