• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Platform类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.md2k.datakitapi.source.platform.Platform的典型用法代码示例。如果您正苦于以下问题:Java Platform类的具体用法?Java Platform怎么用?Java Platform使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Platform类属于org.md2k.datakitapi.source.platform包,在下文中一共展示了Platform类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: DataSource

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
protected DataSource(Parcel in) {
    super(in);
    platform = in.readParcelable(Platform.class.getClassLoader());
    platformApp = in.readParcelable(PlatformApp.class.getClassLoader());
    application = in.readParcelable(Application.class.getClassLoader());
    persistent = in.readByte() != 0;
    int size = in.readInt();
    if (size == -1) dataDescriptors = null;
    else {
        dataDescriptors = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            HashMap<String, String> a;
            int size1 = in.readInt();
            if (size1 == -1)
                a = null;
            else {
                a = new HashMap<>();
                for (int j = 0; j < size1; j++) {
                    a.put(in.readString(), in.readString());
                }
            }
            dataDescriptors.add(a);
        }
    }
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKitAPI,代码行数:26,代码来源:DataSource.java


示例2: createDataSourceBuilderDayStart

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilderDayStart() {
    Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.DAY_START).setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Day Start");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents when day started");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeLong.class.getName());
    ArrayList<HashMap<String, String>> dataDescriptors = new ArrayList<>();
    HashMap<String, String> dataDescriptor = new HashMap<>();
    dataDescriptor.put(METADATA.NAME, "Day Start");
    dataDescriptor.put(METADATA.MIN_VALUE, String.valueOf(0));
    dataDescriptor.put(METADATA.MAX_VALUE, String.valueOf(Long.MAX_VALUE));
    dataDescriptor.put(METADATA.UNIT, "millisecond");
    dataDescriptor.put(METADATA.DESCRIPTION, "Contains day start time in millisecond");
    dataDescriptor.put(METADATA.DATA_TYPE, long.class.getName());
    dataDescriptors.add(dataDescriptor);
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(dataDescriptors);
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:19,代码来源:DayStartEndInfoManager.java


示例3: createDataSourceBuilderDayEnd

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilderDayEnd() {
    Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.DAY_END).setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Day End");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents when day ended");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeLong.class.getName());
    ArrayList<HashMap<String, String>> dataDescriptors = new ArrayList<>();
    HashMap<String, String> dataDescriptor = new HashMap<>();
    dataDescriptor.put(METADATA.NAME, "Day End");
    dataDescriptor.put(METADATA.MIN_VALUE, String.valueOf(0));
    dataDescriptor.put(METADATA.MAX_VALUE, String.valueOf(Long.MAX_VALUE));
    dataDescriptor.put(METADATA.UNIT, "millisecond");
    dataDescriptor.put(METADATA.DESCRIPTION, "Contains day end time in millisecond");
    dataDescriptor.put(METADATA.DATA_TYPE, long.class.getName());
    dataDescriptors.add(dataDescriptor);
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(dataDescriptors);
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:19,代码来源:DayStartEndInfoManager.java


示例4: createDataSourceBuilderStudyStart

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilderStudyStart() {
    Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.STUDY_START).setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Study Start");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents when study started");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeLong.class.getName());
    ArrayList<HashMap<String, String>> dataDescriptors = new ArrayList<>();
    HashMap<String, String> dataDescriptor = new HashMap<>();
    dataDescriptor.put(METADATA.NAME, "Study Start");
    dataDescriptor.put(METADATA.MIN_VALUE, String.valueOf(0));
    dataDescriptor.put(METADATA.MAX_VALUE, String.valueOf(Long.MAX_VALUE));
    dataDescriptor.put(METADATA.UNIT, "millisecond");
    dataDescriptor.put(METADATA.DESCRIPTION, "Contains study start time in millisecond");
    dataDescriptor.put(METADATA.DATA_TYPE, long.class.getName());
    dataDescriptors.add(dataDescriptor);
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(dataDescriptors);
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:19,代码来源:StudyStartEndInfoManager.java


示例5: createDataSourceBuilderStudyEnd

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilderStudyEnd() {
    Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.STUDY_END).setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Study End");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents when study ended");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeLong.class.getName());
    ArrayList<HashMap<String, String>> dataDescriptors = new ArrayList<>();
    HashMap<String, String> dataDescriptor = new HashMap<>();
    dataDescriptor.put(METADATA.NAME, "Study End");
    dataDescriptor.put(METADATA.MIN_VALUE, String.valueOf(0));
    dataDescriptor.put(METADATA.MAX_VALUE, String.valueOf(Long.MAX_VALUE));
    dataDescriptor.put(METADATA.UNIT, "millisecond");
    dataDescriptor.put(METADATA.DESCRIPTION, "Contains study end time in millisecond");
    dataDescriptor.put(METADATA.DATA_TYPE, long.class.getName());
    dataDescriptors.add(dataDescriptor);
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(dataDescriptors);
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:19,代码来源:StudyStartEndInfoManager.java


示例6: writeDataSourceToFile

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
void writeDataSourceToFile() throws IOException {
    ArrayList<DataSource> dataSources = new ArrayList<>();
    if (microsoftBands == null) throw new NullPointerException();
    if (microsoftBands.size() == 0) throw new EmptyStackException();
    for (int i = 0; i < microsoftBands.size(); i++) {
        if(!microsoftBands.get(i).enabled) continue;
        Platform platform= microsoftBands.get(i).getPlatform();
        for(int j=0;j< microsoftBands.get(i).getSensors().size();j++) {
            if(!microsoftBands.get(i).getSensors().get(j).isEnabled()) continue;
            DataSourceBuilder dataSourceBuilder= microsoftBands.get(i).getSensors().get(j).createDataSourceBuilder(microsoftBands.get(i).getPlatform());
            if(dataSourceBuilder==null) continue;
            dataSourceBuilder=dataSourceBuilder.setPlatform(platform);
            DataSource dataSource = dataSourceBuilder.build();
            dataSources.add(dataSource);
        }
    }
    if(dataSources.size()==0) Toast.makeText(context,"Error: MicrosoftBand is not configured propoerly...",Toast.LENGTH_SHORT).show();
    Configuration.write(dataSources);
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:20,代码来源:MicrosoftBands.java


示例7: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerCaloriesEventListener(mCaloriesEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:17,代码来源:CaloryBurn.java


示例8: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerUVEventListener(mUltravioletEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:17,代码来源:UltraVioletRadiation.java


示例9: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerContactEventListener(mBandContactEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();

}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:18,代码来源:BandContact.java


示例10: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerDistanceEventListener(mDistanceEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:17,代码来源:Distance.java


示例11: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerDistanceEventListener(mPaceEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:17,代码来源:Pace.java


示例12: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerPedometerEventListener(mPedometerEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:17,代码来源:StepCount.java


示例13: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerSkinTemperatureEventListener(mSkinTemperatureEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:17,代码来源:SkinTemperature.java


示例14: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerDistanceEventListener(mSpeedEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:17,代码来源:Speed.java


示例15: Sensors

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public Sensors(Context context, Platform platform) {
    this.context = context;
    this.platform = platform;
    sensors = new ArrayList<>();
    sensors.add(new DataQuality());
    sensors.add(new Accelerometer());
    sensors.add(new Gyroscope());
    sensors.add(new AirPressure());
    sensors.add(new AmbientLight());
    sensors.add(new AmbientTemperature());
    sensors.add(new BandContact());
    sensors.add(new CaloryBurn());
    sensors.add(new Distance());
    sensors.add(new GalvanicSkinResponse());
    sensors.add(new HeartRate());
    sensors.add(new MotionType());
    sensors.add(new Pace());
    sensors.add(new RRInterval());
    sensors.add(new SkinTemperature());
    sensors.add(new Speed());
    sensors.add(new StepCount());
    sensors.add(new UltraVioletRadiation());
    sensors.add(new Altimeter());
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:25,代码来源:Sensors.java


示例16: register

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void register(Context context, final BandClient bandClient, Platform platform, CallBack callBack){
    registerDataSource(context, platform);
    this.callBack=callBack;
    final Thread background = new Thread(new Runnable() {
        @Override
        public void run() {
            try {
                bandClient.getSensorManager().registerDistanceEventListener(mMotionTypeEventListener);
            } catch (BandException e) {
                e.printStackTrace();
            }
        }

    });
    background.start();

}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:18,代码来源:MotionType.java


示例17: writeDataSourceToFile

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public void writeDataSourceToFile() throws IOException {
        ArrayList<DataSource> dataSources = new ArrayList<>();
        if (autoSensePlatforms == null) throw new NullPointerException();

        for (int i = 0; i < autoSensePlatforms.size(); i++) {
            String platformId = autoSensePlatforms.get(i).getPlatformId();
            String platformType = autoSensePlatforms.get(i).getPlatformType();
            String deviceId = autoSensePlatforms.get(i).getDeviceId();
            Platform platform = new PlatformBuilder().setId(platformId).setType(platformType).setMetadata(METADATA.DEVICE_ID, deviceId).build();
            ArrayList<AutoSenseDataSource> autoSenseDataSources=autoSensePlatforms.get(i).autoSenseDataSources;
            for (int j = 0; j < autoSenseDataSources.size(); j++) {
                DataSource dataSource=autoSenseDataSources.get(j).createDatSourceBuilder(platform).build();
//                String dataSourceType = autoSenseDataSources.get(i).getDataSourceType();
//                autoSenseDataSources.get(i).createDatSourceBuilder()
//                DataSource dataSource = new DataSourceBuilder().
  //                      setPlatform(platform).
  //                      setType(dataSourceType).build();
                dataSources.add(dataSource);
            }
        }
        Configuration.write(dataSources);
    }
 
开发者ID:MD2Korg,项目名称:mCerebrum-AutoSense,代码行数:23,代码来源:AutoSensePlatforms.java


示例18: createDataSourceBuilder

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
    Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
    ApplicationBuilder applicationBuilder=new ApplicationBuilder();
    applicationBuilder.setId(context.getApplicationInfo().packageName);
    applicationBuilder.setType(context.getApplicationInfo().name);
    Application application=applicationBuilder.build();
    return new DataSourceBuilder().setId(null).setType(dataSourceType).setPlatform(platform).setApplication(application);
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:9,代码来源:Output.java


示例19: createDataSourceBuilder

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilder() {
    Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.STUDY_START).setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Start study");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Defines the time of start the study");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, long.class.getName());
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:10,代码来源:StudyStartManager.java


示例20: createDataSourceBuilder

import org.md2k.datakitapi.source.platform.Platform; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilder() {
    Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.PRE_QUIT).setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "PreQuit Time");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Defines the time of Pre Quit day");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, long.class.getName());
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:10,代码来源:PreQuitManager.java



注:本文中的org.md2k.datakitapi.source.platform.Platform类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ItemPSVI类代码示例发布时间:2022-05-23
下一篇:
Java FindsByName类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap